Fix a problem when using vue polling method at /dashboard page > currency orders tab > changing ddl does not get list updated

This commit is contained in:
Dillon Ngo
2024-03-22 16:43:17 +08:00
parent 93b44d816f
commit 4ec90b68da
2 changed files with 11 additions and 11 deletions
@@ -117,16 +117,16 @@
</div>
<div class="row">
<div class="col">
<list-component ref="pendingOrdersList" section="pendingOrdersSection" :endpoint="route('api.transaction.list')" :options="{per_page: 5, status: 2, owner_type: 'App\\Models\\Booking', type: 1, original_currency_id_in: [selectedCurrency.id], transaction_service_id: selectedService.id, does_not_have_refund_in_progress: true}">
<!-- <list-component ref="pendingOrdersList" section="pendingOrdersSection" :endpoint="route('api.transaction.list')" :options="{per_page: 5, status: 2, owner_type: 'App\\Models\\Booking', type: 1, original_currency_id_in: [selectedCurrency.id], transaction_service_id: selectedService.id, does_not_have_refund_in_progress: true}">
<template slot="list" slot-scope="{data}">
<supplier-pending-order-component :data="data" v-on:input="updateOrder($event)"></supplier-pending-order-component>
</template>
</list-component>
<!-- <list-polling-component ref="pendingOrdersList" section="pendingOrdersSection" :endpoint="route('api.transaction.list.job')" :options="{per_page: 5, status: 2, owner_type: 'App\\Models\\Booking', type: 1, original_currency_id_in: [selectedCurrency.id], transaction_service_id: selectedService.id}">
</list-component> -->
<list-polling-component ref="pendingOrdersList" section="pendingOrdersSection" :endpoint="route('api.transaction.list.job')" :options="{per_page: 5, status: 2, owner_type: 'App\\Models\\Booking', type: 1, original_currency_id_in: [selectedCurrency.id], transaction_service_id: selectedService.id, does_not_have_refund_in_progress: true}">
<template slot="list" slot-scope="{data}">
<supplier-pending-order-component :data="data" v-on:input="updateOrder($event)"></supplier-pending-order-component>
</template>
</list-polling-component> -->
</list-polling-component>
</div>
</div>
</div>
@@ -103,13 +103,13 @@
this.isLoading = true;
this.submitJob(url);
},
//cief todo: remove?
// updateFilters(filters){
// this.filters = filters;
// this.setDecoratorDefault();
// console.log('updateFilters');
// this.submit(this.endpoint + '?page=1&filters=' + JSON.stringify(this.filters), 'get', this.section, false, false); //cief todo: Uncaught (in promise) null
// },
updateFilters(filters){
console.log('ListPollingComponent updateFilters: ' + JSON.stringify(filters));
this.filters = filters;
this.setDecoratorDefault();
this.$store.dispatch('updateListQueue', {'name': this.section, 'page': 1, 'filters': this.filters});
// this.submit(this.endpoint + '?page=1&filters=' + JSON.stringify(this.filters), 'get', this.section, false, false); //cief todo: Uncaught (in promise) null
},
successHandler(response){
let result = JSON.parse(response.payload.data.result);
result.meta = {