From 155bc23f7d39288b6776af9e447a86cb199ce97c Mon Sep 17 00:00:00 2001 From: edmondlang Date: Thu, 22 Jun 2023 18:05:24 +0800 Subject: [PATCH] list transfer with filters --- .../elements/FilterBookingComponent.vue | 21 ++++++++++++------- .../forms/ChooseCurrencyComponent.vue | 19 ++++++++++++++--- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/resources/assets/vue/components/bookings/elements/FilterBookingComponent.vue b/resources/assets/vue/components/bookings/elements/FilterBookingComponent.vue index 8b9cb34c..a236bf8a 100644 --- a/resources/assets/vue/components/bookings/elements/FilterBookingComponent.vue +++ b/resources/assets/vue/components/bookings/elements/FilterBookingComponent.vue @@ -8,7 +8,7 @@
- +
@@ -84,19 +84,15 @@ if (this.filters.status != null) { switch(this.filters.status) { case 'Active': - // code block this.options.status = '2'; break; case 'Complete': - // code block this.options.status = '3'; break; } } - console.log(this.options); - this.searchKey +=1; this.hasSubmited = true; }, @@ -116,8 +112,19 @@ var currency = new URL(location.href).searchParams.get('currency'); if (currency != null) { - if (currency == 'usd') { - + switch (currency) { + case 'usd': + this.filters.fixed_currency_id = 3; + this.submitSearch(); + break; + case 'cny': + this.filters.fixed_currency_id = 2; + this.submitSearch(); + break; + case 'rmb': + this.filters.fixed_currency_id = 2; + this.submitSearch(); + break; } } } diff --git a/resources/assets/vue/components/bookings/forms/ChooseCurrencyComponent.vue b/resources/assets/vue/components/bookings/forms/ChooseCurrencyComponent.vue index e670a450..0fc1cd49 100644 --- a/resources/assets/vue/components/bookings/forms/ChooseCurrencyComponent.vue +++ b/resources/assets/vue/components/bookings/forms/ChooseCurrencyComponent.vue @@ -28,7 +28,7 @@ v-bind:key="currency.id">
+ @click="updateCurrency(currency)">
@@ -59,6 +59,19 @@