Skip to content

Commit

Permalink
🐛 Fix missing coupon field for purchase link (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwingt authored Aug 22, 2024
1 parent 98d9d2f commit 0b55cac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pages/nft-book-store/collection/status/[collectionId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,12 @@
<UInput v-model="fromChannel" placeholder="Channel ID" />
</UFormGroup>

<UFormGroup v-if="Object.keys(coupons).length" label="Active coupon" hint="Optional">
<USelect v-model="activeCoupon" :options="[''].concat(Object.keys(coupons))" />
<UFormGroup v-if="couponsTableRows.length" label="Active coupon" hint="Optional">
<USelect
v-model="activeCoupon"
:options="[{ value: '', label: 'Select a coupon' }].concat(couponsTableRows.map(({ id }) => ({ label: id, value: id })))"
:ui="!activeCoupon ? { color: { white: { outline: 'text-gray-400 dark:text-gray-500' } } } : {}"
/>
</UFormGroup>

<UButton
Expand Down
8 changes: 8 additions & 0 deletions pages/nft-book-store/status/[classId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,14 @@
<UInput v-model="fromChannelInput" placeholder="Channel ID(s), separated by commas (e.g. store01, store02)" />
</UFormGroup>

<UFormGroup v-if="couponsTableRows.length" label="Active coupon" hint="Optional">
<USelect
v-model="activeCoupon"
:options="[{ value: '', label: 'Select a coupon' }].concat(couponsTableRows.map(({ id }) => ({ label: id, value: id })))"
:ui="!activeCoupon ? { color: { white: { outline: 'text-gray-400 dark:text-gray-500' } } } : {}"
/>
</UFormGroup>

<UCard
v-if="purchaseLinks.length > 1"
:ui="{
Expand Down

0 comments on commit 0b55cac

Please sign in to comment.