updated rewards assignment and reward progress
This commit is contained in:
@@ -440,6 +440,25 @@ async function ensureBonusFields(): Promise<void> {
|
||||
fields.push({ name: "isPocketMoney", type: "bool", required: false });
|
||||
changed = true;
|
||||
}
|
||||
// Standalone-reward progress window (bonus_configs only): how far progress
|
||||
// counts (`completeBy`) and the window's start/custom-end dates.
|
||||
if (name === "bonus_configs") {
|
||||
if (!has("completeBy")) {
|
||||
fields.push({
|
||||
name: "completeBy", type: "select", required: false,
|
||||
values: ["unlimited", "week", "custom"], maxSelect: 1,
|
||||
});
|
||||
changed = true;
|
||||
}
|
||||
if (!has("startDate")) {
|
||||
fields.push({ name: "startDate", type: "text", required: false });
|
||||
changed = true;
|
||||
}
|
||||
if (!has("completeByDate")) {
|
||||
fields.push({ name: "completeByDate", type: "text", 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