Compare commits

...

219 Commits

Author SHA1 Message Date
Alex Moreno 9086b7d48d 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-26 14:20:08 +01:00
Carlos Andrés b20803e6b9 Actualizar src/pages/Travel/Card/TravelBasicData.vue
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-26 12:31:23 +00:00
Carlos Satorres 75986bf7a8 Merge pull request 'fix: hotfix travel' (!1003) from hotfix-7366travel into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1003
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-11-26 12:17:06 +00:00
Carlos Satorres c5f2be688c fix: fix true
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-26 13:12:53 +01:00
Carlos Satorres 4008f50781 fix: remove
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-26 13:08:28 +01:00
Carlos Satorres 728055352d fix: fix raidDays
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-26 13:06:55 +01:00
Carlos Satorres ad8d5b5e9a fix: hotfix travel
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-26 13:00:38 +01:00
Jorge Penadés 9c5125a4d2 Merge pull request '#8232 change default scopeDays' (!1000) from 8232-changeDefaultScopeDays into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1000
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2024-11-26 09:44:18 +00:00
Jorge Penadés 15c1898044 feat: refs #8232 hide only if it is null
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-26 10:42:14 +01:00
Jorge Penadés a33f801543 refactor: refs #8232 use composable
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-26 10:19:54 +01:00
Jorge Penadés 84adc40c18 feat: refs #8232 change default scopeDays
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-26 10:16:53 +01:00
Alex Moreno 7feea110a6 fix(CustomerSummary): fixed CustomerSummaryTable max width
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-26 09:29:09 +01:00
Alex Moreno 2076072eeb fix(TicketSale): set old quantity when error
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-26 09:21:51 +01:00
Alex Moreno 8fbf7fed43 fix(TicketSale): throw error when it should
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-26 09:05:46 +01:00
Alex Moreno 1e4cda6c6a fix(OrderCatalogFilter): remove limit
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-26 07:39:37 +01:00
Alex Moreno 1ce1f1f8e0 Merge pull request '8231_testToMaster_2448' (!997) from 8231_testToMaster_2448 into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #997
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
2024-11-26 06:28:29 +00:00
Javier Segarra 1cbe134e27 Merge pull request '#8163 add VnInput insert functionality and e2e test' (!987) from wbuezas/salix-front-mindshore-fork2:8163-VnInputFunctionality into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #987
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2024-11-25 21:36:09 +00:00
Javier Segarra a45c40f796 fix: refs #8163 minor problem when keypress
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 22:34:56 +01:00
Javier Segarra 7650997c24 perf: refs #8163 #8061 createNewPostCodeForm
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 17:54:38 +01:00
Javier Segarra f6e97efe78 fix: refs #8163 #8061 createNewPostCodeForm 2024-11-25 17:33:59 +01:00
Javier Segarra 7e924bc791 Merge branch '8231_testToMaster_2448' of https://gitea.verdnatura.es/verdnatura/salix-front into 8231_testToMaster_2448
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 14:59:29 +01:00
Javier Segarra 2ead484026 test: refs #8231 fix VnLocation 2024-11-25 14:59:26 +01:00
Alex Moreno 594fc60eec chore: refs #8231 add changelog
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 14:49:10 +01:00
Javier Segarra 1974fd4663 Merge branch 'dev' into 8163-VnInputFunctionality
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 14:27:44 +01:00
Javier Segarra 4735d98afc test: refs #8163 #8163 rename tests
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 14:26:59 +01:00
Jorge Penadés 8688f2a3aa Merge pull request 'fix: refs #7229 set url' (!990) from 7229-fixUrl into dev
gitea/salix-front/pipeline/head This commit looks good Details
gitea/salix-front/pipeline/pr-dev This commit looks good Details
Reviewed-on: #990
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-25 13:16:28 +00:00
Jorge Penadés 5bdf9bc57e Merge branch 'dev' into 7229-fixUrl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 13:15:29 +00:00
Javier Segarra 28c9aceb80 Merge pull request 'Randomize functions and example' (!994) from cypress_randomizeValue into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #994
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
2024-11-25 13:07:55 +00:00
Alex Moreno 209266d843 Merge branch 'dev' into 7229-fixUrl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 13:07:15 +00:00
Javier Segarra 4821c43d0d Merge branch 'dev' into cypress_randomizeValue
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 13:06:07 +00:00
Carlos Satorres 2c492e88d5 Merge pull request 'refs #7529 create WorkerPIT' (!442) from 7529-workerPIT into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #442
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-25 13:05:32 +00:00
Javier Segarra 582a3b333a Merge branch 'dev' into cypress_randomizeValue
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 14:01:27 +01:00
Carlos Satorres dfcaf4e692 fix: refs #7529 fix e2e
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 13:53:22 +01:00
Carlos Satorres 2bc2217406 fix: refs #7529 fix workerPit e2e
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 13:49:01 +01:00
Jorge Penadés 34062d3fc4 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7229-fixUrl
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 13:37:34 +01:00
Carlos Satorres 5dd508c559 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7529-workerPIT
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 13:31:02 +01:00
William Buezas 62cd952e84 feat: refs #8163 resolve conflictss
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 09:22:21 -03:00
Javier Segarra ec96f6bea7 Merge pull request 'fix: #8061 Handle new CP' (!948) from 8061_newCP into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #948
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-25 12:17:13 +00:00
Alex Moreno ee2450c82f Merge branch 'dev' into 8061_newCP
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 12:16:18 +00:00
Alex Moreno 655a76ff62 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-25 13:03:11 +01:00
Alex Moreno fbd57dc96b Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head This commit looks good Details
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 13:02:58 +01:00
Jon Elias 843c54fcc1 Merge pull request 'Hotfix: ZoneLocationsTree' (!995) from Fix-ZoneLocationsTree2 into master
gitea/salix-front/pipeline/pr-test This commit looks good Details
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #995
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-25 11:56:30 +00:00
Alex Moreno 8e7cb9c46e fix: zoneLocationsTree check selected sons
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 12:54:15 +01:00
Javier Segarra a99f64f66a Merge branch 'dev' into 8061_newCP
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 11:20:20 +00:00
Jon Elias f3429297cf Merge branch 'master' into Fix-ZoneLocationsTree2
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 11:20:17 +00:00
Javier Segarra 3e06ba3c18 perf: remove console
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 11:20:07 +00:00
Javier Segarra 4bd14927de Merge branch 'dev' into cypress_randomizeValue
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-25 11:19:30 +00:00
Javier Segarra b62935494a test: remove only
gitea/salix-front/pipeline/pr-dev Build queued... Details
2024-11-25 11:19:21 +00:00
Jon Elias d191d88e81 refactor: modified button to prevent submit
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 12:19:20 +01:00
Javier Segarra caca9aea71 Merge pull request 'Add reportFileName option' (!993) from cypress_reporterFileName into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #993
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-25 11:18:43 +00:00
Jorge Penadés 6c30ea9e7a Merge pull request '#8207 hotfix-tableActions' (!991) from 8207-hotfix-tableActions into master
gitea/salix-front/pipeline/head This commit looks good Details
gitea/salix-front/pipeline/pr-test This commit looks good Details
Reviewed-on: #991
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-25 11:13:45 +00:00
Jorge Penadés e994ae72b6 fix: refs #8207 add filter to reset
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 12:08:37 +01:00
Jorge Penadés a1284cefc2 refactor: refs #8207 add update fn
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 12:01:28 +01:00
Jon Elias c558636799 refactor: requested changes
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 11:12:11 +01:00
Jorge Penadés a3f56aaf24 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into 8207-hotfix-tableActions
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 10:27:00 +01:00
Jon Elias 1dedf00fef Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into Fix-ZoneLocationsTree2
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-25 09:24:58 +01:00
Jon Elias a1aa9337c8 fix: show data and fixed search button when excluding a location
gitea/salix-front/pipeline/pr-master There was a failure building this commit Details
2024-11-25 09:21:20 +01:00
Javier Segarra c4f2ea032c feat: randomize functions and example
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-24 17:01:54 +01:00
Javier Segarra b8ac82bc75 feat: add reportFileName option
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-24 16:41:21 +01:00
Alex Moreno e10e0d01e6 fix: zoneEventExclusion form dated
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-24 11:53:40 +01:00
Javier Segarra feb752f75c perf: refs #8061 solve conflicts and random posCode it
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-24 09:31:43 +01:00
Javier Segarra fb4de9cda9 Merge branch 'dev' into 8061_newCP
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-24 09:23:37 +01:00
Javier Segarra 7f87df1225 feat: refs #8163 use VnAccountNumber in VnAccountNumber
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-23 16:49:32 +01:00
Javier Segarra 2fa8c3f88a feat: refs #8163 limit with maxLength
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-23 15:59:29 +01:00
Jorge Penadés 8b52629b0b refactor: refs #8207 improve logic
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 15:55:30 +01:00
Jorge Penadés 3a4c0e729a refactor: refs #8207 improve logic
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 15:52:22 +01:00
Jorge Penadés 9d8698fa2f refactor: refs #8207 improve logic
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 15:49:07 +01:00
Jorge Penadés 661cc0b5ee refactor: refs #8207 improve logic
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 15:37:48 +01:00
Alex Moreno 01ffb663f1 fix(ClaimList): stateCode orderBy priority
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-22 15:14:03 +01:00
William Buezas be1cd824d8 feat: refs #8163 add max length and more tests 2024-11-22 10:55:11 -03:00
Jorge Penadés 0eeb22d40a chore: refs #8207 drop useless code
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 13:56:30 +01:00
Jorge Penadés 7048f96565 refactor: refs #8207 imrove logic
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 13:55:22 +01:00
Jorge Penadés 50fbf64cf9 fix: refs #8207 update btn wip
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 13:33:35 +01:00
Jorge Penadés c72fa52851 fix: refs #8207 auto-refresh 2024-11-22 13:03:23 +01:00
Alex Moreno 6276843613 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-22 12:40:27 +01:00
Alex Moreno 14d2ddfa83 fix: merge errors
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-22 12:40:07 +01:00
Alex Moreno ef426dc579 Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head There was a failure building this commit Details
2024-11-22 12:10:34 +01:00
Alex Moreno 4913cf2c29 Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
gitea/salix-front/pipeline/head There was a failure building this commit Details
2024-11-22 12:10:04 +01:00
Javier Segarra 651b67e98f Merge pull request 'fix: orderCatalogFilter and fix useArrayData' (!989) from hotFix_orderCatalogFilter_refactor_fix into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #989
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2024-11-22 10:24:18 +00:00
Alex Moreno 94361f18fa Merge branch 'master' into hotFix_orderCatalogFilter_refactor_fix
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 10:23:10 +00:00
Alex Moreno 142302193e 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-22 11:21:33 +01:00
Alex Moreno 9d7f2b95e8 revert: VnVisibleColumn try catch
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-22 11:21:08 +01:00
Jorge Penadés 1beeccef7a fix: refs #7229 test
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-22 11:17:47 +01:00
Jorge Penadés 3d4f7d8860 fix: refs #7229 set url
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-11-22 11:08:32 +01:00
Alex Moreno 2db0369b74 fix: resetCategory
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 11:05:48 +01:00
Alex Moreno 1709795cf9 Merge branch 'master' into hotFix_orderCatalogFilter_refactor_fix
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 09:56:04 +00:00
Alex Moreno 26c1394321 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-22 10:52:51 +01:00
Alex Moreno 367f660508 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-22 10:52:30 +01:00
Alex Moreno 9019d4ff90 Merge pull request 'fix: remove all try catch(err) (error) console.error' (!988) from hotFix_tryCatch_badPractice into master
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #988
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-11-22 09:47:32 +00:00
Alex Moreno 522f32aa9a fix: orderCatalogFilter and fix useArrayData
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 10:40:49 +01:00
Jorge Penadés 55f9023201 Merge pull request '#7229 download file' (!833) from 7229-fixDownloadFile into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #833
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-22 09:34:31 +00:00
Jorge Penadés d1055ad572 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7229-fixDownloadFile
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-22 10:24:52 +01:00
Javier Segarra aae475bf4c feat: refs #8163 maxLength SupplierFD account
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-22 08:54:41 +01:00
Javier Segarra ce28757a1a feat: refs #8163 maxLengthVnInput 2024-11-22 08:54:19 +01:00
Alex Moreno bf29be1c5f fix: remove all try catch(err) (error) console.error
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-22 08:39:46 +01:00
Alex Moreno 8cbf40f465 fix(TicketSummary): observationTypes use .description
gitea/salix-front/pipeline/head This commit looks good Details
2024-11-22 07:45:49 +01:00
Alex Moreno 3b03f0dfee fix(TicketNotes): observationTypes use .description
gitea/salix-front/pipeline/head There was a failure building this commit Details
2024-11-22 07:43:59 +01:00
Carlos Satorres 095c1f477f fix: refs #7529 add save
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-22 07:34:39 +01:00
Carlos Satorres 3352cea0e7 fix: refs #7529 fix e2e
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-22 06:08:11 +01:00
William Buezas 86d19218de feat: refs #8163 add prop
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-21 16:54:22 -03: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
William Buezas ec40ef9351 feat: refs #8163 add VnInput insert functionality and e2e test
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-21 10:49:19 -03: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
Carlos Satorres a0f804ab78 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7529-workerPIT 2024-11-21 12:19:30 +01:00
Carlos Satorres 69498cccf9 Merge pull request 'hotfix-clientAddress' (!983) from hotfix-clientAddress into master
gitea/salix-front/pipeline/head This commit looks good Details
gitea/salix-front/pipeline/pr-master This commit looks good Details
Reviewed-on: #983
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2024-11-21 09:28:38 +00:00
Carlos Satorres 518ed40c91 Merge branch 'master' into hotfix-clientAddress
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-21 09:26:45 +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
Carlos Satorres 8a972507a4 fix: remove s
gitea/salix-front/pipeline/pr-master This commit looks good Details
2024-11-21 10:20:42 +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
Carlos Satorres 837f42d21f fix: provinceName 2024-11-21 10:18:25 +01: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
Carlos Satorres 991ef7b243 fix: refs #7529 fix te2e
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-21 09:32:45 +01: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
Jorge Penadés 9632fb7c75 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7229-fixDownloadFile
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-20 16:46:58 +01:00
Jorge Penadés 43f94ede64 fix: refs #7229 url + test
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-20 16:43:59 +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
Jorge Penadés ad93e16896 fix: refs #7229 url
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-11-20 13:50:35 +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
Carlos Satorres 258da0f60b Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7529-workerPIT 2024-11-20 13:16:10 +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
Jorge Penadés 0274dfcef2 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7229-fixDownloadFile
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-11-20 13:14:56 +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
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 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
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 9665a3407f fix: refs #7229 remove catch
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-11-19 15:54:38 +01:00
Jorge Penadés 85aeda337f Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7229-fixDownloadFile
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-11-19 15:49:45 +01:00
Javier Segarra e6f8b87890 Merge branch 'test' into fix_test_jsegarra 2024-11-19 15:05:39 +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
Javier Segarra 65100fcf25 test: fix e2e 2024-11-19 13:45:44 +01: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
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
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
Javier Segarra 4116f681b0 test: refs #8061 #8061 remove only
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-11-17 14:27:51 +01:00
Javier Segarra 95758e2564 test: refs #8061 #8061 CreateNewPostcodeForm
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-17 14:25:23 +01:00
Javier Segarra 8e37d22164 test: refs #8061 #8061 CreateNewPostcodeForm 2024-11-17 14:22:42 +01:00
Javier Segarra 69e6f0f467 test: refs #8061 #8061 CreateNewPostcodeForm 2024-11-17 12:57:35 +01:00
Javier Segarra e8ad185873 revert: refs #8061 test #8061 updates
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-16 14:32:41 +01:00
Javier Segarra 69a2eae542 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8061_newCP 2024-11-16 14:31:58 +01:00
Javier Segarra 1a0a2d9442 test: refs #8061 #8061 updates 2024-11-16 14:30:16 +01:00
Javier Segarra c7c9c13944 test: refs #8061 #8061 updates 2024-11-15 10:28:52 +01:00
Javier Segarra 703aaa1f38 feat: refs #8061 #8061 updates 2024-11-15 10:28:42 +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
Carlos Satorres 04f6107909 fix: refs #7529 fix scss
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-07 14:38:54 +01:00
Carlos Satorres 780af58747 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7529-workerPIT
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-11-07 12:48:26 +01:00
Carlos Satorres 8b2fbefc35 fix: refs #7529 front
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-10-29 14:00:04 +01:00
Carlos Satorres eea6276264 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7529-workerPIT 2024-10-29 08:32:47 +01:00
Carlos Satorres adbf1af453 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7529-workerPIT
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-10-29 06:13:22 +01:00
Jorge Penadés 53399c8f74 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7229-fixDownloadFile
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-10-28 16:25:18 +01:00
Carlos Satorres 847cf6a5b4 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7529-workerPIT
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-10-28 13:31:42 +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
Carlos Satorres 1aefad58e9 fix: refs #7529 fix front
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-10-18 14:05:38 +02:00
Carlos Satorres 237b3ed4df Merge branch 'dev' of https: refs #7529//gitea.verdnatura.es/verdnatura/salix-front into 7529-workerPIT
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-10-18 11:17:06 +02:00
Jorge Penadés 4e5a4ae7a3 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7229-fixDownloadFile
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-10-16 11:49:42 +02:00
Jorge Penadés fb7087d38a fix: refs #7229 download file
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-10-15 10:26:07 +02:00
Carlos Satorres 5d8f9dbd72 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7529-workerPIT
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-10-03 13:02:56 +02:00
Carlos Satorres ee2f80e9bb refs #7529 crudModel workerPit
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-09-19 10:25:22 +02:00
Carlos Satorres 87bce8fc21 refs #7529 fix workerPit
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-09-18 12:08:38 +02:00
Carlos Satorres b2c2f42243 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7529-workerPIT
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-09-18 07:57:58 +02:00
Carlos Satorres 657dbc6761 refs #7529 route
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-06-13 08:24:36 +02:00
Carlos Satorres 3bfbed9e54 refs #7529 create WorkerPIT
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-06-10 13:19:09 +02:00
131 changed files with 2331 additions and 1848 deletions

