cleanup period confusion

This commit is contained in:
JCEEE
2026-09-04 10:22:51 +01:00
parent 44524de4b9
commit a959f204bd
2 changed files with 21 additions and 16 deletions
+19 -14
View File
@@ -45,7 +45,7 @@
rewardType: 'points',
rewardValue: '',
criteriaValue: 0,
period: 'weekly'
period: 'daily'
};
let tplVals = $state({ ...blankTpl });
@@ -73,7 +73,7 @@
rewardType: rec.rewardType || 'points',
rewardValue: rec.rewardValue ?? '',
criteriaValue: rec.criteriaValue ?? 0,
period: rec.period || 'weekly'
period: rec.period || ''
};
showTplModal = true;
}
@@ -554,18 +554,23 @@
Reward Value
<input name="rewardValue" bind:value={tplVals.rewardValue} />
</label>
<label>
Target Value
<input type="number" name="criteriaValue" bind:value={tplVals.criteriaValue} />
</label>
<label>
Period
<select name="period" bind:value={tplVals.period}>
<option value="daily">Daily</option>
<option value="weekly">Weekly</option>
<option value="monthly">Monthly</option>
</select>
</label>
{#if tplVals.bonusType !== 'manual'}
<label>
Target Value
<input type="number" name="criteriaValue" bind:value={tplVals.criteriaValue} />
</label>
{/if}
{#if tplVals.bonusType === 'manual'}
<label>
Period
<select name="period" bind:value={tplVals.period}>
<option value="">Unlimited</option>
<option value="daily">Daily</option>
<option value="weekly">Weekly</option>
<option value="monthly">Monthly</option>
</select>
</label>
{/if}
{/if}