From 3f1c0b95faf7d8ff00b10fa93acdbed4047d6b9a Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 10 Jul 2024 15:03:25 +0200 Subject: [PATCH 001/102] fix: proposal to avoid notify error --- src/pages/Customer/Card/CustomerUnpaid.vue | 2 +- src/pages/Customer/Card/CustomerWebAccess.vue | 2 +- src/pages/Customer/components/CustomerChangePassword.vue | 2 +- src/pages/Customer/components/CustomerSamplesCreate.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Customer/Card/CustomerUnpaid.vue b/src/pages/Customer/Card/CustomerUnpaid.vue index a9d4a3d66..6c61b92a1 100644 --- a/src/pages/Customer/Card/CustomerUnpaid.vue +++ b/src/pages/Customer/Card/CustomerUnpaid.vue @@ -92,7 +92,7 @@ const onSubmit = async () => { notify('globals.dataSaved', 'positive'); unpaidClient.value = true; } catch (error) { - notify('errors.create', 'negative'); + notify('errors.writeRequest', 'negative'); } finally { isLoading.value = false; } diff --git a/src/pages/Customer/Card/CustomerWebAccess.vue b/src/pages/Customer/Card/CustomerWebAccess.vue index 33659dd77..4468c52f0 100644 --- a/src/pages/Customer/Card/CustomerWebAccess.vue +++ b/src/pages/Customer/Card/CustomerWebAccess.vue @@ -70,7 +70,7 @@ const onSubmit = async () => { notify('globals.dataSaved', 'positive'); if (usersPreviewRef.value) usersPreviewRef.value.fetch(); } catch (error) { - notify('errors.create', 'negative'); + notify('errors.writeRequest', 'negative'); } finally { isLoading.value = false; } diff --git a/src/pages/Customer/components/CustomerChangePassword.vue b/src/pages/Customer/components/CustomerChangePassword.vue index 1bfc5e103..632b11dc9 100644 --- a/src/pages/Customer/components/CustomerChangePassword.vue +++ b/src/pages/Customer/components/CustomerChangePassword.vue @@ -48,7 +48,7 @@ const onSubmit = async () => { await axios.patch(`Clients/${$props.id}/setPassword`, payload); await $props.promise(); } catch (error) { - notify('errors.create', 'negative'); + notify('errors.writeRequest', 'negative'); } finally { isLoading.value = false; if (closeButton.value) closeButton.value.click(); diff --git a/src/pages/Customer/components/CustomerSamplesCreate.vue b/src/pages/Customer/components/CustomerSamplesCreate.vue index be614aa0b..283b8fa97 100644 --- a/src/pages/Customer/components/CustomerSamplesCreate.vue +++ b/src/pages/Customer/components/CustomerSamplesCreate.vue @@ -150,7 +150,7 @@ const onSubmit = async () => { notify('globals.dataSaved', 'positive'); onDataSaved(data); } catch (error) { - notify('errors.create', 'negative'); + notify('errors.writeRequest', 'negative'); } finally { isLoading.value = false; } From e90b78c4c5867f2afd48b9029c9b443d5291c385 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 13 Sep 2024 12:27:37 +0200 Subject: [PATCH 002/102] fix: refs #7702 rollback --- src/pages/Customer/Card/CustomerWebAccess.vue | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/pages/Customer/Card/CustomerWebAccess.vue b/src/pages/Customer/Card/CustomerWebAccess.vue index 3dc025d9c..f990e720c 100644 --- a/src/pages/Customer/Card/CustomerWebAccess.vue +++ b/src/pages/Customer/Card/CustomerWebAccess.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import axios from 'axios'; import { useQuasar } from 'quasar'; -import useNotify from 'src/composables/useNotify'; import VnInput from 'src/components/common/VnInput.vue'; import CustomerChangePassword from 'src/pages/Customer/components/CustomerChangePassword.vue'; import FormModel from 'components/FormModel.vue'; @@ -13,7 +12,6 @@ const { t } = useI18n(); const quasar = useQuasar(); const route = useRoute(); const canChangePassword = ref(0); -const { notify } = useNotify(); const filter = computed(() => { return { @@ -32,13 +30,8 @@ const showChangePasswordDialog = () => { }; async function hasCustomerRole() { - try { - canChangePassword.value = ( - await axios(`Clients/${route.params.id}/hasCustomerRole`) - ).data; - } catch (e) { - notify('errors.writeRequest', 'negative'); - } + const { data } = await axios(`Clients/${route.params.id}/hasCustomerRole`); + canChangePassword.value = data; } From 4bf8e1224d1d8cd0082174fe7830baeeddc45b0c Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 13 Sep 2024 12:28:07 +0200 Subject: [PATCH 003/102] chore: refs #7702 rollback --- src/pages/Customer/Card/CustomerWebAccess.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/Customer/Card/CustomerWebAccess.vue b/src/pages/Customer/Card/CustomerWebAccess.vue index f990e720c..8d025a365 100644 --- a/src/pages/Customer/Card/CustomerWebAccess.vue +++ b/src/pages/Customer/Card/CustomerWebAccess.vue @@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import axios from 'axios'; import { useQuasar } from 'quasar'; + import VnInput from 'src/components/common/VnInput.vue'; import CustomerChangePassword from 'src/pages/Customer/components/CustomerChangePassword.vue'; import FormModel from 'components/FormModel.vue'; From 98cdeabe9f91791faa4a623ed9e67237180b0666 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 13 Sep 2024 18:15:28 +0200 Subject: [PATCH 004/102] feat: refs #7702 vnChangePassword --- src/components/common/VnChangePassword.vue | 112 ++++++++++++++++++ src/pages/Customer/Card/CustomerWebAccess.vue | 28 ++--- 2 files changed, 124 insertions(+), 16 deletions(-) create mode 100644 src/components/common/VnChangePassword.vue diff --git a/src/components/common/VnChangePassword.vue b/src/components/common/VnChangePassword.vue new file mode 100644 index 000000000..d7c9ad02f --- /dev/null +++ b/src/components/common/VnChangePassword.vue @@ -0,0 +1,112 @@ + + + + +es: + Change password: Cambiar contraseña + New password: Nueva contraseña + Repeat password: Repetir contraseña + You must enter a new password: Debes introducir la nueva contraseña + Passwords don't match: Las contraseñas no coinciden + diff --git a/src/pages/Customer/Card/CustomerWebAccess.vue b/src/pages/Customer/Card/CustomerWebAccess.vue index 8d025a365..ba906a144 100644 --- a/src/pages/Customer/Card/CustomerWebAccess.vue +++ b/src/pages/Customer/Card/CustomerWebAccess.vue @@ -3,14 +3,11 @@ import { computed, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import axios from 'axios'; -import { useQuasar } from 'quasar'; - import VnInput from 'src/components/common/VnInput.vue'; -import CustomerChangePassword from 'src/pages/Customer/components/CustomerChangePassword.vue'; import FormModel from 'components/FormModel.vue'; +import VnChangePassword from 'src/components/common/VnChangePassword.vue'; const { t } = useI18n(); -const quasar = useQuasar(); const route = useRoute(); const canChangePassword = ref(0); @@ -21,21 +18,11 @@ const filter = computed(() => { }; }); -const showChangePasswordDialog = () => { - quasar.dialog({ - component: CustomerChangePassword, - componentProps: { - id: route.params.id, - }, - }); -}; - async function hasCustomerRole() { const { data } = await axios(`Clients/${route.params.id}/hasCustomerRole`); canChangePassword.value = data; } - + - es: Enable web access: Habilitar acceso web From 9ec2fb4c77edede9e5b80a34a80263a33ac80a1c Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 16 Sep 2024 10:36:56 +0200 Subject: [PATCH 005/102] feat: refs #7702 fine tunning --- src/components/common/VnChangePassword.vue | 14 +++++++- src/pages/Worker/Card/WorkerDescriptor.vue | 40 ++++++++++------------ 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/components/common/VnChangePassword.vue b/src/components/common/VnChangePassword.vue index d7c9ad02f..a36c6bcff 100644 --- a/src/components/common/VnChangePassword.vue +++ b/src/components/common/VnChangePassword.vue @@ -7,7 +7,7 @@ import FetchData from '../FetchData.vue'; import useNotify from 'src/composables/useNotify'; const props = defineProps({ submitFn: { type: Function, default: () => {} } }); - +const emit = defineEmits(['onSubmit']); const { t } = useI18n(); const { notify } = useNotify(); @@ -15,19 +15,27 @@ const form = ref(); const changePassDialog = ref(); const passwords = ref({ newPassword: null, repeatPassword: null }); const requirements = ref([]); +const isLoading = ref(false); const validate = async () => { const { newPassword, repeatPassword } = passwords.value; + if (!newPassword) { + notify(t('You must enter a new password'), 'negative'); + return; + } if (newPassword !== repeatPassword) { notify(t("Passwords don't match"), 'negative'); return; } try { + isLoading.value = true; await props.submitFn(newPassword); + emit('onSubmit'); } catch (e) { notify('errors.writeRequest', 'negative'); } finally { changePassDialog.value.hide(); + isLoading.value = false; } }; @@ -84,6 +92,8 @@ defineExpose({ show: () => changePassDialog.value.show() }); changePassDialog.value.show() }); v-close-popup /> { showEditPhotoForm.value = !showEditPhotoForm.value; }; - const entityId = computed(() => { return $props.id || route.params.id; }); - -const worker = ref(); const workerExcluded = ref(false); const getIsExcluded = async () => { @@ -61,10 +56,10 @@ const handleExcluded = async () => { workerExcluded.value = !workerExcluded.value; }; + const handlePhotoUpdated = (evt = false) => { image.value.reload(evt); }; -const refetch = async () => await cardDescriptorRef.value.getData(); @@ -197,6 +184,15 @@ const refetch = async () => await cardDescriptorRef.value.getData(); + es: Create training course: Crear curso de formación diff --git a/src/pages/Worker/Card/WorkerMedical.vue b/src/pages/Worker/Card/WorkerMedical.vue index 6bca4ae85..fab1416c9 100644 --- a/src/pages/Worker/Card/WorkerMedical.vue +++ b/src/pages/Worker/Card/WorkerMedical.vue @@ -65,6 +65,18 @@ const columns = [ create: true, component: 'input', }, + { + align: 'right', + name: 'tableActions', + actions: [ + { + title: t('delete'), + icon: 'delete', + action: async (row) => await tableRef.value.CrudModelRef.remove([row]), + isPrimary: true, + }, + ], + }, ]; From f809e0fb317de0c4762cb684bc3bb58f870d8958 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 23 Sep 2024 12:55:39 +0200 Subject: [PATCH 013/102] fix: refs #7323 show prev month week color --- src/pages/Worker/Card/WorkerTimeControl.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index fbfd4b28d..c6ca9d74a 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -326,16 +326,21 @@ const updateData = async () => { }; const getMailStates = async (date) => { + const url = `WorkerTimeControls/${route.params.id}/getMailStates`; + const month = date.getMonth() + 1; + const prevMonth = month == 1 ? 12 : month - 1; + let prevMonthStates = []; + const params = { - month: date.getMonth() + 1, + month, year: date.getFullYear(), }; - const { data } = await axios.get( - `WorkerTimeControls/${route.params.id}/getMailStates`, - { params } - ); - workerTimeControlMails.value = data; + const curMonthStates = (await axios.get(url, { params })).data; + prevMonthStates = (await axios.get(url, { params: { ...params, month: prevMonth } })) + .data; + + workerTimeControlMails.value = curMonthStates.concat(prevMonthStates); }; const showWorkerTimeForm = (propValue, formType) => { From 2cb9899de14a5a9d1a3520c993dffc428b1cc0e6 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 23 Sep 2024 15:38:54 +0200 Subject: [PATCH 014/102] feat: refs #7207 show queue --- src/pages/Worker/Card/WorkerSummary.vue | 1 + src/pages/Worker/locale/en.yml | 1 + src/pages/Worker/locale/es.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue index 8fee52dd3..ed34e771d 100644 --- a/src/pages/Worker/Card/WorkerSummary.vue +++ b/src/pages/Worker/Card/WorkerSummary.vue @@ -139,6 +139,7 @@ onBeforeMount(async () => { + diff --git a/src/pages/Worker/locale/en.yml b/src/pages/Worker/locale/en.yml index 96df37919..96764ffd1 100644 --- a/src/pages/Worker/locale/en.yml +++ b/src/pages/Worker/locale/en.yml @@ -4,3 +4,4 @@ tableColumns: name: Name department: Department email: Email +queue: Queue diff --git a/src/pages/Worker/locale/es.yml b/src/pages/Worker/locale/es.yml index 41812345f..cf6bc3afe 100644 --- a/src/pages/Worker/locale/es.yml +++ b/src/pages/Worker/locale/es.yml @@ -9,3 +9,4 @@ tableColumns: name: Nombre department: Departamento email: Email +queue: Cola From b54d358617b3cfcd1f2e6c47c05696820af6ade4 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 25 Sep 2024 09:14:35 +0200 Subject: [PATCH 015/102] fix: refs #7207 use right locale --- src/pages/InvoiceIn/InvoiceInFilter.vue | 2 +- src/pages/InvoiceIn/locale/es.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/InvoiceIn/InvoiceInFilter.vue b/src/pages/InvoiceIn/InvoiceInFilter.vue index bf4e023a9..b19e047fa 100644 --- a/src/pages/InvoiceIn/InvoiceInFilter.vue +++ b/src/pages/InvoiceIn/InvoiceInFilter.vue @@ -170,7 +170,7 @@ es: awb: AWB amount: Importe issued: Emitida - isBooked: Conciliada + isBooked: Contabilizada account: Cuenta contable created: Creada dued: Vencida diff --git a/src/pages/InvoiceIn/locale/es.yml b/src/pages/InvoiceIn/locale/es.yml index 944708364..2d3b137f4 100644 --- a/src/pages/InvoiceIn/locale/es.yml +++ b/src/pages/InvoiceIn/locale/es.yml @@ -7,7 +7,7 @@ invoiceIn: shortIssued: F. emisión file: Fichero issued: Fecha emisión - isBooked: Conciliada + isBooked: Contabilizada awb: AWB amount: Importe card: From 45b3ed6e17ce1c3d6b70fea9a62d29cbd516776e Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 25 Sep 2024 09:53:06 +0200 Subject: [PATCH 016/102] fix: refs #7207 te2e --- test/cypress/integration/ticket/ticketDescriptor.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cypress/integration/ticket/ticketDescriptor.spec.js b/test/cypress/integration/ticket/ticketDescriptor.spec.js index 8192b7c7c..cc3a1d65a 100644 --- a/test/cypress/integration/ticket/ticketDescriptor.spec.js +++ b/test/cypress/integration/ticket/ticketDescriptor.spec.js @@ -1,7 +1,7 @@ /// describe('Ticket descriptor', () => { - const toCloneOpt = '[role="menu"] .q-list > :nth-child(5)'; - const setWeightOpt = '[role="menu"] .q-list > :nth-child(6)'; + const toCloneOpt = '[role="menu"] .q-list > :nth-child(8)'; + const setWeightOpt = '[role="menu"] .q-list > :nth-child(13)'; const warehouseValue = ':nth-child(1) > :nth-child(6) > .value > span'; const summaryHeader = '.summaryHeader > div'; const weight = 25; From 68ebda625b9594229837e2bbb331d0f2787b53ec Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 25 Sep 2024 14:02:11 +0200 Subject: [PATCH 017/102] fix: refs #7874 refs #6943 ui --- .../components/CustomerAddressEdit.vue | 58 +++++++++---------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/src/pages/Customer/components/CustomerAddressEdit.vue b/src/pages/Customer/components/CustomerAddressEdit.vue index 606867388..1e5387815 100644 --- a/src/pages/Customer/components/CustomerAddressEdit.vue +++ b/src/pages/Customer/components/CustomerAddressEdit.vue @@ -240,39 +240,33 @@ function handleLocation(data, location) { class="row q-gutter-md q-mb-md" v-for="(note, index) in notes" > -
- -
-
- -
-
- - - {{ t('Remove note') }} - - -
+ + + + + {{ t('Remove note') }} + + - Date: Wed, 25 Sep 2024 14:18:34 +0200 Subject: [PATCH 018/102] feat: refs #7010 added packing type field in customer summary and ticket list --- .../components/CustomerSummaryTable.vue | 18 ++++- src/pages/Ticket/TicketList.vue | 70 +++++++++++++++---- 2 files changed, 74 insertions(+), 14 deletions(-) diff --git a/src/pages/Customer/components/CustomerSummaryTable.vue b/src/pages/Customer/components/CustomerSummaryTable.vue index 946296e67..8ebf4aabc 100644 --- a/src/pages/Customer/components/CustomerSummaryTable.vue +++ b/src/pages/Customer/components/CustomerSummaryTable.vue @@ -32,6 +32,16 @@ const filter = { }, { relation: 'invoiceOut', scope: { fields: ['id'] } }, { relation: 'agencyMode', scope: { fields: ['name'] } }, + { + relation: 'ticketSales', + scope: { + fields: ['id', 'concept', 'itemFk'], + include: { relation: 'item' }, + scope: { + fields: ['id', 'name', 'itemPackingTypeFk'], + }, + }, + }, ], where: { clientFk: route.params.id }, order: ['shipped DESC', 'id'], @@ -87,7 +97,13 @@ const columns = computed(() => [ label: t('Total'), name: 'total', }, - + { + align: 'left', + name: 'itemPackingTypeFk', + label: t('ticketSale.packaging'), + format: (row, dashIfEmpty) => + dashIfEmpty(row?.ticketSales[0]?.item.itemPackingTypeFk), + }, { align: 'right', label: '', diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index ad97e75c1..2a1dfd014 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -1,6 +1,6 @@ @@ -577,16 +615,16 @@ function setReference(data) { {{ row.state }} + + + {{ row.refFk }} + + + {{ row.state }} - + diff --git a/src/pages/Customer/Card/CustomerWebAccess.vue b/src/pages/Customer/Card/CustomerWebAccess.vue index ba906a144..1db32c752 100644 --- a/src/pages/Customer/Card/CustomerWebAccess.vue +++ b/src/pages/Customer/Card/CustomerWebAccess.vue @@ -56,7 +56,7 @@ async function hasCustomerRole() { @@ -209,5 +209,4 @@ const handlePhotoUpdated = (evt = false) => { es: Click to allow the user to be disabled: Marcar para deshabilitar Click to exclude the user from getting disabled: Marcar para no deshabilitar - Change password: Cambiar contraseña
From ae8e4ba4b975b1c6381fabec08de18cbc190f978 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 4 Oct 2024 11:54:40 +0200 Subject: [PATCH 043/102] chore: refs #7702 fix tests --- .../common/VnChangePassword.spec.js | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/test/vitest/__tests__/components/common/VnChangePassword.spec.js b/test/vitest/__tests__/components/common/VnChangePassword.spec.js index e7a3bdcf7..f5a967bb5 100644 --- a/test/vitest/__tests__/components/common/VnChangePassword.spec.js +++ b/test/vitest/__tests__/components/common/VnChangePassword.spec.js @@ -50,10 +50,21 @@ describe('VnSmsDialog', () => { ); }); - it('should call submitFn and emit onSubmit when passwords match', async () => { - vm.passwords.newPassword = 'password'; - vm.passwords.repeatPassword = 'password'; - await vm.validate(); - expect(vm.props.submitFn).toHaveBeenCalledWith('password'); + describe('if passwords match', () => { + it('should call submitFn and emit password', async () => { + vm.passwords.newPassword = 'password'; + vm.passwords.repeatPassword = 'password'; + await vm.validate(); + expect(vm.props.submitFn).toHaveBeenCalledWith('password', undefined); + }); + + it('should call submitFn and emit password and old password', async () => { + vm.passwords.newPassword = 'password'; + vm.passwords.repeatPassword = 'password'; + vm.passwords.oldPassword = 'oldPassword'; + + await vm.validate(); + expect(vm.props.submitFn).toHaveBeenCalledWith('password', 'oldPassword'); + }); }); }); From 195747b5a0e938f3fe89779a4775ddeb79e22f72 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 4 Oct 2024 12:34:37 +0200 Subject: [PATCH 044/102] feat: added click and transfer tickets and deleted useless code --- src/pages/Ticket/Card/TicketTransfer.vue | 38 ++++++-------------- src/pages/Ticket/Card/TicketTransferForm.vue | 7 ++-- 2 files changed, 14 insertions(+), 31 deletions(-) diff --git a/src/pages/Ticket/Card/TicketTransfer.vue b/src/pages/Ticket/Card/TicketTransfer.vue index 1944b80f4..e1a011a84 100644 --- a/src/pages/Ticket/Card/TicketTransfer.vue +++ b/src/pages/Ticket/Card/TicketTransfer.vue @@ -1,13 +1,11 @@ From 3a21f6aadb5d3aa50fdff0d85d1c2e81532f5f87 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 4 Oct 2024 14:22:00 +0200 Subject: [PATCH 047/102] fix: order catalog --- src/pages/Order/Card/OrderCatalog.vue | 1 + .../Order/Card/OrderCatalogItemDialog.vue | 21 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/pages/Order/Card/OrderCatalog.vue b/src/pages/Order/Card/OrderCatalog.vue index 68bf9511f..b13e8661d 100644 --- a/src/pages/Order/Card/OrderCatalog.vue +++ b/src/pages/Order/Card/OrderCatalog.vue @@ -130,4 +130,5 @@ function extractValueTags(items) { es: You can search items by name or id: Puedes buscar items por nombre o id + Search items: Buscar items diff --git a/src/pages/Order/Card/OrderCatalogItemDialog.vue b/src/pages/Order/Card/OrderCatalogItemDialog.vue index 46a50c021..09a25fcb8 100644 --- a/src/pages/Order/Card/OrderCatalogItemDialog.vue +++ b/src/pages/Order/Card/OrderCatalogItemDialog.vue @@ -20,8 +20,10 @@ const props = defineProps({ const fields = ref((props.prices || []).map((item) => ({ ...item, quantity: 0 }))); const descriptorData = useArrayData('orderData'); - +const isLoading = ref(false); const addToOrder = async () => { + if (isLoading.value) return; + isLoading.value = true; const items = (fields.value || []).filter((item) => Number(item.quantity) > 0); await axios.post('/OrderRows/addToOrder', { items, @@ -30,6 +32,10 @@ const addToOrder = async () => { notify(t('globals.dataSaved'), 'positive'); emit('added'); descriptorData.fetch({}); + isLoading.value = false; +}; +const canAddToOrder = () => { + return (fields.value || []).some((item) => Number(item.quantity) > 0); }; @@ -68,7 +74,11 @@ const addToOrder = async () => {
- + {{ t('globals.add') }}
@@ -81,3 +91,10 @@ const addToOrder = async () => { width: 200px; } + + +es: + noAmount: La cantidad no puede ser 0 +en: + noAmount: Amount can not be 0 + From aee23c75e86dae184798c64f8642e84e59993c32 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 4 Oct 2024 14:31:39 +0200 Subject: [PATCH 048/102] fix: order module --- src/pages/Order/Card/OrderCatalog.vue | 1 + src/pages/Order/Card/OrderCatalogFilter.vue | 1 + .../Order/Card/OrderCatalogItemDialog.vue | 21 +++++++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/pages/Order/Card/OrderCatalog.vue b/src/pages/Order/Card/OrderCatalog.vue index 68bf9511f..b13e8661d 100644 --- a/src/pages/Order/Card/OrderCatalog.vue +++ b/src/pages/Order/Card/OrderCatalog.vue @@ -130,4 +130,5 @@ function extractValueTags(items) { es: You can search items by name or id: Puedes buscar items por nombre o id + Search items: Buscar items diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue index 354c44747..6de43e86a 100644 --- a/src/pages/Order/Card/OrderCatalogFilter.vue +++ b/src/pages/Order/Card/OrderCatalogFilter.vue @@ -247,6 +247,7 @@ function addOrder(value, field, params) { rounded emit-value use-input + sort-by="name ASC" :disable="!selectedCategoryFk" @update:model-value=" (value) => { diff --git a/src/pages/Order/Card/OrderCatalogItemDialog.vue b/src/pages/Order/Card/OrderCatalogItemDialog.vue index 46a50c021..09a25fcb8 100644 --- a/src/pages/Order/Card/OrderCatalogItemDialog.vue +++ b/src/pages/Order/Card/OrderCatalogItemDialog.vue @@ -20,8 +20,10 @@ const props = defineProps({ const fields = ref((props.prices || []).map((item) => ({ ...item, quantity: 0 }))); const descriptorData = useArrayData('orderData'); - +const isLoading = ref(false); const addToOrder = async () => { + if (isLoading.value) return; + isLoading.value = true; const items = (fields.value || []).filter((item) => Number(item.quantity) > 0); await axios.post('/OrderRows/addToOrder', { items, @@ -30,6 +32,10 @@ const addToOrder = async () => { notify(t('globals.dataSaved'), 'positive'); emit('added'); descriptorData.fetch({}); + isLoading.value = false; +}; +const canAddToOrder = () => { + return (fields.value || []).some((item) => Number(item.quantity) > 0); }; @@ -68,7 +74,11 @@ const addToOrder = async () => {
- + {{ t('globals.add') }}
@@ -81,3 +91,10 @@ const addToOrder = async () => { width: 200px; } + + +es: + noAmount: La cantidad no puede ser 0 +en: + noAmount: Amount can not be 0 + From c3c252834280561e6814cfb2e392516736fd95a0 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sat, 5 Oct 2024 00:31:32 +0200 Subject: [PATCH 049/102] feat: #7356 improve NotesSummary --- src/pages/Ticket/Card/TicketSummary.vue | 37 +++++++++++++++---------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 2e85be000..8f359f649 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -17,6 +17,7 @@ import VnUserLink from 'src/components/ui/VnUserLink.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; +import { QVirtualScroll } from 'quasar'; const route = useRoute(); const { notify } = useNotify(); @@ -229,22 +230,28 @@ async function changeState(value) { :url="ticketUrl + 'observation'" :text="t('ticket.pageTitles.notes')" /> - + + + {{ item.observationType.description }}: + + {{ item.description }} + - - From 04b2a4d9cec12c2d5e7a572e01a699114501b119 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sat, 5 Oct 2024 00:31:41 +0200 Subject: [PATCH 050/102] perf: clean warnings --- src/components/VnTable/VnTable.vue | 2 +- src/components/common/VnSelectDialog.vue | 2 +- src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue | 3 --- src/pages/Order/Card/OrderCreateDialog.vue | 4 +--- src/pages/Ticket/Card/TicketSummary.vue | 1 - 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 3ed741ac4..f18892a31 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -310,7 +310,7 @@ defineExpose({ params, }); -function handleOnDataSaved(_, res) { +function handleOnDataSaved(_) { if (_.onDataSaved) _.onDataSaved({ CrudModelRef: CrudModelRef.value }); else $props.create.onDataSaved(_); } diff --git a/src/components/common/VnSelectDialog.vue b/src/components/common/VnSelectDialog.vue index 17f893255..350aa9272 100644 --- a/src/components/common/VnSelectDialog.vue +++ b/src/components/common/VnSelectDialog.vue @@ -1,5 +1,5 @@ + diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index 3d5afaf80..1aa797ab7 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -3,6 +3,7 @@ import { onMounted, watch, computed, ref } from 'vue'; import { date } from 'quasar'; import { useI18n } from 'vue-i18n'; import { useAttrs } from 'vue'; +import VnDate from './VnDate.vue'; const model = defineModel({ type: [String, Date] }); const $props = defineProps({ @@ -87,6 +88,11 @@ const styleAttrs = computed(() => { } : {}; }); + +const manageDate = (date) => { + formattedDate.value = date; + isPopupOpen.value = false; +}; { :no-focus="true" :no-parent-event="true" > - + + + + diff --git a/src/components/common/VnTime.vue b/src/components/common/VnTime.vue new file mode 100644 index 000000000..135709d2b --- /dev/null +++ b/src/components/common/VnTime.vue @@ -0,0 +1,6 @@ + + From 5c5a35998615b270d4f2423b4247f828fd9524fb Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 7 Oct 2024 09:38:39 +0200 Subject: [PATCH 054/102] refactor: refs #8019 create VnTime --- src/components/common/VnInputTime.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index a5e7d3002..6d69bc4a5 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -3,6 +3,8 @@ import { computed, ref, useAttrs } from 'vue'; import { useI18n } from 'vue-i18n'; import { date } from 'quasar'; import { useValidator } from 'src/composables/useValidator'; +import VnTime from './VnTime.vue'; + const { validations } = useValidator(); const $attrs = useAttrs(); const model = defineModel({ type: String }); @@ -107,6 +109,7 @@ function dateToTime(newDate) { /> - + + + + From 5d65d3e20cfbe5f96e42978a17f9b9e7d4df2883 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 7 Oct 2024 09:48:57 +0200 Subject: [PATCH 055/102] refs #6898 hotfix agency --- src/pages/Supplier/Card/SupplierAgencyTermCreate.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue b/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue index a87ea502b..515d157e5 100644 --- a/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue +++ b/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue @@ -15,12 +15,12 @@ const route = useRoute(); const agenciesOptions = ref(null); const newAgencyTermForm = reactive({ agencyFk: null, - minimumM3: null, - packagePrice: null, - kmPrice: null, - m3Price: null, - routePrice: null, - minimumKm: null, + minimumM3: 0, + packagePrice: 0, + kmPrice: 0, + m3Price: 0, + routePrice: 0, + minimumKm: 0, supplierFk: route.params.id, }); From 4f3e7e26309aced2bd4a98f1bffd13b5a05bc65b Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 7 Oct 2024 10:03:05 +0200 Subject: [PATCH 056/102] feat: refs #7893 Added waste recalc section --- src/i18n/locale/en.yml | 6 +++ src/i18n/locale/es.yml | 6 +++ src/pages/Entry/EntryWasteRecalc.vue | 76 ++++++++++++++++++++++++++++ src/router/modules/entry.js | 17 ++++++- 4 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 src/pages/Entry/EntryWasteRecalc.vue diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 20a612a82..68214129f 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -105,6 +105,7 @@ globals: campaign: Campaign weight: Weight error: Ups! Something went wrong + recalc: Recalculate pageTitles: logIn: Login addressEdit: Update address @@ -275,6 +276,7 @@ globals: serial: Serial medical: Mutual RouteExtendedList: Router + wasteRecalc: Waste recaclulate supplier: Supplier created: Created worker: Worker @@ -465,6 +467,10 @@ entry: landing: Landing isExcludedFromAvailable: Es inventory isRaid: Raid + wasteRecalc: + dateRequired: The date fields are required + dateIncoherent: The "from" date cannot be later than the "to" date + recalcOk: The wastes were successfully recalculated ticket: pageTitles: tickets: Tickets diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index ae0274415..7e1671fbf 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -107,6 +107,7 @@ globals: campaign: Campaña weight: Peso error: ¡Ups! Algo salió mal + recalc: Recalcular pageTitles: logIn: Inicio de sesión addressEdit: Modificar consignatario @@ -279,6 +280,7 @@ globals: clientsActionsMonitor: Clientes y acciones serial: Facturas por serie medical: Mutua + wasteRecalc: Recalcular mermas supplier: Proveedor created: Fecha creación worker: Trabajador @@ -467,6 +469,10 @@ entry: landing: Llegada isExcludedFromAvailable: Es inventario isRaid: Redada + wasteRecalc: + dateRequired: Los campos de tipo fecha son obligatorios + dateIncoherent: La fecha "desde" no puede ser superior a la fecha "hasta" + recalcOk: Se han recalculado las mermas correctamente ticket: pageTitles: tickets: Tickets diff --git a/src/pages/Entry/EntryWasteRecalc.vue b/src/pages/Entry/EntryWasteRecalc.vue new file mode 100644 index 000000000..2fb9c3abf --- /dev/null +++ b/src/pages/Entry/EntryWasteRecalc.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js index 4750a4301..3add239df 100644 --- a/src/router/modules/entry.js +++ b/src/router/modules/entry.js @@ -12,7 +12,13 @@ export default { component: RouterView, redirect: { name: 'EntryMain' }, menus: { - main: ['EntryList', 'MyEntries', 'EntryLatestBuys', 'EntryStockBought'], + main: [ + 'EntryList', + 'MyEntries', + 'EntryLatestBuys', + 'EntryStockBought', + 'EntryWasteRecalc', + ], card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'], }, children: [ @@ -67,6 +73,15 @@ export default { }, component: () => import('src/pages/Entry/EntryStockBought.vue'), }, + { + path: 'waste-recalc', + name: 'EntryWasteRecalc', + meta: { + title: 'wasteRecalc', + icon: 'compost', + }, + component: () => import('src/pages/Entry/EntryWasteRecalc.vue'), + }, ], }, { From 178fa8cd21328a688a7697f2c3c38a7408ed2775 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 7 Oct 2024 11:31:16 +0200 Subject: [PATCH 057/102] feat: refs #7893 Requested changes --- src/pages/Entry/EntryWasteRecalc.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Entry/EntryWasteRecalc.vue b/src/pages/Entry/EntryWasteRecalc.vue index 2fb9c3abf..1dbf8cdf0 100644 --- a/src/pages/Entry/EntryWasteRecalc.vue +++ b/src/pages/Entry/EntryWasteRecalc.vue @@ -65,7 +65,6 @@ const recalc = async () => { color="primary" text-color="white" :label="t('globals.recalc')" - icon="Calculate" :loading="isLoading" :disable="isLoading" @click="recalc()" From e396cd0cac48bf8bf5761d575758489e69a93102 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 7 Oct 2024 12:16:32 +0200 Subject: [PATCH 058/102] hotfix: routePrice null --- src/pages/Supplier/Card/SupplierAgencyTermCreate.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue b/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue index 515d157e5..038eaa356 100644 --- a/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue +++ b/src/pages/Supplier/Card/SupplierAgencyTermCreate.vue @@ -19,7 +19,7 @@ const newAgencyTermForm = reactive({ packagePrice: 0, kmPrice: 0, m3Price: 0, - routePrice: 0, + routePrice: null, minimumKm: 0, supplierFk: route.params.id, }); From 0ed9fdd55da1c3939848129bc0c7b72daa3660b8 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 7 Oct 2024 13:02:40 +0200 Subject: [PATCH 059/102] fix: refs VnImg zoom resolution missing property --- src/components/ui/CatalogItem.vue | 2 +- src/pages/Item/ItemList.vue | 3 +-- src/pages/Order/Card/OrderLines.vue | 6 +++++- src/pages/Ticket/Card/TicketSale.vue | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/ui/CatalogItem.vue b/src/components/ui/CatalogItem.vue index 545bfbbb4..7dca19770 100644 --- a/src/components/ui/CatalogItem.vue +++ b/src/components/ui/CatalogItem.vue @@ -31,7 +31,7 @@ const dialog = ref(null);
- +
(stateStore.rightDrawer = false)); diff --git a/src/pages/Order/Card/OrderLines.vue b/src/pages/Order/Card/OrderLines.vue index 17a157797..0223aa9c6 100644 --- a/src/pages/Order/Card/OrderLines.vue +++ b/src/pages/Order/Card/OrderLines.vue @@ -278,7 +278,11 @@ watch( > + diff --git a/src/components/ui/VnImg.vue b/src/components/ui/VnImg.vue index ceb4e8468..1b57c20d0 100644 --- a/src/components/ui/VnImg.vue +++ b/src/components/ui/VnImg.vue @@ -58,7 +58,7 @@ defineExpose({ :class="{ zoomIn: zoom }" :src="getUrl()" v-bind="$attrs" - @click.stop="show = $props.zoom ? true : false" + @click.stop="show = $props.zoom" spinner-color="primary" /> From 50eed83d05dabadd46fe0f07948564d9ef953ea2 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 7 Oct 2024 13:50:19 +0200 Subject: [PATCH 061/102] feat: refs #7893 Requested changes --- src/i18n/locale/en.yml | 4 --- src/i18n/locale/es.yml | 4 --- src/pages/Entry/EntryWasteRecalc.vue | 45 +++++++++++++--------------- src/pages/Entry/locale/en.yml | 2 ++ src/pages/Entry/locale/es.yml | 2 ++ 5 files changed, 25 insertions(+), 32 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index c6a597dea..b73395df2 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -474,10 +474,6 @@ entry: landing: Landing isExcludedFromAvailable: Es inventory isRaid: Raid - wasteRecalc: - dateRequired: The date fields are required - dateIncoherent: The "from" date cannot be later than the "to" date - recalcOk: The wastes were successfully recalculated ticket: pageTitles: tickets: Tickets diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 78a67aceb..2552c9549 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -476,10 +476,6 @@ entry: landing: Llegada isExcludedFromAvailable: Es inventario isRaid: Redada - wasteRecalc: - dateRequired: Los campos de tipo fecha son obligatorios - dateIncoherent: La fecha "desde" no puede ser superior a la fecha "hasta" - recalcOk: Se han recalculado las mermas correctamente ticket: pageTitles: tickets: Tickets diff --git a/src/pages/Entry/EntryWasteRecalc.vue b/src/pages/Entry/EntryWasteRecalc.vue index 1dbf8cdf0..cd823beb4 100644 --- a/src/pages/Entry/EntryWasteRecalc.vue +++ b/src/pages/Entry/EntryWasteRecalc.vue @@ -1,42 +1,37 @@ From 4344458bb067f4c6595f02df580dffd3e5e08a84 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 7 Oct 2024 16:02:29 +0200 Subject: [PATCH 063/102] feat: refs #8019 fine-tunning vnTime --- src/components/common/VnTime.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/common/VnTime.vue b/src/components/common/VnTime.vue index 135709d2b..369f80432 100644 --- a/src/components/common/VnTime.vue +++ b/src/components/common/VnTime.vue @@ -2,5 +2,15 @@ const model = defineModel({ type: [String, Number], required: true }); + From 73e5039ec39d351672548f22400fc0c6c52220a5 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 8 Oct 2024 08:35:24 +0200 Subject: [PATCH 064/102] refs #7986 create front --- src/pages/Worker/Card/WorkerMoto.vue | 187 +++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 src/pages/Worker/Card/WorkerMoto.vue diff --git a/src/pages/Worker/Card/WorkerMoto.vue b/src/pages/Worker/Card/WorkerMoto.vue new file mode 100644 index 000000000..a53aac270 --- /dev/null +++ b/src/pages/Worker/Card/WorkerMoto.vue @@ -0,0 +1,187 @@ + + + + + +es: + Model: Modelo + Serial number: Número de serie + Current SIM: SIM actual + Add new device: Añadir nuevo dispositivo + PDA deallocated: PDA desasignada + Remove PDA: Eliminar PDA + Do you want to remove this PDA?: ¿Desea eliminar este PDA? + You can only have one PDA: Solo puedes tener un PDA si no eres autonomo + This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario + From 56fff55f71bc97c59d1300144adcfee69f3241cf Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 8 Oct 2024 09:26:00 +0200 Subject: [PATCH 065/102] fix: unnecessary property --- src/pages/Item/Card/ItemTags.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Item/Card/ItemTags.vue b/src/pages/Item/Card/ItemTags.vue index 1b5eb28f0..6f31d0cf8 100644 --- a/src/pages/Item/Card/ItemTags.vue +++ b/src/pages/Item/Card/ItemTags.vue @@ -171,7 +171,6 @@ const insertTag = (rows) => { Date: Tue, 8 Oct 2024 11:07:05 +0000 Subject: [PATCH 066/102] test: fix VnLocation --- .../integration/vnComponent/vnLocation.spec.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/cypress/integration/vnComponent/vnLocation.spec.js b/test/cypress/integration/vnComponent/vnLocation.spec.js index 78dc38899..c1b0cf929 100644 --- a/test/cypress/integration/vnComponent/vnLocation.spec.js +++ b/test/cypress/integration/vnComponent/vnLocation.spec.js @@ -64,7 +64,7 @@ describe('VnLocation', () => { `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) > .q-icon` ).click(); cy.get( - `#q-portal--dialog--4 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input` + `#q-portal--dialog--5 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input` ).should('have.value', province); }); }); @@ -133,6 +133,8 @@ describe('VnLocation', () => { ); cy.get('.q-mt-lg > .q-btn--standard').click(); cy.get(`${createForm.prefix}`).should('not.exist'); + cy.waitForElement('.q-form'); + checkVnLocation(postCode, province); }); it('Create city', () => { @@ -144,10 +146,12 @@ describe('VnLocation', () => { cy.get( `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon` ).click(); - cy.selectOption('#q-portal--dialog--2 .q-select', 'one'); - cy.get('#q-portal--dialog--2 .q-input').type(province); - cy.get('#q-portal--dialog--2 .q-btn--standard').click(); + cy.selectOption('#q-portal--dialog--3 .q-select', 'one'); + cy.get('#q-portal--dialog--3 .q-input').type(province); + cy.get('#q-portal--dialog--3 .q-btn--standard').click(); cy.get('#q-portal--dialog--1 .q-btn--standard').click(); + cy.waitForElement('.q-form'); + checkVnLocation(postCode, province); }); From 6a797460806cf628f9310a7c54d35fb878c29b03 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 8 Oct 2024 13:18:51 +0200 Subject: [PATCH 067/102] test: fix TicketDescriptor --- test/cypress/integration/ticket/ticketDescriptor.spec.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/cypress/integration/ticket/ticketDescriptor.spec.js b/test/cypress/integration/ticket/ticketDescriptor.spec.js index 8192b7c7c..0ba2723a2 100644 --- a/test/cypress/integration/ticket/ticketDescriptor.spec.js +++ b/test/cypress/integration/ticket/ticketDescriptor.spec.js @@ -1,7 +1,8 @@ /// describe('Ticket descriptor', () => { - const toCloneOpt = '[role="menu"] .q-list > :nth-child(5)'; - const setWeightOpt = '[role="menu"] .q-list > :nth-child(6)'; + const listItem = '[role="menu"] .q-list .q-item'; + const toCloneOpt = 'To clone ticket'; + const setWeightOpt = 'Set weight'; const warehouseValue = ':nth-child(1) > :nth-child(6) > .value > span'; const summaryHeader = '.summaryHeader > div'; const weight = 25; @@ -14,7 +15,7 @@ describe('Ticket descriptor', () => { it('should clone the ticket without warehouse', () => { cy.visit('/#/ticket/1/summary'); cy.openActionsDescriptor(); - cy.get(toCloneOpt).click(); + cy.contains(listItem, toCloneOpt).click(); cy.clickConfirm(); cy.get(warehouseValue).contains('Warehouse One'); cy.get(summaryHeader) @@ -28,7 +29,7 @@ describe('Ticket descriptor', () => { it('should set the weight of the ticket', () => { cy.visit('/#/ticket/10/summary'); cy.openActionsDescriptor(); - cy.get(setWeightOpt).click(); + cy.contains(listItem, setWeightOpt).click(); cy.intercept('POST', /\/api\/Tickets\/\d+\/setWeight/).as('weight'); cy.get('.q-dialog input').type(weight); cy.clickConfirm(); From 855032e4a63765927536c8a266ccce7ec472b28e Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 8 Oct 2024 15:36:57 +0200 Subject: [PATCH 068/102] refs #7986 fix front --- src/pages/Worker/Card/WorkerMoto.vue | 187 ------------- src/pages/Worker/Card/WorkerOperator.vue | 322 +++++++++++++++++++++++ src/router/modules/worker.js | 12 + 3 files changed, 334 insertions(+), 187 deletions(-) delete mode 100644 src/pages/Worker/Card/WorkerMoto.vue create mode 100644 src/pages/Worker/Card/WorkerOperator.vue diff --git a/src/pages/Worker/Card/WorkerMoto.vue b/src/pages/Worker/Card/WorkerMoto.vue deleted file mode 100644 index a53aac270..000000000 --- a/src/pages/Worker/Card/WorkerMoto.vue +++ /dev/null @@ -1,187 +0,0 @@ - - - - - -es: - Model: Modelo - Serial number: Número de serie - Current SIM: SIM actual - Add new device: Añadir nuevo dispositivo - PDA deallocated: PDA desasignada - Remove PDA: Eliminar PDA - Do you want to remove this PDA?: ¿Desea eliminar este PDA? - You can only have one PDA: Solo puedes tener un PDA si no eres autonomo - This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario - diff --git a/src/pages/Worker/Card/WorkerOperator.vue b/src/pages/Worker/Card/WorkerOperator.vue new file mode 100644 index 000000000..13b531a33 --- /dev/null +++ b/src/pages/Worker/Card/WorkerOperator.vue @@ -0,0 +1,322 @@ + + + + + +es: + Model: Modelo + Serial number: Número de serie + Current SIM: SIM actual + Add new device: Añadir nuevo dispositivo + PDA deallocated: PDA desasignada + Remove PDA: Eliminar PDA + Do you want to remove this PDA?: ¿Desea eliminar este PDA? + You can only have one PDA: Solo puedes tener un PDA si no eres autonomo + This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario + diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index 7258881be..d7199a4e6 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -1,3 +1,5 @@ +import { path } from 'chromium'; +import { name } from 'quasar/dist/icon-set/material-icons.umd.prod'; import { RouterView } from 'vue-router'; export default { @@ -27,6 +29,7 @@ export default { 'WorkerBalance', 'WorkerFormation', 'WorkerMedical', + 'WorkerOperator', ], }, children: [ @@ -208,6 +211,15 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerMedical.vue'), }, + { + name: 'WorkerOperator', + path: 'operator', + meta: { + title: 'operator', + icon: 'person', + }, + component: () => import('src/pages/Worker/Card/WorkerOperator.vue'), + }, ], }, ], From cfe95df9e84c5841077bdcb480459a19940dfd7c Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 10 Oct 2024 09:46:07 +0200 Subject: [PATCH 069/102] fix: refs #7524 use dynamic load --- src/pages/Ticket/TicketCreateDialog.vue | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/pages/Ticket/TicketCreateDialog.vue b/src/pages/Ticket/TicketCreateDialog.vue index 1493adc53..4138884bf 100644 --- a/src/pages/Ticket/TicketCreateDialog.vue +++ b/src/pages/Ticket/TicketCreateDialog.vue @@ -27,7 +27,6 @@ const initialFormState = reactive({ warehouseId: user.value.warehouseFk, landed: null, }); -const clientOptions = ref([]); const agenciesOptions = ref([]); const addressesOptions = ref([]); const warehousesOptions = ref([]); @@ -111,12 +110,6 @@ const redirectToTicketList = (_, { id }) => {