modal component refactored
This commit is contained in:
46
resources/assets/js/mixins/global.js
vendored
46
resources/assets/js/mixins/global.js
vendored
@ -119,6 +119,11 @@ export default {
|
||||
storeCard: false,
|
||||
card_id: 0,
|
||||
},
|
||||
|
||||
min_date: false,
|
||||
item_name_input: false,
|
||||
price_name_input: false,
|
||||
quantity_name_input: false,
|
||||
}
|
||||
},
|
||||
|
||||
@ -1261,5 +1266,46 @@ export default {
|
||||
this.errors.push(e);
|
||||
})
|
||||
},
|
||||
|
||||
//custom input settings for invoice
|
||||
onSmallWidthColumn(item) {
|
||||
this.$refs[item].$el.setAttribute('custom-half', true);
|
||||
},
|
||||
|
||||
onFullWidthColumn(item) {
|
||||
this.$refs[item].$el.removeAttribute('custom-half');
|
||||
},
|
||||
|
||||
settingsInvoice() {
|
||||
if (this.form.item_name == 'custom') {
|
||||
this.item_name_input = true;
|
||||
this.onSmallWidthColumn("item_name");
|
||||
} else {
|
||||
this.item_name_input = false;
|
||||
this.onFullWidthColumn("item_name");
|
||||
}
|
||||
|
||||
if (this.form.price_name == 'custom') {
|
||||
this.price_name_input = true;
|
||||
this.onSmallWidthColumn("price_name");
|
||||
} else {
|
||||
this.price_name_input = false;
|
||||
this.onFullWidthColumn("price_name");
|
||||
}
|
||||
|
||||
if (this.form.quantity_name == 'custom') {
|
||||
this.quantity_name_input = true;
|
||||
this.onSmallWidthColumn("quantity_name");
|
||||
} else {
|
||||
this.quantity_name_input = false;
|
||||
this.onFullWidthColumn("quantity_name");
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// set minimum date for date component
|
||||
setMinDate(date) {
|
||||
this.min_date = date;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user