From 684215fc4613eb9e24f98775bc713eef916529d5 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 9 Sep 2024 09:59:22 +0200 Subject: [PATCH 01/22] feat(AccountBasicData): add twoFactorFk --- src/pages/Account/Card/AccountBasicData.vue | 9 ++++++++- src/pages/Account/locale/en.yml | 1 + src/pages/Account/locale/es.yml | 1 + test/cypress/integration/outLogin/twoFactor.spec.js | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/pages/Account/Card/AccountBasicData.vue b/src/pages/Account/Card/AccountBasicData.vue index f38299f9e..b223c4bc0 100644 --- a/src/pages/Account/Card/AccountBasicData.vue +++ b/src/pages/Account/Card/AccountBasicData.vue @@ -24,7 +24,7 @@ watch( diff --git a/src/pages/Account/locale/en.yml b/src/pages/Account/locale/en.yml index 3cf861fb2..fe8707eb8 100644 --- a/src/pages/Account/locale/en.yml +++ b/src/pages/Account/locale/en.yml @@ -35,6 +35,7 @@ account: willDeactivated: User will be deactivated activated: User activated! deactivated: User deactivated! + twoFactor: Two factor actions: setPassword: Set password disableAccount: diff --git a/src/pages/Account/locale/es.yml b/src/pages/Account/locale/es.yml index b53a0153c..112ffe9cc 100644 --- a/src/pages/Account/locale/es.yml +++ b/src/pages/Account/locale/es.yml @@ -32,6 +32,7 @@ account: activated: ¡Usuario activado! deactivated: ¡Usuario desactivado! newUser: Nuevo usuario + twoFactor: Doble factor privileges: delegate: Puede delegar privilegios actions: diff --git a/test/cypress/integration/outLogin/twoFactor.spec.js b/test/cypress/integration/outLogin/twoFactor.spec.js index 4d8561f0f..259ddfc0f 100755 --- a/test/cypress/integration/outLogin/twoFactor.spec.js +++ b/test/cypress/integration/outLogin/twoFactor.spec.js @@ -12,7 +12,7 @@ describe('Two Factor', () => { cy.request( 'PATCH', `http://localhost:3000/api/VnUsers/${userId}/update-user?access_token=DEFAULT_TOKEN`, - { twoFactor: 'email' } + { twoFactorFk: 'email' } ); }); From 8be1833f9e7bbf6b9d6bc8163b84eb090ecbb1b8 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 13 Sep 2024 08:49:36 +0200 Subject: [PATCH 02/22] refs #7155 scopeDays --- src/pages/Travel/TravelList.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index c7ad908f9..0fba3a8d3 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -11,6 +11,7 @@ import TravelSummary from './Card/TravelSummary.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import { toDate } from 'src/filters'; import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js'; +import { dateRange } from 'src/filters'; const { viewSummary } = useSummaryDialog(); const router = useRouter(); const { t } = useI18n(); @@ -29,6 +30,18 @@ const cloneTravel = (travelData) => { redirectToCreateView(stringifiedTravelData); }; +const handleScopeDays = (params, days, callback) => { + const [from, to] = dateRange(Date.vnNew()); + if (!days) { + Object.assign(params, { from, to, scopeDays: 1 }); + } else { + params.from = from; + to.setDate(to.getDate() + days); + params.to = to; + } + if (callback) callback(); +}; + const redirectToCreateView = (queryParams) => { router.push({ name: 'TravelCreate', query: { travelData: queryParams } }); }; From 842fb9de5fb1773738cca1d4f236a29171320287 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 13 Sep 2024 12:52:25 +0200 Subject: [PATCH 03/22] refs #7155 scopeDays fix --- src/components/VnTable/VnTable.vue | 1 + src/pages/Travel/TravelList.vue | 43 +++++++++++++++++++----------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 0ed3de261..798213c08 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -301,6 +301,7 @@ defineExpose({ redirect: redirectFn, selected, CrudModelRef, + params, }); function handleOnDataSaved(_) { diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index 0fba3a8d3..a0976e92c 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -12,6 +12,8 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue'; import { toDate } from 'src/filters'; import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js'; import { dateRange } from 'src/filters'; +import VnInputNumber from 'src/components/common/VnInputNumber.vue'; + const { viewSummary } = useSummaryDialog(); const router = useRouter(); const { t } = useI18n(); @@ -25,22 +27,26 @@ const $props = defineProps({ }, }); const entityId = computed(() => $props.id || route.params.id); + +onMounted(async () => { + stateStore.rightDrawer = true; + handleScopeDays(); +}); + const cloneTravel = (travelData) => { const stringifiedTravelData = JSON.stringify(travelData); redirectToCreateView(stringifiedTravelData); }; -const handleScopeDays = (params, days, callback) => { - const [from, to] = dateRange(Date.vnNew()); - if (!days) { - Object.assign(params, { from, to, scopeDays: 1 }); - } else { - params.from = from; - to.setDate(to.getDate() + days); - params.to = to; - } - if (callback) callback(); -}; +function handleScopeDays(days = 7) { + days = +days; + tableRef.value.params.scopeDays = days; + const [landedFrom, landedTo] = dateRange(Date.vnNew()); + landedTo.setDate(landedTo.getDate() + days); + + tableRef.value.params.landedFrom = landedFrom; + tableRef.value.params.landedTo = landedTo; +} const redirectToCreateView = (queryParams) => { router.push({ name: 'TravelCreate', query: { travelData: queryParams } }); @@ -50,10 +56,6 @@ const redirectCreateEntryView = (travelData) => { router.push({ name: 'EntryCreate', query: { travelFk: travelData.id } }); }; -onMounted(async () => { - stateStore.rightDrawer = true; -}); - const columns = computed(() => [ { align: 'left', @@ -254,6 +256,17 @@ const columns = computed(() => [ :class="{ 'is-active': row.isReceived }" /> + From 56f8cbe615de8996b100cab085716c45a62629fd Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 17 Sep 2024 11:37:44 +0200 Subject: [PATCH 04/22] fix: refs #7353 sales person filter and locale --- src/components/ui/VnFilterPanel.vue | 15 +++++++++++++-- src/pages/Monitor/Ticket/MonitorTicketFilter.vue | 11 ++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index cebdc4bbf..12525c7cc 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -6,7 +6,7 @@ import { useRoute } from 'vue-router'; import toDate from 'filters/toDate'; import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue'; -const { t } = useI18n(); +const { t, te } = useI18n(); const $props = defineProps({ modelValue: { type: Object, @@ -200,6 +200,11 @@ function sanitizer(params) { } return params; } + +function getLocale(label) { + const globalLocale = `globals.params.${label}`; + return te(globalLocale) ? t(globalLocale) : t(`params.${label}`); +} diff --git a/src/pages/Worker/WorkerDepartmentTree.vue b/src/pages/Worker/WorkerDepartmentTree.vue index 392539c86..c73cb59b9 100644 --- a/src/pages/Worker/WorkerDepartmentTree.vue +++ b/src/pages/Worker/WorkerDepartmentTree.vue @@ -180,17 +180,18 @@ function handleEvent(type, event, node) { {{ t('Remove') }} - {{ t('Create') }} - + From 9db12a8deee76b83076b09cff24965f611753383 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 18 Sep 2024 13:46:37 +0200 Subject: [PATCH 14/22] fix: wagon reload --- src/pages/Wagon/Type/WagonTypeList.vue | 2 +- src/pages/Wagon/WagonList.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Wagon/Type/WagonTypeList.vue b/src/pages/Wagon/Type/WagonTypeList.vue index 2f0d55fbe..c0943c58e 100644 --- a/src/pages/Wagon/Type/WagonTypeList.vue +++ b/src/pages/Wagon/Type/WagonTypeList.vue @@ -103,7 +103,7 @@ async function remove(row) { url-create="WagonTypes" model="WagonType" :form-initial-data="initialData" - @on-data-saved="window.location.reload()" + @on-data-saved="tableRef.reload()" auto-load > diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue index 938cc4fe2..354c44747 100644 --- a/src/pages/Order/Card/OrderCatalogFilter.vue +++ b/src/pages/Order/Card/OrderCatalogFilter.vue @@ -374,8 +374,10 @@ function addOrder(value, field, params) { /> - diff --git a/src/pages/Ticket/Card/TicketNotes.vue b/src/pages/Ticket/Card/TicketNotes.vue index cfc0c2431..1b9d98a8b 100644 --- a/src/pages/Ticket/Card/TicketNotes.vue +++ b/src/pages/Ticket/Card/TicketNotes.vue @@ -87,17 +87,18 @@ watch( - {{ t('ticketNotes.addNote') }} - + diff --git a/src/pages/Ticket/Card/TicketPackage.vue b/src/pages/Ticket/Card/TicketPackage.vue index a76fce2b6..c071d4f7f 100644 --- a/src/pages/Ticket/Card/TicketPackage.vue +++ b/src/pages/Ticket/Card/TicketPackage.vue @@ -114,17 +114,20 @@ watch( - - - {{ t('package.addPackage') }} - - + + + + {{ t('package.addPackage') }} + + + diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index 9ae91f8ce..fbfd4b28d 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -561,15 +561,16 @@ onMounted(async () => { {{ secondsToHoursMinutes(day.dayData?.workedHours) }} - {{ t('Add time') }} - + From 1550d79160421e7faeb177a9897be7a98a506cb6 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 19 Sep 2024 00:10:28 +0200 Subject: [PATCH 20/22] feat: add shortcut more buttons --- src/components/common/VnDmsList.vue | 9 ++++++++- src/pages/Account/Role/Card/SubRoles.vue | 8 +++++++- src/pages/Claim/Card/ClaimLines.vue | 2 +- src/pages/Claim/Card/ClaimPhoto.vue | 8 +++++++- src/pages/Customer/Card/CustomerFileManagement.vue | 1 + src/pages/Customer/Card/CustomerSamples.vue | 8 +++++++- src/pages/Entry/Card/EntryNotes.vue | 8 +++++++- src/pages/InvoiceIn/Card/InvoiceInBasicData.vue | 1 + src/pages/InvoiceIn/Card/InvoiceInDueDay.vue | 2 +- src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue | 1 + src/pages/InvoiceIn/Card/InvoiceInVat.vue | 1 + src/pages/Item/ItemRequestFilter.vue | 1 + src/pages/Route/Agency/Card/AgencyWorkcenter.vue | 2 +- src/pages/Route/RouteTickets.vue | 2 +- src/pages/Ticket/Card/TicketSale.vue | 3 ++- src/pages/Ticket/Card/TicketService.vue | 8 +++++++- src/pages/Travel/ExtraCommunityFilter.vue | 1 + src/pages/Zone/Delivery/ZoneDeliveryList.vue | 2 +- src/pages/Zone/Upcoming/ZoneUpcomingList.vue | 2 +- 19 files changed, 57 insertions(+), 13 deletions(-) diff --git a/src/components/common/VnDmsList.vue b/src/components/common/VnDmsList.vue index 16e3c641f..52dd6ef79 100644 --- a/src/components/common/VnDmsList.vue +++ b/src/components/common/VnDmsList.vue @@ -400,7 +400,14 @@ defineExpose({ /> - + {{ t('Upload file') }} diff --git a/src/pages/Account/Role/Card/SubRoles.vue b/src/pages/Account/Role/Card/SubRoles.vue index 7a0088bac..d17f96dd8 100644 --- a/src/pages/Account/Role/Card/SubRoles.vue +++ b/src/pages/Account/Role/Card/SubRoles.vue @@ -142,7 +142,13 @@ const redirectToRoleSummary = (id) => - + {{ t('warehouses.add') }} diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue index 77c7dacf1..60c470d22 100644 --- a/src/pages/Claim/Card/ClaimLines.vue +++ b/src/pages/Claim/Card/ClaimLines.vue @@ -317,7 +317,7 @@ async function saveWhenHasChanges() { - + diff --git a/src/pages/Claim/Card/ClaimPhoto.vue b/src/pages/Claim/Card/ClaimPhoto.vue index 21f1be6ed..ec619cc7d 100644 --- a/src/pages/Claim/Card/ClaimPhoto.vue +++ b/src/pages/Claim/Card/ClaimPhoto.vue @@ -246,7 +246,13 @@ function onDrag() {