0
0
Fork 0

Compare commits

..

156 Commits

Author SHA1 Message Date
Javier Segarra fea760d2f9 Merge branch 'dev' into 6321_negative_tickets 2024-09-24 22:14:04 +02:00
Javier Segarra 38967931b9 feat: refs #6321 updates 2024-09-24 22:13:00 +02:00
Javier Segarra d7f37eff32 feat: refs #6321 updates 2024-09-24 22:11:41 +02:00
Javier Segarra 7da3f132ea feat: refs #6321 update 2024-09-24 13:54:58 +02:00
Javier Segarra d0eb1d97ac fet: updates 2024-09-18 13:10:11 +02:00
Javier Segarra 53b522c488 Merge branch 'dev' into 6321_negative_tickets 2024-09-18 09:15:36 +02:00
Javier Segarra 1c7bcc8902 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-09-17 16:43:42 +02:00
Javier Segarra 01cc2d4e75 fet: updates 2024-09-17 16:42:22 +02:00
Javier Segarra 71236c0a01 fix: remove slot 2024-09-17 14:29:26 +02:00
Javier Segarra 9379e80df7 fix: routing 2024-09-17 14:20:01 +02:00
Javier Segarra 8c6e399fd2 feat: remove comments 2024-09-17 14:06:14 +02:00
Javier Segarra 26eae51585 Merge branch 'dev' into 6321_negative_tickets 2024-09-17 11:43:47 +02:00
Javier Segarra 2c81ddb4aa feat: updates 2024-09-17 11:41:29 +02:00
Javier Segarra b5db786b06 feat: upodates 2024-09-16 12:15:15 +02:00
Javier Segarra 0a3703532e feat: itemProposalProxy 2024-09-16 10:47:41 +02:00
Javier Segarra 8be1a42c53 Merge branch 'dev' into 6321_negative_tickets 2024-09-16 09:48:22 +02:00
Javier Segarra d16786d3e1 feat: updates TicketTable 2024-09-12 08:40:19 +02:00
Javier Segarra ff918b8a1c feat: updates ItemProposal 2024-09-11 23:29:59 +02:00
Javier Segarra 9ec1c5ff4b feat: updates ItemProposal 2024-09-11 23:17:38 +02:00
Javier Segarra 373ca0b3f1 feat:TicketLackTable updates 2024-09-11 14:25:10 +02:00
Javier Segarra 5e89bbe19e fix: remove unnesed imports 2024-09-11 12:55:14 +02:00
Javier Segarra d6bb39236d feat: implement VnTable 2024-09-11 12:43:24 +02:00
Javier Segarra b0a439c26c fix: ticketLackList 2024-09-11 11:26:25 +02:00
Javier Segarra 78c5836431 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-09-11 08:50:39 +02:00
Javier Segarra 437d70d415 perf: TransferSale and implementations 2024-07-23 12:33:11 +02:00
Javier Segarra a53f4bd957 feat: QPopupProxy updateNegativeOrigin 2024-07-22 20:22:32 +02:00
Javier Segarra 3979a328e9 WIP: 28213bcc minor i18n updates 2024-07-22 17:30:15 +02:00
Javier Segarra 28213bcce6 minor i18n updates 2024-07-20 00:37:13 +02:00
Javier Segarra 7c8ddf9c2b Merge branch 'dev' into 6321_negative_tickets 2024-07-20 00:22:37 +02:00
Javier Segarra c45ff7009c Merge branch 'dev' into 6321_negative_tickets 2024-07-18 22:04:30 +02:00
Javier Segarra a6cd75a210 feat: Julia icon proposal 2024-07-04 17:27:59 +02:00
Javier Segarra 189784872f feat: substitution icons 2024-07-04 09:39:27 +02:00
Javier Segarra 8714be1fa7 feat: define new CustomerDescriptorMenu action. Pending reactivity 2024-07-03 23:07:50 +02:00
Javier Segarra 87928ea7b6 feat: add new icons. Pending to define icon name 2024-07-03 23:07:44 +02:00
Javier Segarra f52ba11f42 Merge remote-tracking branch 'origin/dev' into 6321_negative_tickets 2024-07-03 23:07:25 +02:00
Javier Segarra 9c8094a3d8 Merge branch 'dev' into 6321_negative_tickets 2024-07-02 20:31:44 +02:00
Javier Segarra 32fe76aaab feat: Vndescriptor 2024-07-02 20:28:13 +02:00
Javier Segarra c3d97231d2 Merge branch 'dev' into 6321_negative_tickets 2024-07-02 12:20:58 +02:00
Javier Segarra e76daac3be feat: cherryPick TicketTransfer 2024-06-20 00:06:00 +02:00
Javier Segarra 3ff0d2139a feat: call latestBuysFilter 2024-06-20 00:01:33 +02:00
Javier Segarra bb92d75e00 test: #6321 boilerplate tests 2024-06-20 00:01:12 +02:00
Javier Segarra 1367c372e3 handle replaceItem 2024-06-19 15:25:57 +02:00
Javier Segarra 86cfbace72 feat: #6321 remove row 2024-06-19 13:18:32 +02:00
Javier Segarra 185160aeba feat: use Popover instead dialog 2024-06-18 22:49:55 +02:00
Javier Segarra cd5a64fcc6 fat: #6321 handle events through components 2024-06-17 22:32:39 +02:00
Javier Segarra 20e439f31e feat: ItemProposal difference column 2024-06-17 12:37:52 +02:00
Javier Segarra 6ef53e790a feat: itemProposal and LackDetail 2024-06-17 12:19:57 +02:00
Javier Segarra 7b047e1637 updates 2024-06-14 13:44:33 +02:00
Javier Segarra 679710eb4d updates 2024-06-13 14:55:49 +02:00
Javier Segarra bb58f72e3f updates 2024-06-13 09:37:39 +02:00
Javier Segarra 1641ad396c Merge branch 'dev' into 6321_negative_tickets 2024-06-12 23:07:14 +02:00
Javier Segarra f816cb9240 perf: TicketLackLit 2024-06-12 23:06:56 +02:00
Javier Segarra 4226c52fc5 perf: ItemProposal 2024-06-12 22:23:58 +02:00
Javier Segarra 8d9bfd8f1d Merge branch 'dev' into 6321_negative_tickets 2024-06-11 13:52:48 +02:00
Javier Segarra b370fe673b updates 2024-06-10 17:06:20 +02:00
Javier Segarra fd4ff94f4c feat: #6321 Update handleSplitted form 2024-06-04 14:14:16 +02:00
Javier Segarra 5b1819f7da Merge branch 'dev' into 6321_negative_tickets 2024-06-04 09:27:46 +02:00
Javier Segarra 79548f5041 updates 2024-05-30 06:46:30 +02:00
Javier Segarra d3b93b710d updates 2024-05-28 13:07:22 +02:00
Javier Segarra 577c21e601 Merge branch 'dev' into 6321_negative_tickets 2024-05-28 12:48:00 +02:00
Javier Segarra 36d166ab44 feat: #6321 Split tickets 2024-05-24 13:52:51 +02:00
Javier Segarra 1eedb6f79b perf: #6321 updates 2024-05-24 11:54:31 +02:00
Javier Segarra ceae5eaa9e Merge branch 'dev' into 6321_negative_tickets 2024-05-24 11:21:06 +02:00
Javier Segarra f0333dfd01 feat: Refactor negativeDetail 2024-05-16 12:01:56 +02:00
Javier Segarra 372e797059 feat: recover split 2024-05-15 16:25:25 +02:00
Javier Segarra b03578eb65 feat: header itemProposal dialog 2024-05-15 16:09:26 +02:00
Javier Segarra 1c15a02a5f perf: i18n ItemProposal 2024-05-15 15:45:24 +02:00
Javier Segarra bb6a8c0052 feat: remove alertLevelCode column 2024-05-15 15:45:08 +02:00
Javier Segarra 58597bdddf Merge branch 'dev' into 6321_negative_tickets 2024-05-15 08:55:47 +02:00
Javier Segarra 1ca7420207 feat: replace item 2024-05-15 08:54:22 +02:00
Javier Segarra fffd662cee feat: reload ticket detail when update state/qty 2024-05-15 08:14:50 +02:00
Javier Segarra e07e62abb4 updates 2024-05-14 14:41:34 +02:00
Javier Segarra df911e0210 feat: itemProposal selection 2024-05-14 09:55:36 +02:00
Javier Segarra ad64ee4755 feat: change Qdialog sizing 2024-05-14 08:45:46 +02:00
Javier Segarra 3e39ab7fc2 Merge branch '6321_negative_tickets' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-05-13 13:51:18 +02:00
Javier Segarra e6b360ee4b fix: vnfilterPanel 2024-05-13 13:51:15 +02:00
Jorge Penadés 99ea8e843c Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-05-13 13:22:39 +02:00
Javier Segarra ebdc1e9906 updates 2024-05-13 13:18:22 +02:00
Javier Segarra 0eab0a9a98 feat: #6321 Modals change qty and state 2024-05-08 15:35:04 +02:00
Javier Segarra 881e059121 feat: #6321 Show Free lines 2024-05-08 14:06:23 +02:00
Javier Segarra 0984d05220 Merge branch 'fix_minor_styles' into 6321_negative_tickets 2024-05-08 13:44:40 +02:00
Javier Segarra 61519595a9 Merge branch 'dev' into 6321_negative_tickets 2024-05-08 12:30:01 +02:00
Javier Segarra c03875838f feat: minor updates 2024-05-02 15:18:14 +02:00
Javier Segarra 6323f165a0 perf: updates 2024-05-02 13:53:40 +02:00
Javier Segarra 1907301852 Merge branch 'dev' into 6321_negative_tickets 2024-05-02 12:48:45 +02:00
Javier Segarra 2c59e6acc3 Merge branch 'dev' into 6321_negative_tickets 2024-04-30 15:25:10 +02:00
Javier Segarra 1929545e5b feat: itemProposal table 2024-04-30 15:23:49 +02:00
Javier Segarra 0988936884 feat: frmItemProposal show 2024-04-30 14:51:49 +02:00
Javier Segarra 1d4549439c feat: remove agName 2024-04-29 15:09:10 +02:00
Javier Segarra b7bfb4b056 feat: updates 2024-04-29 15:08:12 +02:00
Javier Segarra 56a6f24071 feat: family filter 2024-04-29 14:21:39 +02:00
Javier Segarra 1ccad36020 feat: remove unnused filters 2024-04-29 13:25:18 +02:00
Javier Segarra df29ad31fd minor changes 2024-04-29 13:22:31 +02:00
Javier Segarra 7108444a44 fix: 1. Warehouse default 2024-04-29 13:22:23 +02:00
Javier Segarra 5425902918 Merge branch 'dev' into 6321_negative_tickets 2024-04-29 11:55:56 +02:00
Javier Segarra 4049fa5c4a feat: #6321 replace dialog into layout 2024-04-23 12:50:34 +02:00
Javier Segarra 46aefa67d1 Merge remote-tracking branch 'origin/dev' into 6321_negative_tickets 2024-04-23 11:45:00 +02:00
Javier Segarra cc241c6a4e feat: #6321 new route 2024-04-22 14:24:23 +02:00
Javier Segarra 5779d37bbd feat: #6321 i18n to yml 2024-04-22 14:08:58 +02:00
Javier Segarra 91c5d7092d Merge remote-tracking branch 'origin/dev' into 6321_negative_tickets 2024-04-22 13:34:00 +02:00
Javier Segarra a5350f686d refs #6321 fix: comments 2024-04-15 12:28:01 +02:00
Javier Segarra cf0454669a refs #6321 fix: split disabled 2024-04-15 12:24:45 +02:00
Javier Segarra 6804196dbb warnings 2024-04-08 09:35:17 +02:00
Javier Segarra 6c2c3b8f60 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-04-08 09:22:52 +02:00
Javier Segarra f6eaa99aeb refs #6321 fix: warnings 2024-04-03 10:04:47 +02:00
Javier Segarra 2951e69a6a refs #6321 feat updateQuantity 2024-04-03 09:58:04 +02:00
Javier Segarra 85fa394be0 refs #6321 perf: i18n 2024-04-03 09:49:09 +02:00
Javier Segarra 5a497289da refs #6321 perf: i18n 2024-04-03 08:41:20 +02:00
Javier Segarra 75e02bf328 change icon 2024-04-03 08:33:14 +02:00
Javier Segarra 370e52f7c4 refs #6321 perf: i18n 2024-04-02 13:25:51 +02:00
Javier Segarra 6b4dea6bf9 refs #6321 fix: filter menu 2024-04-02 13:13:29 +02:00
Javier Segarra 648a98d49d refs #6321 remove bad files 2024-04-02 09:57:59 +02:00
Javier Segarra 207097fa98 refs #6321 remove bad files 2024-04-02 09:56:31 +02:00
Javier Segarra f56934fcc4 refs #6321 perf change response object 2024-04-02 09:44:09 +02:00
Javier Segarra 48f88b5871 refs #6321 remove comments 2024-04-02 08:17:44 +02:00
Javier Segarra 130c98ef17 refs #6321 remove comments 2024-04-02 08:14:11 +02:00
Javier Segarra c16cc78ce6 refs #6321 remove bad files 2024-04-02 08:08:50 +02:00
Javier Segarra 0c88efc291 refs #6321 feat: status response after split 2024-03-29 01:29:45 +01:00
Javier Segarra 967fb4592b Merge branch 'dev' into 6321_negative_tickets 2024-03-29 00:56:23 +01:00
Javier Segarra 697c467006 refs #6321 i18n: buttons tooltip 2024-03-29 00:56:10 +01:00
Javier Segarra 737ab9e99b updates 2024-03-28 11:54:47 +01:00
Javier Segarra 30a32ad17d refs #6321 updates 2024-03-28 07:17:06 +01:00
Javier Segarra 3a024e81b5 refs #6321 updates 2024-03-27 15:20:15 +01:00
Javier Segarra fe12968dd6 refs #6321 fix: rowsSelected 2024-03-27 14:08:25 +01:00
Javier Segarra 81436a1641 refs #6321 feat changeState 2024-03-27 12:02:57 +01:00
Javier Segarra d65caaad07 refs #6321 perf: rename files 2024-03-27 10:19:49 +01:00
Javier Segarra 48aa8dad79 refs #6321 perf: i18n 2024-03-27 10:12:10 +01:00
Javier Segarra 1e09e9e4bb refs #6321 perf: move dialogs to new files 2024-03-27 10:07:27 +01:00
Javier Segarra 6b564bb648 refs #6321 feat: use tokenMultimedia 2024-03-27 10:06:57 +01:00
Javier Segarra 41cf7d242b Merge branch 'dev' into 6321_negative_tickets 2024-03-27 09:53:14 +01:00
Javier Segarra 174d159d04 refs #6321 i18n 2024-03-22 11:46:40 +01:00
Javier Segarra 6e701bd455 refs #6321 updates 2024-03-21 10:14:44 +01:00
Javier Segarra 527c845356 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-03-21 07:48:07 +01:00
Javier Segarra c51feab746 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-03-15 12:22:01 +01:00
Javier Segarra b3cbc64efb refs #6321 perf: i18n 2024-03-15 12:15:03 +01:00
Javier Segarra 92555f8ddb refs #6321 feat: negativeOrigin modal 2024-03-15 11:31:19 +01:00
Javier Segarra 674b8bb1dc refs #6321 perf: updates 2024-03-15 09:36:30 +01:00
Javier Segarra e264a13234 warnings 2024-03-15 09:36:15 +01:00
Javier Segarra 5326d9db88 refs #6321 perf: update 2024-03-14 15:26:07 +01:00
Javier Segarra 79e2bddeea Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-03-14 15:01:58 +01:00
Javier Segarra 2436db1c28 refs #6321 perf: update 2024-03-14 14:21:02 +01:00
Javier Segarra bffc496965 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-03-14 13:04:05 +01:00
Javier Segarra 322c195175 refs #6321 feat: i18n improves 2024-03-13 14:27:21 +01:00
Javier Segarra 80b881edb5 refs #6321 fix: bug when retrieve token 2024-03-07 09:50:19 +01:00
Javier Segarra d10c04d4f2 refs #6321 feat: change dialog header 2024-03-06 20:46:13 +01:00
Javier Segarra 0dd89ec3f0 refs #6321 perf: rename files 2024-03-06 20:45:53 +01:00
Javier Segarra 51b8667938 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-03-06 13:51:59 +01:00
Javier Segarra 7254f91645 refs #6321 feat: updates i18n dialog 2024-03-05 12:59:59 +01:00
Javier Segarra 59e260d448 refs #6321 feat: updates dialog 2024-03-05 12:59:45 +01:00
Javier Segarra 3a7e092efe Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-03-05 08:06:05 +01:00
Javier Segarra 67eb21b707 refs #6321 feat: updates 2024-03-05 08:05:16 +01:00
Javier Segarra f44643fc61 refs #6664 perf: show dialog 2024-01-26 13:22:23 +01:00
Javier Segarra 1c51faaff4 Merge branch '6321_negative_tickets' of https://gitea.verdnatura.es/verdnatura/salix-front into 6321_negative_tickets 2024-01-23 11:14:50 +01:00
Javier Segarra f6f84e191b refs #6321 feat dialog approach 2024-01-23 11:14:46 +01:00
Alex Moreno d78c20d14b Merge branch 'dev' into 6321_negative_tickets 2024-01-22 10:41:04 +00:00
Javier Segarra c95b738e0c refs #6321 feat: create new section for ticket module 2024-01-20 12:23:51 +01:00
258 changed files with 5946 additions and 6948 deletions

