mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 21:43:57 +00:00
list transfer with filters
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
<div class="row" @keyup.enter="submitSearch()" v-show="!isLoading">
|
||||
<div class="col-12 col-md">
|
||||
<choose-currency-component v-on:input="updateCurrencyId($event)" @js-update-currency="handleJsUpdateCurrency" ></choose-currency-component>
|
||||
<choose-currency-component v-on:input="updateCurrencyId($event)" :currecy_id="filters.fixed_currency_id"></choose-currency-component>
|
||||
</div>
|
||||
<div class="col-12 col-md">
|
||||
<choose-service-component v-on:input="updateServiceId($event)" v-on:loaded="doneLoadingServiceId"></choose-service-component>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
v-bind:key="currency.id">
|
||||
<div class="col b-b b-grey p-t-10 p-b-10 pointer hover-t-10 p-b-10 "
|
||||
:class="[{ 'bg-primary-light': selectedCurrency.id === currency.id }, { 'text-white': selectedCurrency.id === currency.id }, { 'hover-primary': selectedCurrency.id !== currency.id }, { 'pointer': selectedCurrency.id !== currency.id }]"
|
||||
@click="UpdateCurrency(currency)">
|
||||
@click="updateCurrency(currency)">
|
||||
<div class="row align-items-center justify-content-center">
|
||||
<div class="col">
|
||||
<div class="row align-items-center justify-content-center">
|
||||
@@ -59,6 +59,19 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
currecy_id: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currecy_id(newValue, oldValue) {
|
||||
var currencySelected = this.currencyList.find(currencyList => currencyList.id === newValue);
|
||||
this.updateCurrency(currencySelected);
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
section: 'chooseCurrencySection',
|
||||
@@ -105,10 +118,10 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.UpdateCurrency(Object.values(this.currencyList)[0]);
|
||||
this.updateCurrency(Object.values(this.currencyList)[0]);
|
||||
},
|
||||
methods: {
|
||||
UpdateCurrency(currency) {
|
||||
updateCurrency(currency) {
|
||||
this.selectedCurrency = currency;
|
||||
this.recipientMenu = false;
|
||||
this.$emit('input', currency.id);
|
||||
|
||||
Reference in New Issue
Block a user