Compare commits

...

126 Commits

Author SHA1 Message Date
Carlos Satorres 351dc012eb Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7917-freelancerRoute
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-22 10:29:17 +01:00
Carlos Andrés 6c866e48a0 Merge branch 'test' into dev
gitea/salix-front/pipeline/head There was a failure building this commit Details
2024-11-21 16:02:41 +01:00
Carlos Andrés e04d77f55e Merge pull request 'feat: refs#8087 Redadas en travel' (!984) from travelisRaidTest into test
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #984
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-21 14:56:09 +00:00
Carlos Andrés 5268140d8b feat: refs#8087 Redadas en travel
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-21 15:51:27 +01:00
Carlos Andrés 977512cae0 Merge pull request 'feat: refs #8087 refs#8087 Redadas en travel' (!908) from 8087-nuevosCamposTravel into dev
gitea/salix-front/pipeline/head There was a failure building this commit Details
Reviewed-on: #908
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-21 11:51:51 +00:00
Carlos Andrés 242bf6f318 Merge branch 'dev' into 8087-nuevosCamposTravel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-21 11:45:20 +00:00
Alex Moreno fdc71a13ff Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-21 10:26:38 +01:00
Alex Moreno bf0bda0e27 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-21 10:26:29 +01:00
Javier Segarra 3bc5c9bd6a Merge pull request '#8162 - E2E Tickets' (!951) from wbuezas/salix-front-mindshore-fork2:8162-E2ETickets into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #951
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2024-11-21 09:19:54 +00:00
Jon Elias 0cefe391cb Merge pull request 'Hotfix: Show only the correct path of the search' (!954) from Hotfix-ZoneLocationsTree into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #954
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-21 09:15:45 +00:00
Jon Elias 747bc4af76 Merge branch 'master' into Hotfix-ZoneLocationsTree
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-21 09:13:42 +00:00
Jon Elias 5ff95c2b93 fix: locations tree
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-21 10:10:44 +01:00
Alex Moreno 0c3581f3dc Merge pull request 'hotFix(orderCatalogFilter): fix searchByTag' (!961) from hotFix_orderCatalogFilter_values into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #961
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2024-11-21 09:09:51 +00:00
Javier Segarra f36363dbd2 Merge pull request 'warmfix: ItemLastEntries to date' (!981) from warmfix_itemLastEntriesFilter into test
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #981
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
2024-11-21 09:09:50 +00:00
Javier Segarra e5434e7436 warmfix: ItemLastEntries to date
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-21 09:08:52 +00:00
Javier Segarra 0434332ec4 Merge branch 'master' into hotFix_orderCatalogFilter_values
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-21 08:27:13 +00:00
Javier Segarra 81d7b9f04f Merge branch 'dev' into 8162-E2ETickets
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-21 08:20:29 +00:00
Javier Segarra 6f324b44b8 Merge pull request 'WARMFIX: e2e jsegarra' (!973) from fix_js_e2e into test
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #973
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-21 08:20:21 +00:00
Javier Segarra 5a90434425 Merge branch 'test' into fix_js_e2e
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-21 08:19:21 +00:00
Jon Elias e943838dbe Merge pull request '#8038 added new functionality in VnSelect and refactored styles' (!871) from 8038-ImproveAndCorrectVnTable into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #871
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-21 07:08:13 +00:00
Jon Elias 4d8d56eb6e Merge branch 'dev' into 8038-ImproveAndCorrectVnTable
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-21 07:05:59 +00:00
Alex Moreno 9e41459da4 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-21 07:59:53 +01:00
Alex Moreno 6b8470d6e1 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-21 07:59:42 +01:00
Javier Segarra 350c28eef0 Merge pull request 'HOTfix: use id instead description to open InvoiceOutDescriptor' (!980) from hotFix_customer_balance_email into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #980
2024-11-21 06:52:01 +00:00
Alex Moreno 44f2ecca28 chore: requested changes
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-21 07:49:10 +01:00
Alex Moreno c5acde22a3 chore: requested changes
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-21 07:42:00 +01:00
Alex Moreno c1e06325d3 Merge pull request '#7874 show name' (!978) from 7874-warmfix-useName into test
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #978
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-21 06:04:47 +00:00
William Buezas 8e411125bf test: refs #8162 more tests and change data-testid for data-cy
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-20 18:58:08 -03:00
Javier Segarra 3b5d385d22 fix: use id instead description to open InvoiceOutDescriptor
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-20 22:43:04 +01:00
Carlos Andrés 087ec5f39f Merge branch 'dev' into 8087-nuevosCamposTravel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-20 18:06:04 +00:00
Jorge Penadés 7039b68bba fix: refs #7874 show name
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-20 17:23:40 +01:00
Javi Gallego bc173d9f6a fix: removed selectedClient
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-20 15:35:37 +01:00
Carlos Andrés c21785b1f6 Merge branch '8087-nuevosCamposTravel' of https://gitea.verdnatura.es/verdnatura/salix-front into 8087-nuevosCamposTravel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-20 14:29:56 +01:00
Carlos Andrés 16133faca7 feat: refs #8087 refs#8087 Redadas en travel 2024-11-20 14:29:53 +01:00
Alex Moreno 42d24359cd Merge branch 'master' into hotFix_orderCatalogFilter_values
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-20 12:40:39 +00:00
Alex Moreno abd79283ff fix(CatalogFilterValueDialog): from dev and fix
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-20 13:38:22 +01:00
Javi Gallego 2a1cc49499 fix: ticketDescriptor
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-20 13:15:40 +01:00
Carlos Andrés 317e9ad034 Merge branch 'dev' into 8087-nuevosCamposTravel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-20 12:14:50 +00:00
Javier Segarra d6aedad38e perf: use const in VnLocation
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-20 10:07:03 +01:00
Javier Segarra deb6467af8 feat: remove comments
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-20 10:05:10 +01:00
Javier Segarra 9da0488184 feat: remove comments 2024-11-20 10:03:23 +01:00
Carlos Satorres 093e6cb0e8 Merge pull request 'fix: fix create bankEntity' (!976) from hotfix-createBankEntity into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #976
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-20 09:02:01 +00:00
Carlos Satorres 131cd2de8c fix: options
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-20 09:53:52 +01:00
Carlos Satorres 2d5d1c549b Merge branch 'hotfix-createBankEntity' of https://gitea.verdnatura.es/verdnatura/salix-front into hotfix-createBankEntity
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-20 09:52:14 +01:00
Carlos Satorres c59baf9cf5 fix: fix code 2024-11-20 09:52:11 +01:00
Javier Segarra 226f604f9d test: #8162 fix vnLocation spec
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-20 09:37:47 +01:00
Alex Moreno 51beef3cbe Merge branch 'master' into hotfix-createBankEntity
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-20 08:27:58 +00:00
Javier Segarra e10ee5e6c7 test: #8162 fix vnLocation spec
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-20 09:26:40 +01:00
Alex Moreno 32fdc836f9 fix(OrderCatalogFilter): fix field value
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-20 09:26:38 +01:00
Javier Segarra 1fb927488a test: #8162 fix clientList spec 2024-11-20 09:26:33 +01:00
Carlos Satorres 2806c94fdb fix: fix create bankEntity
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-20 09:22:50 +01:00
Jon Elias 71c26c2fa7 Merge pull request '#6999 added search when user tabs on a filter with value' (!888) from 6999-AddTabToFilter into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #888
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-20 07:26:30 +00:00
Jon Elias 26ee54c488 Merge branch 'dev' into 6999-AddTabToFilter
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-20 07:25:50 +00:00
Javier Segarra 68c9baa7f6 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into fix_js_e2e 2024-11-20 08:12:51 +01:00
Alex Moreno eee5873283 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-20 08:04:40 +01:00
Alex Moreno e032d5988b Merge branch 'master' into hotFix_orderCatalogFilter_values
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-20 07:04:36 +00:00
Alex Moreno 98ac560b16 Merge pull request 'warmFix_vnSearchBar.spec' (!975) from warmFix_vnSearchBar.spec into test
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #975
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
2024-11-20 07:03:53 +00:00
Alex Moreno c1d9650c60 Merge branch 'test' into warmFix_vnSearchBar.spec
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-20 07:02:22 +00:00
Alex Moreno e33bb9f8b5 Merge pull request 'fix: logout spec' (!974) from warmFix_logout.spec into test
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #974
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
2024-11-20 07:02:17 +00:00
Alex Moreno 3ba8402dfd fix: vnSearchbar spec
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-20 08:01:50 +01:00
Alex Moreno 67a5800a66 fix: logout spec
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-20 07:57:45 +01:00
Alex Moreno 46430d1b6d Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-20 07:42:35 +01:00
Alex Moreno 44134a8fec Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-20 07:42:25 +01:00
Alex Moreno fef7dd9ac1 fix(MonitorOrders): translation sendDate → landed
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-20 07:41:39 +01:00
Pablo Natek cbdce8f474 Merge pull request '#8138 add-component-ticketProblems' (!962) from 8138-add-component-ticketProblems into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #962
2024-11-20 05:02:50 +00:00
Pablo Natek 8b5a2cd159 Merge branch 'dev' into 8138-add-component-ticketProblems
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-20 05:02:13 +00:00
Jorge Penadés bc73996dfe Merge pull request 'fix: refs #8166 show zone error' (!972) from 8166-fixAdvanceTickets into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #972
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-19 17:29:16 +00:00
Javier Segarra b4ee19bcde test: #8162 fix clientList spec
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-19 15:56:27 +01:00
Jorge Penadés 8e9e8a8c78 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8166-fixAdvanceTickets
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-19 15:46:05 +01:00
Jorge Penadés 73b7fa7704 feat: refs #8166 show notification
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-19 15:43:55 +01:00
Jorge Penadés e54eb50265 fix: refs #8166 show zone error
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-19 15:35:57 +01:00
Javier Segarra e6f8b87890 Merge branch 'test' into fix_test_jsegarra 2024-11-19 15:05:39 +01:00
Alex Moreno a498e1178f Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-19 14:50:14 +01:00
Alex Moreno fdafeee39d Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-19 14:49:22 +01:00
Javier Segarra 8fb843a180 Merge pull request 'feat: add /reports in gitignore' (!970) from warmFix_reports_in_gitignore into test
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #970
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2024-11-19 13:42:47 +00:00
Alex Moreno 7b243a470c Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-19 14:41:47 +01:00
Alex Moreno 5f7fd91272 feat: add /reports in gitignore
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-19 14:41:07 +01:00
Alex Moreno 38c2f89fba Merge pull request 'fix(VnSelect): setOptions when applyFilter' (!969) from warmFix_vnSelect into test
gitea/salix-front/pipeline/pr-dev This commit looks good Details
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #969
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2024-11-19 13:40:21 +00:00
Alex Moreno 14e6b870ac Merge branch 'test' into warmFix_vnSelect
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-19 13:29:15 +00:00
Alex Moreno 8714980595 fix(VnSelect): setOptions when applyFilter
gitea/salix-front/pipeline/pr-test Build queued... Details
2024-11-19 14:28:43 +01:00
Jon Elias bdae26ba08 Merge pull request 'Warmfix: worker test e2e' (!968) from Fix-WorkerCreateE2E into test
gitea/salix-front/pipeline/pr-dev This commit looks good Details
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #968
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-19 13:19:20 +00:00
Jon Elias 1b68d3c5ea Merge branch 'test' into Fix-WorkerCreateE2E
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-19 13:16:41 +00:00
Jon Elias f43e974bbc fix: worker test e2e
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-19 14:14:50 +01:00
Carlos Andrés 5da6e9b2ca Merge branch 'dev' of https: refs #8087//gitea.verdnatura.es/verdnatura/salix-front into 8087-nuevosCamposTravel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-19 14:04:13 +01:00
Pablo Natek fb5e38dc0b Merge branch 'dev' into 8138-add-component-ticketProblems
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-19 12:54:49 +00:00
Pablo Natek 479c428edf Merge branch '8138-add-component-ticketProblems' of https://gitea.verdnatura.es/verdnatura/salix-front into 8138-add-component-ticketProblems
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-19 13:51:23 +01:00
Pablo Natek 3824f5d124 fix: refs #8138 move component from ui folder 2024-11-19 13:51:19 +01:00
Javier Segarra 65100fcf25 test: fix e2e 2024-11-19 13:45:44 +01:00
Jorge Penadés 794036b880 Merge pull request '#7323 warmfix-addRemainingFields' (!965) from 7323-warfix-addRemainingFields into test
gitea/salix-front/pipeline/pr-dev This commit looks good Details
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #965
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-19 12:37:28 +00:00
Javier Segarra 5515f55bf6 test: fix e2e 2024-11-19 12:51:05 +01:00
Jon Elias 98017df57d fix: refs #8038 solve conflicts
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-19 12:25:15 +01:00
Jon Elias 7cef1d11be Merge branch '8038-ImproveAndCorrectVnTable' of https://gitea.verdnatura.es/verdnatura/salix-front into 8038-ImproveAndCorrectVnTable
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-11-19 12:22:17 +01:00
Jon Elias cf6695f7ff Merge branch 'dev' of https: refs #8038//gitea.verdnatura.es/verdnatura/salix-front into 8038-ImproveAndCorrectVnTable 2024-11-19 12:22:15 +01:00
Robert Ferrús ff272ab6c3 Merge pull request 'fix(Supplier): change isSerious to isReal' (!966) from hotFix_supplier_isReal into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #966
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-19 11:07:15 +00:00
Robert Ferrús 8a1db719e3 fix(Supplier): change isSerious to isReal
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-19 11:58:16 +01:00
Jorge Penadés 1faab668b1 fix: refs #7323 show advanced fields
gitea/salix-front/pipeline/pr-test This commit looks good Details
2024-11-19 11:53:33 +01:00
Jorge Penadés 38ccf464b7 fix: refs #7323 locale #7396 2024-11-19 11:52:00 +01:00
Carlos Andrés 8c20b8736b feat: refs #8087 refs#8087 Redadas en travel
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-11-19 11:10:37 +01:00
Jon Elias 5acce4d61d Merge branch 'dev' into 6999-AddTabToFilter
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-19 09:21:10 +00:00
Alex Moreno bbb20ec4e6 Merge pull request 'fix(VnPaginate): disable pagination' (!964) from hotFix_disable_pagination into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #964
Reviewed-by: Jorge Penadés <jorgep@verdnatura.es>
2024-11-19 08:48:52 +00:00
Alex Moreno 5d58bb0c13 fix(VnPaginate): disable pagination
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-19 09:47:59 +01:00
Alex Moreno e7b431e9ec fix(VnPaginate): disable pagination
gitea/salix-front/pipeline/pr-master There was a failure building this commit Details
2024-11-19 09:32:35 +01:00
Pablo Natek 6ab31fa2d2 Merge branch 'dev' into 8138-add-component-ticketProblems
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-19 07:02:32 +00:00
Pablo Natek f999760205 fix: refs #8138 sme minor issues
gitea/salix-front/pipeline/pr-dev Build queued... Details
2024-11-19 07:59:45 +01:00
Pablo Natek e119bf5bfc feat: refs #8138 add component ticket problems 2024-11-19 07:59:14 +01:00
Alex Moreno c2db7be8cd fix(orderCatalogFilter): fix searchByTag
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-18 15:06:09 +01:00
William Buezas 28bfda869a refactor: refs #8162 remove comment
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-18 10:47:57 -03:00
Javier Segarra 73072794ee test: refs #8162 #8162 fix TicketList spec
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-18 14:41:27 +01:00
Javier Segarra 2f06eea8ea Merge branch 'dev' into 8162-E2ETickets
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-18 12:03:10 +00:00
Jon Elias a64575c7cc Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into Hotfix-ZoneLocationsTree
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-18 09:48:02 +01:00
Jon Elias 452ba788c9 fix: how only the correct path of the search
gitea/salix-front/pipeline/pr-master There was a failure building this commit Details
2024-11-18 09:46:34 +01:00
William Buezas d8c1bd5b16 test: refs #8162 more tests
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-17 15:24:46 -03:00
Jon Elias 8cfc2996d4 Merge branch 'dev' into 6999-AddTabToFilter
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-14 07:32:07 +00:00
Jon Elias 7f4a73fd56 feat: refs #6999 added tab to search in VnTable filter
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-14 08:30:55 +01:00
Jon Elias cc85d4ab4b Merge branch 'dev' into 8038-ImproveAndCorrectVnTable
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-13 11:02:33 +00:00
Jon Elias 9533c1a97e Merge branch 'dev' into 8038-ImproveAndCorrectVnTable
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-13 11:00:43 +00:00
Alex Moreno 9ac3316567 Merge branch 'dev' into 8087-nuevosCamposTravel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-13 07:56:33 +00:00
Jorge Penadés 4572817699 feat: refs #8087 reactive data
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-12 16:37:59 +01:00
Carlos Andrés b460a0be2f Merge branch '8087-nuevosCamposTravel' of https://gitea.verdnatura.es/verdnatura/salix-front into 8087-nuevosCamposTravel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-12 16:27:41 +01:00
Carlos Andrés 18593cc3f9 feat: refs #8087 refs#8087 Redadas en travel 2024-11-12 16:27:40 +01:00
Carlos Andrés 4a0c15ed90 Merge branch 'dev' into 8087-nuevosCamposTravel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-12 10:24:06 +00:00
William Buezas 4bfbd1925e test: refs #8162 ticket list e2e tests 2024-11-11 15:18:29 -03:00
Carlos Andrés e9fad1a44e feat: refs #8087 refs#8087 Redadas en travel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-11 15:00:07 +01:00
Carlos Andrés fc73149dcf feat: refs #8087 refs#8087 Redadas en travel
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-11 14:20:39 +01:00
Jon Elias 493e518339 feat: refs #6999 added search when user tabs on a filter with value
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-10-29 12:15:40 +01:00
Jon Elias e13090bb3b feat: refs #8038 added new functionality in VnSelect and refactor styles
gitea/salix-front/pipeline/pr-dev Build queued... Details
2024-10-25 07:01:58 +02:00
67 changed files with 691 additions and 509 deletions