View File

@ -1,3 +1,189 @@
# Version 24.48 - 2024-11-25
### Added 🆕
- chore: correct checkNotification (fix_customer_issues) by:alexm
- chore: perf (warmFix_order_equalSalix) by:alexm
- chore: refs #6818 add spaces by:jorgep
- chore: refs #6818 drop useless code & comment by:jorgep
- chore: refs #7273 sticky add btn & refactor by:jorgep
- chore: refs #7524 fix test by:jorgep
- chore: refs #8039 not required by:alexm
- chore: refs #8078 fiz tests by:jorgep
- chore: refs #8078 rollback ref by:jorgep
- chore: remove console.log (warmFix_invoiceOut_Global) by:alexm
- chore: typo (fix_itemType-redirection) by:alexm
- feat: #6943 use openURL quasar by:Javier Segarra
- feat: #7782 add cypress report by:Javier Segarra
- feat: #7782 cypress.config watchForFileChanges by:Javier Segarra
- feat: #7782 npm run resetDatabase by:Javier Segarra
- feat: #7782 waitUntil domContentLoad by:Javier Segarra
- feat: added composable to confirm orders by:Jon
- feat: add /reports in gitignore (warmFix_reports_in_gitignore) by:alexm
- feat: apply changes for customerModule by:Javier Segarra
- feat: disabled buttons by:Javier Segarra
- feat: move buttons to DescriptorMenu by:Javier Segarra
- feat: refs #6818 add icon by:jorgep
- feat: refs #6818 fetch url & default channel by:jorgep
- feat: refs #6818 saysimple integration by:jorgep
- feat: refs #6839 module searching (6839-addSearchMenu) by:jorgep
- feat: refs #6839 normalize search by:jorgep
- feat: refs #6919 sync entry data by:jorgep
- feat: refs #7006 itemType basic data new inputs by:guillermo
- feat: refs #7006 itemTypeLog added by:guillermo
- feat: refs #7193 modified parking to use the scope and corrected small errors by:Jon
- feat: refs #7206 added inactive label and corrected minor errors by:Jon
- feat: refs #7308 #7308 remove warnings related to useSession by:Javier Segarra
- feat: refs #7349 usa back con permisos by:jgallego
- feat: refs #7524 add front test by:jorgep
- feat: refs #7874 improve vn-notes ui by:jorgep
- feat: refs #7970 notify changes by:Jon
- feat(): refs #8039 canceledError not notify by:alexm
- feat: refs #8039 notify error unify by:alexm
- feat: refs #8039 show duplicate request in local by:alexm
- feat: refs #8078 add shortcut multi selection by:jorgep
- feat: refs #8078 add tests by:jorgep
- feat: refs#8087 Redadas en travel by:Carlos Andrés
- feat: refs #8087 Traspasar redadas a travels by:Carlos Andrés
- feat: remove comments by:Javier Segarra
- feat(Supplier): add companySize by:alexm
- feat: use composable to unify logic by:Javier Segarra
- feat(VnInput): empty to null by:alexm
- feat(VnSelect): order data equal salix by:alexm
- feat(VnSelect): refs #7136 add scroll (7136-vnSelect_paginate_simplify_2) by:alexm
### Changed 📦
- chore: perf (warmFix_order_equalSalix) by:alexm
- chore: refs #7273 sticky add btn & refactor by:jorgep
- fix: better performance (warmFix_accountAcls) by:alexm
- perf: minor bugs detected by:Javier Segarra
- perf: refs #6943 #6943 merge command by:Javier Segarra
- perf: refs #7283 #7283 declare composable inst4ead code duplicated by:Javier Segarra
- perf: refs #7283 #7283 handle composable i18n by:Javier Segarra
- perf: refs #7283 #7283 handle i18n by:Javier Segarra
- perf: refs #7283 #7283 i18n params by:Javier Segarra
- perf: refs #7308 #7308 remove comments by:Javier Segarra
- perf: remove appendParams by:Javier Segarra
- perf: use const in VnLocation by:Javier Segarra
- perf: use required instead :required="true" by:Javier Segarra
- refactor: apply QPopupProxy by:wbuezas
- refactor: changed confirmOrder directory by:Jon
- refactor: change keyup.enter for update:model-value by:wbuezas
- refactor(InvoiceInBasicData): use VnDms by:alexm
- refactor: modified composable by:Jon
- refactor: refs #6818 change channel source by:jorgep
- refactor: refs #6818 channel logic by:jorgep
- refactor: refs #6919 export filter by:jorgep
- refactor: refs #7132 1st wave of changes in global translations files by:Jon
- refactor: refs #7132 account's module translations by:Jon
- refactor: refs #7132 customer's module translations by:Jon
- refactor: refs #7132 deleted pageTitles repeated by:Jon
- refactor: refs #7132 delete duplicate translations' keys by:Jon
- refactor: refs #7132 deleted useless code by:Jon
- refactor: refs #7132 global translations files changed by:Jon
- refactor: refs #7266 Changed method name by:guillermo
- refactor: refs #7950 Created cmr model by:guillermo
- refactor: refs #7970 added emit by:Jon
- refactor: refs #7970 refactored VnConfirm to emit events by:Jon
- refactor: refs #8185 modified LeftMenu to avoid duplicates by:Jon
- refactor: remove unused variable by:wbuezas
- refactor: revert catalog changes by:Jon
- refactor: small change by:wbuezas
- test: refactor e2e by:alexm
- test: refs #8039 add hasNotify and, refactor: agencyWorkCenter test by:alexm
### Fixed 🛠️
- chore: refs #7524 fix test by:jorgep
- fix: better performance (warmFix_accountAcls) by:alexm
- fix: catalog view category and type filter by:wbuezas
- fix: category and tags filters by:Jon
- fix: changed route.query by:Jon
- fix: change type vnput by:Javier Segarra
- fix(ClaimList): stateCode orderBy priority by:alexm
- fix: entryFilters by:carlossa
- fix: filter panel by:Jon
- fix(InvoiceOutGlobal): parallelism by:alexm
- fix: itemBotanical by:Javier Segarra
- fix: itemType redirection and fix filters by:alexm
- fix: logout spec (warmFix_logout.spec) by:alexm
- fix: merge errors by:alexm
- fix: order catalog by:wbuezas
- fix: order catalog fixes by:wbuezas
- fix: refs #6818 use right icon by:jorgep
- fix: refs #6896 fixed module problems by:Jon
- fix: refs #7193 fixed e2e test by:Jon
- fix: refs #7206 deleted duplicate code by:Jon
- fix: refs #7273 use same filter by:jorgep
- fix: refs #7283 #7283 bugs by:Javier Segarra
- fix: refs #7283 #7283 ItemDiary subToolbar by:Javier Segarra
- fix: refs #7283 #7283 ItemSummary bugs by:Javier Segarra
- fix: refs #7283 Account image resolution by:guillermo
- fix: refs #7283 css by:jorgep
- fix: refs #7283 filter by:carlossa
- fix: refs #7283 fix image by:carlossa
- fix: refs #7283 fix pr by:carlossa
- fix: refs #7283 fix preview by:carlossa
- fix: refs #7283 fix required by:carlossa
- fix: refs #7283 item filters by:carlossa
- fix: refs #7283 itemtype fix by:carlossa
- fix: refs #7283 order translation by:carlossa
- fix: refs #7283 preview by:carlossa
- fix: refs #7283 tooltips !Item by:Javier Segarra
- fix: refs #7306 clean warning by:carlossa
- fix: refs #7310 clean warning by:carlossa
- fix: refs #7323 locale #7396 by:jorgep
- fix: refs #7323 show advanced fields by:jorgep
- fix: refs #7349 dependencia no usada by:jgallego
- fix: refs #7524 e2e & worker module by:jorgep
- fix: refs #7874 add title by:jorgep
- fix: refs #7874 show name by:jorgep
- fix: refs #7943 use correct data-key by:jorgep
- fix: refs #7943 use summary by:jorgep
- fix: refs #8039 bad tests by:alexm
- fix: refs #8039 o not handle unnecessary errors by:alexm
- fix: refs #8078 e2e #7970 by:jorgep
- fix: refs #8078 handleSelection by:jorgep
- fix: refs #8078 improve cy command (8078-enableMultiSelection) by:jorgep
- fix: refs #8078 improve handleSelection by:jorgep
- fix: reset category by:wbuezas
- fix: tag chips by:Jon
- fix: vnSearchbar spec (warmFix_vnSearchBar.spec) by:alexm
- fix(VnSelect): setOptions when applyFilter by:alexm
- fix: worker test e2e by:Jon
- Merge branch 'dev' into fix_customer_issues by:Javier Segarra
- refactor: revert catalog changes by:Jon
- refs #7283 fix conflicts by:carlossa
- refs #7283 fix descriptorproxy by:carlossa
- refs #7283 fixedPrice by:carlossa
- refs #7283 fixedPrices by:carlossa
- refs #7283 fix itemFixed by:carlossa
- refs #7283 fix itemFixedPrice by:carlossa
- refs #7283 fix itemMigration by:carlossa
- refs #7283 fix itemMigration list filters by:carlossa
- refs #7283 fix items by:carlossa
- refs #7283 fix items error get images by:carlossa
- refs #7283 fix items images by:carlossa
- refs #7283 fix request by:carlossa
- refs #7283 fix searchbar by:carlossa
- refs #7283 fix viewSummary by:carlossa
- refs #7283 fix yml list basicData by:carlossa
- refs #7283 itemRequest fix by:carlossa
- refs #7283 itemRequest fix deny by:carlossa
- refs #7283 itemRequest fix reload by:carlossa
- refs #72983 fix filters by:carlossa
- revert: commit by:Javier Segarra
- revert e57a253c6f649382da187d1129449d265fb26d3b by:Javier Segarra
- test: #8162 fix clientList spec by:Javier Segarra
- test: #8162 fix vnLocation spec by:Javier Segarra
- test: fix arrayData by:Javier Segarra
- test: fix e2e by:alexm
- test: fix e2e by:Javier Segarra
- test: refs #8039 fix WorkerNotification e2e by:alexm
- test: refs #8039 fix ZoneWarehouse e2e by:alexm
- warmfix: ItemLastEntries to date (origin/warmfix_itemLastEntriesFilter) by:Javier Segarra
# Version 24.40 - 2024-10-02
### Added 🆕

View File

