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

View File

@ -394,6 +394,7 @@ watch(formUrl, async () => {
@click="onSubmit" @click="onSubmit"
:disable="!hasChanges" :disable="!hasChanges"
:title="t('globals.save')" :title="t('globals.save')"
data-cy="crudModelDefaultSaveBtn"
/> />
<slot name="moreAfterActions" /> <slot name="moreAfterActions" />
</QBtnGroup> </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( const showFilter = computed(
() => $props.column?.columnFilter !== false && $props.column.name != 'tableActions' () => $props.column?.columnFilter !== false && $props.column.name != 'tableActions'
); );
const onTabPressed = async () => {
if (model.value) enterEvent['keyup.enter']();
};
</script> </script>
<template> <template>
<div <div
@ -157,6 +161,7 @@ const showFilter = computed(
v-model="model" v-model="model"
:components="components" :components="components"
component-prop="columnFilter" component-prop="columnFilter"
@keydown.tab="onTabPressed"
/> />
</div> </div>
</template> </template>

View File

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

View File

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

View File

@ -138,8 +138,6 @@ onMounted(() => {
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300); if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
}); });
defineExpose({ opts: myOptions });
const arrayDataKey = const arrayDataKey =
$props.dataKey ?? ($props.url?.length > 0 ? $props.url : $attrs.name ?? $attrs.label); $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 (fields) fetchOptions.fields = fields;
if (sortBy) fetchOptions.order = sortBy; if (sortBy) fetchOptions.order = sortBy;
arrayData.reset(['skip', 'filter.skip', 'page']); 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) { async function filterHandler(val, update) {
@ -256,6 +257,30 @@ async function onScroll({ to, direction, from, index }) {
isLoading.value = false; 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> </script>
<template> <template>
@ -266,6 +291,7 @@ async function onScroll({ to, direction, from, index }) {
:option-value="optionValue" :option-value="optionValue"
v-bind="$attrs" v-bind="$attrs"
@filter="filterHandler" @filter="filterHandler"
@keydown="handleKeyDown"
:emit-value="nullishToTrue($attrs['emit-value'])" :emit-value="nullishToTrue($attrs['emit-value'])"
:map-options="nullishToTrue($attrs['map-options'])" :map-options="nullishToTrue($attrs['map-options'])"
:use-input="nullishToTrue($attrs['use-input'])" :use-input="nullishToTrue($attrs['use-input'])"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
import { ref } from 'vue'; import { ref } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import axios from 'axios'; 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'; import VnInput from 'src/components/common/VnInput.vue';
const props = defineProps({ const props = defineProps({
@ -31,47 +31,26 @@ const applyTags = () => {
emit('applyTags', tagInfo); emit('applyTags', tagInfo);
}; };
const removeTagGroupParam = (valIndex = null) => {
if (!valIndex) {
tagValues.value = [{}];
} else {
(tagValues.value || []).splice(valIndex, 1);
}
};
const getSelectedTagValues = async (tag) => { const getSelectedTagValues = async (tag) => {
try { if (!tag?.id) return;
if (!tag?.id) return; const filter = {
const filter = { fields: ['value'],
fields: ['value'], order: 'value ASC',
order: 'value ASC', limit: 30,
limit: 30, };
};
const url = `Tags/${tag?.id}/filterValue`; const url = `Tags/${tag?.id}/filterValue`;
const params = { filter: JSON.stringify(filter) }; const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(url, { const { data } = await axios.get(url, {
params, params,
}); });
tagOptions.value = data; tagOptions.value = data;
} catch (err) {
console.error('Error getting selected tag values');
}
}; };
</script> </script>
<template> <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"> <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 <VnSelect
:label="t('params.tag')" :label="t('params.tag')"
v-model="selectedTag" v-model="selectedTag"
@ -84,17 +63,7 @@ const getSelectedTagValues = async (tag) => {
rounded rounded
:emit-value="false" :emit-value="false"
use-input use-input
@update:model-value="($event) => getSelectedTagValues($event)" @update:model-value="getSelectedTagValues"
/>
<QBtn
icon="add_circle"
shortcut="+"
flat
class="filter-icon q-mb-md"
size="md"
dense
:disabled="!selectedTag || !tagValues[0].value"
@click="tagValues.unshift({})"
/> />
<div <div
v-for="(value, index) in tagValues" v-for="(value, index) in tagValues"
@ -106,7 +75,7 @@ const getSelectedTagValues = async (tag) => {
v-if="!selectedTag?.isFree && tagOptions" v-if="!selectedTag?.isFree && tagOptions"
:label="t('components.itemsFilterPanel.value')" :label="t('components.itemsFilterPanel.value')"
v-model="value.value" v-model="value.value"
:options="tagOptions || []" :options="tagOptions"
option-value="value" option-value="value"
option-label="value" option-label="value"
dense dense
@ -124,7 +93,6 @@ const getSelectedTagValues = async (tag) => {
:label="t('components.itemsFilterPanel.value')" :label="t('components.itemsFilterPanel.value')"
:disable="!value" :disable="!value"
is-outlined is-outlined
:is-clearable="false"
class="col" class="col"
/> />
<QBtn <QBtn
@ -135,11 +103,25 @@ const getSelectedTagValues = async (tag) => {
rounded rounded
flat flat
class="filter-icon col-2" class="filter-icon col-2"
:disabled="!value.value" @click="tagValues.splice(index, 1)"
@click="removeTagGroupParam(index)"
/> />
</div> </div>
</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> </QCard>
</QForm> </QForm>
</template> </template>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -215,7 +215,7 @@ const requestComponentUpdate = async (ticket, isWithoutNegatives) => {
if (!newLanded) { if (!newLanded) {
notify(t('advanceTickets.noDeliveryZone'), 'negative'); notify(t('advanceTickets.noDeliveryZone'), 'negative');
return; throw new Error(t('advanceTickets.noDeliveryZone'));
} }
ticket.landed = newLanded.landed; ticket.landed = newLanded.landed;
@ -299,10 +299,10 @@ const splitTickets = async () => {
const { query, params } = await requestComponentUpdate(ticket, true); const { query, params } = await requestComponentUpdate(ticket, true);
await axios.post(query, params); await axios.post(query, params);
progressAdd(ticket.futureId); progressAdd(ticket.futureId);
} catch (error) { } catch (e) {
splitErrors.value.push({ splitErrors.value.push({
id: ticket.futureId, id: ticket.futureId,
reason: error.response?.data?.error?.message, reason: e.message || e.response?.data?.error?.message,
}); });
progressAdd(ticket.futureId); 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 ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue';
import { toTimeFormat } from 'src/filters/date'; import { toTimeFormat } from 'src/filters/date';
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue'; import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
import TicketProblems from 'src/components/TicketProblems.vue';
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
@ -461,6 +462,7 @@ function setReference(data) {
data-key="TicketList" data-key="TicketList"
:label="t('Search ticket')" :label="t('Search ticket')"
:info="t('You can search by ticket id or alias')" :info="t('You can search by ticket id or alias')"
data-cy="ticketListSearchBar"
/> />
<RightMenu> <RightMenu>
<template #right-panel> <template #right-panel>
@ -488,68 +490,10 @@ function setReference(data) {
'row-key': 'id', 'row-key': 'id',
selection: 'multiple', selection: 'multiple',
}" }"
data-cy="ticketListTable"
> >
<template #column-statusIcons="{ row }"> <template #column-statusIcons="{ row }">
<div class="q-gutter-x-xs"> <TicketProblems :row="row" />
<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>
</template> </template>
<template #column-salesPersonFk="{ row }"> <template #column-salesPersonFk="{ row }">
<span class="link" @click.stop> <span class="link" @click.stop>

View File

@ -21,12 +21,7 @@ const agenciesOptions = ref([]);
@on-fetch="(data) => (agenciesOptions = data)" @on-fetch="(data) => (agenciesOptions = data)"
auto-load auto-load
/> />
<FormModel <FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load>
:url="`Travels/${route.params.id}`"
:url-update="`Travels/${route.params.id}`"
model="Travel"
auto-load
>
<template #form="{ data }"> <template #form="{ data }">
<VnRow> <VnRow>
<VnInput v-model="data.ref" :label="t('globals.reference')" /> <VnInput v-model="data.ref" :label="t('globals.reference')" />
@ -78,6 +73,7 @@ const agenciesOptions = ref([]);
</VnInput> </VnInput>
</VnRow> </VnRow>
<VnRow> <VnRow>
<QCheckbox v-model="data.isRaid" :label="t('travel.basicData.isRaid')" />
<QCheckbox <QCheckbox
:label="t('travel.summary.delivered')" :label="t('travel.summary.delivered')"
v-model="data.isDelivered" v-model="data.isDelivered"
@ -93,7 +89,7 @@ const agenciesOptions = ref([]);
<i18n> <i18n>
es: 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: 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> </i18n>

View File

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

View File

@ -7,6 +7,7 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription'; import useCardDescription from 'src/composables/useCardDescription';
import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue'; import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue';
import filter from './TravelFilter.js';
import { toDate } from 'src/filters'; import { toDate } from 'src/filters';
@ -21,35 +22,6 @@ const $props = defineProps({
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); 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(() => { const entityId = computed(() => {
return $props.id || route.params.id; return $props.id || route.params.id;
}); });
@ -65,7 +37,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
:title="data.title" :title="data.title"
:subtitle="data.subtitle" :subtitle="data.subtitle"
:filter="filter" :filter="filter"
data-key="travelData" data-key="Travel"
@on-fetch="setData" @on-fetch="setData"
> >
<template #menu="{ entity }"> <template #menu="{ entity }">
@ -80,12 +52,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
</template> </template>
<template #icons="{ entity }"> <template #icons="{ entity }">
<QCardActions class="q-gutter-x-md"> <QCardActions class="q-gutter-x-md">
<QIcon <QIcon v-if="entity.isRaid" name="vn:net" color="primary" size="xs">
v-if="entity.daysInForward"
name="vn:net"
color="primary"
size="xs"
>
<QTooltip> <QTooltip>
{{ {{
t('globals.raid', { daysInForward: entity.daysInForward }) 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')" :label="t('globals.warehouseOut')"
:value="travel.warehouseOut?.name" :value="travel.warehouseOut?.name"
/> />
<QCheckbox
:label="t('travel.basicData.isRaid')"
v-model="travel.isRaid"
:disable="true"
/>
<QCheckbox <QCheckbox
:label="t('travel.summary.delivered')" :label="t('travel.summary.delivered')"
v-model="travel.isDelivered" v-model="travel.isDelivered"
@ -286,6 +291,10 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
:label="t('globals.warehouseIn')" :label="t('globals.warehouseIn')"
:value="travel.warehouseIn?.name" :value="travel.warehouseIn?.name"
/> />
<VnLv
:label="t('travel.basicData.daysInForward')"
:value="travel?.daysInForward"
/>
<QCheckbox <QCheckbox
:label="t('travel.summary.received')" :label="t('travel.summary.received')"
v-model="travel.isReceived" 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="t('globals.reference')" :value="travel.ref" />
<VnLv label="m³" :value="travel.m3" /> <VnLv label="m³" :value="travel.m3" />
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" /> <VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
<VnLv
:label="t('travel.basicData.daysInForward')"
:value="travel?.daysInForward"
/>
</QCard> </QCard>
<QCard class="full-width"> <QCard class="full-width">
<VnTitle :text="t('travel.summary.entries')" /> <VnTitle :text="t('travel.summary.entries')" />

View File

@ -227,10 +227,12 @@ const columns = computed(() => [
> >
<template #column-status="{ row }"> <template #column-status="{ row }">
<div class="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> <QTooltip>
{{ {{
t('globals.raid', { daysInForward: row.daysInForward }) t('globals.raid', {
daysInForward: row.daysInForward,
})
}}</QTooltip }}</QTooltip
> >
</QIcon> </QIcon>

View File

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

View File

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

View File

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

View File

@ -24,7 +24,6 @@ function notIsLocations(ifIsFalse, ifIsTrue) {
:descriptor="ZoneDescriptor" :descriptor="ZoneDescriptor"
:filter-panel="notIsLocations(ZoneFilterPanel, undefined)" :filter-panel="notIsLocations(ZoneFilterPanel, undefined)"
:search-data-key="notIsLocations('ZoneList', undefined)" :search-data-key="notIsLocations('ZoneList', undefined)"
:custom-url="`Zones/${route.params?.id}/getLeaves`"
:searchbar-props="{ :searchbar-props="{
url: notIsLocations('Zones', 'ZoneLocations'), url: notIsLocations('Zones', 'ZoneLocations'),
label: notIsLocations(t('list.searchZone'), t('list.searchLocation')), 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, { const arrayData = useArrayData(datakey, {
url: url.value, url: url.value,
}); });
const { store } = arrayData; const store = arrayData.store;
const storeData = computed(() => store.data);
const defaultNode = { const defaultNode = {
id: null, id: null,
@ -66,8 +65,20 @@ const onNodeExpanded = async (nodeKeysArray) => {
if (!nodeKeysSet.has(null)) return; if (!nodeKeysSet.has(null)) return;
const wasExpanded = !previousExpandedNodes.value.has(lastNodeKey); const wasExpanded = !previousExpandedNodes.value.has(lastNodeKey);
if (wasExpanded) await fetchNodeLeaves(lastNodeKey); if (wasExpanded && treeRef.value) {
else { 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( const difference = new Set(
[...previousExpandedNodes.value].filter((x) => !nodeKeysSet.has(x)) [...previousExpandedNodes.value].filter((x) => !nodeKeysSet.has(x))
); );
@ -83,41 +94,21 @@ const formatNodeSelected = (node) => {
if (node.selected === 1) node.selected = true; if (node.selected === 1) node.selected = true;
else if (node.selected === 0) node.selected = false; 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 = [{}]; if (node.sons > 0 && !node.childs) node.childs = [{}];
}; };
const fetchNodeLeaves = async (nodeKey) => { const fetchNodeLeaves = async (nodeKey) => {
try { if (!treeRef.value) return;
const node = treeRef.value?.getNodeByKey(nodeKey); const node = treeRef.value?.getNodeByKey(nodeKey);
if (!node || node.sons === 0) return; 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 }; state.set('Tree', node);
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) { function getNodeIds(node) {
if (!node) return [];
let ids = []; let ids = [];
if (node.id) ids.push(node.id); if (node.id) ids.push(node.id);
@ -128,60 +119,46 @@ function getNodeIds(node) {
return ids; return ids;
} }
watch(storeData, async (val) => { watch(
// Se triggerea cuando se actualiza el store.data, el cual es el resultado del fetch de la searchbar () => store.data,
if (!nodes.value[0]) nodes.value = [defaultNode]; async (val) => {
nodes.value[0].childs = [...val]; if (!val) return;
const fetchedNodeKeys = val.flatMap(getNodeIds); // // Se triggerea cuando se actualiza el store.data, el cual es el resultado del fetch de la searchbar
state.set('Tree', [...fetchedNodeKeys]); 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) => { val.forEach((n) => {
formatNodeSelected(n); formatNodeSelected(n);
}); });
} else { store.data = null;
for (let n of state.get('Tree')) await fetchNodeLeaves(n); expanded.value = [null];
expanded.value = [null, ...fetchedNodeKeys]; } else {
} for (let n of state.get('Tree')) {
previousExpandedNodes.value = new Set(expanded.value); await fetchNodeLeaves(n);
}); }
expanded.value = [null, ...fetchedNodeKeys];
}
previousExpandedNodes.value = new Set(expanded.value);
},
{ immediate: true }
);
const reFetch = async () => { const reFetch = async () => {
const { data } = await arrayData.fetch({ append: false }); const { data } = await arrayData.fetch({ append: false });
nodes.value = data; nodes.value = data;
expanded.value = [null];
}; };
onMounted(async () => { onMounted(async () => {
if (store.userParams?.search && !props.showSearchBar) { if (store.userParams?.search) await arrayData.fetch({});
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);
}); });
onUnmounted(() => { onUnmounted(() => {
state.set('Tree', undefined); state.set('Tree', undefined);
arrayData.destroy();
}); });
</script> </script>

View File

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

View File

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

View File

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

View File

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

View File

@ -106,7 +106,6 @@ Cypress.Commands.add('fillInForm', (obj, form = '.q-form > .q-card') => {
case 'select': case 'select':
cy.wrap(el).type(val); cy.wrap(el).type(val);
cy.get('.q-menu .q-item').contains(val).click(); cy.get('.q-menu .q-item').contains(val).click();
cy.get('body').click();
break; break;
case 'date': case 'date':
cy.wrap(el).type(val.split('-').join('')); cy.wrap(el).type(val.split('-').join(''));
@ -298,16 +297,20 @@ Cypress.Commands.add('checkNotification', (text) => {
Cypress.Commands.add('checkValueForm', (id, search) => { Cypress.Commands.add('checkValueForm', (id, search) => {
cy.get( 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); ).should('have.value', search);
}); });
Cypress.Commands.add('checkValueSelectForm', (id, search) => { Cypress.Commands.add('checkValueSelectForm', (id, search) => {
cy.get( 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); ).should('have.value', search);
}); });
Cypress.Commands.add('searchByLabel', (label, value) => { Cypress.Commands.add('searchByLabel', (label, value) => {
cy.get(`[label="${label}"] > .q-field > .q-field__inner`).type(`${value}{enter}`); 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}"]`);
});