From 3bfbed9e545c1c1462c59ef2ac2ed7d40a4f2030 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 10 Jun 2024 13:19:09 +0200 Subject: [PATCH 001/400] refs #7529 create WorkerPIT --- src/pages/Worker/Card/WorkerPit.vue | 112 ++++++++++++++++++++++++++++ src/router/modules/worker.js | 9 +++ 2 files changed, 121 insertions(+) create mode 100644 src/pages/Worker/Card/WorkerPit.vue diff --git a/src/pages/Worker/Card/WorkerPit.vue b/src/pages/Worker/Card/WorkerPit.vue new file mode 100644 index 000000000..6e088ba76 --- /dev/null +++ b/src/pages/Worker/Card/WorkerPit.vue @@ -0,0 +1,112 @@ + + + + + +es: + familySituation: Situación familiar + disabilityGrades: Discapacidad + geographicMobilityDate: Movilidad geografica + childPension: Pensión hijos + spousePension: Pensión cónyuge + isDependend: Ayuda / Movilidad reducida + spouseNif: NIF cónyuge + hasHousingPaymentBefore: Pagos vivienda anterior 2011 + hasHousingPaymentAfter: Pagos vivienda posterior 2011 + hasExtendedWorking: Prolongación actividad laboral + diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index 927d11802..14b0708ac 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -176,6 +176,15 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerLocker.vue'), }, + { + name: 'WorkerPit', + path: 'pit', + meta: { + title: 'pit', + icon: 'lock', + }, + component: () => import('src/pages/Worker/Card/WorkerPit.vue'), + }, ], }, ], From 657dbc67615af7372b1dac8d1b93f004933369b9 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 13 Jun 2024 08:24:36 +0200 Subject: [PATCH 002/400] refs #7529 route --- src/router/modules/worker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index 14b0708ac..77b2586fa 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -23,6 +23,7 @@ export default { 'WorkerDms', 'WorkerTimeControl', 'WorkerLocker', + 'WorkerPit', ], }, children: [ From 87bce8fc216a9ed0ff9f0e67e7ca6b0944857b69 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 18 Sep 2024 12:08:38 +0200 Subject: [PATCH 003/400] refs #7529 fix workerPit --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Worker/Card/WorkerPit.vue | 28 +++++++++++++++++++++++----- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index e27dc7bd4..499b40537 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -272,6 +272,7 @@ globals: clientsActionsMonitor: Clients and actions serial: Serial medical: Mutual + pit: IRPF supplier: Supplier created: Created worker: Worker diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index ed34c8761..34f45b3ca 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -275,6 +275,7 @@ globals: clientsActionsMonitor: Clientes y acciones serial: Facturas por serie medical: Mutua + pit: IRPF supplier: Proveedor created: Fecha creación worker: Trabajador diff --git a/src/pages/Worker/Card/WorkerPit.vue b/src/pages/Worker/Card/WorkerPit.vue index 6e088ba76..e01878340 100644 --- a/src/pages/Worker/Card/WorkerPit.vue +++ b/src/pages/Worker/Card/WorkerPit.vue @@ -24,11 +24,7 @@ const toCustomerAddressCreate = () => { @on-fetch="(data) => (disabilityGradesOptions = data)" auto-load /> - + + + + + + + + @@ -109,4 +116,15 @@ es: hasHousingPaymentBefore: Pagos vivienda anterior 2011 hasHousingPaymentAfter: Pagos vivienda posterior 2011 hasExtendedWorking: Prolongación actividad laboral +en: + familySituation: Family Situation + disabilityGrades: Disability Grades + geographicMobilityDate: Geographic Mobility Date + childPension: Child Pension + spousePension: Spouse Pension + isDependend: Dependent Support / Reduced Mobility + spouseNif: Spouse NIF (Tax ID) + hasHousingPaymentBefore: Housing Payments Before 2011 + hasHousingPaymentAfter: Housing Payments After 2011 + hasExtendedWorking: Extended Work Activity From ee2f80e9bba8c9369780d03e21a69161c9f598fd Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 19 Sep 2024 10:25:22 +0200 Subject: [PATCH 004/400] refs #7529 crudModel workerPit --- src/pages/Worker/Card/WorkerPit.vue | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/pages/Worker/Card/WorkerPit.vue b/src/pages/Worker/Card/WorkerPit.vue index e01878340..4a6cd12df 100644 --- a/src/pages/Worker/Card/WorkerPit.vue +++ b/src/pages/Worker/Card/WorkerPit.vue @@ -8,6 +8,7 @@ import FormModel from 'src/components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; +import CrudModel from 'components/CrudModel.vue'; const route = useRoute(); const { t } = useI18n(); @@ -91,17 +92,29 @@ const toCustomerAddressCreate = () => { - - + + + From fc3a025047cd58894c2106541645f077171b146f Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 1 Oct 2024 13:03:55 +0200 Subject: [PATCH 005/400] feat: manualInvoice with address --- src/components/CreateManualInvoiceForm.vue | 155 ------------------ src/components/VnTable/VnTable.vue | 4 +- src/components/common/VnInputDate.vue | 3 +- src/composables/useArrayData.js | 2 +- .../Card/InvoiceOutDescriptorMenu.vue | 3 - src/pages/InvoiceOut/InvoiceOutList.vue | 17 ++ src/pages/InvoiceOut/locale/en.yml | 17 +- src/pages/InvoiceOut/locale/es.yml | 19 ++- src/pages/Order/Card/OrderCreateDialog.vue | 7 +- 9 files changed, 41 insertions(+), 186 deletions(-) delete mode 100644 src/components/CreateManualInvoiceForm.vue diff --git a/src/components/CreateManualInvoiceForm.vue b/src/components/CreateManualInvoiceForm.vue deleted file mode 100644 index da006e024..000000000 --- a/src/components/CreateManualInvoiceForm.vue +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - -es: - Create manual invoice: Crear factura manual - Ticket: Ticket - Client: Cliente - Max date: Fecha límite - Serial: Serie - Area: Area - Reference: Referencia - Or: O - Invoicing in progress...: Facturación en progreso... - diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 572dbf144..c9867dd07 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -162,9 +162,7 @@ onMounted(() => { : $props.defaultMode; stateStore.rightDrawer = quasar.screen.gt.xs; columnsVisibilitySkipped.value = [ - ...splittedColumns.value.columns - .filter((c) => c.visible == false) - .map((c) => c.name), + ...splittedColumns.value.columns.filter((c) => !c.visible).map((c) => c.name), ...['tableActions'], ]; createForm.value = $props.create; diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index 3d5afaf80..57335d293 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -1,8 +1,7 @@ @@ -133,6 +230,12 @@ es: hasHousingPaymentBefore: Pagos vivienda anterior 2011 hasHousingPaymentAfter: Pagos vivienda posterior 2011 hasExtendedWorking: Prolongación actividad laboral + isDescendant: Descen/Ascen + disabilityGradeFk: Discapacidad + birthed: Año nacimiento + adoptionYear: Año adopción + isJointCustody: Computo por entero + Relatives: Relacionados en: familySituation: Family Situation disabilityGrades: Disability Grades @@ -144,4 +247,10 @@ en: hasHousingPaymentBefore: Housing Payments Before 2011 hasHousingPaymentAfter: Housing Payments After 2011 hasExtendedWorking: Extended Work Activity + isDescendant: Descendant/Ascendant + disabilityGradeFk: Disability Grade + birthed: Birth Year + adoptionYear: Adoption Year + isJointCustody: Joint custody + Relatives: Relatives From 4e957ed8a7ef2c09d4e3af99922c510088055f63 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 29 Oct 2024 17:23:45 +0100 Subject: [PATCH 030/400] feat: refs #7346 style radioButton --- src/components/common/VnRadio.vue | 9 +- src/components/ui/VnRow.vue | 8 +- src/pages/InvoiceOut/InvoiceOutList.vue | 248 ++++++++++-------------- 3 files changed, 117 insertions(+), 148 deletions(-) diff --git a/src/components/common/VnRadio.vue b/src/components/common/VnRadio.vue index 4eeb9dbe9..69b1501a2 100644 --- a/src/components/common/VnRadio.vue +++ b/src/components/common/VnRadio.vue @@ -2,5 +2,12 @@ const model = defineModel({ type: Boolean, required: true }); diff --git a/src/components/ui/VnRow.vue b/src/components/ui/VnRow.vue index 16bcfab7d..b57489a98 100644 --- a/src/components/ui/VnRow.vue +++ b/src/components/ui/VnRow.vue @@ -1,8 +1,5 @@ - @@ -21,6 +18,9 @@ defineProps({ wrap: { type: Boolean, default: false } }); &:not(.wrap) { flex-direction: column; } + &[fixed] { + flex-direction: row; + } } } diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index 9fb2fc5f5..205f67cd4 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -15,6 +15,9 @@ import { QBtn } from 'quasar'; import axios from 'axios'; import RightMenu from 'src/components/common/RightMenu.vue'; import InvoiceOutFilter from './InvoiceOutFilter.vue'; +import VnRow from 'src/components/ui/VnRow.vue'; +import VnRadio from 'src/components/common/VnRadio.vue'; +import VnInput from 'src/components/common/VnInput.vue'; const { t } = useI18n(); const stateStore = useStateStore(); @@ -39,13 +42,9 @@ const columns = computed(() => [ align: 'center', name: 'id', label: t('invoiceOutList.tableVisibleColumns.id'), - chip: { - condition: () => true, - }, + chip: { condition: () => true }, isId: true, - columnFilter: { - name: 'search', - }, + columnFilter: { name: 'search' }, }, { align: 'left', @@ -53,14 +52,8 @@ const columns = computed(() => [ label: t('invoiceOutList.tableVisibleColumns.ref'), isTitle: true, component: 'select', - attrs: { - url: MODEL, - optionLabel: 'ref', - optionValue: 'id', - }, - columnField: { - component: null, - }, + attrs: { url: MODEL, optionLabel: 'ref', optionValue: 'id' }, + columnField: { component: null }, }, { align: 'left', @@ -68,9 +61,7 @@ const columns = computed(() => [ label: t('invoiceOutList.tableVisibleColumns.issued'), component: 'date', format: (row) => toDate(row.issued), - columnField: { - component: null, - }, + columnField: { component: null }, }, { align: 'left', @@ -78,13 +69,8 @@ const columns = computed(() => [ label: t('invoiceOutModule.customer'), cardVisible: true, component: 'select', - attrs: { - url: 'Clients', - fields: ['id', 'name'], - }, - columnField: { - component: null, - }, + attrs: { url: 'Clients', fields: ['id', 'name'] }, + columnField: { component: null }, }, { align: 'left', @@ -92,14 +78,8 @@ const columns = computed(() => [ label: t('invoiceOutModule.company'), cardVisible: true, component: 'select', - attrs: { - url: 'Companies', - optionLabel: 'code', - optionValue: 'id', - }, - columnField: { - component: null, - }, + attrs: { url: 'Companies', optionLabel: 'code', optionValue: 'id' }, + columnField: { component: null }, }, { align: 'left', @@ -113,9 +93,7 @@ const columns = computed(() => [ name: 'created', label: t('invoiceOutList.tableVisibleColumns.created'), component: 'date', - columnField: { - component: null, - }, + columnField: { component: null }, format: (row) => toDate(row.created), }, { @@ -123,9 +101,7 @@ const columns = computed(() => [ name: 'dued', label: t('invoiceOutList.tableVisibleColumns.dueDate'), component: 'date', - columnField: { - component: null, - }, + columnField: { component: null }, format: (row) => toDate(row.dued), }, { @@ -216,9 +192,7 @@ watchEffect(selectedRows); urlCreate: 'InvoiceOuts/createManualInvoice', title: t('createManualInvoice'), onDataSaved: ({ id }) => tableRef.redirect(id), - formInitialData: { - active: true, - }, + formInitialData: { active: true }, }" :right-search="false" v-model:selected="selectedRows" @@ -232,92 +206,84 @@ watchEffect(selectedRows); }" > - - en: - searchInvoice: Search issued invoice - fileDenied: Browser denied file download... - fileAllowed: Successful download of CSV file - youCanSearchByInvoiceReference: You can search by invoice reference - createInvoice: Make invoice - createManualInvoice: Create manual invoice - - es: - searchInvoice: Buscar factura emitida - fileDenied: El navegador denegó la descarga de archivos... - fileAllowed: Descarga exitosa de archivo CSV - youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura - createInvoice: Crear factura - createManualInvoice: Crear factura manual - + From 8817fd7c5582934a91b2ec9d852c46e0517122a5 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 30 Oct 2024 13:55:51 +0100 Subject: [PATCH 031/400] feat: add support service wip --- src/boot/quasar.js | 58 ++++++++++++++++++++++++++++++-- src/components/NavBar.vue | 7 ++-- src/composables/useNotify.js | 3 +- src/composables/useVnConfirm.js | 31 ++++++++++------- src/i18n/locale/en.yml | 2 ++ src/i18n/locale/es.yml | 3 ++ src/stores/useStateQueryStore.js | 5 ++- 7 files changed, 90 insertions(+), 19 deletions(-) diff --git a/src/boot/quasar.js b/src/boot/quasar.js index 01fe68d8b..a1991d9a4 100644 --- a/src/boot/quasar.js +++ b/src/boot/quasar.js @@ -1,10 +1,17 @@ +import { ref } from 'vue'; +import axios from 'axios'; import { boot } from 'quasar/wrappers'; import qFormMixin from './qformMixin'; import keyShortcut from './keyShortcut'; +import { i18n } from './i18n'; import useNotify from 'src/composables/useNotify.js'; -import { CanceledError } from 'axios'; +import { useStateQueryStore } from 'src/stores/useStateQueryStore'; +import VnInput from 'src/components/common/VnInput.vue'; +import { useVnConfirm } from 'src/composables/useVnConfirm'; const { notify } = useNotify(); +const stateQuery = useStateQueryStore(); +const { openConfirmationModal } = useVnConfirm(); export default boot(({ app }) => { app.mixin(qFormMixin); @@ -40,12 +47,57 @@ export default boot(({ app }) => { } console.error(error); - if (error instanceof CanceledError) { + if (error instanceof axios.CanceledError) { const env = process.env.NODE_ENV; if (env && env !== 'development') return; message = 'Duplicate request'; } + // Convey to Alex or Juan... + const additionalData = { + frontPath: stateQuery.route.name, + backError: { + config: error.config, + data: error, + }, + httpRequest: error.request.response, + }; - notify(message ?? 'globals.error', 'negative', 'error'); + const opts = { + actions: [ + { + icon: 'support_agent', + color: 'primary', + dense: true, + flat: false, + round: true, + noDismiss: true, + handler: async () => { + const reason = ref(); + openConfirmationModal( + i18n.global.t('globals.sendCau'), + false, + async () => { + await axios.post('OsTickets/send-to-support', { + reason: reason.value, + additionalData, + }); + }, + null, + { + component: VnInput, + props: { + modelValue: reason, + 'onUpdate:modelValue': (val) => (reason.value = val), + label: i18n.global.t('globals.ExplainReason'), + class: 'full-width', + required: true, + }, + } + ); + }, + }, + ], + }; + notify(message ?? 'globals.error', 'negative', 'error', opts); }; }); diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 9b0393489..6f8377d96 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -1,6 +1,7 @@ diff --git a/src/composables/useNotify.js b/src/composables/useNotify.js index 2f0e1c257..309156d2a 100644 --- a/src/composables/useNotify.js +++ b/src/composables/useNotify.js @@ -2,7 +2,7 @@ import { Notify } from 'quasar'; import { i18n } from 'src/boot/i18n'; export default function useNotify() { - const notify = (message, type, icon) => { + const notify = (message, type, icon, opts = {}) => { const defaultIcons = { warning: 'warning', negative: 'error', @@ -13,6 +13,7 @@ export default function useNotify() { message: i18n.global.t(message), type: type, icon: icon ? icon : defaultIcons[type], + ...opts, }); }; diff --git a/src/composables/useVnConfirm.js b/src/composables/useVnConfirm.js index 76c3f4f28..4438ad11d 100644 --- a/src/composables/useVnConfirm.js +++ b/src/composables/useVnConfirm.js @@ -1,22 +1,29 @@ +import { h } from 'vue'; +import { Dialog } from 'quasar'; import VnConfirm from 'components/ui/VnConfirm.vue'; -import { useQuasar } from 'quasar'; export function useVnConfirm() { - const quasar = useQuasar(); - - const openConfirmationModal = (title, message, promise, successFn) => { - quasar - .dialog({ - component: VnConfirm, - componentProps: { + const openConfirmationModal = ( + title, + message, + promise, + successFn, + customHTML = {} + ) => { + const { component, props } = customHTML; + Dialog.create({ + component: h( + VnConfirm, + { title: title, message: message, promise: promise, }, - }) - .onOk(async () => { - if (successFn) successFn(); - }); + { customHTML: () => h(component, props) } + ), + }).onOk(async () => { + if (successFn) successFn(); + }); }; return { openConfirmationModal }; diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 10186d92a..7feaa990a 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -314,6 +314,8 @@ globals: deleteConfirmTitle: Delete selected elements changeState: Change state raid: 'Raid {daysInForward} days' + sendCau: Send cau + ExplainReason: Explain why this error should not appear errors: statusUnauthorized: Access denied statusInternalServerError: An internal server error has ocurred diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 66b5efd52..be1e25ca8 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -318,6 +318,9 @@ globals: deleteConfirmTitle: Eliminar los elementos seleccionados changeState: Cambiar estado raid: 'Redada {daysInForward} días' + sendCau: Enviar cau + ExplainReason: Explique el motivo por el que no deberia aparecer este fallo + By sending this ticket, all the data related to the error, the section, the user, etc., are already sent.: Al enviar este cau ya se envían todos los datos relacionados con el error, la sección, el usuario, etc errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor diff --git a/src/stores/useStateQueryStore.js b/src/stores/useStateQueryStore.js index d25dbb921..9893d3264 100644 --- a/src/stores/useStateQueryStore.js +++ b/src/stores/useStateQueryStore.js @@ -3,7 +3,9 @@ import { defineStore } from 'pinia'; export const useStateQueryStore = defineStore('stateQueryStore', () => { const queries = ref(new Set()); - + const route = computed(() => + Array.from(queries.value).find((query) => query?.fullPath) + ); function add(query) { queries.value.add(query); return query; @@ -27,5 +29,6 @@ export const useStateQueryStore = defineStore('stateQueryStore', () => { remove, queries, reset, + route, }; }); From f6d200405ce236e88dcbc63152247b3d3a0766a2 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 5 Nov 2024 09:33:16 +0100 Subject: [PATCH 032/400] feat: message to grant access --- src/boot/quasar.js | 52 ++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/src/boot/quasar.js b/src/boot/quasar.js index a1991d9a4..b3fb62ee7 100644 --- a/src/boot/quasar.js +++ b/src/boot/quasar.js @@ -62,6 +62,8 @@ export default boot(({ app }) => { httpRequest: error.request.response, }; + const isErrorPrivaleges = response?.code == 'ACCESS_DENIED'; + const opts = { actions: [ { @@ -70,30 +72,36 @@ export default boot(({ app }) => { dense: true, flat: false, round: true, - noDismiss: true, + noDismiss: isErrorPrivaleges, handler: async () => { - const reason = ref(); - openConfirmationModal( - i18n.global.t('globals.sendCau'), - false, - async () => { - await axios.post('OsTickets/send-to-support', { - reason: reason.value, - additionalData, - }); - }, - null, - { - component: VnInput, - props: { - modelValue: reason, - 'onUpdate:modelValue': (val) => (reason.value = val), - label: i18n.global.t('globals.ExplainReason'), - class: 'full-width', - required: true, + if (isErrorPrivaleges) { + // Create message and send to support + console.log('QUIERO ACCEDER!!!'); + } else { + const reason = ref(); + openConfirmationModal( + i18n.global.t('globals.sendCau'), + false, + async () => { + await axios.post('OsTickets/send-to-support', { + reason: reason.value, + additionalData, + }); }, - } - ); + null, + { + component: VnInput, + props: { + modelValue: reason, + 'onUpdate:modelValue': (val) => + (reason.value = val), + label: i18n.global.t('globals.ExplainReason'), + class: 'full-width', + required: true, + }, + } + ); + } }, }, ], From 1dcdc54ab88b771ab6bd60a62ac88943a98b4843 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 6 Nov 2024 13:45:02 +0100 Subject: [PATCH 033/400] feat: refs #6583 add destination opt filter --- src/pages/Ticket/TicketAdvanceFilter.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/Ticket/TicketAdvanceFilter.vue b/src/pages/Ticket/TicketAdvanceFilter.vue index a1d301f35..b7ae2e654 100644 --- a/src/pages/Ticket/TicketAdvanceFilter.vue +++ b/src/pages/Ticket/TicketAdvanceFilter.vue @@ -169,6 +169,16 @@ onMounted(async () => await getItemPackingTypes()); + + + + + From 04f610790930853fcb9e8690ffb4da83a71fdf0b Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 7 Nov 2024 14:38:54 +0100 Subject: [PATCH 034/400] fix: refs #7529 fix scss --- src/components/FormModel.vue | 6 +++++- src/pages/Worker/Card/WorkerPit.vue | 11 +++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index c668769e5..bfb470c48 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -91,6 +91,10 @@ const $props = defineProps({ type: Boolean, default: true, }, + maxWidth: { + type: [String, Boolean], + default: '800px', + }, }); const emit = defineEmits(['onFetch', 'onDataSaved']); const modelValue = computed( @@ -283,6 +287,7 @@ defineExpose({ @submit="save" @reset="reset" class="q-pa-md" + :style="maxWidth ? 'max-width: ' + maxWidth : ''" id="formModel" > @@ -371,7 +376,6 @@ defineExpose({ color: black; } #formModel { - max-width: 800px; width: 100%; } diff --git a/src/pages/Worker/Card/WorkerPit.vue b/src/pages/Worker/Card/WorkerPit.vue index 97f8289a5..4ad7f2b9e 100644 --- a/src/pages/Worker/Card/WorkerPit.vue +++ b/src/pages/Worker/Card/WorkerPit.vue @@ -58,6 +58,8 @@ const deleteRelative = async (id) => { :filter="{ where: { workerFk: route.params.id } }" auto-load data-key="workerIrpfs" + :max-width="false" + :data-required="{ workerFk: route.params.id }" > - Date: Mon, 11 Nov 2024 09:56:03 +0100 Subject: [PATCH 037/400] revert: #7679 improve changes --- src/pages/Item/ItemFixedPrice.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue index d46bd5c3e..3e4b1513f 100644 --- a/src/pages/Item/ItemFixedPrice.vue +++ b/src/pages/Item/ItemFixedPrice.vue @@ -220,9 +220,6 @@ const updateMinPrice = async (value, props) => { }; const validations = ({ row }) => { - const isNew = !row.id; - if (!isNew) return false; - const requiredFields = [ 'itemFk', 'started', @@ -247,6 +244,7 @@ const upsertPrice = async (props, resetMinPrice = false) => { if (changes?.updates?.length > 0) { if (resetMinPrice) row.hasMinPrice = 0; } + if (!changes.updates && !changes.creates) return; const data = await upsertFixedPrice(row); tableRef.value.CrudModelRef.formData[props.rowIndex] = data; } catch (err) { @@ -429,6 +427,10 @@ function handleOnDataSave({ CrudModelRef }) { auto-load :is-editable="true" :right-search="false" + :table="{ + 'row-key': 'id', + selection: 'multiple', + }" :crud-model="{ paginate: false, }" From fc73149dcfe1b2f83d06d3dd5cbaa6c6dc14008e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Mon, 11 Nov 2024 14:20:39 +0100 Subject: [PATCH 038/400] feat: refs #8087 refs#8087 Redadas en travel --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + .../Card/BasicData/TicketBasicDataForm.vue | 45 ++++++++++++++----- src/pages/Ticket/locale/en.yml | 1 + src/pages/Ticket/locale/es.yml | 1 + src/pages/Travel/Card/TravelBasicData.vue | 5 ++- src/pages/Travel/Card/TravelDescriptor.vue | 8 +--- src/pages/Travel/Card/TravelSummary.vue | 13 ++++-- src/pages/Travel/TravelList.vue | 8 ++-- 9 files changed, 57 insertions(+), 26 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index a6065e451..53d6e2e9e 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -1041,6 +1041,7 @@ travel: delivered: Delivered received: Received daysInForward: Days in forward + isRaid: Raid thermographs: code: Code temperature: Temperature diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 6f01f7dd1..0e6ee61c8 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -1039,6 +1039,7 @@ travel: delivered: Enviada received: Recibida daysInForward: Días redada + isRaid: Redada thermographs: code: Código temperature: Temperatura diff --git a/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue b/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue index f6c20c514..3ac385fbd 100644 --- a/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue +++ b/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue @@ -36,6 +36,7 @@ const canEditZone = useAcl().hasAny([ const agencyFetchRef = ref(); const warehousesOptions = ref([]); const companiesOptions = ref([]); +const currenciesOptions = ref([]); const agenciesOptions = ref([]); const zonesOptions = ref([]); const addresses = ref([]); @@ -289,6 +290,15 @@ async function getZone(options) { @on-fetch="(data) => (companiesOptions = data)" auto-load /> + - + + + + + es: - raidDays: Al rellenarlo, generamos una redada. Indica los días que un travel se moverá automáticamente en el tiempo + raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados (incluido 0). Si no se especifican días, la fecha no cambiará en: - raidDays: When filling, a raid is generated. Enter the number of days the travel will automatically forward in time + raidDays: If "Raid" is checked, the landing date will automatically shift by the specified number of days (including 0). If no days are specified, the date will stay the same. diff --git a/src/pages/Travel/Card/TravelDescriptor.vue b/src/pages/Travel/Card/TravelDescriptor.vue index 6025ad045..a77d7460e 100644 --- a/src/pages/Travel/Card/TravelDescriptor.vue +++ b/src/pages/Travel/Card/TravelDescriptor.vue @@ -32,6 +32,7 @@ const filter = { 'warehouseOutFk', 'cargoSupplierFk', 'agencyModeFk', + 'isRaid', 'daysInForward', ], include: [ @@ -80,12 +81,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity. From 4bfbd1925e01d8945e8a29cbcfa37308da9dd3c8 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 11 Nov 2024 15:18:29 -0300 Subject: [PATCH 040/400] test: refs #8162 ticket list e2e tests --- src/components/VnTable/VnTable.vue | 1 + src/components/ui/VnSearchbar.vue | 1 + src/pages/Ticket/Card/TicketDescriptor.vue | 2 +- src/pages/Ticket/Card/TicketSummary.vue | 1 + src/pages/Ticket/TicketList.vue | 2 + .../integration/ticket/ticketList.spec.js | 54 +++++++++++++++++++ test/cypress/support/commands.js | 4 ++ 7 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 test/cypress/integration/ticket/ticketList.spec.js diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index fd7b0c51a..99a9a6801 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -737,6 +737,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) { fab icon="add" shortcut="+" + data-testid="vnTableCreateBtn" /> {{ createForm?.title }} diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index dc6d4751c..7a72a09ea 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -130,6 +130,7 @@ async function search() { dense standout autofocus + data-testid="vnSearchBar" >