fixed payout locks & time sensitive todos & minor ui updates on chores view

This commit is contained in:
JCEEE
2026-08-04 11:38:38 +01:00
parent 7603c3eb21
commit c38ca43f0b
11 changed files with 289 additions and 164 deletions
@@ -120,7 +120,8 @@ export async function load(event) {
tallies: chores.tallies || {},
payday: chores.payday,
paydayTime: chores.paydayTime || '18:00',
timezone: chores.timezone || 'auto'
timezone: chores.timezone || 'auto',
simulateEow: !!chores.simulateEow
};
} catch {
return {
@@ -161,7 +162,8 @@ export const actions = {
const famId = event.locals.session.famId;
try {
const preview = await hono.admin.eowPreview(event, famId);
return { preview };
await hono.admin.updateSettings(event, famId, { simulateEow: true });
return { preview, simulateEow: true };
} catch (e) {
return { error: e instanceof Error ? e.message : 'Failed to preview payday' };
}