Compare commits

...

121 Commits

Author SHA1 Message Date
Alex Moreno a9e3cad8ba refactor: streamline image build process in run.sh
gitea/salix-front/pipeline/head This commit looks good Details
2025-05-12 12:39:08 +02:00
Jorge Penadés 93e29fdde6 Merge pull request 'fix: refs #7967 show userErr & useNotify composable' (!1725) from 7939-showUserErr into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1725
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2025-05-12 10:35:45 +00:00
Jorge Penadés 22747995cb Merge branch 'dev' of https: refs #7939//gitea.verdnatura.es/verdnatura/salix-front into 7939-showUserErr
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-12 10:42:00 +02:00
Jon Elias 33a6e5ebd3 Merge pull request '#8180: Notify if the closing zone has tickets for that day' (!1746) from 8180-CloseZoneWithTickets into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1746
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2025-05-12 08:19:22 +00:00
Jon Elias 86a3192c17 Merge branch '8180-CloseZoneWithTickets' of https://gitea.verdnatura.es/verdnatura/salix-front into 8180-CloseZoneWithTickets
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-12 10:13:16 +02:00
Jon Elias 85074b3ca4 fix: refs #8180 test isolation due to notifications 2025-05-12 10:13:14 +02:00
Jon Elias de4e5ce669 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8180-CloseZoneWithTickets 2025-05-12 09:49:08 +02:00
Jon Elias 90fb1485b0 Merge branch 'dev' into 8180-CloseZoneWithTickets
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-12 07:38:30 +00:00
Alex Moreno 5b5ce033f0 fix: skip RoadMap test suite for temporary exclusion
gitea/salix-front/pipeline/head This commit looks good Details
2025-05-12 09:36:01 +02:00
Jon Elias e470fa70e2 Merge branch 'dev' into 8180-CloseZoneWithTickets
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-12 07:06:02 +00:00
Alex Moreno 8b61d1a4c7 Merge pull request 'feat(ExtraCommunity): refs #8105 add data-cy attribute for testing and create integration tests' (!1786) from 8105-travels_bySupplier into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1786
Reviewed-by: Jon Elias <jon@verdnatura.es>
2025-05-09 08:01:24 +00:00
Alex Moreno 8f3621efc6 Merge branch 'dev' into 8105-travels_bySupplier
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-09 08:00:05 +00:00
Jon Elias 50f1b5b326 Merge pull request 'fix: fixed label and increased test coverage' (!1777) from Fix-VnBankDetail into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1777
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2025-05-09 07:59:48 +00:00
Jon Elias 7cacdbdf94 Merge branch 'dev' into Fix-VnBankDetail
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-09 07:54:25 +00:00
Alex Moreno 7afd6b3dcd Merge branch 'dev' into 8105-travels_bySupplier
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-09 06:39:10 +00:00
Alex Moreno 51402f9f3f test: enable OrderCatalog tests by removing skip
gitea/salix-front/pipeline/head This commit looks good Details
2025-05-09 08:09:52 +02:00
Alex Moreno a4c4d987c7 Merge pull request 'test: refs #8862 add Cypress isolation tests for various ticket and zone components' (!1698) from 8862-testIsolationFalse into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1698
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2025-05-09 06:05:14 +00:00
Alex Moreno b1bde7be97 fix: refs #8862 skip OrderCatalog tests to prevent isolation issues
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-09 07:18:01 +02:00
Alex Moreno 5c927cec4b Merge branch 'dev' into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit Details
2025-05-09 05:08:19 +00:00
Pau Rovira ab0d2e60b7 Merge pull request 'feat: #8406 upgraded CrudModel' (!1627) from 8406-crudModelUpdate into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1627
Reviewed-by: Jorge Penadés <jorgep@verdnatura.es>
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2025-05-08 14:44:15 +00:00
Pau Rovira 0502abfca5 Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-08 14:17:54 +00:00
Alex Moreno b1ef9b1bd3 Merge pull request 'feat: refs #7248 modify VnNotes' (!1336) from 7248-tablesObservation into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1336
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2025-05-08 13:04:24 +00:00
Benjamin Esteve 68d1f3cb18 Merge branch 'dev' into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-08 12:58:01 +00:00
Alex Moreno debae747db Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-08 10:53:36 +00:00
Alex Moreno 671f0c1e67 Merge branch 'dev' into 7248-tablesObservation
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-08 10:21:53 +00:00
Alex Moreno beeeedbb84 feat(ExtraCommunity): refs #8105 add data-cy attribute for testing and create integration tests
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-08 10:21:32 +02:00
Benjamin Esteve 34fc2d403d Merge branch 'dev' into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-08 07:07:24 +00:00
Jon Elias d3b6223473 perf: refs #8180 simplify ticket checking by combining hasTickets logic
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-07 17:24:14 +02:00
Jon Elias b68f4331b8 Merge branch '8180-CloseZoneWithTickets' of https://gitea.verdnatura.es/verdnatura/salix-front into 8180-CloseZoneWithTickets
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-07 16:53:25 +02:00
Jon Elias 9d500a0655 refactor: refs #8180 get data from front instead of back 2025-05-07 16:53:23 +02:00
Jon Elias 20aea5b7df Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8180-CloseZoneWithTickets 2025-05-07 16:15:44 +02:00
Alex Moreno 5bb452186e fix: refs #7248 update user filter property name in VehicleNotes component
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-07 15:04:02 +02:00
Benjamin Esteve 148e49b153 Merge branch 'dev' into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-05-07 11:32:03 +00:00
Alex Moreno 7dd6cc71e2 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7248-tablesObservation 2025-05-07 13:29:54 +02:00
Benjamin Esteve cfe64d644e Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-07 11:35:54 +02:00
Benjamin Esteve 91c627324a Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-07 10:23:56 +02:00
Benjamin Esteve 5cad6103a5 feat: refs #8862 enable test isolation for multiple spec files
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-07 10:13:03 +02:00
Alex Moreno d5fc3423d6 Merge branch '7248-tablesObservation' of https://gitea.verdnatura.es/verdnatura/salix-front into 7248-tablesObservation
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-07 09:56:04 +02:00
Alex Moreno e064f9e706 fix: refs #7248 rename workerFk to userFk in CustomerDefaulter component 2025-05-07 09:55:48 +02:00
Alex Moreno cb47858f65 Merge branch 'dev' into 7248-tablesObservation
gitea/salix-front/pipeline/pr-dev Build queued... Details
2025-05-07 07:49:56 +00:00
Alex Moreno 686edc0b51 Revert "fix: refs #7248 update exprBuilder for workerFk and calculate total amount in CustomerBalanceDueTotal"
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit Details
This reverts commit 5f9d498700.
2025-05-07 09:49:17 +02:00
Alex Moreno 876f40b4a3 Merge branch 'dev' into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-07 05:36:55 +00:00
Benjamin Esteve 53cea184cc Merge branch 'dev' into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-06 10:40:01 +00:00
Jon Elias 7f7c86def2 Merge branch 'dev' into Fix-VnBankDetail
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-06 09:34:21 +00:00
Jon Elias 5e17117db3 fix: fixed label and increased test coverage
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-05-06 11:24:45 +02:00
Alex Moreno 494369c8f7 Merge branch 'dev' of https: refs #8862//gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-06 09:38:43 +02:00
Jon Elias de93eba293 Merge branch 'dev' into 8180-CloseZoneWithTickets
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-05 14:40:04 +00:00
Jon Elias 48b5cfe69b Merge branch 'dev' into 8180-CloseZoneWithTickets
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-05 11:35:54 +00:00
Pau Rovira b213ffca3e Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-05-05 05:54:10 +00:00
Alex Moreno 334d39eeef Merge branch 'dev' into 7248-tablesObservation
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-30 12:21:21 +00:00
Jorge Penadés 4e650378a4 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7939-showUserErr
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-30 11:03:32 +02:00
Alex Moreno 5f9d498700 fix: refs #7248 update exprBuilder for workerFk and calculate total amount in CustomerBalanceDueTotal
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-30 10:53:04 +02:00
Jorge Penadés 47f8abe013 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7939-showUserErr
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-30 10:15:56 +02:00
Alex Moreno 98c73f8462 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7248-tablesObservation 2025-04-30 09:38:45 +02:00
Jorge Penadés be88029197 Merge branch '7939-showUserErr' of https://gitea.verdnatura.es/verdnatura/salix-front into 7939-showUserErr
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-29 17:14:37 +02:00
Jorge Penadés 6ab54908ed Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7939-showUserErr 2025-04-29 17:14:29 +02:00
Pau Rovira 0efa72e4a8 Merge branch '8406-crudModelUpdate' of https://gitea.verdnatura.es/verdnatura/salix-front into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-29 10:25:00 +02:00
Pau Rovira 81d50bb118 fix: refs #8406 removed duplicated filter 2025-04-29 10:24:58 +02:00
Alex Moreno 160ff54a66 Merge branch 'dev' of https: refs #8862//gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-29 09:04:28 +02:00
Pau Rovira 8a2e301bb7 Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-29 06:16:24 +00:00
Pau Rovira 004890a3a9 Merge branch '8406-crudModelUpdate' of https://gitea.verdnatura.es/verdnatura/salix-front into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev Build queued... Details
2025-04-29 08:14:50 +02:00
Pau Rovira 7424d7eb9a fix: refs #8406 remove unused code 2025-04-29 08:14:42 +02:00
Alex Moreno 8e33c79446 Merge branch 'dev' into 7939-showUserErr 2025-04-28 09:49:58 +00:00
Pau Rovira 4cc46e5181 Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-28 07:07:45 +00:00
Jorge Penadés c432709a04 feat: refs #7939 add VnSelectExpense
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-25 17:20:45 +02:00
Jorge Penadés dd218361f0 fix: refs #7939 add orderBy property to columns configuration in EntryPreAccount.vue
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-25 14:17:46 +02:00
Jorge Penadés 3ceabd5831 refactor: refs #7939 streamline logout tests and improve session expiration error handling
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-25 13:28:32 +02:00
Jorge Penadés 8dd67efeb9 fix: refs #7939 normalize login route check to be case insensitive
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-25 13:16:50 +02:00
Pau Rovira bb59be3023 Merge branch 'dev' of https: refs #8406//gitea.verdnatura.es/verdnatura/salix-front into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-25 13:16:49 +02:00
Pau Rovira 971194c0f6 Merge branch 'dev' of https: refs #8406//gitea.verdnatura.es/verdnatura/salix-front into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev Build queued... Details
2025-04-25 13:15:29 +02:00
Jorge Penadés a8222788ca Merge branch '7939-showUserErr' of https://gitea.verdnatura.es/verdnatura/salix-front into 7939-showUserErr
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-25 12:51:33 +02:00
Jorge Penadés c31218e4fe Merge branch 'dev' of https: refs #7939//gitea.verdnatura.es/verdnatura/salix-front into 7939-showUserErr 2025-04-25 12:51:30 +02:00
Alex Moreno 8e10d9d09d Merge branch 'dev' into 7939-showUserErr 2025-04-25 07:56:29 +00:00
Jon Elias b85407d8c2 feat: refs #8180 not allow to close a zone if there are tickets for that day
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-24 14:24:20 +02:00
Alex Moreno 1ceb6b1aef refactor: refs #7248 remove unused state management and simplify body structure in ClaimNotes component
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-24 12:51:23 +02:00
Alex Moreno 4f12a31b1a Merge branch 'dev' into 7248-tablesObservation
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-24 10:38:13 +00:00
Alex Moreno 9c6ffc76cb Merge branch 'dev' of https: refs #7248//gitea.verdnatura.es/verdnatura/salix-front into 7248-tablesObservation
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-24 09:39:08 +02:00
Alex Moreno 442f3dbd48 Merge branch 'dev' of https: refs #7248//gitea.verdnatura.es/verdnatura/salix-front into 7248-tablesObservation
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit Details
2025-04-24 09:38:31 +02:00
Pau Rovira 092a29d555 Merge branch '8406-crudModelUpdate' of https://gitea.verdnatura.es/verdnatura/salix-front into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-23 13:53:37 +02:00
Pau Rovira 8e08f65173 feat: refs #8406 add empty row on loading InvoiceInVat 2025-04-23 13:53:34 +02:00
Pau Rovira e4003c6116 Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev Something is wrong with the build of this commit Details
2025-04-23 10:09:52 +00:00
Pau Rovira aedcda4799 refactor: refs #8406 simplified code
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-23 11:19:55 +02:00
Pau Rovira 10d8db6de3 feat: refs #8406 make tabulation to ignore selection checkbox
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-23 08:58:23 +02:00
Pau Rovira d36be31927 Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-23 05:20:47 +00:00
Jorge Penadés 753fa8489c Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7939-showUserErr
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-22 16:50:36 +02:00
Jorge Penadés a8d39a9b96 feat(login): refs #7939 add session expiration handling and improve error notifications
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-22 16:48:13 +02:00
Pau Rovira 5c6fc94dd6 Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-22 11:43:13 +00:00
Jorge Penadés 81308230ec Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7939-showUserErr
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-22 13:10:06 +02:00
Pau Rovira 35914be54a Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-17 11:31:28 +00:00
Jorge Penadés 5b870c2c2c fix: refs #7939 show userErr & useNotify composable
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-17 11:39:48 +02:00
Pau Rovira 0fa1b6ee9d Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-17 08:40:11 +00:00
Pau Rovira d838d9b55a feat: refs #8406 "add" button on a bottom bar in CrudModel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-16 14:58:18 +02:00
Benjamin Esteve 03cced3ac6 Merge branch '8862-testIsolationFalse' of https://gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-16 10:44:43 +02:00
Benjamin Esteve 1cf9d08a90 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse 2025-04-16 10:44:39 +02:00
Alex Moreno 00ed2b2f6e Merge branch '8862-testIsolationFalse' of https://gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 14:11:24 +02:00
Alex Moreno 1a27833081 test: refs #8862 disable test isolation for InvoiceOut list spec 2025-04-15 14:11:22 +02:00
Benjamin Esteve 8dd6926ab7 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-15 13:33:27 +02:00
Benjamin Esteve 608086bd8d test: refs #8862 enable test isolation for Cmr list spec
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-04-15 12:59:10 +02:00
Benjamin Esteve 395c3a8ec9 test: refs #8862 enable test isolation for multiple account and invoice specs
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 12:29:49 +02:00
Benjamin Esteve 8d6a15eefd test: refs #8862 enable test isolation for InvoiceInDescriptor and VnLog specs
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 12:12:16 +02:00
Benjamin Esteve 2bfd2b09f2 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 11:37:17 +02:00
Benjamin Esteve b7cfabd1a2 test: refs #8862 add Cypress integration tests for ticket and zone functionalities
gitea/salix-front/pipeline/pr-dev Build queued... Details
2025-04-15 11:36:37 +02:00
Benjamin Esteve 19550188b8 test: refs #8862 enable test isolation for VnLocation tests
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 11:16:15 +02:00
Benjamin Esteve d477b6c477 test: refs #8862 enable test isolation for TicketSale tests
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 10:23:15 +02:00
Benjamin Esteve 4d9912e9b5 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 09:13:50 +02:00
Benjamin Esteve 97c63c2689 refactor: refs #8862 enable test isolation for Cmr list tests
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-15 09:08:44 +02:00
Pau Rovira 36d306e827 Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-14 11:38:13 +00:00
Benjamin Esteve 3a8f6455d3 refactor: refs #8862 update timeout settings for Cypress tests
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-11 12:43:27 +02:00
Benjamin Esteve f3f1ec8039 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-11 12:38:25 +02:00
Benjamin Esteve 01744012bc Merge branch '8862-testIsolationFalse' of https://gitea.verdnatura.es/verdnatura/salix-front into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-11 12:13:11 +02:00
Benjamin Esteve 0f17aa13ae refactor: refs #8862 update timeout settings for Cypress tests 2025-04-11 12:13:08 +02:00
Benjamin Esteve d5a2c880cc Merge branch 'dev' into 8862-testIsolationFalse
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-11 09:53:28 +00:00
Benjamin Esteve b22d693a44 test: refs #8862 add Cypress isolation tests for various ticket and zone components
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-10 12:57:09 +02:00
Pau Rovira 5703798781 fix: refs #8406 fixed front test
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-04-03 09:56:46 +02:00
Pau Rovira c075f39576 Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-03 06:52:24 +00:00
Pau Rovira 87c1c16d26 feat: refs #8406 added new insertion with tabulation
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-04-03 08:38:03 +02:00
Pau Rovira 5b42e97d83 Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev This commit is unstable Details
2025-03-24 10:07:01 +00:00
Pau Rovira e874375276 feat: refs #8406 upgraded CrudModel 2025-03-24 11:05:36 +01:00
Robert Ferrús be69781e17 Merge branch 'dev' into 7248-tablesObservation
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-02-07 06:05:37 +00:00
Robert Ferrús 523cacbffe Merge branch 'dev' into 7248-tablesObservation
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-02-05 12:35:23 +00:00
Robert Ferrús 9c8aaf65d1 feat: refs #7248 modify VnNotes
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-02-05 13:32:01 +01:00
71 changed files with 528 additions and 600 deletions

