From ccbbd302d4081b4ec6b98b24dbeee1530d165784 Mon Sep 17 00:00:00 2001 From: JCEEE <0xjceee@proton.me> Date: Sun, 2 Aug 2026 18:29:00 +0100 Subject: [PATCH] update ui view for member --- .../src/routes/[fam]/[username]/+page.svelte | 998 +++++++++--------- 1 file changed, 519 insertions(+), 479 deletions(-) diff --git a/frontend/src/routes/[fam]/[username]/+page.svelte b/frontend/src/routes/[fam]/[username]/+page.svelte index dfc0e18..acf20a6 100644 --- a/frontend/src/routes/[fam]/[username]/+page.svelte +++ b/frontend/src/routes/[fam]/[username]/+page.svelte @@ -202,9 +202,12 @@ const isCurrentWeek = $derived(weekStart === currentWeek); const daysLeft = $derived( - Math.round( - (new Date(weekEnd + 'T00:00:00').getTime() - new Date(todayIso + 'T00:00:00').getTime()) / - 86400000 + Math.max( + 0, + Math.round( + (new Date(weekEnd + 'T00:00:00').getTime() - new Date(todayIso + 'T00:00:00').getTime()) / + 86400000 + ) ) ); @@ -682,286 +685,266 @@ {:else} - -
Loading...
{:else if error}{error}
{:else} - -No chores assigned
- {/if} -No bonuses yet
- {:else} -pending this week
-pending this week
-Nothing to claim
+ + + + + + +All done!
+ {:else} + {#each dailyPending as chore} + + {/each} + {/if} +All done!
+ {:else} + {#each weeklyPending as chore} + + {/each} + {/if} +Nothing yet
+ {:else} + {#each completedToday as c} + {@const chore = assigned.find((a) => a.id === c.assignedChoreId)} + {#if chore} + + {/if} + {/each} + {/if} +No rewards waiting
+ {:else} +All done!
- {:else} - {#each dailyPending as chore} - - {/each} - {/if} -All done!
- {:else} - {#each weeklyPending as chore} - - {/each} - {/if} -Nothing yet
- {:else} - {#each completedToday as c} - {@const chore = assigned.find((a) => a.id === c.assignedChoreId)} - {#if chore} - - {/if} - {/each} - {/if} -