Skip to content

Commit

Permalink
add voucher search on pressing enter
Browse files Browse the repository at this point in the history
  • Loading branch information
skyYaga committed Jul 16, 2023
1 parent 065b84b commit 95aeffd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/views/LegacyVouchers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<v-text-field
v-model="voucherId"
:label="$t('voucher.number')"
@keydown="searchOnEnterKey"
/><v-btn
:loading="loading"
:disabled="loading"
Expand Down Expand Up @@ -217,6 +218,11 @@ export default {
this.voucherData = result.payload;
this.loading = false;
},
async searchOnEnterKey(event) {
if (event.key === "Enter") {
await this.searchLegacyVoucher();
}
},
async redeemVoucher() {
this.loading = true;
let result = await this.redeemLegacyVoucherAction({
Expand Down

0 comments on commit 95aeffd

Please sign in to comment.