mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 05:31:24 +00:00
Customers tax id field
This commit is contained in:
@@ -116,6 +116,15 @@
|
||||
/>
|
||||
</BaseInputGroup>
|
||||
</BaseInputGrid>
|
||||
|
||||
<BaseInputGroup :label="$t('customers.tax_id')">
|
||||
<BaseInput
|
||||
v-model="customerStore.currentCustomer.tax_id"
|
||||
type="text"
|
||||
class="mt-1 md:mt-0"
|
||||
/>
|
||||
</BaseInputGroup>
|
||||
|
||||
</BaseInputGrid>
|
||||
</BaseTab>
|
||||
|
||||
|
||||
@@ -157,6 +157,24 @@
|
||||
@input="v$.currentCustomer.prefix.$touch()"
|
||||
/>
|
||||
</BaseInputGroup>
|
||||
|
||||
<BaseInputGroup
|
||||
:label="$t('customers.tax_id')"
|
||||
:error="
|
||||
v$.currentCustomer.tax_id.$error &&
|
||||
v$.currentCustomer.tax_id.$errors[0].$message
|
||||
"
|
||||
:content-loading="isFetchingInitialData"
|
||||
>
|
||||
<BaseInput
|
||||
v-model="customerStore.currentCustomer.tax_id"
|
||||
:content-loading="isFetchingInitialData"
|
||||
type="text"
|
||||
name="tax_id"
|
||||
:invalid="v$.currentCustomer.tax_id.$error"
|
||||
@input="v$.currentCustomer.tax_id.$touch()"
|
||||
/>
|
||||
</BaseInputGroup>
|
||||
</BaseInputGrid>
|
||||
</div>
|
||||
|
||||
@@ -645,6 +663,9 @@ const rules = computed(() => {
|
||||
minLength(3)
|
||||
),
|
||||
},
|
||||
tax_id: {
|
||||
required: helpers.withMessage(t('validation.required'), required),
|
||||
},
|
||||
currency_id: {
|
||||
required: helpers.withMessage(t('validation.required'), required),
|
||||
},
|
||||
|
||||
@@ -180,6 +180,7 @@ async function getFields() {
|
||||
{ label: 'Email', value: 'CONTACT_EMAIL' },
|
||||
{ label: 'Phone', value: 'CONTACT_PHONE' },
|
||||
{ label: 'Website', value: 'CONTACT_WEBSITE' },
|
||||
{ label: 'Tax ID', value: 'CONTACT_TAX_ID' },
|
||||
...customerFields.value.map((i) => ({
|
||||
label: i.label,
|
||||
value: i.slug,
|
||||
|
||||
5
resources/scripts/main.js
vendored
5
resources/scripts/main.js
vendored
@@ -14,11 +14,10 @@ import.meta.glob([
|
||||
|
||||
window.pinia = pinia
|
||||
window.Vuelidate = Vuelidate
|
||||
|
||||
import InvoiceShelf from './InvoiceShelf'
|
||||
import InvoiceShelf from './InvoiceShelf.js'
|
||||
|
||||
window.Vue = Vue
|
||||
window.router = router
|
||||
window.VueRouter = VueRouter
|
||||
|
||||
window.InvoiceShelf = new InvoiceShelf()
|
||||
window.InvoiceShelf = new InvoiceShelf()
|
||||
Reference in New Issue
Block a user