Lint & refactor
This commit is contained in:
parent
e1d73a2fd4
commit
b43b726587
@ -202,7 +202,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
item_list: [],
|
||||
invoiceItems: [],
|
||||
selected_items: [],
|
||||
search: '', // search column model
|
||||
show: {
|
||||
item_selected: false,
|
||||
@ -323,7 +323,6 @@ export default {
|
||||
await window.axios.get(url + '/common/items?search="' + this.search + '" limit:10')
|
||||
.then(response => {
|
||||
this.item_list = [];
|
||||
|
||||
let items = response.data.data;
|
||||
|
||||
items.forEach(function (item, index) {
|
||||
@ -350,10 +349,10 @@ export default {
|
||||
},
|
||||
|
||||
addItem(item) {
|
||||
this.invoiceItems.push(item);
|
||||
this.selected_items.push(item);
|
||||
|
||||
this.$emit('item', item);
|
||||
this.$emit('items', this.invoiceItems);
|
||||
this.$emit('items', this.selected_items);
|
||||
|
||||
this.show.item_selected = false;
|
||||
this.show.item_list = false;
|
||||
@ -513,7 +512,7 @@ export default {
|
||||
return this.sortItems();
|
||||
},
|
||||
currentIndex() {
|
||||
return this.invoiceItems.length;
|
||||
return this.selected_items.length;
|
||||
},
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user