add supplier filter to exchange

This commit is contained in:
omair saleh
2022-03-31 13:12:37 +08:00
parent 72e645c426
commit fb33635ad1
2 changed files with 2 additions and 7 deletions
@@ -45,7 +45,7 @@
<div class="col">
<validation-wrapper-component selectable :validator="$v.parameters.supplier">
<label>Supplier</label>
<selectable-component :endpoint="route('api.company.list')" :options="{'business_type': 3}" section="supplierListSection" valueColumn="id" :labelColumn="['name']" v-model="parameters.supplier"></selectable-component>
<selectable-component :endpoint="route('api.company.list')+'?filters={%business_type%22:3}'" section="supplierListSection" valueColumn="id" :labelColumn="['name']" v-model="parameters.supplier"></selectable-component>
</validation-wrapper-component>
</div>
<div class="col-12 col-md mb-2 mb-md-0">
@@ -23,17 +23,12 @@
valueColumn: {
type: String,
required: true
},
options: {
default () {
return {}
}
}
},
created(){
if(!this.$store.getters.isInQueue(this.section)){
this.$store.dispatch('updateListQueue', {name: this.section});
this.$store.dispatch('crudRequest', {endpoint: this.endpoint+'?filters='+JSON.stringify(this.options), method: 'get'}).then(response => {
this.$store.dispatch('crudRequest', {endpoint: this.endpoint, method: 'get'}).then(response => {
let success = response.ok;
response.json().then(response => {
if(!success){return;}