diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 75353a35a..0ea55bc7d 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -76,8 +76,13 @@ defineExpose({ reset, hasChanges, saveChanges, + getFormData, }); +function getFormData() { + return formData.value; +} + async function fetch(data) { if (data && Array.isArray(data)) { let $index = 0; @@ -196,7 +201,6 @@ function getChanges() { const creates = []; const pk = $props.primaryKey; - for (const [i, row] of formData.value.entries()) { if (!row[pk]) { creates.push(row); @@ -211,7 +215,6 @@ function getChanges() { } } const changes = { updates, creates }; - for (let prop in changes) { if (changes[prop].length === 0) changes[prop] = undefined; } diff --git a/src/components/LeftMenu.vue b/src/components/LeftMenu.vue index 2eac97c65..253f3c161 100644 --- a/src/components/LeftMenu.vue +++ b/src/components/LeftMenu.vue @@ -50,7 +50,7 @@ function addChildren(module, route, parent) { const matches = findMatches(mainMenus, route); for (const child of matches) { - navigation.addMenuItem(module, child, parent); + if (!child.meta.hidden) navigation.addMenuItem(module, child, parent); } } } diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 139977e32..8459d4468 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -62,6 +62,10 @@ export default { selectRows: 'Select all { numberRows } row(s)', allRows: 'All { numberRows } row(s)', markAll: 'Mark all', + requiredField: 'Required field', + class: 'clase', + type: 'type', + reason: 'reason', noResults: 'No results', system: 'System', }, @@ -557,6 +561,7 @@ export default { vat: 'VAT', dueDay: 'Due day', intrastat: 'Intrastat', + corrective: 'Corrective', log: 'Logs', }, list: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 43f624cb3..94e96b787 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -62,6 +62,10 @@ export default { selectRows: 'Seleccionar las { numberRows } filas(s)', allRows: 'Todo { numberRows } filas(s)', markAll: 'Marcar todo', + requiredField: 'Campo obligatorio', + class: 'clase', + type: 'tipo', + reason: 'motivo', noResults: 'Sin resultados', system: 'Sistema', }, @@ -615,6 +619,7 @@ export default { vat: 'IVA', dueDay: 'Vencimiento', intrastat: 'Intrastat', + corrective: 'Rectificativa', log: 'Registros de auditoría', }, list: { diff --git a/src/pages/Customer/Defaulter/CustomerDefaulter.vue b/src/pages/Customer/Defaulter/CustomerDefaulter.vue index d54d5df35..b9b5d5dda 100644 --- a/src/pages/Customer/Defaulter/CustomerDefaulter.vue +++ b/src/pages/Customer/Defaulter/CustomerDefaulter.vue @@ -31,7 +31,6 @@ onBeforeMount(async () => { }, 0 ); - console.log(balanceDueTotal.value); stateStore.rightDrawer = true; }); diff --git a/src/pages/Customer/ExtendedList/CustomerExtendedList.vue b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue index caee06d60..65acf78a2 100644 --- a/src/pages/Customer/ExtendedList/CustomerExtendedList.vue +++ b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue @@ -485,7 +485,6 @@ const selectCustomerId = (id) => { }; const selectSalesPersonId = (id) => { - console.log('selectedSalesPersonId:: ', selectedSalesPersonId.value); selectedSalesPersonId.value = id; }; diff --git a/src/pages/Department/Card/DepartmentDescriptor.vue b/src/pages/Department/Card/DepartmentDescriptor.vue index 1f7e6dcbb..00938a8dd 100644 --- a/src/pages/Department/Card/DepartmentDescriptor.vue +++ b/src/pages/Department/Card/DepartmentDescriptor.vue @@ -44,7 +44,6 @@ const setData = (entity) => { }; const removeDepartment = () => { - console.log('entityId: ', entityId.value); quasar .dialog({ title: 'Are you sure you want to delete it?', diff --git a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue index a46978458..745754b46 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue @@ -38,7 +38,7 @@ const inputFileRef = ref(); const editDmsRef = ref(); const createDmsRef = ref(); -const requiredFieldRule = (val) => val || t('Required field'); +const requiredFieldRule = (val) => val || t('globals.requiredField'); const dateMask = '####-##-##'; const fillMask = '_'; @@ -707,7 +707,6 @@ function supplierRefFilter(val) { Type: Tipo Description: Descripción Generate identifier for original file: Generar identificador para archivo original - Required field: Campo obligatorio File: Fichero Create document: Crear documento Select a file: Seleccione un fichero diff --git a/src/pages/InvoiceIn/Card/InvoiceInCard.vue b/src/pages/InvoiceIn/Card/InvoiceInCard.vue index e22da75bf..f11a39110 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInCard.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInCard.vue @@ -44,18 +44,16 @@ const arrayData = useArrayData('InvoiceIn', { filter, }); -onMounted(async () => { - await arrayData.fetch({ append: false }); - watch( - () => route.params.id, - async (newId, oldId) => { - if (newId) { - arrayData.store.url = `InvoiceIns/${newId}`; - await arrayData.fetch({ append: false }); - } +onMounted(async () => await arrayData.fetch({ append: false })); +watch( + () => route.params.id, + async (newId, oldId) => { + if (newId) { + arrayData.store.url = `InvoiceIns/${newId}`; + await arrayData.fetch({ append: false }); } - ); -}); + } +);