mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
fix validation and translation issues
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
import BaseButton from './BaseButton.vue'
|
import BaseButton from './BaseButton.vue'
|
||||||
import ItemModal from './modal/ItemModal.vue'
|
import ItemModal from './modal/ItemModal.vue'
|
||||||
import BaseModal from './modal/BaseModal.vue'
|
import BaseModal from './modal/BaseModal.vue'
|
||||||
import BaseDatePicker from './base-date-picker/BaseDatepicker.vue'
|
import BaseDatePicker from './base-date-picker/BaseDatePicker.vue'
|
||||||
import BaseInput from './BaseInput.vue'
|
import BaseInput from './BaseInput.vue'
|
||||||
import BaseSwitch from './BaseSwitch.vue'
|
import BaseSwitch from './BaseSwitch.vue'
|
||||||
import BaseTextArea from './BaseTextArea.vue'
|
import BaseTextArea from './BaseTextArea.vue'
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<!-- tab-1 -->
|
<!-- tab-1 -->
|
||||||
<tabs :options="{defaultTabHash: 'basic-home' }" class="tabs-simple">
|
<tabs :options="{defaultTabHash: 'basic-home' }" class="tabs-simple">
|
||||||
<tab id="basic-home" name="Basic Info">
|
<tab id="basic-home" :name="$t('customers.basic_info')">
|
||||||
<div class="basic-info">
|
<div class="basic-info">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-4 col-form-label">{{ $t('customers.display_name') }} <span class="required">*</span></label>
|
<label class="col-sm-4 col-form-label">{{ $t('customers.display_name') }} <span class="required">*</span></label>
|
||||||
@ -97,7 +97,7 @@
|
|||||||
</tab>
|
</tab>
|
||||||
|
|
||||||
<!-- tab-2 -->
|
<!-- tab-2 -->
|
||||||
<tab id="basic-profile" name="Billing Address">
|
<tab id="basic-profile" :name="$t('customers.billing_address')">
|
||||||
<div class="basic-info">
|
<div class="basic-info">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-4 col-form-label">{{ $t('customers.name') }}</label>
|
<label class="col-sm-4 col-form-label">{{ $t('customers.name') }}</label>
|
||||||
@ -226,7 +226,7 @@
|
|||||||
</tab>
|
</tab>
|
||||||
|
|
||||||
<!-- tab-3 -->
|
<!-- tab-3 -->
|
||||||
<tab id="basic-message" name="Shipping Address">
|
<tab id="basic-message" :name="$t('customers.shipping_address')">
|
||||||
<div class="basic-info">
|
<div class="basic-info">
|
||||||
<div class="form-group row ">
|
<div class="form-group row ">
|
||||||
<div class="col-sm-12 copy-address-button">
|
<div class="col-sm-12 copy-address-button">
|
||||||
@ -266,9 +266,9 @@
|
|||||||
<div class="col-sm-7">
|
<div class="col-sm-7">
|
||||||
<base-text-area
|
<base-text-area
|
||||||
v-model="shipping.address_street_1"
|
v-model="shipping.address_street_1"
|
||||||
|
:placeholder="$t('general.street_1')"
|
||||||
rows="2"
|
rows="2"
|
||||||
cols="50"
|
cols="50"
|
||||||
placeholder="Street 1"
|
|
||||||
class="mb-1"
|
class="mb-1"
|
||||||
@input="$v.shipping.address_street_1.$touch()"
|
@input="$v.shipping.address_street_1.$touch()"
|
||||||
/>
|
/>
|
||||||
@ -278,9 +278,9 @@
|
|||||||
|
|
||||||
<base-text-area
|
<base-text-area
|
||||||
v-model="shipping.address_street_2"
|
v-model="shipping.address_street_2"
|
||||||
|
:placeholder="$t('general.street_2')"
|
||||||
rows="2"
|
rows="2"
|
||||||
cols="50"
|
cols="50"
|
||||||
placeholder="Street 2"
|
|
||||||
@input="$v.shipping.address_street_2.$touch()"
|
@input="$v.shipping.address_street_2.$touch()"
|
||||||
/>
|
/>
|
||||||
<div v-if="$v.shipping.address_street_2.$error">
|
<div v-if="$v.shipping.address_street_2.$error">
|
||||||
@ -299,9 +299,9 @@
|
|||||||
:searchable="true"
|
:searchable="true"
|
||||||
:show-labels="false"
|
:show-labels="false"
|
||||||
:allow-empty="false"
|
:allow-empty="false"
|
||||||
|
:placeholder="$t('general.select_country')"
|
||||||
track-by="id"
|
track-by="id"
|
||||||
label="name"
|
label="name"
|
||||||
placeholder="select country"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -103,7 +103,7 @@ export default {
|
|||||||
},
|
},
|
||||||
openCustomerModal () {
|
openCustomerModal () {
|
||||||
this.openModal({
|
this.openModal({
|
||||||
title: 'Add Customer',
|
title: this.$t('customers.add_customer'),
|
||||||
componentName: 'CustomerModal',
|
componentName: 'CustomerModal',
|
||||||
size: 'lg'
|
size: 'lg'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -56,11 +56,11 @@ export default {
|
|||||||
select_a_status: 'Select a status',
|
select_a_status: 'Select a status',
|
||||||
select_a_tax: 'Select a tax',
|
select_a_tax: 'Select a tax',
|
||||||
search: 'Search',
|
search: 'Search',
|
||||||
are_you_sure: '?',
|
are_you_sure: 'Are you sure?',
|
||||||
list_is_empty: 'List is empty.',
|
list_is_empty: 'List is empty.',
|
||||||
no_tax_found: 'No tax found!',
|
no_tax_found: 'No tax found!',
|
||||||
four_zero_four: '404',
|
four_zero_four: '404',
|
||||||
yot_got_lost: 'Whoops! You got Lost!',
|
you_got_lost: 'Whoops! You got Lost!',
|
||||||
go_home: 'Go Home',
|
go_home: 'Go Home',
|
||||||
|
|
||||||
setting_updated: 'Setting updated successfully',
|
setting_updated: 'Setting updated successfully',
|
||||||
@ -117,6 +117,7 @@ export default {
|
|||||||
},
|
},
|
||||||
customers: {
|
customers: {
|
||||||
title: 'Customers',
|
title: 'Customers',
|
||||||
|
add_customer: 'Add Customer',
|
||||||
contacts_list: 'Customer List',
|
contacts_list: 'Customer List',
|
||||||
name: 'Name',
|
name: 'Name',
|
||||||
display_name: 'Display Name',
|
display_name: 'Display Name',
|
||||||
@ -744,7 +745,7 @@ export default {
|
|||||||
qty_must_greater_than_zero: 'Quantity must be greater than zero.',
|
qty_must_greater_than_zero: 'Quantity must be greater than zero.',
|
||||||
price_greater_than_zero: 'Price must be greater than zero.',
|
price_greater_than_zero: 'Price must be greater than zero.',
|
||||||
payment_greater_than_zero: 'Payment must be greater than zero.',
|
payment_greater_than_zero: 'Payment must be greater than zero.',
|
||||||
payment_grater_than_due_amount: 'Entered Payment is more than due amount of this invoice.',
|
payment_greater_than_due_amount: 'Entered Payment is more than due amount of this invoice.',
|
||||||
quantity_maxlength: 'Quantity should not be greater than 10 characters.',
|
quantity_maxlength: 'Quantity should not be greater than 10 characters.',
|
||||||
price_maxlength: 'Price should not be greater than 10 characters.',
|
price_maxlength: 'Price should not be greater than 10 characters.',
|
||||||
amount_maxlength: 'Amount should not be greater than 10 characters.',
|
amount_maxlength: 'Amount should not be greater than 10 characters.',
|
||||||
|
|||||||
@ -56,7 +56,20 @@ export default {
|
|||||||
select_a_status: 'Selecciona un estado',
|
select_a_status: 'Selecciona un estado',
|
||||||
select_a_tax: 'Selecciona un impuesto',
|
select_a_tax: 'Selecciona un impuesto',
|
||||||
search: 'Buscar',
|
search: 'Buscar',
|
||||||
are_you_sure: '¿Estás seguro?'
|
are_you_sure: '¿Estás seguro?',
|
||||||
|
list_is_empty: 'La lista esta vacía.',
|
||||||
|
no_tax_found: '¡No se encontraron impuestos!',
|
||||||
|
four_zero_four: '404',
|
||||||
|
you_got_lost: 'Whoops! ¡Te perdiste!',
|
||||||
|
go_home: 'Vete a casa',
|
||||||
|
|
||||||
|
setting_updated: 'Configuración actualizada con éxito',
|
||||||
|
select_state: 'Seleccione estado',
|
||||||
|
select_country: 'Seleccionar país',
|
||||||
|
select_city: 'Ciudad selecta',
|
||||||
|
street_1: 'Calle 1',
|
||||||
|
street_2: 'Calle # 2',
|
||||||
|
action_failed: 'Accion: Fallida'
|
||||||
},
|
},
|
||||||
dashboard: {
|
dashboard: {
|
||||||
select_year: 'Seleccione año',
|
select_year: 'Seleccione año',
|
||||||
@ -104,6 +117,7 @@ export default {
|
|||||||
},
|
},
|
||||||
customers: {
|
customers: {
|
||||||
title: 'Clientes',
|
title: 'Clientes',
|
||||||
|
add_customer: 'Agregar cliente',
|
||||||
contacts_list: 'Lista de clientes',
|
contacts_list: 'Lista de clientes',
|
||||||
name: 'Nombre',
|
name: 'Nombre',
|
||||||
display_name: 'Nombre para mostrar',
|
display_name: 'Nombre para mostrar',
|
||||||
@ -134,6 +148,7 @@ export default {
|
|||||||
shipping_address: 'Dirección de Envío',
|
shipping_address: 'Dirección de Envío',
|
||||||
copy_billing_address: 'Copia de facturación',
|
copy_billing_address: 'Copia de facturación',
|
||||||
no_customers: '¡Aún no hay clientes!',
|
no_customers: '¡Aún no hay clientes!',
|
||||||
|
no_customers_found: 'No se encontraron clientes!',
|
||||||
list_of_customers: 'Esta sección contendrá la lista de clientes.',
|
list_of_customers: 'Esta sección contendrá la lista de clientes.',
|
||||||
primary_display_name: 'Nombre de visualización principal',
|
primary_display_name: 'Nombre de visualización principal',
|
||||||
select_state: 'Seleccione estado',
|
select_state: 'Seleccione estado',
|
||||||
@ -143,6 +158,7 @@ export default {
|
|||||||
street_1: 'Calle 1',
|
street_1: 'Calle 1',
|
||||||
street_2: 'Calle 2',
|
street_2: 'Calle 2',
|
||||||
select_a_customer: 'Selecciona un cliente',
|
select_a_customer: 'Selecciona un cliente',
|
||||||
|
type_or_click: 'Escriba o haga clic para seleccionar',
|
||||||
|
|
||||||
confirm_delete: 'No podrá recuperar este cliente | No podrá recuperar estos clientes',
|
confirm_delete: 'No podrá recuperar este cliente | No podrá recuperar estos clientes',
|
||||||
created_message: 'Cliente creado con éxito',
|
created_message: 'Cliente creado con éxito',
|
||||||
@ -205,6 +221,7 @@ export default {
|
|||||||
amount: 'Cantidad',
|
amount: 'Cantidad',
|
||||||
action: 'Acción',
|
action: 'Acción',
|
||||||
notes: 'Notas',
|
notes: 'Notas',
|
||||||
|
tax: 'Impuesto',
|
||||||
estimate_template: 'Plantilla de estimación',
|
estimate_template: 'Plantilla de estimación',
|
||||||
convert_to_invoice: 'Convertir a factura',
|
convert_to_invoice: 'Convertir a factura',
|
||||||
mark_as_sent: 'Marcar como enviado',
|
mark_as_sent: 'Marcar como enviado',
|
||||||
@ -578,8 +595,8 @@ export default {
|
|||||||
estimate_viewed_message: 'Estimación vista',
|
estimate_viewed_message: 'Estimación vista',
|
||||||
please_enter_email: 'Por favor, introduzca su correo electrónico'
|
please_enter_email: 'Por favor, introduzca su correo electrónico'
|
||||||
},
|
},
|
||||||
sales_taxes: {
|
tax_types: {
|
||||||
title: 'Impuestos de ventas',
|
title: 'Tipos de impuestos',
|
||||||
description: 'Puede agregar o eliminar impuestos a su gusto. Crater admite impuestos sobre artículos individuales, así como sobre la factura.',
|
description: 'Puede agregar o eliminar impuestos a su gusto. Crater admite impuestos sobre artículos individuales, así como sobre la factura.',
|
||||||
add_new_tax: 'Agregar nuevo impuesto',
|
add_new_tax: 'Agregar nuevo impuesto',
|
||||||
tax_settings: 'Configuraciones de impuestos',
|
tax_settings: 'Configuraciones de impuestos',
|
||||||
@ -659,7 +676,10 @@ export default {
|
|||||||
copyright_crater: 'Copyright @ Crater - 2019',
|
copyright_crater: 'Copyright @ Crater - 2019',
|
||||||
super_simple_invoicing: 'Facturación super simple',
|
super_simple_invoicing: 'Facturación super simple',
|
||||||
for_freelancer: 'para autónomos y',
|
for_freelancer: 'para autónomos y',
|
||||||
small_businesses: 'Pequeñas empresas '
|
small_businesses: 'Pequeñas empresas',
|
||||||
|
crater_help: 'Crater te ayuda a rastrear gastos, registrar pagos y generar hermosos',
|
||||||
|
invoices_and_estimates: 'facturas y presupuestos con capacidad para elegir múltiples plantillas.'
|
||||||
|
|
||||||
},
|
},
|
||||||
validation: {
|
validation: {
|
||||||
invalid_url: 'URL no válida (por ejemplo, http://www.crater.com)',
|
invalid_url: 'URL no válida (por ejemplo, http://www.crater.com)',
|
||||||
@ -678,6 +698,14 @@ export default {
|
|||||||
qty_must_greater_than_zero: 'La cantidad debe ser mayor que cero.',
|
qty_must_greater_than_zero: 'La cantidad debe ser mayor que cero.',
|
||||||
price_greater_than_zero: 'El precio debe ser mayor que cero.',
|
price_greater_than_zero: 'El precio debe ser mayor que cero.',
|
||||||
payment_greater_than_zero: 'El pago debe ser mayor que cero.',
|
payment_greater_than_zero: 'El pago debe ser mayor que cero.',
|
||||||
payment_grater_than_due_amount: 'El pago ingresado es mayor al monto adeudado de esta factura.'
|
payment_greater_than_due_amount: 'El pago ingresado es mayor al monto adeudado de esta factura.',
|
||||||
|
quantity_maxlength: 'La cantidad no debe ser mayor de 10 caracteres.',
|
||||||
|
price_maxlength: 'El precio no debe tener más de 10 caracteres.',
|
||||||
|
amount_maxlength: 'La cantidad no debe ser mayor de 10 caracteres.',
|
||||||
|
description_maxlength: 'La descripción no debe tener más de 255 caracteres.',
|
||||||
|
maximum_options_error: 'Máximo de {max} opciones seleccionadas. Primero elimine una opción seleccionada para seleccionar otra.',
|
||||||
|
notes_maxlength: 'Las notas no deben tener más de 255 caracteres.',
|
||||||
|
address_maxlength: 'La dirección no debe tener más de 255 caracteres.',
|
||||||
|
ref_number_maxlength: 'El número de referencia no debe tener más de 10 caracteres.'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,7 +56,20 @@ export default {
|
|||||||
select_a_status: 'Sélectionnez un statut',
|
select_a_status: 'Sélectionnez un statut',
|
||||||
select_a_tax: 'Sélectionnez une taxe',
|
select_a_tax: 'Sélectionnez une taxe',
|
||||||
search: 'Chercher',
|
search: 'Chercher',
|
||||||
are_you_sure: 'Êtes-vous sûr?'
|
are_you_sure: 'Êtes-vous sûr?',
|
||||||
|
list_is_empty: 'La liste est vide',
|
||||||
|
no_tax_found: 'Aucune taxe trouvée!',
|
||||||
|
four_zero_four: '404',
|
||||||
|
you_got_lost: 'Oups! Vous vous êtes perdus!',
|
||||||
|
go_home: 'Rentrer chez soi',
|
||||||
|
|
||||||
|
setting_updated: 'Réglage mis à jour avec succès',
|
||||||
|
select_state: "Sélectionnez l'état",
|
||||||
|
select_country: 'Choisissez le pays',
|
||||||
|
select_city: 'Sélectionnez une ville',
|
||||||
|
street_1: 'Rue 1',
|
||||||
|
street_2: 'Rue # 2',
|
||||||
|
action_failed: 'Action: échoué'
|
||||||
},
|
},
|
||||||
dashboard: {
|
dashboard: {
|
||||||
select_year: 'Sélectionnez lannée',
|
select_year: 'Sélectionnez lannée',
|
||||||
@ -104,6 +117,7 @@ export default {
|
|||||||
},
|
},
|
||||||
customers: {
|
customers: {
|
||||||
title: 'Les clients',
|
title: 'Les clients',
|
||||||
|
add_customer: 'Ajouter un client',
|
||||||
contacts_list: 'Liste de clients',
|
contacts_list: 'Liste de clients',
|
||||||
name: 'Nom',
|
name: 'Nom',
|
||||||
display_name: 'Afficher un nom',
|
display_name: 'Afficher un nom',
|
||||||
@ -134,6 +148,7 @@ export default {
|
|||||||
shipping_address: 'Adresse de livraison',
|
shipping_address: 'Adresse de livraison',
|
||||||
copy_billing_address: 'Copier de la facturation',
|
copy_billing_address: 'Copier de la facturation',
|
||||||
no_customers: 'Pas encore de clients!',
|
no_customers: 'Pas encore de clients!',
|
||||||
|
no_customers_found: 'Aucun client trouvé!',
|
||||||
list_of_customers: 'Cette section contiendra la liste des clients.',
|
list_of_customers: 'Cette section contiendra la liste des clients.',
|
||||||
primary_display_name: 'Nom daffichage principal',
|
primary_display_name: 'Nom daffichage principal',
|
||||||
select_state: 'Sélectionnez létat',
|
select_state: 'Sélectionnez létat',
|
||||||
@ -143,6 +158,7 @@ export default {
|
|||||||
street_1: 'Rue 1',
|
street_1: 'Rue 1',
|
||||||
street_2: 'Rue 2',
|
street_2: 'Rue 2',
|
||||||
select_a_customer: 'Sélectionnez un client',
|
select_a_customer: 'Sélectionnez un client',
|
||||||
|
type_or_click: 'Tapez ou cliquez pour sélectionner',
|
||||||
|
|
||||||
confirm_delete: 'Vous ne pourrez pas récupérer ce client | Vous ne pourrez pas récupérer ces clients',
|
confirm_delete: 'Vous ne pourrez pas récupérer ce client | Vous ne pourrez pas récupérer ces clients',
|
||||||
created_message: 'Client créé avec succès',
|
created_message: 'Client créé avec succès',
|
||||||
@ -205,6 +221,7 @@ export default {
|
|||||||
amount: 'Montante',
|
amount: 'Montante',
|
||||||
action: 'action',
|
action: 'action',
|
||||||
notes: 'Remarques',
|
notes: 'Remarques',
|
||||||
|
tax: 'Impôt',
|
||||||
estimate_template: 'Modèle destimation',
|
estimate_template: 'Modèle destimation',
|
||||||
convert_to_invoice: 'Convertir en facture',
|
convert_to_invoice: 'Convertir en facture',
|
||||||
mark_as_sent: 'Marquer comme envoyé',
|
mark_as_sent: 'Marquer comme envoyé',
|
||||||
@ -501,7 +518,7 @@ export default {
|
|||||||
company_information: 'Informations sur la société',
|
company_information: 'Informations sur la société',
|
||||||
preferences: 'Préférences',
|
preferences: 'Préférences',
|
||||||
notifications: 'Les notifications',
|
notifications: 'Les notifications',
|
||||||
sales_taxes: 'Taxes de vente',
|
tax_types: 'Types de taxe',
|
||||||
expense_category: 'Catégories de dépenses'
|
expense_category: 'Catégories de dépenses'
|
||||||
},
|
},
|
||||||
title: 'Paramètres',
|
title: 'Paramètres',
|
||||||
@ -578,8 +595,8 @@ export default {
|
|||||||
estimate_viewed_message: 'Estimation vue',
|
estimate_viewed_message: 'Estimation vue',
|
||||||
please_enter_email: 'S il vous plaît entrer email'
|
please_enter_email: 'S il vous plaît entrer email'
|
||||||
},
|
},
|
||||||
sales_taxes: {
|
tax_types: {
|
||||||
title: 'Taxes de vente',
|
title: 'Types de taxe',
|
||||||
description: 'Vous pouvez ajouter ou supprimer des taxes à votre guise. Crater prend en charge les taxes sur les articles individuels ainsi que sur la facture.',
|
description: 'Vous pouvez ajouter ou supprimer des taxes à votre guise. Crater prend en charge les taxes sur les articles individuels ainsi que sur la facture.',
|
||||||
add_new_tax: 'Ajouter une nouvelle taxe',
|
add_new_tax: 'Ajouter une nouvelle taxe',
|
||||||
tax_settings: 'Paramètres de taxe',
|
tax_settings: 'Paramètres de taxe',
|
||||||
@ -659,7 +676,10 @@ export default {
|
|||||||
copyright_crater: 'Copyright @ Crater - 2019',
|
copyright_crater: 'Copyright @ Crater - 2019',
|
||||||
super_simple_invoicing: 'Super Simple Facturation',
|
super_simple_invoicing: 'Super Simple Facturation',
|
||||||
for_freelancer: 'pour les pigistes et',
|
for_freelancer: 'pour les pigistes et',
|
||||||
small_businesses: 'Petites entreprises '
|
small_businesses: 'Petites entreprises ',
|
||||||
|
crater_help: 'Crater vous aide à suivre vos dépenses, à enregistrer vos paiements et à générer de belles',
|
||||||
|
invoices_and_estimates: 'factures et devis avec possibilité de choisir plusieurs modèles.'
|
||||||
|
|
||||||
},
|
},
|
||||||
validation: {
|
validation: {
|
||||||
invalid_url: 'URL invalide (ex: http://www.crater.com)',
|
invalid_url: 'URL invalide (ex: http://www.crater.com)',
|
||||||
@ -678,6 +698,14 @@ export default {
|
|||||||
qty_must_greater_than_zero: 'La quantité doit être supérieure à zéro.',
|
qty_must_greater_than_zero: 'La quantité doit être supérieure à zéro.',
|
||||||
price_greater_than_zero: 'Le prix doit être supérieur à zéro.',
|
price_greater_than_zero: 'Le prix doit être supérieur à zéro.',
|
||||||
payment_greater_than_zero: 'Le paiement doit être supérieur à zéro.',
|
payment_greater_than_zero: 'Le paiement doit être supérieur à zéro.',
|
||||||
payment_grater_than_due_amount: 'Le paiement entré est plus que le montant dû de cette facture.'
|
payment_greater_than_due_amount: 'Le paiement entré est plus que le montant dû de cette facture.',
|
||||||
|
quantity_maxlength: 'La quantité ne doit pas dépasser 10 caractères.',
|
||||||
|
price_maxlength: 'Le prix ne doit pas dépasser 10 caractères.',
|
||||||
|
amount_maxlength: 'Le montant ne doit pas dépasser 10 caractères.',
|
||||||
|
description_maxlength: 'La description ne doit pas dépasser 255 caractères.',
|
||||||
|
maximum_options_error: 'Maximum de {max} options sélectionnées. Commencez par supprimer une option sélectionnée pour en sélectionner une autre.',
|
||||||
|
notes_maxlength: 'Les notes ne doivent pas dépasser 255 caractères.',
|
||||||
|
address_maxlength: "L'adresse ne doit pas dépasser 255 caractères.",
|
||||||
|
ref_number_maxlength: 'Le numéro de référence ne doit pas dépasser 10 caractères'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,8 +78,12 @@ export const addInvoice = ({ commit, dispatch, state }, data) => {
|
|||||||
export const deleteInvoice = ({ commit, dispatch, state }, id) => {
|
export const deleteInvoice = ({ commit, dispatch, state }, id) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
window.axios.delete(`/api/invoices/${id}`).then((response) => {
|
window.axios.delete(`/api/invoices/${id}`).then((response) => {
|
||||||
commit(types.DELETE_INVOICE, id)
|
if (response.data.error) {
|
||||||
resolve(response)
|
resolve(response)
|
||||||
|
} else {
|
||||||
|
commit(types.DELETE_INVOICE, id)
|
||||||
|
resolve(response)
|
||||||
|
}
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
reject(err)
|
reject(err)
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 text-sm-center">
|
<div class="col-sm-12 text-sm-center">
|
||||||
<h1>{{ $t('general.four_zero_four') }}</h1>
|
<h1>{{ $t('general.four_zero_four') }}</h1>
|
||||||
<h5>{{ $t('general.yot_got_lost') }}</h5>
|
<h5>{{ $t('general.you_got_lost') }}</h5>
|
||||||
<router-link
|
<router-link
|
||||||
class="btn btn-lg bg-yellow text-white"
|
class="btn btn-lg bg-yellow text-white"
|
||||||
to="/">
|
to="/">
|
||||||
|
|||||||
@ -103,7 +103,7 @@
|
|||||||
<span v-if="!$v.formData.amount.required" class="text-danger">{{ $t('validation.required') }}</span>
|
<span v-if="!$v.formData.amount.required" class="text-danger">{{ $t('validation.required') }}</span>
|
||||||
<span v-if="!$v.formData.amount.numeric" class="text-danger">{{ $t('validation.numbers_only') }}</span>
|
<span v-if="!$v.formData.amount.numeric" class="text-danger">{{ $t('validation.numbers_only') }}</span>
|
||||||
<span v-if="!$v.formData.amount.between && $v.formData.amount.numeric && amount <= 0" class="text-danger">{{ $t('validation.payment_greater_than_zero') }}</span>
|
<span v-if="!$v.formData.amount.between && $v.formData.amount.numeric && amount <= 0" class="text-danger">{{ $t('validation.payment_greater_than_zero') }}</span>
|
||||||
<span v-if="!$v.formData.amount.between && amount > 0" class="text-danger">{{ $t('validation.payment_grater_than_due_amount') }}</span>
|
<span v-if="!$v.formData.amount.between && amount > 0" class="text-danger">{{ $t('validation.payment_greater_than_due_amount') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -116,13 +116,23 @@
|
|||||||
<base-text-area
|
<base-text-area
|
||||||
v-model="formData.address_street_1"
|
v-model="formData.address_street_1"
|
||||||
:placeholder="$tc('general.street_1')"
|
:placeholder="$tc('general.street_1')"
|
||||||
|
:class="{'invalid': $v.formData.address_street_1.$error }"
|
||||||
rows="2"
|
rows="2"
|
||||||
|
@input="$v.formData.address_street_1.$touch()"
|
||||||
/>
|
/>
|
||||||
|
<div v-if="$v.formData.address_street_1.$error">
|
||||||
|
<span v-if="!$v.formData.address_street_1.maxLength" class="text-danger">{{ $tc('validation.address_maxlength') }}</span>
|
||||||
|
</div>
|
||||||
<base-text-area
|
<base-text-area
|
||||||
v-model="formData.address_street_2"
|
v-model="formData.address_street_2"
|
||||||
:placeholder="$tc('general.street_1')"
|
:placeholder="$tc('general.street_2')"
|
||||||
|
:class="{'invalid': $v.formData.address_street_2.$error }"
|
||||||
rows="2"
|
rows="2"
|
||||||
|
@input="$v.formData.address_street_2.$touch()"
|
||||||
/>
|
/>
|
||||||
|
<div v-if="$v.formData.address_street_2.$error">
|
||||||
|
<span v-if="!$v.formData.address_street_2.maxLength" class="text-danger">{{ $tc('validation.address_maxlength') }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -148,7 +158,7 @@ import ImageBox from '../components/ImageBox.vue'
|
|||||||
import AvatarCropper from 'vue-avatar-cropper'
|
import AvatarCropper from 'vue-avatar-cropper'
|
||||||
import { validationMixin } from 'vuelidate'
|
import { validationMixin } from 'vuelidate'
|
||||||
import { mapActions } from 'vuex'
|
import { mapActions } from 'vuex'
|
||||||
const { required, email, numeric } = require('vuelidate/lib/validators')
|
const { required, email, numeric, maxLength } = require('vuelidate/lib/validators')
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { AvatarCropper, IconUpload, ImageBox },
|
components: { AvatarCropper, IconUpload, ImageBox },
|
||||||
@ -251,6 +261,12 @@ export default {
|
|||||||
},
|
},
|
||||||
phone: {
|
phone: {
|
||||||
numeric
|
numeric
|
||||||
|
},
|
||||||
|
address_street_1: {
|
||||||
|
maxLength: maxLength(255)
|
||||||
|
},
|
||||||
|
address_street_2: {
|
||||||
|
maxLength: maxLength(255)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user