js error fixed from edit column modal

This commit is contained in:
Burak Civan
2022-11-22 17:57:29 +03:00
parent 6b5e56f1db
commit bea2663fff
2 changed files with 44 additions and 3 deletions

View File

@ -229,7 +229,10 @@ export default {
'#efef32'
],
min_date: false,
selected_card: null
selected_card: null,
item_name_input: false,
price_name_input: false,
quantity_name_input: false,
}
},
@ -290,6 +293,43 @@ export default {
.catch(error => {
});
},
onSmallWidthColumn(item) {
this.$refs[item].$el.classList.remove('sm:col-span-6');
this.$refs[item].$el.classList.add('sm:col-span-3');
},
onFullWidthColumn(item) {
this.$refs[item].$el.classList.add('sm:col-span-6');
this.$refs[item].$el.classList.remove('sm:col-span-3');
},
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");
}
},
},
watch: {