mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-23 06:24:03 +00:00
add supplier filter to exchange
This commit is contained in:
@@ -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;}
|
||||
|
||||
Reference in New Issue
Block a user