small fixes
This commit is contained in:
@@ -269,6 +269,10 @@
|
||||
let doneConfigs = $derived(
|
||||
configs.filter((c: BonusConfig) => c.status === 'completed') as BonusConfig[]
|
||||
);
|
||||
|
||||
let isPocketMoney = $derived(
|
||||
!!editingConfig?.isPocketMoney || !!creatingFromTemplate?.isPocketMoney
|
||||
);
|
||||
</script>
|
||||
|
||||
<ViewHeader title="Rewards" hero />
|
||||
@@ -598,11 +602,13 @@
|
||||
<span class="field-label">{@html stepIcon(1)} Name</span>
|
||||
<input name="name" bind:value={editVals.name} required />
|
||||
</label>
|
||||
{#if !isPocketMoney}
|
||||
<label>
|
||||
<span class="field-label">{@html stepIcon(1)} Description</span>
|
||||
<input name="description" bind:value={editVals.description} />
|
||||
</label>
|
||||
<label>
|
||||
{/if}
|
||||
<label>
|
||||
<span class="field-label"><UsersRound size={14} /> Target (who)</span>
|
||||
<select name="target" bind:value={editVals.target}>
|
||||
<option value="individual">Individual</option>
|
||||
@@ -625,6 +631,7 @@
|
||||
|
||||
<!-- STEP 2 — How (rules + progress) -->
|
||||
<div class="step-body" hidden={step !== 2}>
|
||||
{#if !isPocketMoney}
|
||||
<label>
|
||||
<span class="field-label"><Settings2 size={14} /> Type</span>
|
||||
<select name="type" bind:value={editVals.type}>
|
||||
@@ -633,7 +640,8 @@
|
||||
<option value="manual">Manual</option>
|
||||
</select>
|
||||
</label>
|
||||
{#if editVals.type === 'threshold'}
|
||||
{/if}
|
||||
{#if editVals.type === 'threshold' && !isPocketMoney}
|
||||
<label>
|
||||
<span class="field-label"><Target size={14} /> Threshold by</span>
|
||||
<select name="thresholdType" bind:value={editVals.thresholdType}>
|
||||
@@ -691,6 +699,7 @@
|
||||
>
|
||||
</label>
|
||||
{/if}
|
||||
{#if !isPocketMoney}
|
||||
<label>
|
||||
<span class="field-label"><Settings2 size={14} /> Occurrence</span>
|
||||
<select name="occurrence" bind:value={editVals.occurrence}>
|
||||
@@ -698,7 +707,8 @@
|
||||
<option value="once">Once</option>
|
||||
</select>
|
||||
</label>
|
||||
{#if showPeriod}
|
||||
{/if}
|
||||
{#if showPeriod && !isPocketMoney}
|
||||
<label>
|
||||
<span class="field-label"><CalendarDays size={14} /> Period</span>
|
||||
<select name="period" bind:value={editVals.period}>
|
||||
@@ -847,7 +857,7 @@
|
||||
<button type="button" class="nav-btn" onclick={() => (step = 2)}>
|
||||
<ArrowLeft size={14} /> Back
|
||||
</button>
|
||||
{#if editingConfig}
|
||||
{#if editingConfig && !isPocketMoney}
|
||||
<button
|
||||
type="button"
|
||||
class="toggle-btn"
|
||||
|
||||
Reference in New Issue
Block a user