update footer | add shared chores | expire todos if not completed
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
} from '@shared/timezone';
|
||||
import { slugify } from '@shared/slugify';
|
||||
import { evaluateFam } from './bonuses';
|
||||
import { cleanupExpiredTodos } from './chores';
|
||||
|
||||
function resolveServerTz(tz?: string): string {
|
||||
return resolveTz(tz || 'auto');
|
||||
@@ -236,6 +237,8 @@ export async function completeWeek(pb: any, famId: string) {
|
||||
const ws = weekStart(payday, tz);
|
||||
|
||||
await evaluateFam(pb, famId);
|
||||
// Start of a new week → purge todos whose deadline was in a prior week.
|
||||
await cleanupExpiredTodos(pb, famId).catch(() => {});
|
||||
|
||||
const [members, assigned, completions] = await Promise.all([
|
||||
pb.collection('users').getFullList({ filter: `famId = '${famId}' && role = 'child'` }),
|
||||
|
||||
Reference in New Issue
Block a user