From be2ef171bdf425c2a0c919f4d48d1a05acf14f65 Mon Sep 17 00:00:00 2001 From: provira Date: Tue, 14 Jan 2025 12:19:47 +0100 Subject: [PATCH] Merge branch 'dev' of https: refs #8322//gitea.verdnatura.es/verdnatura/salix-front into 8322-zone --- CHANGELOG.md | 243 ++++++++++ cypress.config.js | 1 + package.json | 3 +- pnpm-lock.yaml | 23 +- src/boot/qformMixin.js | 2 +- src/components/CreateNewPostcodeForm.vue | 8 +- src/components/CrudModel.vue | 8 +- src/components/FormModel.vue | 4 +- src/components/RegularizeStockForm.vue | 3 +- src/components/VnTable/VnTable.vue | 50 +-- src/components/VnTable/VnTableFilter.vue | 10 +- src/components/__tests__/CrudModel.spec.js | 134 +++++- .../__tests__/EditTableCellValueForm.spec.js | 56 +++ .../__tests__/FilterItemForm.spec.js | 82 ++++ src/components/__tests__/FormModel.spec.js | 149 ++++++ src/components/common/VnBtnSelect.vue | 1 + src/components/common/VnChangePassword.vue | 14 +- src/components/common/VnDateBadge.vue | 14 +- src/components/common/VnDmsList.vue | 2 +- src/components/common/VnInput.vue | 37 +- src/components/common/VnInputDate.vue | 2 - src/components/common/VnInputPassword.vue | 31 ++ src/components/common/VnInputTime.vue | 2 - src/components/common/VnModule.vue | 15 +- src/components/common/VnSection.vue | 21 +- src/components/common/VnSelect.vue | 30 +- src/components/common/VnSelectWorker.vue | 3 +- .../common/__tests__/VnInputDate.spec.js | 72 +++ .../common/__tests__/VnJsonValue.spec.js | 95 ++++ .../common/__tests__/VnNotes.spec.js | 107 +++++ src/components/ui/CardDescriptor.vue | 32 +- src/components/ui/CardSummary.vue | 22 +- src/components/ui/VnFilterPanel.vue | 8 +- src/components/ui/VnLinkPhone.vue | 2 +- src/components/ui/VnMoreOptions.vue | 20 + src/components/ui/VnNotes.vue | 2 +- src/components/ui/VnPaginate.vue | 1 + src/components/ui/VnSearchbar.vue | 91 +++- src/components/ui/VnSms.vue | 1 + .../ui/__tests__/FetchedTags.spec.js | 81 ++++ src/composables/useArrayData.js | 67 +-- src/composables/useHasAccount.js | 6 + src/css/app.scss | 22 +- src/filters/toDateHourMin.js | 4 +- src/filters/toDateHourMinSec.js | 4 +- src/i18n/locale/en.yml | 29 +- src/i18n/locale/es.yml | 33 ++ src/pages/Account/AccountCreate.vue | 5 +- src/pages/Account/AccountLdap.vue | 4 +- src/pages/Account/AccountList.vue | 5 +- src/pages/Account/AccountSamba.vue | 4 +- src/pages/Account/Card/AccountDescriptor.vue | 22 +- .../Account/Card/AccountDescriptorMenu.vue | 31 +- src/pages/Account/Card/AccountMailAlias.vue | 13 +- .../Account/Card/AccountMailForwarding.vue | 21 +- src/pages/Account/Card/AccountSummary.vue | 5 +- .../Account/Role/Card/RoleDescriptor.vue | 2 +- src/pages/Account/locale/en.yml | 14 + src/pages/Account/locale/es.yml | 16 + src/pages/Claim/Card/ClaimCard.vue | 18 +- src/pages/Claim/Card/ClaimDevelopment.vue | 14 +- src/pages/Claim/Card/ClaimLines.vue | 2 +- src/pages/Claim/Card/ClaimSummary.vue | 4 + src/pages/Claim/ClaimFilter.vue | 11 +- src/pages/Claim/ClaimList.vue | 76 ++-- src/pages/Claim/locale/en.yml | 2 + src/pages/Claim/locale/es.yml | 4 +- src/pages/Customer/Card/CustomerBalance.vue | 1 + .../Customer/Card/CustomerConsumption.vue | 37 +- .../Customer/Card/CustomerDescriptor.vue | 32 +- src/pages/Customer/Card/CustomerMandates.vue | 3 +- src/pages/Customer/Card/CustomerSummary.vue | 9 +- src/pages/Customer/CustomerFilter.vue | 4 + .../Defaulter/CustomerDefaulterFilter.vue | 1 + .../components/CustomerAddressEdit.vue | 10 +- src/pages/Customer/locale/en.yml | 21 + src/pages/Customer/locale/es.yml | 21 + .../Department/Card/DepartmentBasicData.vue | 2 +- src/pages/Department/Card/DepartmentCard.vue | 6 +- .../Department/Card/DepartmentDescriptor.vue | 6 +- .../Department/Card/DepartmentSummary.vue | 4 +- src/pages/Entry/Card/EntryDescriptor.vue | 12 +- src/pages/Entry/Card/EntryDescriptorMenu.vue | 22 + src/pages/Entry/Card/EntrySummary.vue | 97 ++-- src/pages/Entry/EntryBuysTableDialog.vue | 83 ++-- src/pages/Entry/EntryFilter.vue | 10 +- src/pages/Entry/EntryLatestBuysFilter.vue | 18 +- src/pages/Entry/EntryList.vue | 5 +- src/pages/Entry/EntryStockBoughtFilter.vue | 2 +- src/pages/Entry/MyEntries.vue | 2 +- src/pages/Entry/locale/en.yml | 2 + src/pages/Entry/locale/es.yml | 2 + .../InvoiceIn/Card/InvoiceInBasicData.vue | 2 +- .../InvoiceIn/Card/InvoiceInDescriptor.vue | 274 +---------- .../Card/InvoiceInDescriptorMenu.vue | 206 +++++++++ .../InvoiceIn/Card/InvoiceInIntrastat.vue | 2 +- src/pages/InvoiceIn/Card/InvoiceInSummary.vue | 72 +-- src/pages/InvoiceIn/InvoiceInCreate.vue | 6 +- src/pages/InvoiceIn/InvoiceInFilter.vue | 19 +- src/pages/InvoiceIn/InvoiceInList.vue | 39 +- src/pages/InvoiceIn/locale/en.yml | 27 +- src/pages/InvoiceIn/locale/es.yml | 25 +- .../InvoiceOut/Card/InvoiceOutSummary.vue | 4 + src/pages/InvoiceOut/InvoiceOutFilter.vue | 1 + src/pages/InvoiceOut/InvoiceOutGlobalForm.vue | 5 + src/pages/InvoiceOut/InvoiceOutList.vue | 12 +- src/pages/InvoiceOut/locale/en.yml | 13 + src/pages/InvoiceOut/locale/es.yml | 13 + src/pages/Item/Card/ItemBasicData.vue | 6 + src/pages/Item/Card/ItemBotanical.vue | 2 + src/pages/Item/Card/ItemDescriptor.vue | 42 +- src/pages/Item/Card/ItemDescriptorImage.vue | 1 - src/pages/Item/Card/ItemDescriptorMenu.vue | 44 ++ src/pages/Item/Card/ItemDiary.vue | 2 +- src/pages/Item/Card/ItemLastEntries.vue | 88 ++-- src/pages/Item/Card/ItemSummary.vue | 8 +- src/pages/Item/Card/ItemTags.vue | 4 +- src/pages/Item/ItemFixedPrice.vue | 34 +- src/pages/Item/ItemList.vue | 142 +++++- src/pages/Item/ItemListFilter.vue | 23 +- src/pages/Item/ItemRequest.vue | 26 +- src/pages/Item/ItemRequestFilter.vue | 3 +- src/pages/Item/locale/en.yml | 4 + src/pages/Item/locale/es.yml | 4 + src/pages/Login/LoginMain.vue | 7 +- src/pages/Login/ResetPassword.vue | 11 +- src/pages/Monitor/Ticket/MonitorTickets.vue | 8 +- .../Order/Card/OrderCatalogItemDialog.vue | 2 +- src/pages/Order/Card/OrderDescriptor.vue | 4 - src/pages/Order/Card/OrderFilter.vue | 3 + src/pages/Order/Card/OrderLines.vue | 4 +- src/pages/Order/Card/OrderSummary.vue | 6 +- src/pages/Route/Agency/locale/es.yml | 1 + .../Route/Card/RouteAutonomousFilter.vue | 4 +- src/pages/Route/Card/RouteDescriptorMenu.vue | 2 +- src/pages/Route/Card/RouteFilter.vue | 2 + src/pages/Route/Card/RouteSummary.vue | 4 + src/pages/Route/Roadmap/RoadmapSummary.vue | 4 + src/pages/Route/RouteAutonomous.vue | 2 + src/pages/Route/locale/en.yml | 14 + src/pages/Route/locale/es.yml | 14 + .../Shelving/Card/ShelvingDescriptorMenu.vue | 7 +- src/pages/Shelving/Card/ShelvingSummary.vue | 13 +- src/pages/Supplier/Card/SupplierBasicData.vue | 3 + .../Card/SupplierConsumptionFilter.vue | 2 + .../Supplier/Card/SupplierDescriptor.vue | 6 +- src/pages/Supplier/Card/SupplierSummary.vue | 3 +- .../Card/BasicData/TicketBasicDataForm.vue | 2 +- src/pages/Ticket/Card/TicketExpedition.vue | 15 +- .../Ticket/Card/TicketPurchaseRequest.vue | 1 + src/pages/Ticket/Card/TicketSale.vue | 7 +- src/pages/Ticket/Card/TicketSummary.vue | 18 +- src/pages/Ticket/TicketFilter.vue | 23 +- src/pages/Ticket/TicketList.vue | 1 + src/pages/Travel/Card/TravelSummary.vue | 5 +- src/pages/Travel/ExtraCommunity.vue | 27 +- src/pages/Travel/ExtraCommunityFilter.vue | 16 +- src/pages/Travel/TravelFilter.vue | 6 +- src/pages/Travel/TravelList.vue | 1 + src/pages/Wagon/WagonList.vue | 5 + src/pages/Worker/Card/WorkerCard.vue | 18 +- src/pages/Worker/Card/WorkerDescriptor.vue | 55 +-- .../Worker/Card/WorkerDescriptorMenu.vue | 65 +++ src/pages/Worker/Card/WorkerPBX.vue | 64 +-- src/pages/Worker/Card/WorkerSummary.vue | 4 + src/pages/Worker/Card/WorkerTimeControl.vue | 35 +- .../Worker/Card/WorkerTimeControlCalendar.vue | 3 +- src/pages/Worker/WorkerCreate.vue | 254 ----------- src/pages/Worker/WorkerDepartment.vue | 11 +- src/pages/Worker/WorkerDepartmentTree.vue | 8 +- src/pages/Worker/WorkerList.vue | 363 ++++++++------- src/pages/Worker/locale/en.yml | 3 + src/pages/Worker/locale/es.yml | 5 +- src/pages/Zone/Card/ZoneBasicData.vue | 13 +- .../Zone/Card/ZoneEventExclusionForm.vue | 2 +- .../Zone/Card/ZoneEventInclusionForm.vue | 10 +- src/pages/Zone/Card/ZoneSummary.vue | 4 + src/pages/Zone/ZoneDeliveryPanel.vue | 3 +- src/pages/Zone/ZoneList.vue | 98 ++-- src/pages/Zone/locale/en.yml | 2 + src/pages/Zone/locale/es.yml | 3 + src/router/modules/claim.js | 223 ++++----- src/router/modules/department.js | 47 -- src/router/modules/index.js | 2 - src/router/modules/worker.js | 425 ++++++++++-------- src/router/routes.js | 2 - src/stores/invoiceOutGlobal.js | 62 +-- src/stores/useArrayDataStore.js | 1 + test/cypress/.gitignore | 1 + .../integration/Order/orderCatalog.spec.js | 71 +-- .../integration/client/clientList.spec.js | 2 +- .../invoiceIn/invoiceInCorrective.spec.js | 4 +- .../invoiceOut/invoiceOutList.spec.js | 46 ++ .../invoiceOut/invoiceOutMakeInvoice.spec.js | 21 + .../invoiceOutNegativeBases.spec.js | 16 + .../invoiceOut/invoiceOutSummary.spec.js | 47 ++ .../invoiceOut/invvoiceOutGlobal.spec.js | 28 ++ .../integration/item/ItemFixedPrice.spec.js | 8 +- .../integration/item/itemBarcodes.spec.js | 25 ++ .../integration/item/itemBotanical.spec.js | 31 ++ .../integration/item/itemLastEntries.spec.js | 20 - .../cypress/integration/item/itemList.spec.js | 34 ++ .../integration/item/itemSummary.spec.js | 24 + test/cypress/integration/item/itemTag.spec.js | 39 ++ test/cypress/integration/item/itemTax.spec.js | 14 + .../cypress/integration/item/itemType.spec.js | 40 ++ .../integration/outLogin/login.spec.js | 1 + .../ticket/ticketExpedition.spec.js | 4 +- .../integration/ticket/ticketList.spec.js | 8 +- .../integration/ticket/ticketRequest.spec.js | 2 +- .../integration/ticket/ticketSale.spec.js | 17 +- .../vnComponent/VnLocation.spec.js | 11 +- .../integration/vnComponent/VnLog.spec.js | 4 +- .../vnComponent/VnSearchBar.spec.js | 9 +- .../integration/wagon/wagonCreate.spec.js | 41 +- .../integration/worker/workerCreate.spec.js | 7 +- .../integration/zone/zoneBasicData.spec.js | 5 +- .../integration/zone/zoneCreate.spec.js | 6 +- test/cypress/support/commands.js | 13 +- test/vitest/helper.js | 4 +- 220 files changed, 3933 insertions(+), 2193 deletions(-) create mode 100644 src/components/__tests__/EditTableCellValueForm.spec.js create mode 100644 src/components/__tests__/FilterItemForm.spec.js create mode 100644 src/components/__tests__/FormModel.spec.js create mode 100644 src/components/common/VnInputPassword.vue create mode 100644 src/components/common/__tests__/VnInputDate.spec.js create mode 100644 src/components/common/__tests__/VnJsonValue.spec.js create mode 100644 src/components/common/__tests__/VnNotes.spec.js create mode 100644 src/components/ui/VnMoreOptions.vue create mode 100644 src/components/ui/__tests__/FetchedTags.spec.js create mode 100644 src/composables/useHasAccount.js create mode 100644 src/pages/Entry/Card/EntryDescriptorMenu.vue create mode 100644 src/pages/InvoiceIn/Card/InvoiceInDescriptorMenu.vue create mode 100644 src/pages/Item/Card/ItemDescriptorMenu.vue create mode 100644 src/pages/Worker/Card/WorkerDescriptorMenu.vue delete mode 100644 src/pages/Worker/WorkerCreate.vue delete mode 100644 src/router/modules/department.js create mode 100644 test/cypress/integration/invoiceOut/invoiceOutList.spec.js create mode 100644 test/cypress/integration/invoiceOut/invoiceOutMakeInvoice.spec.js create mode 100644 test/cypress/integration/invoiceOut/invoiceOutNegativeBases.spec.js create mode 100644 test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js create mode 100644 test/cypress/integration/invoiceOut/invvoiceOutGlobal.spec.js create mode 100644 test/cypress/integration/item/itemBarcodes.spec.js create mode 100644 test/cypress/integration/item/itemBotanical.spec.js delete mode 100644 test/cypress/integration/item/itemLastEntries.spec.js create mode 100644 test/cypress/integration/item/itemList.spec.js create mode 100644 test/cypress/integration/item/itemSummary.spec.js create mode 100644 test/cypress/integration/item/itemTag.spec.js create mode 100644 test/cypress/integration/item/itemTax.spec.js create mode 100644 test/cypress/integration/item/itemType.spec.js diff --git a/CHANGELOG.md b/CHANGELOG.md index e110e4cd6..a7797f810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,246 @@ +# Version 25.00 - 2025-01-14 + +### Added 🆕 + +- chore: refs #7056 move test by:jorgep +- feat: refs #7050 7050 add object check by:Jtubau +- feat: refs #7050 7050 add test to isEmpty() by:Jtubau +- feat: refs #7056 add tests in FormModel by:jorgep +- feat: refs #7056 update route meta information and add FormModel tests by:jorgep +- feat: refs #7074 tests for fns setData(), parseDms() and showFormDialog() (7074-makeFrontTestToVnDmsList) by:Jtubau +- feat: refs #7079 created VnLocation front test by:provira +- feat: refs #7189 add Accept-Language header to axios requests by:jorgep +- feat: refs #7924 add custom inspection checkbox and localization support by:jgallego +- feat: refs #7924 update custom inspection label for clarity in English and Spanish locales by:jgallego +- feat: refs #8004 enhance FetchedTags component with column support and styling updates by:pablone +- feat: refs #8004 hide rightFilter by:pablone +- feat: refs #8246 added new field in list by:Jon +- feat: refs #8266 added descriptor to item name by:jtubau +- feat: refs #8293 add zone filter by:Jtubau +- feat: refs #8293 include zone data in each record by:Jtubau +- fix: refs #8004 more list style issues by:pablone +- fix: refs #8004 some style issues on all list by:pablone +- style: refs #8004 update layout and styling in FetchedTags and ItemList components by:pablone +- style: update CustomerBalance.vue to set label color by:jgallego + +### Changed 📦 + +- perf: order by:alexm +- perf: redirect transition list to card by:alexm +- perf: refs #8201 onDataSaved fetch by:Jon +- perf: revert processData by:alexm +- perf: simplify if by:alexm +- perf: simplify if (perf_redirectTransition) by:alexm +- refactor: item fixedPrice by:Jon +- refactor: refs #7050 refactorize by:jtubau +- refactor: refs #7050 removed blank spaces by:jtubau +- refactor: refs #7052 move EditTableCellValueForm tests to a new location and enhance test coverage by:jgallego +- refactor: refs #7052 remove unnecessary console logs from EditTableCellValueForm tests by:jgallego +- refactor: refs #7074 move dms constant to global scope by:Jtubau +- refactor: refs #7079 removed useless code by:provira +- refactor: refs #7924 simplify custom inspection icon rendering in ExtraCommunity.vue by:jgallego +- refactor: refs #8004 remove console log from CardSummary component on mount by:pablone +- refactor: refs #8004 remove consoleLogs by:pablone +- refactor: refs #8004 remove unused stateStore import in InvoiceInList.vue by:pablone +- refactor: refs #8004 remove unused travelFilterRef and chip definition in TravelList.vue by:pablone +- refactor: refs #8004 replace VnSelect with VnSelectWorker in CustomerList component by:pablone +- refactor: refs #8201 added onMounted to stablish the value to show icons by:Jon +- refactor: refs #8201 deleted condition by:Jon +- refactor: refs #8201 deleted log by:Jon +- refactor: refs #8201 deleted logs by:Jon +- refactor: refs #8266 8266 change expedition item name by:Jtubau +- refactor: refs #8266 change expedition label by:Jtubau +- refactor: refs #8293 remove redundant attributes by:Jtubau +- refactor: refs #8320 changed folder names from "specs" to "**tests**" by:provira +- refactor: refs #8320 moved front tests to their respective sections by:provira +- refactor: refs #8813 removed unused class property by:provira + +### Fixed 🛠️ + +- fix: discount class by:PAU ROVIRA ROSALENY +- fix: duplicate transalation after test to dev by:alexm +- fix: fix translations by:carlossa +- fix: redirect to sales when confirming lines by:Jon +- fix: refs #7050 delete import added by mistake by:Jtubau +- fix: refs #7133 handleSalesModelValue function to handle empty input by:jorgep +- fix: refs #7189 update user language on sessionStorage by:jorgep +- fix: refs #7935 remove unused 'companyFk' column from InvoiceInList component by:jorgep +- fix: refs #8004 more list style issues by:pablone +- fix: refs #8004 some style issues on all list by:pablone +- fix: refs #8004 update label for daysOnward in TravelFilter component and add translations by:pablone +- fix: refs #8004 vnTable card with and add permanent labels by:pablone +- fix: refs #8201 added onDataSaved emi to refetch when cahnges are made by:Jon +- fix: refs #8201 use arrayData to fix the error by:Jon +- fix: refs #8314 space between label and value by:jtubau +- fix: refs #8813 fixed ClaimLines format by:provira +- fix: update button sizes in ExtraCommunity.vue for better visibility by:jgallego +- perf: revert processData by:alexm +- refactor: item fixedPrice by:Jon + +# Version 24.52 - 2024-01-07 + +### Added 🆕 + +- chore: refs #8197 remove console log by:alexm +- chore: refs #8197 replace name by:alexm +- chore: refs #8197 unnecessary file by:alexm +- feat: #8110 apply mixin in quasar components by:Javier Segarra +- feat(Account & AccountRole): refs #8197 add VnCardMain by:alexm +- feat: addDptoLink by:Jtubau +- feat: added restore ticket function in ticket descriptor menu by:Jon +- feat: add support service wip by:jorgep +- feat: focus menu searchbar by:jorgep +- feat: make additional data object by:jorgep +- feat: message to grant access by:jorgep +- feat: refs #6583 add default param by:jorgep +- feat: refs #6583 add destination opt filter by:jorgep +- feat: refs #6583 add icon by:jorgep +- feat: refs #6583 add locale by:jorgep +- feat: refs #7072 added test to computed fn total by:Jtubau +- feat: refs #7235 update invoice out global form to fetch config based on serial type by:jgallego +- feat: refs #7301 add exclude inventory supplier from list by:pablone +- feat: refs #7301 enhance VnDateBadge styling and improve ItemLastEntries component by:pablone +- feat: refs #7882 Added distribution point by:guillermo +- feat: refs #7882 Added longitude & latitude by:guillermo +- feat: refs #7936 add autocomplete on tab fn by:jorgep +- feat: refs #7936 add company filter by:jorgep +- feat: refs #7936 add currency check before fetching by:jorgep +- feat: refs #7936 add dueDated field by:jorgep +- feat: refs #7936 add number validation to VnInputNumber & new daysAgo filter in InvoiceInFilter by:jorgep +- feat: refs #7936 add optionCaption by:jorgep +- feat: refs #7936 add row click navigation to InvoiceInSerial by:jorgep +- feat: refs #7936 add unit tests by:jorgep +- feat: refs #7936 add useAccountShortToStandard composable by:jorgep +- feat: refs #7936 calculate exchange & update taxable base by:jorgep +- feat: refs #7936 enhance downloadFile function to support opening in a new tab by:jorgep +- feat: refs #7936 enhance getTotal fn & add unit tests by:jorgep +- feat: refs #7936 enhance vn-select by:jorgep +- feat: refs #7936 improve optionLabel logic in InvoiceInVat component for better handling of numeric values by:jorgep +- feat: refs #7936 limit decimal places by:jorgep +- feat: refs #7936 make fields required by:jorgep +- feat: refs #7936 show country code & isVies fields by:jorgep +- feat: refs #7936 show id & value by:jorgep +- feat: refs #7936 simplify optionLabel wip by:jorgep +- feat: refs #7936 update 'isVies' label to use global translation key by:jorgep +- feat: refs #7936 update option labels in InvoiceIn components for better clarity by:jorgep +- feat: refs #7936 use default invoice data by:jorgep +- feat: refs #8001 change request by:robert +- feat: refs #8001 ticketExpeditionGrafana by:robert +- feat: refs #8194 created VnSelectWorker component and use it in Lilium by:Jon +- feat: refs #8197 better leftMenu and VnCardMain improvements by:alexm +- feat: refs #8197 default leftMenu by:alexm +- feat: refs #8197 default sectionName by:alexm +- feat: refs #8197 keepData in VnSection by:alexm +- feat: refs #8197 vnTableFilter by:alexm +- feat: refs #8197 working rightMenu by:alexm +- feat: remove re-fetch when add element by:Javier Segarra +- feat: remove search after category by:Javier Segarra +- feat: requested changes in item module by:Jon +- feat: update quantity by:Javier Segarra +- feat(VnPaginate): refs #8197 hold data when change to Card by:alexm + +### Changed 📦 + +- perf: #6896 REMOVE COMMENTS by:Javier Segarra +- perf: qFormMixin by:Javier Segarra +- perf: qFormMixin improvement by:Javier Segarra +- perf: refs #8194 select worker component by:Jon +- perf: refs #8197 perf by:alexm +- perf: remove comments by:Javier Segarra +- perf: remove unused variables (origin/warmfix_noUsedVars) by:Javier Segarra +- refactor: added again search emit by:Jon +- refactor: add useCau composable by:jorgep +- refactor: deleted log by:Jon +- refactor: deleted onUnmounted code by:Jon +- refactor: deleted useless hidden tag by:Jon +- refactor: deleted warnings and corrected itemTag by:Jon +- refactor: drop logic by:jorgep +- refactor: ignore params when searching by id on searchbar (origin/VnSearchbar-SearchRemoveParams) by:Jon +- refactor: log error by:Jon +- refactor: refs #7936 locale by:jorgep +- refactor: refs #7936 simplify getTotal fn by:jorgep +- refactor: refs #7936 update label capitalization and replace invoice type options by:jorgep +- refactor: refs #8194 deleted unnecessary label by:Jon +- refactor: refs #8194 modified select worker template by:Jon +- refactor: refs #8194 modified select worker to allow no one filter from monitor ticket by:Jon +- refactor: refs #8194 moved translation to the correct place by:Jon +- refactor: refs #8194 requested changes by:Jon +- refactor: refs #8194 structure changes in component and related files by:Jon +- refactor: refs #8197 adapt AccountAcls to VnCardMain by:alexm +- refactor: refs #8197 adapt AccountAlias by:alexm +- refactor: refs #8197 adapt Ticket to VnCardMain by:alexm +- refactor: refs #8197 backward compatible (8197-VnCardMain_backwardCompatibility) by:alexm +- refactor: refs #8197 rename VnSectionMain to VnModule and VnCardMain to VnSection by:alexm +- refactor: refs #8288 changed invoice out spanish translation by:provira +- refactor: use locale keys by:jorgep +- refactor: use teleport to avoid qdrawer overlapping by:Jon +- refactor: use VnSelectWorker by:Jon + +### Fixed 🛠️ + +- fix: account by:carlossa +- fix: account create by:carlossa +- fix: accountList create by:carlossa +- fix(AccountList): use $refs by:alexm +- fix: add data-key by:alexm +- fix: addLocales by:Jtubau +- fix: dated field by:Jon +- fix: e2e by:jorgep +- fix: fix department filter by:carlossa +- fix: fixed translations by:Javier Segarra +- fix: fixed translations by:provira +- fix: get total from api by:Javier Segarra +- fix: handle non-object options by:jorgep +- fix: monitorPayMethodFilter by:carlossa +- fix: orderBy priority by:Javier Segarra +- fix: prevent null by:jorgep +- fix: redirection vnTable VnTableFilter by:alexm +- fix: refs #6389 fix filter trad by:carlossa +- fix: refs #6389 fix front, filters, itp by:carlossa +- fix: refs #6389 front add packing filter by:carlossa +- fix: refs #6389 front by:carlossa +- fix: refs #6389 front filters by:carlossa +- fix: refs #6389 ipt by:carlossa +- fix: refs #6389 packing by:carlossa +- fix: refs #6583 update checkbox for filtering by destination in TicketAdvanceFilter by:jorgep +- fix: refs #7031 add test e2e by:carlossa +- fix: refs #7031 fix zoneTest by:carlossa +- fix: refs #7301 unnecessary console logs from ItemLastEntries.vue by:pablone +- fix: refs #7936 changes by:jorgep +- fix: refs #7936 decimal places & locale by:jorgep +- fix: refs #7936 descriptor & dueday by:jorgep +- fix: refs #7936 exclude disabled els on tab by:jorgep +- fix: refs #7936 format tax calculation to two decimal places by:jorgep +- fix: refs #7936 improve error handling by:jorgep +- fix: refs #7936 redirection by:jorgep +- fix: refs #7936 rollback by:jorgep +- fix: refs #7936 serial by:jorgep +- fix: refs #7936 tabulation wip by:jorgep +- fix: refs #7936 test by:jorgep +- fix: refs #8114 clean by:carlossa +- fix: refs #8114 fix agencyList by:carlossa +- fix: refs #8114 fix lifeCycle hooks by:carlossa +- fix: refs #8114 fix pr by:carlossa +- fix: refs #8114 fix removeAddress by:carlossa +- fix: refs #8114 orderList by:carlossa +- fix: refs #8114 remove logs by:carlossa +- fix: refs #8197 mapKey (origin/8197-perf_vnTableInside, 8197-perf_vnTableInside) by:alexm +- fix: refs #8197 redirection (8197-perf_redirection) by:alexm +- fix: refs #8197 staticParams and redirect by:alexm +- fix: refs #8197 vnPaginate onFetch emit by:alexm +- fix: refs #8197 vnPaginate when change :id by:alexm +- fix: refs #8197 vnTableFilter in vnTable by:alexm +- fix: refs #8315 ticketBoxing test by:alexm +- fix: remove url by:carlossa +- fix: rollback by:jorgep +- fix: test by:jorgep +- fix(VnDmsList): refs #8197 add mapKey by:alexm +- revert: refs #8197 arrayData changes by:alexm +- test: refs #8197 fix e2e by:alexm +- test: refs #8315 fix claimDevelopment fixtures by:alexm +- test: refs #8315 fix clientList by:alexm +- test: refs #8315 fix VnSelect in e2e by:alexm + # Version 24.50 - 2024-12-10 ### Added 🆕 diff --git a/cypress.config.js b/cypress.config.js index e9aeb547a..1100b59b1 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -11,6 +11,7 @@ module.exports = defineConfig({ screenshotsFolder: 'test/cypress/screenshots', supportFile: 'test/cypress/support/index.js', videosFolder: 'test/cypress/videos', + downloadsFolder: 'test/cypress/downloads', video: false, specPattern: 'test/cypress/integration/**/*.spec.js', experimentalRunAllSpecs: true, diff --git a/package.json b/package.json index b5e62af11..9d14e8727 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "25.02.0", + "version": "25.04.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", @@ -25,6 +25,7 @@ "axios": "^1.4.0", "chromium": "^3.0.3", "croppie": "^2.6.5", + "moment": "^2.30.1", "pinia": "^2.1.3", "quasar": "^2.14.5", "validator": "^13.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 83dfa0469..7bf640347 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ dependencies: croppie: specifier: ^2.6.5 version: 2.6.5 + moment: + specifier: ^2.30.1 + version: 2.30.1 pinia: specifier: ^2.1.3 version: 2.1.7(typescript@5.5.4)(vue@3.4.19) @@ -832,8 +835,8 @@ packages: vue-i18n: optional: true dependencies: - '@intlify/message-compiler': 10.0.0 - '@intlify/shared': 10.0.0 + '@intlify/message-compiler': 11.0.0-rc.1 + '@intlify/shared': 11.0.0-rc.1 jsonc-eslint-parser: 1.4.1 source-map: 0.6.1 vue-i18n: 9.9.1(vue@3.4.19) @@ -847,11 +850,11 @@ packages: '@intlify/message-compiler': 9.9.1 '@intlify/shared': 9.9.1 - /@intlify/message-compiler@10.0.0: - resolution: {integrity: sha512-OcaWc63NC/9p1cMdgoNKBj4d61BH8sUW1Hfs6YijTd9656ZR4rNqXAlRnBrfS5ABq0vjQjpa8VnyvH9hK49yBw==} + /@intlify/message-compiler@11.0.0-rc.1: + resolution: {integrity: sha512-TGw2uBfuTFTegZf/BHtUQBEKxl7Q/dVGLoqRIdw8lFsp9g/53sYn5iD+0HxIzdYjbWL6BTJMXCPUHp9PxDTRPw==} engines: {node: '>= 16'} dependencies: - '@intlify/shared': 10.0.0 + '@intlify/shared': 11.0.0-rc.1 source-map-js: 1.0.2 dev: true @@ -862,8 +865,8 @@ packages: '@intlify/shared': 9.9.1 source-map-js: 1.0.2 - /@intlify/shared@10.0.0: - resolution: {integrity: sha512-6ngLfI7DOTew2dcF9WMJx+NnMWghMBhIiHbGg+wRvngpzD5KZJZiJVuzMsUQE1a5YebEmtpTEfUrDp/NqVGdiw==} + /@intlify/shared@11.0.0-rc.1: + resolution: {integrity: sha512-8tR1xe7ZEbkabTuE/tNhzpolygUn9OaYp9yuYAF4MgDNZg06C3Qny80bes2/e9/Wm3aVkPUlCw6WgU7mQd0yEg==} engines: {node: '>= 16'} dev: true @@ -887,7 +890,7 @@ packages: optional: true dependencies: '@intlify/bundle-utils': 4.0.0(vue-i18n@9.9.1) - '@intlify/shared': 10.0.0 + '@intlify/shared': 11.0.0-rc.1 '@rollup/pluginutils': 4.2.1 '@vue/compiler-sfc': 3.4.19 debug: 4.3.4(supports-color@8.1.1) @@ -4960,6 +4963,10 @@ packages: uuid: 8.3.2 dev: true + /moment@2.30.1: + resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} + dev: false + /ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} diff --git a/src/boot/qformMixin.js b/src/boot/qformMixin.js index 187ca6dbc..97d80c670 100644 --- a/src/boot/qformMixin.js +++ b/src/boot/qformMixin.js @@ -31,7 +31,7 @@ export default { console.error(error); } form.addEventListener('keyup', function (evt) { - if (evt.key === 'Enter') { + if (evt.key === 'Enter' && !that.$attrs['prevent-submit']) { const input = evt.target; if (input.type == 'textarea' && evt.shiftKey) { evt.preventDefault(); diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index c656fcb2f..39ebfe540 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -55,13 +55,6 @@ async function setCountry(countryFk, data) { } // Province - -async function handleProvinces(data) { - provincesOptions.value = data; - if (postcodeFormData.countryFk) { - await fetchTowns(); - } -} async function setProvince(id, data) { if (data.provinceFk === id) return; const newProvince = provincesOptions.value.find((province) => province.id == id); @@ -69,6 +62,7 @@ async function setProvince(id, data) { postcodeFormData.provinceFk = id; await fetchTowns(); } + async function onProvinceCreated(data) { postcodeFormData.provinceFk = data.id; } diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 7fdb54bc4..940b72ff0 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -127,7 +127,7 @@ function resetData(data) { originalData.value = JSON.parse(JSON.stringify(data)); formData.value = JSON.parse(JSON.stringify(data)); - if (watchChanges.value) watchChanges.value(); //destoy watcher + if (watchChanges.value) watchChanges.value(); //destroy watcher watchChanges.value = watch(formData, () => (hasChanges.value = true), { deep: true }); } @@ -270,10 +270,8 @@ function getChanges() { function isEmpty(obj) { if (obj == null) return true; - if (obj === undefined) return true; - if (Object.keys(obj).length === 0) return true; - - if (obj.length > 0) return false; + if (Array.isArray(obj)) return !obj.length; + return !Object.keys(obj).length; } async function reload(params) { diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index c569f2553..2e580257c 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -1,7 +1,7 @@ + diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index b4b246618..4147f8976 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -1,13 +1,11 @@ diff --git a/src/components/common/VnSection.vue b/src/components/common/VnSection.vue index e69e586b5..edd8d3dfa 100644 --- a/src/components/common/VnSection.vue +++ b/src/components/common/VnSection.vue @@ -4,11 +4,12 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue'; import VnTableFilter from '../VnTable/VnTableFilter.vue'; import { onBeforeMount, computed } from 'vue'; import { useArrayData } from 'src/composables/useArrayData'; +import { useRoute } from 'vue-router'; const $props = defineProps({ section: { type: String, - required: true, + default: null, }, dataKey: { type: String, @@ -38,14 +39,28 @@ const $props = defineProps({ type: Boolean, default: true, }, + keepData: { + type: Boolean, + default: true, + }, }); -const sectionValue = computed(() => $props.section ?? $props.dataKey); +const route = useRoute(); let arrayData; +const sectionValue = computed(() => $props.section ?? $props.dataKey); +const isMainSection = computed(() => { + const isSame = sectionValue.value == route.name; + if (!isSame && arrayData) { + arrayData.reset(['userParams', 'userFilter']); + } + return isSame; +}); + onBeforeMount(() => { if ($props.dataKey) arrayData = useArrayData($props.dataKey, { searchUrl: 'table', + keepData: $props.keepData, ...$props.arrayDataProps, navigate: $props.redirect, }); @@ -74,6 +89,6 @@ onBeforeMount(() => { - + diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 8aa725b4a..ee94a1d81 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -113,8 +113,15 @@ const $props = defineProps({ }); const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])]; -const { optionLabel, optionValue, optionFilter, optionFilterValue, options, modelValue } = - toRefs($props); +const { + optionLabel, + optionValue, + optionCaption, + optionFilter, + optionFilterValue, + options, + modelValue, +} = toRefs($props); const myOptions = ref([]); const myOptionsOriginal = ref([]); const vnSelectRef = ref(); @@ -166,7 +173,11 @@ onMounted(() => { const arrayDataKey = $props.dataKey ?? ($props.url?.length > 0 ? $props.url : $attrs.name ?? $attrs.label); -const arrayData = useArrayData(arrayDataKey, { url: $props.url, searchUrl: false }); +const arrayData = useArrayData(arrayDataKey, { + url: $props.url, + searchUrl: false, + mapKey: $attrs['map-key'], +}); function findKeyInOptions() { if (!$props.options) return; @@ -194,10 +205,10 @@ function filter(val, options) { } if (!row) return; - const id = row[$props.optionValue]; + const id = String(row[$props.optionValue]); const optionLabel = String(row[$props.optionLabel]).toLowerCase(); - return id == search || optionLabel.includes(search); + return id.includes(search) || optionLabel.includes(search); }); } @@ -317,6 +328,11 @@ function handleKeyDown(event) { } } } + +function getCaption(opt) { + if (optionCaption.value === false) return; + return opt[optionCaption.value] || opt[optionValue.value]; +}