4
.gitignore vendored
View File

@ -29,5 +29,5 @@ yarn-error.log*
*.sln
# Cypress directories and files
/tests/cypress/videos
/tests/cypress/screenshots
/test/cypress/videos
/test/cypress/screenshots

View File

@ -1,183 +1,3 @@
# Version 24.40 - 2024-10-02
### Added 🆕
- chore: refs #4074 admit several acls by:jorgep
- chore: refs #4074 drop workerCreate by:jorgep
- chore: refs #4074 fix tests by:jorgep
- chore: refs #4074 wip replace useRole for useAcl by:jorgep
- chore: refs #7155 remove console.log by:alexm
- chore: refs #7155 typo by:alexm
- chore: refs #7663 add test by:jorgep
- chore: refs #7663 create test wip by:jorgep
- chore: refs #7663 drop useless code (origin/7663-setWeight) by:jorgep
- chore: refs #7828 fix e2e by:jorgep
- feat(AccountBasicData): add twoFactorFk by:alexm
- feat: add max rule by:Javier Segarra
- feat: add shortcut add event in some subSections by:Javier Segarra
- feat: add shortcut more buttons (origin/add_shortcut_add_subSections) by:Javier Segarra
- feat: add tooltip CustomerNewCustomAgent by:Javier Segarra
- feat: apply color when today by:Javier Segarra
- feat: change label because its more natural by:Javier Segarra
- feat: change order by:Javier Segarra
- feat: change QBadge color by:Javier Segarra
- feat: change url CustomerList by:Javier Segarra
- feat: copy customer countryFk by:Javier Segarra
- feat: create VnSelectEnum and add in AccountBasicData and ClaimBasicData by:alexm
- feat: CustomerBalance by:Javier Segarra
- feat: CustomerConsumptionFilter by:Javier Segarra
- feat: customer consumption (origin/7830-customerDesplegables, 7830-customerDesplegables) by:alexm
- feat: CustomerCreateTicket by:Javier Segarra
- feat: CustomerCredit section by:Javier Segarra
- feat: CustomerGreuges by:Javier Segarra
- feat: CustomerSample to VnTable by:Javier Segarra
- feat: global handler (origin/fix_global_handler, fix_global_handler) by:alexm
- feat: goToSupplier by:Javier Segarra
- feat: handle newValue by:Javier Segarra
- feat: handle same multiple CP by:Javier Segarra
- feat: hide menus on small view (origin/hideMenu) by:jorgep
- feat: minor changes by:Javier Segarra
- feat: orderCreateDialog by:Javier Segarra
- feat: refs #4074 drop useless code by:jorgep
- feat: refs #4074 useAcl in vnSelectDialog by:jorgep
- feat: refs #6346 new wagon type section by:Jon
- feat: refs #7404 add m3 and fix detail by:pablone
- feat: refs #7404 add some style to the form and reorganize fields by:pablone
- feat: refs #7404 add travel m3 to reserves form by:pablone
- feat: refs #7404 style dynamic text color by:pablone
- feat: refs #7404 travel m3 form by:pablone
- feat: refs #7500 added VnImg to show files by:Jon
- feat: refs #7663 add setWeight menu opt (wip) by:jorgep
- feat: refs #7663 fine tunning by:jorgep
- feat: refs #7828 create axios instance which no manage errors (origin/7828-makeCorrectCalls) by:jorgep
- feat: refs #7828 useAcl & cherry pick mail data worker by:jorgep
- feat: remove cli warnings by:Javier Segarra
- feat: show preparation field by:Javier Segarra
- feat: stateGroupedFilter by:Javier Segarra
- feat: translations fixed by:jgallego
- feat(TravelList): add daysOnward by:alexm
- feat: travel m3 by:pablone
- feat: use disableInifiniteScroll property by:Javier Segarra
- feat: VnImg draggable by:Javier Segarra
- feat: vnLocation changes by:Javier Segarra
- feat: vnSelect exprBuilder by:Javier Segarra
- fix: refs #7404 remove some style by:pablone
- fix: refs #7404 style non center pop up (origin/7404-fixFront) by:pablone
- fix: refs #7404 translates and some minor style fixes by:pablone
- fix: styles by:Javier Segarra
- perf: improve style by:Javier Segarra
### Changed 📦
- perf: CustomerBalance by:Javier Segarra
- perf: CustomerBasicData by:Javier Segarra
- perf: CustomerBasicData.salesPersonFk by:Javier Segarra
- perf: CustomerSummary by:Javier Segarra
- perf: customerSummaryTable by:Javier Segarra
- perf: disable card option by:Javier Segarra
- perf: i18n by:Javier Segarra
- perf: improve by:Javier Segarra
- perf: improve style by:Javier Segarra
- perf: imrpove exprBuilder by:Javier Segarra
- perf: minor comments by:Javier Segarra
- perf: refs #6346 previous changes by:Jon
- perf: sendEmail customerConsumption by:Javier Segarra
- perf: solve reload CardSummary component by:Javier Segarra
- perf: update CustommerDescriptor by:Javier Segarra
- refactor: refs #4074 accept array by:jorgep
- refactor: refs #4074 rollback by:jorgep
- refactor: refs #4074 use acl & drop useless roles by:jorgep
- refactor: refs #4074 useAcl in navigationStore & router by:jorgep
- refactor: refs #4074 use fn (origin/4074-useAcls) by:jorgep
- refactor: refs #4074 use VnTitle by:jorgep
- refactor: refs #6346 deleted front error checking by:Jon
- refactor: refs #6346 requested changes by:Jon
- refactor: refs #6346 wagons to VnTable by:Jon
- refactor: refs #7500 deleted useless code by:Jon
- refactor: refs #7500 refactor vnimg when storage is dms by:Jon
- refactor: refs #7828 wip by:jorgep
### Fixed 🛠️
- chore: refs #4074 fix tests by:jorgep
- chore: refs #7828 fix e2e by:jorgep
- feat: refs #7404 add m3 and fix detail by:pablone
- feat: translations fixed by:jgallego
- fix: #5938 grouped filter by:Javier Segarra
- fix: #6943 fix customerSummaryTable by:Javier Segarra
- fix: #6943 show nickname salesPerson by:Javier Segarra
- fix: address-create i18n by:Javier Segarra
- fix: comments (origin/6943_fix_customer_module, 6943_fix_customer_module) by:Javier Segarra
- fix: CusomerSummary to Address by:Javier Segarra
- fix: CustomerAddress mobile by:Javier Segarra
- fix: CustomerBillingData by:Javier Segarra
- fix: Customerconsumption by:Javier Segarra
- fix: customer credit opinion by:alexm
- fix: CustomerCreditOpinion workerDescriptor by:Javier Segarra
- fix: CustomerDescriptorAccount by:Javier Segarra
- fix: CustomerDescriptor.bussinessTypeFk by:Javier Segarra
- fix: CustomerFilter by:Javier Segarra
- fix: CustomerGreuges by:Javier Segarra
- fix: CustomerMandates by:Javier Segarra
- fix: Customer module find salesPersons out of first get by:Javier Segarra
- fix: CustomerRecovery transalate label by:Javier Segarra
- fix: CustomerSamples by:Javier Segarra
- fix: customerSummaryToTicketList button by:Javier Segarra
- fix: CustomerWebPayment by:Javier Segarra
- fix: CustommerSummaryTable Proxy by:Javier Segarra
- fix: deleted code by:Jon
- fix: duplicate code by:alexm
- fix: emit:updateModelValue by:Javier Segarra
- fix: fixed wagon tests by:Jon
- fix: fix wagon list reload by:Jon
- fix: i18n en preparation label by:Javier Segarra
- fix: infiniteScroll by:Javier Segarra
- fix: isFullMovable checkbox by:Javier Segarra
- fix: merge conflicts by:Javier Segarra
- fix: merge in dev by:alexm
- fix: missing code by:Jon
- fix: Options VnSelect properties by:Javier Segarra
- fix: refs #4074 await to watch by:jorgep
- fix: refs #4074 drop wrong acl by:jorgep
- fix: refs #4074 workerCard data-key by:jorgep
- fix: refs #6346 fix list and create by:pablone
- fix: refs #6943 prevent null (origin/6943-warmfix-preventNull) by:jorgep
- fix: refs #7155 remove userParams in watcher (7155-travel_daysOnward) by:alexm
- fix: refs #7155 use chip-locale (origin/7155-travel_daysOnward_2, 7155-travel_daysOnward_2) by:alexm
- fix: refs #7404 remove console.log by:pablone
- fix: refs #7404 remove from test by:pablone
- fix: refs #7404 remove some style by:pablone
- fix: refs #7404 revert commit prevent production access by:pablone
- fix: refs #7404 style non center pop up (origin/7404-fixFront) by:pablone
- fix: refs #7404 translates and some minor style fixes by:pablone
- fix: refs #7500 fixed e2e test by:Jon
- fix: refs #7500 fixed showing images wrongly by:Jon
- fix: refs #7830 customer credit by:pablone
- fix: refs #7830 remove console.log by:pablone
- fix: remove console.log by:pablone
- fix: remove FetchData by:Javier Segarra
- fix: remove FIXME (origin/6943_fix_customerSummaryTable) by:Javier Segarra
- fix: remove print variable by:Javier Segarra
- fix: remove promise execution by:Javier Segarra
- fix: reset VnTable scroll properties by:Javier Segarra
- fix: rule by:Javier Segarra
- fix: solve conflicts from master to test by:Javier Segarra
- fix: split params (origin/warmfix-addSearchUrl) by:jorgep
- fix: state cell by:Javier Segarra
- fix: stop call back event hasMoreData by:Javier Segarra
- fix: styles by:Javier Segarra
- fix: SupplierFiscalData VnLocation (origin/fix_supplierFD_location) by:Javier Segarra
- fix: VnLocation test by:Javier Segarra
- fix(VnTable): header background-color by:alexm
- fix(VnTable): sanitizer value is defined by:carlossa
- fix: wagon reload (origin/FixWagonRedirect) by:Jon
- fix: workerDms filter workerFk by:alexm
- fix(WorkerList): add type email by:alexm
- Merge remote-tracking branch 'origin/7830-customerDesplegables' into 6943_fix_customerSummaryTable by:Javier Segarra
- refs #7155 scopeDays fix (origin/7155-scopeDays) by:carlossa
- revert: vnUSerLink change by:Javier Segarra
- test: fix test (7677_vnLocation_perf) by:Javier Segarra
# Version 24.38 - 2024-09-17
### Added 🆕

View File

