From 865a13aafa6215ed9c97cfefead3c928f2b898ad Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 8 Jan 2024 16:16:42 -0300 Subject: [PATCH] Submodulos de suppliers: Accounts, Contacts y Addresses --- src/components/CreateNewPostcodeForm.vue | 2 +- src/i18n/en/index.js | 4 + src/i18n/es/index.js | 4 + src/pages/Supplier/Card/SupplierAddresses.vue | 12 +- .../Supplier/Card/SupplierAddressesCreate.vue | 182 ++++++++++++++++++ src/pages/Supplier/Card/SupplierContacts.vue | 1 + src/router/modules/Supplier.js | 6 + 7 files changed, 208 insertions(+), 3 deletions(-) create mode 100644 src/pages/Supplier/Card/SupplierAddressesCreate.vue diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 3504445f8..a8e999ae1 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -131,7 +131,7 @@ const onProvinceCreated = async () => { es: New postcode: Nuevo código postal Please, ensure you put the correct data!: ¡Por favor, asegúrese de poner los datos correctos! - City: Ciudad + City: Población Province: Provincia Country: País Postcode: Código postal diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 5682113b2..85a82ebe5 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -921,6 +921,10 @@ export default { street: 'Street', postcode: 'Postcode', phone: 'Phone', + name: 'Name', + city: 'City', + province: 'Province', + mobile: 'Mobile', }, }, travel: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index e3a2ec5db..44ce18cc9 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -920,6 +920,10 @@ export default { street: 'Dirección', postcode: 'Código postal', phone: 'Teléfono', + name: 'Nombre', + city: 'Población', + province: 'Provincia', + mobile: 'Móvil', }, }, travel: { diff --git a/src/pages/Supplier/Card/SupplierAddresses.vue b/src/pages/Supplier/Card/SupplierAddresses.vue index 17c9e7c4c..df7cff932 100644 --- a/src/pages/Supplier/Card/SupplierAddresses.vue +++ b/src/pages/Supplier/Card/SupplierAddresses.vue @@ -33,7 +33,15 @@ const addressesFilter = { }; const redirectToCreateView = () => { - router.push({ name: 'SupplierCreate' }); + router.push({ name: 'SupplierAddressesCreate' }); +}; + +const redirectToUpdateView = (addressData) => { + const stringifiedAddressData = JSON.stringify(addressData); + router.push({ + name: 'SupplierAddressesCreate', + query: { addressData: stringifiedAddressData }, + }); }; @@ -52,7 +60,7 @@ const redirectToCreateView = () => { :key="row.id" :title="row.nickname" :id="row.id" - @click="redirectToCreateView(row.id)" + @click="redirectToUpdateView(row)" >