From 3f1c0b95faf7d8ff00b10fa93acdbed4047d6b9a Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 10 Jul 2024 15:03:25 +0200 Subject: [PATCH 01/46] 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 02/46] 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 03/46] 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 04/46] 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 05/46] 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 13/46] 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 e827d3aabfb3b03b39e01593bb2af12b4f443016 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 26 Sep 2024 09:47:54 +0200 Subject: [PATCH 14/46] fix: refs #7323 rollback --- src/pages/Worker/WorkerFilter.vue | 5 ----- src/pages/Worker/WorkerList.vue | 20 +------------------- src/pages/Worker/locale/en.yml | 2 +- src/pages/Worker/locale/es.yml | 2 +- 4 files changed, 3 insertions(+), 26 deletions(-) diff --git a/src/pages/Worker/WorkerFilter.vue b/src/pages/Worker/WorkerFilter.vue index 61120f448..dfb5659fe 100644 --- a/src/pages/Worker/WorkerFilter.vue +++ b/src/pages/Worker/WorkerFilter.vue @@ -84,11 +84,6 @@ const getLocale = (label) => { /> - - - - - diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index a5281b651..3ca0d0c24 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -40,7 +40,7 @@ const columns = computed(() => [ { align: 'left', name: 'firstName', - label: t('tableColumns.name'), + label: t('tableColumns.firstName'), isTitle: true, columnFilter: { name: 'firstName', @@ -78,24 +78,6 @@ const columns = computed(() => [ }, format: (row, dashIfEmpty) => dashIfEmpty(row.department), }, - { - align: 'left', - name: 'fi', - label: t('tableColumns.fi'), - isTitle: true, - columnFilter: { - name: 'fi', - }, - }, - { - align: 'left', - name: 'SSN', - label: t('tableColumns.SSN'), - isTitle: true, - columnFilter: { - name: 'SSN', - }, - }, { align: 'left', name: 'email', diff --git a/src/pages/Worker/locale/en.yml b/src/pages/Worker/locale/en.yml index 7081e8fd0..865e86e7e 100644 --- a/src/pages/Worker/locale/en.yml +++ b/src/pages/Worker/locale/en.yml @@ -1,7 +1,7 @@ passwordRequirements: 'The password must have at least { length } length characters, {nAlpha} alphabetic characters, {nUpper} capital letters, {nDigits} digits and {nPunct} symbols (Ex: $%&.)\n' tableColumns: id: ID - name: Name + firstName: First name lastName: Last Name userName: User Name department: Department diff --git a/src/pages/Worker/locale/es.yml b/src/pages/Worker/locale/es.yml index 61694dc83..b3c093ec5 100644 --- a/src/pages/Worker/locale/es.yml +++ b/src/pages/Worker/locale/es.yml @@ -6,7 +6,7 @@ External: Externo passwordRequirements: 'La contraseña debe tener al menos { length } caracteres de longitud, {nAlpha} caracteres alfabéticos, {nUpper} letras mayúsculas, {nDigits} dígitos y {nPunct} símbolos (Ej: $%&.)' tableColumns: id: ID - name: Nombre + firstName: Nombre lastName: Apellidos userName: Nombre de usuario department: Departamento From c2b52473a12da9e856a3baa1889ba6702286c8fe Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 26 Sep 2024 10:04:16 +0200 Subject: [PATCH 15/46] fix: refs #7323 align tables --- src/pages/Monitor/MonitorOrders.vue | 56 +++++++++++++++-------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/src/pages/Monitor/MonitorOrders.vue b/src/pages/Monitor/MonitorOrders.vue index 52d442d0a..853a6edc9 100644 --- a/src/pages/Monitor/MonitorOrders.vue +++ b/src/pages/Monitor/MonitorOrders.vue @@ -139,33 +139,35 @@ const openTab = (id) => :disable-option="{ card: true }" > 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 30/46] 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 31/46] 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 34/46] 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 35/46] 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 36/46] 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 37/46] 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/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 42/46] 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 43/46] 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 44/46] 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( >