fix bonus completeions
This commit is contained in:
@@ -589,6 +589,17 @@ async function ensureBonusFields(): Promise<void> {
|
||||
fields.push({ name: 'targetChoreIds', type: 'json', required: false });
|
||||
changed = true;
|
||||
}
|
||||
// Completion audit (bonus_configs only): who/when a goal was finished —
|
||||
// stamped by the manual "Mark as complete" action or automatically when
|
||||
// a `once` goal's reward is approved.
|
||||
if (name === 'bonus_configs' && !has('completedBy')) {
|
||||
fields.push({ name: 'completedBy', type: 'text', required: false });
|
||||
changed = true;
|
||||
}
|
||||
if (name === 'bonus_configs' && !has('completedAt')) {
|
||||
fields.push({ name: 'completedAt', type: 'date', required: false });
|
||||
changed = true;
|
||||
}
|
||||
// rewardValue must be optional so an unset pocket-money droplet can exist.
|
||||
const rv = fields.find((f: any) => f.name === 'rewardValue');
|
||||
if (rv && rv.required) {
|
||||
|
||||
Reference in New Issue
Block a user