View File

@ -9,8 +9,6 @@ import VnRow from 'components/ui/VnRow.vue';
import FormModelPopup from './FormModelPopup.vue';
import { useState } from 'src/composables/useState';
defineProps({ showEntityField: { type: Boolean, default: true } });
const emit = defineEmits(['onDataSaved']);
const { t } = useI18n();
const bicInputRef = ref(null);
@ -18,17 +16,16 @@ const state = useState();
const customer = computed(() => state.get('customer'));
const countriesFilter = {
fields: ['id', 'name', 'code'],
};
const bankEntityFormData = reactive({
name: null,
bic: null,
countryFk: customer.value?.countryFk,
id: null,
});
const countriesFilter = {
fields: ['id', 'name', 'code'],
};
const countriesOptions = ref([]);
const onDataSaved = (...args) => {
@ -44,7 +41,6 @@ onMounted(async () => {
<template>
<FetchData
url="Countries"
:filter="countriesFilter"
auto-load
@on-fetch="(data) => (countriesOptions = data)"
/>
@ -54,6 +50,7 @@ onMounted(async () => {
:title="t('title')"
:subtitle="t('subtitle')"
:form-initial-data="bankEntityFormData"
:filter="countriesFilter"
@on-data-saved="onDataSaved"
>
<template #form-inputs="{ data, validate }">
@ -85,7 +82,13 @@ onMounted(async () => {
:rules="validate('bankEntity.countryFk')"
/>
</div>
<div v-if="showEntityField" class="col">
<div
v-if="
countriesOptions.find((c) => c.id === data.countryFk)?.code ==
'ES'
"
class="col"
>
<VnInput
:label="t('id')"
v-model="data.id"

View File

@ -394,6 +394,7 @@ watch(formUrl, async () => {
@click="onSubmit"
:disable="!hasChanges"
:title="t('globals.save')"
data-cy="crudModelDefaultSaveBtn"
/>
<slot name="moreAfterActions" />
</QBtnGroup>

View File

@ -0,0 +1,40 @@
<script setup>
defineProps({ row: { type: Object, required: true } });
</script>
<template>
<span>
<QIcon
v-if="row.isTaxDataChecked === 0"
name="vn:no036"
color="primary"
size="xs"
>
<QTooltip>{{ $t('salesTicketsTable.noVerifiedData') }}</QTooltip>
</QIcon>
<QIcon v-if="row.hasTicketRequest" name="vn:buyrequest" color="primary" size="xs">
<QTooltip>{{ $t('salesTicketsTable.purchaseRequest') }}</QTooltip>
</QIcon>
<QIcon v-if="row.itemShortage" name="vn:unavailable" color="primary" size="xs">
<QTooltip>{{ $t('salesTicketsTable.notVisible') }}</QTooltip>
</QIcon>
<QIcon v-if="row.isFreezed" name="vn:frozen" color="primary" size="xs">
<QTooltip>{{ $t('salesTicketsTable.clientFrozen') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.risk"
name="vn:risk"
:color="row.hasHighRisk ? 'negative' : 'primary'"
size="xs"
>
<QTooltip>
{{ $t('salesTicketsTable.risk') }}: {{ row.risk - row.credit }}
</QTooltip>
</QIcon>
<QIcon v-if="row.hasComponentLack" name="vn:components" color="primary" size="xs">
<QTooltip>{{ $t('salesTicketsTable.componentLack') }}</QTooltip>
</QIcon>
<QIcon v-if="row.isTooLittle" name="vn:isTooLittle" color="primary" size="xs">
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
</QIcon>
</span>
</template>

View File

@ -143,6 +143,10 @@ function alignRow() {
const showFilter = computed(
() => $props.column?.columnFilter !== false && $props.column.name != 'tableActions'
);
const onTabPressed = async () => {
if (model.value) enterEvent['keyup.enter']();
};
</script>
<template>
<div
@ -157,6 +161,7 @@ const showFilter = computed(
v-model="model"
:components="components"
component-prop="columnFilter"
@keydown.tab="onTabPressed"
/>
</div>
</template>

View File

@ -324,6 +324,8 @@ function handleOnDataSaved(_) {
}
function handleScroll() {
if ($props.crudModel.disableInfiniteScroll) return;
const tMiddle = tableRef.value.$el.querySelector('.q-table__middle');
const { scrollHeight, scrollTop, clientHeight } = tMiddle;
const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 40;
@ -392,7 +394,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
:name="col.orderBy ?? col.name"
:data-key="$attrs['data-key']"
:search-url="searchUrl"
:vertical="true"
:vertical="false"
/>
</div>
<slot
@ -735,6 +737,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
fab
icon="add"
shortcut="+"
data-cy="vnTableCreateBtn"
/>
<QTooltip self="top right">
{{ createForm?.title }}

View File

@ -101,7 +101,13 @@ const mixinRules = [
<QIcon
name="close"
size="xs"
v-if="hover && value && !$attrs.disabled && $props.clearable"
v-if="
hover &&
value &&
!$attrs.disabled &&
!$attrs.readonly &&
$props.clearable
"
@click="
() => {
value = null;

View File

@ -138,8 +138,6 @@ onMounted(() => {
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
});
defineExpose({ opts: myOptions });
const arrayDataKey =
$props.dataKey ?? ($props.url?.length > 0 ? $props.url : $attrs.name ?? $attrs.label);
@ -202,7 +200,10 @@ async function fetchFilter(val) {
if (fields) fetchOptions.fields = fields;
if (sortBy) fetchOptions.order = sortBy;
arrayData.reset(['skip', 'filter.skip', 'page']);
return (await arrayData.applyFilter({ filter: fetchOptions }))?.data;
const { data } = await arrayData.applyFilter({ filter: fetchOptions });
setOptions(data);
return data;
}
async function filterHandler(val, update) {
@ -256,6 +257,30 @@ async function onScroll({ to, direction, from, index }) {
isLoading.value = false;
}
}
defineExpose({ opts: myOptions });
function handleKeyDown(event) {
if (event.key === 'Tab') {
event.preventDefault();
const inputValue = vnSelectRef.value?.inputValue;
if (inputValue) {
const matchingOption = myOptions.value.find(
(option) =>
option[optionLabel.value].toLowerCase() === inputValue.toLowerCase()
);
if (matchingOption) {
emit('update:modelValue', matchingOption[optionValue.value]);
} else {
emit('update:modelValue', inputValue);
}
vnSelectRef.value?.hidePopup();
}
}
}
</script>
<template>
@ -266,6 +291,7 @@ async function onScroll({ to, direction, from, index }) {
:option-value="optionValue"
v-bind="$attrs"
@filter="filterHandler"
@keydown="handleKeyDown"
:emit-value="nullishToTrue($attrs['emit-value'])"
:map-options="nullishToTrue($attrs['map-options'])"
:use-input="nullishToTrue($attrs['use-input'])"

View File

@ -86,7 +86,7 @@ async function send() {
</script>
<template>
<QDialog ref="dialogRef">
<QDialog ref="dialogRef" data-cy="vnSmsDialog">
<QCard class="q-pa-sm">
<QCardSection class="row items-center q-pb-none">
<span class="text-h6 text-grey">
@ -161,6 +161,7 @@ async function send() {
:loading="isLoading"
color="primary"
unelevated
data-cy="sendSmsBtn"
/>
</QCardActions>
</QCard>

View File

@ -130,6 +130,7 @@ async function search() {
dense
standout
autofocus
data-cy="vnSearchBar"
>
<template #prepend>
<QIcon

View File

@ -1,6 +1,5 @@
<script setup>
import { useRoute } from 'vue-router';
import { defineProps } from 'vue';
const props = defineProps({
routeName: {

View File

@ -241,7 +241,7 @@ input::-webkit-inner-spin-button {
th,
td {
padding: 1px 10px 1px 10px;
max-width: 100px;
max-width: 130px;
div span {
overflow: hidden;
white-space: nowrap;

View File

@ -584,15 +584,15 @@ worker:
role: Role
sipExtension: Extension
locker: Locker
fiDueDate: Fecha de caducidad del DNI
sex: Sexo
seniority: Antigüedad
fiDueDate: FI due date
sex: Sex
seniority: Seniority
fi: DNI/NIE/NIF
birth: Fecha de nacimiento
isFreelance: Autónomo
birth: Birth
isFreelance: Freelance
isSsDiscounted: Bonificación SS
hasMachineryAuthorized: Autorizado para llevar maquinaria
isDisable: Trabajador desactivado
hasMachineryAuthorized: Machinery authorized
isDisable: Disable
notificationsManager:
activeNotifications: Active notifications
availableNotifications: Available notifications
@ -708,7 +708,7 @@ supplier:
supplierName: Supplier name
basicData:
workerFk: Responsible
isSerious: Verified
isReal: Verified
isActive: Active
isPayMethodChecked: PayMethod checked
note: Notes
@ -768,6 +768,7 @@ travel:
hb: HB
basicData:
daysInForward: Days in forward
isRaid: Raid
thermographs:
temperature: Temperature
destination: Destination

View File

@ -580,9 +580,9 @@ worker:
newWorker: Nuevo trabajador
summary:
boss: Jefe
phoneExtension: Extensión de teléfono
entPhone: Teléfono de empresa
personalPhone: Teléfono personal
phoneExtension: Ext. de teléfono
entPhone: Tel. de empresa
personalPhone: Tel. personal
noBoss: Sin jefe
userData: Datos de usuario
userId: ID del usuario
@ -703,7 +703,7 @@ supplier:
supplierName: Nombre del proveedor
basicData:
workerFk: Responsable
isSerious: Verificado
isReal: Verificado
isActive: Activo
isPayMethodChecked: Método de pago validado
note: Notas
@ -762,6 +762,7 @@ travel:
hb: HB
basicData:
daysInForward: Días redada
isRaid: Redada
thermographs:
temperature: Temperatura
destination: Destino

View File

@ -100,7 +100,7 @@ async function remove() {
</QMenu>
</QItem>
<QSeparator />
<QItem @click="confirmRemove()" v-ripple clickable>
<QItem @click="confirmRemove()" v-ripple clickable data-cy="deleteClaim">
<QItemSection avatar>
<QIcon name="delete" />
</QItemSection>

View File

@ -130,7 +130,7 @@ function cancel() {
<template #body-cell-description="{ row, value }">
<QTd auto-width align="right" class="link">
{{ value }}
<ItemDescriptorProxy :id="row.itemFk"></ItemDescriptorProxy>
<ItemDescriptorProxy :id="row.itemFk" />
</QTd>
</template>
</QTable>

View File

@ -25,7 +25,7 @@ const claimFilter = computed(() => {
include: {
relation: 'user',
scope: {
fields: ['id', 'nickname'],
fields: ['id', 'nickname', 'name'],
},
},
},

View File

@ -256,10 +256,10 @@ const showBalancePdf = ({ id }) => {
{{ toCurrency(balances[rowIndex]?.balance) }}
</template>
<template #column-description="{ row }">
<div class="link" v-if="row.isInvoice">
<span class="link" v-if="row.isInvoice" @click.stop>
{{ t('bill', { ref: row.description }) }}
<InvoiceOutDescriptorProxy :id="row.description" />
</div>
<InvoiceOutDescriptorProxy :id="row.id" />
</span>
<span v-else class="q-pa-xs dotted rounded-borders" :title="row.description">
{{ row.description }}
</span>

View File

@ -320,7 +320,7 @@ const sumRisk = ({ clientRisks }) => {
:value="entity.recommendedCredit"
/>
</QCard>
<QCard class="vn-one">
<QCard class="vn-max">
<VnTitle :text="t('Latest tickets')" />
<CustomerSummaryTable />
</QCard>

View File

@ -12,6 +12,7 @@ import VnImg from 'src/components/ui/VnImg.vue';
const stateStore = useStateStore();
const { t } = useI18n();
const tableRef = ref();
const columns = [
{
align: 'center',
@ -234,7 +235,6 @@ const columns = [
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.landing)),
},
];
const tableRef = ref();
onMounted(async () => {
stateStore.rightDrawer = true;

View File

@ -221,7 +221,7 @@ onMounted(async () => {
t('entry.list.tableVisibleColumns.isExcludedFromAvailable')
}}</QTooltip>
</QIcon>
<QIcon v-if="!!row.daysInForward" name="vn:net" color="primary">
<QIcon v-if="!!row.isRaid" name="vn:net" color="primary">
<QTooltip>
{{
t('globals.raid', { daysInForward: row.daysInForward })

View File

@ -254,10 +254,7 @@ watchEffect(selectedRows);
@update:model-value="fetchClientAddress"
>
<template #option="scope">
<QItem
v-bind="scope.itemProps"
@click="selectedClient(scope.opt)"
>
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>
#{{ scope.opt?.id }} -
@ -296,18 +293,17 @@ watchEffect(selectedRows);
: ''
} `
}}
<span>
{{
<span>{{
scope.opt?.nickname
}}</span
>
}}</span>
<span
v-if="
scope.opt?.province ||
scope.opt?.city ||
scope.opt?.street
"
>, {{ scope.opt?.street }},
>
, {{ scope.opt?.street }},
{{ scope.opt?.city }},
{{
scope.opt?.province?.name
@ -316,8 +312,8 @@ watchEffect(selectedRows);
{{
scope.opt?.agencyMode
?.name
}}</span
>
}}
</span>
</QItemLabel>
</QItemSection>
</QItem>

View File

@ -170,7 +170,7 @@ onMounted(async () => {
from.value = getDate(_from, 'from');
const _to = Date.vnNew();
_to.setDate(_to.getDate() + 10);
to.value = getDate(Date.vnNew(), 'to');
to.value = getDate(_to, 'to');
updateFilter();

View File

@ -440,7 +440,7 @@ function handleOnDataSave({ CrudModelRef }) {
selection: 'multiple',
}"
:crud-model="{
paginate: false,
disableInfiniteScroll: true,
}"
v-model:selected="rowsSelected"
:row-click="saveOnRowChange"

View File

@ -27,7 +27,7 @@ function exprBuilder(param, value) {
const columns = computed(() => [
{
label: t('salesOrdersTable.dateSend'),
label: t('globals.landed'),
name: 'dateSend',
field: 'dateSend',
align: 'left',

View File

@ -15,6 +15,7 @@ import { toCurrency, dateRange, dashIfEmpty } from 'src/filters';
import RightMenu from 'src/components/common/RightMenu.vue';
import MonitorTicketSearchbar from './MonitorTicketSearchbar.vue';
import MonitorTicketFilter from './MonitorTicketFilter.vue';
import TicketProblems from 'src/components/TicketProblems.vue';
const DEFAULT_AUTO_REFRESH = 2 * 60 * 1000; // 2min in ms
const { t } = useI18n();
@ -23,13 +24,18 @@ const tableRef = ref(null);
const provinceOpts = ref([]);
const stateOpts = ref([]);
const zoneOpts = ref([]);
const visibleColumns = ref([]);
const { viewSummary } = useSummaryDialog();
const from = Date.vnNew();
from.setHours(0, 0, 0, 0);
const to = new Date(from.getTime());
to.setDate(to.getDate() + 1);
to.setHours(23, 59, 59, 999);
const stateColors = {
notice: 'info',
success: 'positive',
warning: 'warning',
alert: 'negative',
};
function exprBuilder(param, value) {
switch (param) {
@ -224,7 +230,7 @@ const columns = computed(() => [
{
title: t('salesTicketsTable.goToLines'),
icon: 'vn:lines',
color: 'priamry',
color: 'primary',
action: (row) => openTab(row.id),
isPrimary: true,
attrs: {
@ -235,7 +241,7 @@ const columns = computed(() => [
{
title: t('salesTicketsTable.preview'),
icon: 'preview',
color: 'priamry',
color: 'primary',
action: (row) => viewSummary(row.id, TicketSummary),
isPrimary: true,
attrs: {
@ -253,10 +259,10 @@ const getBadgeAttrs = (date) => {
let timeTicket = new Date(date);
timeTicket.setHours(0, 0, 0, 0);
let comparation = today - timeTicket;
let timeDiff = today - timeTicket;
if (comparation == 0) return { color: 'warning', 'text-color': 'black' };
if (comparation < 0) return { color: 'success', 'text-color': 'black' };
if (timeDiff == 0) return { color: 'warning', 'text-color': 'black' };
if (timeDiff < 0) return { color: 'success', 'text-color': 'black' };
return { color: 'transparent', 'text-color': 'white' };
};
@ -271,13 +277,6 @@ const autoRefreshHandler = (value) => {
}
};
const stateColors = {
notice: 'info',
success: 'positive',
warning: 'warning',
alert: 'negative',
};
const totalPriceColor = (ticket) => {
const total = parseInt(ticket.totalWithVat);
if (total > 0 && total < 50) return 'warning';
@ -285,10 +284,10 @@ const totalPriceColor = (ticket) => {
const formatShippedDate = (date) => {
if (!date) return '-';
const split1 = date.split('T');
const [year, month, day] = split1[0].split('-');
const _date = new Date(year, month - 1, day);
return toDateFormat(_date);
const dateSplit = date.split('T');
const [year, month, day] = dateSplit[0].split('-');
const newDate = new Date(year, month - 1, day);
return toDateFormat(newDate);
};
const openTab = (id) =>
@ -336,7 +335,6 @@ const openTab = (id) =>
:expr-builder="exprBuilder"
:offset="50"
:columns="columns"
:visible-columns="visibleColumns"
:right-search="false"
default-mode="table"
auto-load
@ -366,61 +364,7 @@ const openTab = (id) =>
</QCheckbox>
</template>
<template #column-totalProblems="{ row }">
<span>
<QIcon
v-if="row.isTaxDataChecked === 0"
name="vn:no036"
color="primary"
size="xs"
>
<QTooltip>{{ $t('salesTicketsTable.noVerifiedData') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.hasTicketRequest"
name="vn:buyrequest"
color="primary"
size="xs"
>
<QTooltip>{{ $t('salesTicketsTable.purchaseRequest') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.itemShortage"
name="vn:unavailable"
color="primary"
size="xs"
>
<QTooltip>{{ $t('salesTicketsTable.notVisible') }}</QTooltip>
</QIcon>
<QIcon v-if="row.isFreezed" name="vn:frozen" color="primary" size="xs">
<QTooltip>{{ $t('salesTicketsTable.clientFrozen') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.risk"
name="vn:risk"
:color="row.hasHighRisk ? 'negative' : 'primary'"
size="xs"
>
<QTooltip
>{{ $t('salesTicketsTable.risk') }}: {{ row.risk }}</QTooltip
>
</QIcon>
<QIcon
v-if="row.hasComponentLack"
name="vn:components"
color="primary"
size="xs"
>
<QTooltip>{{ $t('salesTicketsTable.componentLack') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.isTooLittle"
name="vn:isTooLittle"
color="primary"
size="xs"
>
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
</QIcon>
</span>
<TicketProblems :row="row" />
</template>
<template #column-id="{ row }">
<span class="link" @click.stop.prevent>
@ -475,7 +419,7 @@ const openTab = (id) =>
</QIcon>
</template>
<template #column-zoneFk="{ row }">
<div @click.stop.prevent :title="row.zoneName">
<div v-if="row.zoneFk" @click.stop.prevent :title="row.zoneName">
<span class="link">{{ row.zoneName }}</span>
<ZoneDescriptorProxy :id="row.zoneFk" />
</div>

View File

@ -11,7 +11,6 @@ salesClientsTable:
client: Client
salesOrdersTable:
delete: Delete
dateSend: Send date
dateMake: Make date
deleteConfirmMessage: All the selected elements will be deleted. Are you sure you want to continue?
agency: Agency

View File

@ -11,7 +11,6 @@ salesClientsTable:
client: Cliente
salesOrdersTable:
delete: Eliminar
dateSend: Fecha de envío
dateMake: Fecha de realización
deleteConfirmMessage: Todos los elementos seleccionados serán eliminados. ¿Seguro que quieres continuar?
agency: Agencia

View File

@ -2,7 +2,7 @@
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import axios from 'axios';
import VnSelect from 'components/common/VnSelect.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue';
const props = defineProps({
@ -31,16 +31,7 @@ const applyTags = () => {
emit('applyTags', tagInfo);
};
const removeTagGroupParam = (valIndex = null) => {
if (!valIndex) {
tagValues.value = [{}];
} else {
(tagValues.value || []).splice(valIndex, 1);
}
};
const getSelectedTagValues = async (tag) => {
try {
if (!tag?.id) return;
const filter = {
fields: ['value'],
@ -54,24 +45,12 @@ const getSelectedTagValues = async (tag) => {
params,
});
tagOptions.value = data;
} catch (err) {
console.error('Error getting selected tag values');
}
};
</script>
<template>
<QForm @submit="applyTags(tagValues)" class="all-pointer-events">
<QForm @submit="applyTags()" class="all-pointer-events">
<QCard class="q-pa-sm column q-pa-lg">
<QBtn
round
color="primary"
style="position: absolute; z-index: 1; right: 0; top: 0"
icon="search"
type="submit"
>
</QBtn>
<VnSelect
:label="t('params.tag')"
v-model="selectedTag"
@ -84,17 +63,7 @@ const getSelectedTagValues = async (tag) => {
rounded
:emit-value="false"
use-input
@update:model-value="($event) => getSelectedTagValues($event)"
/>
<QBtn
icon="add_circle"
shortcut="+"
flat
class="filter-icon q-mb-md"
size="md"
dense
:disabled="!selectedTag || !tagValues[0].value"
@click="tagValues.unshift({})"
@update:model-value="getSelectedTagValues"
/>
<div
v-for="(value, index) in tagValues"
@ -106,7 +75,7 @@ const getSelectedTagValues = async (tag) => {
v-if="!selectedTag?.isFree && tagOptions"
:label="t('components.itemsFilterPanel.value')"
v-model="value.value"
:options="tagOptions || []"
:options="tagOptions"
option-value="value"
option-label="value"
dense
@ -124,7 +93,6 @@ const getSelectedTagValues = async (tag) => {
:label="t('components.itemsFilterPanel.value')"
:disable="!value"
is-outlined
:is-clearable="false"
class="col"
/>
<QBtn
@ -135,11 +103,25 @@ const getSelectedTagValues = async (tag) => {
rounded
flat
class="filter-icon col-2"
:disabled="!value.value"
@click="removeTagGroupParam(index)"
@click="tagValues.splice(index, 1)"
/>
</div>
</div>
<QBtn
icon="add_circle"
shortcut="+"
flat
class="filter-icon q-mb-md"
size="md"
dense
@click="tagValues.push({})"
/>
<QBtn
color="primary"
icon="search"
type="submit"
:label="$t('globals.search')"
/>
</QCard>
</QForm>
</template>

View File

@ -4,18 +4,19 @@ import { useRoute, useRouter } from 'vue-router';
import { onBeforeMount, onMounted, onUnmounted, ref, computed, watch } from 'vue';
import axios from 'axios';
import { useI18n } from 'vue-i18n';
import VnPaginate from 'components/ui/VnPaginate.vue';
import CatalogItem from 'components/ui/CatalogItem.vue';
import OrderCatalogFilter from 'pages/Order/Card/OrderCatalogFilter.vue';
import VnPaginate from 'src/components/ui/VnPaginate.vue';
import CatalogItem from 'src/components/ui/CatalogItem.vue';
import OrderCatalogFilter from 'src/pages/Order/Card/OrderCatalogFilter.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import getParamWhere from 'src/filters/getParamWhere';
import { useArrayData } from 'composables/useArrayData';
import { useArrayData } from 'src/composables/useArrayData';
const route = useRoute();
const router = useRouter();
const stateStore = useStateStore();
const { t } = useI18n();
const arrayData = useArrayData('OrderCatalogList');
const dataKey = 'OrderCatalogList';
const arrayData = useArrayData(dataKey);
const store = arrayData.store;
const showFilter = ref(null);
const tags = ref([]);
@ -102,7 +103,7 @@ watch(
<template>
<VnSearchbar
data-key="OrderCatalogList"
:data-key="dataKey"
:user-params="catalogParams"
:static-params="['orderFk', 'orderBy']"
:redirect="false"
@ -113,7 +114,7 @@ watch(
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
<QScrollArea v-if="showFilter" class="fit text-grey-8">
<OrderCatalogFilter
data-key="OrderCatalogList"
:data-key="dataKey"
:tag-value="tagValue"
:tags="tags"
:initial-catalog-params="catalogParams"
@ -123,7 +124,7 @@ watch(
<QPage class="column items-center q-pa-md">
<div class="full-width">
<VnPaginate
data-key="OrderCatalogList"
:data-key="dataKey"
url="Orders/CatalogFilter"
:limit="50"
:user-params="catalogParams"

View File

@ -32,11 +32,12 @@ const route = useRoute();
const arrayData = useArrayData(props.dataKey);
const currentParams = ref({});
const categoryList = ref(null);
const selectedCategoryFk = ref(null);
const typeList = ref([]);
const selectedTypeFk = ref(null);
const generalSearchParam = ref(null);
const searchByTag = ref(null);
const vnFilterPanelRef = ref();
const orderByList = ref([
@ -52,26 +53,30 @@ const orderWayList = ref([
const orderBySelected = ref('relevancy DESC, name');
const orderWaySelected = ref('ASC');
onMounted(() => {
selectedCategoryFk.value = getParamWhere(route, 'categoryFk');
selectedTypeFk.value = getParamWhere(route, 'typeFk');
});
const resetCategory = (params, search) => {
selectedCategoryFk.value = null;
typeList.value = null;
params.categoryFk = null;
params.typeFk = null;
arrayData.store.userFilter = null;
removeTagGroupParam(params, search);
removeTagGroupParam(search);
};
const selectCategory = (params, category, search) => {
if (params.categoryFk === category?.id) {
resetCategory(params, search);
params.categoryFk = null;
} else {
return;
}
selectedCategoryFk.value = category?.id;
params.categoryFk = category?.id;
params.typeFk = null;
selectedTypeFk.value = null;
loadTypes(category?.id);
}
search();
};
@ -115,13 +120,23 @@ const applyTags = (tagInfo, params, search) => {
search();
};
const removeTagGroupParam = (params, search, valIndex = null) => {
if (!valIndex) {
params.tagGroups = null;
search();
async function onSearchByTag(value) {
if (!value.target.value) return;
if (!currentParams.value?.tagGroups) {
currentParams.value.tagGroups = [];
}
currentParams.value.tagGroups.push({
values: [{ value: value.target.value }],
});
searchByTag.value = null;
}
const removeTagGroupParam = (search, valIndex) => {
if (!valIndex && valIndex !== 0) {
currentParams.value.tagGroups = null;
} else {
params.tagGroups.splice(valIndex, 1);
search();
currentParams.value.tagGroups.splice(valIndex, 1);
}
};
@ -142,6 +157,12 @@ const getCategoryClass = (category, params) => {
}
};
const clearFilter = (key) => {
if (key === 'categoryFk') {
resetCategory();
}
};
function addOrder(value, field, params) {
let { orderBy } = params;
orderBy = JSON.parse(orderBy);
@ -157,7 +178,7 @@ onMounted(() => {
</script>
<template>
<FetchData url="ItemCategories" limit="30" auto-load @on-fetch="setCategoryList" />
<FetchData url="ItemCategories" auto-load @on-fetch="setCategoryList" />
<VnFilterPanel
ref="vnFilterPanelRef"
:data-key="props.dataKey"
@ -166,7 +187,8 @@ onMounted(() => {
:expr-builder="exprBuilder"
:custom-tags="['tagGroups', 'categoryFk']"
:redirect="false"
search-url="params"
@remove="clearFilter"
v-model="currentParams"
>
<template #tags="{ tag, formatFn }">
<strong v-if="tag.label === 'typeFk'">
@ -188,7 +210,7 @@ onMounted(() => {
@remove="
customTag.label === 'categoryFk'
? resetCategory(params, searchFn)
: removeTagGroupParam(params, searchFn, valIndex)
: removeTagGroupParam(searchFn, valIndex)
"
>
<strong v-if="customTag.label === 'categoryFk'">
@ -288,46 +310,39 @@ onMounted(() => {
</QItemSection>
</QItem>
<QSeparator />
<QItem class="q-mt-lg">
<VnSelect
<QItem class="q-mt-lg q-pa-none">
<VnInput
:label="t('components.itemsFilterPanel.value')"
:options="props.tagValue"
dense
outlined
rounded
:is-clearable="false"
v-model="generalSearchParam"
@update:model-value="
applyTags(
{ values: [{ value: generalSearchParam }] },
params,
searchFn
)
"
v-model="searchByTag"
@keyup.enter="(val) => onSearchByTag(val, params)"
>
<template #prepend>
<QIcon name="search" />
</template>
<template #after>
<template #append>
<QBtn
icon="add_circle"
shortcut="+"
flat
color="primary"
size="md"
dense
/>
<QPopupProxy>
<CatalogFilterValueDialog
style="display: inline-block"
:tags="tags"
@apply-tags="
($event) => applyTags($event, params, searchFn)
($event) => applyTags($event, currentParams, searchFn)
"
/>
</QPopupProxy>
</template>
</VnSelect>
</VnInput>
</QItem>
<QSeparator />
</template>

View File

@ -126,7 +126,6 @@ const setWireTransfer = async () => {
(_, requestResponse) =>
onBankEntityCreated(requestResponse, row)
"
:show-entity-field="false"
/>
</template>
<template #option="scope">

View File

@ -76,8 +76,8 @@ const companySizes = [
</VnRow>
<VnRow>
<QCheckbox
v-model="data.isSerious"
:label="t('supplier.basicData.isSerious')"
v-model="data.isReal"
:label="t('supplier.basicData.isReal')"
/>
<QCheckbox
v-model="data.isActive"

View File

@ -38,7 +38,7 @@ const filter = {
'payDemFk',
'payDay',
'isActive',
'isSerious',
'isReal',
'isTrucker',
'account',
],
@ -137,7 +137,7 @@ const getEntryQueryParams = (supplier) => {
<QTooltip>{{ t('Inactive supplier') }}</QTooltip>
</QIcon>
<QIcon
v-if="!supplier.isSerious"
v-if="!supplier.isReal"
name="vn:supplierfalse"
color="primary"
size="xs"

View File

@ -83,7 +83,7 @@ const getUrl = (section) => `#/supplier/${entityId.value}/${section}`;
</VnLv>
<QCheckbox
:label="t('supplier.summary.verified')"
v-model="supplier.isSerious"
v-model="supplier.isReal"
:disable="true"
/>
<QCheckbox

View File

@ -33,6 +33,7 @@ const canEditZone = useAcl().hasAny([
const agencyFetchRef = ref();
const warehousesOptions = ref([]);
const companiesOptions = ref([]);
const currenciesOptions = ref([]);
const agenciesOptions = ref([]);
const zonesOptions = ref([]);
const addresses = ref([]);

View File

@ -130,6 +130,7 @@ function ticketFilter(ticket) {
<QBadge
text-color="black"
:color="entity.ticketState.state.classColor"
data-cy="ticketDescriptorStateBadge"
>
{{ entity.ticketState.state.name }}
</QBadge>
@ -174,7 +175,7 @@ function ticketFilter(ticket) {
<QTooltip>{{ t('Client Frozen') }}</QTooltip>
</QIcon>
<QIcon
v-if="entity.problem.includes('hasRisk')"
v-if="entity?.problem?.includes('hasRisk')"
name="vn:risk"
size="xs"
color="primary"

View File

@ -239,7 +239,7 @@ function makeInvoiceDialog() {
}
async function makeInvoice() {
const params = {
ticketsIds: [parseInt(ticketId)],
ticketsIds: [parseInt(ticketId.value)],
};
await axios.post(`Tickets/invoiceTicketsAndPdf`, params);
@ -265,7 +265,7 @@ async function transferClient(client) {
async function addTurn(day) {
const params = {
ticketFk: parseInt(ticketId),
ticketFk: parseInt(ticketId.value),
weekDay: day,
agencyModeFk: ticket.value.agencyModeFk,
};
@ -280,7 +280,7 @@ async function addTurn(day) {
async function createRefund(withWarehouse) {
const params = {
ticketsIds: [parseInt(ticketId)],
ticketsIds: [parseInt(ticketId.value)],
withWarehouse: withWarehouse,
negative: true,
};
@ -368,7 +368,7 @@ async function uploadDocuware(force) {
const { data } = await axios.post(`Docuwares/upload`, {
fileCabinet: 'deliveryNote',
ticketIds: [parseInt(ticketId)],
ticketIds: [parseInt(ticketId.value)],
});
if (data) notify({ message: t('PDF sent!'), type: 'positive' });

View File

@ -75,6 +75,7 @@ const cancel = () => {
dense
style="width: 50%"
@click="save()"
data-cy="saveManaBtn"
>
{{ t('globals.save') }}
</QBtn>

View File

@ -86,12 +86,14 @@ async function handleSave() {
option-value="id"
v-model="row.observationTypeFk"
:disable="!!row.id"
data-cy="ticketNotesObservationType"
/>
<VnInput
:label="t('basicData.description')"
v-model="row.description"
class="col"
@keyup.enter="handleSave"
data-cy="ticketNotesDescription"
/>
<QIcon
name="delete"
@ -99,6 +101,7 @@ async function handleSave() {
class="cursor-pointer"
color="primary"
@click="handleDelete(row)"
data-cy="ticketNotesRemoveNoteBtn"
>
<QTooltip>
{{ t('ticketNotes.removeNote') }}
@ -113,6 +116,7 @@ async function handleSave() {
class="fill-icon-on-hover q-ml-md"
color="primary"
@click="ticketNotesCrudRef.insert()"
data-cy="ticketNotesAddNoteBtn"
>
<QTooltip>
{{ t('ticketNotes.addNote') }}

View File

@ -584,6 +584,7 @@ watch(
color="primary"
:disable="!isTicketEditable || ticketState === 'OK'"
@click="changeTicketState('OK')"
data-cy="ticketSaleOkStateBtn"
>
<QTooltip>{{ t(`Change ticket state to 'Ok'`) }}</QTooltip>
</QBtn>
@ -592,6 +593,7 @@ watch(
color="primary"
:label="t('ticketList.state')"
:disable="!isTicketEditable"
data-cy="ticketSaleStateDropdown"
>
<VnSelect
:options="editableStatesOptions"
@ -601,6 +603,7 @@ watch(
hide-dropdown-icon
focus-on-mount
@update:model-value="changeTicketState"
data-cy="ticketSaleStateSelect"
/>
</QBtnDropdown>
<TicketSaleMoreActions
@ -633,6 +636,7 @@ watch(
icon="vn:splitline"
:disable="!isTicketEditable || !hasSelectedRows"
@click="setTransferParams()"
data-cy="ticketSaleTransferBtn"
>
<QTooltip>{{ t('Transfer lines') }}</QTooltip>
<TicketTransfer
@ -688,7 +692,7 @@ watch(
}"
:create-as-dialog="false"
:crud-model="{
paginate: false,
disableInfiniteScroll: true,
}"
:default-remove="false"
:default-reset="false"
@ -712,7 +716,13 @@ watch(
{{ t('ticketSale.visible') }}: {{ row.visible || 0 }}
</QTooltip>
</QIcon>
<QIcon v-if="row.reserved" color="primary" name="vn:reserva" size="xs">
<QIcon
v-if="row.reserved"
color="primary"
name="vn:reserva"
size="xs"
data-cy="ticketSaleReservedIcon"
>
<QTooltip>
{{ t('ticketSale.reserved') }}
</QTooltip>
@ -865,7 +875,14 @@ watch(
</VnTable>
<QPageSticky :offset="[20, 20]" style="z-index: 2">
<QBtn @click="newOrderFromTicket()" color="primary" fab icon="add" shortcut="+" />
<QBtn
@click="newOrderFromTicket()"
color="primary"
fab
icon="add"
shortcut="+"
data-cy="ticketSaleAddToBasketBtn"
/>
<QTooltip class="text-no-wrap">
{{ t('Add item to basket') }}
</QTooltip>

View File

@ -179,6 +179,7 @@ const createRefund = async (withWarehouse) => {
color="primary"
:label="t('ticketSale.more')"
:disable="disable"
data-cy="ticketSaleMoreActionsDropdown"
>
<template #label>
<QTooltip>{{ t('Select lines to see the options') }}</QTooltip>
@ -190,6 +191,7 @@ const createRefund = async (withWarehouse) => {
v-close-popup
v-ripple
@click="showSmsDialog('productNotAvailable')"
data-cy="sendShortageSMSItem"
>
<QItemSection>
<QItemLabel>{{ t('Send shortage SMS') }}</QItemLabel>
@ -201,12 +203,18 @@ const createRefund = async (withWarehouse) => {
v-close-popup
v-ripple
@click="calculateSalePrice()"
data-cy="recalculatePriceItem"
>
<QItemSection>
<QItemLabel>{{ t('Recalculate price') }}</QItemLabel>
</QItemSection>
</QItem>
<QItem clickable v-ripple @click="emit('getMana')">
<QItem
clickable
v-ripple
@click="emit('getMana')"
data-cy="updateDiscountItem"
>
<QItemSection>
<QItemLabel>{{ t('Update discount') }}</QItemLabel>
</QItemSection>
@ -215,6 +223,7 @@ const createRefund = async (withWarehouse) => {
v-model.number="newDiscount"
:label="t('ticketSale.discount')"
type="number"
data-cy="ticketSaleDiscountInput"
/>
</TicketEditManaProxy>
</QItem>
@ -224,6 +233,7 @@ const createRefund = async (withWarehouse) => {
v-close-popup
v-ripple
@click="createClaim()"
data-cy="createClaimItem"
>
<QItemSection>
<QItemLabel>{{ t('Add claim') }}</QItemLabel>
@ -235,6 +245,7 @@ const createRefund = async (withWarehouse) => {
v-close-popup
v-ripple
@click="setReserved(true)"
data-cy="markAsReservedItem"
>
<QItemSection>
<QItemLabel>{{ t('Mark as reserved') }}</QItemLabel>
@ -246,12 +257,13 @@ const createRefund = async (withWarehouse) => {
v-close-popup
v-ripple
@click="setReserved(false)"
data-cy="unmarkAsReservedItem"
>
<QItemSection>
<QItemLabel>{{ t('Unmark as reserved') }}</QItemLabel>
</QItemSection>
</QItem>
<QItem clickable v-ripple>
<QItem clickable v-ripple data-cy="ticketSaleRefundItem">
<QItemSection>
<QItemLabel>{{ t('Refund') }}</QItemLabel>
</QItemSection>
@ -260,12 +272,22 @@ const createRefund = async (withWarehouse) => {
</QItemSection>
<QMenu anchor="top end" self="top start" auto-close bordered>
<QList>
<QItem v-ripple clickable @click="createRefund(true)">
<QItem
v-ripple
clickable
@click="createRefund(true)"
data-cy="ticketSaleRefundWithWarehouse"
>
<QItemSection>
{{ t('with warehouse') }}
</QItemSection>
</QItem>
<QItem v-ripple clickable @click="createRefund(false)">
<QItem
v-ripple
clickable
@click="createRefund(false)"
data-cy="ticketSaleRefundWithoutWarehouse"
>
<QItemSection>
{{ t('without warehouse') }}
</QItemSection>

View File

@ -100,6 +100,7 @@ function toTicketUrl(section) {
ref="summaryRef"
:url="`Tickets/${entityId}/summary`"
data-key="TicketSummary"
data-cy="ticketSummary"
>
<template #header-left>
<VnToSummary

View File

@ -91,7 +91,7 @@ onMounted(() => (_transfer.value = $props.transfer));
</script>
<template>
<QPopupProxy ref="QPopupProxyRef">
<QPopupProxy ref="QPopupProxyRef" data-cy="ticketTransferPopup">
<QCard class="q-px-md" style="display: flex; width: 80vw">
<QTable
:rows="transfer.sales"

View File

@ -57,6 +57,7 @@ defineExpose({ transferSales });
v-model.number="_transfer.ticketId"
:label="t('Transfer to ticket')"
:clearable="false"
data-cy="ticketTransferDestinationTicketInput"
>
<template #append>
<QBtn
@ -64,6 +65,7 @@ defineExpose({ transferSales });
color="primary"
@click="transferSales(_transfer.ticketId)"
style="width: 30px"
data-cy="ticketTransferTransferBtn"
/>
</template>
</VnInput>
@ -72,6 +74,7 @@ defineExpose({ transferSales });
color="primary"
class="full-width q-my-lg"
@click="transferSales()"
data-cy="ticketTransferNewTicketBtn"
/>
</QForm>
</template>

View File

@ -215,7 +215,7 @@ const requestComponentUpdate = async (ticket, isWithoutNegatives) => {
if (!newLanded) {
notify(t('advanceTickets.noDeliveryZone'), 'negative');
return;
throw new Error(t('advanceTickets.noDeliveryZone'));
}
ticket.landed = newLanded.landed;
@ -299,10 +299,10 @@ const splitTickets = async () => {
const { query, params } = await requestComponentUpdate(ticket, true);
await axios.post(query, params);
progressAdd(ticket.futureId);
} catch (error) {
} catch (e) {
splitErrors.value.push({
id: ticket.futureId,
reason: error.response?.data?.error?.message,
reason: e.message || e.response?.data?.error?.message,
});
progressAdd(ticket.futureId);
}

View File

@ -22,6 +22,7 @@ import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorP
import ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue';
import { toTimeFormat } from 'src/filters/date';
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
import TicketProblems from 'src/components/TicketProblems.vue';
const route = useRoute();
const router = useRouter();
@ -461,6 +462,7 @@ function setReference(data) {
data-key="TicketList"
:label="t('Search ticket')"
:info="t('You can search by ticket id or alias')"
data-cy="ticketListSearchBar"
/>
<RightMenu>
<template #right-panel>
@ -488,68 +490,10 @@ function setReference(data) {
'row-key': 'id',
selection: 'multiple',
}"
data-cy="ticketListTable"
>
<template #column-statusIcons="{ row }">
<div class="q-gutter-x-xs">
<QIcon
v-if="row.isTaxDataChecked === 0"
color="primary"
name="vn:no036"
size="xs"
>
<QTooltip>
{{ t('No verified data') }}
</QTooltip>
</QIcon>
<QIcon
v-if="row.hasTicketRequest"
color="primary"
name="vn:buyrequest"
size="xs"
>
<QTooltip>
{{ t('Purchase request') }}
</QTooltip>
</QIcon>
<QIcon
v-if="row.itemShortage"
color="primary"
name="vn:unavailable"
size="xs"
>
<QTooltip>
{{ t('Not visible') }}
</QTooltip>
</QIcon>
<QIcon v-if="row.isFreezed" color="primary" name="vn:frozen" size="xs">
<QTooltip>
{{ t('Client frozen') }}
</QTooltip>
</QIcon>
<QIcon v-if="row.risk" color="primary" name="vn:risk" size="xs">
<QTooltip> {{ t('Risk') }}: {{ row.risk }} </QTooltip>
</QIcon>
<QIcon
v-if="row.hasComponentLack"
color="primary"
name="vn:components"
size="xs"
>
<QTooltip>
{{ t('Component lack') }}
</QTooltip>
</QIcon>
<QIcon
v-if="row.hasRounding"
color="primary"
name="sync_problem"
size="xs"
>
<QTooltip>
{{ t('Rounding') }}
</QTooltip>
</QIcon>
</div>
<TicketProblems :row="row" />
</template>
<template #column-salesPersonFk="{ row }">
<span class="link" @click.stop>

View File

@ -21,12 +21,7 @@ const agenciesOptions = ref([]);
@on-fetch="(data) => (agenciesOptions = data)"
auto-load
/>
<FormModel
:url="`Travels/${route.params.id}`"
:url-update="`Travels/${route.params.id}`"
model="Travel"
auto-load
>
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load>
<template #form="{ data }">
<VnRow>
<VnInput v-model="data.ref" :label="t('globals.reference')" />
@ -78,6 +73,7 @@ const agenciesOptions = ref([]);
</VnInput>
</VnRow>
<VnRow>
<QCheckbox v-model="data.isRaid" :label="t('travel.basicData.isRaid')" />
<QCheckbox
:label="t('travel.summary.delivered')"
v-model="data.isDelivered"
@ -93,7 +89,7 @@ const agenciesOptions = ref([]);
<i18n>
es:
raidDays: Al rellenarlo, generamos una redada. Indica los días que un travel se moverá automáticamente en el tiempo
raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados (incluido 0). Si se deja vacio, la fecha no cambiará
en:
raidDays: When filling, a raid is generated. Enter the number of days the travel will automatically forward in time
raidDays: If "Raid" is checked, the landing date will automatically shift by the specified number of days (including 0). If left empty, the date will stay the same.
</i18n>

View File

@ -1,34 +1,7 @@
<script setup>
import VnCard from 'components/common/VnCard.vue';
import TravelDescriptor from './TravelDescriptor.vue';
const filter = {
fields: [
'id',
'ref',
'shipped',
'landed',
'totalEntries',
'warehouseInFk',
'warehouseOutFk',
'cargoSupplierFk',
'agencyModeFk',
],
include: [
{
relation: 'warehouseIn',
scope: {
fields: ['name'],
},
},
{
relation: 'warehouseOut',
scope: {
fields: ['name'],
},
},
],
};
import filter from './TravelFilter.js';
</script>
<template>
<VnCard

View File

@ -7,6 +7,7 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription';
import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue';
import filter from './TravelFilter.js';
import { toDate } from 'src/filters';
@ -21,35 +22,6 @@ const $props = defineProps({
const route = useRoute();
const { t } = useI18n();
const filter = {
fields: [
'id',
'ref',
'shipped',
'landed',
'totalEntries',
'warehouseInFk',
'warehouseOutFk',
'cargoSupplierFk',
'agencyModeFk',
'daysInForward',
],
include: [
{
relation: 'warehouseIn',
scope: {
fields: ['name'],
},
},
{
relation: 'warehouseOut',
scope: {
fields: ['name'],
},
},
],
};
const entityId = computed(() => {
return $props.id || route.params.id;
});
@ -65,7 +37,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
:title="data.title"
:subtitle="data.subtitle"
:filter="filter"
data-key="travelData"
data-key="Travel"
@on-fetch="setData"
>
<template #menu="{ entity }">
@ -80,12 +52,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
</template>
<template #icons="{ entity }">
<QCardActions class="q-gutter-x-md">
<QIcon
v-if="entity.daysInForward"
name="vn:net"
color="primary"
size="xs"
>
<QIcon v-if="entity.isRaid" name="vn:net" color="primary" size="xs">
<QTooltip>
{{
t('globals.raid', { daysInForward: entity.daysInForward })

View File

@ -0,0 +1,29 @@
export default {
fields: [
'id',
'ref',
'shipped',
'landed',
'totalEntries',
'warehouseInFk',
'warehouseOutFk',
'cargoSupplierFk',
'agencyModeFk',
'isRaid',
'daysInForward',
],
include: [
{
relation: 'warehouseIn',
scope: {
fields: ['name'],
},
},
{
relation: 'warehouseOut',
scope: {
fields: ['name'],
},
},
],
};

View File

@ -268,6 +268,11 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
:label="t('globals.warehouseOut')"
:value="travel.warehouseOut?.name"
/>
<QCheckbox
:label="t('travel.basicData.isRaid')"
v-model="travel.isRaid"
:disable="true"
/>
<QCheckbox
:label="t('travel.summary.delivered')"
v-model="travel.isDelivered"
@ -286,6 +291,10 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
:label="t('globals.warehouseIn')"
:value="travel.warehouseIn?.name"
/>
<VnLv
:label="t('travel.basicData.daysInForward')"
:value="travel?.daysInForward"
/>
<QCheckbox
:label="t('travel.summary.received')"
v-model="travel.isReceived"
@ -303,10 +312,6 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
<VnLv :label="t('globals.reference')" :value="travel.ref" />
<VnLv label="m³" :value="travel.m3" />
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
<VnLv
:label="t('travel.basicData.daysInForward')"
:value="travel?.daysInForward"
/>
</QCard>
<QCard class="full-width">
<VnTitle :text="t('travel.summary.entries')" />

View File

@ -227,10 +227,12 @@ const columns = computed(() => [
>
<template #column-status="{ row }">
<div class="row">
<QIcon v-if="!!row.daysInForward" name="vn:net" color="primary">
<QIcon v-if="!!row.isRaid" name="vn:net" color="primary">
<QTooltip>
{{
t('globals.raid', { daysInForward: row.daysInForward })
t('globals.raid', {
daysInForward: row.daysInForward,
})
}}</QTooltip
>
</QIcon>

View File

@ -15,7 +15,7 @@ const filter = {
include: {
relation: 'user',
scope: {
fields: ['id', 'nickname'],
fields: ['id', 'nickname', 'name'],
},
},
},

View File

@ -75,10 +75,10 @@ onBeforeMount(async () => {
<VnLinkPhone :phone-number="worker.phone" />
</template>
</VnLv>
<VnLv :value="worker.client?.phone">
<VnLv :value="advancedSummary?.client?.phone">
<template #label>
{{ t('worker.summary.personalPhone') }}
<VnLinkPhone :phone-number="worker.client?.phone" />
<VnLinkPhone :phone-number="advancedSummary?.client?.phone" />
</template>
</VnLv>
</QCard>
@ -86,12 +86,12 @@ onBeforeMount(async () => {
<VnTitle :url="basicDataUrl" :text="t('globals.summary.basicData')" />
<VnLv
:label="t('worker.summary.fiDueDate')"
:value="toDate(worker.fiDueDate)"
:value="toDate(advancedSummary.fiDueDate)"
/>
<VnLv :label="t('worker.summary.sex')" :value="worker.sex" />
<VnLv
:label="t('worker.summary.seniority')"
:value="toDate(worker.seniority)"
:value="toDate(advancedSummary.seniority)"
/>
<VnLv :label="t('worker.summary.fi')" :value="advancedSummary.fi" />
<VnLv

View File

@ -306,7 +306,7 @@ async function autofillBic(worker) {
</VnRow>
<VnRow>
<VnInput
:label="t('worker.create.street')"
:label="t('globals.street')"
:model-value="uppercaseStreetModel(data).get()"
@update:model-value="uppercaseStreetModel(data).set"
:disable="data.isFreelance"

View File

@ -24,7 +24,6 @@ function notIsLocations(ifIsFalse, ifIsTrue) {
:descriptor="ZoneDescriptor"
:filter-panel="notIsLocations(ZoneFilterPanel, undefined)"
:search-data-key="notIsLocations('ZoneList', undefined)"
:custom-url="`Zones/${route.params?.id}/getLeaves`"
:searchbar-props="{
url: notIsLocations('Zones', 'ZoneLocations'),
label: notIsLocations(t('list.searchZone'), t('list.searchLocation')),

View File

@ -39,8 +39,7 @@ const url = computed(() => `Zones/${route.params.id}/getLeaves`);
const arrayData = useArrayData(datakey, {
url: url.value,
});
const { store } = arrayData;
const storeData = computed(() => store.data);
const store = arrayData.store;
const defaultNode = {
id: null,
@ -66,8 +65,20 @@ const onNodeExpanded = async (nodeKeysArray) => {
if (!nodeKeysSet.has(null)) return;
const wasExpanded = !previousExpandedNodes.value.has(lastNodeKey);
if (wasExpanded) await fetchNodeLeaves(lastNodeKey);
else {
if (wasExpanded && treeRef.value) {
const node = treeRef.value?.getNodeByKey(lastNodeKey);
const params = { parentId: node.id };
const response = await axios.get(`Zones/${route.params.id}/getLeaves`, {
params,
});
if (response.data) {
node.childs = response.data.map((n) => {
if (n.sons > 0) n.childs = [{}];
return n;
});
}
await fetchNodeLeaves(lastNodeKey, true);
} else {
const difference = new Set(
[...previousExpandedNodes.value].filter((x) => !nodeKeysSet.has(x))
);
@ -83,41 +94,21 @@ const formatNodeSelected = (node) => {
if (node.selected === 1) node.selected = true;
else if (node.selected === 0) node.selected = false;
if (node.childs && node.childs.length > 0) {
expanded.value.push(node.id);
node.childs.forEach((childNode) => {
formatNodeSelected(childNode);
});
}
if (node.sons > 0 && !node.childs) node.childs = [{}];
};
const fetchNodeLeaves = async (nodeKey) => {
try {
if (!treeRef.value) return;
const node = treeRef.value?.getNodeByKey(nodeKey);
if (node.selected === 1) node.selected = true;
else if (node.selected === 0) node.selected = false;
if (!node || node.sons === 0) return;
const params = { parentId: node.id };
const response = await axios.get(`Zones/${route.params.id}/getLeaves`, {
params,
});
if (response.data) {
node.childs = response.data.map((n) => {
formatNodeSelected(n);
return n;
});
}
state.set('Tree', node);
} catch (err) {
console.error('Error fetching department leaves', err);
throw new Error();
}
};
function getNodeIds(node) {
if (!node) return [];
let ids = [];
if (node.id) ids.push(node.id);
@ -128,60 +119,46 @@ function getNodeIds(node) {
return ids;
}
watch(storeData, async (val) => {
// Se triggerea cuando se actualiza el store.data, el cual es el resultado del fetch de la searchbar
watch(
() => store.data,
async (val) => {
if (!val) return;
// // Se triggerea cuando se actualiza el store.data, el cual es el resultado del fetch de la searchbar
if (!nodes.value[0]) nodes.value = [defaultNode];
nodes.value[0].childs = [...val];
const fetchedNodeKeys = val.flatMap(getNodeIds);
state.set('Tree', [...fetchedNodeKeys]);
if (store.userParams?.search === '') {
if (!store.userParams?.search) {
val.forEach((n) => {
formatNodeSelected(n);
});
store.data = null;
expanded.value = [null];
} else {
for (let n of state.get('Tree')) await fetchNodeLeaves(n);
for (let n of state.get('Tree')) {
await fetchNodeLeaves(n);
}
expanded.value = [null, ...fetchedNodeKeys];
}
previousExpandedNodes.value = new Set(expanded.value);
});
},
{ immediate: true }
);
const reFetch = async () => {
const { data } = await arrayData.fetch({ append: false });
nodes.value = data;
expanded.value = [null];
};
onMounted(async () => {
if (store.userParams?.search && !props.showSearchBar) {
await reFetch();
return;
}
const stateTree = state.get('Tree');
const tree = stateTree ? [...state.get('Tree')] : [null];
const lastStateTree = state.get('TreeState');
if (tree) {
for (let n of tree) {
await fetchNodeLeaves(n);
}
if (lastStateTree) {
tree.push(lastStateTree);
await fetchNodeLeaves(lastStateTree);
}
}
setTimeout(() => {
if (lastStateTree) {
document.getElementById(lastStateTree).scrollIntoView();
}
}, 1000);
expanded.value.unshift(null);
previousExpandedNodes.value = new Set(expanded.value);
if (store.userParams?.search) await arrayData.fetch({});
});
onUnmounted(() => {
state.set('Tree', undefined);
arrayData.destroy();
});
</script>

View File

@ -1,2 +1,2 @@
videos/*
reports/*
screenshots/*

View File

@ -6,7 +6,11 @@ describe('Client list', () => {
cy.visit('/#/customer/list', {
timeout: 5000,
onBeforeLoad(win) {
cy.stub(win, 'open');
cy.stub(win, 'open')
.callsFake((url) => {
return win.open.wrappedMethod.call(win, url, '_self');
})
.as('Open');
},
});
});
@ -20,9 +24,9 @@ describe('Client list', () => {
'Web user': { val: 'user_test_1' },
Street: { val: 'C/ STREET 1' },
Email: { val: 'user.test@1.com' },
'Business type': { val: 'Otros', type: 'select' },
'Sales person': { val: 'salesboss', type: 'select' },
'Sales person': { val: 'employee', type: 'select' },
Location: { val: '46000, Valencia(Province one), España', type: 'select' },
'Business type': { val: 'Otros', type: 'select' },
};
cy.fillInForm(data);
@ -47,17 +51,19 @@ describe('Client list', () => {
it('Client founded create ticket', () => {
const search = 'Jessica Jones';
cy.searchByLabel('Name', search);
cy.clickButtonsDescriptor(2);
cy.openActionDescriptor('Create ticket');
cy.waitForElement('#formModel');
cy.waitForElement('.q-form');
cy.checkValueForm(1, search);
cy.checkValueSelectForm(1, search);
cy.checkValueSelectForm(2, search);
});
it('Client founded create order', () => {
const search = 'Jessica Jones';
cy.searchByLabel('Name', search);
cy.clickButtonsDescriptor(4);
cy.openActionDescriptor('New order');
cy.waitForElement('#formModel');
cy.waitForElement('.q-form');
cy.checkValueForm(1, search);
cy.checkValueForm(2, search);
});
});

View File

@ -28,7 +28,7 @@ describe('Logout', () => {
});
it('when token not exists', () => {
cy.get('.q-list > [href="#/item"]').click();
cy.get('.q-list').first().should('be.visible').click();
cy.checkNotification('Authorization Required');
});
});

View File

@ -0,0 +1,54 @@
/// <reference types="cypress" />
describe('TicketList', () => {
const firstRow = 'tbody > :nth-child(1)';
beforeEach(() => {
cy.login('developer');
cy.viewport(1920, 1080);
cy.visit('/#/ticket/list');
});
const searchResults = (search) => {
cy.dataCy('vnSearchBar').find('input').focus();
if (search) cy.dataCy('vnSearchBar').find('input').type(search);
cy.dataCy('vnSearchBar').find('input').type('{enter}');
cy.dataCy('ticketListTable').should('exist');
cy.get(firstRow).should('exist');
};
it('should search results', () => {
cy.dataCy('ticketListTable').should('not.exist');
cy.get('.q-field__control').should('exist');
searchResults();
});
it('should open ticket sales', () => {
searchResults();
cy.window().then((win) => {
cy.stub(win, 'open').as('windowOpen');
});
cy.get(firstRow).find('.q-btn:first').click();
cy.get('@windowOpen').should('be.calledWithMatch', /\/ticket\/\d+\/sale/);
});
it('should open ticket summary', () => {
searchResults();
cy.get(firstRow).find('.q-btn:last').click();
cy.dataCy('ticketSummary').should('exist');
});
it('Client list create new client', () => {
cy.dataCy('vnTableCreateBtn').should('exist');
cy.dataCy('vnTableCreateBtn').click();
const data = {
Customer: { val: 1, type: 'select' },
Warehouse: { val: 'Warehouse One', type: 'select' },
Address: { val: 'employee', type: 'select' },
Landed: { val: '01-01-2024', type: 'date' },
};
cy.fillInForm(data);
cy.get('.q-mt-lg > .q-btn--standard').click();
cy.checkNotification('Data created');
cy.url().should('match', /\/ticket\/\d+\/summary/);
});
});

View File

@ -0,0 +1,25 @@
/// <reference types="cypress" />
describe('TicketRequest', () => {
beforeEach(() => {
cy.login('developer');
cy.viewport(1920, 1080);
cy.visit('/#/ticket/31/observation');
});
it('Creates and deletes a note', () => {
cy.dataCy('ticketNotesAddNoteBtn').should('exist');
cy.dataCy('ticketNotesAddNoteBtn').click();
cy.dataCy('ticketNotesObservationType').should('exist');
cy.selectOption('[data-cy="ticketNotesObservationType"]:last', 'Weight');
cy.dataCy('ticketNotesDescription').should('exist');
cy.get('[data-cy="ticketNotesDescription"]:last').type(
'This is a note description'
);
cy.dataCy('crudModelDefaultSaveBtn').click();
cy.checkNotification('Data saved');
cy.dataCy('ticketNotesRemoveNoteBtn').should('exist');
cy.dataCy('ticketNotesRemoveNoteBtn').click();
cy.dataCy('VnConfirm_confirm').click();
cy.checkNotification('Data saved');
});
});

View File

@ -0,0 +1,22 @@
/// <reference types="cypress" />
describe('TicketRequest', () => {
beforeEach(() => {
cy.login('developer');
cy.viewport(1920, 1080);
cy.visit('/#/ticket/31/request');
});
it('Creates a new request', () => {
cy.dataCy('vnTableCreateBtn').should('exist');
cy.dataCy('vnTableCreateBtn').click();
const data = {
Description: { val: 'Purchase description' },
Atender: { val: 'buyerNick', type: 'select' },
Quantity: { val: 2 },
Price: { val: 123 },
};
cy.fillInForm(data);
cy.get('.q-mt-lg > .q-btn--standard').click();
cy.checkNotification('Data created');
});
});

View File

@ -0,0 +1,131 @@
/// <reference types="cypress" />
const c = require('croppie');
describe('TicketSale', () => {
beforeEach(() => {
cy.login('developer');
cy.viewport(1920, 1080);
cy.visit('/#/ticket/31/sale');
});
const firstRow = 'tbody > :nth-child(1)';
const selectFirstRow = () => {
cy.waitForElement(firstRow);
cy.get(firstRow).find('.q-checkbox__inner').click();
};
it('it should add item to basket', () => {
cy.window().then((win) => {
cy.stub(win, 'open').as('windowOpen');
});
cy.dataCy('ticketSaleAddToBasketBtn').should('exist');
cy.dataCy('ticketSaleAddToBasketBtn').click();
cy.get('@windowOpen').should('be.calledWithMatch', /\/order\/\d+\/catalog/);
});
it('should send SMS', () => {
selectFirstRow();
cy.dataCy('ticketSaleMoreActionsDropdown').click();
cy.waitForElement('[data-cy="sendShortageSMSItem"]');
cy.dataCy('sendShortageSMSItem').should('exist');
cy.dataCy('sendShortageSMSItem').click();
cy.dataCy('vnSmsDialog').should('exist');
cy.dataCy('sendSmsBtn').click();
cy.checkNotification('SMS sent');
});
it('should recalculate price when "Recalculate price" is clicked', () => {
cy.intercept('POST', '**/recalculatePrice').as('recalculatePrice');
selectFirstRow();
cy.dataCy('ticketSaleMoreActionsDropdown').click();
cy.waitForElement('[data-cy="recalculatePriceItem"]');
cy.dataCy('recalculatePriceItem').should('exist');
cy.dataCy('recalculatePriceItem').click();
cy.wait('@recalculatePrice').its('response.statusCode').should('eq', 200);
cy.checkNotification('Data saved');
});
it('should update discount when "Update discount" is clicked', () => {
selectFirstRow();
cy.dataCy('ticketSaleMoreActionsDropdown').click();
cy.waitForElement('[data-cy="updateDiscountItem"]');
cy.dataCy('updateDiscountItem').should('exist');
cy.dataCy('updateDiscountItem').click();
cy.waitForElement('[data-cy="ticketSaleDiscountInput"]');
cy.dataCy('ticketSaleDiscountInput').find('input').focus();
cy.dataCy('ticketSaleDiscountInput').find('input').type('10');
cy.dataCy('saveManaBtn').click();
cy.waitForElement('.q-notification__message');
cy.checkNotification('Data saved');
});
it('adds claim', () => {
selectFirstRow();
cy.dataCy('ticketSaleMoreActionsDropdown').click();
cy.dataCy('createClaimItem').click();
cy.dataCy('VnConfirm_confirm').click();
cy.url().should('match', /\/claim\/\d+\/basic-data/);
// Delete created claim to avoid cluttering the database
cy.dataCy('descriptor-more-opts').click();
cy.dataCy('deleteClaim').click();
cy.dataCy('VnConfirm_confirm').click();
cy.checkNotification('Data deleted');
});
it('marks row as reserved', () => {
selectFirstRow();
cy.dataCy('ticketSaleMoreActionsDropdown').click();
cy.waitForElement('[data-cy="markAsReservedItem"]');
cy.dataCy('markAsReservedItem').click();
cy.dataCy('ticketSaleReservedIcon').should('exist');
});
it('unmarks row as reserved', () => {
selectFirstRow();
cy.dataCy('ticketSaleMoreActionsDropdown').click();
cy.waitForElement('[data-cy="unmarkAsReservedItem"]');
cy.dataCy('unmarkAsReservedItem').click();
cy.dataCy('ticketSaleReservedIcon').should('not.exist');
});
it('refunds row with warehouse', () => {
selectFirstRow();
cy.dataCy('ticketSaleMoreActionsDropdown').click();
cy.dataCy('ticketSaleRefundItem').click();
cy.dataCy('ticketSaleRefundWithWarehouse').click();
cy.checkNotification('The following refund ticket have been created');
});
it('refunds row without warehouse', () => {
selectFirstRow();
cy.dataCy('ticketSaleMoreActionsDropdown').click();
cy.dataCy('ticketSaleRefundItem').click();
cy.dataCy('ticketSaleRefundWithoutWarehouse').click();
cy.checkNotification('The following refund ticket have been created');
});
it('transfers ticket', () => {
cy.visit('/#/ticket/32/sale');
selectFirstRow();
cy.dataCy('ticketSaleTransferBtn').click();
cy.dataCy('ticketTransferPopup').should('exist');
cy.dataCy('ticketTransferNewTicketBtn').click();
// existen 3 elementos "tbody" necesito checkear que el segundo elemento tbody tenga una row sola
cy.get('tbody').eq(1).find('tr').should('have.length', 1);
selectFirstRow();
cy.dataCy('ticketSaleTransferBtn').click();
cy.dataCy('ticketTransferPopup').should('exist');
cy.dataCy('ticketTransferDestinationTicketInput').find('input').focus();
cy.dataCy('ticketTransferDestinationTicketInput').find('input').type('32');
cy.dataCy('ticketTransferTransferBtn').click();
// checkear que la url contenga /ticket/1000002/sale
cy.url().should('match', /\/ticket\/32\/sale/);
});
it('should redirect to ticket logs', () => {
cy.get(firstRow).find('.q-btn:last').click();
cy.url().should('match', /\/ticket\/31\/log/);
});
});

View File

@ -7,6 +7,9 @@ describe('VnLocation', () => {
prefix: '.q-dialog__inner > .column > #formModel > .q-card',
sufix: ' .q-field__inner > .q-field__control',
};
const countrySelector = `${createForm.prefix} > :nth-child(5) > :nth-child(3) > ${createForm.sufix}`;
const provinceSelector = `${createForm.prefix} > :nth-child(5) > :nth-child(2) > ${createForm.sufix}`;
const citySelector = `${createForm.prefix} > :nth-child(4) > :nth-child(2) > ${createForm.sufix}`;
describe('CreateFormDialog ', () => {
beforeEach(() => {
cy.viewport(1280, 720);
@ -16,46 +19,23 @@ describe('VnLocation', () => {
cy.get(createLocationButton).click();
});
it('should filter provinces based on selected country', () => {
// Select a country
cy.selectOption(
`${createForm.prefix} > :nth-child(5) > .q-field:nth-child(5)> ${createForm.sufix}`,
'Ecuador'
);
// Verify that provinces are filtered
cy.get(
`${createForm.prefix} > :nth-child(5) > .q-field:nth-child(3)> ${createForm.sufix}`
).should('have.length', 1);
// Verify that towns are filtered
cy.get(
`${createForm.prefix} > :nth-child(4) > .q-field:nth-child(3)> ${createForm.sufix}`
).should('have.length', 1);
const country = 'Ecuador';
cy.selectOption(countrySelector, country);
cy.get(countrySelector).should('have.length', 1);
cy.get(citySelector).should('have.length', 1);
});
it('should filter towns based on selected province', () => {
// Select a country
cy.selectOption(
`${createForm.prefix} > :nth-child(5) > .q-field:nth-child(3)> ${createForm.sufix}`,
'Ecuador'
);
// Verify that provinces are filtered
cy.get(
`${createForm.prefix} > :nth-child(5) > .q-field:nth-child(3)> ${createForm.sufix}`
).should('have.length', 1);
// Verify that towns are filtered
cy.get(
`${createForm.prefix} > :nth-child(4) > .q-field:nth-child(3)> ${createForm.sufix}`
).should('have.length', 1);
const country = 'Ecuador';
cy.selectOption(countrySelector, country);
cy.get(provinceSelector).should('have.length', 1);
cy.get(citySelector).should('have.length', 1);
});
it('should pass selected country', () => {
// Select a country
const country = 'Ecuador';
const province = 'Province five';
cy.selectOption(
`${createForm.prefix} > :nth-child(5) > .q-field:nth-child(5)> ${createForm.sufix}`,
country
);
cy.selectOption(countrySelector, country);
cy.selectOption(
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix}`,
province
@ -80,13 +60,11 @@ describe('VnLocation', () => {
cy.get(locationOptions).should('have.length.at.least', 5);
});
it('input filter location as "al"', function () {
// cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type('al');
cy.get(locationOptions).should('have.length.at.least', 4);
});
it('input filter location as "ecuador"', function () {
// cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type('ecuador');
cy.get(locationOptions).should('have.length.at.least', 1);
@ -142,7 +120,6 @@ describe('VnLocation', () => {
const province = 'Saskatchew';
cy.get(createLocationButton).click();
cy.get(dialogInputs).eq(0).type(postCode);
// city create button
cy.get(
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
).click();
@ -151,7 +128,6 @@ describe('VnLocation', () => {
cy.get('#q-portal--dialog--3 .q-btn--standard').click();
cy.get('#q-portal--dialog--1 .q-btn--standard').click();
cy.waitForElement('.q-form');
checkVnLocation(postCode, province);
});

View File

@ -5,6 +5,7 @@ describe('VnSearchBar', () => {
const idGap = '.q-item > .q-item__label';
const vnTableRow = '.q-virtual-scroll__content';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('#/customer/list');
});

View File

@ -106,7 +106,6 @@ Cypress.Commands.add('fillInForm', (obj, form = '.q-form > .q-card') => {
case 'select':
cy.wrap(el).type(val);
cy.get('.q-menu .q-item').contains(val).click();
cy.get('body').click();
break;
case 'date':
cy.wrap(el).type(val.split('-').join(''));
@ -298,16 +297,20 @@ Cypress.Commands.add('checkNotification', (text) => {
Cypress.Commands.add('checkValueForm', (id, search) => {
cy.get(
`.grid-create > :nth-child(${id}) > .q-field__inner>.q-field__control> .q-field__control-container>.q-field__native >.q-field__input`
`.grid-create > :nth-child(${id}) > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input`
).should('have.value', search);
});
Cypress.Commands.add('checkValueSelectForm', (id, search) => {
cy.get(
`.grid-create > :nth-child(${id}) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container>.q-field__native>.q-field__input`
`.grid-create > :nth-child(${id}) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input`
).should('have.value', search);
});
Cypress.Commands.add('searchByLabel', (label, value) => {
cy.get(`[label="${label}"] > .q-field > .q-field__inner`).type(`${value}{enter}`);
});
Cypress.Commands.add('dataCy', (dataTestId, attr = 'data-cy') => {
return cy.get(`[${attr}="${dataTestId}"]`);
});