@ -1,6 +1,6 @@
{
"name": "salix-front",
"version": "24.44.0",
"version": "24.42.0",
"description": "Salix frontend",
"productName": "Salix",
"author": "Verdnatura",

View File

@ -29,8 +29,16 @@ module.exports = configure(function (/* ctx */) {
// app boot file (/src/boot)
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files
boot: ['i18n', 'axios', 'vnDate', 'validations', 'quasar', 'quasar.defaults'],
boot: [
'i18n',
'axios',
'vnDate',
'validations',
'quasar',
'quasar.defaults',
'global-components',
],
importStrategy: 'auto',
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
css: ['app.scss'],

View File

@ -2,11 +2,9 @@ import axios from 'axios';
import { useSession } from 'src/composables/useSession';
import { Router } from 'src/router';
import useNotify from 'src/composables/useNotify.js';
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
const session = useSession();
const { notify } = useNotify();
const stateQuery = useStateQueryStore();
const baseUrl = '/api/';
axios.defaults.baseURL = baseUrl;
@ -17,7 +15,7 @@ const onRequest = (config) => {
if (token.length && !config.headers.Authorization) {
config.headers.Authorization = token;
}
stateQuery.add(config);
return config;
};
@ -26,10 +24,10 @@ const onRequestError = (error) => {
};
const onResponse = (response) => {
const config = response.config;
stateQuery.remove(config);
const { method } = response.config;
if (config.method === 'patch') {
const isSaveRequest = method === 'patch';
if (isSaveRequest) {
notify('globals.dataSaved', 'positive');
}
@ -37,9 +35,37 @@ const onResponse = (response) => {
};
const onResponseError = (error) => {
stateQuery.remove(error.config);
let message = '';
if (session.isLoggedIn() && error.response?.status === 401) {
const response = error.response;
const responseData = response && response.data;
const responseError = responseData && response.data.error;
if (responseError) {
message = responseError.message;
}
switch (response?.status) {
case 422:
if (error.name == 'ValidationError')
message +=
' "' +
responseError.details.context +
'.' +
Object.keys(responseError.details.codes).join(',') +
'"';
break;
case 500:
message = 'errors.statusInternalServerError';
break;
case 502:
message = 'errors.statusBadGateway';
break;
case 504:
message = 'errors.statusGatewayTimeout';
break;
}
if (session.isLoggedIn() && response?.status === 401) {
session.destroy(false);
const hash = window.location.hash;
const url = hash.slice(1);
@ -48,6 +74,8 @@ const onResponseError = (error) => {
return Promise.reject(error);
}
notify(message, 'negative');
return Promise.reject(error);
};

View File

@ -1,4 +0,0 @@
import { QInput } from 'quasar';
import setDefault from './setDefault';
setDefault(QInput, 'dense', true);

View File

@ -1,4 +0,0 @@
import { QSelect } from 'quasar';
import setDefault from './setDefault';
setDefault(QSelect, 'dense', true);

View File

@ -0,0 +1,13 @@
// src/boot/global-components.js
import { defineAsyncComponent } from 'vue';
const components = import.meta.glob('src/components/**/*.vue');
export default ({ app }) => {
for (const path in components) {
const componentName = path
.split('/')
.pop()
.replace(/\.\w+$/, '');
app.component(componentName, defineAsyncComponent(components[path]));
}
};

View File

@ -1,3 +1 @@
export * from './defaults/qTable';
export * from './defaults/qInput';
export * from './defaults/qSelect';

View File

@ -3,51 +3,14 @@ import qFormMixin from './qformMixin';
import mainShortcutMixin from './mainShortcutMixin';
import keyShortcut from './keyShortcut';
import useNotify from 'src/composables/useNotify.js';
import { CanceledError } from 'axios';
const { notify } = useNotify();
export default boot(({ app }) => {
app.mixin(qFormMixin);
app.mixin(mainShortcutMixin);
app.directive('shortcut', keyShortcut);
app.config.errorHandler = (error) => {
let message;
const response = error.response;
const responseData = response?.data;
const responseError = responseData && response.data.error;
if (responseError) {
message = responseError.message;
}
switch (response?.status) {
case 422:
if (error.name == 'ValidationError')
message +=
' "' +
responseError.details.context +
'.' +
Object.keys(responseError.details.codes).join(',') +
'"';
break;
case 500:
message = 'errors.statusInternalServerError';
break;
case 502:
message = 'errors.statusBadGateway';
break;
case 504:
message = 'errors.statusGatewayTimeout';
break;
}
console.error(error);
if (error instanceof CanceledError) {
const env = process.env.NODE_ENV;
if (env && env !== 'development') return;
message = 'Duplicate request';
}
notify(message ?? 'globals.error', 'negative', 'error');
app.config.errorHandler = function (err) {
console.error(err);
notify('globals.error', 'negative', 'error');
};
});

View File

@ -21,7 +21,7 @@ const customer = computed(() => state.get('customer'));
const bankEntityFormData = reactive({
name: null,
bic: null,
countryFk: customer.value?.countryFk,
countryFk: customer.value.countryFk,
id: null,
});
@ -31,8 +31,8 @@ const countriesFilter = {
const countriesOptions = ref([]);
const onDataSaved = (...args) => {
emit('onDataSaved', ...args);
const onDataSaved = (formData, requestResponse) => {
emit('onDataSaved', formData, requestResponse);
};
onMounted(async () => {

View File

@ -1,42 +1,35 @@
<script setup>
import { onMounted, ref } from 'vue';
import { reactive, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import FetchData from 'components/FetchData.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnSelectProvince from 'components/VnSelectProvince.vue';
import VnInput from 'components/common/VnInput.vue';
import FormModelPopup from './FormModelPopup.vue';
const emit = defineEmits(['onDataSaved']);
const $props = defineProps({
countryFk: {
type: Number,
default: null,
},
provinceSelected: {
type: Number,
default: null,
},
provinces: {
type: Array,
default: () => [],
},
});
const { t } = useI18n();
const cityFormData = ref({
const cityFormData = reactive({
name: null,
provinceFk: null,
});
onMounted(() => {
cityFormData.value.provinceFk = $props.provinceSelected;
});
const provincesOptions = ref([]);
const onDataSaved = (...args) => {
emit('onDataSaved', ...args);
};
</script>
<template>
<FetchData
@on-fetch="(data) => (provincesOptions = data)"
auto-load
url="Provinces"
/>
<FormModelPopup
:title="t('New city')"
:subtitle="t('Please, ensure you put the correct data!')"
@ -48,16 +41,11 @@ const onDataSaved = (...args) => {
<template #form-inputs="{ data, validate }">
<VnRow>
<VnInput
:label="t('Names')"
:label="t('Name')"
v-model="data.name"
:rules="validate('city.name')"
/>
<VnSelectProvince
:province-selected="$props.provinceSelected"
:country-fk="$props.countryFk"
v-model="data.provinceFk"
:provinces="$props.provinces"
/>
<VnSelectProvince v-model="data.provinceFk" />
</VnRow>
</template>
</FormModelPopup>

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,11 +22,9 @@ const postcodeFormData = reactive({
townFk: null,
});
const townsFetchDataRef = ref(null);
const provincesFetchDataRef = ref(null);
const countriesOptions = ref([]);
const provincesOptions = ref([]);
const townsOptions = ref([]);
const town = ref({});
function onDataSaved(formData) {
@ -63,94 +61,23 @@ function setTown(newTown, data) {
}
async function setProvince(id, data) {
await provincesFetchDataRef.value.fetch();
const newProvince = provincesOptions.value.find((province) => province.id == id);
if (!newProvince) return;
data.countryFk = newProvince.countryFk;
}
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) => {
if (Array.isArray(newProvinceFk)) {
newProvinceFk = newProvinceFk[0];
}
if (newProvinceFk !== postcodeFormData.provinceFk) {
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;
}
</script>
<template>
<FetchData
ref="provincesFetchDataRef"
@on-fetch="handleProvinces"
:sort-by="['name ASC']"
:limit="30"
@on-fetch="(data) => (provincesOptions = data)"
auto-load
url="Provinces/location"
/>
<FetchData
ref="townsFetchDataRef"
:sort-by="['name ASC']"
:limit="30"
@on-fetch="handleTowns"
auto-load
url="Towns/location"
/>
<FetchData
@on-fetch="handleCountries"
:sort-by="['name ASC']"
:limit="30"
@on-fetch="(data) => (countriesOptions = data)"
auto-load
url="Countries"
/>
@ -169,20 +96,18 @@ async function handleCountries(data) {
:label="t('Postcode')"
v-model="data.code"
:rules="validate('postcode.code')"
clearable
/>
<VnSelectDialog
:label="t('City')"
url="Towns/location"
@update:model-value="(value) => setTown(value, data)"
:tooltip="t('Create city')"
v-model="data.townFk"
:options="townsOptions"
option-label="name"
option-value="id"
:rules="validate('postcode.city')"
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
:emit-value="false"
:clearable="true"
clearable
>
<template #option="{ itemProps, opt }">
<QItem v-bind="itemProps">
@ -197,9 +122,6 @@ async function handleCountries(data) {
</template>
<template #form>
<CreateNewCityForm
:country-fk="data.countryFk"
:province-selected="data.provinceFk"
:provinces="provincesOptions"
@on-data-saved="
(_, requestResponse) =>
onCityCreated(requestResponse, data)
@ -210,13 +132,8 @@ async function handleCountries(data) {
</VnRow>
<VnRow>
<VnSelectProvince
:country-fk="data.countryFk"
:province-selected="data.provinceFk"
@update:model-value="(value) => setProvince(value, data)"
v-model="data.provinceFk"
:clearable="true"
:provinces="provincesOptions"
@on-province-created="onProvinceCreated"
/>
<VnSelect
:label="t('Country')"
@ -235,7 +152,6 @@ async function handleCountries(data) {
<i18n>
es:
New postcode: Nuevo código postal
Create city: Crear población
Please, ensure you put the correct data!: ¡Por favor, asegúrese de poner los datos correctos!
City: Población
Province: Provincia

View File

@ -16,16 +16,7 @@ const provinceFormData = reactive({
name: null,
autonomyFk: null,
});
const $props = defineProps({
countryFk: {
type: Number,
default: null,
},
provinces: {
type: Array,
default: () => [],
},
});
const autonomiesOptions = ref([]);
const onDataSaved = (dataSaved, requestResponse) => {
@ -40,14 +31,7 @@ const onDataSaved = (dataSaved, requestResponse) => {
<FetchData
@on-fetch="(data) => (autonomiesOptions = data)"
auto-load
:filter="{
where: {
countryFk: $props.countryFk,
},
}"
url="Autonomies/location"
:sort-by="['name ASC']"
:limit="30"
/>
<FormModelPopup
:title="t('New province')"

View File

@ -50,7 +50,7 @@ const onDataSaved = (dataSaved) => {
model="thermograph"
:title="t('New thermograph')"
:form-initial-data="thermographFormData"
@on-data-saved="(_, response) => onDataSaved(response)"
@on-data-saved="onDataSaved($event)"
>
<template #form-inputs="{ data, validate }">
<VnRow>

View File

@ -234,8 +234,6 @@ async function remove(data) {
newData = newData.filter((form) => !ids.some((id) => id == form[pk]));
fetch(newData);
});
} else {
reset();
}
emit('update:selected', []);
}

View File

@ -25,7 +25,7 @@ const $props = defineProps({
},
limit: {
type: [String, Number],
default: '',
default: '30',
},
params: {
type: Object,

View File

@ -217,6 +217,9 @@ async function save() {
updateAndEmit('onDataSaved', formData.value, response?.data);
if ($props.reload) await arrayData.fetch({});
hasChanges.value = false;
} catch (err) {
console.error(err);
notify('errors.writeRequest', 'negative');
} finally {
isLoading.value = false;
}

View File

@ -61,7 +61,6 @@ defineExpose({
:loading="isLoading"
@click="emit('onDataCanceled')"
v-close-popup
data-cy="FormModelPopup_cancel"
/>
<QBtn
:label="t('globals.save')"
@ -71,7 +70,6 @@ defineExpose({
class="q-ml-sm"
:disabled="isLoading"
:loading="isLoading"
data-cy="FormModelPopup_save"
/>
</div>
</template>

View File

@ -44,6 +44,7 @@ const itemComputed = computed(() => {
</QItemSection>
</QItem>
</template>
<style lang="scss" scoped>
.q-item {
min-height: 5vh;

View File

@ -3,7 +3,6 @@ import { onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useState } from 'src/composables/useState';
import { useStateStore } from 'stores/useStateStore';
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
import { useQuasar } from 'quasar';
import PinnedModules from './PinnedModules.vue';
import UserPanel from 'components/UserPanel.vue';
@ -13,7 +12,6 @@ import VnAvatar from './ui/VnAvatar.vue';
const { t } = useI18n();
const stateStore = useStateStore();
const quasar = useQuasar();
const stateQuery = useStateQueryStore();
const state = useState();
const user = state.getUser();
const appName = 'Lilium';
@ -52,14 +50,6 @@ const pinnedModulesRef = ref();
</QBtn>
</RouterLink>
<VnBreadcrumbs v-if="$q.screen.gt.sm" />
<QSpinner
color="primary"
class="q-ml-md"
:class="{
'no-visible': !stateQuery.isLoading().value,
}"
size="xs"
/>
<QSpace />
<div id="searchbar" class="searchbar"></div>
<QSpace />

View File

@ -24,9 +24,9 @@ const { notify } = useNotify();
const rectificativeTypeOptions = ref([]);
const siiTypeInvoiceOutsOptions = ref([]);
const inheritWarehouse = ref(true);
const invoiceParams = reactive({
id: $props.invoiceOutData?.id,
inheritWarehouse: true,
});
const invoiceCorrectionTypesOptions = ref([]);
@ -138,7 +138,7 @@ const refund = async () => {
<div>
<QCheckbox
:label="t('Inherit warehouse')"
v-model="invoiceParams.inheritWarehouse"
v-model="inheritWarehouse"
/>
<QIcon name="info" class="cursor-info q-ml-sm" size="sm">
<QTooltip>{{ t('Inherit warehouse tooltip') }}</QTooltip>

View File

@ -13,14 +13,12 @@ import FetchData from 'components/FetchData.vue';
import { useClipboard } from 'src/composables/useClipboard';
import { useRole } from 'src/composables/useRole';
import VnAvatar from './ui/VnAvatar.vue';
import useNotify from 'src/composables/useNotify';
const state = useState();
const session = useSession();
const router = useRouter();
const { t, locale } = useI18n();
const { copyText } = useClipboard();
const { notify } = useNotify();
const userLocale = computed({
get() {
@ -55,7 +53,6 @@ const user = state.getUser();
const warehousesData = ref();
const companiesData = ref();
const accountBankData = ref();
const isEmployee = computed(() => useRole().isEmployee());
onMounted(async () => {
updatePreferences();
@ -73,28 +70,18 @@ function updatePreferences() {
async function saveDarkMode(value) {
const query = `/UserConfigs/${user.value.id}`;
try {
await axios.patch(query, {
darkMode: value,
});
user.value.darkMode = value;
onDataSaved();
} catch (error) {
onDataError();
}
await axios.patch(query, {
darkMode: value,
});
user.value.darkMode = value;
}
async function saveLanguage(value) {
const query = `/VnUsers/${user.value.id}`;
try {
await axios.patch(query, {
lang: value,
});
user.value.lang = value;
onDataSaved();
} catch (error) {
onDataError();
}
await axios.patch(query, {
lang: value,
});
user.value.lang = value;
}
function logout() {
@ -110,23 +97,11 @@ function localUserData() {
state.setUser(user.value);
}
async function saveUserData(param, value) {
try {
await axios.post('UserConfigs/setUserConfig', { [param]: value });
localUserData();
onDataSaved();
} catch (error) {
onDataError();
}
function saveUserData(param, value) {
axios.post('UserConfigs/setUserConfig', { [param]: value });
localUserData();
}
const onDataSaved = () => {
notify('globals.dataSaved', 'positive');
};
const onDataError = () => {
notify('errors.updateUserConfig', 'negative');
};
const isEmployee = computed(() => useRole().isEmployee());
</script>
<template>

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';
@ -8,55 +8,33 @@ import FetchData from 'components/FetchData.vue';
import CreateNewProvinceForm from './CreateNewProvinceForm.vue';
const emit = defineEmits(['onProvinceCreated']);
const $props = defineProps({
countryFk: {
type: Number,
default: null,
},
provinceSelected: {
type: Number,
default: null,
},
provinces: {
type: Array,
default: () => [],
},
});
const provinceFk = defineModel({ type: Number, default: null });
const provinceFk = defineModel({ type: Number });
watch(provinceFk, async () => await provincesFetchDataRef.value.fetch());
const { validate } = useValidator();
const { t } = useI18n();
const provincesOptions = ref($props.provinces);
provinceFk.value = $props.provinceSelected;
const provincesOptions = ref();
const provincesFetchDataRef = ref();
async function onProvinceCreated(_, data) {
await provincesFetchDataRef.value.fetch({ where: { countryFk: $props.countryFk } });
await provincesFetchDataRef.value.fetch();
provinceFk.value = data.id;
emit('onProvinceCreated', data);
}
async function handleProvinces(data) {
provincesOptions.value = data;
}
</script>
<template>
<FetchData
ref="provincesFetchDataRef"
:filter="{
include: { relation: 'country' },
where: {
countryFk: $props.countryFk,
},
}"
@on-fetch="handleProvinces"
:filter="{ include: { relation: 'country' } }"
@on-fetch="(data) => (provincesOptions = data)"
auto-load
url="Provinces"
/>
<VnSelectDialog
:label="t('Province')"
:options="$props.provinces"
:tooltip="t('Create province')"
:options="provincesOptions"
hide-selected
v-model="provinceFk"
:rules="validate && validate('postcode.provinceFk')"
@ -71,15 +49,11 @@ async function handleProvinces(data) {
</QItem>
</template>
<template #form>
<CreateNewProvinceForm
:country-fk="$props.countryFk"
@on-data-saved="onProvinceCreated"
/>
<CreateNewProvinceForm @on-data-saved="onProvinceCreated" />
</template>
</VnSelectDialog>
</template>
<i18n>
es:
Province: Provincia
Create province: Crear provincia
</i18n>

View File

@ -11,6 +11,8 @@ import VnInputNumber from 'components/common/VnInputNumber.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
import VnInputTime from 'components/common/VnInputTime.vue';
import VnComponent from 'components/common/VnComponent.vue';
import VnDescriptor from 'components/VnTable/VnDescriptor.vue';
import { QBtn } from 'quasar';
import VnUserLink from 'components/ui/VnUserLink.vue';
const model = defineModel(undefined, { required: true });
@ -128,6 +130,17 @@ const defaultComponents = {
icon: {
component: markRaw(QIcon),
},
descriptor: {
component: markRaw(VnDescriptor),
attrs: {
class: 'link',
flat: true,
dense: true,
},
forceAttrs: {
row: $props.row,
},
},
userLink: {
component: markRaw(VnUserLink),
},

View File

@ -0,0 +1,49 @@
<script setup>
import { useQuasar } from 'quasar';
const quasar = useQuasar();
import VnComponent from 'components/common/VnComponent.vue';
import { onMounted, ref } from 'vue';
import ItemDescriptor from 'src/pages/Item/Card/ItemDescriptor.vue';
const $props = defineProps({
label: {
type: Function,
required: true,
},
row: {
type: Object,
default: null,
},
proxy: {
type: Object,
default: null,
},
});
const btnRow = ref(null);
const popupVisible = ref(true);
const handleClick = (event) => {
event.preventDefault();
event.stopPropagation();
console.log(event);
popupVisible.value = true;
// quasar.dialog({
// component: $props.proxy.component,
// componentProps: {
// id: $props.row[$props.proxy.key],
// },
// });
};
onMounted(() => {
// btnRow.value = btnRow.value.$el;
});
</script>
<template>
<QBtn class="link" flat dense ref="btnRow" @click="handleClick"
>{{ $props.label($props.row) }}
</QBtn>
<!-- <VnComponent :id="row.itemFk" /> -->
<QPopupProxy :target="btnRow"> <ItemDescriptor :id="1" /></QPopupProxy>
</template>
<style lang="scss"></style>

View File

@ -10,6 +10,8 @@ import VnInputDate from 'components/common/VnInputDate.vue';
import VnInputTime from 'components/common/VnInputTime.vue';
import VnTableColumn from 'components/VnTable/VnColumn.vue';
defineExpose({ addFilter });
const $props = defineProps({
column: {
type: Object,
@ -28,9 +30,6 @@ const $props = defineProps({
default: 'params',
},
});
defineExpose({ addFilter, props: $props });
const model = defineModel(undefined, { required: true });
const arrayData = useArrayData($props.dataKey, { searchUrl: $props.searchUrl });
const columnFilter = computed(() => $props.column?.columnFilter);
@ -116,11 +115,11 @@ const components = {
rawSelect: selectComponent,
};
async function addFilter(value, name) {
async function addFilter(value) {
value ??= undefined;
if (value && typeof value === 'object') value = model.value;
value = value === '' ? undefined : value;
let field = columnFilter.value?.name ?? $props.column.name ?? name;
let field = columnFilter.value?.name ?? $props.column.name;
if (columnFilter.value?.inWhere) {
if (columnFilter.value.alias) field = columnFilter.value.alias + '.' + field;

View File

@ -10,7 +10,7 @@ import FormModelPopup from 'components/FormModelPopup.vue';
import VnFilterPanel from 'components/ui/VnFilterPanel.vue';
import VnTableColumn from 'components/VnTable/VnColumn.vue';
import VnFilter from 'components/VnTable/VnFilter.vue';
import VnTableFilter from 'components/VnTable/VnFilter.vue';
import VnTableChip from 'components/VnTable/VnChip.vue';
import VnVisibleColumn from 'src/components/VnTable/VnVisibleColumn.vue';
import VnLv from 'components/ui/VnLv.vue';
@ -53,10 +53,6 @@ const $props = defineProps({
type: Boolean,
default: true,
},
bottom: {
type: Object,
default: null,
},
cardClass: {
type: String,
default: 'flex-one',
@ -73,6 +69,7 @@ const $props = defineProps({
type: Boolean,
default: false,
},
hasSubToolbar: {
type: Boolean,
default: null,
@ -101,18 +98,10 @@ const $props = defineProps({
type: String,
default: '90vh',
},
chipLocale: {
type: String,
default: null,
},
footer: {
type: Boolean,
default: false,
},
disabledAttr: {
type: Boolean,
default: false,
},
});
const { t } = useI18n();
const stateStore = useStateStore();
@ -133,8 +122,6 @@ const showForm = ref(false);
const splittedColumns = ref({ columns: [] });
const columnsVisibilitySkipped = ref();
const createForm = ref();
const tableFilterRef = ref([]);
const tableRef = ref();
const tableModes = [
{
@ -237,7 +224,7 @@ function splitColumns(columns) {
if (col.cardVisible) splittedColumns.value.cardVisible.push(col);
if ($props.isEditable && col.disable == null) col.disable = false;
if ($props.useModel && col.columnFilter != false)
col.columnFilter = { inWhere: true, ...col.columnFilter };
col.columnFilter = { ...col.columnFilter, inWhere: true };
splittedColumns.value.columns.push(col);
}
// Status column
@ -316,20 +303,12 @@ defineExpose({
selected,
CrudModelRef,
params,
tableRef,
});
function handleOnDataSaved(_) {
if (_.onDataSaved) _.onDataSaved({ CrudModelRef: CrudModelRef.value });
if (_.onDataSaved) _.onDataSaved(this);
else $props.create.onDataSaved(_);
}
function handleScroll() {
const tMiddle = tableRef.value.$el.querySelector('.q-table__middle');
const { scrollHeight, scrollTop, clientHeight } = tMiddle;
const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 40;
if (isAtBottom) CrudModelRef.value.vnPaginateRef.paginate();
}
</script>
<template>
<QDrawer
@ -347,13 +326,6 @@ function handleScroll() {
:search-url="searchUrl"
:redirect="!!redirect"
@set-user-params="setUserParams"
:disable-submit-event="true"
@remove="
(key) =>
tableFilterRef
.find((f) => f.props?.column.name == key)
?.addFilter()
"
>
<template #body>
<div
@ -363,8 +335,7 @@ function handleScroll() {
)"
:key="col.id"
>
<VnFilter
ref="tableFilterRef"
<VnTableFilter
:column="col"
:data-key="$attrs['data-key']"
v-model="params[columnName(col)]"
@ -388,15 +359,10 @@ function handleScroll() {
:columns="splittedColumns.columns"
/>
</template>
<template #tags="{ tag, formatFn }" v-if="chipLocale">
<div class="q-gutter-x-xs">
<strong>{{ t(`${chipLocale}.${tag.label}`) }}: </strong>
<span>{{ formatFn(tag.value) }}</span>
</div>
</template>
</VnFilterPanel>
</QScrollArea>
</QDrawer>
<!-- class in div to fix warn-->
<CrudModel
v-bind="$attrs"
:class="$attrs['class'] ?? 'q-px-md'"
@ -414,10 +380,8 @@ function handleScroll() {
</template>
<template #body="{ rows }">
<QTable
ref="tableRef"
v-bind="table"
class="vnTable"
:class="{ 'last-row-sticky': $props.footer }"
:columns="splittedColumns.columns"
:rows="rows"
v-model:selected="selected"
@ -426,14 +390,25 @@ function handleScroll() {
card-container-class="grid-three"
flat
:style="isTableMode && `max-height: ${tableHeight}`"
:virtual-scroll="isTableMode"
@virtual-scroll="handleScroll"
:virtual-scroll="!isTableMode"
@virtual-scroll="
(event) =>
event.index > rows.length - 2 &&
($props.crudModel?.paginate ?? true) &&
CrudModelRef.vnPaginateRef.paginate()
"
@row-click="(_, row) => rowClickFunction && rowClickFunction(row)"
@update:selected="emit('update:selected', $event)"
>
<template #top-left v-if="!$props.withoutHeader">
<slot name="top-left"></slot>
</template>
<template #body-selection="props">
<slot name="body-selection" v-bind="props">
<QCheckbox class="q-ma-xs" v-model="props.selected"></QCheckbox>
</slot>
</template>
<template #top-right v-if="!$props.withoutHeader">
<VnVisibleColumn
v-if="isTableMode"
@ -457,11 +432,7 @@ function handleScroll() {
/>
</template>
<template #header-cell="{ col }">
<QTh
v-if="col.visible ?? true"
:style="col.headerStyle"
:class="col.headerClass"
>
<QTh v-if="col.visible ?? true">
<div
class="column self-start q-ml-xs ellipsis"
:class="`text-${col?.align ?? 'left'}`"
@ -477,7 +448,7 @@ function handleScroll() {
:search-url="searchUrl"
/>
</div>
<VnFilter
<VnTableFilter
v-if="$props.columnSearch"
:column="col"
:show-title="true"
@ -507,7 +478,6 @@ function handleScroll() {
auto-width
class="no-margin q-px-xs"
:class="[getColAlign(col), col.columnClass]"
:style="col.style"
v-if="col.visible ?? true"
@click.ctrl="
($event) =>
@ -536,7 +506,6 @@ function handleScroll() {
:class="getColAlign(col)"
class="sticky no-padding"
@click="stopEventPropagation($event)"
:style="col.style"
>
<QBtn
v-for="(btn, index) of col.actions"
@ -557,29 +526,6 @@ function handleScroll() {
/>
</QTd>
</template>
<template #bottom v-if="bottom">
<slot name="bottom-table">
<QBtn
@click="
() =>
createAsDialog
? (showForm = !showForm)
: handleOnDataSaved(create)
"
class="cursor-pointer fill-icon"
color="primary"
icon="add_circle"
size="md"
round
flat
shortcut="+"
:disabled="!disabledAttr"
/>
<QTooltip>
{{ createForm.title }}
</QTooltip>
</slot>
</template>
<template #item="{ row, colsMap }">
<component
:is="$props.redirect ? 'router-link' : 'span'"
@ -696,15 +642,17 @@ function handleScroll() {
</QCard>
</component>
</template>
<template #bottom-row="{ cols }" v-if="$props.footer">
<QTr v-if="rows.length" style="height: 30px">
<template #bottom-row="{ cols }" v-if="footer">
<QTr v-if="rows.length" class="bg-header" style="height: 30px">
<QTh
v-for="col of cols.filter((cols) => cols.visible ?? true)"
:key="col?.id"
class="text-center"
:class="getColAlign(col)"
>
<slot :name="`column-footer-${col.name}`" />
<slot
:name="`column-footer-${col.name}`"
:class="getColAlign(col)"
/>
</QTh>
</QTr>
</template>
@ -722,7 +670,7 @@ function handleScroll() {
icon="add"
shortcut="+"
/>
<QTooltip self="top right">
<QTooltip>
{{ createForm?.title }}
</QTooltip>
</QPageSticky>
@ -783,6 +731,16 @@ es:
color: var(--vn-text-color);
}
.q-table--dark .q-table__bottom,
.q-table--dark thead,
.q-table--dark tr {
border-color: var(--vn-section-color);
}
.q-table__container > div:first-child {
background-color: var(--vn-page-color);
}
.grid-three {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, max-content));
@ -821,7 +779,6 @@ es:
top: 0;
}
}
.vnTable {
thead tr th {
position: sticky;
@ -857,18 +814,6 @@ es:
background-color: var(--vn-section-color);
z-index: 1;
}
table tbody th {
position: relative;
}
}
.last-row-sticky {
tbody:nth-last-child(1) {
@extend .bg-header;
position: sticky;
z-index: 2;
bottom: 0;
}
}
.vn-label-value {
@ -914,12 +859,4 @@ es:
cursor: text;
user-select: all;
}
.q-table__container {
background-color: transparent;
}
.q-table__middle.q-virtual-scroll.q-virtual-scroll--vertical.scroll {
background-color: var(--vn-section-color);
}
</style>

View File

@ -1,19 +0,0 @@
<script setup>
import VnSelect from './VnSelect.vue';
defineProps({
selectProps: { type: Object, required: true },
promise: { type: Function, default: () => {} },
});
</script>
<template>
<QBtnDropdown v-bind="$attrs" color="primary">
<VnSelect
v-bind="selectProps"
hide-selected
hide-dropdown-icon
focus-on-mount
@update:model-value="promise"
/>
</QBtnDropdown>
</template>

View File

@ -1,136 +0,0 @@
<script setup>
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import VnRow from '../ui/VnRow.vue';
import VnInput from './VnInput.vue';
import FetchData from '../FetchData.vue';
import useNotify from 'src/composables/useNotify';
const props = defineProps({
submitFn: { type: Function, default: () => {} },
askOldPass: { type: Boolean, default: false },
});
const emit = defineEmits(['onSubmit']);
const { t } = useI18n();
const { notify } = useNotify();
const form = ref();
const changePassDialog = ref();
const passwords = ref({ newPassword: null, repeatPassword: null });
const requirements = ref([]);
const isLoading = ref(false);
const validate = async () => {
const { newPassword, repeatPassword, oldPassword } = passwords.value;
if (!newPassword) {
notify(t('You must enter a new password'), 'negative');
return;
}
if (newPassword !== repeatPassword) {
notify(t("Passwords don't match"), 'negative');
return;
}
try {
isLoading.value = true;
await props.submitFn(newPassword, oldPassword);
emit('onSubmit');
} catch (e) {
notify('errors.writeRequest', 'negative');
} finally {
changePassDialog.value.hide();
isLoading.value = false;
}
};
defineExpose({ show: () => changePassDialog.value.show() });
</script>
<template>
<FetchData
url="UserPasswords/findOne"
auto-load
@on-fetch="(data) => (requirements = data)"
/>
<QDialog ref="changePassDialog">
<QCard style="width: 350px">
<QCardSection>
<slot name="header">
<VnRow class="items-center" style="flex-direction: row">
<span class="text-h6" v-text="t('globals.changePass')" />
<QIcon
class="cursor-pointer"
name="close"
size="xs"
style="flex: 0"
v-close-popup
/>
</VnRow>
</slot>
</QCardSection>
<QForm ref="form">
<QCardSection>
<VnInput
v-if="props.askOldPass"
:label="t('Old password')"
v-model="passwords.oldPassword"
type="password"
:required="true"
autofocus
/>
<VnInput
:label="t('New password')"
v-model="passwords.newPassword"
type="password"
:required="true"
:info="
t('passwordRequirements', {
length: requirements.length,
nAlpha: requirements.nAlpha,
nUpper: requirements.nUpper,
nDigits: requirements.nDigits,
nPunct: requirements.nPunct,
})
"
autofocus
/>
<VnInput
:label="t('Repeat password')"
v-model="passwords.repeatPassword"
type="password"
/>
</QCardSection>
</QForm>
<QCardActions>
<slot name="actions">
<QBtn
:disabled="isLoading"
:loading="isLoading"
:label="t('globals.cancel')"
class="q-ml-sm"
color="primary"
flat
type="reset"
v-close-popup
/>
<QBtn
:disabled="isLoading"
:loading="isLoading"
:label="t('globals.confirm')"
color="primary"
@click="validate"
/>
</slot>
</QCardActions>
</QCard>
</QDialog>
</template>
<i18n>
es:
New password: Nueva contraseña
Repeat password: Repetir contraseña
You must enter a new password: Debes introducir la nueva contraseña
Passwords don't match: Las contraseñas no coinciden
</i18n>

View File

@ -1,29 +0,0 @@
<script setup>
const model = defineModel({ type: [String, Number], required: true });
</script>
<template>
<QDate v-model="model" :today-btn="true" :options="$attrs.options" />
</template>
<style lang="scss" scoped>
.q-date {
width: 245px;
min-width: unset;
:deep(.q-date__calendar) {
padding-bottom: 0;
}
:deep(.q-date__view) {
min-height: 245px;
padding: 8px;
}
:deep(.q-date__calendar-days-container) {
min-height: 160px;
height: unset;
}
:deep(.q-date__header) {
padding: 2px 2px 5px 12px;
height: 60px;
}
}
</style>

View File

@ -103,7 +103,6 @@ const mixinRules = [
@click="
() => {
value = null;
vnInputRef.focus();
emit('remove');
}
"

View File

@ -3,7 +3,6 @@ import { onMounted, watch, computed, ref } from 'vue';
import { date } from 'quasar';
import { useI18n } from 'vue-i18n';
import { useAttrs } from 'vue';
import VnDate from './VnDate.vue';
const model = defineModel({ type: [String, Date] });
const $props = defineProps({
@ -21,7 +20,6 @@ const { validations } = useValidator();
const { t } = useI18n();
const requiredFieldRule = (val) => validations().required($attrs.required, val);
const vnInputDateRef = ref(null);
const dateFormat = 'DD/MM/YYYY';
const isPopupOpen = ref();
@ -86,19 +84,17 @@ const styleAttrs = computed(() => {
outlined: true,
rounded: true,
}
: {};
: { eventColor: handleEventColor };
});
const manageDate = (date) => {
formattedDate.value = date;
isPopupOpen.value = false;
const handleEventColor = (date) => {
console.error(date);
return date === Date.now() ? null : 'orange';
};
</script>
<template>
<div @mouseover="hover = true" @mouseleave="hover = false">
<QInput
ref="vnInputDateRef"
v-model="formattedDate"
class="vn-input-date"
:mask="mask"
@ -121,7 +117,6 @@ const manageDate = (date) => {
!$attrs.disable
"
@click="
vnInputDateRef.focus();
model = null;
isPopupOpen = false;
"
@ -135,7 +130,6 @@ const manageDate = (date) => {
/>
</template>
<QMenu
v-if="$q.screen.gt.xs"
transition-show="scale"
transition-hide="scale"
v-model="isPopupOpen"
@ -144,11 +138,23 @@ const manageDate = (date) => {
:no-focus="true"
:no-parent-event="true"
>
<VnDate v-model="popupDate" @update:model-value="manageDate" />
<QDate
v-model="popupDate"
:landscape="true"
:today-btn="true"
:options="$attrs.options"
color="orange"
text-color="black"
dark
bordered
@update:model-value="
(date) => {
formattedDate = date;
isPopupOpen = false;
}
"
/>
</QMenu>
<QDialog v-else v-model="isPopupOpen">
<VnDate v-model="popupDate" @update:model-value="manageDate" />
</QDialog>
</QInput>
</div>
</template>
@ -160,6 +166,12 @@ const manageDate = (date) => {
.vn-input-date.q-field--outlined.q-field--readonly .q-field__control:before {
border-style: solid;
}
.calendar-event {
background-color: red;
&.--today {
border: 2px solid $info;
}
}
</style>
<i18n>
es:

View File

@ -3,8 +3,6 @@ import { computed, ref, useAttrs } from 'vue';
import { useI18n } from 'vue-i18n';
import { date } from 'quasar';
import { useValidator } from 'src/composables/useValidator';
import VnTime from './VnTime.vue';
const { validations } = useValidator();
const $attrs = useAttrs();
const model = defineModel({ type: String });
@ -18,7 +16,6 @@ const props = defineProps({
default: false,
},
});
const vnInputTimeRef = ref(null);
const initialDate = ref(model.value ?? Date.vnNew());
const { t } = useI18n();
const requiredFieldRule = (val) => validations().required($attrs.required, val);
@ -72,7 +69,6 @@ function dateToTime(newDate) {
<template>
<div @mouseover="hover = true" @mouseleave="hover = false">
<QInput
ref="vnInputTimeRef"
class="vn-input-time"
mask="##:##"
placeholder="--:--"
@ -96,7 +92,6 @@ function dateToTime(newDate) {
!$attrs.disable
"
@click="
vnInputTimeRef.focus();
model = null;
isPopupOpen = false;
"
@ -109,7 +104,6 @@ function dateToTime(newDate) {
/>
</template>
<QMenu
v-if="$q.screen.gt.xs"
transition-show="scale"
transition-hide="scale"
v-model="isPopupOpen"
@ -118,11 +112,8 @@ function dateToTime(newDate) {
:no-focus="true"
:no-parent-event="true"
>
<VnTime v-model="formattedTime" />
<QTime v-model="formattedTime" mask="HH:mm" landscape now-btn />
</QMenu>
<QDialog v-else v-model="isPopupOpen">
<VnTime v-model="formattedTime" />
</QDialog>
</QInput>
</div>
</template>

View File

@ -12,46 +12,14 @@ const props = defineProps({
default: null,
},
});
const locationProperties = [
'postcode',
(obj) =>
obj.city
? `${obj.city}${obj.province?.name ? `(${obj.province.name})` : ''}`
: null,
(obj) => obj.country?.name,
];
const formatLocation = (obj, properties) => {
const parts = properties.map((prop) => {
if (typeof prop === 'string') {
return obj[prop];
} else if (typeof prop === 'function') {
return prop(obj);
}
return null;
});
const filteredParts = parts.filter(
(part) => part !== null && part !== undefined && part !== ''
);
return filteredParts.join(', ');
};
const modelValue = ref(
props.location ? formatLocation(props.location, locationProperties) : null
props.location
? `${props.location?.postcode}, ${props.location?.city}(${props.location?.province?.name}), ${props.location?.country?.name}`
: null
);
function showLabel(data) {
const dataProperties = [
'code',
(obj) => (obj.town ? `${obj.town}(${obj.province})` : null),
'country',
];
return formatLocation(data, dataProperties);
return `${data.code}, ${data.town}(${data.province}), ${data.country}`;
}
const handleModelValue = (data) => {
emit('update:model-value', data);
};
@ -73,7 +41,6 @@ const handleModelValue = (data) => {
v-bind="$attrs"
clearable
:emit-value="false"
:tooltip="t('Create new location')"
>
<template #form>
<CreateNewPostcode
@ -106,9 +73,7 @@ const handleModelValue = (data) => {
<i18n>
en:
search_by_postalcode: Search by postalcode, town, province or country
Create new location: Create new location
es:
Location: Ubicación
Create new location: Crear nueva ubicación
search_by_postalcode: Buscar por código postal, ciudad o país
</i18n>

View File

@ -406,7 +406,6 @@ watch(
:skeleton="false"
auto-load
@on-fetch="setLogTree"
search-url="logs"
>
<template #body>
<div

View File

@ -9,6 +9,10 @@ const $props = defineProps({
type: Number, //Progress value (1.0 > x > 0.0)
required: true,
},
showDialog: {
type: Boolean,
required: true,
},
cancelled: {
type: Boolean,
required: false,
@ -20,22 +24,30 @@ const emit = defineEmits(['cancel', 'close']);
const dialogRef = ref(null);
const showDialog = defineModel('showDialog', {
type: Boolean,
default: false,
const _showDialog = computed({
get: () => $props.showDialog,
set: (value) => {
if (value) dialogRef.value.show();
},
});
const _progress = computed(() => $props.progress);
const progressLabel = computed(() => `${Math.round($props.progress * 100)}%`);
const cancel = () => {
dialogRef.value.hide();
emit('cancel');
};
</script>
<template>
<QDialog ref="dialogRef" v-model="showDialog" @hide="emit('close')">
<QDialog ref="dialogRef" v-model="_showDialog" @hide="onDialogHide">
<QCard class="full-width dialog">
<QCardSection class="row">
<span class="text-h6">{{ t('Progress') }}</span>
<QSpace />
<QBtn icon="close" flat round dense v-close-popup />
<QBtn icon="close" flat round dense @click="emit('close')" />
</QCardSection>
<QCardSection>
<div class="column">
@ -68,7 +80,7 @@ const progressLabel = computed(() => `${Math.round($props.progress * 100)}%`);
type="button"
flat
class="text-primary"
v-close-popup
@click="cancel()"
>
{{ t('globals.cancel') }}
</QBtn>

View File

@ -66,6 +66,10 @@ const $props = defineProps({
type: String,
default: null,
},
orderBy: {
type: String,
default: null,
},
limit: {
type: [Number, String],
default: '30',
@ -141,7 +145,6 @@ function findKeyInOptions() {
function setOptions(data) {
myOptions.value = JSON.parse(JSON.stringify(data));
myOptionsOriginal.value = JSON.parse(JSON.stringify(data));
emit('update:options', data);
}
function filter(val, options) {
@ -228,8 +231,6 @@ function nullishToTrue(value) {
}
const getVal = (val) => ($props.useLike ? { like: `%${val}%` } : val);
defineExpose({ opts: myOptions });
</script>
<template>

View File

@ -1,5 +1,5 @@
<script setup>
import { computed } from 'vue';
import { ref, computed } from 'vue';
import { useRole } from 'src/composables/useRole';
import { useAcl } from 'src/composables/useAcl';

View File

@ -1,16 +0,0 @@
<script setup>
const model = defineModel({ type: [String, Number], required: true });
</script>
<template>
<QTime v-model="model" now-btn mask="HH:mm" />
</template>
<style lang="scss" scoped>
.q-time {
width: 230px;
min-width: unset;
:deep(.q-time__header) {
min-height: unset;
height: 50px;
}
}
</style>

View File

@ -47,7 +47,6 @@ let store;
let entity;
const isLoading = ref(false);
const isSameDataKey = computed(() => $props.dataKey === route.meta.moduleName);
const menuRef = ref();
defineExpose({ getData });
onBeforeMount(async () => {
@ -171,7 +170,7 @@ const toModule = computed(() =>
<QTooltip>
{{ t('components.cardDescriptor.moreOptions') }}
</QTooltip>
<QMenu :ref="menuRef">
<QMenu ref="menuRef">
<QList>
<slot name="menu" :entity="entity" :menu-ref="menuRef" />
</QList>

View File

@ -31,7 +31,7 @@ const dialog = ref(null);
<div class="container order-catalog-item overflow-hidden">
<QCard class="card shadow-6">
<div class="img-wrapper">
<VnImg :id="item.id" class="image" zoom-resolution="1600x900" />
<VnImg :id="item.id" class="image" />
<div v-if="item.hex && isCatalog" class="item-color-container">
<div
class="item-color"

View File

@ -55,7 +55,7 @@ async function confirm() {
}
</script>
<template>
<QDialog ref="dialogRef">
<QDialog ref="dialogRef" persistent>
<QCard class="q-pa-sm">
<QCardSection class="row items-center q-pb-none">
<QAvatar
@ -70,7 +70,7 @@ async function confirm() {
<QBtn icon="close" :disable="isLoading" flat round dense v-close-popup />
</QCardSection>
<QCardSection class="q-pb-none">
<span v-if="message !== false" v-html="message" />
<span id="spanHTML" v-if="message !== false" v-html="message" />
</QCardSection>
<QCardSection class="row items-center q-pt-none">
<slot name="customHTML"></slot>

View File

@ -3,6 +3,7 @@ import { onMounted, ref, computed, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useArrayData } from 'composables/useArrayData';
import { useRoute } from 'vue-router';
import { date } from 'quasar';
import toDate from 'filters/toDate';
import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue';
@ -58,6 +59,7 @@ const $props = defineProps({
});
defineExpose({ search, sanitizer });
const emit = defineEmits([
'update:modelValue',
'refresh',
@ -185,6 +187,7 @@ async function remove(key) {
}
function formatValue(value) {
if (value instanceof Date) return date.formatDate(value, 'DD/MM/YYYY');
if (typeof value === 'boolean') return value ? t('Yes') : t('No');
if (isNaN(value) && !isNaN(Date.parse(value))) return toDate(value);
@ -211,7 +214,7 @@ function sanitizer(params) {
icon="search"
@click="search()"
></QBtn>
<QForm @submit="search" id="filterPanelForm" @keyup.enter="search()">
<QForm @submit="search" id="filterPanelForm">
<QList dense>
<QItem class="q-mt-xs">
<QItemSection top>

View File

@ -58,7 +58,7 @@ defineExpose({
:class="{ zoomIn: zoom }"
:src="getUrl()"
v-bind="$attrs"
@click.stop="show = $props.zoom"
@click.stop="show = $props.zoom ? true : false"
spinner-color="primary"
/>
<QDialog v-if="$props.zoom" v-model="show">
@ -85,4 +85,8 @@ defineExpose({
.img_zoom {
border-radius: 0%;
}
.image-wrapper {
height: 50px;
width: 50px;
}
</style>

View File

@ -88,4 +88,15 @@ const val = computed(() => $props.value);
:deep(.q-checkbox.disabled) {
opacity: 1 !important;
}
.image {
display: flex;
flex-direction: row;
align-content: center;
align-items: center;
justify-content: flex-start;
& > .q-btn .value {
text-transform: uppercase;
}
}
</style>

View File

@ -1,6 +1,6 @@
<script setup>
import axios from 'axios';
import { ref, reactive } from 'vue';
import { ref } from 'vue';
import { onBeforeRouteLeave } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
@ -12,40 +12,36 @@ import VnPaginate from 'components/ui/VnPaginate.vue';
import VnUserLink from 'components/ui/VnUserLink.vue';
import VnConfirm from 'components/ui/VnConfirm.vue';
import VnAvatar from 'components/ui/VnAvatar.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnSelect from 'components/common/VnSelect.vue';
import FetchData from 'components/FetchData.vue';
import VnInput from 'components/common/VnInput.vue';
const $props = defineProps({
url: { type: String, default: null },
filter: { type: Object, default: () => {} },
body: { type: Object, default: () => {} },
addNote: { type: Boolean, default: false },
selectType: { type: Boolean, default: false },
});
const { t } = useI18n();
const state = useState();
const quasar = useQuasar();
const currentUser = ref(state.getUser());
const newNote = reactive({ text: null, observationTypeFk: null });
const observationTypes = ref([]);
const newNote = ref('');
const vnPaginateRef = ref();
function handleKeyUp(event) {
if (event.key === 'Enter') {
event.preventDefault();
if (!event.shiftKey) insert();
}
}
async function insert() {
if (!newNote.text || ($props.selectType && !newNote.observationTypeFk)) return;
const body = $props.body;
const newBody = {
...body,
...{ text: newNote.text, observationTypeFk: newNote.observationTypeFk },
};
const newBody = { ...body, ...{ text: newNote.value } };
await axios.post($props.url, newBody);
await vnPaginateRef.value.fetch();
newNote.value = '';
}
onBeforeRouteLeave((to, from, next) => {
if (newNote.text)
if (newNote.value)
quasar.dialog({
component: VnConfirm,
componentProps: {
@ -58,13 +54,6 @@ onBeforeRouteLeave((to, from, next) => {
});
</script>
<template>
<FetchData
v-if="selectType"
url="ObservationTypes"
:filter="{ fields: ['id', 'description'] }"
auto-load
@on-fetch="(data) => (observationTypes = data)"
/>
<QCard class="q-pa-xs q-mb-xl full-width" v-if="$props.addNote">
<QCardSection horizontal>
<VnAvatar :worker-id="currentUser.id" size="md" />
@ -73,42 +62,29 @@ onBeforeRouteLeave((to, from, next) => {
{{ t('globals.now') }}
</div>
</QCardSection>
<QCardSection class="q-px-xs q-my-none q-py-none">
<VnRow class="full-width">
<VnSelect
:label="t('Observation type')"
v-if="selectType"
url="ObservationTypes"
v-model="newNote.observationTypeFk"
option-label="description"
style="flex: 0.15"
:required="true"
@keyup.enter.stop="insert"
/>
<VnInput
v-model.trim="newNote.text"
type="textarea"
:label="t('Add note here...')"
filled
size="lg"
autogrow
@keyup.enter.stop="insert"
clearable
:required="true"
>
<template #append>
<QBtn
:title="t('Save (Enter)')"
icon="save"
color="primary"
flat
@click="insert"
class="q-mb-xs"
dense
/>
</template>
</VnInput>
</VnRow>
<QCardSection class="q-pa-xs q-my-none q-py-none" horizontal>
<QInput
v-model="newNote"
class="full-width"
type="textarea"
:label="t('Add note here...')"
filled
size="lg"
autogrow
autofocus
@keyup="handleKeyUp"
clearable
>
<template #append>
<QBtn
:title="t('Save (Enter)')"
icon="save"
color="primary"
flat
@click="insert"
/>
</template>
</QInput>
</QCardSection>
</QCard>
<VnPaginate
@ -122,10 +98,6 @@ onBeforeRouteLeave((to, from, next) => {
class="show"
v-bind="$attrs"
search-url="notes"
@on-fetch="
newNote.text = '';
newNote.observationTypeFk = null;
"
>
<template #body="{ rows }">
<TransitionGroup name="list" tag="div" class="column items-center full-width">
@ -139,28 +111,13 @@ onBeforeRouteLeave((to, from, next) => {
:descriptor="false"
:worker-id="note.workerFk"
size="md"
:title="note.worker?.user.nickname"
/>
<div class="full-width row justify-between q-pa-xs">
<div>
<VnUserLink
:name="`${note.worker.user.nickname}`"
:worker-id="note.worker.id"
/>
<QBadge
class="q-ml-xs"
outline
color="grey"
v-if="selectType && note.observationTypeFk"
>
{{
observationTypes.find(
(ot) => ot.id === note.observationTypeFk
)?.description
}}
</QBadge>
</div>
<span v-text="toDateHourMin(note.created)" />
<VnUserLink
:name="`${note.worker.user.nickname}`"
:worker-id="note.worker.id"
/>
{{ toDateHourMin(note.created) }}
</div>
</QCardSection>
<QCardSection class="q-pa-xs q-my-none q-py-none">
@ -174,6 +131,12 @@ onBeforeRouteLeave((to, from, next) => {
<style lang="scss" scoped>
.q-card {
width: 90%;
@media (max-width: $breakpoint-sm) {
width: 100%;
}
&__section {
word-wrap: break-word;
}
}
.q-dialog .q-card {
width: 400px;
@ -187,28 +150,11 @@ onBeforeRouteLeave((to, from, next) => {
opacity: 0;
background-color: $primary;
}
.vn-row > :nth-child(2) {
margin-left: 0;
}
@media (max-width: $breakpoint-xs) {
.vn-row > :deep(*) {
margin-left: 0;
}
.q-card {
width: 100%;
&__section {
padding: 0;
}
}
}
</style>
<i18n>
es:
Add note here...: Añadir nota aquí...
New note: Nueva nota
Save (Enter): Guardar (Intro)
Observation type: Tipo de observación
</i18n>

View File

@ -6,6 +6,10 @@ import { useArrayData } from 'composables/useArrayData';
const { t } = useI18n();
const props = defineProps({
append: {
type: Boolean,
default: true,
},
dataKey: {
type: String,
required: true,
@ -56,7 +60,7 @@ const props = defineProps({
},
offset: {
type: Number,
default: undefined,
default: 0,
},
skeleton: {
type: Boolean,
@ -119,9 +123,10 @@ watch(
);
watch(
() => [props.url, props.filter],
([url, filter]) => mounted.value && fetch({ url, filter })
() => [props.url, props.filter, props.userParams],
([url, filter, userParams]) => mounted.value && fetch({ url, filter, userParams })
);
const addFilter = async (filter, params) => {
await arrayData.addFilter({ filter, params });
};
@ -181,7 +186,7 @@ defineExpose({ fetch, addFilter, paginate });
</script>
<template>
<div class="full-width">
<div v-if="append" class="full-width">
<div
v-if="!props.autoLoad && !store.data && !isLoading"
class="info-row q-pa-md text-center"

View File

@ -108,7 +108,6 @@ async function search() {
...Object.fromEntries(staticParams),
search: searchText.value,
},
...{ filter: props.filter },
};
if (props.whereFilter) {

View File

@ -0,0 +1,42 @@
<!-- src/components/StockValueDisplay.vue -->
<template>
<span :class="valueClass">
<QIcon :name="iconName" size="sm" class="value-icon" />
{{ formattedValue }}
</span>
</template>
<script setup>
import { computed } from 'vue';
import { useQuasar } from 'quasar';
const props = defineProps({
value: {
type: Number,
required: true,
},
});
const valueClass = computed(() =>
props.value === 0 ? 'neutral' : props.value > 0 ? 'positive' : 'negative'
);
const iconName = computed(() =>
props.value === 0 ? 'equal' : props.value > 0 ? 'arrow_upward' : 'arrow_downward'
);
const formattedValue = computed(() => props.value);
</script>
<style scoped>
.positive {
color: green;
}
.negative {
color: red;
}
.neutral {
color: orange;
}
.value-icon {
margin-right: 4px;
}
</style>

View File

@ -1,33 +0,0 @@
<script setup>
import { useRoute } from 'vue-router';
import { defineProps } from 'vue';
const props = defineProps({
routeName: {
type: String,
required: true,
},
entityId: {
type: [String, Number],
required: true,
},
url: {
type: String,
default: null,
},
});
const route = useRoute();
const id = props.entityId;
</script>
<template>
<router-link
v-if="route?.name !== routeName"
:to="{ name: routeName, params: { id: id } }"
class="header link"
:href="url"
>
<QIcon name="open_in_new" color="white" size="sm" />
</router-link>
</template>

View File

@ -1,55 +0,0 @@
<script setup>
import { defineProps, ref } from 'vue';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const props = defineProps({
usesMana: {
type: Boolean,
required: true,
},
manaCode: {
type: String,
required: true,
},
manaVal: {
type: String,
default: 'mana',
},
manaLabel: {
type: String,
default: 'Promotion mana',
},
manaClaimVal: {
type: String,
default: 'manaClaim',
},
claimLabel: {
type: String,
default: 'Claim mana',
},
});
const manaCode = ref(props.manaCode);
</script>
<template>
<div class="column q-gutter-y-sm q-mt-sm">
<QRadio
v-model="manaCode"
dense
:val="manaVal"
:label="t(manaLabel)"
:dark="true"
class="q-mb-sm"
/>
<QRadio
v-model="manaCode"
dense
:val="manaClaimVal"
:label="t(claimLabel)"
:dark="true"
class="q-mb-sm"
/>
</div>
</template>

View File

@ -26,8 +26,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
const params = JSON.parse(query[searchUrl]);
const filter = params?.filter && JSON.parse(params?.filter ?? '{}');
delete params.filter;
store.userParams = { ...store.userParams, ...params };
store.userParams = { ...params, ...store.userParams };
store.userFilter = { ...filter, ...store.userFilter };
if (filter?.order) store.order = filter.order;
}
@ -114,7 +113,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
for (const row of response.data) store.data.push(row);
} else {
store.data = response.data;
if (!document.querySelectorAll('[role="dialog"][aria-modal="true"]').length)
if (!document.querySelectorAll('[role="dialog"]').length)
updateRouter && updateStateParams();
}

View File

@ -27,6 +27,15 @@ export function useRole() {
return false;
}
function likeAny(roles) {
const roleStore = state.getRoles();
for (const role of roles) {
if (!roleStore.value.findIndex((rs) => rs.startsWith(role)) !== -1)
return true;
}
return false;
}
function isEmployee() {
return hasAny(['employee']);
}
@ -35,6 +44,7 @@ export function useRole() {
isEmployee,
fetch,
hasAny,
likeAny,
state,
};
}

View File

@ -212,6 +212,16 @@ input::-webkit-inner-spin-button {
max-width: 100%;
}
.remove-bg {
filter: brightness(1.1);
mix-blend-mode: multiply;
}
.remove-bg {
filter: brightness(1.1);
mix-blend-mode: multiply;
}
.q-table__container {
/* ===== Scrollbar CSS ===== /
/ Firefox */
@ -288,7 +298,3 @@ input::-webkit-inner-spin-button {
color: $info;
}
}
.no-visible {
visibility: hidden;
}

View File

@ -13,7 +13,7 @@
// Tip: Use the "Theme Builder" on Quasar's documentation website.
// Tip: to add new colors https://quasar.dev/style/color-palette/#adding-your-own-colors
$primary: #ec8916;
$secondary: $primary;
$secondary: #89be34;
$positive: #c8e484;
$negative: #fb5252;
$info: #84d0e2;

View File

View File

@ -4,7 +4,7 @@ export default function toHour(date) {
if (!isValidDate(date)) {
return '--:--';
}
return new Date(date || '').toLocaleTimeString([], {
return (new Date(date || '')).toLocaleTimeString([], {
hour: '2-digit',
minute: '2-digit',
});

View File

@ -7,6 +7,7 @@ globals:
entity: Entity
user: User
details: Details
Preview: Preview
collapseMenu: Collapse left menu
backToDashboard: Return to dashboard
notifications: Notifications
@ -22,6 +23,7 @@ globals:
search: Search
changes: Changes
dataCreated: Data created
split: Split
add: Add
create: Create
edit: Edit
@ -34,6 +36,7 @@ globals:
clone: Clone
confirm: Confirm
assign: Assign
replace: Replace
back: Back
downloadPdf: Download PDF
yes: 'Yes'
@ -50,7 +53,6 @@ globals:
summary:
basicData: Basic data
daysOnward: Days onward
daysAgo: Days ago
today: Today
yesterday: Yesterday
dateFormat: en-GB
@ -65,6 +67,7 @@ globals:
shipped: Shipped
totalEntries: Total entries
amount: Amount
removeSelection: Clear selection
packages: Packages
download: Download
selectRows: 'Select all { numberRows } row(s)'
@ -76,6 +79,7 @@ globals:
type: Type
reason: reason
noResults: No results
results: results
system: System
notificationSent: Notification sent
warehouse: Warehouse
@ -105,7 +109,6 @@ globals:
campaign: Campaign
weight: Weight
error: Ups! Something went wrong
recalc: Recalculate
pageTitles:
logIn: Login
addressEdit: Update address
@ -113,10 +116,11 @@ globals:
basicData: Basic data
log: Logs
parkingList: Parkings list
agencyList: Agencies
agencyList: Agencies list
agency: Agency
workCenters: Work centers
modes: Modes
negative: Tickets negative
zones: Zones
zonesList: Zones
deliveryDays: Delivery days
@ -137,7 +141,7 @@ globals:
fiscalData: Fiscal data
billingData: Billing data
consignees: Consignees
address-create: New address
'address-create': New address
notes: Notes
credits: Credits
greuges: Greuges
@ -209,7 +213,7 @@ globals:
roadmap: Roadmap
stops: Stops
routes: Routes
cmrsList: CMRs
cmrsList: CMRs list
RouteList: List
routeCreate: New route
RouteRoadmap: Roadmaps
@ -223,7 +227,6 @@ globals:
pictures: Pictures
packages: Packages
tracking: Tracking
labeler: Labeler
supplierCreate: New supplier
accounts: Accounts
addresses: Addresses
@ -275,9 +278,6 @@ globals:
clientsActionsMonitor: Clients and actions
serial: Serial
medical: Mutual
RouteExtendedList: Router
wasteRecalc: Waste recaclulate
operator: Operator
supplier: Supplier
created: Created
worker: Worker
@ -293,10 +293,7 @@ globals:
createInvoiceIn: Create invoice in
myAccount: My account
noOne: No one
maxTemperature: Max
minTemperature: Min
params:
id: ID
clientFk: Client id
salesPersonFk: Sales person
warehouseFk: Warehouse
@ -304,21 +301,12 @@ globals:
from: From
To: To
stateFk: State
email: Email
SSN: SSN
fi: FI
myTeam: My team
departmentFk: Department
changePass: Change password
deleteConfirmTitle: Delete selected elements
changeState: Change state
errors:
statusUnauthorized: Access denied
statusInternalServerError: An internal server error has ocurred
statusBadGateway: It seems that the server has fall down
statusGatewayTimeout: Could not contact the server
userConfig: Error fetching user config
updateUserConfig: Error updating user config
tokenConfig: Error fetching token config
writeRequest: The requested operation could not be completed
login:
@ -489,6 +477,7 @@ ticket:
notes: Notes
sale: Sale
dms: File management
negative: Tickets negative
volume: Volume
observation: Notes
ticketAdvance: Advance tickets
@ -512,8 +501,6 @@ ticket:
warehouse: Warehouse
customerCard: Customer card
alias: Alias
ticketList: Ticket List
newOrder: New Order
boxing:
expedition: Expedition
item: Item
@ -535,7 +522,6 @@ ticket:
landed: Landed
consigneePhone: Consignee phone
consigneeMobile: Consignee mobile
consigneeAddress: Consignee address
clientPhone: Client phone
clientMobile: Client mobile
consignee: Consignee
@ -558,17 +544,13 @@ ticket:
package: Package
taxClass: Tax class
services: Services
changeState: Change state
requester: Requester
atender: Atender
request: Request
weight: Weight
goTo: Go to
summaryAmount: Summary
purchaseRequest: Purchase request
service: Service
description: Description
attender: Attender
ok: Ok
create:
client: Client
address: Address
@ -592,6 +574,7 @@ invoiceOut:
client: Client
company: Company
customerCard: Customer card
ticketList: Ticket List
summary:
issued: Issued
created: Created
@ -745,7 +728,6 @@ worker:
locker: Locker
balance: Balance
medical: Medical
operator: Operator
list:
name: Name
email: Email
@ -818,14 +800,14 @@ worker:
bankEntity: Swift / BIC
formation:
tableVisibleColumns:
course: Course
startDate: Start date
endDate: End date
center: Training center
invoice: Invoice
amount: Amount
remark: Remark
hasDiploma: Has diploma
course: Curso
startDate: Fecha Inicio
endDate: Fecha Fin
center: Centro Formación
invoice: Factura
amount: Importe
remark: Bonficado
hasDiploma: Diploma
medical:
tableVisibleColumns:
date: Date
@ -843,18 +825,6 @@ worker:
debit: Debt
credit: Have
concept: Concept
operator:
numberOfWagons: Number of wagons
train: Train
itemPackingType: Item packing type
warehouse: Warehouse
sector: Sector
labeler: Printer
linesLimit: Lines limit
volumeLimit: Volume limit
sizeLimit: Size limit
isOnReservationMode: Reservation mode
machine: Machine
wagon:
pageTitles:
wagons: Wagons
@ -894,7 +864,34 @@ wagon:
minHeightBetweenTrays: 'The minimum height between trays is '
maxWagonHeight: 'The maximum height of the wagon is '
uncompleteTrays: There are incomplete trays
route:
pageTitles:
agency: Agency List
routes: Routes
cmrsList: CMRs list
RouteList: List
routeCreate: New route
basicData: Basic Data
summary: Summary
RouteRoadmap: Roadmaps
RouteRoadmapCreate: Create roadmap
tickets: Tickets
log: Log
autonomous: Autonomous
cmr:
list:
results: results
cmrFk: CMR id
hasCmrDms: Attached in gestdoc
'true': 'Yes'
'false': 'No'
ticketFk: Ticketd id
routeFk: Route id
country: Country
clientFk: Client id
shipped: Preparation date
viewCmr: View CMR
downloadCmrs: Download CMRs
supplier:
list:
payMethod: Pay method
@ -1009,7 +1006,6 @@ travel:
warehouseOut: Warehouse out
totalEntries: Total entries
totalEntriesTooltip: Total entries
daysOnward: Landed days onwards
summary:
confirmed: Confirmed
entryId: Entry Id

View File

@ -7,6 +7,7 @@ globals:
entity: Entidad
user: Usuario
details: Detalles
preview: Vista previa
collapseMenu: Contraer menú lateral
backToDashboard: Volver al tablón
notifications: Notificaciones
@ -29,11 +30,13 @@ globals:
saveAndContinue: Guardar y continuar
remove: Eliminar
reset: Restaurar
refresh: Actualizar
close: Cerrar
cancel: Cancelar
clone: Clonar
confirm: Confirmar
assign: Asignar
replace: Sustituir
back: Volver
yes: Si
no: No
@ -46,10 +49,10 @@ globals:
rowRemoved: Fila eliminada
pleaseWait: Por favor espera...
noPinnedModules: No has fijado ningún módulo
split: Split
summary:
basicData: Datos básicos
daysOnward: Días adelante
daysAgo: Días atras
today: Hoy
yesterday: Ayer
dateFormat: es-ES
@ -64,7 +67,7 @@ globals:
shipped: F. envío
totalEntries: Ent. totales
amount: Importe
packages: Embalajes
packages: Bultos
download: Descargar
downloadPdf: Descargar PDF
selectRows: 'Seleccionar las { numberRows } filas(s)'
@ -73,8 +76,10 @@ globals:
requiredField: Campo obligatorio
class: clase
type: Tipo
reason: motivo
reason: Motivo
removeSelection: Eliminar selección
noResults: Sin resultados
results: resultados
system: Sistema
notificationSent: Notificación enviada
warehouse: Almacén
@ -101,13 +106,11 @@ globals:
from: Desde
to: Hasta
notes: Notas
refresh: Actualizar
item: Artículo
ticket: Ticket
campaign: Campaña
weight: Peso
error: ¡Ups! Algo salió mal
recalc: Recalcular
pageTitles:
logIn: Inicio de sesión
addressEdit: Modificar consignatario
@ -115,10 +118,11 @@ globals:
basicData: Datos básicos
log: Historial
parkingList: Listado de parkings
agencyList: Agencias
agencyList: Listado de agencias
agency: Agencia
workCenters: Centros de trabajo
modes: Modos
negative: Tickets negativos
zones: Zonas
zonesList: Zonas
deliveryDays: Días de entrega
@ -190,7 +194,6 @@ globals:
invoiceIns: Fact. recibidas
invoiceInCreate: Crear fact. recibida
vat: IVA
labeler: Etiquetas
dueDay: Vencimiento
intrastat: Intrastat
corrective: Rectificativa
@ -213,13 +216,12 @@ globals:
roadmap: Troncales
stops: Paradas
routes: Rutas
cmrsList: CMRs
cmrsList: Listado de CMRs
RouteList: Listado
routeCreate: Nueva ruta
RouteRoadmap: Troncales
RouteRoadmapCreate: Crear troncal
autonomous: Autónomos
RouteExtendedList: Enrutador
suppliers: Proveedores
supplier: Proveedor
supplierCreate: Nuevo proveedor
@ -270,7 +272,7 @@ globals:
tracking: Estados
components: Componentes
pictures: Fotos
packages: Embalajes
packages: Bultos
ldap: LDAP
samba: Samba
twoFactor: Doble factor
@ -280,8 +282,6 @@ globals:
clientsActionsMonitor: Clientes y acciones
serial: Facturas por serie
medical: Mutua
wasteRecalc: Recalcular mermas
operator: Operario
supplier: Proveedor
created: Fecha creación
worker: Trabajador
@ -297,10 +297,7 @@ globals:
createInvoiceIn: Crear factura recibida
myAccount: Mi cuenta
noOne: Nadie
maxTemperature: Máx
minTemperature: Mín
params:
id: Id
clientFk: Id cliente
salesPersonFk: Comercial
warehouseFk: Almacén
@ -308,21 +305,12 @@ globals:
from: Desde
To: Hasta
stateFk: Estado
departmentFk: Departamento
email: Correo
SSN: NSS
fi: NIF
myTeam: Mi equipo
changePass: Cambiar contraseña
deleteConfirmTitle: Eliminar los elementos seleccionados
changeState: Cambiar estado
errors:
statusUnauthorized: Acceso denegado
statusInternalServerError: Ha ocurrido un error interno del servidor
statusBadGateway: Parece ser que el servidor ha caído
statusGatewayTimeout: No se ha podido contactar con el servidor
userConfig: Error al obtener configuración de usuario
updateUserConfig: Error al actualizar la configuración de usuario
tokenConfig: Error al obtener configuración de token
writeRequest: No se pudo completar la operación solicitada
login:
@ -491,6 +479,7 @@ ticket:
notes: Notas
sale: Lineas del pedido
dms: Gestión documental
negative: Tickets negativos
volume: Volumen
observation: Notas
ticketAdvance: Adelantar tickets
@ -503,7 +492,7 @@ ticket:
tracking: Estados
components: Componentes
pictures: Fotos
packages: Embalajes
packages: Bultos
list:
nickname: Alias
state: Estado
@ -521,8 +510,6 @@ ticket:
warehouse: Almacén
customerCard: Ficha del cliente
alias: Alias
ticketList: Listado de tickets
newOrder: Nuevo pedido
boxing:
expedition: Expedición
item: Artículo
@ -544,7 +531,6 @@ ticket:
landed: Entregado
consigneePhone: Tel. consignatario
consigneeMobile: Móv. consignatario
consigneeAddress: Dir. consignatario
clientPhone: Tel. cliente
clientMobile: Móv. cliente
consignee: Consignatario
@ -567,16 +553,13 @@ ticket:
package: Embalaje
taxClass: Tipo IVA
services: Servicios
changeState: Cambiar estado
requester: Solicitante
atender: Comprador
request: Petición de compra
weight: Peso
goTo: Ir a
summaryAmount: Resumen
purchaseRequest: Petición de compra
service: Servicio
description: Descripción
attender: Consignatario
create:
client: Cliente
address: Dirección
@ -752,7 +735,6 @@ worker:
balance: Balance
formation: Formación
medical: Mutua
operator: Operario
list:
name: Nombre
email: Email
@ -841,19 +823,6 @@ worker:
debit: Debe
credit: Haber
concept: Concepto
operator:
numberOfWagons: Número de vagones
train: tren
itemPackingType: Tipo de embalaje
warehouse: Almacén
sector: Sector
labeler: Impresora
linesLimit: Líneas límite
volumeLimit: Volumen límite
sizeLimit: Tamaño límite
isOnReservationMode: Modo de reserva
machine: Máquina
wagon:
pageTitles:
wagons: Vagones
@ -893,6 +862,21 @@ wagon:
minHeightBetweenTrays: 'La distancia mínima entre bandejas es '
maxWagonHeight: 'La altura máxima del vagón es '
uncompleteTrays: Hay bandejas sin completar
route:
cmr:
list:
results: resultados
cmrFk: Id CMR
hasCmrDms: Gestdoc
'true':
'false': 'No'
ticketFk: Id ticket
routeFk: Id ruta
country: País
clientFk: Id cliente
shipped: Fecha preparación
viewCmr: Ver CMR
downloadCmrs: Descargar CMRs
supplier:
list:
payMethod: Método de pago
@ -1007,7 +991,6 @@ travel:
warehouseOut: Alm.entrada
totalEntries:
totalEntriesTooltip: Entradas totales
daysOnward: Días de llegada en adelante
summary:
confirmed: Confirmado
entryId: Id entrada

View File

@ -5,14 +5,11 @@ import VnTable from 'components/VnTable/VnTable.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue';
import AccountSummary from './Card/AccountSummary.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import AccountFilter from './AccountFilter.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
const tableRef = ref();
const filter = {
include: { relation: 'role', scope: { fields: ['id', 'name'] } },
};
const columns = computed(() => [
{
align: 'left',
@ -21,31 +18,27 @@ const columns = computed(() => [
isId: true,
field: 'id',
cardVisible: true,
},
{
align: 'left',
name: 'roleFk',
label: t('role'),
columnFilter: {
component: 'select',
name: 'roleFk',
name: 'search',
attrs: {
url: 'VnRoles',
optionValue: 'id',
optionLabel: 'name',
url: 'VnUsers/preview',
fields: ['id', 'name'],
},
},
format: ({ role }, dashIfEmpty) => dashIfEmpty(role?.name),
},
{
align: 'left',
name: 'nickname',
name: 'username',
label: t('Nickname'),
isTitle: true,
component: 'input',
columnField: {
component: null,
},
columnFilter: {
inWhere: true,
},
cardVisible: true,
create: true,
},
@ -57,6 +50,9 @@ const columns = computed(() => [
columnField: {
component: null,
},
columnFilter: {
inWhere: true,
},
cardVisible: true,
create: true,
},
@ -108,25 +104,17 @@ const exprBuilder = (param, value) => {
:expr-builder="exprBuilder"
:label="t('account.search')"
:info="t('account.searchInfo')"
:filter="filter"
/>
<RightMenu>
<template #right-panel>
<AccountFilter data-key="AccountUsers" />
</template>
</RightMenu>
<VnTable
ref="tableRef"
data-key="AccountUsers"
url="VnUsers/preview"
:filter="filter"
order="id DESC"
:columns="columns"
default-mode="table"
redirect="account"
:use-model="true"
:right-search="false"
auto-load
/>
</template>

View File

@ -46,9 +46,13 @@ const columns = computed(() => [
]);
const deleteAlias = async (row) => {
await axios.delete(`${urlPath.value}/${row.id}`);
notify(t('User removed'), 'positive');
fetchAliases();
try {
await axios.delete(`${urlPath.value}/${row.id}`);
notify(t('User removed'), 'positive');
fetchAliases();
} catch (error) {
console.error(error);
}
};
watch(

View File

@ -10,7 +10,7 @@ const { t } = useI18n();
<VnCard
data-key="Account"
:descriptor="AccountDescriptor"
search-data-key="AccountList"
search-data-key="AccountUsers"
:searchbar-props="{
url: 'VnUsers/preview',
label: t('account.search'),

View File

@ -4,12 +4,9 @@ import { computed, ref, toRefs } from 'vue';
import { useI18n } from 'vue-i18n';
import { useVnConfirm } from 'composables/useVnConfirm';
import { useRoute } from 'vue-router';
import { useAcl } from 'src/composables/useAcl';
import { useArrayData } from 'src/composables/useArrayData';
import VnConfirm from 'src/components/ui/VnConfirm.vue';
import VnChangePassword from 'src/components/common/VnChangePassword.vue';
import useNotify from 'src/composables/useNotify.js';
const $props = defineProps({
hasAccount: {
type: Boolean,
@ -65,19 +62,6 @@ async function sync() {
}
</script>
<template>
<VnChangePassword
ref="changePassRef"
:ask-old-pass="true"
:submit-fn="
async (newPassword, oldPassword) => {
await axios.patch(`Accounts/change-password`, {
userId: entityId,
newPassword,
oldPassword,
});
}
"
/>
<VnConfirm
v-model="showSyncDialog"
:message="t('account.card.actions.sync.message')"
@ -108,17 +92,6 @@ async function sync() {
/>
</template>
</VnConfirm>
<QItem
v-if="
entityId == account.id &&
useAcl().hasAny([{ model: 'Account', props: '*', accessType: 'WRITE' }])
"
v-ripple
clickable
@click="$refs.changePassRef.show()"
>
<QItemSection>{{ t('globals.changePass') }}</QItemSection>
</QItem>
<QItem
v-if="account.hasAccount"
v-ripple
@ -165,5 +138,6 @@ async function sync() {
<QItem v-ripple clickable @click="showSyncDialog = true">
<QItemSection>{{ t('account.card.actions.sync.name') }}</QItemSection>
</QItem>
<QSeparator />
</template>

View File

@ -61,15 +61,23 @@ const fetchAccountExistence = async () => {
};
const deleteMailAlias = async (row) => {
await axios.delete(`${urlPath}/${row.id}`);
fetchMailAliases();
notify(t('Unsubscribed from alias!'), 'positive');
try {
await axios.delete(`${urlPath}/${row.id}`);
fetchMailAliases();
notify(t('Unsubscribed from alias!'), 'positive');
} catch (error) {
console.error(error);
}
};
const createMailAlias = async (mailAliasFormData) => {
await axios.post(urlPath, mailAliasFormData);
notify(t('Subscribed to alias!'), 'positive');
fetchMailAliases();
try {
await axios.post(urlPath, mailAliasFormData);
notify(t('Subscribed to alias!'), 'positive');
fetchMailAliases();
} catch (error) {
console.error(error);
}
};
const fetchMailAliases = async () => {

View File

@ -46,15 +46,29 @@ const columns = computed(() => [
]);
const deleteSubRole = async (row) => {
await axios.delete(`${urlPath.value}/${row.id}`);
fetchSubRoles();
notify(t('Role removed. Changes will take a while to fully propagate.'), 'positive');
try {
await axios.delete(`${urlPath.value}/${row.id}`);
fetchSubRoles();
notify(
t('Role removed. Changes will take a while to fully propagate.'),
'positive'
);
} catch (error) {
console.error(error);
}
};
const createSubRole = async (subRoleFormData) => {
await axios.post(urlPath.value, subRoleFormData);
notify(t('Role added! Changes will take a while to fully propagate.'), 'positive');
fetchSubRoles();
try {
await axios.post(urlPath.value, subRoleFormData);
notify(
t('Role added! Changes will take a while to fully propagate.'),
'positive'
);
fetchSubRoles();
} catch (error) {
console.error(error);
}
};
watch(

View File

@ -204,7 +204,7 @@ function claimUrl(section) {
top
color="black"
text-color="white"
:label="t('globals.changeState')"
:label="t('ticket.summary.changeState')"
>
<QList>
<QVirtualScroll

View File

@ -18,7 +18,6 @@ const contactChannels = ref([]);
const title = ref();
const handleSalesModelValue = (val) => ({
or: [
{ id: val },
{ name: val },
{ nickname: { like: '%' + val + '%' } },
{ code: { like: `${val}%` } },

View File

@ -1,177 +0,0 @@
<script setup>
import { useI18n } from 'vue-i18n';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnInput from 'src/components/common/VnInput.vue';
import { QItem } from 'quasar';
import VnSelect from 'src/components/common/VnSelect.vue';
import { QItemSection } from 'quasar';
import VnInputDate from 'src/components/common/VnInputDate.vue';
import { toDate } from 'src/filters';
const { t } = useI18n();
defineProps({ dataKey: { type: String, required: true } });
</script>
<template>
<VnFilterPanel :data-key="dataKey" :search-button="true">
<template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs">
<strong>{{ t(`params.${tag.label}`) }}: </strong>
<span>{{ formatFn(tag.value) }}</span>
</div>
</template>
<template #body="{ params }">
<QItem>
<QItemSection>
<VnInput
:label="t('params.item')"
v-model="params.itemId"
is-outlined
lazy-rules
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelect
v-model="params.buyerId"
url="TicketRequests/getItemTypeWorker"
:fields="['id', 'nickname']"
sort-by="nickname ASC"
:label="t('params.buyer')"
option-value="id"
option-label="nickname"
dense
outlined
rounded
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelect
v-model="params.typeId"
url="ItemTypes"
:include="['category']"
:fields="['id', 'name', 'categoryFk']"
sort-by="name ASC"
:label="t('params.typeId')"
option-label="name"
option-value="id"
dense
outlined
rounded
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
<QItemLabel caption>{{
scope.opt?.category?.name
}}</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelect
v-model="params.categoryId"
url="ItemCategories"
:fields="['id', 'name']"
sort-by="name ASC"
:label="t('params.categoryId')"
option-label="name"
option-value="id"
dense
outlined
rounded
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelect
v-model="params.campaignId"
url="Campaigns/latest"
sort-by="dated DESC"
:label="t('params.campaignId')"
option-label="code"
option-value="id"
dense
outlined
rounded
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{
t(`params.${scope.opt?.code}`)
}}</QItemLabel>
<QItemLabel caption>{{
toDate(scope.opt.dated)
}}</QItemLabel>
</QItemSection>
</QItem>
</template>
</VnSelect>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnInputDate
:label="t('params.from')"
v-model="params.from"
@update:model-value="searchFn()"
is-outlined
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnInputDate
:label="t('params.to')"
v-model="params.to"
@update:model-value="searchFn()"
is-outlined
/>
</QItemSection>
</QItem>
</template>
</VnFilterPanel>
</template>
<i18n>
en:
params:
item: Item id
buyer: Buyer
type: Type
category: Category
itemId: Item id
buyerId: Buyer
typeId: Type
categoryId: Category
from: From
to: To
campaignId: Campaña
valentinesDay: Valentine's Day
mothersDay: Mother's Day
allSaints: All Saints' Day
es:
params:
item: Id artículo
buyer: Comprador
type: Tipo
category: Categoría
itemId: Id Artículo
buyerId: Comprador
typeId: Tipo
categoryId: Reino
from: Desde
to: Hasta
campaignId: Campaña
valentinesDay: Día de San Valentín
mothersDay: Día de la Madre
allSaints: Día de Todos los Santos
</i18n>

View File

@ -91,6 +91,22 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
>
<QTooltip>{{ t('customer.card.isDisabled') }}</QTooltip>
</QIcon>
<QIcon
v-if="!entity?.substitutionAllowed"
name="help"
size="xs"
color="primary"
>
<QTooltip>{{ t('Disabled substitution') }}</QTooltip>
</QIcon>
<QIcon
v-if="entity?.substitutionAllowed"
name="help"
size="xs"
color="primary"
>
<QTooltip>{{ t('Allowed substitution') }}</QTooltip>
</QIcon>
<QIcon
v-if="customer.isFreezed"
name="vn:frozen"

View File

@ -52,6 +52,16 @@ const orderCreateFormDialog = ref(null);
const openOrderCreateForm = () => {
orderCreateFormDialog.value.show();
};
const updateSubstitutionAllowed = async () => {
try {
await axios.patch(`Clients/${route.params.id}`, {
substitutionAllowed: !$props.customer.substitutionAllowed,
});
notify('globals.notificationSent', 'positive');
} catch (error) {
notify(error.message, 'positive');
}
};
</script>
<template>
@ -71,6 +81,13 @@ const openOrderCreateForm = () => {
</QDialog>
</QItemSection>
</QItem>
<QItem v-ripple clickable>
<QItemSection @click="updateSubstitutionAllowed()">{{
$props.customer.substitutionAllowed
? t('Disable substitution')
: t('Allow substitution')
}}</QItemSection>
</QItem>
<QItem v-ripple clickable>
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
</QItem>

View File

@ -93,7 +93,6 @@ function handleLocation(data, location) {
<VnRow>
<VnLocation
:rules="validate('Worker.postcode')"
:roles-allowed-to-create="['deliveryAssistant', 'administrative']"
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
:location="data"
@update:model-value="(location) => handleLocation(data, location)"

View File

@ -22,6 +22,5 @@ const noteFilter = computed(() => {
:filter="noteFilter"
:body="{ clientFk: route.params.id }"
style="overflow-y: auto"
:select-type="true"
/>
</template>

View File

@ -13,7 +13,6 @@ import VnTitle from 'src/components/common/VnTitle.vue';
import VnRow from 'src/components/ui/VnRow.vue';
const route = useRoute();
const { t } = useI18n();
const grafanaUrl = 'https://grafana.verdnatura.es';
const $props = defineProps({
id: {

View File

@ -92,7 +92,7 @@ const onSubmit = async () => {
notify('globals.dataSaved', 'positive');
unpaidClient.value = true;
} catch (error) {
notify('errors.writeRequest', 'negative');
notify('errors.create', 'negative');
} finally {
isLoading.value = false;
}

View File

@ -3,11 +3,14 @@ import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import axios from 'axios';
import { useQuasar } from 'quasar';
import VnInput from 'src/components/common/VnInput.vue';
import CustomerChangePassword from 'src/pages/Customer/components/CustomerChangePassword.vue';
import FormModel from 'components/FormModel.vue';
import VnChangePassword from 'src/components/common/VnChangePassword.vue';
const { t } = useI18n();
const quasar = useQuasar();
const route = useRoute();
const canChangePassword = ref(0);
@ -18,11 +21,21 @@ const filter = computed(() => {
};
});
const showChangePasswordDialog = () => {
quasar.dialog({
component: CustomerChangePassword,
componentProps: {
id: route.params.id,
},
});
};
async function hasCustomerRole() {
const { data } = await axios(`Clients/${route.params.id}/hasCustomerRole`);
canChangePassword.value = data;
}
</script>
<template>
<FormModel
url="VnUsers/preview"
@ -56,29 +69,21 @@ async function hasCustomerRole() {
</template>
<template #moreActions>
<QBtn
:label="t('globals.changePass')"
:label="t('Change password')"
color="primary"
icon="edit"
:disable="!canChangePassword"
@click="$refs.changePassRef.show"
@click="showChangePasswordDialog()"
/>
</template>
</FormModel>
<VnChangePassword
ref="changePassRef"
:submit-fn="
async (newPass) => {
await axios.patch(`Clients/${$route.params.id}/setPassword`, {
newPassword: newPass,
});
}
"
/>
</template>
<i18n>
es:
Enable web access: Habilitar acceso web
User: Usuario
Recovery email: Correo de recuperacion
This email is used for user to regain access their account: Este correo electrónico se usa para que el usuario recupere el acceso a su cuenta
Change password: Cambiar contraseña
</i18n>

View File

@ -429,9 +429,10 @@ function handleLocation(data, location) {
:params="{
departmentCodes: ['VT', 'shopping'],
}"
option-label="nickname"
option-value="id"
:fields="['id', 'nickname']"
sort-by="nickname ASC"
:use-like="false"
emit-value
auto-load
>

View File

@ -3,6 +3,7 @@ import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import { toCurrency, toDate, dateRange } from 'filters/index';
import CustomerNotificationsFilter from './CustomerDefaulterFilter.vue';
import CustomerBalanceDueTotal from './CustomerBalanceDueTotal.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
@ -10,6 +11,7 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import VnInput from 'src/components/common/VnInput.vue';
import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue';
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
import VnTable from 'src/components/VnTable/VnTable.vue';
const { t } = useI18n();
@ -190,6 +192,11 @@ function exprBuilder(param, value) {
</script>
<template>
<RightMenu>
<template #right-panel>
<CustomerNotificationsFilter data-key="CustomerDefaulter" />
</template>
</RightMenu>
<VnSubToolbar>
<template #st-data>
<CustomerBalanceDueTotal :amount="balanceDueTotal" />

View File

@ -25,31 +25,19 @@ const { notify } = useNotify();
const { t } = useI18n();
const newObservation = ref(null);
const obsId = ref(null);
const onSubmit = async () => {
try {
if (!obsId.value)
obsId.value = (
await axios.get('ObservationTypes/findOne', {
params: { filter: { where: { description: 'Finance' } } },
})
).data?.id;
const bodyObs = $props.clients.map((item) => {
return {
clientFk: item.clientFk,
text: newObservation.value,
observationTypeFk: obsId.value,
};
const data = $props.clients.map((item) => {
return { clientFk: item.clientFk, text: newObservation.value };
});
await axios.post('ClientObservations', bodyObs);
await axios.post('ClientObservations', data);
const bodyObsMail = {
const payload = {
defaulters: $props.clients,
observation: newObservation.value,
};
await axios.post('Defaulters/observationEmail', bodyObsMail);
await axios.post('Defaulters/observationEmail', payload);
await $props.promise();

View File

@ -240,33 +240,39 @@ function handleLocation(data, location) {
class="row q-gutter-md q-mb-md"
v-for="(note, index) in notes"
>
<VnSelect
:label="t('Observation type')"
:options="observationTypes"
hide-selected
option-label="description"
option-value="id"
v-model="note.observationTypeFk"
/>
<VnInput
:label="t('Description')"
:rules="validate('route.description')"
clearable
v-model="note.description"
/>
<QIcon
:style="{ flex: 0, 'align-self': $q.screen.gt.xs ? 'end' : 'center' }"
@click.stop="deleteNote(note.id, index)"
class="cursor-pointer"
color="primary"
name="delete"
size="sm"
>
<QTooltip>
{{ t('Remove note') }}
</QTooltip>
</QIcon>
<div class="col">
<VnSelect
:label="t('Observation type')"
:options="observationTypes"
hide-selected
option-label="description"
option-value="id"
v-model="note.observationTypeFk"
/>
</div>
<div class="col">
<VnInput
:label="t('Description')"
:rules="validate('route.description')"
clearable
v-model="note.description"
/>
</div>
<div class="flex items-center">
<QIcon
@click.stop="deleteNote(note.id, index)"
class="cursor-pointer"
color="primary"
name="delete"
size="sm"
>
<QTooltip>
{{ t('Remove note') }}
</QTooltip>
</QIcon>
</div>
</VnRow>
<QBtn
@click.stop="addNote()"
class="cursor-pointer add-icon q-mt-md"

View File

@ -0,0 +1,138 @@
<script setup>
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import axios from 'axios';
import { useDialogPluginComponent } from 'quasar';
import useNotify from 'src/composables/useNotify';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
import FetchData from 'src/components/FetchData.vue';
const { dialogRef } = useDialogPluginComponent();
const { notify } = useNotify();
const { t } = useI18n();
const $props = defineProps({
id: {
type: String,
required: true,
},
promise: {
type: Function,
required: true,
},
});
const userPasswords = ref({});
const closeButton = ref(null);
const isLoading = ref(false);
const newPassword = ref('');
const requestPassword = ref('');
const onSubmit = async () => {
isLoading.value = true;
if (newPassword.value !== requestPassword.value) {
notify(t("Passwords don't match"), 'negative');
isLoading.value = false;
return;
}
const payload = {
newPassword: newPassword.value,
};
try {
await axios.patch(`Clients/${$props.id}/setPassword`, payload);
} catch (error) {
notify('errors.create', 'negative');
} finally {
isLoading.value = false;
if (closeButton.value) closeButton.value.click();
}
};
</script>
<template>
<QDialog ref="dialogRef">
<FetchData
@on-fetch="(data) => (userPasswords = data[0])"
auto-load
url="UserPasswords"
/>
<QCard class="q-pa-lg">
<QCardSection>
<QForm @submit.prevent="onSubmit">
<span
ref="closeButton"
class="row justify-end close-icon"
v-close-popup
>
<QIcon name="close" size="sm" />
</span>
<VnRow class="row q-gutter-md q-mb-md" style="flex-direction: column">
<div class="col">
<VnInput
:label="t('New password')"
clearable
v-model="newPassword"
type="password"
>
<template #append>
<QIcon name="info" class="cursor-info">
<QTooltip>
{{
t('customer.card.passwordRequirements', {
...userPasswords,
})
}}
</QTooltip>
</QIcon>
</template>
</VnInput>
</div>
<div class="col">
<VnInput
:label="t('Request password')"
clearable
v-model="requestPassword"
type="password"
/>
</div>
</VnRow>
<div class="q-mt-lg row justify-end">
<QBtn
:disabled="isLoading"
:label="t('globals.cancel')"
:loading="isLoading"
class="q-ml-sm"
color="primary"
flat
type="reset"
v-close-popup
/>
<QBtn
:disabled="isLoading"
:label="t('Change password')"
:loading="isLoading"
color="primary"
type="submit"
/>
</div>
</QForm>
</QCardSection>
</QCard>
</QDialog>
</template>
<i18n>
es:
New password: Nueva contraseña
Request password: Repetir contraseña
Change password: Cambiar contraseña
Passwords don't match: Las contraseñas no coinciden
</i18n>

View File

@ -138,7 +138,7 @@ const onSubmit = async () => {
notify('globals.dataSaved', 'positive');
onDataSaved(data);
} catch (error) {
notify('errors.writeRequest', 'negative');
notify('errors.create', 'negative');
} finally {
isLoading.value = false;
}

View File

@ -6,7 +6,7 @@ import { useRoute, useRouter } from 'vue-router';
import { date } from 'quasar';
import { toDateFormat } from 'src/filters/date.js';
import { dashIfEmpty, toCurrency } from 'src/filters';
import { toCurrency } from 'src/filters';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import TicketSummary from 'src/pages/Ticket/Card/TicketSummary.vue';
@ -32,16 +32,6 @@ const filter = {
},
{ relation: 'invoiceOut', scope: { fields: ['id'] } },
{ relation: 'agencyMode', scope: { fields: ['name'] } },
{
relation: 'ticketSales',
scope: {
fields: ['id', 'concept', 'itemFk'],
include: { relation: 'item' },
scope: {
fields: ['id', 'name', 'itemPackingTypeFk'],
},
},
},
],
where: { clientFk: route.params.id },
order: ['shipped DESC', 'id'],
@ -97,12 +87,7 @@ const columns = computed(() => [
label: t('Total'),
name: 'total',
},
{
align: 'left',
name: 'itemPackingTypeFk',
label: t('ticketSale.packaging'),
format: (row) => getItemPackagingType(row),
},
{
align: 'right',
label: '',
@ -150,15 +135,6 @@ const setShippedColor = (date) => {
if (difference == 0) return 'warning';
if (difference < 0) return 'success';
};
const getItemPackagingType = (row) => {
const packagingType = row?.ticketSales
.map((sale) => sale.item?.itemPackingTypeFk || '-')
.filter((value) => value !== '-')
.join(', ');
return dashIfEmpty(packagingType);
};
</script>
<template>

View File

@ -1,7 +1,9 @@
<script setup>
import { ref } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import FetchData from 'components/FetchData.vue';
import FormModel from 'components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
@ -9,8 +11,17 @@ import VnSelect from 'src/components/common/VnSelect.vue';
const route = useRoute();
const { t } = useI18n();
const workersOptions = ref([]);
const clientsOptions = ref([]);
</script>
<template>
<FetchData
url="Workers/search"
@on-fetch="(data) => (workersOptions = data)"
auto-load
/>
<FetchData url="Clients" @on-fetch="(data) => (clientsOptions = data)" auto-load />
<FormModel
:url="`Departments/${route.params.id}`"
model="department"
@ -51,7 +62,7 @@ const { t } = useI18n();
<VnSelect
:label="t('department.bossDepartment')"
v-model="data.workerFk"
url="Workers/search"
:options="workersOptions"
option-value="id"
option-label="name"
hide-selected
@ -61,7 +72,7 @@ const { t } = useI18n();
<VnSelect
:label="t('department.selfConsumptionCustomer')"
v-model="data.clientFk"
url="Clients"
:options="clientsOptions"
option-value="id"
option-label="name"
hide-selected

View File

@ -11,7 +11,6 @@ import { toDate, toCurrency } from 'src/filters';
import { getUrl } from 'src/composables/getUrl';
import axios from 'axios';
import FetchedTags from 'src/components/ui/FetchedTags.vue';
import VnToSummary from 'src/components/ui/VnToSummary.vue';
const route = useRoute();
const { t } = useI18n();
@ -164,12 +163,14 @@ const fetchEntryBuys = async () => {
data-key="EntrySummary"
>
<template #header-left>
<VnToSummary
<router-link
v-if="route?.name !== 'EntrySummary'"
:route-name="'EntrySummary'"
:entity-id="entityId"
:url="entryUrl"
/>
:to="{ name: 'EntrySummary', params: { id: entityId } }"
class="header link"
:href="entryUrl"
>
<QIcon name="open_in_new" color="white" size="sm" />
</router-link>
</template>
<template #header>
<span>{{ entry.id }} - {{ entry.supplier.nickname }}</span>

View File

@ -45,10 +45,9 @@ const columns = [
optionValue: 'id',
useLike: false,
},
columnFilter: false,
},
{
align: 'center',
align: 'left',
label: t('Reserve'),
name: 'reserve',
columnFilter: false,
@ -77,7 +76,7 @@ const columns = [
name: 'tableActions',
actions: [
{
title: t('View more details'),
title: t('More'),
icon: 'search',
isPrimary: true,
action: (row) => {
@ -142,10 +141,6 @@ function setFooter(data) {
});
tableRef.value.footer = footer;
}
function round(value) {
return Math.round(value * 100) / 100;
}
</script>
<template>
<VnSubToolbar>
@ -157,16 +152,14 @@ function round(value) {
:filter="filter"
@on-fetch="
(data) => {
travel = data.find(
(data) => data.warehouseIn?.code.toLowerCase() === 'vnh'
);
travel = data.find((data) => data.warehouseIn.code === 'VNH');
}
"
/>
<VnRow class="travel">
<div v-if="travel">
<span style="color: var(--vn-label-color)">
{{ t('Purchase Spaces') }}:
{{ t('Booked trucks') }}:
</span>
<span>
{{ travel?.m3 }}
@ -213,7 +206,7 @@ function round(value) {
</template>
</RightMenu>
<div class="table-container">
<div class="column items-center">
<QPage class="column items-center q-pa-md">
<VnTable
ref="tableRef"
data-key="StockBoughts"
@ -235,9 +228,7 @@ function round(value) {
:columns="columns"
:user-params="userParams"
:footer="true"
table-height="80vh"
auto-load
:column-search="false"
>
<template #column-workerFk="{ row }">
<span class="link" @click.stop>
@ -252,7 +243,7 @@ function round(value) {
</template>
<template #column-footer-reserve>
<span>
{{ round(tableRef.footer.reserve) }}
{{ tableRef.footer.reserve }}
</span>
</template>
<template #column-footer-bought>
@ -262,11 +253,11 @@ function round(value) {
tableRef.footer.reserve < tableRef.footer.bought,
}"
>
{{ round(tableRef.footer.bought) }}
{{ tableRef.footer.bought }}
</span>
</template>
</VnTable>
</div>
</QPage>
</div>
</template>
<style lang="scss" scoped>
@ -281,6 +272,7 @@ function round(value) {
display: flex;
flex-direction: column;
align-items: center;
width: 40%;
}
.text-negative {
color: $negative !important;
@ -290,12 +282,12 @@ function round(value) {
es:
Edit travel: Editar envío
Travel: Envíos
Purchase Spaces: Espacios de compra
Booked trucks: Camiones reservados
Buyer: Comprador
Reserve: Reservado
Bought: Comprado
More: Más
Date: Fecha
View more details: Ver más detalles
Reserve some space: Reservar espacio
This buyer has already made a reservation for this date: Este comprador ya ha hecho una reserva para esta fecha
This buyer has already made a reservation for this date: Este comprador ya ha hecho una reserva para esta fecha
</i18n>

View File

@ -77,10 +77,18 @@ const columns = [
:columns="columns"
:right-search="false"
:disable-infinite-scroll="true"
:disable-option="{ card: true }"
:limit="0"
auto-load
>
<template #top-left>
<QBtn
flat
icon="Close"
color="primary"
class="bg-vn-section-color q-pa-xs"
v-close-popup
/>
</template>
<template #column-entryFk="{ row }">
<span class="link">
{{ row?.entryFk }}
@ -104,11 +112,6 @@ const columns = [
justify-content: center;
align-items: center;
margin: auto;
background-color: var(--vn-section-color);
padding: 4px;
}
.container > div > div > .q-table__top.relative-position.row.items-center {
background-color: red !important;
}
</style>
<i18n>

View File

@ -1,72 +0,0 @@
<script setup>
import { ref, computed, watch } from 'vue';
import VnInputDate from 'components/common/VnInputDate.vue';
import useNotify from 'src/composables/useNotify.js';
import axios from 'axios';
const isLoading = ref(false);
const dateFrom = ref();
const dateTo = ref();
const optionsTo = computed(() => (date) => {
if (!dateFrom.value) return true;
return new Date(date) >= new Date(dateFrom.value);
});
watch(dateFrom, (newDateFrom) => {
if (dateTo.value && new Date(dateTo.value) < new Date(newDateFrom))
dateTo.value = newDateFrom;
});
const recalc = async () => {
const { notify } = useNotify();
const params = {
schema: 'bs',
params: [new Date(dateFrom.value), new Date(dateTo.value)],
};
try {
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;
}
};
</script>
<template>
<div class="q-pa-lg row justify-center">
<QCard class="bg-light" style="width: 300px">
<QCardSection>
<VnInputDate
class="q-mb-lg"
v-model="dateFrom"
:label="$t('globals.from')"
rounded
dense
/>
<VnInputDate
class="q-mb-lg"
v-model="dateTo"
:options="optionsTo"
:label="$t('globals.to')"
:disable="!dateFrom"
rounded
dense
/>
<QBtn
color="primary"
text-color="white"
:label="$t('globals.recalc')"
:loading="isLoading"
:disable="isLoading || !(dateFrom && dateTo)"
@click="recalc()"
/>
</QCardSection>
</QCard>
</div>
</template>

View File

@ -9,27 +9,22 @@ import VnTable from 'components/VnTable/VnTable.vue';
const { t } = useI18n();
const quasar = useQuasar();
const params = {
daysOnward: 7,
daysAgo: 3,
};
const columns = computed(() => [
{
align: 'left',
name: 'id',
label: t('myEntries.id'),
label: t('customer.extendedList.tableVisibleColumns.id'),
columnFilter: false,
isTitle: true,
},
{
visible: false,
align: 'right',
label: t('myEntries.shipped'),
label: t('shipped'),
name: 'shipped',
columnFilter: {
name: 'fromShipped',
label: t('myEntries.fromShipped'),
label: t('fromShipped'),
component: 'date',
},
format: ({ shipped }) => toDate(shipped),
@ -37,11 +32,11 @@ const columns = computed(() => [
{
visible: false,
align: 'left',
label: t('myEntries.shipped'),
label: t('shipped'),
name: 'shipped',
columnFilter: {
name: 'toShipped',
label: t('myEntries.toShipped'),
label: t('toShipped'),
component: 'date',
},
format: ({ shipped }) => toDate(shipped),
@ -49,14 +44,14 @@ const columns = computed(() => [
},
{
align: 'right',
label: t('myEntries.shipped'),
label: t('shipped'),
name: 'shipped',
columnFilter: false,
format: ({ shipped }) => toDate(shipped),
},
{
align: 'right',
label: t('myEntries.landed'),
label: t('landed'),
name: 'landed',
columnFilter: false,
format: ({ landed }) => toDate(landed),
@ -64,36 +59,26 @@ const columns = computed(() => [
{
align: 'right',
label: t('myEntries.wareHouseIn'),
label: t('globals.wareHouseIn'),
name: 'warehouseInFk',
format: (row) => {
row.warehouseInName;
},
format: (row) => row.warehouseInName,
cardVisible: true,
columnFilter: {
name: 'warehouseInFk',
label: t('myEntries.warehouseInFk'),
component: 'select',
attrs: {
url: 'warehouses',
fields: ['id', 'name'],
optionLabel: 'name',
optionValue: 'id',
alias: 't',
},
alias: 't',
inWhere: true,
},
},
{
align: 'left',
label: t('myEntries.daysOnward'),
name: 'daysOnward',
visible: false,
},
{
align: 'left',
label: t('myEntries.daysAgo'),
name: 'daysAgo',
label: t('globals.daysOnward'),
name: 'days',
visible: false,
},
{
@ -103,7 +88,6 @@ const columns = computed(() => [
{
title: t('printLabels'),
icon: 'print',
isPrimary: true,
action: (row) => printBuys(row.id),
},
],
@ -130,11 +114,9 @@ const printBuys = (rowId) => {
data-key="myEntriesList"
url="Entries/filter"
:columns="columns"
:user-params="params"
default-mode="card"
order="shipped DESC"
auto-load
chip-locale="myEntries"
/>
</template>

View File

@ -6,17 +6,9 @@ entryFilter:
filter:
search: General search
reference: Reference
myEntries:
id: ID
landed: Landed
shipped: Shipped
fromShipped: Shipped(from)
toShipped: Shipped(to)
printLabels: Print stickers
viewLabel: View sticker
wareHouseIn: Warehouse in
warehouseInFk: Warehouse in
daysOnward: Days onward
daysAgo: Days ago
wasteRecalc:
recalcOk: The wastes were successfully recalculated
landed: Landed
shipped: Shipped
fromShipped: Shipped(from)
toShipped: Shipped(to)
printLabels: Print stickers
viewLabel: View sticker

View File

@ -9,17 +9,10 @@ entryFilter:
filter:
search: Búsqueda general
reference: Referencia
myEntries:
id: ID
landed: F. llegada
shipped: F. salida
fromShipped: F. salida(desde)
toShipped: F. salida(hasta)
printLabels: Imprimir etiquetas
viewLabel: Ver etiqueta
wareHouseIn: Alm. entrada
warehouseInFk: Alm. entrada
daysOnward: Días adelante
daysAgo: Días atras
wasteRecalc:
recalcOk: Se han recalculado las mermas correctamente
landed: F. llegada
shipped: F. salida
fromShipped: F. salida(desde)
toShipped: F. salida(hasta)
printLabels: Imprimir etiquetas
viewLabel: Ver etiqueta

View File

@ -74,6 +74,9 @@ const formatOpt = (row, { model, options }, prop) => {
const option = options.find(({ id }) => id == obj);
return option ? `${obj}:${option[prop]}` : '';
};
const getTotal = (data, key) =>
data.reduce((acc, cur) => acc + +String(cur[key]).replace(',', '.'), 0);
</script>
<template>
<FetchData

View File

@ -274,7 +274,10 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
:label="t('invoiceIn.summary.company')"
:value="entity.company?.code"
/>
<VnLv :label="t('invoiceIn.isBooked')" :value="invoiceIn?.isBooked" />
<VnLv
:label="t('invoiceIn.summary.booked')"
:value="invoiceIn?.isBooked"
/>
</QCard>
<QCard class="vn-one">
<QCardSection class="q-pa-none">

View File

@ -116,7 +116,7 @@ const activities = ref([]);
<QItem>
<QItemSection>
<QCheckbox
:label="t('invoiceIn.isBooked')"
:label="t('params.isBooked')"
v-model="params.isBooked"
@update:model-value="searchFn()"
toggle-indeterminate
@ -170,7 +170,7 @@ es:
awb: AWB
amount: Importe
issued: Emitida
isBooked: Contabilizada
isBooked: Conciliada
account: Cuenta contable
created: Creada
dued: Vencida

View File

@ -65,7 +65,7 @@ const cols = computed(() => [
{
align: 'left',
name: 'isBooked',
label: t('invoiceIn.isBooked'),
label: t('invoiceIn.list.isBooked'),
columnFilter: false,
},
{

View File

@ -1,6 +1,5 @@
invoiceIn:
serial: Serial
isBooked: Is booked
list:
ref: Reference
supplier: Supplier
@ -8,6 +7,7 @@ invoiceIn:
serial: Serial
file: File
issued: Issued
isBooked: Is booked
awb: AWB
amount: Amount
card:
@ -31,6 +31,7 @@ invoiceIn:
sage: Sage withholding
vat: Undeductible VAT
company: Company
booked: Booked
expense: Expense
taxableBase: Taxable base
rate: Rate

View File

@ -1,6 +1,5 @@
invoiceIn:
serial: Serie
isBooked: Contabilizada
list:
ref: Referencia
supplier: Proveedor
@ -8,6 +7,7 @@ invoiceIn:
shortIssued: F. emisión
file: Fichero
issued: Fecha emisión
isBooked: Conciliada
awb: AWB
amount: Importe
card:
@ -31,6 +31,7 @@ invoiceIn:
sage: Retención sage
vat: Iva no deducible
company: Empresa
booked: Contabilizada
expense: Gasto
taxableBase: Base imp.
rate: Tasa

View File

@ -9,6 +9,7 @@ import RefundInvoiceForm from 'src/components/RefundInvoiceForm.vue';
import SendEmailDialog from 'components/common/SendEmailDialog.vue';
import useNotify from 'src/composables/useNotify';
import { useSession } from 'src/composables/useSession';
import { usePrintService } from 'composables/usePrintService';
import { useVnConfirm } from 'composables/useVnConfirm';
import { getUrl } from 'src/composables/getUrl';
@ -29,6 +30,8 @@ const $props = defineProps({
const { notify } = useNotify();
const router = useRouter();
const session = useSession();
const token = session.getToken();
const { t } = useI18n();
const { openReport, sendEmail } = usePrintService();
const { openConfirmationModal } = useVnConfirm();

View File

@ -1,6 +1,5 @@
<script setup>
import InvoiceOutDescriptor from './InvoiceOutDescriptor.vue';
import InvoiceOutSummary from './InvoiceOutSummary.vue';
const $props = defineProps({
id: {
@ -11,10 +10,6 @@ const $props = defineProps({
</script>
<template>
<QPopupProxy>
<InvoiceOutDescriptor
v-if="$props.id"
:id="$props.id"
:summary="InvoiceOutSummary"
/>
<InvoiceOutDescriptor v-if="$props.id" :id="$props.id" />
</QPopupProxy>
</template>

View File

@ -78,7 +78,7 @@ const ticketsColumns = ref([
align: 'left',
},
{
name: 'nickname',
name: 'quantity',
label: t('invoiceOut.summary.nickname'),
field: (row) => row.nickname,
sortable: true,
@ -172,11 +172,11 @@ const ticketsColumns = ref([
</QBtn>
</QTd>
</template>
<template #body-cell-nickname="{ value, row }">
<template #body-cell-quantity="{ value, row }">
<QTd>
<QBtn class="no-uppercase link" flat dense>
{{ value }}
<CustomerDescriptorProxy :id="row.clientFk" />
<CustomerDescriptorProxy :id="row.id" />
</QBtn>
</QTd>
</template>

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