Add comprehensive recurring payments system with scheduling

- Add RecurringPayment model with flexible scheduling options
- Implement node-cron based scheduler for payment processing
- Create API endpoints for CRUD operations on recurring payments
- Add recurring payments management UI with create/edit forms
- Integrate scheduler initialization in hooks.server.ts
- Enhance payments/add form with progressive enhancement
- Add recurring payments button to main dashboard
- Improve server-side rendering for better performance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-12 12:41:18 +02:00
parent 701434d532
commit 6ab395e98a
28 changed files with 4412 additions and 94 deletions

View File

@@ -2,17 +2,20 @@
import { onMount } from 'svelte';
import ProfilePicture from './ProfilePicture.svelte';
let balance = {
export let initialBalance = null;
export let initialDebtData = null;
let balance = initialBalance || {
netBalance: 0,
recentSplits: []
};
let debtData = {
let debtData = initialDebtData || {
whoOwesMe: [],
whoIOwe: [],
totalOwedToMe: 0,
totalIOwe: 0
};
let loading = true;
let loading = !initialBalance || !initialDebtData; // Only show loading if we don't have initial data
let error = null;
let singleDebtUser = null;
let shouldShowIntegratedView = false;
@@ -47,7 +50,15 @@
onMount(async () => {
await Promise.all([fetchBalance(), fetchDebtBreakdown()]);
// Mark that JavaScript is loaded
if (typeof document !== 'undefined') {
document.body.classList.add('js-loaded');
}
// Only fetch data if we don't have initial data (progressive enhancement)
if (!initialBalance || !initialDebtData) {
await Promise.all([fetchBalance(), fetchDebtBreakdown()]);
}
});
async function fetchBalance() {