varierty of implementstions based on platform droplet issuance

This commit is contained in:
JCEEE
2026-08-26 10:17:32 +01:00
parent 7ebabc6e62
commit 8fea21704a
16 changed files with 1118 additions and 452 deletions
+3 -18
View File
@@ -54,24 +54,9 @@ 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);
// Pocket money is a platform-owned global template (seeded by migrate)
// and per-child instances are created when each child joins — no
// family-level template needed here.
} catch (e) {
throw new SignupError(
`Could not create account — ${e instanceof Error ? e.message : 'please try again'}`