Skip to content

Commit 55ebc16

Browse files
feat: implement recurring expense management UI and associated dashboard pages
1 parent 542f5a9 commit 55ebc16

7 files changed

Lines changed: 29 additions & 11 deletions

File tree

apps/web/app/dashboard/expenses/[expenseId]/page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ import { backendFetch } from '../../../../src/lib/backend';
88
import { getPublicS3BaseUrl } from '../../../../src/lib/env';
99

1010
interface ExpenseDetailPageProps {
11-
params: {
11+
params: Promise<{
1212
expenseId: string;
13-
};
13+
}>;
1414
}
1515

1616
export default async function ExpenseDetailPage({ params }: ExpenseDetailPageProps) {
17+
const { expenseId } = await params;
1718
try {
18-
const expense = await backendFetch<ExpenseDto>(`/expenses/${params.expenseId}`);
19+
const expense = await backendFetch<ExpenseDto>(`/expenses/${expenseId}`);
1920
const s3BaseUrl = getPublicS3BaseUrl();
2021
const receiptUrl = expense.receiptFileKey && s3BaseUrl ? `${s3BaseUrl.replace(/\/$/, '')}/${expense.receiptFileKey}` : null;
2122

apps/web/app/dashboard/groups/[groupId]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ import { ExpenseTable, GroupActions, GroupSummaryPanel, MemberList, RecurringExp
1616
import { backendFetch } from '../../../../src/lib/backend';
1717

1818
interface GroupDetailPageProps {
19-
params: {
19+
params: Promise<{
2020
groupId: string;
21-
};
21+
}>;
2222
}
2323

2424
export default async function GroupDetailPage({ params }: GroupDetailPageProps) {
25-
const { groupId } = params;
25+
const { groupId } = await params;
2626

2727
try {
2828
const [group, members, expenses, summary, balances, currentUser, recurringExpenses] = await Promise.all([

apps/web/app/dashboard/groups/[groupId]/settle/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { DashboardLayout } from '../../../../../src/components/layout';
44
import { SettlementList } from '../../../../../src/components/groups';
55
import { backendFetch } from '../../../../../src/lib/backend';
66

7-
export default async function SettleGroupPage({ params }: { params: { groupId: string } }) {
8-
const { groupId } = params;
7+
export default async function SettleGroupPage({ params }: { params: Promise<{ groupId: string }> }) {
8+
const { groupId } = await params;
99

1010
try {
1111
const [group, members, suggestions, activity] = await Promise.all([

apps/web/app/login/page.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ import { fadeUp, staggerContainer } from '../../components/home/motion-variants'
2020
import { GlassCard } from '../../components/ui/GlassCard';
2121
import { AccentButton } from '../../components/ui/AccentButton';
2222

23-
export default function LoginPage() {
23+
import { Suspense } from 'react';
24+
25+
function LoginContent() {
2426
const [email, setEmail] = useState('');
2527
const [password, setPassword] = useState('');
2628
const [showPassword, setShowPassword] = useState(false);
@@ -210,3 +212,11 @@ export default function LoginPage() {
210212
</main>
211213
);
212214
}
215+
216+
export default function LoginPage() {
217+
return (
218+
<Suspense fallback={<main className="min-h-screen bg-[#030303]" />}>
219+
<LoginContent />
220+
</Suspense>
221+
);
222+
}

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
7-
"build": "tsc --noEmit",
7+
"build": "next build",
88
"start": "next start",
99
"lint": "tsc --noEmit",
1010
"test": "echo \"No tests yet\""

apps/web/src/components/groups/RecurringExpenseList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export function RecurringExpenseList({ recurringExpenses, members, currency, onC
246246
</span>
247247
</div>
248248
<p className="mt-2 text-sm text-[var(--fs-text-muted)]">
249-
Next run {new Date(item.nextOccurrenceAt).toLocaleDateString()} • Paid by {memberNameById[item.payerId] ?? 'Unknown'} • {item.splits.length} participants
249+
Next run {new Date(item.nextOccurrenceAt).toLocaleDateString()} Paid by {memberNameById[item.payerId] ?? 'Unknown'} {item.splits.length} participants
250250
</p>
251251
<p className="mt-1 text-[12px] font-medium text-[var(--fs-text-muted)]">
252252
{formatGeneratedLabel(item.lastGeneratedAt)}

vercel.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"version": 2,
3+
"framework": "nextjs",
4+
"buildCommand": "pnpm --filter web build",
5+
"outputDirectory": "apps/web/.next",
6+
"installCommand": "pnpm install"
7+
}

0 commit comments

Comments
 (0)