From 473e96ffb41525a16d7f6d92c66c5bc75b71463c Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 8 Jan 2024 11:32:42 -0300 Subject: [PATCH 1/4] wip --- src/components/CreateBankEntityForm.vue | 9 +- src/i18n/en/index.js | 19 +- src/i18n/es/index.js | 19 +- src/pages/Supplier/Card/SupplierAccounts.vue | 178 +++++++++++++++++- src/pages/Supplier/Card/SupplierAddresses.vue | 90 ++++++++- src/pages/Supplier/Card/SupplierCard.vue | 4 +- src/pages/Supplier/Card/SupplierContacts.vue | 118 +++++++++++- 7 files changed, 430 insertions(+), 7 deletions(-) diff --git a/src/components/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index f4f5fef7d..2a1385945 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -7,6 +7,13 @@ import FetchData from 'components/FetchData.vue'; import VnRow from 'components/ui/VnRow.vue'; import FormModelPopup from './FormModelPopup.vue'; +const props = defineProps({ + showEntityField: { + type: Boolean, + default: true, + }, +}); + const emit = defineEmits(['onDataSaved']); const { t } = useI18n(); @@ -73,7 +80,7 @@ const onDataSaved = (data) => { :rules="validate('bankEntity.countryFk')" /> -
+
diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index d6c569618..5682113b2 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -62,7 +62,7 @@ export default { selectRows: 'Select all { numberRows } row(s)', allRows: 'All { numberRows } row(s)', markAll: 'Mark all', - noResults: 'No results' + noResults: 'No results', }, errors: { statusUnauthorized: 'Access denied', @@ -905,6 +905,23 @@ export default { payDemFk: 'Payment deadline', payDay: 'Pay day', }, + accounts: { + iban: 'Iban', + bankEntity: 'Bank entity', + beneficiary: 'Beneficiary', + }, + contacts: { + name: 'Name', + phone: 'Phone', + mobile: 'Mobile', + email: 'Email', + observation: 'Notes', + }, + addresses: { + street: 'Street', + postcode: 'Postcode', + phone: 'Phone', + }, }, travel: { pageTitles: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 6fd60bfd9..e3a2ec5db 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -62,7 +62,7 @@ export default { selectRows: 'Seleccionar las { numberRows } filas(s)', allRows: 'Todo { numberRows } filas(s)', markAll: 'Marcar todo', - noResults: 'Sin resultados' + noResults: 'Sin resultados', }, errors: { statusUnauthorized: 'Acceso denegado', @@ -904,6 +904,23 @@ export default { payDemFk: 'Plazo de pago', payDay: 'Día de pago', }, + accounts: { + iban: 'Iban', + bankEntity: 'Entidad bancaria', + beneficiary: 'Beneficiario', + }, + contacts: { + name: 'Nombre', + phone: 'Teléfono', + mobile: 'Móvil', + email: 'Email', + observation: 'Notas', + }, + addresses: { + street: 'Dirección', + postcode: 'Código postal', + phone: 'Teléfono', + }, }, travel: { pageTitles: { diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue index 2b7059ea3..30edfb2fd 100644 --- a/src/pages/Supplier/Card/SupplierAccounts.vue +++ b/src/pages/Supplier/Card/SupplierAccounts.vue @@ -1 +1,177 @@ - + + + + + es: + Do you want to change the pay method to wire transfer?: ¿Quieres modificar la forma de pago a transferencia? + Add account: Añadir cuenta + Remove account: Remover cuenta + diff --git a/src/pages/Supplier/Card/SupplierAddresses.vue b/src/pages/Supplier/Card/SupplierAddresses.vue index dd82abe78..17c9e7c4c 100644 --- a/src/pages/Supplier/Card/SupplierAddresses.vue +++ b/src/pages/Supplier/Card/SupplierAddresses.vue @@ -1 +1,89 @@ - + + + + + diff --git a/src/pages/Supplier/Card/SupplierCard.vue b/src/pages/Supplier/Card/SupplierCard.vue index 04115cc3d..8eeb79e6c 100644 --- a/src/pages/Supplier/Card/SupplierCard.vue +++ b/src/pages/Supplier/Card/SupplierCard.vue @@ -32,7 +32,9 @@ const { t } = useI18n();
-
+
+ +
diff --git a/src/pages/Supplier/Card/SupplierContacts.vue b/src/pages/Supplier/Card/SupplierContacts.vue index ca58d4ab7..2331bd7e9 100644 --- a/src/pages/Supplier/Card/SupplierContacts.vue +++ b/src/pages/Supplier/Card/SupplierContacts.vue @@ -1 +1,117 @@ - + + + + + + + es: + Add contact: Añadir contacto + Remove contact: Remover contacto + From 865a13aafa6215ed9c97cfefead3c928f2b898ad Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 8 Jan 2024 16:16:42 -0300 Subject: [PATCH 2/4] 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)" >