diff --git a/frontend/src/routes/[fam]/[username]/+page.svelte b/frontend/src/routes/[fam]/[username]/+page.svelte index 11700be..63db48d 100644 --- a/frontend/src/routes/[fam]/[username]/+page.svelte +++ b/frontend/src/routes/[fam]/[username]/+page.svelte @@ -17,13 +17,13 @@ clockIcon, giftIcon, handCoinsIcon, - moneyIcon, coinsIcon, walletIcon, chevronLeftIcon, chevronRightIcon } from '$lib/components/icons'; import type { AssignedChore, Completion, ChoreTemplate, BonusConfig, Reward } from '$lib/types'; + import PiggyBank from '@lucide/svelte/icons/piggy-bank'; import { handleOf } from '@shared/slugify'; import { weekStart as tzWeekStart, @@ -501,6 +501,15 @@ return sum + (chore?.type === 'money' ? Number(chore.value) : 0); }, 0) ); + // Week's cash-reward earnings (pocket money, bonuses) count while still + // pending AND once claimed — auto-created money-todo rewards are skipped + // (already counted via the chore completion above). + let weekRewardCash = $derived.by(() => + weekRewards + .filter((r) => r.rewardType === 'cash' && !autoRewardIds.has(r.id)) + .reduce((sum, r) => sum + Number(r.value), 0) + ); + let weekCashTotal = $derived(weekChoreCash + weekRewardCash); let weekChorePoints = $derived.by(() => weekCompletions.reduce((sum, c) => { const chore = assigned.find((a) => a.id === c.assignedChoreId); @@ -1250,7 +1259,7 @@ {/if} {#if showCountdown}
-
{@html moneyIcon}
+

Payday is today!

@@ -1439,7 +1448,7 @@

- £{weekChoreCash.toFixed(2)} + £{weekCashTotal.toFixed(2)} cash this week
@@ -3066,12 +3075,14 @@ margin-bottom: 1rem; padding: 1rem 1.2rem; border-radius: 12px; - background: linear-gradient(135deg, #4f46e5, #7c3aed); - color: #fff; - box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35); + background: linear-gradient(135deg, #f59e0b, #fbbf24); + color: #451a03; + box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35); } .pd-icon { - font-size: 1.8rem; + display: flex; + align-items: center; + flex-shrink: 0; } .pd-body { display: flex; diff --git a/frontend/src/routes/[fam]/[username]/settings/+page.svelte b/frontend/src/routes/[fam]/[username]/settings/+page.svelte index 5ed9aa1..ca626da 100644 --- a/frontend/src/routes/[fam]/[username]/settings/+page.svelte +++ b/frontend/src/routes/[fam]/[username]/settings/+page.svelte @@ -80,6 +80,12 @@ detectedTz = ''; } } + // 'auto' resolves to the SERVER's timezone (UTC in prod), not the + // family's — so during BST everything lands an hour late. Pre-select + // the admin's own zone so saving stores a real IANA zone (DST-aware). + if ((timezone === 'auto' || !timezone) && detectedTz && timezoneOptions.includes(detectedTz)) { + timezone = detectedTz; + } }); let qrDataUrl = $state(''); let copied = $state(false); @@ -262,8 +268,9 @@

- Payday: the week starts on this day and weekly earnings are settled at this time. Auto - timezone follows each device. + Payday: the week starts on this day and weekly earnings are settled at this time. Pick + your city so payday lands at the right local time — Auto uses the server's timezone + (UTC), which is an hour out during daylight saving.