@ -1,4 +1,7 @@
const { defineConfig } = require('cypress');
// https://docs.cypress.io/app/tooling/reporters
// https://docs.cypress.io/app/references/configuration
// https://www.npmjs.com/package/cypress-mochawesome-reporter
module.exports = defineConfig({
e2e: {
@ -16,6 +19,7 @@ module.exports = defineConfig({
reporterOptions: {
charts: true,
reportPageTitle: 'Cypress Inline Reporter',
reportFilename: '[status]_[datetime]-report',
embeddedScreenshots: true,
reportDir: 'test/cypress/reports',
inlineAssets: true,

View File

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

View File

@ -17,10 +17,6 @@ const $props = defineProps({
type: Number,
default: null,
},
provinces: {
type: Array,
default: () => [],
},
});
const { t } = useI18n();
@ -48,7 +44,7 @@ const onDataSaved = (...args) => {
<template #form-inputs="{ data, validate }">
<VnRow>
<VnInput
:label="t('Names')"
:label="t('Name')"
v-model="data.name"
:rules="validate('city.name')"
/>
@ -56,7 +52,6 @@ const onDataSaved = (...args) => {
:province-selected="$props.provinceSelected"
:country-fk="$props.countryFk"
v-model="data.provinceFk"
:provinces="$props.provinces"
/>
</VnRow>
</template>

View File

@ -1,5 +1,5 @@
<script setup>
import { reactive, ref, watch } from 'vue';
import { reactive, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import FetchData from 'components/FetchData.vue';
@ -22,12 +22,15 @@ const postcodeFormData = reactive({
townFk: null,
});
const townsFetchDataRef = ref(null);
const provincesFetchDataRef = ref(null);
const townsFetchDataRef = ref(false);
const countriesFetchDataRef = ref(false);
const provincesFetchDataRef = ref(false);
const countriesOptions = ref([]);
const provincesOptions = ref([]);
const townsOptions = ref([]);
const town = ref({});
const townFilter = ref({});
const countryFilter = ref({});
function onDataSaved(formData) {
const newPostcode = {
@ -56,10 +59,60 @@ async function onCityCreated(newTown, formData) {
}
function setTown(newTown, data) {
if (!newTown) return;
town.value = newTown;
data.provinceFk = newTown.provinceFk;
data.countryFk = newTown.province.countryFk;
data.provinceFk = newTown?.provinceFk ?? newTown;
data.countryFk = newTown?.province?.countryFk ?? newTown;
}
async function setCountry(countryFk, data) {
data.townFk = null;
data.provinceFk = null;
data.countryFk = countryFk;
}
async function filterTowns(name) {
if (name !== '') {
townFilter.value.where = {
name: {
like: `%${name}%`,
},
};
await townsFetchDataRef.value?.fetch();
}
}
async function filterCountries(name) {
if (name !== '') {
countryFilter.value.where = {
name: {
like: `%${name}%`,
},
};
await countriesFetchDataRef.value?.fetch();
}
}
async function fetchTowns(countryFk) {
if (!countryFk) return;
townFilter.value.where = {
provinceFk: {
inq: provincesOptions.value.map(({ id }) => id),
},
};
await townsFetchDataRef.value?.fetch();
}
async function handleProvinces(data) {
provincesOptions.value = data;
if (postcodeFormData.countryFk) {
await fetchTowns(postcodeFormData.countryFk);
}
}
async function handleTowns(data) {
townsOptions.value = data;
}
async function handleCountries(data) {
countriesOptions.value = data;
}
async function setProvince(id, data) {
@ -73,60 +126,7 @@ async function onProvinceCreated(data) {
await provincesFetchDataRef.value.fetch({
where: { countryFk: postcodeFormData.countryFk },
});
postcodeFormData.provinceFk.value = data.id;
}
watch(
() => [postcodeFormData.countryFk],
async (newCountryFk, oldValueFk) => {
if (Array.isArray(newCountryFk)) {
newCountryFk = newCountryFk[0];
}
if (Array.isArray(oldValueFk)) {
oldValueFk = oldValueFk[0];
}
if (!!oldValueFk && newCountryFk !== oldValueFk) {
postcodeFormData.provinceFk = null;
postcodeFormData.townFk = null;
}
if (oldValueFk !== newCountryFk) {
await provincesFetchDataRef.value.fetch({
where: {
countryFk: newCountryFk,
},
});
await townsFetchDataRef.value.fetch({
where: {
provinceFk: {
inq: provincesOptions.value.map(({ id }) => id),
},
},
});
}
}
);
watch(
() => postcodeFormData.provinceFk,
async (newProvinceFk, oldValueFk) => {
if (Array.isArray(newProvinceFk)) {
newProvinceFk = newProvinceFk[0];
}
if (newProvinceFk !== oldValueFk) {
await townsFetchDataRef.value.fetch({
where: { provinceFk: newProvinceFk },
});
}
}
);
async function handleProvinces(data) {
provincesOptions.value = data;
}
async function handleTowns(data) {
townsOptions.value = data;
}
async function handleCountries(data) {
countriesOptions.value = data;
postcodeFormData.provinceFk = data.id;
}
</script>
@ -143,10 +143,20 @@ async function handleCountries(data) {
ref="townsFetchDataRef"
:sort-by="['name ASC']"
:limit="30"
:filter="townFilter"
@on-fetch="handleTowns"
auto-load
url="Towns/location"
/>
<FetchData
ref="countriesFetchDataRef"
:limit="30"
:filter="countryFilter"
:sort-by="['name ASC']"
@on-fetch="handleCountries"
auto-load
url="Countries"
/>
<FormModelPopup
url-create="postcodes"
@ -168,6 +178,7 @@ async function handleCountries(data) {
<VnSelectDialog
:label="t('City')"
@update:model-value="(value) => setTown(value, data)"
@filter="filterTowns"
:tooltip="t('Create city')"
v-model="data.townFk"
:options="townsOptions"
@ -193,7 +204,6 @@ async function handleCountries(data) {
<CreateNewCityForm
:country-fk="data.countryFk"
:province-selected="data.provinceFk"
:provinces="provincesOptions"
@on-data-saved="
(_, requestResponse) =>
onCityCreated(requestResponse, data)
@ -208,20 +218,20 @@ async function handleCountries(data) {
:province-selected="data.provinceFk"
@update:model-value="(value) => setProvince(value, data)"
v-model="data.provinceFk"
:clearable="true"
:provinces="provincesOptions"
@on-province-fetched="handleProvinces"
@on-province-created="onProvinceCreated"
/>
<VnSelect
url="Countries"
:sort-by="['name ASC']"
:label="t('Country')"
@update:options="handleCountries"
:options="countriesOptions"
hide-selected
@filter="filterCountries"
option-label="name"
option-value="id"
v-model="data.countryFk"
:rules="validate('postcode.countryFk')"
@update:model-value="(value) => setCountry(value, data)"
/>
</VnRow>
</template>

View File

@ -1,5 +1,5 @@
<script setup>
import { reactive, ref } from 'vue';
import { computed, reactive, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import FetchData from 'components/FetchData.vue';
@ -34,6 +34,12 @@ const onDataSaved = (dataSaved, requestResponse) => {
);
emit('onDataSaved', dataSaved, requestResponse);
};
const where = computed(() => {
if (!$props.countryFk) {
return {};
}
return { countryFk: $props.countryFk };
});
</script>
<template>
@ -41,9 +47,7 @@ const onDataSaved = (dataSaved, requestResponse) => {
@on-fetch="(data) => (autonomiesOptions = data)"
auto-load
:filter="{
where: {
countryFk: $props.countryFk,
},
where,
}"
url="Autonomies/location"
:sort-by="['name ASC']"

View File

@ -94,6 +94,7 @@ defineExpose({
saveChanges,
getChanges,
formData,
originalData,
vnPaginateRef,
});
@ -394,6 +395,7 @@ watch(formUrl, async () => {
@click="onSubmit"
:disable="!hasChanges"
:title="t('globals.save')"
data-cy="crudModelDefaultSaveBtn"
/>
<slot name="moreAfterActions" />
</QBtnGroup>

View File

@ -156,26 +156,22 @@ const rotateRight = () => {
};
const onSubmit = () => {
try {
if (!newPhoto.files && !newPhoto.url) {
notify(t('Select an image'), 'negative');
return;
}
const options = {
type: 'blob',
};
editor.value
.result(options)
.then((result) => {
const file = new File([result], newPhoto.files?.name || '');
newPhoto.blob = file;
})
.then(() => makeRequest());
} catch (err) {
console.error('Error uploading image');
if (!newPhoto.files && !newPhoto.url) {
notify(t('Select an image'), 'negative');
return;
}
const options = {
type: 'blob',
};
editor.value
.result(options)
.then((result) => {
const file = new File([result], newPhoto.files?.name || '');
newPhoto.blob = file;
})
.then(() => makeRequest());
};
const makeRequest = async () => {

View File

@ -51,21 +51,17 @@ const onDataSaved = () => {
};
const onSubmit = async () => {
try {
isLoading.value = true;
const rowsToEdit = $props.rows.map((row) => ({ id: row.id, itemFk: row.itemFk }));
const payload = {
field: selectedField.value.field,
newValue: newValue.value,
lines: rowsToEdit,
};
isLoading.value = true;
const rowsToEdit = $props.rows.map((row) => ({ id: row.id, itemFk: row.itemFk }));
const payload = {
field: selectedField.value.field,
newValue: newValue.value,
lines: rowsToEdit,
};
await axios.post($props.editUrl, payload);
onDataSaved();
isLoading.value = false;
} catch (err) {
console.error('Error submitting table cell edit');
}
await axios.post($props.editUrl, payload);
onDataSaved();
isLoading.value = false;
};
const closeForm = () => {

View File

@ -84,34 +84,30 @@ const tableColumns = computed(() => [
]);
const onSubmit = async () => {
try {
let filter = itemFilter;
const params = itemFilterParams;
const where = {};
for (let key in params) {
const value = params[key];
if (!value) continue;
let filter = itemFilter;
const params = itemFilterParams;
const where = {};
for (let key in params) {
const value = params[key];
if (!value) continue;
switch (key) {
case 'name':
where[key] = { like: `%${value}%` };
break;
case 'producerFk':
case 'typeFk':
case 'size':
case 'inkFk':
where[key] = value;
}
switch (key) {
case 'name':
where[key] = { like: `%${value}%` };
break;
case 'producerFk':
case 'typeFk':
case 'size':
case 'inkFk':
where[key] = value;
}
filter.where = where;
const { data } = await axios.get(props.url, {
params: { filter: JSON.stringify(filter) },
});
tableRows.value = data;
} catch (err) {
console.error('Error fetching entries items');
}
filter.where = where;
const { data } = await axios.get(props.url, {
params: { filter: JSON.stringify(filter) },
});
tableRows.value = data;
};
const closeForm = () => {

View File

@ -86,32 +86,28 @@ const tableColumns = computed(() => [
]);
const onSubmit = async () => {
try {
let filter = travelFilter;
const params = travelFilterParams;
const where = {};
for (let key in params) {
const value = params[key];
if (!value) continue;
let filter = travelFilter;
const params = travelFilterParams;
const where = {};
for (let key in params) {
const value = params[key];
if (!value) continue;
switch (key) {
case 'agencyModeFk':
case 'warehouseInFk':
case 'warehouseOutFk':
case 'shipped':
case 'landed':
where[key] = value;
}
switch (key) {
case 'agencyModeFk':
case 'warehouseInFk':
case 'warehouseOutFk':
case 'shipped':
case 'landed':
where[key] = value;
}
filter.where = where;
const { data } = await axios.get('Travels', {
params: { filter: JSON.stringify(filter) },
});
tableRows.value = data;
} catch (err) {
console.error('Error fetching travels');
}
filter.where = where;
const { data } = await axios.get('Travels', {
params: { filter: JSON.stringify(filter) },
});
tableRows.value = data;
};
const closeForm = () => {

View File

@ -91,6 +91,10 @@ const $props = defineProps({
type: Boolean,
default: true,
},
maxWidth: {
type: [String, Boolean],
default: '800px',
},
});
const emit = defineEmits(['onFetch', 'onDataSaved']);
const modelValue = computed(
@ -283,6 +287,7 @@ defineExpose({
@submit="save"
@reset="reset"
class="q-pa-md"
:style="maxWidth ? 'max-width: ' + maxWidth : ''"
id="formModel"
>
<QCard>
@ -371,7 +376,6 @@ defineExpose({
color: black;
}
#formModel {
max-width: 800px;
width: 100%;
}

View File

@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
const emit = defineEmits(['onSubmit']);
defineProps({
const $props = defineProps({
title: {
type: String,
default: '',
@ -25,16 +25,21 @@ defineProps({
type: String,
default: '',
},
submitOnEnter: {
type: Boolean,
default: true,
},
});
const { t } = useI18n();
const closeButton = ref(null);
const isLoading = ref(false);
const onSubmit = () => {
emit('onSubmit');
closeForm();
if ($props.submitOnEnter) {
emit('onSubmit');
closeForm();
}
};
const closeForm = () => {

View File

@ -88,20 +88,16 @@ const applyTags = (params, search) => {
};
const fetchItemTypes = async (id) => {
try {
const filter = {
fields: ['id', 'name', 'categoryFk'],
where: { categoryFk: id },
include: 'category',
order: 'name ASC',
};
const { data } = await axios.get('ItemTypes', {
params: { filter: JSON.stringify(filter) },
});
itemTypesOptions.value = data;
} catch (err) {
console.error('Error fetching item types', err);
}
const filter = {
fields: ['id', 'name', 'categoryFk'],
where: { categoryFk: id },
include: 'category',
order: 'name ASC',
};
const { data } = await axios.get('ItemTypes', {
params: { filter: JSON.stringify(filter) },
});
itemTypesOptions.value = data;
};
const getCategoryClass = (category, params) => {
@ -111,23 +107,19 @@ const getCategoryClass = (category, params) => {
};
const getSelectedTagValues = async (tag) => {
try {
if (!tag?.selectedTag?.id) return;
tag.value = null;
const filter = {
fields: ['value'],
order: 'value ASC',
limit: 30,
};
if (!tag?.selectedTag?.id) return;
tag.value = null;
const filter = {
fields: ['value'],
order: 'value ASC',
limit: 30,
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Tags/${tag.selectedTag.id}/filterValue`, {
params,
});
tag.valueOptions = data;
} catch (err) {
console.error('Error getting selected tag values');
}
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Tags/${tag.selectedTag.id}/filterValue`, {
params,
});
tag.valueOptions = data;
};
const removeTag = (index, params, search) => {

View File

@ -39,14 +39,10 @@ const refund = async () => {
invoiceCorrectionTypeFk: invoiceParams.invoiceCorrectionTypeFk,
};
try {
const { data } = await axios.post('InvoiceOuts/refundAndInvoice', params);
notify(t('Refunded invoice'), 'positive');
const [id] = data?.refundId || [];
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
} catch (err) {
console.error('Error refunding invoice', err);
}
const { data } = await axios.post('InvoiceOuts/refundAndInvoice', params);
notify(t('Refunded invoice'), 'positive');
const [id] = data?.refundId || [];
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
};
</script>

View File

@ -49,36 +49,32 @@ const makeInvoice = async () => {
makeInvoice: checked.value,
};
try {
if (checked.value && hasToInvoiceByAddress) {
const response = await new Promise((resolve) => {
quasar
.dialog({
component: VnConfirm,
componentProps: {
title: t('Bill destination client'),
message: t('transferInvoiceInfo'),
},
})
.onOk(() => {
resolve(true);
})
.onCancel(() => {
resolve(false);
});
});
if (!response) {
return;
}
if (checked.value && hasToInvoiceByAddress) {
const response = await new Promise((resolve) => {
quasar
.dialog({
component: VnConfirm,
componentProps: {
title: t('Bill destination client'),
message: t('transferInvoiceInfo'),
},
})
.onOk(() => {
resolve(true);
})
.onCancel(() => {
resolve(false);
});
});
if (!response) {
return;
}
const { data } = await axios.post('InvoiceOuts/transfer', params);
notify(t('Transferred invoice'), 'positive');
const id = data?.[0];
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
} catch (err) {
console.error('Error transfering invoice', err);
}
const { data } = await axios.post('InvoiceOuts/transfer', params);
notify(t('Transferred invoice'), 'positive');
const id = data?.[0];
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
};
</script>

View File

@ -1,5 +1,5 @@
<script setup>
import { ref } from 'vue';
import { ref, watch } from 'vue';
import { useValidator } from 'src/composables/useValidator';
import { useI18n } from 'vue-i18n';
@ -7,7 +7,7 @@ import VnSelectDialog from 'components/common/VnSelectDialog.vue';
import FetchData from 'components/FetchData.vue';
import CreateNewProvinceForm from './CreateNewProvinceForm.vue';
const emit = defineEmits(['onProvinceCreated']);
const emit = defineEmits(['onProvinceCreated', 'onProvinceFetched']);
const $props = defineProps({
countryFk: {
type: Number,
@ -17,20 +17,23 @@ const $props = defineProps({
type: Number,
default: null,
},
provinces: {
type: Array,
default: () => [],
},
});
const provinceFk = defineModel({ type: Number, default: null });
const { validate } = useValidator();
const { t } = useI18n();
const filter = ref({
include: { relation: 'country' },
where: {
countryFk: $props.countryFk,
},
});
const provincesOptions = ref($props.provinces);
provinceFk.value = $props.provinceSelected;
const provincesFetchDataRef = ref();
provinceFk.value = $props.provinceSelected;
if (!$props.countryFk) {
filter.value.where = {};
}
async function onProvinceCreated(_, data) {
await provincesFetchDataRef.value.fetch({ where: { countryFk: $props.countryFk } });
provinceFk.value = data.id;
@ -39,25 +42,33 @@ async function onProvinceCreated(_, data) {
async function handleProvinces(data) {
provincesOptions.value = data;
}
watch(
() => $props.countryFk,
async () => {
if ($props.countryFk) {
filter.value.where.countryFk = $props.countryFk;
} else filter.value.where = {};
await provincesFetchDataRef.value.fetch({});
emit('onProvinceFetched', provincesOptions.value);
}
);
</script>
<template>
<FetchData
ref="provincesFetchDataRef"
:filter="{
include: { relation: 'country' },
where: {
countryFk: $props.countryFk,
},
}"
:filter="filter"
@on-fetch="handleProvinces"
url="Provinces"
auto-load
/>
<VnSelectDialog
:label="t('Province')"
:options="$props.provinces"
:options="provincesOptions"
:tooltip="t('Create province')"
hide-selected
:clearable="true"
v-model="provinceFk"
:rules="validate && validate('postcode.provinceFk')"
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"

View File

@ -394,7 +394,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
:name="col.orderBy ?? col.name"
:data-key="$attrs['data-key']"
:search-url="searchUrl"
:vertical="true"
:vertical="false"
/>
</div>
<slot
@ -737,6 +737,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
fab
icon="add"
shortcut="+"
data-cy="vnTableCreateBtn"
/>
<QTooltip self="top right">
{{ createForm?.title }}

View File

@ -58,79 +58,71 @@ const getConfig = async (url, filter) => {
};
const fetchViewConfigData = async () => {
try {
const userConfigFilter = {
where: { tableCode: $props.tableCode, userFk: user.value.id },
};
const userConfig = await getConfig('UserConfigViews', userConfigFilter);
const userConfigFilter = {
where: { tableCode: $props.tableCode, userFk: user.value.id },
};
const userConfig = await getConfig('UserConfigViews', userConfigFilter);
if (userConfig) {
initialUserConfigViewData.value = userConfig;
setUserConfigViewData(userConfig.configuration);
return;
}
if (userConfig) {
initialUserConfigViewData.value = userConfig;
setUserConfigViewData(userConfig.configuration);
return;
}
const defaultConfigFilter = { where: { tableCode: $props.tableCode } };
const defaultConfig = await getConfig('DefaultViewConfigs', defaultConfigFilter);
const defaultConfigFilter = { where: { tableCode: $props.tableCode } };
const defaultConfig = await getConfig('DefaultViewConfigs', defaultConfigFilter);
if (defaultConfig) {
// Si el backend devuelve una configuración por defecto la usamos
setUserConfigViewData(defaultConfig.columns);
return;
} else {
// Si no hay configuración por defecto mostramos todas las columnas
const defaultColumns = {};
$props.allColumns.forEach((col) => (defaultColumns[col] = true));
setUserConfigViewData(defaultColumns);
}
} catch (err) {
console.error('Error fetching config view data', err);
if (defaultConfig) {
// Si el backend devuelve una configuración por defecto la usamos
setUserConfigViewData(defaultConfig.columns);
return;
} else {
// Si no hay configuración por defecto mostramos todas las columnas
const defaultColumns = {};
$props.allColumns.forEach((col) => (defaultColumns[col] = true));
setUserConfigViewData(defaultColumns);
}
};
const saveConfig = async () => {
try {
const params = {};
const configuration = {};
const params = {};
const configuration = {};
formattedCols.value.forEach((col) => {
const { name, active } = col;
configuration[name] = active;
});
formattedCols.value.forEach((col) => {
const { name, active } = col;
configuration[name] = active;
});
// Si existe una view config del usuario hacemos un update si no la creamos
if (initialUserConfigViewData.value) {
params.updates = [
{
data: {
configuration: configuration,
},
where: {
id: initialUserConfigViewData.value.id,
},
},
];
} else {
params.creates = [
{
userFk: user.value.id,
tableCode: $props.tableCode,
tableConfig: $props.tableCode,
// Si existe una view config del usuario hacemos un update si no la creamos
if (initialUserConfigViewData.value) {
params.updates = [
{
data: {
configuration: configuration,
},
];
}
const response = await axios.post('UserConfigViews/crud', params);
if (response.data && response.data[0]) {
initialUserConfigViewData.value = response.data[0];
}
emitSavedConfig();
notify('globals.dataSaved', 'positive');
popupProxyRef.value.hide();
} catch (err) {
console.error('Error saving user view config', err);
where: {
id: initialUserConfigViewData.value.id,
},
},
];
} else {
params.creates = [
{
userFk: user.value.id,
tableCode: $props.tableCode,
tableConfig: $props.tableCode,
configuration: configuration,
},
];
}
const response = await axios.post('UserConfigViews/crud', params);
if (response.data && response.data[0]) {
initialUserConfigViewData.value = response.data[0];
}
emitSavedConfig();
notify('globals.dataSaved', 'positive');
popupProxyRef.value.hide();
};
const emitSavedConfig = () => {

View File

@ -1,20 +1,24 @@
<script setup>
import { ref, watch } from 'vue';
import { nextTick, ref, watch } from 'vue';
import { QInput } from 'quasar';
const props = defineProps({
const $props = defineProps({
modelValue: {
type: String,
default: '',
},
insertable: {
type: Boolean,
default: false,
},
});
const emit = defineEmits(['update:modelValue', 'accountShortToStandard']);
let internalValue = ref(props.modelValue);
let internalValue = ref($props.modelValue);
watch(
() => props.modelValue,
() => $props.modelValue,
(newVal) => {
internalValue.value = newVal;
}
@ -28,8 +32,46 @@ watch(
}
);
const handleKeydown = (e) => {
if (e.key === 'Backspace') return;
if (e.key === '.') {
accountShortToStandard();
// TODO: Fix this setTimeout, with nextTick doesn't work
setTimeout(() => {
setCursorPosition(0, e.target);
}, 1);
return;
}
if ($props.insertable && e.key.match(/[0-9]/)) {
handleInsertMode(e);
}
};
function setCursorPosition(pos, el = vnInputRef.value) {
el.focus();
el.setSelectionRange(pos, pos);
}
const vnInputRef = ref(false);
const handleInsertMode = (e) => {
e.preventDefault();
const input = e.target;
const cursorPos = input.selectionStart;
const { maxlength } = vnInputRef.value;
let currentValue = internalValue.value;
if (!currentValue) currentValue = e.key;
const newValue = e.key;
if (newValue && !isNaN(newValue) && cursorPos < maxlength) {
internalValue.value =
currentValue.substring(0, cursorPos) +
newValue +
currentValue.substring(cursorPos + 1);
}
nextTick(() => {
input.setSelectionRange(cursorPos + 1, cursorPos + 1);
});
};
function accountShortToStandard() {
internalValue.value = internalValue.value.replace(
internalValue.value = internalValue.value?.replace(
'.',
'0'.repeat(11 - internalValue.value.length)
);
@ -37,5 +79,5 @@ function accountShortToStandard() {
</script>
<template>
<q-input v-model="internalValue" />
<QInput @keydown="handleKeydown" ref="vnInputRef" v-model="internalValue" />
</template>

View File

@ -1,5 +1,5 @@
<script setup>
import { computed, ref, useAttrs } from 'vue';
import { computed, ref, useAttrs, nextTick } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRequired } from 'src/composables/useRequired';
@ -34,6 +34,14 @@ const $props = defineProps({
type: Boolean,
default: true,
},
insertable: {
type: Boolean,
default: false,
},
maxlength: {
type: Number,
default: null,
},
});
const vnInputRef = ref(null);
@ -69,6 +77,9 @@ const mixinRules = [
requiredFieldRule,
...($attrs.rules ?? []),
(val) => {
const { maxlength } = vnInputRef.value;
if (maxlength && +val.length > maxlength)
return t(`maxLength`, { value: maxlength });
const { min, max } = vnInputRef.value.$attrs;
if (!min) return null;
if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min });
@ -78,6 +89,33 @@ const mixinRules = [
}
},
];
const handleKeydown = (e) => {
if (e.key === 'Backspace') return;
if ($props.insertable && e.key.match(/[0-9]/)) {
handleInsertMode(e);
}
};
const handleInsertMode = (e) => {
e.preventDefault();
const input = e.target;
const cursorPos = input.selectionStart;
const { maxlength } = vnInputRef.value;
let currentValue = value.value;
if (!currentValue) currentValue = e.key;
const newValue = e.key;
if (newValue && !isNaN(newValue) && cursorPos < maxlength) {
value.value =
currentValue.substring(0, cursorPos) +
newValue +
currentValue.substring(cursorPos + 1);
}
nextTick(() => {
input.setSelectionRange(cursorPos + 1, cursorPos + 1);
});
};
</script>
<template>
@ -89,10 +127,12 @@ const mixinRules = [
:type="$attrs.type"
:class="{ required: isRequired }"
@keyup.enter="emit('keyup.enter')"
@keydown="handleKeydown"
:clearable="false"
:rules="mixinRules"
:lazy-rules="true"
hide-bottom-space
:data-cy="$attrs.dataCy ?? $attrs.label + '_input'"
>
<template v-if="$slots.prepend" #prepend>
<slot name="prepend" />
@ -101,7 +141,13 @@ const mixinRules = [
<QIcon
name="close"
size="xs"
v-if="hover && value && !$attrs.disabled && $props.clearable"
v-if="
hover &&
value &&
!$attrs.disabled &&
!$attrs.readonly &&
$props.clearable
"
@click="
() => {
value = null;
@ -123,9 +169,11 @@ const mixinRules = [
<i18n>
en:
inputMin: Must be more than {value}
maxLength: The value exceeds {value} characters
inputMax: Must be less than {value}
es:
inputMin: Debe ser mayor a {value}
maxLength: El valor excede los {value} carácteres
inputMax: Debe ser menor a {value}
</i18n>
<style lang="scss">

View File

@ -138,8 +138,6 @@ onMounted(() => {
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
});
defineExpose({ opts: myOptions });
const arrayDataKey =
$props.dataKey ?? ($props.url?.length > 0 ? $props.url : $attrs.name ?? $attrs.label);
@ -259,6 +257,30 @@ async function onScroll({ to, direction, from, index }) {
isLoading.value = false;
}
}
defineExpose({ opts: myOptions });
function handleKeyDown(event) {
if (event.key === 'Tab') {
event.preventDefault();
const inputValue = vnSelectRef.value?.inputValue;
if (inputValue) {
const matchingOption = myOptions.value.find(
(option) =>
option[optionLabel.value].toLowerCase() === inputValue.toLowerCase()
);
if (matchingOption) {
emit('update:modelValue', matchingOption[optionValue.value]);
} else {
emit('update:modelValue', inputValue);
}
vnSelectRef.value?.hidePopup();
}
}
}
</script>
<template>
@ -269,6 +291,7 @@ async function onScroll({ to, direction, from, index }) {
:option-value="optionValue"
v-bind="$attrs"
@filter="filterHandler"
@keydown="handleKeyDown"
:emit-value="nullishToTrue($attrs['emit-value'])"
:map-options="nullishToTrue($attrs['map-options'])"
:use-input="nullishToTrue($attrs['use-input'])"
@ -283,6 +306,7 @@ async function onScroll({ to, direction, from, index }) {
:input-debounce="useURL ? '300' : '0'"
:loading="isLoading"
@virtual-scroll="onScroll"
:data-cy="$attrs.dataCy ?? $attrs.label + '_select'"
>
<template v-if="isClearable" #append>
<QIcon

View File

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

View File

@ -74,6 +74,9 @@ const arrayData = useArrayData($props.dataKey, {
const route = useRoute();
const store = arrayData.store;
const userParams = ref({});
defineExpose({ search, sanitizer, params: userParams });
onMounted(() => {
userParams.value = $props.modelValue ?? {};
emit('init', { params: userParams.value });
@ -197,7 +200,7 @@ const customTags = computed(() =>
async function remove(key) {
userParams.value[key] = undefined;
search();
await search();
emit('remove', key);
emit('update:modelValue', userParams.value);
}
@ -223,8 +226,6 @@ function sanitizer(params) {
}
return params;
}
defineExpose({ search, sanitizer, userParams });
</script>
<template>

View File

@ -132,10 +132,24 @@ const addFilter = async (filter, params) => {
async function fetch(params) {
useArrayData(props.dataKey, params);
arrayData.reset(['filter.skip', 'skip']);
arrayData.reset(['filter.skip', 'skip', 'page']);
await arrayData.fetch({ append: false });
if (!store.hasMoreData) isLoading.value = false;
return emitStoreData();
}
async function update(params) {
useArrayData(props.dataKey, params);
const { limit, skip } = store;
store.limit = limit + skip;
store.skip = 0;
await arrayData.fetch({ append: false });
store.limit = limit;
store.skip = skip;
return emitStoreData();
}
function emitStoreData() {
if (!store.hasMoreData) isLoading.value = false;
emit('onFetch', store.data);
return store.data;
}
@ -181,7 +195,7 @@ async function onLoad(index, done) {
done(isDone);
}
defineExpose({ fetch, addFilter, paginate });
defineExpose({ fetch, update, addFilter, paginate });
</script>
<template>

View File

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

View File

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

View File

@ -1,11 +1,24 @@
import { useSession } from 'src/composables/useSession';
import { getUrl } from './getUrl';
import axios from 'axios';
import { exportFile } from 'quasar';
const { getTokenMultimedia } = useSession();
const token = getTokenMultimedia();
export async function downloadFile(id, model = 'dms', urlPath = '/downloadFile', url) {
let appUrl = await getUrl('', 'lilium');
appUrl = appUrl.replace('/#/', '');
window.open(url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`);
const appUrl = (await getUrl('', 'lilium')).replace('/#/', '');
const response = await axios.get(
url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`,
{ responseType: 'blob' }
);
const contentDisposition = response.headers['content-disposition'];
const matches = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(contentDisposition);
const filename =
matches != null && matches[1]
? matches[1].replace(/['"]/g, '')
: 'downloaded-file';
exportFile(filename, response.data);
}

View File

@ -87,7 +87,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
const params = { filter };
Object.assign(params, userParams);
params.filter.skip = store.skip;
if (params.filter) params.filter.skip = store.skip;
if (store?.order && typeof store?.order == 'string') store.order = [store.order];
if (store.order?.length) params.filter.order = [...store.order];
else delete params.filter.order;

View File

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

View File

@ -60,7 +60,7 @@ globals:
reference: Reference
agency: Agency
warehouseOut: Warehouse Out
wareHouseIn: Warehouse In
warehouseIn: Warehouse In
landed: Landed
shipped: Shipped
totalEntries: Total entries
@ -298,6 +298,7 @@ globals:
clientsActionsMonitor: Clients and actions
serial: Serial
medical: Mutual
pit: IRPF
RouteExtendedList: Router
wasteRecalc: Waste recaclulate
operator: Operator
@ -768,6 +769,7 @@ travel:
hb: HB
basicData:
daysInForward: Days in forward
isRaid: Raid
thermographs:
temperature: Temperature
destination: Destination

View File

@ -303,6 +303,7 @@ globals:
clientsActionsMonitor: Clientes y acciones
serial: Facturas por serie
medical: Mutua
pit: IRPF
wasteRecalc: Recalcular mermas
operator: Operario
parking: Parking
@ -762,6 +763,7 @@ travel:
hb: HB
basicData:
daysInForward: Días redada
isRaid: Redada
thermographs:
temperature: Temperatura
destination: Destino

View File

@ -11,21 +11,13 @@ const { t } = useI18n();
const { notify } = useNotify();
const onSynchronizeAll = async () => {
try {
notify(t('Synchronizing in the background'), 'positive');
await axios.patch(`Accounts/syncAll`);
} catch (error) {
console.error('Error synchronizing all accounts', error);
}
notify(t('Synchronizing in the background'), 'positive');
await axios.patch(`Accounts/syncAll`);
};
const onSynchronizeRoles = async () => {
try {
await axios.patch(`RoleInherits/sync`);
notify(t('Roles synchronized!'), 'positive');
} catch (error) {
console.error('Error synchronizing roles', error);
}
await axios.patch(`RoleInherits/sync`);
notify(t('Roles synchronized!'), 'positive');
};
</script>

View File

@ -111,29 +111,25 @@ const columns = computed(() => [
},
]);
const deleteAcl = async ({ id }) => {
try {
await new Promise((resolve) => {
quasar
.dialog({
component: VnConfirm,
componentProps: {
title: t('Remove ACL'),
message: t('Do you want to remove this ACL?'),
},
})
.onOk(() => {
resolve(true);
})
.onCancel(() => {
resolve(false);
});
});
await axios.delete(`ACLs/${id}`);
tableRef.value.reload();
notify('ACL removed', 'positive');
} catch (error) {
console.error('Error deleting Acl: ', error);
}
await new Promise((resolve) => {
quasar
.dialog({
component: VnConfirm,
componentProps: {
title: t('Remove ACL'),
message: t('Do you want to remove this ACL?'),
},
})
.onOk(() => {
resolve(true);
})
.onCancel(() => {
resolve(false);
});
});
await axios.delete(`ACLs/${id}`);
tableRef.value.reload();
notify('ACL removed', 'positive');
};
</script>

View File

@ -34,13 +34,9 @@ const refresh = () => paginateRef.value.fetch();
const navigate = (id) => router.push({ name: 'AccountSummary', params: { id } });
const killSession = async ({ userId, created }) => {
try {
await axios.post(`${urlPath}/killSession`, { userId, created });
paginateRef.value.fetch();
notify(t('Session killed'), 'positive');
} catch (error) {
console.error('Error killing session', error);
}
await axios.post(`${urlPath}/killSession`, { userId, created });
paginateRef.value.fetch();
notify(t('Session killed'), 'positive');
};
</script>

View File

@ -40,12 +40,8 @@ const formUrlCreate = ref(null);
const formUrlUpdate = ref(null);
const formCustomFn = ref(null);
const onTestConection = async () => {
try {
await axios.get(`LdapConfigs/test`);
notify(t('LDAP connection established!'), 'positive');
} catch (error) {
console.error('Error testing connection', error);
}
await axios.get(`LdapConfigs/test`);
notify(t('LDAP connection established!'), 'positive');
};
const getInitialLdapConfig = async () => {
try {
@ -72,14 +68,10 @@ const getInitialLdapConfig = async () => {
}
};
const deleteMailForward = async () => {
try {
await axios.delete(URL_UPDATE);
initialData.value = { ...DEFAULT_DATA };
hasData.value = false;
notify(t('globals.dataSaved'), 'positive');
} catch (err) {
console.error('Error deleting mail forward', err);
}
await axios.delete(URL_UPDATE);
initialData.value = { ...DEFAULT_DATA };
hasData.value = false;
notify(t('globals.dataSaved'), 'positive');
};
onMounted(async () => await getInitialLdapConfig());

View File

@ -46,12 +46,8 @@ const formUrlUpdate = ref(null);
const formCustomFn = ref(null);
const onTestConection = async () => {
try {
await axios.get(`SambaConfigs/test`);
notify(t('Samba connection established!'), 'positive');
} catch (error) {
console.error('Error testing connection', error);
}
await axios.get(`SambaConfigs/test`);
notify(t('Samba connection established!'), 'positive');
};
const getInitialSambaConfig = async () => {
@ -79,14 +75,10 @@ const getInitialSambaConfig = async () => {
};
const deleteMailForward = async () => {
try {
await axios.delete(URL_UPDATE);
initialData.value = { ...DEFAULT_DATA };
hasData.value = false;
notify(t('globals.dataSaved'), 'positive');
} catch (err) {
console.error('Error deleting mail forward', err);
}
await axios.delete(URL_UPDATE);
initialData.value = { ...DEFAULT_DATA };
hasData.value = false;
notify(t('globals.dataSaved'), 'positive');
};
onMounted(async () => await getInitialSambaConfig());

View File

@ -44,13 +44,9 @@ const removeAlias = () => {
cancel: true,
})
.onOk(async () => {
try {
await axios.delete(`MailAliases/${entityId.value}`);
notify(t('Alias removed'), 'positive');
router.push({ name: 'AccountAlias' });
} catch (err) {
console.error('Error removing alias');
}
await axios.delete(`MailAliases/${entityId.value}`);
notify(t('Alias removed'), 'positive');
router.push({ name: 'AccountAlias' });
});
};
</script>

View File

@ -41,35 +41,22 @@ const fetchAccountExistence = async () => {
};
const fetchMailForwards = async () => {
try {
const response = await axios.get(`MailForwards/${route.params.id}`);
return response.data;
} catch (err) {
console.error('Error fetching mail forwards', err);
return null;
}
const response = await axios.get(`MailForwards/${route.params.id}`);
return response.data;
};
const deleteMailForward = async () => {
try {
await axios.delete(`MailForwards/${route.params.id}`);
formData.value.forwardTo = null;
initialData.value.forwardTo = null;
initialData.value.hasData = hasData.value;
notify(t('globals.dataSaved'), 'positive');
} catch (err) {
console.error('Error deleting mail forward', err);
}
await axios.delete(`MailForwards/${route.params.id}`);
formData.value.forwardTo = null;
initialData.value.forwardTo = null;
initialData.value.hasData = hasData.value;
notify(t('globals.dataSaved'), 'positive');
};
const updateMailForward = async () => {
try {
await axios.patch('MailForwards', formData.value);
initialData.value = { ...formData.value };
initialData.value.hasData = hasData.value;
} catch (err) {
console.error('Error creating mail forward', err);
}
await axios.patch('MailForwards', formData.value);
initialData.value = { ...formData.value };
initialData.value.hasData = hasData.value;
};
const onSubmit = async () => {

View File

@ -32,12 +32,8 @@ const filter = {
where: { id: entityId },
};
const removeRole = async () => {
try {
await axios.delete(`VnRoles/${entityId.value}`);
notify(t('Role removed'), 'positive');
} catch (error) {
console.error('Error deleting role', error);
}
await axios.delete(`VnRoles/${entityId.value}`);
notify(t('Role removed'), 'positive');
};
</script>

View File

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

View File

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

View File

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

View File

@ -95,6 +95,7 @@ const columns = computed(() => [
optionLabel: 'description',
},
},
orderBy: 'priority',
},
{
align: 'right',

View File

@ -167,7 +167,7 @@ const toCustomerAddressEdit = (addressId) => {
<div>{{ item.street }}</div>
<div>
{{ item.postalCode }} - {{ item.city }},
{{ item.province.name }}
{{ item.province?.name }}
</div>
<div>
{{ item.phone }}

View File

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

View File

@ -106,28 +106,24 @@ const setParams = (params) => {
};
const getPreview = async () => {
try {
const params = {
recipientId: entityId,
};
const validationMessage = validateMessage();
if (validationMessage) return notify(t(validationMessage), 'negative');
const params = {
recipientId: entityId,
};
const validationMessage = validateMessage();
if (validationMessage) return notify(t(validationMessage), 'negative');
setParams(params);
setParams(params);
const path = `${sampleType.value.model}/${entityId.value}/${sampleType.value.code}-html`;
const { data } = await axios.get(path, { params });
const path = `${sampleType.value.model}/${entityId.value}/${sampleType.value.code}-html`;
const { data } = await axios.get(path, { params });
if (!data) return;
quasar.dialog({
component: CustomerSamplesPreview,
componentProps: {
htmlContent: data,
},
});
} catch (err) {
notify('Errors getting preview', 'negative');
}
if (!data) return;
quasar.dialog({
component: CustomerSamplesPreview,
componentProps: {
htmlContent: data,
},
});
};
const onSubmit = async () => {

View File

@ -42,13 +42,9 @@ const setData = (entity) => {
};
const removeDepartment = async () => {
try {
await axios.post(`/Departments/${entityId.value}/removeChild`, entityId.value);
router.push({ name: 'WorkerDepartment' });
notify('department.departmentRemoved', 'positive');
} catch (err) {
console.error('Error removing department');
}
await axios.post(`/Departments/${entityId.value}/removeChild`, entityId.value);
router.push({ name: 'WorkerDepartment' });
notify('department.departmentRemoved', 'positive');
};
const { openConfirmationModal } = useVnConfirm();

View File

@ -236,13 +236,9 @@ const copyOriginalRowsData = (rows) => {
};
const saveChange = async (field, { rowIndex, row }) => {
try {
if (originalRowDataCopy.value[rowIndex][field] == row[field]) return;
await axios.patch(`Buys/${row.id}`, row);
originalRowDataCopy.value[rowIndex][field] = row[field];
} catch (err) {
console.error('Error saving changes', err);
}
if (originalRowDataCopy.value[rowIndex][field] == row[field]) return;
await axios.patch(`Buys/${row.id}`, row);
originalRowDataCopy.value[rowIndex][field] = row[field];
};
const openRemoveDialog = async () => {
@ -260,15 +256,11 @@ const openRemoveDialog = async () => {
},
})
.onOk(async () => {
try {
await deleteBuys();
const notifyMessage = t(
`Buy${rowsSelected.value.length > 1 ? 's' : ''} deleted`
);
notify(notifyMessage, 'positive');
} catch (err) {
console.error('Error deleting buys');
}
await deleteBuys();
const notifyMessage = t(
`Buy${rowsSelected.value.length > 1 ? 's' : ''} deleted`
);
notify(notifyMessage, 'positive');
});
};
@ -282,17 +274,13 @@ const importBuys = () => {
};
const toggleGroupingMode = async (buy, mode) => {
try {
const groupingMode = mode === 'grouping' ? mode : 'packing';
const newGroupingMode = buy.groupingMode === groupingMode ? null : groupingMode;
const params = {
groupingMode: newGroupingMode,
};
await axios.patch(`Buys/${buy.id}`, params);
buy.groupingMode = newGroupingMode;
} catch (err) {
console.error('Error toggling grouping mode');
}
const groupingMode = mode === 'grouping' ? mode : 'packing';
const newGroupingMode = buy.groupingMode === groupingMode ? null : groupingMode;
const params = {
groupingMode: newGroupingMode,
};
await axios.patch(`Buys/${buy.id}`, params);
buy.groupingMode = newGroupingMode;
};
const lockIconType = (groupingMode, mode) => {

View File

@ -123,36 +123,28 @@ const fillData = async (rawData) => {
};
const fetchBuys = async (buys) => {
try {
const params = { buys };
const { data } = await axios.post(
`Entries/${route.params.id}/importBuysPreview`,
params
);
importData.value.buys = data;
} catch (err) {
console.error('Error fetching buys');
}
const params = { buys };
const { data } = await axios.post(
`Entries/${route.params.id}/importBuysPreview`,
params
);
importData.value.buys = data;
};
const onSubmit = async () => {
try {
const params = importData.value;
const hasAnyEmptyRow = params.buys.some((buy) => {
return buy.itemFk === null;
});
const params = importData.value;
const hasAnyEmptyRow = params.buys.some((buy) => {
return buy.itemFk === null;
});
if (hasAnyEmptyRow) {
notify(t('Some of the imported buys does not have an item'), 'negative');
return;
}
await axios.post(`Entries/${route.params.id}/importBuys`, params);
notify('globals.dataSaved', 'positive');
redirectToBuysView();
} catch (err) {
console.error('Error importing buys', err);
if (hasAnyEmptyRow) {
notify(t('Some of the imported buys does not have an item'), 'negative');
return;
}
await axios.post(`Entries/${route.params.id}/importBuys`, params);
notify('globals.dataSaved', 'positive');
redirectToBuysView();
};
const redirectToBuysView = () => {

View File

@ -147,12 +147,9 @@ async function setEntryData(data) {
}
const fetchEntryBuys = async () => {
try {
const { data } = await axios.get(`Entries/${entry.value.id}/getBuys`);
if (data) entryBuys.value = data;
} catch (err) {
console.error('Error fetching entry buys');
}
};
</script>

View File

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

View File

@ -30,8 +30,6 @@ const recalc = async () => {
isLoading.value = true;
await axios.post('Applications/waste_addSales/execute-proc', params);
notify('wasteRecalc.recalcOk', 'positive');
} catch (err) {
console.error(err);
} finally {
isLoading.value = false;
}

View File

@ -61,25 +61,18 @@ const showSendInvoiceDialog = (type) => {
};
const sendEmailInvoice = async ({ address }) => {
try {
if (!address) notify(`The email can't be empty`, 'negative');
if (!address) notify(`The email can't be empty`, 'negative');
if (invoiceFormType.value === 'pdf') {
return sendEmail(`InvoiceOuts/${$props.invoiceOutData.ref}/invoice-email`, {
recipientId: $props.invoiceOutData.client.id,
recipient: address,
});
} else {
return sendEmail(
`InvoiceOuts/${$props.invoiceOutData.ref}/invoice-csv-email`,
{
recipientId: $props.invoiceOutData.client.id,
recipient: address,
}
);
}
} catch (err) {
console.error('Error sending email', err);
if (invoiceFormType.value === 'pdf') {
return sendEmail(`InvoiceOuts/${$props.invoiceOutData.ref}/invoice-email`, {
recipientId: $props.invoiceOutData.client.id,
recipient: address,
});
} else {
return sendEmail(`InvoiceOuts/${$props.invoiceOutData.ref}/invoice-csv-email`, {
recipientId: $props.invoiceOutData.client.id,
recipient: address,
});
}
};
@ -88,46 +81,30 @@ const redirectToInvoiceOutList = () => {
};
const deleteInvoice = async () => {
try {
await axios.post(`InvoiceOuts/${$props.invoiceOutData.id}/delete`);
notify(t('InvoiceOut deleted'), 'positive');
} catch (err) {
console.error('Error deleting invoice out', err);
}
await axios.post(`InvoiceOuts/${$props.invoiceOutData.id}/delete`);
notify(t('InvoiceOut deleted'), 'positive');
};
const bookInvoice = async () => {
try {
await axios.post(`InvoiceOuts/${$props.invoiceOutData.ref}/book`);
notify(t('InvoiceOut booked'), 'positive');
} catch (err) {
console.error('Error booking invoice out', err);
}
await axios.post(`InvoiceOuts/${$props.invoiceOutData.ref}/book`);
notify(t('InvoiceOut booked'), 'positive');
};
const generateInvoicePdf = async () => {
try {
await axios.post(`InvoiceOuts/${$props.invoiceOutData.id}/createPdf`);
notify(t('The invoice PDF document has been regenerated'), 'positive');
} catch (err) {
console.error('Error generating invoice out pdf', err);
}
await axios.post(`InvoiceOuts/${$props.invoiceOutData.id}/createPdf`);
notify(t('The invoice PDF document has been regenerated'), 'positive');
};
const refundInvoice = async (withWarehouse) => {
try {
const params = { ref: $props.invoiceOutData.ref, withWarehouse: withWarehouse };
const { data } = await axios.post('InvoiceOuts/refund', params);
location.href = window.origin + `/#/ticket/${data[0].id}/sale`;
notify(
t('refundInvoiceSuccessMessage', {
refundTicket: data[0].id,
}),
'positive'
);
} catch (err) {
console.error('Error generating invoice out pdf', err);
}
const params = { ref: $props.invoiceOutData.ref, withWarehouse: withWarehouse };
const { data } = await axios.post('InvoiceOuts/refund', params);
location.href = window.origin + `/#/ticket/${data[0].id}/sale`;
notify(
t('refundInvoiceSuccessMessage', {
refundTicket: data[0].id,
}),
'positive'
);
};
const showTransferInvoiceForm = async () => {

View File

@ -135,15 +135,10 @@ onMounted(() => (stateStore.rightDrawer = true));
onUnmounted(() => (stateStore.rightDrawer = false));
function openPdf(id) {
try {
openReport(`${MODEL}/${id}/download`);
} catch (err) {
console.error('Error opening PDF', err);
}
openReport(`${MODEL}/${id}/download`);
}
function downloadPdf() {
try {
if (selectedRows.value.size === 0) return;
const selectedCardsArray = Array.from(selectedRows.value.values());
@ -162,9 +157,7 @@ function downloadPdf() {
openReport(`${MODEL}/downloadZip`, params);
}
} catch (err) {
console.error('Error opening PDF');
}
}
watchEffect(selectedRows);
@ -254,10 +247,7 @@ watchEffect(selectedRows);
@update:model-value="fetchClientAddress"
>
<template #option="scope">
<QItem
v-bind="scope.itemProps"
@click="selectedClient(scope.opt)"
>
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>
#{{ scope.opt?.id }} -
@ -296,18 +286,17 @@ watchEffect(selectedRows);
: ''
} `
}}
<span>
{{
scope.opt?.nickname
}}</span
>
<span>{{
scope.opt?.nickname
}}</span>
<span
v-if="
scope.opt?.province ||
scope.opt?.city ||
scope.opt?.street
"
>, {{ scope.opt?.street }},
>
, {{ scope.opt?.street }},
{{ scope.opt?.city }},
{{
scope.opt?.province?.name
@ -316,8 +305,8 @@ watchEffect(selectedRows);
{{
scope.opt?.agencyMode
?.name
}}</span
>
}}
</span>
</QItemLabel>
</QItemSection>
</QItem>

View File

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

View File

@ -45,13 +45,9 @@ const arrayData = useArrayData('ItemShelvings', {
const rows = computed(() => arrayData.store.data || []);
const applyColumnFilter = async (col) => {
try {
const paramKey = col.columnFilter?.filterParamKey || col.field;
params[paramKey] = col.columnFilter.filterValue;
await arrayData.addFilter({ filter: null, params });
} catch (err) {
console.error('Error applying column filter', err);
}
const paramKey = col.columnFilter?.filterParamKey || col.field;
params[paramKey] = col.columnFilter.filterValue;
await arrayData.addFilter({ filter: null, params });
};
const getInputEvents = (col) => {
@ -173,15 +169,11 @@ const totalLabels = computed(() =>
);
const removeLines = async () => {
try {
const itemShelvingIds = rowsSelected.value.map((row) => row.itemShelvingFk);
await axios.post('ItemShelvings/deleteItemShelvings', { itemShelvingIds });
rowsSelected.value = [];
notify('shelvings.shelvingsRemoved', 'positive');
await arrayData.fetch({ append: false });
} catch (err) {
console.error('Error removing lines', err);
}
const itemShelvingIds = rowsSelected.value.map((row) => row.itemShelvingFk);
await axios.post('ItemShelvings/deleteItemShelvings', { itemShelvingIds });
rowsSelected.value = [];
notify('shelvings.shelvingsRemoved', 'positive');
await arrayData.fetch({ append: false });
};
onMounted(async () => {
await arrayData.fetch({ append: false });

View File

@ -19,22 +19,18 @@ const tagOptions = ref([]);
const valueOptionsMap = ref(new Map());
const getSelectedTagValues = async (tag) => {
try {
if (!tag.tagFk && tag.tag.isFree) return;
const filter = {
fields: ['value'],
order: 'value ASC',
limit: 30,
};
if (!tag.tagFk && tag.tag.isFree) return;
const filter = {
fields: ['value'],
order: 'value ASC',
limit: 30,
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Tags/${tag.tagFk}/filterValue`, {
params,
});
valueOptionsMap.value.set(tag.tagFk, data);
} catch (err) {
console.error('Error getting selected tag values');
}
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Tags/${tag.tagFk}/filterValue`, {
params,
});
valueOptionsMap.value.set(tag.tagFk, data);
};
const onItemTagsFetched = async (itemTags) => {

View File

@ -32,17 +32,13 @@ const ItemTaxRef = ref(null);
const taxesOptions = ref([]);
const submitTaxes = async (data) => {
try {
let payload = data.map((tax) => ({
id: tax.id,
taxClassFk: tax.taxClassFk,
}));
let payload = data.map((tax) => ({
id: tax.id,
taxClassFk: tax.taxClassFk,
}));
await axios.post(`Items/updateTaxes`, payload);
notify(t('globals.dataSaved'), 'positive');
} catch (err) {
console.error('Error saving taxes', err);
}
await axios.post(`Items/updateTaxes`, payload);
notify(t('globals.dataSaved'), 'positive');
};
</script>
<template>

View File

@ -221,24 +221,16 @@ const updateMinPrice = async (value, props) => {
};
const upsertPrice = async (props, resetMinPrice = false) => {
try {
const { row } = props;
if (tableRef.value.CrudModelRef.getChanges().updates.length > 0) {
if (resetMinPrice) row.hasMinPrice = 0;
await upsertFixedPrice(row);
}
} catch (err) {
console.error('Error editing price', err);
const { row } = props;
if (tableRef.value.CrudModelRef.getChanges().updates.length > 0) {
if (resetMinPrice) row.hasMinPrice = 0;
await upsertFixedPrice(row);
}
};
async function upsertFixedPrice(row) {
try {
const { data } = await axios.patch('FixedPrices/upsertFixedPrice', row);
return data;
} catch (err) {
console.error('Error editing price', err);
}
const { data } = await axios.patch('FixedPrices/upsertFixedPrice', row);
return data;
}
async function saveOnRowChange(row) {
@ -321,14 +313,10 @@ const onEditCellDataSaved = async () => {
};
const removeFuturePrice = async () => {
try {
rowsSelected.value.forEach(({ id }) => {
const rowIndex = fixedPrices.value.findIndex(({ id }) => id === id);
removePrice(id, rowIndex);
});
} catch (err) {
console.error('Error removing price', err);
}
rowsSelected.value.forEach(({ id }) => {
const rowIndex = fixedPrices.value.findIndex(({ id }) => id === id);
removePrice(id, rowIndex);
});
};
function confirmRemove(item, isFuture) {
@ -345,13 +333,9 @@ function confirmRemove(item, isFuture) {
}
const removePrice = async (id) => {
try {
await axios.delete(`FixedPrices/${id}`);
notify(t('globals.dataSaved'), 'positive');
tableRef.value.reload({});
} catch (err) {
console.error('Error removing price', err);
}
await axios.delete(`FixedPrices/${id}`);
notify(t('globals.dataSaved'), 'positive');
tableRef.value.reload({});
};
const dateStyle = (date) =>
date

View File

@ -55,22 +55,18 @@ const onCategoryChange = async (categoryFk, search) => {
};
const getSelectedTagValues = async (tag) => {
try {
if (!tag?.selectedTag?.id) return;
tag.value = null;
const filter = {
fields: ['value'],
order: 'value ASC',
};
if (!tag?.selectedTag?.id) return;
tag.value = null;
const filter = {
fields: ['value'],
order: 'value ASC',
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Tags/${tag.selectedTag.id}/filterValue`, {
params,
});
tag.valueOptions = data;
} catch (err) {
console.error('Error getting selected tag values');
}
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Tags/${tag.selectedTag.id}/filterValue`, {
params,
});
tag.valueOptions = data;
};
const applyTags = (params, search) => {

View File

@ -173,40 +173,29 @@ const getBadgeColor = (date) => {
};
const changeQuantity = async (request) => {
try {
if (request.saleFk) {
const params = {
quantity: request.saleQuantity,
};
if (request.saleFk) {
const params = {
quantity: request.saleQuantity,
};
await axios.patch(`Sales/${request.saleFk}`, params);
notify(t('globals.dataSaved'), 'positive');
confirmRequest(request);
} else confirmRequest(request);
} catch (error) {
console.error('Error changing quantity:: ', error);
}
await axios.patch(`Sales/${request.saleFk}`, params);
notify(t('globals.dataSaved'), 'positive');
confirmRequest(request);
} else confirmRequest(request);
};
const confirmRequest = async (request) => {
try {
if (request.itemFk && request.saleQuantity) {
const params = {
itemFk: request.itemFk,
quantity: request.saleQuantity,
attenderFk: request.attenderFk,
};
if (request.itemFk && request.saleQuantity) {
const params = {
itemFk: request.itemFk,
quantity: request.saleQuantity,
attenderFk: request.attenderFk,
};
const { data } = await axios.post(
`TicketRequests/${request.id}/confirm`,
params
);
request.itemDescription = data.concept;
request.isOk = true;
notify(t('globals.dataSaved'), 'positive');
}
} catch (error) {
console.error('Error confirming request:: ', error);
const { data } = await axios.post(`TicketRequests/${request.id}/confirm`, params);
request.itemDescription = data.concept;
request.isOk = true;
notify(t('globals.dataSaved'), 'positive');
}
};

View File

@ -103,15 +103,11 @@ const getBadgeColor = (date) => {
};
const removeOrders = async () => {
try {
const selectedIds = selectedRows.value.map((row) => row.id);
const params = { deletes: selectedIds };
await axios.post('SalesMonitors/deleteOrders', params);
selectedRows.value = [];
await table.value.reload();
} catch (err) {
console.error('Error deleting orders', err);
}
const selectedIds = selectedRows.value.map((row) => row.id);
const params = { deletes: selectedIds };
await axios.post('SalesMonitors/deleteOrders', params);
selectedRows.value = [];
await table.value.reload();
};
const openTab = (id) =>

View File

@ -18,7 +18,7 @@ const groupedStates = ref();
const handleScopeDays = (params, days, callback) => {
const [from, to] = dateRange(Date.vnNew());
if (!days) {
Object.assign(params, { from, to, scopeDays: 1 });
Object.assign(params, { from, to, scopeDays: 0 });
} else {
params.from = from;
to.setDate(to.getDate() + days);
@ -59,7 +59,7 @@ const getLocale = (label) => {
</template>
<template #customTags="{ params, searchFn, formatFn }">
<VnFilterPanelChip
v-if="params.scopeDays"
v-if="params.scopeDays !== null"
removable
@remove="handleScopeDays(params, null, searchFn)"
>

View File

@ -25,11 +25,8 @@ const provinceOpts = ref([]);
const stateOpts = ref([]);
const zoneOpts = ref([]);
const { viewSummary } = useSummaryDialog();
const from = Date.vnNew();
from.setHours(0, 0, 0, 0);
const to = new Date(from.getTime());
to.setDate(to.getDate() + 1);
to.setHours(23, 59, 59, 999);
const [from, to] = dateRange(Date.vnNew());
const stateColors = {
notice: 'info',
success: 'positive',
@ -340,7 +337,7 @@ const openTab = (id) =>
auto-load
:row-click="({ id }) => openTab(id)"
:disable-option="{ card: true }"
:user-params="{ from, to, scopeDays: 1 }"
:user-params="{ from, to, scopeDays: 0 }"
>
<template #top-left>
<QBtn
@ -350,7 +347,7 @@ const openTab = (id) =>
class="q-mr-sm"
dense
flat
@click="$refs.tableRef.reload()"
@click="tableRef.CrudModelRef.vnPaginateRef.update()"
>
<QTooltip>{{ $t('globals.refresh') }}</QTooltip>
</QBtn>

View File

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

View File

@ -22,22 +22,17 @@ const agencyList = ref([]);
const addressList = ref([]);
const fetchAddressList = async (addressId) => {
try {
const { data } = await axios.get('addresses', {
params: {
filter: JSON.stringify({
fields: ['id', 'nickname', 'street', 'city'],
where: { id: addressId },
}),
},
});
addressList.value = data;
if (addressList.value?.length === 1) {
state.get(ORDER_MODEL).addressFk = addressList.value[0].id;
}
} catch (err) {
console.error(`Error fetching addresses`, err);
return err.response;
const { data } = await axios.get('addresses', {
params: {
filter: JSON.stringify({
fields: ['id', 'nickname', 'street', 'city'],
where: { id: addressId },
}),
},
});
addressList.value = data;
if (addressList.value?.length === 1) {
state.get(ORDER_MODEL).addressFk = addressList.value[0].id;
}
};
@ -45,18 +40,13 @@ const fetchAgencyList = async (landed, addressFk) => {
if (!landed || !addressFk) {
return;
}
try {
const { data } = await axios.get('Agencies/landsThatDay', {
params: {
addressFk,
landed: new Date(landed).toISOString(),
},
});
agencyList.value = data;
} catch (err) {
console.error(`Error fetching agencies`, err);
return err.response;
}
const { data } = await axios.get('Agencies/landsThatDay', {
params: {
addressFk,
landed: new Date(landed).toISOString(),
},
});
agencyList.value = data;
};
const fetchOrderDetails = (order) => {
@ -92,12 +82,8 @@ const orderFilter = {
};
const onClientChange = async (clientId) => {
try {
const { data } = await axios.get(`Clients/${clientId}`);
await fetchAddressList(data.defaultAddressFk);
} catch (error) {
console.error('Error al cambiar el cliente:', error);
}
const { data } = await axios.get(`Clients/${clientId}`);
await fetchAddressList(data.defaultAddressFk);
};
</script>

View File

@ -1,23 +1,22 @@
<script setup>
import { useStateStore } from 'stores/useStateStore';
import { useRoute, useRouter } from 'vue-router';
import { onBeforeMount, onMounted, onUnmounted, ref, computed, watch } from 'vue';
import { onMounted, onUnmounted, ref, computed, watch } from 'vue';
import axios from 'axios';
import { useI18n } from 'vue-i18n';
import VnPaginate from 'components/ui/VnPaginate.vue';
import CatalogItem from 'components/ui/CatalogItem.vue';
import OrderCatalogFilter from 'pages/Order/Card/OrderCatalogFilter.vue';
import VnPaginate from 'src/components/ui/VnPaginate.vue';
import CatalogItem from 'src/components/ui/CatalogItem.vue';
import OrderCatalogFilter from 'src/pages/Order/Card/OrderCatalogFilter.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import getParamWhere from 'src/filters/getParamWhere';
import { useArrayData } from 'composables/useArrayData';
import { useArrayData } from 'src/composables/useArrayData';
const route = useRoute();
const router = useRouter();
const stateStore = useStateStore();
const { t } = useI18n();
const arrayData = useArrayData('OrderCatalogList');
const dataKey = 'OrderCatalogList';
const arrayData = useArrayData(dataKey);
const store = arrayData.store;
const showFilter = ref(null);
const tags = ref([]);
let catalogParams = {
@ -25,27 +24,6 @@ let catalogParams = {
orderBy: JSON.stringify({ field: 'relevancy DESC, name', way: 'ASC', isTag: false }),
};
onBeforeMount(() => {
const whereParams = getParamWhere(route);
if (whereParams) {
const formattedWhereParams = {};
if (whereParams.and) {
whereParams.and.forEach((item) => {
Object.assign(formattedWhereParams, item);
});
} else {
Object.assign(formattedWhereParams, whereParams);
}
catalogParams = {
...catalogParams,
...formattedWhereParams,
};
} else {
showFilter.value = true;
}
});
onMounted(() => {
stateStore.rightDrawer = true;
checkOrderConfirmation();
@ -89,7 +67,7 @@ function extractValueTags(items) {
);
tagValue.value = resultValueTags;
}
const autoLoad = computed(() => !!catalogParams.categoryFk);
const autoLoad = computed(() => !!JSON.parse(route?.query.table ?? '{}')?.categoryFk);
watch(
() => store.data,
@ -102,7 +80,7 @@ watch(
<template>
<VnSearchbar
data-key="OrderCatalogList"
:data-key="dataKey"
:user-params="catalogParams"
:static-params="['orderFk', 'orderBy']"
:redirect="false"
@ -111,9 +89,9 @@ watch(
:info="t('You can search items by name or id')"
/>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
<QScrollArea v-if="showFilter" class="fit text-grey-8">
<QScrollArea class="fit text-grey-8">
<OrderCatalogFilter
data-key="OrderCatalogList"
:data-key="dataKey"
:tag-value="tagValue"
:tags="tags"
:initial-catalog-params="catalogParams"
@ -123,12 +101,10 @@ watch(
<QPage class="column items-center q-pa-md">
<div class="full-width">
<VnPaginate
data-key="OrderCatalogList"
:data-key="dataKey"
url="Orders/CatalogFilter"
:limit="50"
:user-params="catalogParams"
@on-fetch="showFilter = true"
:update-router="false"
:auto-load="autoLoad"
>
<template #body="{ rows }">

View File

@ -1,5 +1,5 @@
<script setup>
import { computed, ref, onMounted } from 'vue';
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import axios from 'axios';
@ -8,7 +8,6 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnSelect from 'components/common/VnSelect.vue';
import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue';
import VnInput from 'src/components/common/VnInput.vue';
import getParamWhere from 'src/filters/getParamWhere';
import CatalogFilterValueDialog from 'src/pages/Order/Card/CatalogFilterValueDialog.vue';
import { useArrayData } from 'composables/useArrayData';
@ -33,10 +32,8 @@ const route = useRoute();
const arrayData = useArrayData(props.dataKey);
const categoryList = ref(null);
const selectedCategoryFk = ref(null);
const typeList = ref([]);
const selectedTypeFk = ref(null);
const generalSearchParam = ref(null);
const searchByTag = ref(null);
const vnFilterPanelRef = ref();
const orderByList = ref([
@ -53,45 +50,31 @@ const orderBySelected = ref('relevancy DESC, name');
const orderWaySelected = ref('ASC');
const resetCategory = (params, search) => {
selectedCategoryFk.value = null;
typeList.value = null;
params.categoryFk = null;
params.typeFk = null;
arrayData.store.userFilter = null;
removeTagGroupParam(params, search);
};
const selectCategory = (params, category, search) => {
if (params.categoryFk === category?.id) {
resetCategory(params, search);
params.categoryFk = null;
} else {
selectedCategoryFk.value = category?.id;
params.categoryFk = category?.id;
params.typeFk = null;
selectedTypeFk.value = null;
loadTypes(category?.id);
}
search();
};
const loadTypes = async (categoryFk = selectedCategoryFk.value) => {
const selectCategory = async (params, category, search) => {
if (vnFilterPanelRef.value.params.categoryFk === category?.id) {
resetCategory(params, search);
return;
}
params.typeFk = null;
params.categoryFk = category.id;
await loadTypes(category?.id);
await search();
};
const loadTypes = async (id) => {
const { data } = await axios.get(`Orders/${route.params.id}/getItemTypeAvailable`, {
params: { itemCategoryId: categoryFk },
params: { itemCategoryId: id },
});
typeList.value = data;
};
const selectedCategory = computed(() => {
return (categoryList.value || []).find(
(category) => category?.id === selectedCategoryFk.value
);
});
const selectedType = computed(() => {
return (typeList.value || []).find((type) => type?.id === selectedTypeFk.value);
});
function exprBuilder(param, value) {
switch (param) {
case 'categoryFk':
@ -115,13 +98,23 @@ const applyTags = (tagInfo, params, search) => {
search();
};
const removeTagGroupParam = (params, search, valIndex = null) => {
if (!valIndex) {
async function onSearchByTag(value) {
if (!value.target.value) return;
if (!vnFilterPanelRef.value.params?.tagGroups) {
vnFilterPanelRef.value.params.tagGroups = [];
}
vnFilterPanelRef.value.params.tagGroups.push({
values: [{ value: value.target.value }],
});
searchByTag.value = null;
}
const removeTagGroupParam = (params, search, valIndex) => {
if (!valIndex && valIndex !== 0) {
params.tagGroups = null;
search();
} else {
params.tagGroups.splice(valIndex, 1);
search();
}
};
@ -133,7 +126,8 @@ const setCategoryList = (data) => {
icon: `vn:${(category.icon || '').split('-')[1]}`,
}));
selectedCategoryFk.value && loadTypes();
vnFilterPanelRef.value.params.categoryFk &&
loadTypes(vnFilterPanelRef.value.params.categoryFk);
};
const getCategoryClass = (category, params) => {
@ -149,35 +143,29 @@ function addOrder(value, field, params) {
params.orderBy = JSON.stringify(orderBy);
vnFilterPanelRef.value.search();
}
onMounted(() => {
selectedCategoryFk.value = getParamWhere(route, 'categoryFk');
selectedTypeFk.value = getParamWhere(route, 'typeFk');
});
</script>
<template>
<FetchData url="ItemCategories" limit="30" auto-load @on-fetch="setCategoryList" />
<FetchData url="ItemCategories" auto-load @on-fetch="setCategoryList" />
<VnFilterPanel
ref="vnFilterPanelRef"
:data-key="props.dataKey"
:hidden-tags="['orderFk', 'orderBy']"
:un-removable-params="['orderFk', 'orderBy']"
:hidden-tags="['filter', 'orderFk', 'orderBy']"
:unremovable-params="['orderFk', 'orderBy']"
:expr-builder="exprBuilder"
:custom-tags="['tagGroups', 'categoryFk']"
:redirect="false"
search-url="params"
>
<template #tags="{ tag, formatFn }">
<strong v-if="tag.label === 'typeFk'">
{{ t(selectedType?.name || '') }}
<strong v-if="tag.label === 'typeFk' && typeList">
{{ t(typeList.find((t) => t.id == tag.value)?.name || '') }}
</strong>
<div v-else class="q-gutter-x-xs">
<strong>{{ t(`params.${tag.label}`) }}: </strong>
<span>{{ formatFn(tag.value) }}</span>
</div>
</template>
<template #customTags="{ tags: customTags, params, searchFn }">
<template #customTags="{ params, tags: customTags, searchFn }">
<template v-for="customTag in customTags" :key="customTag.label">
<VnFilterPanelChip
v-for="(tag, valIndex) in Array.isArray(customTag.value)
@ -191,8 +179,13 @@ onMounted(() => {
: removeTagGroupParam(params, searchFn, valIndex)
"
>
<strong v-if="customTag.label === 'categoryFk'">
{{ t(selectedCategory?.name || '') }}
<strong v-if="customTag.label === 'categoryFk' && categoryList">
{{
t(
categoryList.find((c) => c.id == customTag.value)?.name ||
''
)
}}
</strong>
<strong v-if="tag?.tagSelection?.name" class="q-mr-xs">
{{ tag.tagSelection.name }}:
@ -239,13 +232,8 @@ onMounted(() => {
emit-value
use-input
sort-by="name ASC"
:disable="!selectedCategoryFk"
@update:model-value="
(value) => {
selectedTypeFk = value;
searchFn();
}
"
:disable="!params.categoryFk"
@update:model-value="searchFn()"
>
<template #option="{ itemProps, opt }">
<QItem v-bind="itemProps">
@ -288,34 +276,27 @@ onMounted(() => {
</QItemSection>
</QItem>
<QSeparator />
<QItem class="q-mt-lg">
<VnSelect
<QItem class="q-mt-lg q-pa-none">
<VnInput
:label="t('components.itemsFilterPanel.value')"
:options="props.tagValue"
dense
outlined
rounded
:is-clearable="false"
v-model="generalSearchParam"
@update:model-value="
applyTags(
{ values: [{ value: generalSearchParam }] },
params,
searchFn
)
"
v-model="searchByTag"
@keyup.enter="(val) => onSearchByTag(val, params)"
>
<template #prepend>
<QIcon name="search" />
</template>
<template #after>
<template #append>
<QBtn
icon="add_circle"
shortcut="+"
flat
color="primary"
size="md"
dense
/>
<QPopupProxy>
<CatalogFilterValueDialog
@ -327,7 +308,7 @@ onMounted(() => {
/>
</QPopupProxy>
</template>
</VnSelect>
</VnInput>
</QItem>
<QSeparator />
</template>

View File

@ -20,22 +20,17 @@ const addressList = ref([]);
defineEmits(['confirm', ...useDialogPluginComponent.emits]);
const fetchAddressList = async (addressId) => {
try {
const { data } = await axios.get('addresses', {
params: {
filter: JSON.stringify({
fields: ['id', 'nickname', 'street', 'city'],
where: { id: addressId },
}),
},
});
addressList.value = data;
if (addressList.value?.length === 1) {
state.get(ORDER_MODEL).addressId = addressList.value[0].id;
}
} catch (err) {
console.error(`Error fetching addresses`, err);
return err.response;
const { data } = await axios.get('addresses', {
params: {
filter: JSON.stringify({
fields: ['id', 'nickname', 'street', 'city'],
where: { id: addressId },
}),
},
});
addressList.value = data;
if (addressList.value?.length === 1) {
state.get(ORDER_MODEL).addressId = addressList.value[0].id;
}
};
@ -43,18 +38,13 @@ const fetchAgencyList = async (landed, addressFk) => {
if (!landed || !addressFk) {
return;
}
try {
const { data } = await axios.get('Agencies/landsThatDay', {
params: {
addressFk,
landed: new Date(landed).toISOString(),
},
});
agencyList.value = data;
} catch (err) {
console.error(`Error fetching agencies`, err);
return err.response;
}
const { data } = await axios.get('Agencies/landsThatDay', {
params: {
addressFk,
landed: new Date(landed).toISOString(),
},
});
agencyList.value = data;
};
const $props = defineProps({
@ -70,12 +60,8 @@ const initialFormState = reactive({
});
const onClientChange = async (clientId = $props.clientFk) => {
try {
const { data } = await axios.get(`Clients/${clientId}`);
await fetchAddressList(data.defaultAddressFk);
} catch (error) {
console.error('Error al cambiar el cliente:', error);
}
const { data } = await axios.get(`Clients/${clientId}`);
await fetchAddressList(data.defaultAddressFk);
};
async function onDataSaved(_, id) {

View File

@ -47,17 +47,13 @@ const onChangesSaved = () => {
};
const setWireTransfer = async () => {
try {
const params = {
id: route.params.id,
payMethodFk: wireTransferFk.value,
};
const params = {
id: route.params.id,
payMethodFk: wireTransferFk.value,
};
await axios.patch(`Suppliers/${route.params.id}`, params);
notify('globals.dataSaved', 'positive');
} catch (err) {
console.error('Error setting wire transfer', err);
}
await axios.patch(`Suppliers/${route.params.id}`, params);
notify('globals.dataSaved', 'positive');
};
</script>
<template>
@ -126,7 +122,6 @@ const setWireTransfer = async () => {
(_, requestResponse) =>
onBankEntityCreated(requestResponse, row)
"
:show-entity-field="false"
/>
</template>
<template #option="scope">

View File

@ -9,6 +9,7 @@ import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnLocation from 'src/components/common/VnLocation.vue';
import VnAccountNumber from 'src/components/common/VnAccountNumber.vue';
const route = useRoute();
const { t } = useI18n();
@ -100,10 +101,13 @@ function handleLocation(data, location) {
/>
</VnRow>
<VnRow>
<VnInput
<VnAccountNumber
v-model="data.account"
:label="t('supplier.fiscalData.account')"
clearable
data-cy="supplierFiscalDataAccount"
insertable
:maxlength="10"
/>
<VnSelect
:label="t('supplier.fiscalData.sageTaxTypeFk')"

View File

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

View File

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

View File

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

View File

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

View File

@ -49,13 +49,7 @@ async function handleSave() {
<template>
<FetchData
@on-fetch="
(data) =>
(observationTypes = data.map((type) => {
type.label = t(`ticketNotes.observationTypes.${type.description}`);
return type;
}))
"
@on-fetch="(data) => (observationTypes = data)"
auto-load
url="ObservationTypes"
/>
@ -82,16 +76,18 @@ async function handleSave() {
:label="t('ticketNotes.observationType')"
:options="observationTypes"
hide-selected
option-label="label"
option-label="description"
option-value="id"
v-model="row.observationTypeFk"
:disable="!!row.id"
data-cy="ticketNotesObservationType"
/>
<VnInput
:label="t('basicData.description')"
v-model="row.description"
class="col"
@keyup.enter="handleSave"
data-cy="ticketNotesDescription"
/>
<QIcon
name="delete"
@ -99,6 +95,7 @@ async function handleSave() {
class="cursor-pointer"
color="primary"
@click="handleDelete(row)"
data-cy="ticketNotesRemoveNoteBtn"
>
<QTooltip>
{{ t('ticketNotes.removeNote') }}
@ -113,6 +110,7 @@ async function handleSave() {
class="fill-icon-on-hover q-ml-md"
color="primary"
@click="ticketNotesCrudRef.insert()"
data-cy="ticketNotesAddNoteBtn"
>
<QTooltip>
{{ t('ticketNotes.addNote') }}

View File

@ -172,13 +172,9 @@ const getRequestState = (state) => {
const isEditable = (isOk) => isOk !== null;
async function removeLine(id) {
try {
await axios.delete(`TicketRequests/${id}`);
notify(t('globals.dataSaved'), 'positive');
location.reload();
} catch (err) {
console.error('Error ', err);
}
await axios.delete(`TicketRequests/${id}`);
notify(t('globals.dataSaved'), 'positive');
location.reload();
}
onMounted(() => (stateStore.rightDrawer = false));

View File

@ -156,15 +156,11 @@ const columns = computed(() => [
]);
const getConfig = async () => {
try {
let filter = {
fields: ['daysForWarningClaim'],
};
const { data } = await axios.get(`TicketConfigs`, { filter });
ticketConfig.value = data;
} catch (err) {
console.error('Error getting ticket config', err);
}
let filter = {
fields: ['daysForWarningClaim'],
};
const { data } = await axios.get(`TicketConfigs`, { filter });
ticketConfig.value = data;
};
const onSalesFetched = (salesData) => {
@ -187,41 +183,40 @@ const resetChanges = async () => {
};
const updateQuantity = async (sale) => {
const params = { quantity: sale.quantity };
try {
const payload = { quantity: sale.quantity };
await axios.post(`Sales/${sale.id}/updateQuantity`, payload);
notify('globals.dataSaved', 'positive');
} catch (err) {
console.error('Error updating quantity', err);
await axios.post(`Sales/${sale.id}/updateQuantity`, params);
} catch (e) {
sale.quantity = tableRef.value.CrudModelRef.originalData.find(
(s) => s.id === sale.id
).quantity;
throw e;
}
notify('globals.dataSaved', 'positive');
};
const addSale = async (sale) => {
try {
const payload = {
barcode: sale.itemFk,
quantity: sale.quantity,
};
const params = {
barcode: sale.itemFk,
quantity: sale.quantity,
};
const { data } = await axios.post(`tickets/${route.params.id}/addSale`, payload);
const { data } = await axios.post(`tickets/${route.params.id}/addSale`, params);
if (!data) return;
if (!data) return;
const newSale = data;
sale.id = newSale.id;
sale.image = newSale.item.image;
sale.subName = newSale.item.subName;
sale.concept = newSale.concept;
sale.quantity = newSale.quantity;
sale.discount = newSale.discount;
sale.price = newSale.price;
sale.item = newSale.item;
const newSale = data;
sale.id = newSale.id;
sale.image = newSale.item.image;
sale.subName = newSale.item.subName;
sale.concept = newSale.concept;
sale.quantity = newSale.quantity;
sale.discount = newSale.discount;
sale.price = newSale.price;
sale.item = newSale.item;
notify('globals.dataSaved', 'positive');
window.location.reload();
} catch (err) {
console.error('Error adding sale', err);
}
notify('globals.dataSaved', 'positive');
window.location.reload();
};
const changeQuantity = async (sale) => {
@ -234,19 +229,15 @@ const changeQuantity = async (sale) => {
)
return;
if (!sale.id) return addSale(sale);
updateQuantity(sale);
await updateQuantity(sale);
};
const updateConcept = async (sale) => {
canProceed.value = await isSalePrepared(sale);
if (!canProceed.value) return;
try {
const data = { newConcept: sale.concept };
await axios.post(`Sales/${sale.id}/updateConcept`, data);
notify('globals.dataSaved', 'positive');
} catch (err) {
console.error('Error updating concept', err);
}
const data = { newConcept: sale.concept };
await axios.post(`Sales/${sale.id}/updateConcept`, data);
notify('globals.dataSaved', 'positive');
};
const DEFAULT_EDIT = {
@ -302,18 +293,15 @@ const onOpenEditDiscountPopover = async (sale) => {
const updatePrice = async (sale) => {
canProceed.value = await isSalePrepared(sale);
if (!canProceed.value) return;
try {
const newPrice = edit.value.price;
if (newPrice != null && newPrice != sale.price) {
await axios.post(`Sales/${sale.id}/updatePrice`, { newPrice });
sale.price = newPrice;
edit.value = { ...DEFAULT_EDIT };
notify('globals.dataSaved', 'positive');
}
await getMana();
} catch (err) {
console.error('Error updating price', err);
const newPrice = edit.value.price;
if (newPrice != null && newPrice != sale.price) {
await axios.post(`Sales/${sale.id}/updatePrice`, { newPrice });
sale.price = newPrice;
edit.value = { ...DEFAULT_EDIT };
notify('globals.dataSaved', 'positive');
}
await getMana();
};
const changeDiscount = async (sale) => {
@ -360,15 +348,11 @@ const getNewPrice = computed(() => {
});
const newOrderFromTicket = async () => {
try {
const { data } = await axios.post(`Orders/newFromTicket`, {
ticketFk: Number(route.params.id),
});
const routeData = router.resolve({ name: 'OrderCatalog', params: { id: data } });
window.open(routeData.href, '_blank');
} catch (err) {
console.error('Error creating new order', err);
}
const { data } = await axios.post(`Orders/newFromTicket`, {
ticketFk: Number(route.params.id),
});
const routeData = router.resolve({ name: 'OrderCatalog', params: { id: data } });
window.open(routeData.href, '_blank');
};
const goToLog = (saleId) => {
@ -383,15 +367,11 @@ const goToLog = (saleId) => {
};
const changeTicketState = async (val) => {
try {
stateBtnDropdownRef.value.hide();
const params = { ticketFk: route.params.id, code: val };
await axios.post('Tickets/state', params);
notify('globals.dataSaved', 'positive');
await resetChanges();
} catch (err) {
console.error('Error changing ticket state', err);
}
stateBtnDropdownRef.value.hide();
const params = { ticketFk: route.params.id, code: val };
await axios.post('Tickets/state', params);
notify('globals.dataSaved', 'positive');
await resetChanges();
};
const removeSelectedSales = () => {
@ -402,47 +382,34 @@ const removeSelectedSales = () => {
};
const removeSales = async () => {
try {
const params = {
sales: selectedRows.value.filter((sale) => sale.id),
ticketId: store.data.id,
};
selectedRows.value
.filter((sale) => !sale.id)
.forEach((sale) =>
tableRef.value.CrudModelRef.formData.splice(sale.$index, 1)
);
const params = {
sales: selectedRows.value.filter((sale) => sale.id),
ticketId: store.data.id,
};
selectedRows.value
.filter((sale) => !sale.id)
.forEach((sale) => tableRef.value.CrudModelRef.formData.splice(sale.$index, 1));
if (params.sales.length == 0) return;
await axios.post('Sales/deleteSales', params);
removeSelectedSales();
notify('globals.dataSaved', 'positive');
window.location.reload();
} catch (err) {
console.error('Error deleting sales', err);
}
if (params.sales.length == 0) return;
await axios.post('Sales/deleteSales', params);
removeSelectedSales();
notify('globals.dataSaved', 'positive');
window.location.reload();
};
const setTransferParams = async () => {
try {
selectedSales.value = selectedValidSales.value;
const checkedSales = JSON.parse(JSON.stringify(selectedSales.value));
transfer.value = {
lastActiveTickets: [],
sales: checkedSales,
};
selectedSales.value = selectedValidSales.value;
const checkedSales = JSON.parse(JSON.stringify(selectedSales.value));
transfer.value = {
lastActiveTickets: [],
sales: checkedSales,
};
const params = { ticketId: store.data.id };
const { data } = await axios.get(
`clients/${store.data.clientFk}/lastActiveTickets`,
{
params,
}
);
transfer.value.lastActiveTickets = data;
} catch (err) {
console.error('Error setting transfer params', err);
}
const params = { ticketId: store.data.id };
const { data } = await axios.get(`clients/${store.data.clientFk}/lastActiveTickets`, {
params,
});
transfer.value.lastActiveTickets = data;
};
onMounted(async () => {
@ -584,6 +551,7 @@ watch(
color="primary"
:disable="!isTicketEditable || ticketState === 'OK'"
@click="changeTicketState('OK')"
data-cy="ticketSaleOkStateBtn"
>
<QTooltip>{{ t(`Change ticket state to 'Ok'`) }}</QTooltip>
</QBtn>
@ -592,6 +560,7 @@ watch(
color="primary"
:label="t('ticketList.state')"
:disable="!isTicketEditable"
data-cy="ticketSaleStateDropdown"
>
<VnSelect
:options="editableStatesOptions"
@ -601,6 +570,7 @@ watch(
hide-dropdown-icon
focus-on-mount
@update:model-value="changeTicketState"
data-cy="ticketSaleStateSelect"
/>
</QBtnDropdown>
<TicketSaleMoreActions
@ -633,6 +603,7 @@ watch(
icon="vn:splitline"
:disable="!isTicketEditable || !hasSelectedRows"
@click="setTransferParams()"
data-cy="ticketSaleTransferBtn"
>
<QTooltip>{{ t('Transfer lines') }}</QTooltip>
<TicketTransfer
@ -712,7 +683,13 @@ watch(
{{ t('ticketSale.visible') }}: {{ row.visible || 0 }}
</QTooltip>
</QIcon>
<QIcon v-if="row.reserved" color="primary" name="vn:reserva" size="xs">
<QIcon
v-if="row.reserved"
color="primary"
name="vn:reserva"
size="xs"
data-cy="ticketSaleReservedIcon"
>
<QTooltip>
{{ t('ticketSale.reserved') }}
</QTooltip>
@ -865,7 +842,14 @@ watch(
</VnTable>
<QPageSticky :offset="[20, 20]" style="z-index: 2">
<QBtn @click="newOrderFromTicket()" color="primary" fab icon="add" shortcut="+" />
<QBtn
@click="newOrderFromTicket()"
color="primary"
fab
icon="add"
shortcut="+"
data-cy="ticketSaleAddToBasketBtn"
/>
<QTooltip class="text-no-wrap">
{{ t('Add item to basket') }}
</QTooltip>

View File

@ -140,13 +140,9 @@ const createClaim = () => {
};
const onCreateClaimAccepted = async () => {
try {
const params = { ticketId: ticket.value.id, sales: props.sales };
const { data } = await axios.post(`Claims/createFromSales`, params);
push({ name: 'ClaimBasicData', params: { id: data.id } });
} catch (error) {
console.error('Error creating claim: ', error);
}
const params = { ticketId: ticket.value.id, sales: props.sales };
const { data } = await axios.post(`Claims/createFromSales`, params);
push({ name: 'ClaimBasicData', params: { id: data.id } });
};
const setReserved = async (reserved) => {
@ -179,6 +175,7 @@ const createRefund = async (withWarehouse) => {
color="primary"
:label="t('ticketSale.more')"
:disable="disable"
data-cy="ticketSaleMoreActionsDropdown"
>
<template #label>
<QTooltip>{{ t('Select lines to see the options') }}</QTooltip>
@ -190,6 +187,7 @@ const createRefund = async (withWarehouse) => {
v-close-popup
v-ripple
@click="showSmsDialog('productNotAvailable')"
data-cy="sendShortageSMSItem"
>
<QItemSection>
<QItemLabel>{{ t('Send shortage SMS') }}</QItemLabel>
@ -201,12 +199,18 @@ const createRefund = async (withWarehouse) => {
v-close-popup
v-ripple
@click="calculateSalePrice()"
data-cy="recalculatePriceItem"
>
<QItemSection>
<QItemLabel>{{ t('Recalculate price') }}</QItemLabel>
</QItemSection>
</QItem>
<QItem clickable v-ripple @click="emit('getMana')">
<QItem
clickable
v-ripple
@click="emit('getMana')"
data-cy="updateDiscountItem"
>
<QItemSection>
<QItemLabel>{{ t('Update discount') }}</QItemLabel>
</QItemSection>
@ -215,6 +219,7 @@ const createRefund = async (withWarehouse) => {
v-model.number="newDiscount"
:label="t('ticketSale.discount')"
type="number"
data-cy="ticketSaleDiscountInput"
/>
</TicketEditManaProxy>
</QItem>
@ -224,6 +229,7 @@ const createRefund = async (withWarehouse) => {
v-close-popup
v-ripple
@click="createClaim()"
data-cy="createClaimItem"
>
<QItemSection>
<QItemLabel>{{ t('Add claim') }}</QItemLabel>
@ -235,6 +241,7 @@ const createRefund = async (withWarehouse) => {
v-close-popup
v-ripple
@click="setReserved(true)"
data-cy="markAsReservedItem"
>
<QItemSection>
<QItemLabel>{{ t('Mark as reserved') }}</QItemLabel>
@ -246,12 +253,13 @@ const createRefund = async (withWarehouse) => {
v-close-popup
v-ripple
@click="setReserved(false)"
data-cy="unmarkAsReservedItem"
>
<QItemSection>
<QItemLabel>{{ t('Unmark as reserved') }}</QItemLabel>
</QItemSection>
</QItem>
<QItem clickable v-ripple>
<QItem clickable v-ripple data-cy="ticketSaleRefundItem">
<QItemSection>
<QItemLabel>{{ t('Refund') }}</QItemLabel>
</QItemSection>
@ -260,12 +268,22 @@ const createRefund = async (withWarehouse) => {
</QItemSection>
<QMenu anchor="top end" self="top start" auto-close bordered>
<QList>
<QItem v-ripple clickable @click="createRefund(true)">
<QItem
v-ripple
clickable
@click="createRefund(true)"
data-cy="ticketSaleRefundWithWarehouse"
>
<QItemSection>
{{ t('with warehouse') }}
</QItemSection>
</QItem>
<QItem v-ripple clickable @click="createRefund(false)">
<QItem
v-ripple
clickable
@click="createRefund(false)"
data-cy="ticketSaleRefundWithoutWarehouse"
>
<QItemSection>
{{ t('without warehouse') }}
</QItemSection>

View File

@ -69,19 +69,15 @@ function isEditable() {
}
async function changeState(value) {
try {
stateBtnDropdownRef.value?.hide();
const formData = {
ticketFk: entityId.value,
code: value,
};
await axios.post(`Tickets/state`, formData);
notify('globals.dataSaved', 'positive');
summaryRef.value?.fetch();
descriptorData.fetch({});
} catch (err) {
console.error('Error changing ticket state', err);
}
stateBtnDropdownRef.value?.hide();
const formData = {
ticketFk: entityId.value,
code: value,
};
await axios.post(`Tickets/state`, formData);
notify('globals.dataSaved', 'positive');
summaryRef.value?.fetch();
descriptorData.fetch({});
}
function toTicketUrl(section) {
@ -100,6 +96,7 @@ function toTicketUrl(section) {
ref="summaryRef"
:url="`Tickets/${entityId}/summary`"
data-key="TicketSummary"
data-cy="ticketSummary"
>
<template #header-left>
<VnToSummary
@ -279,13 +276,8 @@ function toTicketUrl(section) {
"
>
<span class="label" style="margin-right: 4px">
({{
t(
`ticketNotes.observationTypes.${item.observationType.description}`
)
}}):
({{ item.observationType.description }}):
</span>
<span>{{ item.description }}</span>
</QItem>
</QVirtualScroll>

View File

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

View File

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

View File

@ -37,46 +37,37 @@ onBeforeMount(async () => {
});
const fetchClient = async (formData) => {
try {
const filter = {
include: {
relation: 'defaultAddress',
scope: {
fields: ['id', 'agencyModeFk'],
},
const filter = {
include: {
relation: 'defaultAddress',
scope: {
fields: ['id', 'agencyModeFk'],
},
where: { id: formData.clientId },
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get('Clients', { params });
const [client] = data;
selectedClient.value = client;
} catch (err) {
console.error('Error fetching client');
}
},
where: { id: formData.clientId },
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get('Clients', { params });
const [client] = data;
selectedClient.value = client;
};
const fetchAddresses = async (formData) => {
try {
if (!formData.clientId) return;
if (!formData.clientId) return;
const filter = {
fields: ['nickname', 'street', 'city', 'id'],
where: { isActive: true },
order: 'nickname ASC',
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
params,
});
addressesOptions.value = data;
const filter = {
fields: ['nickname', 'street', 'city', 'id'],
where: { isActive: true },
order: 'nickname ASC',
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
params,
});
addressesOptions.value = data;
const { defaultAddress } = selectedClient.value;
formData.addressId = defaultAddress.id;
} catch (err) {
console.error(`Error fetching addresses`, err);
return err.response;
}
const { defaultAddress } = selectedClient.value;
formData.addressId = defaultAddress.id;
};
const onClientSelected = async (formData) => {

View File

@ -37,46 +37,37 @@ onBeforeMount(async () => {
});
const fetchClient = async (formData) => {
try {
const filter = {
include: {
relation: 'defaultAddress',
scope: {
fields: ['id', 'agencyModeFk'],
},
const filter = {
include: {
relation: 'defaultAddress',
scope: {
fields: ['id', 'agencyModeFk'],
},
where: { id: formData.clientId },
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get('Clients', { params });
const [client] = data;
selectedClient.value = client;
} catch (err) {
console.error('Error fetching client');
}
},
where: { id: formData.clientId },
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get('Clients', { params });
const [client] = data;
selectedClient.value = client;
};
const fetchAddresses = async (formData) => {
try {
if (!formData.clientId) return;
if (!formData.clientId) return;
const filter = {
fields: ['nickname', 'street', 'city', 'id'],
where: { isActive: true },
order: 'nickname ASC',
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
params,
});
addressesOptions.value = data;
const filter = {
fields: ['nickname', 'street', 'city', 'id'],
where: { isActive: true },
order: 'nickname ASC',
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
params,
});
addressesOptions.value = data;
const { defaultAddress } = selectedClient.value;
formData.addressId = defaultAddress.id;
} catch (err) {
console.error(`Error fetching addresses`, err);
return err.response;
}
const { defaultAddress } = selectedClient.value;
formData.addressId = defaultAddress.id;
};
const onClientSelected = async (formData) => {

View File

@ -68,13 +68,9 @@ const params = reactive({
});
const applyColumnFilter = async (col) => {
try {
const paramKey = col.columnFilter?.filterParamKey || col.field;
params[paramKey] = col.columnFilter.filterValue;
await arrayData.addFilter({ params });
} catch (err) {
console.error('Error applying column filter', err);
}
const paramKey = col.columnFilter?.filterParamKey || col.field;
params[paramKey] = col.columnFilter.filterValue;
await arrayData.addFilter({ params });
};
const getInputEvents = (col) => {
@ -248,23 +244,19 @@ const totalPriceColor = (totalWithVat) =>
isLessThan50(totalWithVat) ? 'warning' : 'transparent';
const moveTicketsFuture = async () => {
try {
const ticketsToMove = selectedTickets.value.map((ticket) => ({
originId: ticket.id,
destinationId: ticket.futureId,
originShipped: ticket.shipped,
destinationShipped: ticket.futureShipped,
workerFk: ticket.workerFk,
}));
const ticketsToMove = selectedTickets.value.map((ticket) => ({
originId: ticket.id,
destinationId: ticket.futureId,
originShipped: ticket.shipped,
destinationShipped: ticket.futureShipped,
workerFk: ticket.workerFk,
}));
let params = { tickets: ticketsToMove };
await axios.post('Tickets/merge', params);
notify(t('advanceTickets.moveTicketSuccess'), 'positive');
selectedTickets.value = [];
arrayData.fetch({ append: false });
} catch (error) {
console.error('Error moving tickets to future', error);
}
let params = { tickets: ticketsToMove };
await axios.post('Tickets/merge', params);
notify(t('advanceTickets.moveTicketSuccess'), 'positive');
selectedTickets.value = [];
arrayData.fetch({ append: false });
};
onMounted(async () => {
await arrayData.fetch({ append: false });

View File

@ -254,46 +254,40 @@ const fetchAvailableAgencies = async (formData) => {
};
const fetchClient = async (formData) => {
try {
const filter = {
include: {
relation: 'defaultAddress',
scope: {
fields: ['id', 'agencyModeFk'],
},
const filter = {
include: {
relation: 'defaultAddress',
scope: {
fields: ['id', 'agencyModeFk'],
},
where: { id: formData.clientId },
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get('Clients', { params });
const [client] = data;
selectedClient.value = client;
} catch (err) {
console.error('Error fetching client');
}
},
where: { id: formData.clientId },
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get('Clients', { params });
const [client] = data;
selectedClient.value = client;
};
const fetchAddresses = async (formData) => {
try {
if (!formData.clientId) return;
if (!formData.clientId) return;
const filter = {
fields: ['nickname', 'street', 'city', 'id', 'isActive'],
order: 'nickname ASC',
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
params,
});
addressesOptions.value = data;
const filter = {
fields: ['nickname', 'street', 'city', 'id', 'isActive'],
order: 'nickname ASC',
};
const params = { filter: JSON.stringify(filter) };
const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, {
params,
});
addressesOptions.value = data;
const { defaultAddress } = selectedClient.value;
formData.addressId = defaultAddress.id;
} catch (err) {
console.error(`Error fetching addresses`, err);
return err.response;
}
addressesOptions.value = data;
const { defaultAddress } = selectedClient.value;
formData.addressId = defaultAddress.id;
};
const getColor = (row) => {
if (row.alertLevelCode === 'OK') return 'bg-success';
else if (row.alertLevelCode === 'FREE') return 'bg-notice';
@ -462,6 +456,7 @@ function setReference(data) {
data-key="TicketList"
:label="t('Search ticket')"
:info="t('You can search by ticket id or alias')"
data-cy="ticketListSearchBar"
/>
<RightMenu>
<template #right-panel>
@ -489,6 +484,7 @@ function setReference(data) {
'row-key': 'id',
selection: 'multiple',
}"
data-cy="ticketListTable"
>
<template #column-statusIcons="{ row }">
<TicketProblems :row="row" />

View File

@ -153,24 +153,16 @@ const columns = computed(() => [
]);
const deleteWeekly = async (ticketFk) => {
try {
await axios.delete(`TicketWeeklies/${ticketFk}`);
notify(t('globals.dataSaved'), 'positive');
const ticketIndex = store.data.findIndex((e) => e.ticketFk == ticketFk);
store.data.splice(ticketIndex, 1);
location.reload();
} catch (err) {
console.error('Error deleting weekly', err);
}
await axios.delete(`TicketWeeklies/${ticketFk}`);
notify(t('globals.dataSaved'), 'positive');
const ticketIndex = store.data.findIndex((e) => e.ticketFk == ticketFk);
store.data.splice(ticketIndex, 1);
location.reload();
};
const onUpdate = async (ticketFk, field, value) => {
try {
const params = { ticketFk, [field]: value };
await axios.patch('TicketWeeklies', params);
} catch (err) {
console.error('Error updating weekly', err);
}
const params = { ticketFk, [field]: value };
await axios.patch('TicketWeeklies', params);
};
onMounted(async () => {

View File

@ -10,16 +10,6 @@ ticketNotes:
observationType: Observation type
removeNote: Remove note
addNote: Add note
observationTypes:
ItemPicker: Item picker
Packager: Packager
Delivery: Delivery
SalesPerson: Sales person
Administrative: Administrative
Weight: Weight
InvoiceOut: Invoice Out
DropOff: Drop Off
Sustitución: Sustitution
ticketSale:
visible: Visible
available: Available

View File

@ -19,18 +19,6 @@ ticketNotes:
observationType: Tipo de observación
removeNote: Quitar nota
addNote: Añadir nota
observationTypes:
ItemPicker: Sacador
Packager: Encajador
Delivery: Envío
SalesPerson: Comercial
Administrative: Administrativa
Weight: Peso
InvoiceOut: Facturas
DropOff: Despacho
Sustitución: Sustitución
Accepted: Aceptado
Denied: Denegado
purchaseRequest:
requester: Solicitante
atender: Comprador

View File

@ -14,6 +14,8 @@ const route = useRoute();
const { t } = useI18n();
const agenciesOptions = ref([]);
const warehousesOptionsOut = ref([]);
const warehousesOptionsIn = ref([]);
</script>
<template>
<FetchData
@ -21,12 +23,19 @@ const agenciesOptions = ref([]);
@on-fetch="(data) => (agenciesOptions = data)"
auto-load
/>
<FormModel
:url="`Travels/${route.params.id}`"
:url-update="`Travels/${route.params.id}`"
model="Travel"
<FetchData
url="Warehouses"
@on-fetch="(data) => (warehousesOptionsOut = data)"
auto-load
>
:filter="{ where: { isOrigin: TRUE } }"
/>
<FetchData
url="Warehouses"
@on-fetch="(data) => (warehousesOptionsIn = data)"
auto-load
:filter="{ where: { isDestiny: TRUE } }"
/>
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load>
<template #form="{ data }">
<VnRow>
<VnInput v-model="data.ref" :label="t('globals.reference')" />
@ -44,11 +53,12 @@ const agenciesOptions = ref([]);
<VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
<VnInputDate v-model="data.landed" :label="t('globals.landed')" />
</VnRow>
<VnRow>
<VnSelect
:label="t('globals.warehouseOut')"
v-model="data.warehouseOutFk"
:options="agenciesOptions"
:options="warehousesOptionsOut"
option-value="id"
option-label="name"
map-options
@ -57,7 +67,7 @@ const agenciesOptions = ref([]);
<VnSelect
:label="t('globals.warehouseIn')"
v-model="data.warehouseInFk"
:options="agenciesOptions"
:options="warehousesOptionsIn"
option-value="id"
option-label="name"
map-options
@ -78,6 +88,7 @@ const agenciesOptions = ref([]);
</VnInput>
</VnRow>
<VnRow>
<QCheckbox v-model="data.isRaid" :label="t('travel.basicData.isRaid')" />
<QCheckbox
:label="t('travel.summary.delivered')"
v-model="data.isDelivered"
@ -93,7 +104,7 @@ const agenciesOptions = ref([]);
<i18n>
es:
raidDays: Al rellenarlo, generamos una redada. Indica los días que un travel se moverá automáticamente en el tiempo
raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados.
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.
</i18n>

View File

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

View File

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

View File

@ -32,16 +32,12 @@ const cloneTravel = () => {
};
const cloneTravelWithEntries = async () => {
try {
const { data } = await axios.post(`Travels/${$props.travel.id}/cloneWithEntries`);
notify('globals.dataSaved', 'positive');
router.push({ name: 'TravelBasicData', params: { id: data.id } });
} catch (err) {
console.error('Error cloning travel with entries');
}
const { data } = await axios.post(`Travels/${$props.travel.id}/cloneWithEntries`);
notify('globals.dataSaved', 'positive');
router.push({ name: 'TravelBasicData', params: { id: data.id } });
};
const canDelete = computed(() => useAcl().hasAny('Travel','*','WRITE'));
const canDelete = computed(() => useAcl().hasAny('Travel', '*', 'WRITE'));
const openDeleteEntryDialog = (id) => {
quasar
@ -58,13 +54,9 @@ const openDeleteEntryDialog = (id) => {
};
const deleteTravel = async (id) => {
try {
await axios.delete(`Travels/${id}`);
router.push({ name: 'TravelList' });
notify('globals.dataDeleted', 'positive');
} catch (err) {
console.error('Error deleting travel');
}
await axios.delete(`Travels/${id}`);
router.push({ name: 'TravelList' });
notify('globals.dataDeleted', 'positive');
};
</script>

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

@ -193,44 +193,32 @@ const entriesTotalM3 = computed(() =>
);
const getTravelEntries = async (id) => {
try {
const { data } = await axios.get(`Travels/${id}/getEntries`);
entries.value = data;
} catch (err) {
console.error('Error fetching travel entries');
}
const { data } = await axios.get(`Travels/${id}/getEntries`);
entries.value = data;
};
const getTravelThermographs = async (id) => {
try {
const filter = {
include: {
relation: 'warehouse',
scope: {
fields: ['id', 'name'],
},
const filter = {
include: {
relation: 'warehouse',
scope: {
fields: ['id', 'name'],
},
where: { travelFk: id },
};
},
where: { travelFk: id },
};
const { data } = await axios.get('TravelThermographs', {
params: { filter: JSON.parse(JSON.stringify(filter)) },
});
thermographs.value = data;
} catch (err) {
console.error('Error fetching travel thermographs');
}
const { data } = await axios.get('TravelThermographs', {
params: { filter: JSON.parse(JSON.stringify(filter)) },
});
thermographs.value = data;
};
async function setTravelData(travelData) {
try {
if (travelData) {
travel.value = travelData;
await getTravelEntries(travel.value.id);
await getTravelThermographs(travel.value.id);
}
} catch (err) {
console.error(`Error setting travel data`, err);
if (travelData) {
travel.value = travelData;
await getTravelEntries(travel.value.id);
await getTravelThermographs(travel.value.id);
}
}
@ -268,6 +256,11 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
:label="t('globals.warehouseOut')"
:value="travel.warehouseOut?.name"
/>
<QCheckbox
:label="t('travel.basicData.isRaid')"
v-model="travel.isRaid"
:disable="true"
/>
<QCheckbox
:label="t('travel.summary.delivered')"
v-model="travel.isDelivered"
@ -286,6 +279,10 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
:label="t('globals.warehouseIn')"
:value="travel.warehouseIn?.name"
/>
<VnLv
:label="t('travel.basicData.daysInForward')"
:value="travel?.daysInForward"
/>
<QCheckbox
:label="t('travel.summary.received')"
v-model="travel.isReceived"
@ -303,10 +300,6 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
<VnLv :label="t('globals.reference')" :value="travel.ref" />
<VnLv label="m³" :value="travel.m3" />
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
<VnLv
:label="t('travel.basicData.daysInForward')"
:value="travel?.daysInForward"
/>
</QCard>
<QCard class="full-width">
<VnTitle :text="t('travel.summary.entries')" />

View File

@ -122,13 +122,9 @@ const redirectToThermographForm = (action, id) => {
};
const removeThermograph = async (id) => {
try {
await axios.delete(`Travels/deleteThermograph?id=${id}`);
await thermographPaginateRef.value.fetch();
notify(t('Thermograph removed'), 'positive');
} catch (err) {
console.error('Error removing termograph');
}
await axios.delete(`Travels/deleteThermograph?id=${id}`);
await thermographPaginateRef.value.fetch();
notify(t('Thermograph removed'), 'positive');
};
</script>

View File

@ -56,17 +56,13 @@ onBeforeMount(async () => {
});
const fetchDmsTypes = async () => {
try {
const params = {
filter: {
where: { code: 'thermograph' },
},
};
const { data } = await axios.get('DmsTypes/findOne', { params });
return data;
} catch (err) {
console.error('Error fetching Dms Types');
}
const params = {
filter: {
where: { code: 'thermograph' },
},
};
const { data } = await axios.get('DmsTypes/findOne', { params });
return data;
};
const setCreateDefaultParams = async () => {

View File

@ -293,20 +293,16 @@ const openReportPdf = () => {
};
const saveFieldValue = async (val, field, index) => {
try {
// Evitar la solicitud de guardado si el valor no ha cambiado
if (originalRowDataCopy.value[index][field] == val) return;
// Evitar la solicitud de guardado si el valor no ha cambiado
if (originalRowDataCopy.value[index][field] == val) return;
const id = rows.value[index].id;
const params = { [field]: val };
await axios.patch(`Travels/${id}`, params);
// Actualizar la copia de los datos originales con el nuevo valor
originalRowDataCopy.value[index][field] = val;
const id = rows.value[index].id;
const params = { [field]: val };
await axios.patch(`Travels/${id}`, params);
// Actualizar la copia de los datos originales con el nuevo valor
originalRowDataCopy.value[index][field] = val;
await arrayData.fetch({ append: false });
} catch (err) {
console.error('Error updating travel');
}
await arrayData.fetch({ append: false });
};
const stopEventPropagation = (event, col) => {

View File

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

Some files were not shown because too many files have changed in this diff Show More