added pocketmoney default droplet

This commit is contained in:
JCEEE
2026-08-25 14:30:26 +01:00
parent e904bb8210
commit 5302f86f3c
10 changed files with 423 additions and 83 deletions
@@ -54,6 +54,24 @@ export const actions = {
role: 'parent'
});
await pbAdmin.create('settings', { famId: fam.id });
// Seed the family-level POCKET MONEY bonus template (the teaching
// droplet). Per-child instances are created when each child joins.
await pbAdmin
.create('bonus_templates', {
famId: fam.id,
name: 'POCKET MONEY',
description: 'Weekly pocket money for children',
target: 'individual',
type: 'threshold',
thresholdType: 'percent',
occurrence: 'recurring',
rewardType: 'cash',
rewardValue: '',
criteriaValue: 50,
period: 'weekly',
isPocketMoney: true
})
.catch(() => null);
} catch (e) {
throw new SignupError(
`Could not create account — ${e instanceof Error ? e.message : 'please try again'}`