Web Push Zustand und Deep Links stabilisieren
All checks were successful
CI / Build and Deploy (push) Successful in 2m59s

This commit is contained in:
jan
2026-05-06 21:13:54 +02:00
parent 0d72cfb144
commit 3e5ac7730d
5 changed files with 123 additions and 13 deletions

View File

@@ -50,6 +50,7 @@ type BudgetColumnProps = {
busy: boolean;
approvalThreshold: number;
requiredApprovalTypes: ("CHAIR_A" | "CHAIR_B" | "FINANCE")[];
focusBudgetId?: string | null;
onApprove: (expenseId: string, approvalType: "CHAIR_A" | "CHAIR_B" | "FINANCE") => Promise<void>;
onMarkPaid: (expenseId: string) => Promise<void>;
onDocument: (expenseId: string, proofUrl?: string) => Promise<void>;
@@ -143,6 +144,7 @@ export function BudgetColumn({
busy,
approvalThreshold,
requiredApprovalTypes,
focusBudgetId,
onApprove,
onMarkPaid,
onDocument,
@@ -193,6 +195,12 @@ export function BudgetColumn({
}
}, [group.budgets, selectedBudgetId]);
useEffect(() => {
if (focusBudgetId && group.budgets.some((budget) => budget.id === focusBudgetId)) {
setSelectedBudgetId(focusBudgetId);
}
}, [focusBudgetId, group.budgets]);
const approvedSpend = useMemo(
() => group.budgets.reduce((sum, budget) => sum + getApprovedSpend(budget.expenses), 0),
[group.budgets]