View File

@ -64,5 +64,6 @@ export default defineConfig({
...timeouts, ...timeouts,
includeShadowDom: true, includeShadowDom: true,
waitForAnimations: true, waitForAnimations: true,
testIsolation: false,
}, },
}); });

View File

@ -7,7 +7,7 @@ import { QLayout } from 'quasar';
import mainShortcutMixin from './mainShortcutMixin'; import mainShortcutMixin from './mainShortcutMixin';
import { useCau } from 'src/composables/useCau'; import { useCau } from 'src/composables/useCau';
export default boot(({ app }) => { export default boot(({ app, router }) => {
QForm.mixins = [qFormMixin]; QForm.mixins = [qFormMixin];
QLayout.mixins = [mainShortcutMixin]; QLayout.mixins = [mainShortcutMixin];
@ -22,6 +22,14 @@ export default boot(({ app }) => {
} }
switch (response?.status) { switch (response?.status) {
case 401:
if (!router.currentRoute.value.name.toLowerCase().includes('login')) {
message = 'errors.sessionExpired';
} else message = 'login.loginError';
break;
case 403:
if (!message || message.toLowerCase() === 'access denied')
message = 'errors.accessDenied';
case 422: case 422:
if (error.name == 'ValidationError') if (error.name == 'ValidationError')
message += ` "${responseError.details.context}.${Object.keys( message += ` "${responseError.details.context}.${Object.keys(

View File

@ -1,6 +1,6 @@
<script setup> <script setup>
import axios from 'axios'; import axios from 'axios';
import { computed, ref, useAttrs, watch } from 'vue'; import { computed, ref, useAttrs, watch, nextTick } from 'vue';
import { useRouter, onBeforeRouteLeave } from 'vue-router'; import { useRouter, onBeforeRouteLeave } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar'; import { useQuasar } from 'quasar';
@ -42,7 +42,15 @@ const $props = defineProps({
}, },
dataRequired: { dataRequired: {
type: Object, type: Object,
default: () => {}, default: () => ({}),
},
dataDefault: {
type: Object,
default: () => ({}),
},
insertOnLoad: {
type: Boolean,
default: false,
}, },
defaultSave: { defaultSave: {
type: Boolean, type: Boolean,
@ -87,6 +95,7 @@ const formData = ref();
const saveButtonRef = ref(null); const saveButtonRef = ref(null);
const watchChanges = ref(); const watchChanges = ref();
const formUrl = computed(() => $props.url); const formUrl = computed(() => $props.url);
const rowsContainer = ref(null);
const emit = defineEmits(['onFetch', 'update:selected', 'saveChanges']); const emit = defineEmits(['onFetch', 'update:selected', 'saveChanges']);
@ -122,9 +131,11 @@ async function fetch(data) {
const rows = keyData ? data[keyData] : data; const rows = keyData ? data[keyData] : data;
resetData(rows); resetData(rows);
emit('onFetch', rows); emit('onFetch', rows);
$props.insertOnLoad && await insert();
return rows; return rows;
} }
function resetData(data) { function resetData(data) {
if (!data) return; if (!data) return;
if (data && Array.isArray(data)) { if (data && Array.isArray(data)) {
@ -135,9 +146,16 @@ function resetData(data) {
formData.value = JSON.parse(JSON.stringify(data)); formData.value = JSON.parse(JSON.stringify(data));
if (watchChanges.value) watchChanges.value(); //destroy watcher if (watchChanges.value) watchChanges.value(); //destroy watcher
watchChanges.value = watch(formData, () => (hasChanges.value = true), { deep: true }); watchChanges.value = watch(formData, (nVal) => {
} hasChanges.value = false;
const filteredNewData = nVal.filter(row => !isRowEmpty(row) || row[$props.primaryKey]);
const filteredOriginal = originalData.value.filter(row => row[$props.primaryKey]);
const changes = getDifferences(filteredOriginal, filteredNewData);
hasChanges.value = !isEmpty(changes);
}, { deep: true });
}
async function reset() { async function reset() {
await fetch(originalData.value); await fetch(originalData.value);
hasChanges.value = false; hasChanges.value = false;
@ -165,7 +183,9 @@ async function onSubmit() {
}); });
} }
isLoading.value = true; isLoading.value = true;
await saveChanges($props.saveFn ? formData.value : null); await saveChanges($props.saveFn ? formData.value : null);
} }
async function onSubmitAndGo() { async function onSubmitAndGo() {
@ -174,6 +194,10 @@ async function onSubmitAndGo() {
} }
async function saveChanges(data) { async function saveChanges(data) {
formData.value = formData.value.filter(row =>
row[$props.primaryKey] || !isRowEmpty(row)
);
if ($props.saveFn) { if ($props.saveFn) {
$props.saveFn(data, getChanges); $props.saveFn(data, getChanges);
isLoading.value = false; isLoading.value = false;
@ -203,14 +227,32 @@ async function saveChanges(data) {
}); });
} }
async function insert(pushData = $props.dataRequired) { async function insert(pushData = { ...$props.dataRequired, ...$props.dataDefault }) {
const $index = formData.value.length formData.value = formData.value.filter(row => !isRowEmpty(row));
? formData.value[formData.value.length - 1].$index + 1
: 0; const lastRow = formData.value.at(-1);
formData.value.push(Object.assign({ $index }, pushData)); const isLastRowEmpty = lastRow ? isRowEmpty(lastRow) : false;
hasChanges.value = true;
if (formData.value.length && isLastRowEmpty) return;
const $index = formData.value.length ? formData.value.at(-1).$index + 1 : 0;
const nRow = Object.assign({ $index }, pushData);
formData.value.push(nRow);
const hasChange = Object.keys(nRow).some(key => !isChange(nRow, key));
if (hasChange) hasChanges.value = true;
} }
function isRowEmpty(row) {
return Object.keys(row).every(key => isChange(row, key));
}
function isChange(row,key){
return !row[key] || key == '$index' || Object.hasOwn($props.dataRequired || {}, key);
}
async function remove(data) { async function remove(data) {
if (!data.length) if (!data.length)
return quasar.notify({ return quasar.notify({
@ -227,10 +269,8 @@ async function remove(data) {
newData = newData.filter( newData = newData.filter(
(form) => !preRemove.some((index) => index == form.$index), (form) => !preRemove.some((index) => index == form.$index),
); );
const changes = getChanges(); formData.value = newData;
if (!changes.creates?.length && !changes.updates?.length) hasChanges.value = JSON.stringify(removeIndexField(formData.value)) !== JSON.stringify(removeIndexField(originalData.value));
hasChanges.value = false;
fetch(newData);
} }
if (ids.length) { if (ids.length) {
quasar quasar
@ -248,9 +288,8 @@ async function remove(data) {
newData = newData.filter((form) => !ids.some((id) => id == form[pk])); newData = newData.filter((form) => !ids.some((id) => id == form[pk]));
fetch(newData); fetch(newData);
}); });
} else {
reset();
} }
emit('update:selected', []); emit('update:selected', []);
} }
@ -261,7 +300,7 @@ function getChanges() {
const pk = $props.primaryKey; const pk = $props.primaryKey;
for (const [i, row] of formData.value.entries()) { for (const [i, row] of formData.value.entries()) {
if (!row[pk]) { if (!row[pk]) {
creates.push(row); creates.push(Object.assign(row, { ...$props.dataRequired }));
} else if (originalData.value[i]) { } else if (originalData.value[i]) {
const data = getDifferences(originalData.value[i], row); const data = getDifferences(originalData.value[i], row);
if (!isEmpty(data)) { if (!isEmpty(data)) {
@ -287,6 +326,33 @@ function isEmpty(obj) {
return !Object.keys(obj).length; return !Object.keys(obj).length;
} }
function removeIndexField(data) {
if (Array.isArray(data)) {
return data.map(({ $index, ...rest }) => rest);
} else if (typeof data === 'object' && data !== null) {
const { $index, ...rest } = data;
return rest;
}
}
async function handleTab(event) {
event.preventDefault();
const { shiftKey, target } = event;
const focusableSelector = `tbody tr td:not(:first-child) :is(a, button, input, textarea, select, details):not([disabled])`;
const focusableElements = rowsContainer.value?.querySelectorAll(focusableSelector);
const currentIndex = Array.prototype.indexOf.call(focusableElements, target);
const index = shiftKey ? currentIndex - 1 : currentIndex + 1;
const isLast = target === focusableElements[focusableElements.length - 1];
const isFirst = currentIndex === 0;
if ((shiftKey && !isFirst) || (!shiftKey && !isLast))
focusableElements[index]?.focus();
else if (isLast) {
await insert();
await nextTick();
}
}
async function reload(params) { async function reload(params) {
const data = await vnPaginateRef.value.fetch(params); const data = await vnPaginateRef.value.fetch(params);
fetch(data); fetch(data);
@ -312,12 +378,14 @@ watch(formUrl, async () => {
v-bind="$attrs" v-bind="$attrs"
> >
<template #body v-if="formData"> <template #body v-if="formData">
<div ref="rowsContainer" @keydown.tab="handleTab">
<slot <slot
name="body" name="body"
:rows="formData" :rows="formData"
:validate="validate" :validate="validate"
:filter="filter" :filter="filter"
></slot> ></slot>
</div>
</template> </template>
</VnPaginate> </VnPaginate>
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown() && hasSubToolbar"> <Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown() && hasSubToolbar">

View File

@ -181,6 +181,10 @@ const col = computed(() => {
newColumn.component = 'checkbox'; newColumn.component = 'checkbox';
if ($props.default && !newColumn.component) newColumn.component = $props.default; if ($props.default && !newColumn.component) newColumn.component = $props.default;
if (typeof newColumn.component !== 'string') {
newColumn.attrs = { ...newColumn.component.attrs, autofocus: $props.autofocus };
newColumn.event = { ...newColumn.component.event, ...$props?.eventHandlers };
}
return newColumn; return newColumn;
}); });

View File

@ -193,11 +193,11 @@ describe('CrudModel', () => {
}); });
it('should set originalData and formatData with data and generate watchChanges', async () => { it('should set originalData and formatData with data and generate watchChanges', async () => {
data = { data = [{
name: 'Tony', name: 'Tony',
lastName: 'Stark', lastName: 'Stark',
age: 42, age: 42,
}; }];
vm.resetData(data); vm.resetData(data);

View File

@ -72,7 +72,7 @@ const getBankEntities = (data) => {
:acls="[{ model: 'BankEntity', props: '*', accessType: 'WRITE' }]" :acls="[{ model: 'BankEntity', props: '*', accessType: 'WRITE' }]"
:options="bankEntities" :options="bankEntities"
hide-selected hide-selected
option-label="name" option-label="bic"
option-value="id" option-value="id"
v-model="bankEntityFk" v-model="bankEntityFk"
@update:model-value="$emit('updateBic', { iban, bankEntityFk })" @update:model-value="$emit('updateBic', { iban, bankEntityFk })"

View File

@ -0,0 +1,49 @@
<script setup>
import { ref, useTemplateRef } from 'vue';
import { useI18n } from 'vue-i18n';
import { useAccountShortToStandard } from 'src/composables/useAccountShortToStandard';
import VnSelectDialog from './VnSelectDialog.vue';
import CreateNewExpenseForm from '../CreateNewExpenseForm.vue';
import FetchData from '../FetchData.vue';
const model = defineModel({ type: [String, Number, Object] });
const { t } = useI18n();
const expenses = ref([]);
const selectDialogRef = useTemplateRef('selectDialogRef');
async function autocompleteExpense(evt) {
const val = evt.target.value;
if (!val || isNaN(val)) return;
const lookup = expenses.value.find(({ id }) => id == useAccountShortToStandard(val));
if (selectDialogRef.value)
selectDialogRef.value.vnSelectDialogRef.vnSelectRef.toggleOption(lookup);
}
</script>
<template>
<VnSelectDialog
v-bind="$attrs"
ref="selectDialogRef"
v-model="model"
:options="expenses"
option-value="id"
:option-label="(x) => `${x.id}: ${x.name}`"
:filter-options="['id', 'name']"
:tooltip="t('Create a new expense')"
:acls="[{ model: 'Expense', props: '*', accessType: 'WRITE' }]"
@keydown.tab.prevent="autocompleteExpense"
>
<template #form>
<CreateNewExpenseForm @on-data-saved="$refs.expensesRef.fetch()" />
</template>
</VnSelectDialog>
<FetchData
ref="expensesRef"
url="Expenses"
auto-load
@on-fetch="(data) => (expenses = data)"
/>
</template>
<i18n>
es:
Create a new expense: Crear nuevo gasto
</i18n>

View File

@ -40,4 +40,11 @@ describe('VnBankDetail Component', () => {
await vm.autofillBic('ES1234567891324567891234'); await vm.autofillBic('ES1234567891324567891234');
expect(vm.bankEntityFk).toBe(null); expect(vm.bankEntityFk).toBe(null);
}); });
it('should not update bankEntityFk if IBAN country is not ES', async () => {
vm.bankEntities = bankEntities;
await vm.autofillBic('FR1420041010050500013M02606');
expect(vm.bankEntityFk).toBe(null);
});
}); });

View File

@ -35,6 +35,7 @@ const $props = defineProps({
selectType: { type: Boolean, default: false }, selectType: { type: Boolean, default: false },
justInput: { type: Boolean, default: false }, justInput: { type: Boolean, default: false },
goTo: { type: String, default: '' }, goTo: { type: String, default: '' },
useUserRelation: { type: Boolean, default: true },
}); });
const { t } = useI18n(); const { t } = useI18n();
@ -54,6 +55,26 @@ const defaultObservationType = computed(
let savedNote = false; let savedNote = false;
let originalText; let originalText;
onBeforeRouteLeave((to, from, next) => {
if (
(newNote.text && !$props.justInput) ||
(newNote.text !== originalText && $props.justInput)
)
quasar.dialog({
component: VnConfirm,
componentProps: {
title: t('globals.unsavedPopup.title'),
message: t('globals.unsavedPopup.subtitle'),
promise: () => next(),
},
});
else next();
});
onMounted(() => {
nextTick(() => (componentIsRendered.value = true));
});
function handleClick(e) { function handleClick(e) {
if (e.shiftKey && e.key === 'Enter') return; if (e.shiftKey && e.key === 'Enter') return;
if ($props.justInput) confirmAndUpdate(); if ($props.justInput) confirmAndUpdate();
@ -108,22 +129,6 @@ async function update() {
); );
} }
onBeforeRouteLeave((to, from, next) => {
if (
(newNote.text && !$props.justInput) ||
(newNote.text !== originalText && $props.justInput)
)
quasar.dialog({
component: VnConfirm,
componentProps: {
title: t('globals.unsavedPopup.title'),
message: t('globals.unsavedPopup.subtitle'),
promise: () => next(),
},
});
else next();
});
function fetchData([data]) { function fetchData([data]) {
newNote.text = data?.notes; newNote.text = data?.notes;
originalText = data?.notes; originalText = data?.notes;
@ -137,16 +142,38 @@ const handleObservationTypes = (data) => {
} }
}; };
onMounted(() => {
nextTick(() => (componentIsRendered.value = true));
});
async function saveAndGo() { async function saveAndGo() {
savedNote = false; savedNote = false;
await insert(); await insert();
await savedNote;
router.push({ path: $props.goTo }); router.push({ path: $props.goTo });
} }
function getUserFilter() {
const newUserFilter = $props.userFilter ?? {};
const userInclude = {
relation: 'user',
scope: {
fields: ['id', 'nickname', 'name'],
},
};
if (newUserFilter.include) {
if (Array.isArray(newUserFilter.include)) {
newUserFilter.include.push(userInclude);
} else {
newUserFilter.include = [userInclude, newUserFilter.include];
}
} else {
newUserFilter.include = userInclude;
}
if ($props.useUserRelation) {
return {
...newUserFilter,
...$props.userFilter,
};
}
return $props.filter;
}
</script> </script>
<template> <template>
<Teleport <Teleport
@ -242,7 +269,7 @@ async function saveAndGo() {
:url="$props.url" :url="$props.url"
order="created DESC" order="created DESC"
:limit="0" :limit="0"
:user-filter="userFilter" :user-filter="getUserFilter()"
:filter="filter" :filter="filter"
auto-load auto-load
ref="vnPaginateRef" ref="vnPaginateRef"
@ -261,15 +288,15 @@ async function saveAndGo() {
<QCardSection horizontal> <QCardSection horizontal>
<VnAvatar <VnAvatar
:descriptor="false" :descriptor="false"
:worker-id="note.workerFk" :worker-id="note.user?.id"
size="md" size="md"
:title="note.worker?.user.nickname" :title="note.user?.nickname"
/> />
<div class="full-width row justify-between q-pa-xs"> <div class="full-width row justify-between q-pa-xs">
<div> <div>
<VnUserLink <VnUserLink
:name="`${note.worker.user.name}`" :name="`${note.user?.name}`"
:worker-id="note.worker.id" :worker-id="note.user?.id"
/> />
<QBadge <QBadge
class="q-ml-xs" class="q-ml-xs"

View File

@ -400,6 +400,8 @@ errors:
updateUserConfig: Error updating user config updateUserConfig: Error updating user config
tokenConfig: Error fetching token config tokenConfig: Error fetching token config
writeRequest: The requested operation could not be completed writeRequest: The requested operation could not be completed
sessionExpired: Your session has expired. Please log in again
accessDenied: Access denied
claimBeginningQuantity: Cannot import a line with a claimed quantity of 0 claimBeginningQuantity: Cannot import a line with a claimed quantity of 0
login: login:
title: Login title: Login

View File

@ -396,6 +396,8 @@ errors:
updateUserConfig: Error al actualizar la configuración de usuario updateUserConfig: Error al actualizar la configuración de usuario
tokenConfig: Error al obtener configuración de token tokenConfig: Error al obtener configuración de token
writeRequest: No se pudo completar la operación solicitada writeRequest: No se pudo completar la operación solicitada
sessionExpired: Tu sesión ha expirado, por favor vuelve a iniciar sesión
accessDenied: Acceso denegado
claimBeginningQuantity: No se puede importar una linea sin una cantidad reclamada claimBeginningQuantity: No se puede importar una linea sin una cantidad reclamada
login: login:
title: Inicio de sesión title: Inicio de sesión

View File

@ -138,6 +138,7 @@ const columns = computed(() => [
:filter="developmentsFilter" :filter="developmentsFilter"
ref="claimDevelopmentForm" ref="claimDevelopmentForm"
:data-required="{ claimFk: route.params.id }" :data-required="{ claimFk: route.params.id }"
:insert-on-load="true"
v-model:selected="selected" v-model:selected="selected"
@save-changes="$router.push(`/claim/${route.params.id}/action`)" @save-changes="$router.push(`/claim/${route.params.id}/action`)"
:default-save="false" :default-save="false"

View File

@ -1,12 +1,9 @@
<script setup> <script setup>
import { computed } from 'vue'; import { computed } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useState } from 'src/composables/useState';
import VnNotes from 'src/components/ui/VnNotes.vue'; import VnNotes from 'src/components/ui/VnNotes.vue';
const route = useRoute(); const route = useRoute();
const state = useState();
const user = state.getUser();
const $props = defineProps({ const $props = defineProps({
id: { type: [Number, String], default: null }, id: { type: [Number, String], default: null },
@ -15,24 +12,13 @@ const $props = defineProps({
const claimId = computed(() => $props.id || route.params.id); const claimId = computed(() => $props.id || route.params.id);
const claimFilter = { const claimFilter = {
fields: ['id', 'created', 'workerFk', 'text'], fields: ['id', 'created', 'userFk', 'text'],
include: {
relation: 'worker',
scope: {
fields: ['id', 'firstName', 'lastName'],
include: { include: {
relation: 'user', relation: 'user',
scope: { scope: {
fields: ['id', 'nickname', 'name'], fields: ['id', 'nickname', 'name'],
}, },
}, },
},
},
};
const body = {
claimFk: claimId.value,
workerFk: user.value.id,
}; };
</script> </script>
@ -43,7 +29,9 @@ const body = {
:add-note="$props.addNote" :add-note="$props.addNote"
:user-filter="claimFilter" :user-filter="claimFilter"
:filter="{ where: { claimFk: claimId } }" :filter="{ where: { claimFk: claimId } }"
:body="body" :body="{
claimFk: claimId,
}"
v-bind="$attrs" v-bind="$attrs"
style="overflow-y: auto" style="overflow-y: auto"
/> />

View File

@ -1,12 +1,15 @@
<script setup> <script setup>
import VnNotes from 'src/components/ui/VnNotes.vue'; import VnNotes from 'src/components/ui/VnNotes.vue';
import { useState } from 'src/composables/useState';
const state = useState();
const user = state.getUser();
</script> </script>
<template> <template>
<VnNotes <VnNotes
url="clientObservations" url="clientObservations"
:add-note="true" :add-note="true"
:filter="{ where: { clientFk: $route.params.id } }" :filter="{ where: { clientFk: $route.params.id } }"
:body="{ clientFk: $route.params.id }" :body="{ clientFk: $route.params.id, userFk: user.id }"
style="overflow-y: auto" style="overflow-y: auto"
:select-type="true" :select-type="true"
required required

View File

@ -76,7 +76,7 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
name: 'workerFk', name: 'userFk',
label: t('Author'), label: t('Author'),
tooltip: t('Worker who made the last observation'), tooltip: t('Worker who made the last observation'),
columnFilter: { columnFilter: {
@ -155,7 +155,7 @@ function exprBuilder(param, value) {
return { [`c.${param}`]: value }; return { [`c.${param}`]: value };
case 'payMethod': case 'payMethod':
return { [`c.payMethodFk`]: value }; return { [`c.payMethodFk`]: value };
case 'workerFk': case 'userFk':
return { [`co.${param}`]: value }; return { [`co.${param}`]: value };
case 'departmentFk': case 'departmentFk':
return { [`c.${param}`]: value }; return { [`c.${param}`]: value };
@ -229,10 +229,10 @@ function exprBuilder(param, value) {
<DepartmentDescriptorProxy :id="row.departmentFk" /> <DepartmentDescriptorProxy :id="row.departmentFk" />
</span> </span>
</template> </template>
<template #column-workerFk="{ row }"> <template #column-userFk="{ row }">
<span class="link" @click.stop> <span class="link" @click.stop>
{{ row.workerName }} {{ row.workerName }}
<WorkerDescriptorProxy :id="row.workerFk" /> <WorkerDescriptorProxy :id="row.userFk" />
</span> </span>
</template> </template>
</VnTable> </VnTable>

View File

@ -73,6 +73,7 @@ const columns = computed(() => [
optionLabel: 'code', optionLabel: 'code',
options: companies.value, options: companies.value,
}, },
orderBy: false,
}, },
{ {
name: 'warehouse', name: 'warehouse',

View File

@ -90,6 +90,7 @@ const columns = computed(() => [
auto-load auto-load
:data-required="{ invoiceInFk: invoiceInId }" :data-required="{ invoiceInFk: invoiceInId }"
:filter="filter" :filter="filter"
:insert-on-load="true"
v-model:selected="rowsSelected" v-model:selected="rowsSelected"
@on-fetch="(data) => (invoceInIntrastat = data)" @on-fetch="(data) => (invoceInIntrastat = data)"
> >

View File

@ -1,21 +1,16 @@
<script setup> <script setup>
import { ref, computed, nextTick } from 'vue'; import { ref, computed, markRaw } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useArrayData } from 'src/composables/useArrayData'; import { useArrayData } from 'src/composables/useArrayData';
import { getTotal } from 'src/composables/getTotal'; import { getTotal } from 'src/composables/getTotal';
import { toCurrency } from 'src/filters'; import { toCurrency } from 'src/filters';
import FetchData from 'src/components/FetchData.vue'; import FetchData from 'src/components/FetchData.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import CrudModel from 'src/components/CrudModel.vue';
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
import CreateNewExpenseForm from 'src/components/CreateNewExpenseForm.vue';
import { getExchange } from 'src/composables/getExchange'; import { getExchange } from 'src/composables/getExchange';
import { useAccountShortToStandard } from 'src/composables/useAccountShortToStandard'; import VnTable from 'src/components/VnTable/VnTable.vue';
import VnSelectExpense from 'src/components/common/VnSelectExpense.vue';
const { t } = useI18n(); const { t } = useI18n();
const arrayData = useArrayData(); const arrayData = useArrayData();
const route = useRoute(); const route = useRoute();
const invoiceIn = computed(() => arrayData.store.data); const invoiceIn = computed(() => arrayData.store.data);
@ -24,100 +19,142 @@ const expenses = ref([]);
const sageTaxTypes = ref([]); const sageTaxTypes = ref([]);
const sageTransactionTypes = ref([]); const sageTransactionTypes = ref([]);
const rowsSelected = ref([]); const rowsSelected = ref([]);
const invoiceInFormRef = ref(); const invoiceInVatTableRef = ref();
defineProps({ defineProps({ actionIcon: { type: String, default: 'add' } });
actionIcon: {
type: String, function taxRate(invoiceInTax) {
default: 'add', const sageTaxTypeId = invoiceInTax.taxTypeSageFk;
}, const taxRateSelection = sageTaxTypes.value.find(
}); (transaction) => transaction.id == sageTaxTypeId,
);
const taxTypeSage = taxRateSelection?.rate ?? 0;
const taxableBase = invoiceInTax?.taxableBase ?? 0;
return (taxTypeSage / 100) * taxableBase;
}
const columns = computed(() => [ const columns = computed(() => [
{ {
name: 'expense', name: 'expenseFk',
label: t('Expense'), label: t('Expense'),
field: (row) => row.expenseFk, component: markRaw(VnSelectExpense),
options: expenses.value, format: (row) => {
model: 'expenseFk', const expense = expenses.value.find((e) => e.id === row.expenseFk);
optionValue: 'id', return expense ? `${expense.id}: ${expense.name}` : row.expenseFk;
optionLabel: (row) => `${row.id}: ${row.name}`, },
sortable: true, sortable: true,
align: 'left', align: 'left',
isEditable: true,
create: true,
width: '250px',
}, },
{ {
name: 'taxablebase', name: 'taxableBase',
label: t('Taxable base'), label: t('Taxable base'),
field: (row) => row.taxableBase, component: 'number',
model: 'taxableBase', attrs: {
clearable: true,
'clear-icon': 'close',
},
sortable: true, sortable: true,
align: 'left', align: 'left',
isEditable: true,
create: true,
}, },
{ {
name: 'isDeductible', name: 'isDeductible',
label: t('invoiceIn.isDeductible'), label: t('invoiceIn.isDeductible'),
field: (row) => row.isDeductible, component: 'checkbox',
model: 'isDeductible',
align: 'center', align: 'center',
isEditable: true,
create: true,
createAttrs: {
defaultValue: true,
},
width: '100px',
}, },
{ {
name: 'sageiva', name: 'taxTypeSageFk',
label: t('Sage iva'), label: t('Sage iva'),
field: (row) => row.taxTypeSageFk, component: 'select',
attrs: {
options: sageTaxTypes.value, options: sageTaxTypes.value,
model: 'taxTypeSageFk',
optionValue: 'id', optionValue: 'id',
optionLabel: (row) => `${row.id}: ${row.vat}`, optionLabel: (row) => `${row.id}: ${row.vat}`,
filterOptions: ['id', 'vat'],
'data-cy': 'vat-sageiva',
},
format: (row) => {
const taxType = sageTaxTypes.value.find((t) => t.id === row.taxTypeSageFk);
return taxType ? `${taxType.id}: ${taxType.vat}` : row.taxTypeSageFk;
},
sortable: true, sortable: true,
align: 'left', align: 'left',
isEditable: true,
create: true,
}, },
{ {
name: 'sagetransaction', name: 'transactionTypeSageFk',
label: t('Sage transaction'), label: t('Sage transaction'),
field: (row) => row.transactionTypeSageFk, component: 'select',
attrs: {
options: sageTransactionTypes.value, options: sageTransactionTypes.value,
model: 'transactionTypeSageFk',
optionValue: 'id', optionValue: 'id',
optionLabel: (row) => `${row.id}: ${row.transaction}`, optionLabel: (row) => `${row.id}: ${row.transaction}`,
filterOptions: ['id', 'transaction'],
},
format: (row) => {
const transType = sageTransactionTypes.value.find(
(t) => t.id === row.transactionTypeSageFk,
);
return transType
? `${transType.id}: ${transType.transaction}`
: row.transactionTypeSageFk;
},
sortable: true, sortable: true,
align: 'left', align: 'left',
isEditable: true,
create: true,
}, },
{ {
name: 'rate', name: 'rate',
label: t('Rate'), label: t('Rate'),
sortable: true, sortable: false,
field: (row) => taxRate(row, row.taxTypeSageFk), format: (row) => taxRate(row).toFixed(2),
align: 'left', align: 'left',
}, },
{ {
name: 'foreignvalue', name: 'foreignValue',
label: t('Foreign value'), label: t('Foreign value'),
component: 'number',
sortable: true, sortable: true,
field: (row) => row.foreignValue,
align: 'left', align: 'left',
create: true,
disable: !isNotEuro(currency.value),
}, },
{ {
name: 'total', name: 'total',
label: 'Total', label: t('Total'),
align: 'left', align: 'left',
format: (row) => (Number(row.taxableBase || 0) + Number(taxRate(row))).toFixed(2),
}, },
]); ]);
const tableRows = computed(
() => invoiceInVatTableRef.value?.CrudModelRef?.formData || [],
);
const taxableBaseTotal = computed(() => { const taxableBaseTotal = computed(() => {
return getTotal(invoiceInFormRef.value.formData, 'taxableBase'); return getTotal(tableRows.value, 'taxableBase');
}); });
const taxRateTotal = computed(() => { const taxRateTotal = computed(() => {
return getTotal(invoiceInFormRef.value.formData, null, { return tableRows.value.reduce((sum, row) => sum + Number(taxRate(row)), 0);
cb: taxRate,
}); });
});
const combinedTotal = computed(() => { const combinedTotal = computed(() => {
return +taxableBaseTotal.value + +taxRateTotal.value; return +taxableBaseTotal.value + +taxRateTotal.value;
}); });
const filter = { const filter = computed(() => ({
fields: [ fields: [
'id', 'id',
'invoiceInFk', 'invoiceInFk',
@ -131,388 +168,75 @@ const filter = {
where: { where: {
invoiceInFk: route.params.id, invoiceInFk: route.params.id,
}, },
}; }));
const isNotEuro = (code) => code != 'EUR'; const isNotEuro = (code) => code != 'EUR';
function taxRate(invoiceInTax) { async function handleForeignValueUpdate(val, row) {
const sageTaxTypeId = invoiceInTax.taxTypeSageFk; if (!isNotEuro(currency.value)) return;
const taxRateSelection = sageTaxTypes.value.find( row.taxableBase = await getExchange(
(transaction) => transaction.id == sageTaxTypeId, val,
invoiceIn.value?.currencyFk,
invoiceIn.value?.issued,
); );
const taxTypeSage = taxRateSelection?.rate ?? 0;
const taxableBase = invoiceInTax?.taxableBase ?? 0;
return ((taxTypeSage / 100) * taxableBase).toFixed(2);
}
function autocompleteExpense(evt, row, col, ref) {
const val = evt.target.value;
if (!val) return;
const param = isNaN(val) ? row[col.model] : val;
const lookup = expenses.value.find(
({ id }) => id == useAccountShortToStandard(param),
);
ref.vnSelectDialogRef.vnSelectRef.toggleOption(lookup);
}
function setCursor(ref) {
nextTick(() => {
const select = ref.vnSelectDialogRef
? ref.vnSelectDialogRef.vnSelectRef
: ref.vnSelectRef;
select.$el.querySelector('input').setSelectionRange(0, 0);
});
} }
</script> </script>
<template> <template>
<FetchData <FetchData url="Expenses" auto-load @on-fetch="(data) => (expenses = data)" />
ref="expensesRef"
url="Expenses"
auto-load
@on-fetch="(data) => (expenses = data)"
/>
<FetchData url="SageTaxTypes" auto-load @on-fetch="(data) => (sageTaxTypes = data)" /> <FetchData url="SageTaxTypes" auto-load @on-fetch="(data) => (sageTaxTypes = data)" />
<FetchData <FetchData
url="sageTransactionTypes" url="sageTransactionTypes"
auto-load auto-load
@on-fetch="(data) => (sageTransactionTypes = data)" @on-fetch="(data) => (sageTransactionTypes = data)"
/> />
<CrudModel <VnTable
ref="invoiceInFormRef"
v-if="invoiceIn" v-if="invoiceIn"
ref="invoiceInVatTableRef"
data-key="InvoiceInTaxes" data-key="InvoiceInTaxes"
url="InvoiceInTaxes" url="InvoiceInTaxes"
save-url="InvoiceInTaxes/crud"
:filter="filter" :filter="filter"
:data-required="{ invoiceInFk: $route.params.id }" :data-required="{ invoiceInFk: $route.params.id }"
:insert-on-load="true"
auto-load auto-load
v-model:selected="rowsSelected" v-model:selected="rowsSelected"
:go-to="`/invoice-in/${$route.params.id}/due-day`"
>
<template #body="{ rows }">
<QTable
v-model:selected="rowsSelected"
selection="multiple"
:columns="columns" :columns="columns"
:rows="rows" :is-editable="true"
row-key="$index" :table="{ selection: 'multiple', 'row-key': '$index' }"
:grid="$q.screen.lt.sm" footer
> :right-search="false"
<template #body-cell-expense="{ row, col }"> :column-search="false"
<QTd> :disable-option="{ card: true }"
<VnSelectDialog class="q-pa-none"
:ref="`expenseRef-${row.$index}`" :create="{
v-model="row[col.model]" urlCreate: 'InvoiceInTaxes',
:options="col.options" title: t('Add tax'),
:option-value="col.optionValue" formInitialData: { invoiceInFk: $route.params.id, isDeductible: true },
:option-label="col.optionLabel" onDataSaved: () => invoiceInVatTableRef.reload(),
:filter-options="['id', 'name']"
:tooltip="t('Create a new expense')"
:acls="[
{ model: 'Expense', props: '*', accessType: 'WRITE' },
]"
@keydown.tab.prevent="
autocompleteExpense(
$event,
row,
col,
$refs[`expenseRef-${row.$index}`],
)
"
@update:model-value="
setCursor($refs[`expenseRef-${row.$index}`])
"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
{{ `${scope.opt.id}: ${scope.opt.name}` }}
</QItem>
</template>
<template #form>
<CreateNewExpenseForm
@on-data-saved="$refs.expensesRef.fetch()"
/>
</template>
</VnSelectDialog>
</QTd>
</template>
<template #body-cell-isDeductible="{ row }">
<QTd align="center">
<QCheckbox
v-model="row.isDeductible"
data-cy="isDeductible_checkbox"
/>
</QTd>
</template>
<template #body-cell-taxablebase="{ row }">
<QTd shrink>
<VnInputNumber
clear-icon="close"
v-model="row.taxableBase"
clearable
/>
</QTd>
</template>
<template #body-cell-sageiva="{ row, col }">
<QTd>
<VnSelect
:ref="`sageivaRef-${row.$index}`"
v-model="row[col.model]"
:options="col.options"
:option-value="col.optionValue"
:option-label="col.optionLabel"
:filter-options="['id', 'vat']"
data-cy="vat-sageiva"
@update:model-value="
setCursor($refs[`sageivaRef-${row.$index}`])
"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{ scope.opt.vat }}</QItemLabel>
<QItemLabel>
{{ `#${scope.opt.id}` }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</QTd>
</template>
<template #body-cell-sagetransaction="{ row, col }">
<QTd>
<VnSelect
:ref="`sagetransactionRef-${row.$index}`"
v-model="row[col.model]"
:options="col.options"
:option-value="col.optionValue"
:option-label="col.optionLabel"
:filter-options="['id', 'transaction']"
@update:model-value="
setCursor($refs[`sagetransactionRef-${row.$index}`])
"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{
scope.opt.transaction
}}</QItemLabel>
<QItemLabel>
{{ `#${scope.opt.id}` }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</QTd>
</template>
<template #body-cell-foreignvalue="{ row }">
<QTd shrink>
<VnInputNumber
:class="{
'no-pointer-events': !isNotEuro(currency),
}" }"
:disable="!isNotEuro(currency)" :crud-model="{ goTo: `/invoice-in/${$route.params.id}/due-day` }"
v-model="row.foreignValue" >
@update:model-value=" <template #column-footer-taxableBase>
async (val) => {
if (!isNotEuro(currency)) return;
row.taxableBase = await getExchange(
val,
row.currencyFk,
invoiceIn.issued,
);
}
"
/>
</QTd>
</template>
<template #bottom-row>
<QTr class="bg">
<QTd />
<QTd />
<QTd>
{{ toCurrency(taxableBaseTotal) }} {{ toCurrency(taxableBaseTotal) }}
</QTd> </template>
<QTd /> <template #column-footer-rate>
<QTd />
<QTd />
<QTd>
{{ toCurrency(taxRateTotal) }} {{ toCurrency(taxRateTotal) }}
</QTd> </template>
<QTd /> <template #column-footer-total>
<QTd>
{{ toCurrency(combinedTotal) }} {{ toCurrency(combinedTotal) }}
</QTd>
</QTr>
</template> </template>
</VnTable>
<template #item="props">
<div class="q-pa-xs col-xs-12 col-sm-6 grid-style-transition">
<QCard bordered flat class="q-my-xs">
<QCardSection>
<QCheckbox v-model="props.selected" dense />
</QCardSection>
<QSeparator />
<QList>
<QItem>
<VnSelectDialog
:label="t('Expense')"
class="full-width"
v-model="props.row['expenseFk']"
:options="expenses"
option-value="id"
:option-label="(row) => `${row.id}:${row.name}`"
:filter-options="['id', 'name']"
:tooltip="t('Create a new expense')"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
{{ `${scope.opt.id}: ${scope.opt.name}` }}
</QItem>
</template> </template>
<template #form>
<CreateNewExpenseForm />
</template>
</VnSelectDialog>
</QItem>
<QItem>
<VnInputNumber
:label="t('Taxable base')"
:class="{
'no-pointer-events': isNotEuro(currency),
}"
class="full-width"
:disable="isNotEuro(currency)"
clear-icon="close"
v-model="props.row.taxableBase"
clearable
/>
</QItem>
<QItem>
<VnSelect
:label="t('Sage iva')"
class="full-width"
v-model="props.row['taxTypeSageFk']"
:options="sageTaxTypes"
option-value="id"
:option-label="(row) => `${row.id}:${row.vat}`"
:filter-options="['id', 'vat']"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{
scope.opt.vat
}}</QItemLabel>
<QItemLabel>
{{ `#${scope.opt.id}` }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</QItem>
<QItem>
<VnSelect
class="full-width"
v-model="props.row['transactionTypeSageFk']"
:options="sageTransactionTypes"
option-value="id"
:option-label="
(row) => `${row.id}:${row.transaction}`
"
:filter-options="['id', 'transaction']"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{
scope.opt.transaction
}}</QItemLabel>
<QItemLabel>
{{ `#${scope.opt.id}` }}
</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</QItem>
<QItem>
{{ toCurrency(taxRate(props.row), currency) }}
</QItem>
<QItem>
<VnInputNumber
:label="t('Foreign value')"
class="full-width"
:class="{
'no-pointer-events': !isNotEuro(currency),
}"
:disable="!isNotEuro(currency)"
v-model="props.row.foreignValue"
/>
</QItem>
</QList>
</QCard>
</div>
</template>
</QTable>
</template>
</CrudModel>
<QPageSticky position="bottom-right" :offset="[25, 25]">
<QBtn
color="primary"
icon="add"
size="lg"
v-shortcut="'+'"
round
@click="invoiceInFormRef.insert()"
>
<QTooltip>{{ t('Add tax') }}</QTooltip>
</QBtn>
</QPageSticky>
</template>
<style lang="scss" scoped>
.bg {
background-color: var(--vn-light-gray);
}
@media (max-width: $breakpoint-xs) {
.q-dialog {
.q-card {
&__section:not(:first-child) {
.q-item {
flex-direction: column;
.q-checkbox {
margin-top: 2rem;
}
}
}
}
}
}
.q-item {
min-height: 0;
}
.default-icon {
cursor: pointer;
border-radius: 50px;
background-color: $primary;
}
</style>
<i18n> <i18n>
es: es:
Expense: Gasto Expense: Gasto
Create a new expense: Crear nuevo gasto Create a new expense: Crear nuevo gasto
Add tax: Crear gasto Add tax: Añadir Gasto/IVA # Changed label slightly
Taxable base: Base imp. Taxable base: Base imp.
Sage tax: Sage iva Sage iva: Sage iva # Kept original label
Sage transaction: Sage transacción Sage transaction: Sage transacción
Rate: Tasa Rate: Cuota # Changed label
Foreign value: Divisa Foreign value: Divisa
Total: Total
invoiceIn.isDeductible: Deducible
</i18n> </i18n>

View File

@ -51,6 +51,7 @@ const submit = async (rows) => {
<CrudModel <CrudModel
:data-required="{ itemFk: route.params.id }" :data-required="{ itemFk: route.params.id }"
:default-remove="false" :default-remove="false"
:insert-on-load="true"
:filter="{ :filter="{
fields: ['id', 'itemFk', 'code'], fields: ['id', 'itemFk', 'code'],
where: { itemFk: route.params.id }, where: { itemFk: route.params.id },

View File

@ -76,15 +76,22 @@ const insertTag = (rows) => {
model="ItemTags" model="ItemTags"
url="ItemTags" url="ItemTags"
:data-required="{ :data-required="{
$index: undefined,
itemFk: route.params.id, itemFk: route.params.id,
priority: undefined,
tag: { tag: {
isFree: undefined, isFree: true,
value: undefined,
name: undefined,
},
}"
:data-default="{
tag: {
isFree: true,
value: undefined, value: undefined,
name: undefined, name: undefined,
}, },
tagFk: undefined, tagFk: undefined,
priority: undefined,
}" }"
:default-remove="false" :default-remove="false"
:user-filter="{ :user-filter="{

View File

@ -1,12 +1,11 @@
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue';
import { Notify } from 'quasar';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import VnInputPassword from 'src/components/common/VnInputPassword.vue'; import VnInputPassword from 'src/components/common/VnInputPassword.vue';
import { useSession } from 'src/composables/useSession'; import { useSession } from 'src/composables/useSession';
import { useLogin } from 'src/composables/useLogin'; import { useLogin } from 'src/composables/useLogin';
import useNotify from 'src/composables/useNotify';
import VnLogo from 'components/ui/VnLogo.vue'; import VnLogo from 'components/ui/VnLogo.vue';
import VnInput from 'src/components/common/VnInput.vue'; import VnInput from 'src/components/common/VnInput.vue';
import axios from 'axios'; import axios from 'axios';
@ -15,16 +14,14 @@ const session = useSession();
const loginCache = useLogin(); const loginCache = useLogin();
const router = useRouter(); const router = useRouter();
const { t } = useI18n(); const { t } = useI18n();
const { notify } = useNotify();
const username = ref(''); const username = ref('');
const password = ref(''); const password = ref('');
const keepLogin = ref(true); const keepLogin = ref(true);
async function onSubmit() { async function onSubmit() {
const params = { const params = { user: username.value, password: password.value };
user: username.value,
password: password.value,
};
try { try {
const { data } = await axios.post('Accounts/login', params); const { data } = await axios.post('Accounts/login', params);
if (!data) return; if (!data) return;
@ -33,11 +30,7 @@ async function onSubmit() {
await session.setLogin(data); await session.setLogin(data);
} catch (res) { } catch (res) {
if (res.response?.data?.error?.code === 'REQUIRES_2FA') { if (res.response?.data?.error?.code === 'REQUIRES_2FA') {
Notify.create({ notify(t('login.twoFactorRequired'), 'warning', 'phoneLink_lock');
message: t('login.twoFactorRequired'),
icon: 'phoneLink_lock',
type: 'warning',
});
params.keepLogin = keepLogin.value; params.keepLogin = keepLogin.value;
loginCache.setUser(params); loginCache.setUser(params);
return router.push({ return router.push({
@ -45,10 +38,7 @@ async function onSubmit() {
query: router.currentRoute.value?.query, query: router.currentRoute.value?.query,
}); });
} }
Notify.create({ throw res;
message: t('login.loginError'),
type: 'negative',
});
} }
} }
</script> </script>

View File

@ -18,7 +18,7 @@ const noteFilter = computed(() => {
const body = { const body = {
vehicleFk: vehicleId.value, vehicleFk: vehicleId.value,
workerFk: user.value.id, userFk: user.value.id,
}; };
</script> </script>

View File

@ -24,10 +24,10 @@ const crudModelFilter = reactive({
where: { ticketFk: route.params.id }, where: { ticketFk: route.params.id },
}); });
const crudModelRequiredData = computed(() => ({ const crudModelDefaultData = computed(() => ({
created: Date.vnNew(),
packagingFk: null, packagingFk: null,
quantity: 0, quantity: 0,
created: Date.vnNew(),
ticketFk: route.params.id, ticketFk: route.params.id,
})); }));
@ -63,7 +63,7 @@ watch(
url="TicketPackagings" url="TicketPackagings"
model="TicketPackagings" model="TicketPackagings"
:filter="crudModelFilter" :filter="crudModelFilter"
:data-required="crudModelRequiredData" :data-default="crudModelDefaultData"
:default-remove="false" :default-remove="false"
auto-load auto-load
> >

View File

@ -719,6 +719,7 @@ watch(
:create-as-dialog="false" :create-as-dialog="false"
:crud-model="{ :crud-model="{
disableInfiniteScroll: true, disableInfiniteScroll: true,
insertOnLoad: false,
}" }"
:default-remove="false" :default-remove="false"
:default-reset="false" :default-reset="false"

View File

@ -181,6 +181,7 @@ const setUserParams = (params) => {
:create="false" :create="false"
:crud-model="{ :crud-model="{
disableInfiniteScroll: true, disableInfiniteScroll: true,
insertOnLoad: false,
}" }"
:table="{ :table="{
'row-key': 'itemFk', 'row-key': 'itemFk',

View File

@ -547,6 +547,7 @@ watch(route, () => {
}, },
]" ]"
v-text="col.value" v-text="col.value"
:data-cy="`extra-community-${col.name}`"
/> />
<TravelDescriptorProxy <TravelDescriptorProxy
v-if="col.name === 'id'" v-if="col.name === 'id'"

View File

@ -99,6 +99,10 @@ const columns = computed(() => [
workerFk: entityId, workerFk: entityId,
}, },
}" }"
:crud-model="{
insertOnLoad: false,
}"
order="paymentDate DESC" order="paymentDate DESC"
:columns="columns" :columns="columns"
auto-load auto-load

View File

@ -128,6 +128,9 @@ const columns = computed(() => [
workerFk: entityId, workerFk: entityId,
}, },
}" }"
:crud-model="{
insertOnLoad: false,
}"
order="id DESC" order="id DESC"
:columns="columns" :columns="columns"
auto-load auto-load

View File

@ -109,6 +109,9 @@ const columns = [
workerFk: entityId, workerFk: entityId,
}, },
}" }"
:crud-model="{
insertOnLoad: false,
}"
order="date DESC" order="date DESC"
:columns="columns" :columns="columns"
auto-load auto-load

View File

@ -1,28 +1,26 @@
<script setup> <script setup>
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useState } from 'src/composables/useState';
import VnNotes from 'src/components/ui/VnNotes.vue'; import VnNotes from 'src/components/ui/VnNotes.vue';
const route = useRoute(); const route = useRoute();
const state = useState();
const user = state.getUser();
const userFilter = { const userFilter = {
order: 'created DESC', order: 'created DESC',
include: {
relation: 'worker',
scope: {
fields: ['id', 'firstName', 'lastName'],
include: { include: {
relation: 'user', relation: 'user',
scope: { scope: {
fields: ['id', 'nickname', 'name'], fields: ['id', 'nickname', 'name'],
}, },
}, },
},
},
}; };
const body = { workerFk: route.params.id }; const body = {
workerFk: route.params.id,
userFk: user.value.id,
};
</script> </script>
<template> <template>

View File

@ -170,6 +170,9 @@ function isSigned(row) {
'row-key': 'deviceProductionFk', 'row-key': 'deviceProductionFk',
selection: 'multiple', selection: 'multiple',
}" }"
:crud-model="{
insertOnLoad: false,
}"
:table-filter="{ hiddenTags: ['userFk'] }" :table-filter="{ hiddenTags: ['userFk'] }"
> >
<template #moreBeforeActions> <template #moreBeforeActions>

View File

@ -66,6 +66,8 @@ const excludeType = computed({
const arrayData = useArrayData('ZoneEvents'); const arrayData = useArrayData('ZoneEvents');
const exclusionGeoCreate = async () => { const exclusionGeoCreate = async () => {
if (await zoneHasTickets(route.params.id, dated.value)) return;
const params = { const params = {
zoneFk: parseInt(route.params.id), zoneFk: parseInt(route.params.id),
date: dated.value, date: dated.value,
@ -87,6 +89,8 @@ const exclusionCreate = async () => {
}; };
const zoneIds = props.zoneIds?.length ? props.zoneIds : [route.params.id]; const zoneIds = props.zoneIds?.length ? props.zoneIds : [route.params.id];
for (const id of zoneIds) { for (const id of zoneIds) {
if (await zoneHasTickets(id, dated.value)) return;
const url = `Zones/${id}/exclusions`; const url = `Zones/${id}/exclusions`;
let today = moment(dated.value); let today = moment(dated.value);
let lastDay = today.clone().add(nMonths, 'months').endOf('month'); let lastDay = today.clone().add(nMonths, 'months').endOf('month');
@ -123,6 +127,26 @@ const exclusionCreate = async () => {
await refetchEvents(); await refetchEvents();
}; };
const zoneHasTickets = async (zoneId, date) => {
const filter = {
where: {
zoneFk: zoneId,
shipped: date,
},
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get('Tickets', { params });
if (data.length > 0) {
quasar.notify({
message: t('eventsExclusionForm.cantCloseZone'),
type: 'negative',
});
await refetchEvents();
return true;
}
return false;
};
const onSubmit = async () => { const onSubmit = async () => {
if (excludeType.value === 'all') exclusionCreate(); if (excludeType.value === 'all') exclusionCreate();
else exclusionGeoCreate(); else exclusionGeoCreate();

View File

@ -80,6 +80,7 @@ eventsExclusionForm:
all: All all: All
specificLocations: Specific locations specificLocations: Specific locations
rootTreeLabel: Locations where it is not distributed rootTreeLabel: Locations where it is not distributed
cantCloseZone: Can not close this zone because there are tickets programmed for that day
eventsInclusionForm: eventsInclusionForm:
addEvent: Add event addEvent: Add event
editEvent: Edit event editEvent: Edit event

View File

@ -81,6 +81,7 @@ eventsExclusionForm:
all: Todo all: Todo
specificLocations: Localizaciones concretas specificLocations: Localizaciones concretas
rootTreeLabel: Localizaciones en las que no se reparte rootTreeLabel: Localizaciones en las que no se reparte
cantCloseZone: No se puede cerrar la zona porque hay tickets programados para ese día
eventsInclusionForm: eventsInclusionForm:
addEvent: Añadir evento addEvent: Añadir evento
editEvent: Editar evento editEvent: Editar evento

View File

@ -24,13 +24,8 @@ export CI=true
export TZ=Europe/Madrid export TZ=Europe/Madrid
# IMAGES # IMAGES
docker build -t registry.verdnatura.es/salix-back:dev -f "$salix_dir/back/Dockerfile" "$salix_dir" docker-compose -f test/cypress/docker-compose.yml --project-directory . pull db
cd "$salix_dir" && npx myt run -t docker-compose -f test/cypress/docker-compose.yml --project-directory . pull back
docker exec vn-database sh -c "rm -rf /mysql-template"
docker exec vn-database sh -c "cp -a /var/lib/mysql /mysql-template"
docker commit vn-database registry.verdnatura.es/salix-db:dev
docker rm -f vn-database
cd "$current_dir"
docker build -f ./docs/Dockerfile.dev -t lilium-dev . docker build -f ./docs/Dockerfile.dev -t lilium-dev .
# END IMAGES # END IMAGES

View File

@ -1,4 +1,4 @@
describe('Account descriptor', () => { describe('Account descriptor', { testIsolation: true }, () => {
const descriptorOptions = '[data-cy="descriptor-more-opts-menu"] > .q-list'; const descriptorOptions = '[data-cy="descriptor-more-opts-menu"] > .q-list';
const url = '/#/account/1/summary'; const url = '/#/account/1/summary';

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('ClaimDevelopment', () => { describe('ClaimDevelopment', { testIsolation: true }, () => {
const claimId = 1; const claimId = 1;
const firstLineReason = 'tbody > :nth-child(1) > :nth-child(2)'; const firstLineReason = 'tbody > :nth-child(1) > :nth-child(2)';
const thirdRow = 'tbody > :nth-child(3)'; const thirdRow = 'tbody > :nth-child(3)';

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('Client fiscal data', () => { describe('Client fiscal data', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.viewport(1280, 720); cy.viewport(1280, 720);
cy.login('developer'); cy.login('developer');

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('Client list', () => { describe('Client list', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.login('developer'); cy.login('developer');
cy.visit('/#/customer/list', { cy.visit('/#/customer/list', {

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('Entry PreAccount Functionality', () => { describe('Entry PreAccount Functionality', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.login('administrative'); cy.login('administrative');
cy.visit('/#/entry/pre-account'); cy.visit('/#/entry/pre-account');

View File

@ -1,6 +1,6 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
import moment from 'moment'; import moment from 'moment';
describe('InvoiceInBasicData', () => { describe('InvoiceInBasicData', { testIsolation: true }, () => {
const dialogInputs = '.q-dialog input'; const dialogInputs = '.q-dialog input';
const getDocumentBtns = (opt) => `[data-cy="dms-buttons"] > :nth-child(${opt})`; const getDocumentBtns = (opt) => `[data-cy="dms-buttons"] > :nth-child(${opt})`;
const futureDate = moment().add(1, 'days').format('DD-MM-YYYY'); const futureDate = moment().add(1, 'days').format('DD-MM-YYYY');

View File

@ -1,4 +1,4 @@
describe('invoiceInCorrective', () => { describe('invoiceInCorrective', { testIsolation: true }, () => {
beforeEach(() => cy.login('administrative')); beforeEach(() => cy.login('administrative'));
it('should modify the invoice', () => { it('should modify the invoice', () => {

View File

@ -1,4 +1,4 @@
describe('InvoiceInDescriptor', () => { describe('InvoiceInDescriptor', { testIsolation: true }, () => {
beforeEach(() => cy.login('administrative')); beforeEach(() => cy.login('administrative'));
describe('more options', () => { describe('more options', () => {

View File

@ -24,6 +24,7 @@ describe('InvoiceOut list', () => {
}); });
it.skip('should download all pdfs', () => { it.skip('should download all pdfs', () => {
cy.get(columnCheckbox).click();
cy.get(columnCheckbox).click(); cy.get(columnCheckbox).click();
cy.dataCy('InvoiceOutDownloadPdfBtn').click(); cy.dataCy('InvoiceOutDownloadPdfBtn').click();
}); });

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('InvoiceOut summary', () => { describe('InvoiceOut summary', { testIsolation: true }, () => {
const transferInvoice = { const transferInvoice = {
Client: { val: 'employee', type: 'select' }, Client: { val: 'employee', type: 'select' },
Type: { val: 'Error in customer data', type: 'select' }, Type: { val: 'Error in customer data', type: 'select' },

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('ItemBarcodes', () => { describe('ItemBarcodes', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.login('developer'); cy.login('developer');
cy.visit(`/#/item/1/barcode`); cy.visit(`/#/item/1/barcode`);

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('Item summary', () => { describe('Item summary', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.login('developer'); cy.login('developer');
cy.visit(`/#/item/1/summary`); cy.visit(`/#/item/1/summary`);

View File

@ -1,4 +1,4 @@
describe('Item tag', () => { describe('Item tag', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.login('developer'); cy.login('developer');
cy.visit(`/#/item/1/tags`); cy.visit(`/#/item/1/tags`);

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('Login', () => { describe('Login', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.visit('/#/login'); cy.visit('/#/login');
cy.get('#switchLanguage').click(); cy.get('#switchLanguage').click();

View File

@ -1,18 +1,17 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('Logout', () => { describe('Logout', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.login('developer'); cy.login('developer');
cy.visit(`/#/dashboard`); cy.visit(`/#/dashboard`);
cy.waitForElement('.q-page', 6000); cy.waitForElement('.q-page', 6000);
}); });
describe('by user', () => {
it('should logout', () => { it('should logout', () => {
cy.get('#user').click(); cy.get('#user').click();
cy.get('#logout').click(); cy.get('#logout').click();
}); });
});
describe('not user', () => { it('should throw session expired error if token has expired or is not valid during navigation', () => {
beforeEach(() => {
cy.intercept('GET', '**StarredModules**', { cy.intercept('GET', '**StarredModules**', {
statusCode: 401, statusCode: 401,
body: { body: {
@ -25,13 +24,9 @@ describe('Logout', () => {
}, },
statusMessage: 'AUTHORIZATION_REQUIRED', statusMessage: 'AUTHORIZATION_REQUIRED',
}).as('badRequest'); }).as('badRequest');
});
it('when token not exists', () => {
cy.get('.q-list').should('be.visible').first().should('be.visible').click(); cy.get('.q-list').should('be.visible').first().should('be.visible').click();
cy.wait('@badRequest'); cy.wait('@badRequest');
cy.checkNotification('Authorization Required'); cy.checkNotification('Your session has expired. Please log in again');
});
}); });
}); });

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('Monitor Tickets Table', () => { describe('Monitor Tickets Table', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.viewport(1920, 1080); cy.viewport(1920, 1080);
cy.login('salesPerson'); cy.login('salesPerson');

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe.skip('OrderCatalog', () => { describe('OrderCatalog', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.login('developer'); cy.login('developer');
cy.viewport(1920, 1080); cy.viewport(1920, 1080);

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('OrderList', () => { describe('OrderList', { testIsolation: true }, () => {
const clientCreateSelect = '#formModel [data-cy="Client_select"]'; const clientCreateSelect = '#formModel [data-cy="Client_select"]';
const addressCreateSelect = '#formModel [data-cy="Address_select"]'; const addressCreateSelect = '#formModel [data-cy="Address_select"]';
const agencyCreateSelect = '#formModel [data-cy="Agency_select"]'; const agencyCreateSelect = '#formModel [data-cy="Agency_select"]';

View File

@ -1,4 +1,4 @@
describe('Cmr list', () => { describe('Cmr list', { testIsolation: true }, () => {
const getLinkSelector = (colField) => const getLinkSelector = (colField) =>
`tr:first-child > [data-col-field="${colField}"] > .no-padding > .link`; `tr:first-child > [data-col-field="${colField}"] > .no-padding > .link`;

View File

@ -1,4 +1,4 @@
describe('RoadMap', () => { describe.skip('RoadMap', () => {
const getSelector = (colField) => const getSelector = (colField) =>
`tr:last-child > [data-col-field="${colField}"] > .no-padding`; `tr:last-child > [data-col-field="${colField}"] > .no-padding`;

View File

@ -1,4 +1,4 @@
describe('RouteAutonomous', () => { describe('RouteAutonomous', { testIsolation: true }, () => {
const getLinkSelector = (colField, link = true) => const getLinkSelector = (colField, link = true) =>
`tr:first-child > [data-col-field="${colField}"] > .no-padding${ `tr:first-child > [data-col-field="${colField}"] > .no-padding${
link ? ' > .link' : '' link ? ' > .link' : ''

View File

@ -1,4 +1,4 @@
describe('Route', () => { describe('Route', { testIsolation: true }, () => {
const getSelector = (colField) => const getSelector = (colField) =>
`tr:last-child > [data-col-field="${colField}"] > .no-padding > .link`; `tr:last-child > [data-col-field="${colField}"] > .no-padding > .link`;

View File

@ -1,4 +1,4 @@
describe('Vehicle DMS', () => { describe('Vehicle DMS', { testIsolation: true }, () => {
const getSelector = (btnPosition) => const getSelector = (btnPosition) =>
`tr:last-child > .text-right > .no-wrap > :nth-child(${btnPosition}) > .q-btn > .q-btn__content > .q-icon`; `tr:last-child > .text-right > .no-wrap > :nth-child(${btnPosition}) > .q-btn > .q-btn__content > .q-icon`;

View File

@ -1,7 +1,7 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
const firstRow = 'tbody > :nth-child(1)'; const firstRow = 'tbody > :nth-child(1)';
describe('TicketSale', () => { describe('TicketSale', { testIsolation: true }, () => {
describe('Ticket #23', () => { describe('Ticket #23', () => {
beforeEach(() => { beforeEach(() => {
cy.login('claimManager'); cy.login('claimManager');

View File

@ -0,0 +1,16 @@
describe('Travel Extracommunity', () => {
it('Should show travels', () => {
cy.login('logistic');
cy.visit(`/#/travel/extra-community`);
cy.get('.q-page').should('be.visible');
});
it('Should show travels when user is supplier', () => {
cy.login('petterparker');
cy.visit(`/#/travel/extra-community`);
cy.get('[data-cy="vnFilterPanelChip_continent"] > .q-chip__icon--remove').click();
cy.dataCy('extra-community-cargoSupplierNickname').each(($el) => {
cy.wrap($el).should('contain.text', 'The farmer');
});
});
});

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('UserPanel', () => { describe('UserPanel', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.viewport(1280, 720); cy.viewport(1280, 720);
cy.login('developer'); cy.login('developer');

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('VnBreadcrumbs', () => { describe('VnBreadcrumbs', { testIsolation: true }, () => {
const lastBreadcrumb = '.q-breadcrumbs--last > .q-breadcrumbs__el'; const lastBreadcrumb = '.q-breadcrumbs--last > .q-breadcrumbs__el';
beforeEach(() => { beforeEach(() => {
cy.login('developer'); cy.login('developer');

View File

@ -1,6 +1,6 @@
const { randomNumber, randomString } = require('../../support'); const { randomNumber, randomString } = require('../../support');
describe('VnLocation', () => { describe('VnLocation', { testIsolation: true }, () => {
const locationOptions = '[role="listbox"] > div.q-virtual-scroll__content > .q-item'; const locationOptions = '[role="listbox"] > div.q-virtual-scroll__content > .q-item';
const dialogInputs = '.q-dialog label input'; const dialogInputs = '.q-dialog label input';
const createLocationButton = '.q-form > .q-card > .vn-row:nth-child(6) .--add-icon'; const createLocationButton = '.q-form > .q-card > .vn-row:nth-child(6) .--add-icon';

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('VnLog', () => { describe('VnLog', { testIsolation: true }, () => {
beforeEach(() => { beforeEach(() => {
cy.login('developer'); cy.login('developer');
cy.visit(`/#/claim/${1}/log`); cy.visit(`/#/claim/${1}/log`);

View File

@ -1,4 +1,4 @@
describe('WorkerCreate', () => { describe('WorkerCreate', { testIsolation: true }, () => {
const externalRadio = '.q-radio:nth-child(2)'; const externalRadio = '.q-radio:nth-child(2)';
const developerBossId = 120; const developerBossId = 120;
const payMethodCross = const payMethodCross =

View File

@ -1,4 +1,4 @@
describe('WorkerManagement', () => { describe('WorkerManagement', { testIsolation: true }, () => {
const nif = '12091201A'; const nif = '12091201A';
const searchButton = '.q-scrollarea__content > .q-btn--standard > .q-btn__content'; const searchButton = '.q-scrollarea__content > .q-btn--standard > .q-btn__content';
const url = '/#/worker/management'; const url = '/#/worker/management';

View File

@ -1,4 +1,4 @@
describe('WorkerNotificationsManager', () => { describe('WorkerNotificationsManager', { testIsolation: true }, () => {
const salesPersonId = 18; const salesPersonId = 18;
const developerId = 9; const developerId = 9;

View File

@ -1,4 +1,4 @@
describe('ZoneBasicData', () => { describe('ZoneBasicData', { testIsolation: true }, () => {
const priceBasicData = '[data-cy="ZoneBasicDataPrice"]'; const priceBasicData = '[data-cy="ZoneBasicDataPrice"]';
const saveBtn = '.q-btn-group > .q-btn--standard'; const saveBtn = '.q-btn-group > .q-btn--standard';

View File

@ -1,4 +1,4 @@
describe('ZoneCalendar', () => { describe('ZoneCalendar', { testIsolation: true }, () => {
const addEventBtn = '.q-page-sticky > div > .q-btn'; const addEventBtn = '.q-page-sticky > div > .q-btn';
const submitBtn = '.q-mt-lg > .q-btn--standard'; const submitBtn = '.q-mt-lg > .q-btn--standard';
const deleteBtn = 'ZoneEventsPanelDeleteBtn'; const deleteBtn = 'ZoneEventsPanelDeleteBtn';
@ -47,4 +47,20 @@ describe('ZoneCalendar', () => {
cy.dataCy('ZoneEventExclusionDeleteBtn').click(); cy.dataCy('ZoneEventExclusionDeleteBtn').click();
cy.dataCy('VnConfirm_confirm').click(); cy.dataCy('VnConfirm_confirm').click();
}); });
it(
'should not exclude an event if there are tickets for that zone and day',
{ testIsoaltion: true },
() => {
cy.visit(`/#/zone/3/events`);
cy.get('.q-mb-sm > .q-radio__inner').click();
cy.get(
'.q-current-day > .q-calendar-month__day--content > [data-cy="ZoneCalendarDay"]',
).click();
cy.get('.q-mt-lg > .q-btn--standard').click();
cy.checkNotification(
'Can not close this zone because there are tickets programmed for that day',
);
},
);
}); });

View File

@ -1,4 +1,4 @@
describe('ZoneCreate', () => { describe('ZoneCreate', { testIsolation: true }, () => {
const data = { const data = {
Name: { val: 'Zone pickup D' }, Name: { val: 'Zone pickup D' },
Price: { val: '3' }, Price: { val: '3' },

View File

@ -26,27 +26,8 @@ describe('ZoneDeliveryDays', () => {
}); });
}).as('events'); }).as('events');
cy.dataCy('ZoneDeliveryDaysPostcodeSelect').type(postcode); cy.selectOption('[data-cy="ZoneDeliveryDaysPostcodeSelect"]', postcode);
cy.get('.q-menu .q-item').contains(postcode).click(); cy.selectOption('[data-cy="ZoneDeliveryDaysAgencySelect"]', agency);
cy.get('.q-menu').then(($menu) => {
if ($menu.is(':visible')) {
cy.get('[data-cy="ZoneDeliveryDaysPostcodeSelect"]')
.as('focusedElement')
.focus();
cy.get('@focusedElement').blur();
}
});
cy.dataCy('ZoneDeliveryDaysAgencySelect').type(agency);
cy.get('.q-menu .q-item').contains(agency).click();
cy.get('.q-menu').then(($menu) => {
if ($menu.is(':visible')) {
cy.get('[data-cy="ZoneDeliveryDaysAgencySelect"]')
.as('focusedElement')
.focus();
cy.get('@focusedElement').blur();
}
});
cy.get(submitForm).click(); cy.get(submitForm).click();
cy.wait('@events').then((interception) => { cy.wait('@events').then((interception) => {