cleanup period confusion
This commit is contained in:
@@ -277,7 +277,7 @@ export const actions: Actions = {
|
||||
rewardType: (fd.get('rewardType') as string) || 'points',
|
||||
rewardValue: (fd.get('rewardValue') as string) || '',
|
||||
criteriaValue: Number(fd.get('criteriaValue') || 0),
|
||||
period: (fd.get('period') as string) || 'weekly'
|
||||
period: (fd.get('period') as string) || ''
|
||||
});
|
||||
}
|
||||
return { success: true };
|
||||
@@ -321,7 +321,7 @@ export const actions: Actions = {
|
||||
rewardType: (fd.get('rewardType') as string) || 'points',
|
||||
rewardValue: (fd.get('rewardValue') as string) || '',
|
||||
criteriaValue: Number(fd.get('criteriaValue') || 0),
|
||||
period: (fd.get('period') as string) || 'weekly'
|
||||
period: (fd.get('period') as string) || ''
|
||||
});
|
||||
}
|
||||
return { success: true };
|
||||
|
||||
@@ -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>
|
||||
{#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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user