fix: improve cospend mobile layout and fix settlement rounding
- Fix settlement amounts rounding to 2 decimal places in debts API - Improve dashboard mobile responsiveness with tighter gaps and padding - Optimize settlement layout to stay horizontal on mobile with smaller profile pictures - Fix payments page mobile layout with better breakpoints and reduced min-width - Enhance modal behavior on mobile devices with proper responsive design - Reduce container max-width from 1400px to 1200px for better mobile fitting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -89,10 +89,13 @@ export const GET: RequestHandler = async ({ locals }) => {
|
||||
// Separate into who owes you vs who you owe
|
||||
const whoOwesMe = debtSummaries.filter(debt => debt.netAmount < 0).map(debt => ({
|
||||
...debt,
|
||||
netAmount: Math.abs(debt.netAmount) // Make positive for display
|
||||
netAmount: Math.round(Math.abs(debt.netAmount) * 100) / 100 // Round to 2 decimal places and make positive for display
|
||||
}));
|
||||
|
||||
const whoIOwe = debtSummaries.filter(debt => debt.netAmount > 0);
|
||||
const whoIOwe = debtSummaries.filter(debt => debt.netAmount > 0).map(debt => ({
|
||||
...debt,
|
||||
netAmount: Math.round(debt.netAmount * 100) / 100 // Round to 2 decimal places
|
||||
}));
|
||||
|
||||
return json({
|
||||
whoOwesMe,
|
||||
|
||||
Reference in New Issue
Block a user