js error fixed from edit column modal
This commit is contained in:
@ -229,7 +229,10 @@ export default {
|
|||||||
'#efef32'
|
'#efef32'
|
||||||
],
|
],
|
||||||
min_date: false,
|
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 => {
|
.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: {
|
watch: {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
label="{{ trans('settings.invoice.item_name') }}"
|
label="{{ trans('settings.invoice.item_name') }}"
|
||||||
:options="$item_names"
|
:options="$item_names"
|
||||||
:selected="$item_name"
|
:selected="$item_name"
|
||||||
|
change="settingsInvoice"
|
||||||
input-name="item_name_input"
|
input-name="item_name_input"
|
||||||
:input-value="$item_name_input"
|
:input-value="$item_name_input"
|
||||||
form-group-class="sm:col-span-6 sm:gap-0"
|
form-group-class="sm:col-span-6 sm:gap-0"
|
||||||
@ -15,6 +16,7 @@
|
|||||||
label="{{ trans('settings.invoice.price_name') }}"
|
label="{{ trans('settings.invoice.price_name') }}"
|
||||||
:options="$price_names"
|
:options="$price_names"
|
||||||
:selected="$price_name"
|
:selected="$price_name"
|
||||||
|
change="settingsInvoice"
|
||||||
input-name="price_name_input"
|
input-name="price_name_input"
|
||||||
:input-value="$price_name_input"
|
:input-value="$price_name_input"
|
||||||
form-group-class="sm:col-span-6 sm:gap-0"
|
form-group-class="sm:col-span-6 sm:gap-0"
|
||||||
@ -25,14 +27,13 @@
|
|||||||
label="{{ trans('settings.invoice.quantity_name') }}"
|
label="{{ trans('settings.invoice.quantity_name') }}"
|
||||||
:options="$quantity_names"
|
:options="$quantity_names"
|
||||||
:selected="$quantity_name"
|
:selected="$quantity_name"
|
||||||
|
change="settingsInvoice"
|
||||||
input-name="quantity_name_input"
|
input-name="quantity_name_input"
|
||||||
:input-value="$quantity_name_input"
|
:input-value="$quantity_name_input"
|
||||||
form-group-class="sm:col-span-6 sm:gap-0"
|
form-group-class="sm:col-span-6 sm:gap-0"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<x-form.group.toggle name="hide_item_description" label="{{ trans('settings.invoice.hide.item_description') }}" :value="$hide_item_description" />
|
<x-form.group.toggle name="hide_item_description" label="{{ trans('settings.invoice.hide.item_description') }}" :value="$hide_item_description" />
|
||||||
|
|
||||||
<x-form.group.toggle name="hide_quantity" label="{{ trans('settings.invoice.hide.quantity') }}" :value="$hide_quantity" />
|
|
||||||
<x-form.group.toggle name="hide_amount" label="{{ trans('settings.invoice.hide.amount') }}" :value="$hide_amount" not-required form-group-class="sm:col-span-6" />
|
<x-form.group.toggle name="hide_amount" label="{{ trans('settings.invoice.hide.amount') }}" :value="$hide_amount" not-required form-group-class="sm:col-span-6" />
|
||||||
|
|
||||||
<x-form.input.hidden name="type" :value="$type" />
|
<x-form.input.hidden name="type" :value="$type" />
|
||||||
|
Reference in New Issue
Block a user