forked from verdnatura/salix-front
Compare commits
946 Commits
5926_pda_w
...
dev
Author | SHA1 | Date |
---|---|---|
Alex Moreno | fd72f4dd45 | |
Alex Moreno | 9daed096db | |
Alex Moreno | e86afd57a0 | |
Alex Moreno | d529676ab5 | |
Jorge Penadés | 4828e32c9e | |
Jorge Penadés | e26692fa51 | |
Jorge Penadés | 823c354ef1 | |
Jorge Penadés | f52b4c9a59 | |
Alex Moreno | cb2780fe6f | |
Jorge Penadés | c9cfb2b1cf | |
Alex Moreno | 48fdc9e624 | |
Jorge Penadés | f1350dece5 | |
Jorge Penadés | 2779e7ac8d | |
Jorge Penadés | d918b76010 | |
Jorge Penadés | 6f57d9e490 | |
Alex Moreno | de7f55c589 | |
Alex Moreno | 32b4636706 | |
Alex Moreno | f26976b744 | |
Javi Gallego | a0a37a68a0 | |
Jorge Penadés | 1bfede4a55 | |
Jorge Penadés | 4e31566ddd | |
Jorge Penadés | 33ee1ea01b | |
Jorge Penadés | 126bb3f039 | |
Jorge Penadés | 9673f7be1e | |
Alex Moreno | d1e4017869 | |
Alex Moreno | 5d4b5ad598 | |
Alex Moreno | 2420c6dee2 | |
Alex Moreno | 0528474250 | |
Alex Moreno | e7acdfd4f7 | |
Javi Gallego | 3cbd294168 | |
Javi Gallego | 1bf1844c8f | |
Javi Gallego | ae56c06628 | |
Alex Moreno | 735ee09ef8 | |
Alex Moreno | aaf749db6c | |
Alex Moreno | 81a55a9e7a | |
Jorge Penadés | 41509c60dd | |
Jorge Penadés | 033d6bddbe | |
Jorge Penadés | da4c1e9c12 | |
Jorge Penadés | 9f3c834ce4 | |
Jorge Penadés | b1a511ff6f | |
Alex Moreno | f9392464e5 | |
Alex Moreno | ee31bc8262 | |
Alex Moreno | 0d3e8bb5d2 | |
Alex Moreno | dd2dc86eea | |
Javi Gallego | 93025007f1 | |
Alex Moreno | cd00a3c67f | |
Alex Moreno | 0c9c01b6e9 | |
Alex Moreno | 2d81cffb33 | |
Jorge Penadés | f751408de2 | |
Alex Moreno | a732ec05fb | |
Alex Moreno | 9db1c4f721 | |
Alex Moreno | ffd4a402ab | |
Carlos Satorres | c799d17e19 | |
Alex Moreno | 36221121f5 | |
Alex Moreno | b4d4844100 | |
Jorge Penadés | 0fbd5f45e1 | |
Jon Elias | 665e84d338 | |
Jon Elias | cd4b17048c | |
Alex Moreno | c69f7af390 | |
Alex Moreno | 8478d89183 | |
Alex Moreno | 9780fe596f | |
Alex Moreno | 6f79275521 | |
Alex Moreno | 52981953f7 | |
Javier Segarra | bc1a082fe1 | |
Javier Segarra | e5064e8a37 | |
Javier Segarra | 76b69a7588 | |
Javier Segarra | cdce4d063c | |
Alex Moreno | fbd6633bdb | |
Alex Moreno | 0afcba0b07 | |
Alex Moreno | d61c690a70 | |
Jorge Penadés | a4358ec0ed | |
Jorge Penadés | 2b2ccbc6a1 | |
Alex Moreno | d221b8e3c4 | |
Alex Moreno | fcc213f307 | |
Jon Elias | 2a7bebb0b6 | |
Alex Moreno | f2147311d3 | |
Alex Moreno | 0cc1090739 | |
Jon Elias | fbfb1c654a | |
Jon Elias | 11092866b8 | |
Jon Elias | 64c0496f7a | |
Alex Moreno | f4caf6aecc | |
Alex Moreno | 175ebbc343 | |
Jorge Penadés | 55f8b78eba | |
Jorge Penadés | 2aaba93c3c | |
Jorge Penadés | 0c2d9e6ec6 | |
Jon Elias | 5c5393db6d | |
Jon Elias | 7d78ce7781 | |
Carlos Satorres | da3364b424 | |
Carlos Satorres | 8bc06593c5 | |
Carlos Satorres | 1f4b681b5b | |
Jorge Penadés | c42c811444 | |
Jon Elias | e47cdff4ca | |
Jon Elias | 98a380e026 | |
Carlos Satorres | 3cdba5dafa | |
Javier Segarra | 70ae50a5f1 | |
Javier Segarra | 4115b1b303 | |
Javier Segarra | 6b9dc8f3a6 | |
Javier Segarra | 8262406eda | |
Alex Moreno | 3069ac27d0 | |
Alex Moreno | e0c294bce6 | |
Carlos Satorres | e06ce4f8a4 | |
Carlos Satorres | cad3fddc3e | |
Carlos Satorres | a30915f99e | |
Jon Elias | 4fb3e0dadf | |
Jon Elias | c4670b57de | |
Jon Elias | 15f171da0f | |
Carlos Satorres | b4245d05fb | |
Carlos Satorres | 22cc9d689d | |
Carlos Satorres | 3badfbcff9 | |
Carlos Satorres | af830591b3 | |
Alex Moreno | 0f84baf1a8 | |
Alex Moreno | a33dde3dcf | |
Jon Elias | cdce0771c9 | |
Jon Elias | d416a34560 | |
Alex Moreno | 3bb5f66ce7 | |
Alex Moreno | d87e8ec4ae | |
Alex Moreno | a68416244c | |
Carlos Satorres | bc581caa4e | |
Carlos Satorres | dfceb9403c | |
Carlos Satorres | 29770c57bd | |
Carlos Satorres | 85eed86ba8 | |
Jorge Penadés | 523423cce6 | |
Jorge Penadés | 53fe6b0c3c | |
Jorge Penadés | 37dfca3bce | |
Jorge Penadés | 12e1d9c389 | |
Jorge Penadés | 1c7ec6af41 | |
Jorge Penadés | 19545ca7e6 | |
Jorge Penadés | 2d34921cf5 | |
Jorge Penadés | 245c027357 | |
Javier Segarra | 6633e65ee2 | |
Jorge Penadés | 0fb9b22935 | |
Carlos Satorres | 1a2c5c96fa | |
Carlos Satorres | 8258fbb91e | |
Jorge Penadés | 0f3168456a | |
Carlos Satorres | b225f6a4c8 | |
Jon Elias | 1183d86867 | |
Jon Elias | 0aab17becc | |
Jorge Penadés | 4ff3c18f33 | |
Jorge Penadés | 6f2187cb68 | |
Jorge Penadés | 4b78c1acd0 | |
Jon Elias | 720042bed9 | |
Javier Segarra | 0fae36c239 | |
Jorge Penadés | 12392444b9 | |
Jorge Penadés | fdbae5c0b5 | |
Carlos Satorres | 2edeb1043e | |
Carlos Satorres | 85b068eddb | |
Alex Moreno | 29651b425e | |
Carlos Satorres | 6a624b12a5 | |
Javier Segarra | b6bce0c2f3 | |
Javier Segarra | adbb745f0f | |
Javier Segarra | 914f6022be | |
Alex Moreno | 55b9fb1a87 | |
Jon Elias | eebac7b36c | |
Jorge Penadés | db5449444a | |
Alex Moreno | 64c8d264af | |
Javier Segarra | 3d9d08146c | |
Jorge Penadés | 50042ed45b | |
Jorge Penadés | 6d674f2a2b | |
Javier Segarra | f72761f36c | |
Javier Segarra | 2ff99d3faa | |
Javier Segarra | 3dfb836f8e | |
Jorge Penadés | 5af14b1b52 | |
Jorge Penadés | 44c4c378f9 | |
Javier Segarra | 09d40b844c | |
Jon Elias | 8b68c0afeb | |
Jorge Penadés | 830decb6db | |
Jon Elias | e58818e891 | |
Jorge Penadés | 9c6b4f28d7 | |
Jorge Penadés | cfe95df9e8 | |
Jorge Penadés | 480f243205 | |
Jorge Penadés | 00dc2c6edc | |
Jon Elias | 2dd3e09928 | |
Javier Segarra | 801b6585e8 | |
Javier Segarra | 9edf35fba2 | |
Carlos Satorres | 855032e4a6 | |
Javier Segarra | 6a79746080 | |
Javier Segarra | e0f60ed118 | |
Alex Moreno | b6778aaf17 | |
Alex Moreno | 3dad27e463 | |
Alex Moreno | 6108a26e93 | |
Alex Moreno | d8a2cdc11c | |
Carlos Satorres | 68a54ebe22 | |
Carlos Satorres | 0517b39c60 | |
Carlos Satorres | 56fff55f71 | |
Alex Moreno | bde739e7ef | |
Carlos Satorres | 73e5039ec3 | |
Jorge Penadés | 1723331615 | |
Jorge Penadés | e6535a5dd8 | |
Jorge Penadés | 4344458bb0 | |
Jorge Penadés | c815066953 | |
Guillermo Bonet | 26b4110d22 | |
Javier Segarra | a0da1b3f46 | |
Javier Segarra | 43da6ea1b8 | |
Guillermo Bonet | 50eed83d05 | |
Jorge Penadés | d1b3e01d87 | |
Jon Elias | 27dca7c35f | |
Jon Elias | afc52f6cea | |
Javier Segarra | 0ed9fdd55d | |
Carlos Satorres | 51e8d37e4b | |
Carlos Satorres | e396cd0cac | |
Jorge Penadés | d88fadca55 | |
Guillermo Bonet | a6944561de | |
Guillermo Bonet | c3eaab44ed | |
Guillermo Bonet | 178fa8cd21 | |
Alex Moreno | b1385cf08a | |
Guillermo Bonet | f98739f0ed | |
Guillermo Bonet | 4f3e7e2630 | |
Carlos Satorres | f22809d609 | |
Carlos Satorres | 27e6dd5bf1 | |
Carlos Satorres | 5d65d3e20c | |
Jorge Penadés | 5c5a359986 | |
Jorge Penadés | 947f913679 | |
Alex Moreno | 5af6c89c1a | |
Alex Moreno | ef5ae0f723 | |
Jon Elias | 33d6d529c5 | |
Jon Elias | bd3de77cbd | |
Alex Moreno | b8407140f9 | |
Alex Moreno | 426b7254d6 | |
Jorge Penadés | 120f96fedc | |
Jorge Penadés | 355c84ad06 | |
Alex Moreno | 9df5857b21 | |
Alex Moreno | 34a40dd87c | |
Javier Segarra | c9467b5286 | |
Javier Segarra | 04b2a4d9ce | |
Javier Segarra | c3c2528342 | |
Javier Segarra | a69a4577a3 | |
Pako Natek | 355b1357b7 | |
Jorge Penadés | 9383a71adb | |
Jorge Penadés | 055b1b0a88 | |
Jon Elias | aee23c75e8 | |
Jon Elias | e4e60abe0e | |
Jon Elias | 3a21f6aadb | |
Pablo Natek | d325459beb | |
Jorge Penadés | 9c5ce6dbfd | |
Jorge Penadés | 905841e0d6 | |
Jorge Penadés | 9fe3de22ac | |
Jorge Penadés | b735ccb3a0 | |
Pablo Natek | efe5208d30 | |
Jorge Penadés | 9f433afb51 | |
Pablo Natek | 1869e3315a | |
Pablo Natek | 7dc019cfbb | |
Jorge Penadés | a311cf00d2 | |
Jon Elias | 195747b5a0 | |
Carlos Satorres | 45c8f6f4c5 | |
Jorge Penadés | ae8e4ba4b9 | |
Jorge Penadés | 67c2e284ba | |
Carlos Satorres | 0d31adaa4b | |
Jorge Penadés | e43ba9b58a | |
Jon Elias | 7874db1647 | |
Jorge Penadés | cebb3b2b16 | |
Pablo Natek | 222e83cad8 | |
Jon Elias | 4b9588c189 | |
Pablo Natek | 4ba52f1a56 | |
Pablo Natek | 7d0e3e6fd4 | |
Pablo Natek | 4a357c5be6 | |
Pablo Natek | 99ba7a39fa | |
Carlos Satorres | 530ed4b716 | |
Jorge Penadés | c64fe8c044 | |
Jorge Penadés | b0ba6a5e0f | |
Jorge Penadés | cd20db637c | |
Jorge Penadés | aca10b81af | |
Pablo Natek | c04dad38f1 | |
Jorge Penadés | e10088ed06 | |
Jorge Penadés | ad8b72660f | |
Jorge Penadés | c78e816f0c | |
Jorge Penadés | fadfafbb1d | |
Pablo Natek | 05a1d0e8fb | |
Jorge Penadés | 01dc25da8c | |
Jorge Penadés | a8c48789ca | |
Jorge Penadés | 30e34ea299 | |
Pablo Natek | 629524d63f | |
Jorge Penadés | 9b8e388525 | |
Pablo Natek | 06fa5b13a4 | |
Jorge Penadés | 739671a6da | |
Jorge Penadés | 1536cbe205 | |
Jon Elias | b93375f5a4 | |
Jon Elias | 6a1bb6d41f | |
Jon Elias | 8ee4edc5d5 | |
Javi Gallego | df64814c57 | |
Javi Gallego | 641a25097d | |
Javi Gallego | ed5cf137b0 | |
Javi Gallego | b08a5e63e9 | |
Alex Moreno | 58a94599a9 | |
Javier Segarra | fef875270e | |
Pablo Natek | 5e59ecdb43 | |
Alex Moreno | 8de5602564 | |
Jon Elias | be53b466b9 | |
Jon Elias | 0b76d0d556 | |
Carlos Satorres | f9e3c92e68 | |
Carlos Satorres | ba3b2198b8 | |
Jon Elias | 0650380b7b | |
Jon Elias | e6dc2f16b8 | |
Jon Elias | 375adfab76 | |
Carlos Satorres | e374059f41 | |
Jon Elias | c54189e06a | |
Jon Elias | 98df741f1b | |
Carlos Satorres | 49da7168ab | |
Jon Elias | 12727e93eb | |
Jon Elias | 8fc3b2e86d | |
Jon Elias | 7db166974f | |
Carlos Satorres | c2c4acfc30 | |
Javier Segarra | c987a1151c | |
Javier Segarra | 692c649b8c | |
Jon Elias | 03a3d6bd50 | |
Javier Segarra | 2bd004f52b | |
Javier Segarra | 6b38bdf868 | |
Pablo Natek | c0fd5a1c21 | |
Javi Gallego | 38599be9bd | |
Javi Gallego | 36457f704d | |
Javi Gallego | 2f5358d439 | |
Javier Segarra | 2ca99a51ae | |
Jon Elias | 209c88884f | |
Javier Segarra | 1a697aa018 | |
Carlos Satorres | d69336c82a | |
Javi Gallego | 4399a91e99 | |
Javi Gallego | 589c672ab2 | |
Javier Segarra | ea7c799909 | |
Jon Elias | 7b63bb38f2 | |
Jon Elias | 21edf4b5d9 | |
Javier Segarra | 6e4677848f | |
Alex Moreno | ddffd5b1c7 | |
Alex Moreno | 9b90487b6a | |
Alex Moreno | 2e9a8d9205 | |
Alex Moreno | 7ae90908c4 | |
Javier Segarra | 696c9ca9b3 | |
Javier Segarra | 27b2d0232c | |
Jon Elias | 90ce9b2cd3 | |
Jon Elias | de01dda2ed | |
Carlos Satorres | e64e6eefe3 | |
Javier Segarra | 8fa82c818d | |
Javier Segarra | 30767b110f | |
Javier Segarra | d6efd21db6 | |
Javier Segarra | e9364f69d4 | |
Javier Segarra | 778e6299ce | |
Jon Elias | 86ab9f9540 | |
Jon Elias | 10bada7463 | |
Javier Segarra | 41acf0e1e2 | |
Javier Segarra | e7a2d3aa85 | |
Alex Moreno | 90853396ba | |
Javier Segarra | 03450a86fb | |
Javier Segarra | 4d4554a6ca | |
Alex Moreno | 732bb0943c | |
Alex Moreno | 35179695c3 | |
Javier Segarra | 2302e22f11 | |
Jon Elias | 3c5a5c3905 | |
Jon Elias | 76a77dcee9 | |
Pablo Natek | 6014ccebb4 | |
Pablo Natek | deb608cc96 | |
Javier Segarra | 2d9dbbd23d | |
Javier Segarra | 7001a707b9 | |
Javier Segarra | da78edb6d2 | |
Javier Segarra | 48b7b879f2 | |
Javier Segarra | 2812e6f456 | |
Javier Segarra | d4dc12ebe3 | |
Javier Segarra | cf509d608a | |
Javier Segarra | b3c36e555f | |
Javier Segarra | b41026806f | |
Javier Segarra | cf67865b0b | |
Pablo Natek | 90762f1d1c | |
Pablo Natek | 7fa0a5b28c | |
Javier Segarra | 63d2b06b70 | |
Pablo Natek | 37d32a7934 | |
Pablo Natek | c815177be9 | |
Pablo Natek | 868e6a312f | |
Pablo Natek | cb0d3c5bca | |
Javier Segarra | fd202f30d2 | |
Javier Segarra | 9d7db2020b | |
Javier Segarra | 36838f930c | |
Pablo Natek | e5eb1d7663 | |
Pablo Natek | f005674db6 | |
Javier Segarra | 8356be1ec0 | |
Javier Segarra | 12a452d774 | |
Javier Segarra | cffd97a521 | |
Javier Segarra | bec50d6eed | |
Javier Segarra | 5097cc8b81 | |
Javier Segarra | 157370ec26 | |
Pablo Natek | 336f2ba89e | |
Pablo Natek | 193670fdcf | |
Javier Segarra | e06d567e3c | |
Jon Elias | 45c0d0ae3f | |
Jorge Penadés | b541ce4e56 | |
Javier Segarra | 2990d32705 | |
Jon Elias | 2be969339e | |
Jon Elias | 6b0a0f71ce | |
Javier Segarra | 6b2e0df9c2 | |
Javier Segarra | d2067c633d | |
Javier Segarra | 807827c97c | |
Javier Segarra | d5253149ed | |
Javier Segarra | 3caeb9e738 | |
Jorge Penadés | 71201f1007 | |
Javi Gallego | a2b7e81982 | |
Jorge Penadés | 11c135e8c4 | |
Jorge Penadés | ba9f1407ac | |
Jorge Penadés | 353116a7a0 | |
Jorge Penadés | 7eb951ef13 | |
Jorge Penadés | 14b7654db3 | |
Jorge Penadés | 18ea23adf1 | |
Pablo Natek | 6e6b88d340 | |
Javier Segarra | 428c6966f2 | |
Jorge Penadés | 01b62adba9 | |
Javier Segarra | bbf3b6d4b7 | |
Javier Segarra | a0b3e933a8 | |
Alex Moreno | f00db79d47 | |
Jon Elias | 9386d648d0 | |
Jon Elias | 1c99c01d1d | |
Jorge Penadés | 2057189b8e | |
Jorge Penadés | c5766aa1b3 | |
Jon Elias | 51aae0f726 | |
Jon Elias | 6d5a8cba6f | |
Jorge Penadés | c2b52473a1 | |
Jorge Penadés | e827d3aabf | |
Jorge Penadés | 478d4695b8 | |
Jorge Penadés | 0cffe0b586 | |
Jorge Penadés | 709a662ceb | |
Pablo Natek | 6e6b65771a | |
Javi Gallego | 9095c579db | |
Pablo Natek | c388d5ab2a | |
Javier Segarra | 0b47623011 | |
Javier Segarra | a8c96278de | |
Jon Elias | 56af4d3736 | |
Javi Gallego | dcfdabde32 | |
Javier Segarra | 73c45b8c4a | |
Jorge Penadés | 68ebda625b | |
Javi Gallego | eb0e18bf58 | |
Javi Gallego | bd2fa37450 | |
Alex Moreno | 8c13ceb3fe | |
Alex Moreno | 5f4df6eb96 | |
Alex Moreno | bcada72f04 | |
Alex Moreno | 6bd2835c59 | |
Alex Moreno | 9a11f94922 | |
Alex Moreno | 8dd2c44832 | |
Alex Moreno | f04beb8f90 | |
Jorge Penadés | 0dec6edc68 | |
Jorge Penadés | aab428494e | |
Pablo Natek | cea5edd506 | |
Javier Segarra | 357f3ba308 | |
Jorge Penadés | d2996f0838 | |
Pablo Natek | ca568c31ca | |
Javier Segarra | 53d5d123c2 | |
Javier Segarra | fb180f0198 | |
Javier Segarra | 77ad96a58b | |
Pablo Natek | 27b699ebf4 | |
Javier Segarra | a0c324c339 | |
Javier Segarra | 72ddeaa90a | |
Jorge Penadés | 45b3ed6e17 | |
Jorge Penadés | b54d358617 | |
Javier Segarra | 8c7ee3024f | |
Jorge Penadés | dc6acfadb7 | |
Pablo Natek | 1ee3691cc0 | |
Jon Elias | a14eb53f14 | |
Jon Elias | 4ff068aa8a | |
Javier Segarra | c1087614c6 | |
Javier Segarra | e8a0d44292 | |
Jon Elias | ff3ab83727 | |
Javier Segarra | bc37e372f5 | |
Javier Segarra | 2a64d9643e | |
Jorge Penadés | 86a82c5aad | |
Alex Moreno | d35b40a891 | |
Alex Moreno | 991ad21c77 | |
Pablo Natek | f0c2baa60e | |
Pablo Natek | 70d640dc37 | |
Jon Elias | 67a1c28670 | |
Alex Moreno | 32328da370 | |
Alex Moreno | c9e4ab490d | |
Alex Moreno | e555bd4cde | |
Alex Moreno | d85705bb39 | |
Jon Elias | 8315eb2b4c | |
Javier Segarra | 41f168ebbe | |
Javier Segarra | 3affd8712c | |
Alex Moreno | 3d34d9c6bb | |
Jon Elias | 8ac0083b9c | |
Jon Elias | 21f7613f21 | |
Jon Elias | f34e81038e | |
Jon Elias | cd96003c0e | |
Jorge Penadés | 3eb846b70c | |
Alex Moreno | edb6e9ce61 | |
Alex Moreno | 2d90a75fa0 | |
Javier Segarra | 6e57306026 | |
Jon Elias | f2ae231efb | |
Jorge Penadés | 42e4493fb6 | |
Jon Elias | 768e15755f | |
Jon Elias | 2c73ce28c3 | |
Pablo Natek | c400929c99 | |
Alex Moreno | eaadacd332 | |
Alex Moreno | b7ed63afc6 | |
Alex Moreno | 8760781660 | |
Alex Moreno | 98a3b03be7 | |
Alex Moreno | 1f9850f520 | |
Alex Moreno | 5fc306e11e | |
Alex Moreno | 96edfd4b6e | |
Pablo Natek | 8124a341a0 | |
Javier Segarra | a5c6d628ca | |
Javier Segarra | 55e017b0cc | |
Javier Segarra | 3ede256dc5 | |
Jorge Penadés | 2cb9899de1 | |
Javier Segarra | b4b31c0c92 | |
Javier Segarra | e9e2caee85 | |
Javier Segarra | 27a3e36b58 | |
Javier Segarra | 13b519e4b3 | |
Javier Segarra | ab0c38810a | |
Javier Segarra | caddcf45c3 | |
Javier Segarra | 3cfa883642 | |
Javier Segarra | 5803af7a74 | |
Javier Segarra | 0c1114e89e | |
Javier Segarra | ac8aa6bcc1 | |
Javier Segarra | e651b7ad82 | |
Jon Elias | 4fc3f08f77 | |
Jon Elias | b728b7c5bd | |
Jon Elias | 3716507f93 | |
Alex Moreno | d3b45af7e5 | |
Robert Ferrús | d13cab0a24 | |
Javier Segarra | 0829b6d0d2 | |
Javier Segarra | 6a8ed89a71 | |
Pablo Natek | b04564d5a8 | |
Pablo Natek | e700f6f4a8 | |
Jorge Penadés | f809e0fb31 | |
Javier Segarra | 279a100f8b | |
Javier Segarra | a52cdf8f94 | |
Robert Ferrús | 5ebbb1cf73 | |
Robert Ferrús | 1ae20202cc | |
Javier Segarra | 7713e33c67 | |
Javier Segarra | 013a76cbce | |
Javier Segarra | f06723a919 | |
Jorge Penadés | 7bbad14f53 | |
Alex Moreno | 29cc14673a | |
Alex Moreno | 951b8fc1fa | |
Javier Segarra | 66cb069109 | |
Javier Segarra | 88fd40eae6 | |
Jon Elias | 0dd79ed708 | |
Jon Elias | f025b4361e | |
Pablo Natek | 17bb144bce | |
Javier Segarra | 8bbea9c903 | |
Jorge Penadés | 37545b4cab | |
Jon Elias | 4c071aea8b | |
Javier Segarra | 2a97f35dd9 | |
Javier Segarra | d81d562edf | |
Javier Segarra | f5c50e842e | |
Javier Segarra | f84444d894 | |
Jorge Penadés | 6cc8ca6731 | |
Jorge Penadés | fc23f9a8dd | |
Jorge Penadés | e8beebff32 | |
Jorge Penadés | df56eefe2f | |
Jorge Penadés | cf11573713 | |
Jon Elias | edea17340d | |
Jorge Penadés | deff8a1cf4 | |
Javier Segarra | ddf42d9659 | |
Javier Segarra | b822c7722b | |
Jorge Penadés | 6216eedd88 | |
Jorge Penadés | 7a253d314c | |
Jorge Penadés | 3e101242f6 | |
Jorge Penadés | 87efc2f355 | |
Jorge Penadés | e1f3589110 | |
Javier Segarra | 271e33a999 | |
Jorge Penadés | ac6d98cd36 | |
Jorge Penadés | 26f34619c0 | |
Jorge Penadés | b2cc74d890 | |
Jon Elias | d7fb8bdaf5 | |
Jorge Penadés | 075c129036 | |
Jorge Penadés | 3b709c20cf | |
Jorge Penadés | 2537e58ff3 | |
Carlos Satorres | 28cd15508f | |
Carlos Satorres | 681c72a3d0 | |
Carlos Satorres | 45b5433206 | |
Jon Elias | 2c15f79a2d | |
Jon Elias | 44d98865fe | |
Javier Segarra | 650e801433 | |
Alex Moreno | 1150739de7 | |
Alex Moreno | f03a2aebee | |
Alex Moreno | 4f442a1f5a | |
Javier Segarra | 8e96265106 | |
Jon Elias | a012660518 | |
Jorge Penadés | 489b74fff8 | |
Jon Elias | c0dab66a24 | |
Javier Segarra | 88e2ea48c2 | |
Javier Segarra | 8b379faa52 | |
Jon Elias | 8fa11263e8 | |
Javier Segarra | cc4f7de966 | |
Javier Segarra | 35e89591ff | |
Javier Segarra | 46dbab4757 | |
Javier Segarra | 297596fe38 | |
Javier Segarra | 1425ec268c | |
Javier Segarra | aa97ac2810 | |
Jorge Penadés | 2e8397a34b | |
Javier Segarra | c21133ebd4 | |
Javier Segarra | ccfe61d777 | |
Javier Segarra | 1550d79160 | |
Javier Segarra | 08bec59a37 | |
Javier Segarra | 1cb2981f97 | |
Javi Gallego | b3f27d9a84 | |
Javier Segarra | 3de08826ac | |
Alex Moreno | 5ca38ca825 | |
Javier Segarra | b59e7174df | |
Alex Moreno | 7b70734eb8 | |
Javier Segarra | d76250f56f | |
Javier Segarra | ee0f4037ed | |
Javier Segarra | 98411d3c29 | |
Carlos Satorres | a302050494 | |
Carlos Satorres | 364ce63545 | |
Jon Elias | 9db12a8dee | |
Javier Segarra | 37329a7391 | |
Alex Moreno | f86525e31d | |
Alex Moreno | 3906fc386f | |
Alex Moreno | cba8647ac2 | |
Jon Elias | 34f70d026e | |
Alex Moreno | 8abd375985 | |
Alex Moreno | 21a7fafba5 | |
Javier Segarra | 9d210ace84 | |
Jorge Penadés | 5625ef4ce1 | |
Javier Segarra | aa6dac3944 | |
Jorge Penadés | aa33e42701 | |
Jon Elias | 07cd9d5aae | |
Jon Elias | 98faf22e73 | |
Alex Moreno | f1759eca04 | |
Jon Elias | 3a95cf123e | |
Jon Elias | 566d657f70 | |
Alex Moreno | fb1a94604b | |
Jorge Penadés | 41c43fde76 | |
Jorge Penadés | 84cf3bea95 | |
Carlos Satorres | 4f662375cd | |
Pablo Natek | 6886c18ddc | |
Javier Segarra | e40f216e33 | |
Javier Segarra | c7bef79c0a | |
Pablo Natek | cead2c2b5e | |
Pablo Natek | e559ab43d7 | |
Jorge Penadés | 47de2caed7 | |
Jorge Penadés | eb6f12ae3b | |
Jorge Penadés | ed4a4e1e59 | |
Jorge Penadés | 2cb2ce16ef | |
Jorge Penadés | 3f03f0d4e9 | |
Javier Segarra | 29e4c723c9 | |
Jorge Penadés | 4edcff41f1 | |
Jorge Penadés | 56f8cbe615 | |
Jon Elias | 162c7858ff | |
Jon Elias | 58cd0b54cf | |
Carlos Satorres | 3b59dc7fb5 | |
Carlos Satorres | 044156356c | |
Javier Segarra | 907e6dbf4f | |
Alex Moreno | 3d6e9f9600 | |
Alex Moreno | 3d1bb0c67a | |
Pablo Natek | 7faa0c240f | |
Alex Moreno | 198c47f0c9 | |
Javier Segarra | 6dc337e585 | |
Javier Segarra | e4adbfa9f7 | |
Alex Moreno | 37b6a03288 | |
Jon Elias | 6edabd856c | |
Jon Elias | 479f2a8e53 | |
Alex Moreno | 07010548bf | |
Jorge Penadés | da7d0326c0 | |
Jorge Penadés | 1ff15da8ca | |
Alex Moreno | dc047435f5 | |
Alex Moreno | 09cdd2f7e7 | |
Alex Moreno | b4cee6b02f | |
Javier Segarra | af4756d810 | |
Javier Segarra | 603fb1de71 | |
Javier Segarra | cf95cd7db7 | |
Javier Segarra | 6ffd985575 | |
Jon Elias | cb87f4dce1 | |
Jon Elias | ae76bd0b0e | |
Javier Segarra | eb8690a422 | |
Javier Segarra | d384894bf0 | |
Jorge Penadés | 3c14d94bf1 | |
Jorge Penadés | 8577f33599 | |
Pablo Natek | 263dc29d7a | |
Jon Elias | e6278d51eb | |
Javier Segarra | 27069e56b8 | |
Jorge Penadés | b015397822 | |
Jorge Penadés | 91dccd10d3 | |
Jorge Penadés | 9ec2fb4c77 | |
Alex Moreno | a2f9178832 | |
Alex Moreno | 4c8238455f | |
Alex Moreno | 5c3c511568 | |
Alex Moreno | 8c4e4a16af | |
Jorge Penadés | 153c9b743f | |
Pablo Natek | c59c8127cc | |
Pablo Natek | deb30ee955 | |
Jon Elias | c08167c5a9 | |
Guillermo Bonet | 07e45f2051 | |
Guillermo Bonet | 57b939bdd5 | |
Guillermo Bonet | b6ee1ac2bc | |
Guillermo Bonet | fd3b09f6f0 | |
Javier Segarra | 93488a5750 | |
Javier Segarra | b6cce74449 | |
Javier Segarra | 401400bdcf | |
Javier Segarra | ed5ba1dd1a | |
Javier Segarra | 8ce082d841 | |
Javier Segarra | 9c36a113e1 | |
Jorge Penadés | 98cdeabe9f | |
Javier Segarra | 6e6af0af80 | |
Guillermo Bonet | eca34e2c0f | |
Jon Elias | 6f9e46f7a0 | |
Carlos Satorres | 842fb9de5f | |
Jorge Penadés | 4bf8e1224d | |
Jorge Penadés | e90b78c4c5 | |
Jorge Penadés | 6983245d7d | |
Jon Elias | c291ea267c | |
Jon Elias | 0f604ea8b5 | |
Jorge Penadés | 48a5c15b9d | |
Javier Segarra | a56dc7aa08 | |
Javier Segarra | 5796bc9c0a | |
Jorge Penadés | 58be11df04 | |
Javier Segarra | 025436b4b8 | |
Javier Segarra | a5ea940dd8 | |
Jorge Penadés | 9d63bd1f02 | |
Jorge Penadés | 46fb7d0c73 | |
Jorge Penadés | dcde6a1b9d | |
Jon Elias | 4a0b92eded | |
Alex Moreno | 0dbcc4be3d | |
Alex Moreno | f731e4f1a6 | |
Carlos Satorres | 8be1833f9e | |
Jon Elias | 770663cc37 | |
Jon Elias | ed5987630f | |
Jon Elias | 6c4f5ef915 | |
Jon Elias | eca4b02022 | |
Alex Moreno | 6703511ce9 | |
Javier Segarra | 67140e4383 | |
Javier Segarra | b36f072b24 | |
Javier Segarra | aca13d9119 | |
Javier Segarra | fa408dc226 | |
Javier Segarra | 6e784bb290 | |
Javier Segarra | 54fc7f6394 | |
Javier Segarra | 39f2deafc4 | |
Javier Segarra | 70d0132710 | |
Javier Segarra | 24f4af712e | |
Javier Segarra | 8fc7e3cfb4 | |
Javier Segarra | a29ee42b9e | |
Jorge Penadés | 5907fedcd6 | |
Jorge Penadés | 6adcaff5d8 | |
Alex Moreno | dcb8c5daad | |
Jon Elias | bb1eb30a25 | |
Javier Segarra | cfdfc7f531 | |
Jorge Penadés | 44fd356d63 | |
Jon Elias | b4c46dc153 | |
Jorge Penadés | adb9cac360 | |
Javier Segarra | ea37015ec2 | |
Jon Elias | b8f6bc26ad | |
Jon Elias | d00a88a3f4 | |
Jon Elias | be389c6736 | |
Jon Elias | 35247007f0 | |
Jon Elias | e5056c45c0 | |
Javier Segarra | 058039fd61 | |
Javier Segarra | 856d551503 | |
Javier Segarra | 29bd3f0516 | |
Javier Segarra | a3afe790b9 | |
Javier Segarra | c22f8f1069 | |
Javier Segarra | c7adb91912 | |
Javier Segarra | 3892df250c | |
Javier Segarra | 25b7569791 | |
Jon Elias | 4a1f5e922c | |
Jon Elias | 6a5f31ff1e | |
Javier Segarra | 9941975683 | |
Alex Moreno | ccbd6fad19 | |
Alex Moreno | 368e013f54 | |
Jorge Penadés | 1dffa8865e | |
Jorge Penadés | e10ab5863a | |
Jorge Penadés | 59f6913a74 | |
Jorge Penadés | d92659289b | |
Jorge Penadés | 22bc8f2414 | |
Alex Moreno | 9d055a48c4 | |
Jorge Penadés | 6b79d70551 | |
Alex Moreno | d822bb6f20 | |
Pablo Natek | e2dbe0fd38 | |
Alex Moreno | 4a234dd875 | |
Alex Moreno | 8bf7b729d4 | |
Alex Moreno | 8d04d50a13 | |
Javier Segarra | 233841ad16 | |
Jon Elias | 05f770e469 | |
Jon Elias | 18fc5e241c | |
Javier Segarra | 8d96539b24 | |
Javier Segarra | c3108b4335 | |
Javier Segarra | d072a11c1b | |
Javier Segarra | f02ca7437c | |
Carlos Satorres | 98056b2bcb | |
Jorge Penadés | 9219fa07f5 | |
Jon Elias | 422907447b | |
Jon Elias | d1138529b2 | |
Carlos Satorres | 1c9e13fe15 | |
Jorge Penadés | b559f2f18c | |
Jon Elias | ff7bcfb00a | |
Jorge Penadés | 2b012d2de4 | |
Jorge Penadés | aa5ef76dcf | |
Jorge Penadés | 2d5602e784 | |
Alex Moreno | b9c721728f | |
Alex Moreno | e2d3154878 | |
Javier Segarra | 2d8322c6da | |
Jorge Penadés | 568fd9ae1a | |
Jorge Penadés | 49f90801a8 | |
Javier Segarra | 19eb770893 | |
Pablo Natek | c7e717c611 | |
Javier Segarra | b5dcc865e0 | |
Javier Segarra | 622afca9be | |
Jorge Penadés | a41143b410 | |
Jorge Penadés | 77f2a4d825 | |
Jorge Penadés | 070c9ca25f | |
Carlos Satorres | 7b2545798c | |
Javier Segarra | bcfa67baec | |
Jon Elias | 8e35737c8e | |
Jon Elias | e7a89138ba | |
Carlos Satorres | 1ba66bcba2 | |
Carlos Satorres | 8c57bca4e0 | |
Jorge Penadés | 5cc1d0cec4 | |
Jorge Penadés | f9adc49284 | |
Jon Elias | b4fb9ceb2e | |
Jon Elias | abc39633bf | |
Jon Elias | 30ffb2428e | |
Jon Elias | 6790067a89 | |
Jon Elias | e1adb1a8dd | |
Jon Elias | 8f8462db94 | |
Jon Elias | 6248a4117d | |
Javier Segarra | 83d3246377 | |
Javier Segarra | 2667d3afae | |
Jon Elias | e702e9d1a1 | |
Jon Elias | f78ca3f357 | |
Jon Elias | 5f546a47bf | |
Alex Moreno | 684215fc46 | |
Jon Elias | 0b961050a0 | |
Jon Elias | 94ae74ca7f | |
Jon Elias | 4630496361 | |
Jon Elias | b61e2a5c28 | |
Pablo Natek | e083d6a802 | |
Jon Elias | 4636e2f2e6 | |
Jon Elias | 04f4521a59 | |
Jon Elias | 0e5607d685 | |
Jorge Penadés | 6f98f24926 | |
Jorge Penadés | b13874e8a1 | |
Pablo Natek | cd12343302 | |
Jon Elias | e962063753 | |
Jon Elias | 8ff9dae1d8 | |
Jon Elias | 102f7fb13e | |
Javier Segarra | 1f96f5c09a | |
Javier Segarra | b3391ab522 | |
Javier Segarra | 31abd8b4c5 | |
Javier Segarra | 6476a8307a | |
Javier Segarra | 62cdc1d527 | |
Jon Elias | 9f24a7bc29 | |
Jon Elias | db6f4fd15a | |
Jorge Penadés | fc5eb20dba | |
Javier Segarra | cf3b9b2ef8 | |
Jorge Penadés | af5e47ed3e | |
Pablo Natek | 717bf1c3e3 | |
Pablo Natek | 3dc720e2d0 | |
Jon Elias | 65e3fd874d | |
Jon Elias | f5eacea483 | |
Jon Elias | 1889aa85b5 | |
Jon Elias | 5edea7cad1 | |
Jon Elias | 0d9773a30f | |
Jon Elias | 4bc148f16b | |
Jon Elias | 5471607d32 | |
Jon Elias | cb7d729b0f | |
Jorge Penadés | 50cdb053f8 | |
Jorge Penadés | edfc6ace0a | |
Jon Elias | 58eca71e95 | |
Jon Elias | f35e33cf10 | |
Pablo Natek | 74b47361c4 | |
Jorge Penadés | 3e81b34379 | |
Pablo Natek | 2fb974af0f | |
Jon Elias | d18ca14b4e | |
Jon Elias | 3d683c1da3 | |
Jon Elias | b622f6ef96 | |
Jorge Penadés | 1824d9a0e9 | |
Jon Elias | 76a7f8a1b3 | |
Jon Elias | e4e9496cac | |
Jon Elias | 5fc33cb4c3 | |
Jon Elias | 8bcecb91c6 | |
Jon Elias | 45d9322892 | |
Javier Segarra | c25b689685 | |
Javier Segarra | 00acd5b0ab | |
Javier Segarra | 4762c9fa53 | |
Javier Segarra | d155b40bde | |
Javier Segarra | 0314ca8397 | |
Javier Segarra | 52883dfb52 | |
Javier Segarra | 8b4fcbd888 | |
Javier Segarra | b66ff783be | |
Javier Segarra | c727e5f669 | |
Javier Segarra | 375e65aed0 | |
Javier Segarra | bdffdce966 | |
Javier Segarra | 7d526f4aa4 | |
Javier Segarra | e8f660ea37 | |
Javier Segarra | 1b5658726e | |
Javier Segarra | ca74ad85b4 | |
Javier Segarra | 20ddabcc01 | |
Javier Segarra | cadd6a2b62 | |
Javier Segarra | 3ea8490e98 | |
Javier Segarra | b481876e81 | |
Javier Segarra | 452b084caf | |
Javier Segarra | b8dea8551d | |
Javier Segarra | 071f3ba4d0 | |
Javier Segarra | 61c7c622f7 | |
Javier Segarra | db97e8322e | |
Javier Segarra | 10747d7a4f | |
Jorge Penadés | 3aa3d2d8d4 | |
Javier Segarra | 9a48cb0742 | |
Javier Segarra | 6c887c36b1 | |
Javier Segarra | 56f687ce36 | |
Javier Segarra | 0d99c5f609 | |
Javier Segarra | c382118492 | |
Javier Segarra | bc1ea611ce | |
Javier Segarra | 390ab9cfd1 | |
Javier Segarra | 14961d0aec | |
Javier Segarra | aebf6d7a8e | |
Javier Segarra | a131cb559d | |
Jon Elias | ffa6ef57fe | |
Jon Elias | 6b2df03b06 | |
Jon Elias | 56c461f085 | |
Javier Segarra | 6218463e7e | |
Javier Segarra | 87eca93ef8 | |
Jon Elias | 79a26d7b94 | |
Jon Elias | 5f63a9b058 | |
Jon Elias | 85bc610298 | |
Javier Segarra | f927e9b722 | |
Jon Elias | 511d53d109 | |
Jon Elias | 574a2efc92 | |
Jon Elias | 23e5072d38 | |
Jon Elias | 4a57c53c3d | |
Alex Moreno | e45e551526 | |
Jorge Penadés | bdaba6b3ef | |
Alex Moreno | 793001be6e | |
Alex Moreno | dae71dacfc | |
Alex Moreno | bd83a959f7 | |
Javier Segarra | 9eff6b56ea | |
Javier Segarra | 8acd008f42 | |
Javier Segarra | 55b9cd9ff4 | |
Javier Segarra | 92130b4c9c | |
Javier Segarra | 3e44c6e404 | |
Pablo Natek | c31aa3258f | |
Pablo Natek | 40e46f5a72 | |
Pablo Natek | ffd7d98e9c | |
Jorge Penadés | c8ab5b3bfd | |
Pablo Natek | cf1545d5e8 | |
Pablo Natek | de94b3629e | |
Pablo Natek | f2be2b4300 | |
Jon Elias | 954a6ff6c0 | |
Jon Elias | 2a4180a1c3 | |
Jon Elias | 3330e43e25 | |
Jon Elias | 61f1eae282 | |
Jon Elias | 7c5f5aee77 | |
Jon Elias | 1dace39882 | |
Jon Elias | 2ab7d48b0c | |
Jon Elias | fee7743b6e | |
Jon Elias | 4188569908 | |
Jon Elias | 8ceee6f182 | |
Javier Segarra | 3a0204d27b | |
Jon Elias | a7a1b7801c | |
Jon Elias | 12370b6437 | |
Javier Segarra | 3f1c0b95fa | |
Jon Elias | 5926381f36 | |
Pablo Natek | 8a3b575157 |
361
CHANGELOG.md
361
CHANGELOG.md
|
@ -1,3 +1,364 @@
|
|||
# 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 🆕
|
||||
|
||||
- chore: refs #6772 fix e2e (origin/6772-warmfix-fixE2e) by:jorgep
|
||||
- chore: refs #7323 worker changes by:jorgep
|
||||
- chore: refs #7353 fix warnings by:jorgep
|
||||
- chore: refs #7353 use Vue component nomenclature by:jorgep
|
||||
- chore: refs #7356 fix type by:jorgep
|
||||
- feat(AccountConnections): use VnToken by:alexm
|
||||
- feat: add key to routerView by:Javier Segarra
|
||||
- feat: add plus shortcut in VnTable by:Javier Segarra
|
||||
- feat: add row by:Javier Segarra
|
||||
- feat: addRow withour dialog by:Javier Segarra
|
||||
- feat: apply mixin by:Javier Segarra
|
||||
- feat by:Javier Segarra
|
||||
- feat: change navBar buttons by:Javier Segarra
|
||||
- feat: dense rows by:Javier Segarra
|
||||
- feat: fields with wrong name by:jgallego
|
||||
- feat: fix bugs and filters by:Javier Segarra
|
||||
- feat: fix refund parameters by:jgallego
|
||||
- feat: handle create row by:Javier Segarra
|
||||
- feat: handle dates by:Javier Segarra
|
||||
- feat: handle qCheckbox 3rd state by:Javier Segarra
|
||||
- feat: imrpove VnInputTime to set cursor at start by:Javier Segarra
|
||||
- feat: keyShortcut directive by:Javier Segarra
|
||||
- feat: minor fixes by:jgallego
|
||||
- feat: only filter by isDestiny by:Javier Segarra
|
||||
- feat: refs #211153 businessDataLinkGrafana by:robert
|
||||
- feat: refs #7129 add km start and end on create form by:pablone
|
||||
- feat: refs #7353 add filter & fix customTags by:jorgep
|
||||
- feat: refs #7353 add locale by:jorgep
|
||||
- feat: refs #7353 add no one opt by:jorgep
|
||||
- feat: refs #7353 add right icons by:jorgep
|
||||
- feat: refs #7353 imporve toDateFormat by:jorgep
|
||||
- feat: refs #7353 salesPerson nickname & id by:jorgep
|
||||
- feat: refs #7353 split sections by:jorgep
|
||||
- feat: refs #7847 remove reload btn by:jorgep
|
||||
- feat: refs #7847 remove reload fn by:jorgep
|
||||
- feat: refs #7889 added shortcuts to modules by:Jon
|
||||
- feat: refs #7911 added shortcut to modules by:Jon
|
||||
- feat: refuncInvoiceForm component by:jgallego
|
||||
- feat: remove duplicity by:Javier Segarra
|
||||
- feat: remove future itemFixedPrices by:Javier Segarra
|
||||
- feat: replace stickyButtons by subtoolbar by:Javier Segarra
|
||||
- feat: required validation by:Javier Segarra
|
||||
- feat: show bad dates by:Javier Segarra
|
||||
- feat: showdate icons by:Javier Segarra
|
||||
- feat: solve ItemFixedFilterPanel by:Javier Segarra
|
||||
- feat: transfer an invoice by:jgallego
|
||||
- feat: try to fix ItemFixedFilterPanel by:Javier Segarra
|
||||
- feat: unnecessary changes by:Javier Segarra
|
||||
- feat: update changelog (origin/7896_down_devToTest_2436) by:Javier Segarra
|
||||
- feat: updates by:Javier Segarra
|
||||
- feat: update version and changelog by:Javier Segarra
|
||||
- feat: vnInput\* by:Javier Segarra
|
||||
- feat: with VnTable by:Javier Segarra
|
||||
- refs #6772 feat: fix approach by:Javier Segarra
|
||||
- refs #6772 feat: refresh shelving.basic-data by:Javier Segarra
|
||||
- style: show subName value by:Javier Segarra
|
||||
|
||||
### Changed 📦
|
||||
|
||||
- perf: add v-shortcut in VnCard by:Javier Segarra
|
||||
- perf: approach by:Javier Segarra
|
||||
- perf: change directive location by:Javier Segarra
|
||||
- perf: change slots order by:Javier Segarra
|
||||
- perf: examples by:Javier Segarra
|
||||
- perf: hide icon for VnInputDate by:Javier Segarra
|
||||
- perf: improve ItemFixedPricefilterPanel by:Javier Segarra
|
||||
- perf: improve mainShrotcutMixin by:Javier Segarra
|
||||
- perf: minor clean code by:Javier Segarra
|
||||
- perf: onRowchange by:Javier Segarra
|
||||
- perf: order by by:Javier Segarra
|
||||
- perf: order components by:Javier Segarra
|
||||
- perf: refs #7889 perf shortcut test by:Jon
|
||||
- perf: remove console.log by:Javier Segarra
|
||||
- perf: remove icons in header slot by:Javier Segarra
|
||||
- perf: remove print variables by:Javier Segarra
|
||||
- perf: restore CustomerBasicData by:Javier Segarra
|
||||
- refactor: deleted useless prop by:Jon
|
||||
- refactor: deleted useless prop in FetchedTags by:Jon
|
||||
- refactor: refs #7323 drop useless code by:jorgep
|
||||
- refactor: refs #7353 clients correction by:jorgep
|
||||
- refactor: refs #7353 clients correction wip by:jorgep
|
||||
- refactor: refs #7353 ease logic by:jorgep
|
||||
- refactor: refs #7353 order correction by:jorgep
|
||||
- refactor: refs #7353 simplify code by:jorgep
|
||||
- refactor: refs #7353 tickets correction by:jorgep
|
||||
- refactor: refs #7353 use global locales by:jorgep
|
||||
- refactor: refs #7354 changed descriptor menu options by:Jon
|
||||
- refactor: refs #7354 changed icon color in table and notification when deleting a zone by:Jon
|
||||
- refactor: refs #7354 fix tableFilters by:Jon
|
||||
- refactor: refs #7354 modified VnInputTime by:Jon
|
||||
- refactor: refs #7354 refactor deliveryPanel by:Jon
|
||||
- refactor: refs #7354 refactor zones section and fixed e2e tests by:Jon
|
||||
- refactor: refs #7354 requested changes by:Jon
|
||||
- refactor: refs #7354 reverse deliveryPanel changes by:Jon
|
||||
- refactor: refs #7354 Zone migration changes by:Jon
|
||||
- refactor: refs #7889 deleted subtitle attr and use keyBinding instead by:Jon
|
||||
- refactor: refs #7889 modified shortcut and dashboard, and added tootlip in LeftMenu by:Jon
|
||||
- refs #6722 perf: not fetch when id not exists by:Javier Segarra
|
||||
- refs #6772 perf: change variable name by:JAVIER SEGARRA MARTINEZ
|
||||
- refs #6772 perf: use ArrayData (6772_reload_sections) by:Javier Segarra
|
||||
- refs #7283 refactor fix ItemDescriptor by:carlossa
|
||||
- refs #7283 refactor ItexDescriptor by:carlossa
|
||||
|
||||
### Fixed 🛠️
|
||||
|
||||
- chore: refs #6772 fix e2e (origin/6772-warmfix-fixE2e) by:jorgep
|
||||
- chore: refs #7353 fix warnings by:jorgep
|
||||
- chore: refs #7356 fix type by:jorgep
|
||||
- feat: fix bugs and filters by:Javier Segarra
|
||||
- feat: fix refund parameters by:jgallego
|
||||
- feat: minor fixes by:jgallego
|
||||
- feat: refs #7353 add filter & fix customTags by:jorgep
|
||||
- feat: try to fix ItemFixedFilterPanel by:Javier Segarra
|
||||
- fix: add border-top by:Javier Segarra
|
||||
- fix: added missing descriptors and small details by:Jon
|
||||
- fix branch by:carlossa
|
||||
- fix: call upsert when crudModel haschanges by:Javier Segarra
|
||||
- fix(ClaimList): fix summary by:alexm
|
||||
- fix: cli warnings by:Javier Segarra
|
||||
- fix: editTableOptions by:Javier Segarra
|
||||
- fix events and descriptor menu by:Jon
|
||||
- fix: InvoiceIn sections (origin/6772_reload_sections) by:Javier Segarra
|
||||
- fix: minor changes by:Javier Segarra
|
||||
- fix: minor error whit dates by:Javier Segarra
|
||||
- fix: module icon by:Javier Segarra
|
||||
- fix: options QDate by:Javier Segarra
|
||||
- fix: refs #6900 e2e error by:jorgep
|
||||
- fix: refs #6900 rollback by:jorgep
|
||||
- fix: refs #7353 css by:jorgep
|
||||
- fix: refs #7353 hide search param (origin/7353-warmfix-fixSearchbar) by:jorgep
|
||||
- fix: refs #7353 iron out filter by:jorgep
|
||||
- fix: refs #7353 iron out ticket table by:jorgep
|
||||
- fix: refs #7353 padding by:jorgep
|
||||
- fix: refs #7353 salesClientTable by:jorgep
|
||||
- fix: refs #7353 salesorderTable by:jorgep
|
||||
- fix: refs #7353 saleTicketMonitors by:jorgep
|
||||
- fix: refs #7353 use same datakey by:jorgep
|
||||
- fix: refs #7353 vnTable colors by:jorgep
|
||||
- fix: refs #7354 e2e tests by:Jon
|
||||
- fix: refs #7354 fix delivery days by:Jon
|
||||
- fix: refs #7354 fix list searchbar and filters by:Jon
|
||||
- fix: refs #7354 fix VnSearchbar search for zone section & finished basic tests by:Jon
|
||||
- fix: refs #7354 fix VnTable filters and agency field by:Jon
|
||||
- fix: refs #7354 fix zoneSearchbar by:Jon
|
||||
- fix: refs #7354 requested changes by:Jon
|
||||
- fix: refs #7356 colors by:jorgep
|
||||
- fix: refs #7356 create claim dialog by:jorgep
|
||||
- fix: refs #7889 fixed shortcut test by:Jon
|
||||
- fix: refs #7903 fixed ticket's search bar and keybinding tooltip by:Jon
|
||||
- fix: refs #7911 fixed shortcut and related files by:Jon
|
||||
- fix: remove condition duplicated by:Javier Segarra
|
||||
- fix: remove property by:Javier Segarra
|
||||
- fix tootltip by:carlossa
|
||||
- fix traduction by:carlossa
|
||||
- fix(VnSectionMain): add QPage by:alexm
|
||||
- fix(zone): zoneLocation and the others searchbar by:alexm
|
||||
- refactor: refs #7354 fix tableFilters by:Jon
|
||||
- refactor: refs #7354 refactor zones section and fixed e2e tests by:Jon
|
||||
- refs #6772 feat: fix approach by:Javier Segarra
|
||||
- refs #6772 fix: claimPhoto reload by:Javier Segarra
|
||||
- refs #6896 fix searchbar by:carlossa
|
||||
- refs #6897 fix entry by:carlossa
|
||||
- refs #6899 fix invoiceFix by:carlossa
|
||||
- refs #6899 fix order by:carlossa
|
||||
- refs #7283 fix by:carlossa
|
||||
- refs #7283 fix ItemDescriptor warehouse by:carlossa
|
||||
- refs #7283 refactor fix ItemDescriptor by:carlossa
|
||||
- refs #7355 #7366 fix account, summary, list, travelList, tooltip by:carlossa
|
||||
- refs #7355 fix accountPrivileges by:carlossa
|
||||
- refs #7355 fix accounts, vnTable by:carlossa
|
||||
- refs #7355 fix privileges by:carlossa
|
||||
- refs #7355 fix roles filters by:carlossa
|
||||
- refs #7355 fix total by:carlossa
|
||||
- refs #7355 fix views summarys, entryList, travelList refact by:carlossa
|
||||
- refs #7366 fix travel hours by:carlossa
|
||||
- test: fix e2e by:Javier Segarra
|
||||
|
||||
# Version 24.36 - 2024-08-27
|
||||
|
||||
### Added 🆕
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "salix-front",
|
||||
"version": "24.40.0",
|
||||
"version": "24.44.0",
|
||||
"description": "Salix frontend",
|
||||
"productName": "Salix",
|
||||
"author": "Verdnatura",
|
||||
|
@ -62,4 +62,4 @@
|
|||
"vite": "^5.1.4",
|
||||
"vitest": "^0.31.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,18 +2,22 @@ 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 = '/api/';
|
||||
axios.defaults.baseURL = baseUrl;
|
||||
const axiosNoError = axios.create({ baseURL: baseUrl });
|
||||
|
||||
const onRequest = (config) => {
|
||||
const token = session.getToken();
|
||||
if (token.length && !config.headers.Authorization) {
|
||||
config.headers.Authorization = token;
|
||||
}
|
||||
|
||||
stateQuery.add(config);
|
||||
return config;
|
||||
};
|
||||
|
||||
|
@ -22,10 +26,10 @@ const onRequestError = (error) => {
|
|||
};
|
||||
|
||||
const onResponse = (response) => {
|
||||
const { method } = response.config;
|
||||
const config = response.config;
|
||||
stateQuery.remove(config);
|
||||
|
||||
const isSaveRequest = method === 'patch';
|
||||
if (isSaveRequest) {
|
||||
if (config.method === 'patch') {
|
||||
notify('globals.dataSaved', 'positive');
|
||||
}
|
||||
|
||||
|
@ -33,37 +37,9 @@ const onResponse = (response) => {
|
|||
};
|
||||
|
||||
const onResponseError = (error) => {
|
||||
let message = '';
|
||||
stateQuery.remove(error.config);
|
||||
|
||||
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) {
|
||||
if (session.isLoggedIn() && error.response?.status === 401) {
|
||||
session.destroy(false);
|
||||
const hash = window.location.hash;
|
||||
const url = hash.slice(1);
|
||||
|
@ -72,12 +48,12 @@ const onResponseError = (error) => {
|
|||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
notify(message, 'negative');
|
||||
|
||||
return Promise.reject(error);
|
||||
};
|
||||
|
||||
axios.interceptors.request.use(onRequest, onRequestError);
|
||||
axios.interceptors.response.use(onResponse, onResponseError);
|
||||
axiosNoError.interceptors.request.use(onRequest);
|
||||
axiosNoError.interceptors.response.use(onResponse);
|
||||
|
||||
export { onRequest, onResponseError };
|
||||
export { onRequest, onResponseError, axiosNoError };
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
import { QInput } from 'quasar';
|
||||
import setDefault from './setDefault';
|
||||
|
||||
setDefault(QInput, 'dense', true);
|
|
@ -0,0 +1,4 @@
|
|||
import { QSelect } from 'quasar';
|
||||
import setDefault from './setDefault';
|
||||
|
||||
setDefault(QSelect, 'dense', true);
|
|
@ -1 +1,3 @@
|
|||
export * from './defaults/qTable';
|
||||
export * from './defaults/qInput';
|
||||
export * from './defaults/qSelect';
|
||||
|
|
|
@ -2,9 +2,52 @@ import { boot } from 'quasar/wrappers';
|
|||
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');
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { reactive, ref, onMounted, nextTick } from 'vue';
|
||||
import { reactive, ref, onMounted, nextTick, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
||||
|
@ -7,16 +7,21 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
|||
import FetchData from 'components/FetchData.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import FormModelPopup from './FormModelPopup.vue';
|
||||
import { useState } from 'src/composables/useState';
|
||||
|
||||
defineProps({ showEntityField: { type: Boolean, default: true } });
|
||||
|
||||
const emit = defineEmits(['onDataSaved']);
|
||||
const { t } = useI18n();
|
||||
const bicInputRef = ref(null);
|
||||
const state = useState();
|
||||
|
||||
const customer = computed(() => state.get('customer'));
|
||||
|
||||
const bankEntityFormData = reactive({
|
||||
name: null,
|
||||
bic: null,
|
||||
countryFk: null,
|
||||
countryFk: customer.value?.countryFk,
|
||||
id: null,
|
||||
});
|
||||
|
||||
|
@ -26,8 +31,8 @@ const countriesFilter = {
|
|||
|
||||
const countriesOptions = ref([]);
|
||||
|
||||
const onDataSaved = (formData, requestResponse) => {
|
||||
emit('onDataSaved', formData, requestResponse);
|
||||
const onDataSaved = (...args) => {
|
||||
emit('onDataSaved', ...args);
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
|
|
|
@ -1,35 +1,42 @@
|
|||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { onMounted, 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 = reactive({
|
||||
const cityFormData = ref({
|
||||
name: null,
|
||||
provinceFk: null,
|
||||
});
|
||||
|
||||
const provincesOptions = ref([]);
|
||||
|
||||
onMounted(() => {
|
||||
cityFormData.value.provinceFk = $props.provinceSelected;
|
||||
});
|
||||
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!')"
|
||||
|
@ -41,11 +48,16 @@ const onDataSaved = (...args) => {
|
|||
<template #form-inputs="{ data, validate }">
|
||||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('Name')"
|
||||
:label="t('Names')"
|
||||
v-model="data.name"
|
||||
:rules="validate('city.name')"
|
||||
/>
|
||||
<VnSelectProvince v-model="data.provinceFk" />
|
||||
<VnSelectProvince
|
||||
:province-selected="$props.provinceSelected"
|
||||
:country-fk="$props.countryFk"
|
||||
v-model="data.provinceFk"
|
||||
:provinces="$props.provinces"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModelPopup>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
@ -22,9 +22,11 @@ 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) {
|
||||
|
@ -61,23 +63,94 @@ 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="(data) => (provincesOptions = data)"
|
||||
@on-fetch="handleProvinces"
|
||||
:sort-by="['name ASC']"
|
||||
:limit="30"
|
||||
auto-load
|
||||
url="Provinces/location"
|
||||
/>
|
||||
<FetchData
|
||||
@on-fetch="(data) => (countriesOptions = data)"
|
||||
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"
|
||||
auto-load
|
||||
url="Countries"
|
||||
/>
|
||||
|
@ -96,18 +169,20 @@ async function setProvince(id, 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
|
||||
:clearable="true"
|
||||
>
|
||||
<template #option="{ itemProps, opt }">
|
||||
<QItem v-bind="itemProps">
|
||||
|
@ -122,6 +197,9 @@ async function setProvince(id, data) {
|
|||
</template>
|
||||
<template #form>
|
||||
<CreateNewCityForm
|
||||
:country-fk="data.countryFk"
|
||||
:province-selected="data.provinceFk"
|
||||
:provinces="provincesOptions"
|
||||
@on-data-saved="
|
||||
(_, requestResponse) =>
|
||||
onCityCreated(requestResponse, data)
|
||||
|
@ -132,8 +210,13 @@ async function setProvince(id, 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')"
|
||||
|
@ -152,6 +235,7 @@ async function setProvince(id, 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
|
||||
|
|
|
@ -16,7 +16,16 @@ 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) => {
|
||||
|
@ -31,7 +40,14 @@ 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')"
|
||||
|
|
|
@ -50,7 +50,7 @@ const onDataSaved = (dataSaved) => {
|
|||
model="thermograph"
|
||||
:title="t('New thermograph')"
|
||||
:form-initial-data="thermographFormData"
|
||||
@on-data-saved="onDataSaved($event)"
|
||||
@on-data-saved="(_, response) => onDataSaved(response)"
|
||||
>
|
||||
<template #form-inputs="{ data, validate }">
|
||||
<VnRow>
|
||||
|
|
|
@ -234,6 +234,8 @@ async function remove(data) {
|
|||
newData = newData.filter((form) => !ids.some((id) => id == form[pk]));
|
||||
fetch(newData);
|
||||
});
|
||||
} else {
|
||||
reset();
|
||||
}
|
||||
emit('update:selected', []);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ onMounted(async () => {
|
|||
|
||||
async function fetch(fetchFilter = {}) {
|
||||
try {
|
||||
const filter = Object.assign(fetchFilter, $props.filter); // eslint-disable-line vue/no-dupe-keys
|
||||
const filter = { ...fetchFilter, ...$props.filter }; // eslint-disable-line vue/no-dupe-keys
|
||||
if ($props.where && !fetchFilter.where) filter.where = $props.where;
|
||||
if ($props.sortBy) filter.order = $props.sortBy;
|
||||
if ($props.limit) filter.limit = $props.limit;
|
||||
|
|
|
@ -217,9 +217,6 @@ 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;
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ defineExpose({
|
|||
:loading="isLoading"
|
||||
@click="emit('onDataCanceled')"
|
||||
v-close-popup
|
||||
data-cy="FormModelPopup_cancel"
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('globals.save')"
|
||||
|
@ -70,6 +71,7 @@ defineExpose({
|
|||
class="q-ml-sm"
|
||||
:disabled="isLoading"
|
||||
:loading="isLoading"
|
||||
data-cy="FormModelPopup_save"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -297,11 +297,12 @@ const removeTag = (index, params, search) => {
|
|||
/>
|
||||
</QItem>
|
||||
<QItem class="q-mt-lg">
|
||||
<QIcon
|
||||
name="add_circle"
|
||||
<QBtn
|
||||
icon="add_circle"
|
||||
shortcut="+"
|
||||
flat
|
||||
class="fill-icon-on-hover q-px-xs"
|
||||
color="primary"
|
||||
size="sm"
|
||||
@click="tagValues.push({})"
|
||||
/>
|
||||
</QItem>
|
||||
|
|
|
@ -35,7 +35,7 @@ const itemComputed = computed(() => {
|
|||
</QItemSection>
|
||||
<QItemSection>
|
||||
{{ t(itemComputed.title) }}
|
||||
<QTooltip>
|
||||
<QTooltip v-if="item.keyBinding">
|
||||
{{ 'Ctrl + Alt + ' + item?.keyBinding?.toUpperCase() }}
|
||||
</QTooltip>
|
||||
</QItemSection>
|
||||
|
@ -44,7 +44,6 @@ const itemComputed = computed(() => {
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.q-item {
|
||||
min-height: 5vh;
|
||||
|
|
|
@ -3,6 +3,7 @@ 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';
|
||||
|
@ -12,6 +13,7 @@ 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';
|
||||
|
@ -50,6 +52,14 @@ 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 />
|
||||
|
|
|
@ -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="inheritWarehouse"
|
||||
v-model="invoiceParams.inheritWarehouse"
|
||||
/>
|
||||
<QIcon name="info" class="cursor-info q-ml-sm" size="sm">
|
||||
<QTooltip>{{ t('Inherit warehouse tooltip') }}</QTooltip>
|
||||
|
|
|
@ -13,12 +13,14 @@ 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() {
|
||||
|
@ -53,6 +55,7 @@ const user = state.getUser();
|
|||
const warehousesData = ref();
|
||||
const companiesData = ref();
|
||||
const accountBankData = ref();
|
||||
const isEmployee = computed(() => useRole().isEmployee());
|
||||
|
||||
onMounted(async () => {
|
||||
updatePreferences();
|
||||
|
@ -70,18 +73,28 @@ function updatePreferences() {
|
|||
|
||||
async function saveDarkMode(value) {
|
||||
const query = `/UserConfigs/${user.value.id}`;
|
||||
await axios.patch(query, {
|
||||
darkMode: value,
|
||||
});
|
||||
user.value.darkMode = value;
|
||||
try {
|
||||
await axios.patch(query, {
|
||||
darkMode: value,
|
||||
});
|
||||
user.value.darkMode = value;
|
||||
onDataSaved();
|
||||
} catch (error) {
|
||||
onDataError();
|
||||
}
|
||||
}
|
||||
|
||||
async function saveLanguage(value) {
|
||||
const query = `/VnUsers/${user.value.id}`;
|
||||
await axios.patch(query, {
|
||||
lang: value,
|
||||
});
|
||||
user.value.lang = value;
|
||||
try {
|
||||
await axios.patch(query, {
|
||||
lang: value,
|
||||
});
|
||||
user.value.lang = value;
|
||||
onDataSaved();
|
||||
} catch (error) {
|
||||
onDataError();
|
||||
}
|
||||
}
|
||||
|
||||
function logout() {
|
||||
|
@ -97,11 +110,23 @@ function localUserData() {
|
|||
state.setUser(user.value);
|
||||
}
|
||||
|
||||
function saveUserData(param, value) {
|
||||
axios.post('UserConfigs/setUserConfig', { [param]: value });
|
||||
localUserData();
|
||||
async function saveUserData(param, value) {
|
||||
try {
|
||||
await axios.post('UserConfigs/setUserConfig', { [param]: value });
|
||||
localUserData();
|
||||
onDataSaved();
|
||||
} catch (error) {
|
||||
onDataError();
|
||||
}
|
||||
}
|
||||
const isEmployee = computed(() => useRole().isEmployee());
|
||||
|
||||
const onDataSaved = () => {
|
||||
notify('globals.dataSaved', 'positive');
|
||||
};
|
||||
|
||||
const onDataError = () => {
|
||||
notify('errors.updateUserConfig', 'negative');
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
|
@ -8,33 +8,55 @@ import FetchData from 'components/FetchData.vue';
|
|||
import CreateNewProvinceForm from './CreateNewProvinceForm.vue';
|
||||
|
||||
const emit = defineEmits(['onProvinceCreated']);
|
||||
const provinceFk = defineModel({ type: Number });
|
||||
watch(provinceFk, async () => await provincesFetchDataRef.value.fetch());
|
||||
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 { validate } = useValidator();
|
||||
const { t } = useI18n();
|
||||
|
||||
const provincesOptions = ref();
|
||||
const provincesOptions = ref($props.provinces);
|
||||
provinceFk.value = $props.provinceSelected;
|
||||
const provincesFetchDataRef = ref();
|
||||
|
||||
async function onProvinceCreated(_, data) {
|
||||
await provincesFetchDataRef.value.fetch();
|
||||
await provincesFetchDataRef.value.fetch({ where: { countryFk: $props.countryFk } });
|
||||
provinceFk.value = data.id;
|
||||
emit('onProvinceCreated', data);
|
||||
}
|
||||
async function handleProvinces(data) {
|
||||
provincesOptions.value = data;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
ref="provincesFetchDataRef"
|
||||
:filter="{ include: { relation: 'country' } }"
|
||||
@on-fetch="(data) => (provincesOptions = data)"
|
||||
auto-load
|
||||
:filter="{
|
||||
include: { relation: 'country' },
|
||||
where: {
|
||||
countryFk: $props.countryFk,
|
||||
},
|
||||
}"
|
||||
@on-fetch="handleProvinces"
|
||||
url="Provinces"
|
||||
/>
|
||||
<VnSelectDialog
|
||||
:label="t('Province')"
|
||||
:options="provincesOptions"
|
||||
:options="$props.provinces"
|
||||
:tooltip="t('Create province')"
|
||||
hide-selected
|
||||
v-model="provinceFk"
|
||||
:rules="validate && validate('postcode.provinceFk')"
|
||||
|
@ -49,11 +71,15 @@ async function onProvinceCreated(_, data) {
|
|||
</QItem>
|
||||
</template>
|
||||
<template #form>
|
||||
<CreateNewProvinceForm @on-data-saved="onProvinceCreated" />
|
||||
<CreateNewProvinceForm
|
||||
:country-fk="$props.countryFk"
|
||||
@on-data-saved="onProvinceCreated"
|
||||
/>
|
||||
</template>
|
||||
</VnSelectDialog>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
Province: Provincia
|
||||
Create province: Crear provincia
|
||||
</i18n>
|
||||
|
|
|
@ -10,8 +10,6 @@ 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,
|
||||
|
@ -30,11 +28,14 @@ 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);
|
||||
|
||||
const updateEvent = { 'update:modelValue': addFilter, remove: () => addFilter(null) };
|
||||
const updateEvent = { 'update:modelValue': addFilter };
|
||||
const enterEvent = {
|
||||
'keyup.enter': () => addFilter(model.value),
|
||||
remove: () => addFilter(null),
|
||||
|
@ -115,11 +116,11 @@ const components = {
|
|||
rawSelect: selectComponent,
|
||||
};
|
||||
|
||||
async function addFilter(value) {
|
||||
async function addFilter(value, name) {
|
||||
value ??= undefined;
|
||||
if (value && typeof value === 'object') value = model.value;
|
||||
value = value === '' ? undefined : value;
|
||||
let field = columnFilter.value?.name ?? $props.column.name;
|
||||
let field = columnFilter.value?.name ?? $props.column.name ?? name;
|
||||
|
||||
if (columnFilter.value?.inWhere) {
|
||||
if (columnFilter.value.alias) field = columnFilter.value.alias + '.' + field;
|
||||
|
|
|
@ -4,7 +4,7 @@ import { useArrayData } from 'composables/useArrayData';
|
|||
const model = defineModel({ type: Object });
|
||||
const $props = defineProps({
|
||||
name: {
|
||||
type: String,
|
||||
type: [String, Boolean],
|
||||
default: '',
|
||||
},
|
||||
label: {
|
||||
|
|
|
@ -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 VnTableFilter from 'components/VnTable/VnFilter.vue';
|
||||
import VnFilter 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,6 +53,10 @@ const $props = defineProps({
|
|||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
bottom: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
cardClass: {
|
||||
type: String,
|
||||
default: 'flex-one',
|
||||
|
@ -71,7 +75,7 @@ const $props = defineProps({
|
|||
},
|
||||
hasSubToolbar: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
default: null,
|
||||
},
|
||||
disableOption: {
|
||||
type: Object,
|
||||
|
@ -97,6 +101,18 @@ 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();
|
||||
|
@ -117,6 +133,8 @@ const showForm = ref(false);
|
|||
const splittedColumns = ref({ columns: [] });
|
||||
const columnsVisibilitySkipped = ref();
|
||||
const createForm = ref();
|
||||
const tableFilterRef = ref([]);
|
||||
const tableRef = ref();
|
||||
|
||||
const tableModes = [
|
||||
{
|
||||
|
@ -142,7 +160,7 @@ onMounted(() => {
|
|||
quasar.platform.is.mobile && !$props.disableOption?.card
|
||||
? CARD_MODE
|
||||
: $props.defaultMode;
|
||||
stateStore.rightDrawer = true;
|
||||
stateStore.rightDrawer = quasar.screen.gt.xs;
|
||||
columnsVisibilitySkipped.value = [
|
||||
...splittedColumns.value.columns
|
||||
.filter((c) => c.visible == false)
|
||||
|
@ -192,7 +210,7 @@ function setUserParams(watchedParams, watchedOrder) {
|
|||
|
||||
function sanitizer(params) {
|
||||
for (const [key, value] of Object.entries(params)) {
|
||||
if (typeof value == 'object') {
|
||||
if (value && typeof value == 'object') {
|
||||
const param = Object.values(value)[0];
|
||||
if (typeof param == 'string') params[key] = param.replaceAll('%', '');
|
||||
}
|
||||
|
@ -219,7 +237,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 = { ...col.columnFilter, inWhere: true };
|
||||
col.columnFilter = { inWhere: true, ...col.columnFilter };
|
||||
splittedColumns.value.columns.push(col);
|
||||
}
|
||||
// Status column
|
||||
|
@ -297,12 +315,21 @@ defineExpose({
|
|||
redirect: redirectFn,
|
||||
selected,
|
||||
CrudModelRef,
|
||||
params,
|
||||
tableRef,
|
||||
});
|
||||
|
||||
function handleOnDataSaved(_, res) {
|
||||
if (_.onDataSaved) _.onDataSaved(this);
|
||||
function handleOnDataSaved(_) {
|
||||
if (_.onDataSaved) _.onDataSaved({ CrudModelRef: CrudModelRef.value });
|
||||
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
|
||||
|
@ -320,6 +347,13 @@ function handleOnDataSaved(_, res) {
|
|||
: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
|
||||
|
@ -329,7 +363,8 @@ function handleOnDataSaved(_, res) {
|
|||
)"
|
||||
:key="col.id"
|
||||
>
|
||||
<VnTableFilter
|
||||
<VnFilter
|
||||
ref="tableFilterRef"
|
||||
:column="col"
|
||||
:data-key="$attrs['data-key']"
|
||||
v-model="params[columnName(col)]"
|
||||
|
@ -353,21 +388,25 @@ function handleOnDataSaved(_, res) {
|
|||
: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'"
|
||||
:limit="20"
|
||||
:limit="$attrs['limit'] ?? 20"
|
||||
ref="CrudModelRef"
|
||||
@on-fetch="(...args) => emit('onFetch', ...args)"
|
||||
:search-url="searchUrl"
|
||||
:disable-infinite-scroll="isTableMode"
|
||||
@save-changes="reload"
|
||||
:has-sub-toolbar="$attrs['hasSubToolbar'] ?? isEditable"
|
||||
:has-sub-toolbar="$props.hasSubToolbar ?? isEditable"
|
||||
:auto-load="hasParams || $attrs['auto-load']"
|
||||
>
|
||||
<template v-for="(_, slotName) in $slots" #[slotName]="slotData" :key="slotName">
|
||||
|
@ -375,8 +414,10 @@ function handleOnDataSaved(_, res) {
|
|||
</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"
|
||||
|
@ -385,13 +426,8 @@ function handleOnDataSaved(_, res) {
|
|||
card-container-class="grid-three"
|
||||
flat
|
||||
:style="isTableMode && `max-height: ${tableHeight}`"
|
||||
virtual-scroll
|
||||
@virtual-scroll="
|
||||
(event) =>
|
||||
event.index > rows.length - 2 &&
|
||||
($props.crudModel?.paginate ?? true) &&
|
||||
CrudModelRef.vnPaginateRef.paginate()
|
||||
"
|
||||
:virtual-scroll="isTableMode"
|
||||
@virtual-scroll="handleScroll"
|
||||
@row-click="(_, row) => rowClickFunction && rowClickFunction(row)"
|
||||
@update:selected="emit('update:selected', $event)"
|
||||
>
|
||||
|
@ -415,13 +451,17 @@ function handleOnDataSaved(_, res) {
|
|||
<QBtn
|
||||
v-if="$props.rightSearch"
|
||||
icon="filter_alt"
|
||||
class="bg-vn-section-color q-ml-md"
|
||||
class="bg-vn-section-color q-ml-sm"
|
||||
dense
|
||||
@click="stateStore.toggleRightDrawer()"
|
||||
/>
|
||||
</template>
|
||||
<template #header-cell="{ col }">
|
||||
<QTh v-if="col.visible ?? true">
|
||||
<QTh
|
||||
v-if="col.visible ?? true"
|
||||
:style="col.headerStyle"
|
||||
:class="col.headerClass"
|
||||
>
|
||||
<div
|
||||
class="column self-start q-ml-xs ellipsis"
|
||||
:class="`text-${col?.align ?? 'left'}`"
|
||||
|
@ -437,7 +477,7 @@ function handleOnDataSaved(_, res) {
|
|||
:search-url="searchUrl"
|
||||
/>
|
||||
</div>
|
||||
<VnTableFilter
|
||||
<VnFilter
|
||||
v-if="$props.columnSearch"
|
||||
:column="col"
|
||||
:show-title="true"
|
||||
|
@ -467,6 +507,7 @@ function handleOnDataSaved(_, res) {
|
|||
auto-width
|
||||
class="no-margin q-px-xs"
|
||||
:class="[getColAlign(col), col.columnClass]"
|
||||
:style="col.style"
|
||||
v-if="col.visible ?? true"
|
||||
@click.ctrl="
|
||||
($event) =>
|
||||
|
@ -495,6 +536,7 @@ function handleOnDataSaved(_, res) {
|
|||
:class="getColAlign(col)"
|
||||
class="sticky no-padding"
|
||||
@click="stopEventPropagation($event)"
|
||||
:style="col.style"
|
||||
>
|
||||
<QBtn
|
||||
v-for="(btn, index) of col.actions"
|
||||
|
@ -502,8 +544,9 @@ function handleOnDataSaved(_, res) {
|
|||
:key="index"
|
||||
:title="btn.title"
|
||||
:icon="btn.icon"
|
||||
class="q-px-sm"
|
||||
class="q-pa-xs"
|
||||
flat
|
||||
dense
|
||||
:class="
|
||||
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
|
||||
"
|
||||
|
@ -514,6 +557,29 @@ function handleOnDataSaved(_, res) {
|
|||
/>
|
||||
</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'"
|
||||
|
@ -630,10 +696,22 @@ function handleOnDataSaved(_, res) {
|
|||
</QCard>
|
||||
</component>
|
||||
</template>
|
||||
<template #bottom-row="{ cols }" v-if="$props.footer">
|
||||
<QTr v-if="rows.length" 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}`" />
|
||||
</QTh>
|
||||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
</template>
|
||||
</CrudModel>
|
||||
<QPageSticky :offset="[20, 20]" style="z-index: 2">
|
||||
<QPageSticky v-if="$props.create" :offset="[20, 20]" style="z-index: 2">
|
||||
<QBtn
|
||||
@click="
|
||||
() =>
|
||||
|
@ -644,8 +722,8 @@ function handleOnDataSaved(_, res) {
|
|||
icon="add"
|
||||
shortcut="+"
|
||||
/>
|
||||
<QTooltip>
|
||||
{{ createForm.title }}
|
||||
<QTooltip self="top right">
|
||||
{{ createForm?.title }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
<QDialog v-model="showForm" transition-show="scale" transition-hide="scale">
|
||||
|
@ -697,7 +775,7 @@ es:
|
|||
}
|
||||
|
||||
.bg-header {
|
||||
background-color: var(--vn-header-color);
|
||||
background-color: var(--vn-accent-color);
|
||||
color: var(--vn-text-color);
|
||||
}
|
||||
|
||||
|
@ -705,18 +783,6 @@ es:
|
|||
color: var(--vn-text-color);
|
||||
}
|
||||
|
||||
.q-table--dark .q-table__bottom,
|
||||
.q-table--dark thead,
|
||||
.q-table--dark tr,
|
||||
.q-table--dark th,
|
||||
.q-table--dark td {
|
||||
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));
|
||||
|
@ -745,8 +811,15 @@ es:
|
|||
}
|
||||
}
|
||||
|
||||
.q-table th {
|
||||
padding: 0;
|
||||
.q-table {
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&__top {
|
||||
padding: 12px 0px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.vnTable {
|
||||
|
@ -759,6 +832,7 @@ es:
|
|||
}
|
||||
.q-table__top {
|
||||
top: 0;
|
||||
padding: 12px 0;
|
||||
}
|
||||
tbody {
|
||||
.q-checkbox {
|
||||
|
@ -783,6 +857,18 @@ 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 {
|
||||
|
@ -828,4 +914,12 @@ 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>
|
||||
|
|
|
@ -135,7 +135,7 @@ onMounted(async () => {
|
|||
});
|
||||
</script>
|
||||
<template>
|
||||
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-md q-px-sm" dense>
|
||||
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-sm q-px-sm" dense>
|
||||
<QPopupProxy ref="popupProxyRef">
|
||||
<QCard class="column q-pa-md">
|
||||
<QIcon name="info" size="sm" class="info-icon">
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<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>
|
|
@ -24,7 +24,9 @@ const stateStore = useStateStore();
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const url = computed(() => {
|
||||
if (props.baseUrl) return `${props.baseUrl}/${route.params.id}`;
|
||||
if (props.baseUrl) {
|
||||
return `${props.baseUrl}/${route.params.id}`;
|
||||
}
|
||||
return props.customUrl;
|
||||
});
|
||||
const searchRightDataKey = computed(() => {
|
||||
|
@ -40,8 +42,10 @@ onBeforeMount(async () => {
|
|||
try {
|
||||
if (!props.baseUrl) arrayData.store.filter.where = { id: route.params.id };
|
||||
await arrayData.fetch({ append: false, updateRouter: false });
|
||||
} catch (e) {
|
||||
router.push({ name: 'WorkerList' });
|
||||
} catch {
|
||||
const { matched: matches } = router.currentRoute.value;
|
||||
const { path } = matches.at(-1);
|
||||
router.push({ path: path.replace(/:id.*/, '') });
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -79,7 +83,7 @@ if (props.baseUrl) {
|
|||
<QPage>
|
||||
<VnSubToolbar />
|
||||
<div :class="[useCardSize(), $attrs.class]">
|
||||
<RouterView :key="route.fullPath" />
|
||||
<RouterView :key="route.path" />
|
||||
</div>
|
||||
</QPage>
|
||||
</QPageContainer>
|
||||
|
|
|
@ -0,0 +1,136 @@
|
|||
<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>
|
|
@ -17,17 +17,15 @@ const $props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
let mixed;
|
||||
const componentArray = computed(() => {
|
||||
if (typeof $props.prop === 'object') return [$props.prop];
|
||||
return $props.prop;
|
||||
});
|
||||
|
||||
function mix(toComponent) {
|
||||
if (mixed) return mixed;
|
||||
const { component, attrs, event } = toComponent;
|
||||
const customComponent = $props.components[component];
|
||||
mixed = {
|
||||
return {
|
||||
component: customComponent?.component ?? component,
|
||||
attrs: {
|
||||
...toValueAttrs(attrs),
|
||||
|
@ -37,7 +35,6 @@ function mix(toComponent) {
|
|||
},
|
||||
event: { ...customComponent?.event, ...event },
|
||||
};
|
||||
return mixed;
|
||||
}
|
||||
|
||||
function toValueAttrs(attrs) {
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<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>
|
|
@ -5,12 +5,14 @@ import { useRoute } from 'vue-router';
|
|||
import { useQuasar, QCheckbox, QBtn, QInput } from 'quasar';
|
||||
import axios from 'axios';
|
||||
|
||||
import VnUserLink from '../ui/VnUserLink.vue';
|
||||
import { downloadFile } from 'src/composables/downloadFile';
|
||||
import VnImg from 'components/ui/VnImg.vue';
|
||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||
import VnDms from 'src/components/common/VnDms.vue';
|
||||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnUserLink from '../ui/VnUserLink.vue';
|
||||
import { downloadFile } from 'src/composables/downloadFile';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
|
||||
const route = useRoute();
|
||||
const quasar = useQuasar();
|
||||
|
@ -18,6 +20,7 @@ const { t } = useI18n();
|
|||
const rows = ref();
|
||||
const dmsRef = ref();
|
||||
const formDialog = ref({});
|
||||
const token = useSession().getTokenMultimedia();
|
||||
|
||||
const $props = defineProps({
|
||||
model: {
|
||||
|
@ -89,6 +92,23 @@ const dmsFilter = {
|
|||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
label: '',
|
||||
name: 'file',
|
||||
align: 'left',
|
||||
component: VnImg,
|
||||
props: (prop) => {
|
||||
return {
|
||||
storage: 'dms',
|
||||
collection: null,
|
||||
resolution: null,
|
||||
id: prop.row.file.split('.')[0],
|
||||
token: token,
|
||||
class: 'rounded',
|
||||
ratio: 1,
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: 'id',
|
||||
|
@ -142,13 +162,6 @@ const columns = computed(() => [
|
|||
'model-value': Boolean(prop.value),
|
||||
}),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: 'file',
|
||||
label: t('globals.file'),
|
||||
name: 'file',
|
||||
component: 'span',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: 'worker',
|
||||
|
@ -387,7 +400,14 @@ defineExpose({
|
|||
/>
|
||||
</QDialog>
|
||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||
<QBtn fab color="primary" icon="add" @click="showFormDialog()" class="fill-icon">
|
||||
<QBtn
|
||||
fab
|
||||
color="primary"
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
@click="showFormDialog()"
|
||||
class="fill-icon"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Upload file') }}
|
||||
</QTooltip>
|
||||
|
@ -395,10 +415,6 @@ defineExpose({
|
|||
</QPageSticky>
|
||||
</template>
|
||||
<style scoped>
|
||||
.q-gutter-y-ms {
|
||||
display: grid;
|
||||
row-gap: 20px;
|
||||
}
|
||||
.labelColor {
|
||||
color: var(--vn-label-color);
|
||||
}
|
||||
|
|
|
@ -67,9 +67,13 @@ const mixinRules = [
|
|||
requiredFieldRule,
|
||||
...($attrs.rules ?? []),
|
||||
(val) => {
|
||||
const { min } = vnInputRef.value.$attrs;
|
||||
const { min, max } = vnInputRef.value.$attrs;
|
||||
if (!min) return null;
|
||||
if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min });
|
||||
if (!max) return null;
|
||||
if (max > 0) {
|
||||
if (Math.floor(val) > max) return t('inputMax', { value: max });
|
||||
}
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
@ -99,6 +103,7 @@ const mixinRules = [
|
|||
@click="
|
||||
() => {
|
||||
value = null;
|
||||
vnInputRef.focus();
|
||||
emit('remove');
|
||||
}
|
||||
"
|
||||
|
@ -116,8 +121,10 @@ const mixinRules = [
|
|||
<i18n>
|
||||
en:
|
||||
inputMin: Must be more than {value}
|
||||
inputMax: Must be less than {value}
|
||||
es:
|
||||
inputMin: Debe ser mayor a {value}
|
||||
inputMax: Debe ser menor a {value}
|
||||
</i18n>
|
||||
<style lang="scss">
|
||||
.q-field__append {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
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({
|
||||
|
@ -14,29 +16,20 @@ const $props = defineProps({
|
|||
default: true,
|
||||
},
|
||||
});
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
const { validations } = useValidator();
|
||||
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => !!val || t('globals.fieldRequired');
|
||||
const requiredFieldRule = (val) => validations().required($attrs.required, val);
|
||||
const vnInputDateRef = ref(null);
|
||||
|
||||
const dateFormat = 'DD/MM/YYYY';
|
||||
const isPopupOpen = ref();
|
||||
const hover = ref();
|
||||
const mask = ref();
|
||||
const $attrs = useAttrs();
|
||||
|
||||
onMounted(() => {
|
||||
// fix quasar bug
|
||||
mask.value = '##/##/####';
|
||||
});
|
||||
|
||||
const styleAttrs = computed(() => {
|
||||
return $props.isOutlined
|
||||
? {
|
||||
dense: true,
|
||||
outlined: true,
|
||||
rounded: true,
|
||||
}
|
||||
: {};
|
||||
});
|
||||
const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])];
|
||||
|
||||
const formattedDate = computed({
|
||||
get() {
|
||||
|
@ -48,15 +41,12 @@ const formattedDate = computed({
|
|||
let newDate;
|
||||
if (value) {
|
||||
// parse input
|
||||
if (value.includes('/')) {
|
||||
if (value.length == 6) value = value + new Date().getFullYear();
|
||||
if (value.length >= 10) {
|
||||
if (value.at(2) == '/') value = value.split('/').reverse().join('/');
|
||||
value = date.formatDate(
|
||||
new Date(value).toISOString(),
|
||||
'YYYY-MM-DDTHH:mm:ss.SSSZ'
|
||||
);
|
||||
}
|
||||
if (value.includes('/') && value.length >= 10) {
|
||||
if (value.at(2) == '/') value = value.split('/').reverse().join('/');
|
||||
value = date.formatDate(
|
||||
new Date(value).toISOString(),
|
||||
'YYYY-MM-DDTHH:mm:ss.SSSZ'
|
||||
);
|
||||
}
|
||||
const [year, month, day] = value.split('-').map((e) => parseInt(e));
|
||||
newDate = new Date(year, month - 1, day);
|
||||
|
@ -79,26 +69,46 @@ const formattedDate = computed({
|
|||
const popupDate = computed(() =>
|
||||
model.value ? date.formatDate(new Date(model.value), 'YYYY/MM/DD') : model.value
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
// fix quasar bug
|
||||
mask.value = '##/##/####';
|
||||
});
|
||||
watch(
|
||||
() => model.value,
|
||||
(val) => (formattedDate.value = val),
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const styleAttrs = computed(() => {
|
||||
return $props.isOutlined
|
||||
? {
|
||||
dense: true,
|
||||
outlined: true,
|
||||
rounded: true,
|
||||
}
|
||||
: {};
|
||||
});
|
||||
|
||||
const manageDate = (date) => {
|
||||
formattedDate.value = date;
|
||||
isPopupOpen.value = false;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div @mouseover="hover = true" @mouseleave="hover = false">
|
||||
<QInput
|
||||
ref="vnInputDateRef"
|
||||
v-model="formattedDate"
|
||||
class="vn-input-date"
|
||||
:mask="mask"
|
||||
placeholder="dd/mm/aaaa"
|
||||
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||
:class="{ required: $attrs.required }"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
:rules="mixinRules"
|
||||
:clearable="false"
|
||||
@click="isPopupOpen = true"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template #append>
|
||||
<QIcon
|
||||
|
@ -111,6 +121,7 @@ watch(
|
|||
!$attrs.disable
|
||||
"
|
||||
@click="
|
||||
vnInputDateRef.focus();
|
||||
model = null;
|
||||
isPopupOpen = false;
|
||||
"
|
||||
|
@ -124,6 +135,7 @@ watch(
|
|||
/>
|
||||
</template>
|
||||
<QMenu
|
||||
v-if="$q.screen.gt.xs"
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
v-model="isPopupOpen"
|
||||
|
@ -132,19 +144,11 @@ watch(
|
|||
:no-focus="true"
|
||||
:no-parent-event="true"
|
||||
>
|
||||
<QDate
|
||||
v-model="popupDate"
|
||||
:landscape="true"
|
||||
:today-btn="true"
|
||||
:options="$attrs.options"
|
||||
@update:model-value="
|
||||
(date) => {
|
||||
formattedDate = date;
|
||||
isPopupOpen = false;
|
||||
}
|
||||
"
|
||||
/>
|
||||
<VnDate v-model="popupDate" @update:model-value="manageDate" />
|
||||
</QMenu>
|
||||
<QDialog v-else v-model="isPopupOpen">
|
||||
<VnDate v-model="popupDate" @update:model-value="manageDate" />
|
||||
</QDialog>
|
||||
</QInput>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
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 });
|
||||
const props = defineProps({
|
||||
timeOnly: {
|
||||
|
@ -14,10 +18,11 @@ const props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
});
|
||||
const vnInputTimeRef = ref(null);
|
||||
const initialDate = ref(model.value ?? Date.vnNew());
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => !!val || t('globals.fieldRequired');
|
||||
|
||||
const requiredFieldRule = (val) => validations().required($attrs.required, val);
|
||||
const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])];
|
||||
const dateFormat = 'HH:mm';
|
||||
const isPopupOpen = ref();
|
||||
const hover = ref();
|
||||
|
@ -67,6 +72,7 @@ function dateToTime(newDate) {
|
|||
<template>
|
||||
<div @mouseover="hover = true" @mouseleave="hover = false">
|
||||
<QInput
|
||||
ref="vnInputTimeRef"
|
||||
class="vn-input-time"
|
||||
mask="##:##"
|
||||
placeholder="--:--"
|
||||
|
@ -74,9 +80,10 @@ function dateToTime(newDate) {
|
|||
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||
:class="{ required: $attrs.required }"
|
||||
style="min-width: 100px"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
:rules="mixinRules"
|
||||
@click="isPopupOpen = false"
|
||||
type="time"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template #append>
|
||||
<QIcon
|
||||
|
@ -89,6 +96,7 @@ function dateToTime(newDate) {
|
|||
!$attrs.disable
|
||||
"
|
||||
@click="
|
||||
vnInputTimeRef.focus();
|
||||
model = null;
|
||||
isPopupOpen = false;
|
||||
"
|
||||
|
@ -101,6 +109,7 @@ function dateToTime(newDate) {
|
|||
/>
|
||||
</template>
|
||||
<QMenu
|
||||
v-if="$q.screen.gt.xs"
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
v-model="isPopupOpen"
|
||||
|
@ -109,8 +118,11 @@ function dateToTime(newDate) {
|
|||
:no-focus="true"
|
||||
:no-parent-event="true"
|
||||
>
|
||||
<QTime v-model="formattedTime" mask="HH:mm" landscape now-btn />
|
||||
<VnTime v-model="formattedTime" />
|
||||
</QMenu>
|
||||
<QDialog v-else v-model="isPopupOpen">
|
||||
<VnTime v-model="formattedTime" />
|
||||
</QDialog>
|
||||
</QInput>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -2,21 +2,69 @@
|
|||
import CreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue';
|
||||
import VnSelectDialog from 'components/common/VnSelectDialog.vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { ref } from 'vue';
|
||||
const { t } = useI18n();
|
||||
const value = defineModel({ type: [String, Number, Object] });
|
||||
const emit = defineEmits(['update:model-value', 'update:options']);
|
||||
|
||||
const props = defineProps({
|
||||
location: {
|
||||
type: Object,
|
||||
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
|
||||
);
|
||||
|
||||
function showLabel(data) {
|
||||
return `${data.code} - ${data.town}(${data.province}), ${data.country}`;
|
||||
const dataProperties = [
|
||||
'code',
|
||||
(obj) => (obj.town ? `${obj.town}(${obj.province})` : null),
|
||||
'country',
|
||||
];
|
||||
return formatLocation(data, dataProperties);
|
||||
}
|
||||
|
||||
const handleModelValue = (data) => {
|
||||
emit('update:model-value', data);
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnSelectDialog
|
||||
v-model="value"
|
||||
option-value="code"
|
||||
v-model="modelValue"
|
||||
option-filter-value="search"
|
||||
:option-label="(opt) => showLabel(opt)"
|
||||
:option-label="
|
||||
(opt) => (typeof modelValue === 'string' ? modelValue : showLabel(opt))
|
||||
"
|
||||
url="Postcodes/filter"
|
||||
@update:model-value="handleModelValue"
|
||||
:use-like="false"
|
||||
:label="t('Location')"
|
||||
:placeholder="t('search_by_postalcode')"
|
||||
|
@ -25,9 +73,17 @@ function showLabel(data) {
|
|||
v-bind="$attrs"
|
||||
clearable
|
||||
:emit-value="false"
|
||||
:tooltip="t('Create new location')"
|
||||
>
|
||||
<template #form>
|
||||
<CreateNewPostcode @on-data-saved="(newValue) => (value = newValue)" />
|
||||
<CreateNewPostcode
|
||||
@on-data-saved="
|
||||
(newValue) => {
|
||||
modelValue = newValue;
|
||||
emit('update:model-value', newValue);
|
||||
}
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
<template #option="{ itemProps, opt }">
|
||||
<QItem v-bind="itemProps">
|
||||
|
@ -50,7 +106,9 @@ function showLabel(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>
|
||||
|
|
|
@ -406,6 +406,7 @@ watch(
|
|||
:skeleton="false"
|
||||
auto-load
|
||||
@on-fetch="setLogTree"
|
||||
search-url="logs"
|
||||
>
|
||||
<template #body>
|
||||
<div
|
||||
|
|
|
@ -9,10 +9,6 @@ const $props = defineProps({
|
|||
type: Number, //Progress value (1.0 > x > 0.0)
|
||||
required: true,
|
||||
},
|
||||
showDialog: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
cancelled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
|
@ -24,30 +20,22 @@ const emit = defineEmits(['cancel', 'close']);
|
|||
|
||||
const dialogRef = ref(null);
|
||||
|
||||
const _showDialog = computed({
|
||||
get: () => $props.showDialog,
|
||||
set: (value) => {
|
||||
if (value) dialogRef.value.show();
|
||||
},
|
||||
const showDialog = defineModel('showDialog', {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
});
|
||||
|
||||
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="onDialogHide">
|
||||
<QDialog ref="dialogRef" v-model="showDialog" @hide="emit('close')">
|
||||
<QCard class="full-width dialog">
|
||||
<QCardSection class="row">
|
||||
<span class="text-h6">{{ t('Progress') }}</span>
|
||||
<QSpace />
|
||||
<QBtn icon="close" flat round dense @click="emit('close')" />
|
||||
<QBtn icon="close" flat round dense v-close-popup />
|
||||
</QCardSection>
|
||||
<QCardSection>
|
||||
<div class="column">
|
||||
|
@ -80,7 +68,7 @@ const cancel = () => {
|
|||
type="button"
|
||||
flat
|
||||
class="text-primary"
|
||||
@click="cancel()"
|
||||
v-close-popup
|
||||
>
|
||||
{{ t('globals.cancel') }}
|
||||
</QBtn>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { useStateStore } from 'stores/useStateStore';
|
||||
import LeftMenu from 'components/LeftMenu.vue';
|
||||
import { onMounted } from 'vue';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const $props = defineProps({
|
||||
|
@ -10,7 +11,9 @@ const $props = defineProps({
|
|||
default: true,
|
||||
},
|
||||
});
|
||||
onMounted(() => (stateStore.leftDrawer = $props.leftDrawer));
|
||||
onMounted(
|
||||
() => (stateStore.leftDrawer = useQuasar().screen.gt.xs ? $props.leftDrawer : false)
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -20,6 +23,8 @@ onMounted(() => (stateStore.leftDrawer = $props.leftDrawer));
|
|||
</QScrollArea>
|
||||
</QDrawer>
|
||||
<QPageContainer>
|
||||
<RouterView></RouterView>
|
||||
<QPage>
|
||||
<RouterView />
|
||||
</QPage>
|
||||
</QPageContainer>
|
||||
</template>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<script setup>
|
||||
import { ref, toRefs, computed, watch, onMounted } from 'vue';
|
||||
import { ref, toRefs, computed, watch, onMounted, useAttrs } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
const emit = defineEmits(['update:modelValue', 'update:options', 'remove']);
|
||||
|
||||
const $props = defineProps({
|
||||
|
@ -37,6 +38,10 @@ const $props = defineProps({
|
|||
type: [Array],
|
||||
default: () => [],
|
||||
},
|
||||
exprBuilder: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
isClearable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
|
@ -82,10 +87,11 @@ const $props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const { validations } = useValidator();
|
||||
const requiredFieldRule = (val) => validations().required($attrs.required, val);
|
||||
const $attrs = useAttrs();
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => val ?? t('globals.fieldRequired');
|
||||
|
||||
const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])];
|
||||
const { optionLabel, optionValue, optionFilter, optionFilterValue, options, modelValue } =
|
||||
toRefs($props);
|
||||
const myOptions = ref([]);
|
||||
|
@ -135,6 +141,7 @@ 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) {
|
||||
|
@ -177,6 +184,7 @@ async function fetchFilter(val) {
|
|||
}, {});
|
||||
} else defaultWhere = { [key]: getVal(val) };
|
||||
const where = { ...(val ? defaultWhere : {}), ...$props.where };
|
||||
$props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val));
|
||||
const fetchOptions = { where, include, limit };
|
||||
if (fields) fetchOptions.fields = fields;
|
||||
if (sortBy) fetchOptions.order = sortBy;
|
||||
|
@ -220,6 +228,8 @@ function nullishToTrue(value) {
|
|||
}
|
||||
|
||||
const getVal = (val) => ($props.useLike ? { like: `%${val}%` } : val);
|
||||
|
||||
defineExpose({ opts: myOptions });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -248,8 +258,9 @@ const getVal = (val) => ($props.useLike ? { like: `%${val}%` } : val);
|
|||
ref="vnSelectRef"
|
||||
lazy-rules
|
||||
:class="{ required: $attrs.required }"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
:rules="mixinRules"
|
||||
virtual-scroll-slice-size="options.length"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-if="isClearable" #append>
|
||||
<QIcon
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useRole } from 'src/composables/useRole';
|
||||
import { useAcl } from 'src/composables/useAcl';
|
||||
|
||||
|
@ -28,7 +28,6 @@ const $props = defineProps({
|
|||
|
||||
const role = useRole();
|
||||
const acl = useAcl();
|
||||
const showForm = ref(false);
|
||||
|
||||
const isAllowedToCreate = computed(() => {
|
||||
if ($props.acls.length) return acl.hasAny($props.acls);
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<script setup>
|
||||
import { onBeforeMount, ref, useAttrs } from 'vue';
|
||||
import axios from 'axios';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
|
||||
const { schema, table, column, translation, defaultOptions } = defineProps({
|
||||
schema: {
|
||||
type: String,
|
||||
default: 'vn',
|
||||
},
|
||||
table: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
column: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
translation: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
defaultOptions: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const $attrs = useAttrs();
|
||||
const options = ref([]);
|
||||
onBeforeMount(async () => {
|
||||
options.value = [].concat(defaultOptions);
|
||||
const { data } = await axios.get(`Applications/get-enum-values`, {
|
||||
params: { schema, table, column },
|
||||
});
|
||||
|
||||
for (const value of data)
|
||||
options.value.push({
|
||||
[$attrs['option-value'] ?? 'id']: value,
|
||||
[$attrs['option-label'] ?? 'name']: translation ? translation(value) : value,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSelect
|
||||
v-bind="$attrs"
|
||||
:options="options"
|
||||
:key="options.length"
|
||||
:input-debounce="0"
|
||||
/>
|
||||
</template>
|
|
@ -0,0 +1,16 @@
|
|||
<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>
|
|
@ -47,6 +47,7 @@ let store;
|
|||
let entity;
|
||||
const isLoading = ref(false);
|
||||
const isSameDataKey = computed(() => $props.dataKey === route.meta.moduleName);
|
||||
const menuRef = ref();
|
||||
defineExpose({ getData });
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
@ -170,7 +171,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>
|
||||
|
|
|
@ -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" />
|
||||
<VnImg :id="item.id" class="image" zoom-resolution="1600x900" />
|
||||
<div v-if="item.hex && isCatalog" class="item-color-container">
|
||||
<div
|
||||
class="item-color"
|
||||
|
@ -127,11 +127,6 @@ const dialog = ref(null);
|
|||
flex-direction: column;
|
||||
gap: 4px;
|
||||
|
||||
.subName {
|
||||
color: var(--vn-label-color);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
defineEmits(['confirm', ...useDialogPluginComponent.emits]);
|
||||
defineExpose({ show: () => dialogRef.value.show(), hide: () => dialogRef.value.hide() });
|
||||
|
||||
const { dialogRef, onDialogOK } = useDialogPluginComponent();
|
||||
|
||||
|
@ -68,8 +69,10 @@ async function confirm() {
|
|||
<QSpace />
|
||||
<QBtn icon="close" :disable="isLoading" flat round dense v-close-popup />
|
||||
</QCardSection>
|
||||
<QCardSection class="row items-center">
|
||||
<QCardSection class="q-pb-none">
|
||||
<span v-if="message !== false" v-html="message" />
|
||||
</QCardSection>
|
||||
<QCardSection class="row items-center q-pt-none">
|
||||
<slot name="customHTML"></slot>
|
||||
</QCardSection>
|
||||
<QCardActions align="right">
|
||||
|
|
|
@ -211,7 +211,7 @@ function sanitizer(params) {
|
|||
icon="search"
|
||||
@click="search()"
|
||||
></QBtn>
|
||||
<QForm @submit="search" id="filterPanelForm">
|
||||
<QForm @submit="search" id="filterPanelForm" @keyup.enter="search()">
|
||||
<QList dense>
|
||||
<QItem class="q-mt-xs">
|
||||
<QItemSection top>
|
||||
|
|
|
@ -39,6 +39,8 @@ const getUrl = (zoom = false) => {
|
|||
const curResolution = zoom
|
||||
? $props.zoomResolution || $props.resolution
|
||||
: $props.resolution;
|
||||
if ($props.storage === 'dms')
|
||||
return `/api/${$props.storage}/${$props.id}/downloadFile?access_token=${token}`;
|
||||
return isEmployee
|
||||
? `/api/${$props.storage}/${$props.collection}/${curResolution}/${$props.id}/download?access_token=${token}&${timeStamp.value}`
|
||||
: noImage;
|
||||
|
@ -52,18 +54,21 @@ defineExpose({
|
|||
</script>
|
||||
<template>
|
||||
<QImg
|
||||
:draggable="true"
|
||||
:class="{ zoomIn: zoom }"
|
||||
:src="getUrl()"
|
||||
v-bind="$attrs"
|
||||
@click.stop="show = $props.zoom ? true : false"
|
||||
@click.stop="show = $props.zoom"
|
||||
spinner-color="primary"
|
||||
/>
|
||||
<QDialog v-if="$props.zoom" v-model="show">
|
||||
<QImg
|
||||
:draggable="true"
|
||||
:src="getUrl(true)"
|
||||
v-bind="$attrs"
|
||||
spinner-color="primary"
|
||||
class="img_zoom"
|
||||
:ratio="0"
|
||||
/>
|
||||
</QDialog>
|
||||
</template>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script setup>
|
||||
import axios from 'axios';
|
||||
import { ref } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onBeforeRouteLeave } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
@ -12,36 +12,40 @@ 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 = ref('');
|
||||
const newNote = reactive({ text: null, observationTypeFk: null });
|
||||
const observationTypes = 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.value } };
|
||||
const newBody = {
|
||||
...body,
|
||||
...{ text: newNote.text, observationTypeFk: newNote.observationTypeFk },
|
||||
};
|
||||
await axios.post($props.url, newBody);
|
||||
await vnPaginateRef.value.fetch();
|
||||
newNote.value = '';
|
||||
}
|
||||
|
||||
onBeforeRouteLeave((to, from, next) => {
|
||||
if (newNote.value)
|
||||
if (newNote.text)
|
||||
quasar.dialog({
|
||||
component: VnConfirm,
|
||||
componentProps: {
|
||||
|
@ -54,6 +58,13 @@ 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" />
|
||||
|
@ -62,29 +73,42 @@ onBeforeRouteLeave((to, from, next) => {
|
|||
{{ t('globals.now') }}
|
||||
</div>
|
||||
</QCardSection>
|
||||
<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 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>
|
||||
</QCard>
|
||||
<VnPaginate
|
||||
|
@ -98,6 +122,10 @@ 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">
|
||||
|
@ -111,13 +139,28 @@ 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">
|
||||
<VnUserLink
|
||||
:name="`${note.worker.user.nickname}`"
|
||||
:worker-id="note.worker.id"
|
||||
/>
|
||||
{{ toDateHourMin(note.created) }}
|
||||
<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)" />
|
||||
</div>
|
||||
</QCardSection>
|
||||
<QCardSection class="q-pa-xs q-my-none q-py-none">
|
||||
|
@ -131,12 +174,6 @@ 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;
|
||||
|
@ -150,11 +187,28 @@ 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>
|
||||
|
|
|
@ -56,7 +56,7 @@ const props = defineProps({
|
|||
},
|
||||
offset: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
default: undefined,
|
||||
},
|
||||
skeleton: {
|
||||
type: Boolean,
|
||||
|
@ -119,10 +119,9 @@ watch(
|
|||
);
|
||||
|
||||
watch(
|
||||
() => [props.url, props.filter, props.userParams],
|
||||
([url, filter, userParams]) => mounted.value && fetch({ url, filter, userParams })
|
||||
() => [props.url, props.filter],
|
||||
([url, filter]) => mounted.value && fetch({ url, filter })
|
||||
);
|
||||
|
||||
const addFilter = async (filter, params) => {
|
||||
await arrayData.addFilter({ filter, params });
|
||||
};
|
||||
|
@ -131,9 +130,8 @@ async function fetch(params) {
|
|||
useArrayData(props.dataKey, params);
|
||||
arrayData.reset(['filter.skip', 'skip']);
|
||||
await arrayData.fetch({ append: false });
|
||||
if (!store.hasMoreData) {
|
||||
isLoading.value = false;
|
||||
}
|
||||
if (!store.hasMoreData) isLoading.value = false;
|
||||
|
||||
emit('onFetch', store.data);
|
||||
return store.data;
|
||||
}
|
||||
|
@ -224,13 +222,20 @@ defineExpose({ fetch, addFilter, paginate });
|
|||
v-bind="$attrs"
|
||||
>
|
||||
<slot name="body" :rows="store.data"></slot>
|
||||
<div v-if="isLoading" class="info-row q-pa-md text-center">
|
||||
<div v-if="isLoading" class="spinner info-row q-pa-md text-center">
|
||||
<QSpinner color="primary" size="md" />
|
||||
</div>
|
||||
</QInfiniteScroll>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.spinner {
|
||||
z-index: 1;
|
||||
align-content: end;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
.info-row {
|
||||
width: 100%;
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ async function search() {
|
|||
...Object.fromEntries(staticParams),
|
||||
search: searchText.value,
|
||||
},
|
||||
...{ filter: props.filter },
|
||||
};
|
||||
|
||||
if (props.whereFilter) {
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<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>
|
|
@ -1,20 +1,18 @@
|
|||
<script setup>
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const $props = defineProps({
|
||||
defineProps({
|
||||
name: { type: String, default: null },
|
||||
tag: { type: String, default: null },
|
||||
workerId: { type: Number, default: null },
|
||||
defaultName: { type: Boolean, default: false },
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
<template>
|
||||
<slot name="link">
|
||||
<span :class="{ link: $props.workerId }">
|
||||
{{ $props.defaultName ? $props.name ?? t('globals.system') : $props.name }}
|
||||
<span :class="{ link: workerId }">
|
||||
{{ defaultName ? name ?? $t('globals.system') : name }}
|
||||
</span>
|
||||
</slot>
|
||||
<WorkerDescriptorProxy v-if="$props.workerId" :id="$props.workerId" />
|
||||
<WorkerDescriptorProxy v-if="workerId" :id="workerId" />
|
||||
</template>
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
<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>
|
|
@ -26,7 +26,8 @@ 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 = { ...params, ...store.userParams };
|
||||
|
||||
store.userParams = { ...store.userParams, ...params };
|
||||
store.userFilter = { ...filter, ...store.userFilter };
|
||||
if (filter?.order) store.order = filter.order;
|
||||
}
|
||||
|
@ -113,7 +114,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"]').length)
|
||||
if (!document.querySelectorAll('[role="dialog"][aria-modal="true"]').length)
|
||||
updateRouter && updateStateParams();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
import { useSession } from './useSession';
|
||||
import axios from 'axios';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
export function usePrintService() {
|
||||
const quasar = useQuasar();
|
||||
const { t } = useI18n();
|
||||
|
||||
const { getTokenMultimedia } = useSession();
|
||||
|
||||
function sendEmail(path, params) {
|
||||
return axios.post(path, params).then(() =>
|
||||
quasar.notify({
|
||||
message: 'Notification sent',
|
||||
message: t('globals.notificationSent'),
|
||||
type: 'positive',
|
||||
icon: 'check',
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
function openReport(path, params) {
|
||||
function openReport(path, params, isNewTab = '_self') {
|
||||
if (typeof params === 'string') params = JSON.parse(params);
|
||||
params = Object.assign(
|
||||
{
|
||||
access_token: getTokenMultimedia(),
|
||||
|
@ -25,8 +29,7 @@ export function usePrintService() {
|
|||
);
|
||||
|
||||
const query = new URLSearchParams(params).toString();
|
||||
|
||||
window.open(`api/${path}?${query}`);
|
||||
window.open(`api/${path}?${query}`, isNewTab);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -268,6 +268,7 @@ input::-webkit-inner-spin-button {
|
|||
max-width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-photo-btn {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
|
@ -275,3 +276,19 @@ input::-webkit-inner-spin-button {
|
|||
z-index: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.subName {
|
||||
color: var(--vn-label-color);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.q-date {
|
||||
&__today {
|
||||
border: 2px solid $info;
|
||||
color: $info;
|
||||
}
|
||||
}
|
||||
|
||||
.no-visible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@ $color-font-secondary: #777;
|
|||
.bg-success {
|
||||
background-color: $positive;
|
||||
}
|
||||
|
||||
.bg-notice {
|
||||
background-color: $info;
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
});
|
||||
|
|
|
@ -2,6 +2,7 @@ globals:
|
|||
lang:
|
||||
es: Spanish
|
||||
en: English
|
||||
quantity: Quantity
|
||||
language: Language
|
||||
entity: Entity
|
||||
user: User
|
||||
|
@ -49,6 +50,7 @@ globals:
|
|||
summary:
|
||||
basicData: Basic data
|
||||
daysOnward: Days onward
|
||||
daysAgo: Days ago
|
||||
today: Today
|
||||
yesterday: Yesterday
|
||||
dateFormat: en-GB
|
||||
|
@ -98,13 +100,20 @@ globals:
|
|||
to: To
|
||||
notes: Notes
|
||||
refresh: Refresh
|
||||
item: Item
|
||||
ticket: Ticket
|
||||
campaign: Campaign
|
||||
weight: Weight
|
||||
error: Ups! Something went wrong
|
||||
recalc: Recalculate
|
||||
pageTitles:
|
||||
logIn: Login
|
||||
addressEdit: Update address
|
||||
summary: Summary
|
||||
basicData: Basic data
|
||||
log: Logs
|
||||
parkingList: Parkings list
|
||||
agencyList: Agencies list
|
||||
agencyList: Agencies
|
||||
agency: Agency
|
||||
workCenters: Work centers
|
||||
modes: Modes
|
||||
|
@ -124,9 +133,11 @@ globals:
|
|||
notifications: Notifications
|
||||
defaulter: Defaulter
|
||||
customerCreate: New customer
|
||||
createOrder: New order
|
||||
fiscalData: Fiscal data
|
||||
billingData: Billing data
|
||||
consignees: Consignees
|
||||
address-create: New address
|
||||
notes: Notes
|
||||
credits: Credits
|
||||
greuges: Greuges
|
||||
|
@ -150,6 +161,7 @@ globals:
|
|||
dms: File management
|
||||
entryCreate: New entry
|
||||
latestBuys: Latest buys
|
||||
reserves: Reserves
|
||||
tickets: Tickets
|
||||
ticketCreate: New Tickets
|
||||
boxing: Boxing
|
||||
|
@ -197,7 +209,7 @@ globals:
|
|||
roadmap: Roadmap
|
||||
stops: Stops
|
||||
routes: Routes
|
||||
cmrsList: CMRs list
|
||||
cmrsList: CMRs
|
||||
RouteList: List
|
||||
routeCreate: New route
|
||||
RouteRoadmap: Roadmaps
|
||||
|
@ -263,6 +275,9 @@ globals:
|
|||
clientsActionsMonitor: Clients and actions
|
||||
serial: Serial
|
||||
medical: Mutual
|
||||
RouteExtendedList: Router
|
||||
wasteRecalc: Waste recaclulate
|
||||
operator: Operator
|
||||
supplier: Supplier
|
||||
created: Created
|
||||
worker: Worker
|
||||
|
@ -278,12 +293,32 @@ 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
|
||||
provinceFk: Province
|
||||
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:
|
||||
|
@ -314,135 +349,6 @@ resetPassword:
|
|||
repeatPassword: Repeat password
|
||||
passwordNotMatch: Passwords don't match
|
||||
passwordChanged: Password changed
|
||||
customer:
|
||||
list:
|
||||
phone: Phone
|
||||
email: Email
|
||||
customerOrders: Display customer orders
|
||||
moreOptions: More options
|
||||
card:
|
||||
customerList: Customer list
|
||||
customerId: Claim ID
|
||||
salesPerson: Sales person
|
||||
credit: Credit
|
||||
risk: Risk
|
||||
securedCredit: Secured credit
|
||||
payMethod: Pay method
|
||||
debt: Debt
|
||||
isFrozen: Customer frozen
|
||||
hasDebt: Customer has debt
|
||||
isDisabled: Customer inactive
|
||||
notChecked: Customer no checked
|
||||
webAccountInactive: Web account inactive
|
||||
noWebAccess: Web access is disabled
|
||||
businessType: Business type
|
||||
passwordRequirements: 'The password must have at least { length } length characters, {nAlpha} alphabetic characters, {nUpper} capital letters, {nDigits} digits and {nPunct} symbols (Ex: $%&.)\n'
|
||||
businessTypeFk: Business type
|
||||
summary:
|
||||
basicData: Basic data
|
||||
fiscalAddress: Fiscal address
|
||||
fiscalData: Fiscal data
|
||||
billingData: Billing data
|
||||
consignee: Default consignee
|
||||
businessData: Business data
|
||||
financialData: Financial data
|
||||
customerId: Customer ID
|
||||
name: Name
|
||||
contact: Contact
|
||||
phone: Phone
|
||||
mobile: Mobile
|
||||
email: Email
|
||||
salesPerson: Sales person
|
||||
contactChannel: Contact channel
|
||||
socialName: Social name
|
||||
fiscalId: Fiscal ID
|
||||
postcode: Postcode
|
||||
province: Province
|
||||
country: Country
|
||||
street: Address
|
||||
isEqualizated: Is equalizated
|
||||
isActive: Is active
|
||||
invoiceByAddress: Invoice by address
|
||||
verifiedData: Verified data
|
||||
hasToInvoice: Has to invoice
|
||||
notifyByEmail: Notify by email
|
||||
vies: VIES
|
||||
payMethod: Pay method
|
||||
bankAccount: Bank account
|
||||
dueDay: Due day
|
||||
hasLcr: Has LCR
|
||||
hasCoreVnl: Has core VNL
|
||||
hasB2BVnl: Has B2B VNL
|
||||
addressName: Address name
|
||||
addressCity: City
|
||||
addressStreet: Street
|
||||
username: Username
|
||||
webAccess: Web access
|
||||
totalGreuge: Total greuge
|
||||
mana: Mana
|
||||
priceIncreasingRate: Price increasing rate
|
||||
averageInvoiced: Average invoiced
|
||||
claimRate: Claming rate
|
||||
risk: Risk
|
||||
riskInfo: Invoices minus payments plus orders not yet invoiced
|
||||
credit: Credit
|
||||
creditInfo: Company's maximum risk
|
||||
securedCredit: Secured credit
|
||||
securedCreditInfo: Solunion's maximum risk
|
||||
balance: Balance
|
||||
balanceInfo: Invoices minus payments
|
||||
balanceDue: Balance due
|
||||
balanceDueInfo: Deviated invoices minus payments
|
||||
recoverySince: Recovery since
|
||||
businessType: Business Type
|
||||
city: City
|
||||
descriptorInfo: Invoices minus payments plus orders not yet
|
||||
rating: Rating
|
||||
recommendCredit: Recommended credit
|
||||
basicData:
|
||||
socialName: Fiscal name
|
||||
businessType: Business type
|
||||
contact: Contact
|
||||
youCanSaveMultipleEmails: You can save multiple emails
|
||||
email: Email
|
||||
phone: Phone
|
||||
mobile: Mobile
|
||||
salesPerson: Sales person
|
||||
contactChannel: Contact channel
|
||||
previousClient: Previous client
|
||||
extendedList:
|
||||
tableVisibleColumns:
|
||||
id: Identifier
|
||||
name: Name
|
||||
socialName: Social name
|
||||
fi: Tax number
|
||||
salesPersonFk: Salesperson
|
||||
credit: Credit
|
||||
creditInsurance: Credit insurance
|
||||
phone: Phone
|
||||
mobile: Mobile
|
||||
street: Street
|
||||
countryFk: Country
|
||||
provinceFk: Province
|
||||
city: City
|
||||
postcode: Postcode
|
||||
email: Email
|
||||
created: Created
|
||||
businessTypeFk: Business type
|
||||
payMethodFk: Billing data
|
||||
sageTaxTypeFk: Sage tax type
|
||||
sageTransactionTypeFk: Sage tr. type
|
||||
isActive: Active
|
||||
isVies: Vies
|
||||
isTaxDataChecked: Verified data
|
||||
isEqualizated: Is equalizated
|
||||
isFreezed: Freezed
|
||||
hasToInvoice: Invoice
|
||||
hasToInvoiceByAddress: Invoice by address
|
||||
isToBeMailed: Mailing
|
||||
hasLcr: Received LCR
|
||||
hasCoreVnl: VNL core received
|
||||
hasSepaVnl: VNL B2B received
|
||||
entry:
|
||||
list:
|
||||
newEntry: New entry
|
||||
|
@ -606,6 +512,8 @@ ticket:
|
|||
warehouse: Warehouse
|
||||
customerCard: Customer card
|
||||
alias: Alias
|
||||
ticketList: Ticket List
|
||||
newOrder: New Order
|
||||
boxing:
|
||||
expedition: Expedition
|
||||
item: Item
|
||||
|
@ -627,6 +535,7 @@ ticket:
|
|||
landed: Landed
|
||||
consigneePhone: Consignee phone
|
||||
consigneeMobile: Consignee mobile
|
||||
consigneeAddress: Consignee address
|
||||
clientPhone: Client phone
|
||||
clientMobile: Client mobile
|
||||
consignee: Consignee
|
||||
|
@ -649,13 +558,17 @@ 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
|
||||
|
@ -679,7 +592,6 @@ invoiceOut:
|
|||
client: Client
|
||||
company: Company
|
||||
customerCard: Customer card
|
||||
ticketList: Ticket List
|
||||
summary:
|
||||
issued: Issued
|
||||
created: Created
|
||||
|
@ -833,6 +745,7 @@ worker:
|
|||
locker: Locker
|
||||
balance: Balance
|
||||
medical: Medical
|
||||
operator: Operator
|
||||
list:
|
||||
name: Name
|
||||
email: Email
|
||||
|
@ -844,6 +757,7 @@ worker:
|
|||
newWorker: New worker
|
||||
card:
|
||||
workerId: Worker ID
|
||||
user: User
|
||||
name: Name
|
||||
email: Email
|
||||
phone: Phone
|
||||
|
@ -904,14 +818,14 @@ worker:
|
|||
bankEntity: Swift / BIC
|
||||
formation:
|
||||
tableVisibleColumns:
|
||||
course: Curso
|
||||
startDate: Fecha Inicio
|
||||
endDate: Fecha Fin
|
||||
center: Centro Formación
|
||||
invoice: Factura
|
||||
amount: Importe
|
||||
remark: Bonficado
|
||||
hasDiploma: Diploma
|
||||
course: Course
|
||||
startDate: Start date
|
||||
endDate: End date
|
||||
center: Training center
|
||||
invoice: Invoice
|
||||
amount: Amount
|
||||
remark: Remark
|
||||
hasDiploma: Has diploma
|
||||
medical:
|
||||
tableVisibleColumns:
|
||||
date: Date
|
||||
|
@ -929,7 +843,29 @@ 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
|
||||
wagonsList: Wagons List
|
||||
wagonCreate: Create wagon
|
||||
wagonEdit: Edit wagon
|
||||
typesList: Types List
|
||||
typeCreate: Create type
|
||||
typeEdit: Edit type
|
||||
wagonCounter: Trolley counter
|
||||
wagonTray: Tray List
|
||||
type:
|
||||
name: Name
|
||||
submit: Submit
|
||||
|
@ -958,34 +894,7 @@ 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
|
||||
|
@ -1001,6 +910,7 @@ supplier:
|
|||
account: Account
|
||||
payMethod: Pay Method
|
||||
payDay: Pay Day
|
||||
country: Country
|
||||
summary:
|
||||
responsible: Responsible
|
||||
notes: Notes
|
||||
|
@ -1099,6 +1009,7 @@ travel:
|
|||
warehouseOut: Warehouse out
|
||||
totalEntries: Total entries
|
||||
totalEntriesTooltip: Total entries
|
||||
daysOnward: Landed days onwards
|
||||
summary:
|
||||
confirmed: Confirmed
|
||||
entryId: Entry Id
|
||||
|
@ -1174,7 +1085,7 @@ item:
|
|||
producer: Producer
|
||||
landed: Landed
|
||||
fixedPrice:
|
||||
itemId: Item ID
|
||||
itemFk: Item ID
|
||||
groupingPrice: Grouping price
|
||||
packingPrice: Packing price
|
||||
hasMinPrice: Has min price
|
||||
|
|
|
@ -3,6 +3,7 @@ globals:
|
|||
es: Español
|
||||
en: Inglés
|
||||
language: Idioma
|
||||
quantity: Cantidad
|
||||
entity: Entidad
|
||||
user: Usuario
|
||||
details: Detalles
|
||||
|
@ -48,6 +49,7 @@ globals:
|
|||
summary:
|
||||
basicData: Datos básicos
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
today: Hoy
|
||||
yesterday: Ayer
|
||||
dateFormat: es-ES
|
||||
|
@ -62,7 +64,7 @@ globals:
|
|||
shipped: F. envío
|
||||
totalEntries: Ent. totales
|
||||
amount: Importe
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
download: Descargar
|
||||
downloadPdf: Descargar PDF
|
||||
selectRows: 'Seleccionar las { numberRows } filas(s)'
|
||||
|
@ -100,13 +102,20 @@ globals:
|
|||
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
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
log: Historial
|
||||
parkingList: Listado de parkings
|
||||
agencyList: Listado de agencias
|
||||
agencyList: Agencias
|
||||
agency: Agencia
|
||||
workCenters: Centros de trabajo
|
||||
modes: Modos
|
||||
|
@ -121,6 +130,7 @@ globals:
|
|||
inheritedRoles: Roles heredados
|
||||
customers: Clientes
|
||||
customerCreate: Nuevo cliente
|
||||
createOrder: Nuevo pedido
|
||||
list: Listado
|
||||
webPayments: Pagos Web
|
||||
extendedList: Listado extendido
|
||||
|
@ -130,6 +140,7 @@ globals:
|
|||
fiscalData: Datos fiscales
|
||||
billingData: Forma de pago
|
||||
consignees: Consignatarios
|
||||
'address-create': Nuevo consignatario
|
||||
notes: Notas
|
||||
credits: Créditos
|
||||
greuges: Greuges
|
||||
|
@ -153,6 +164,7 @@ globals:
|
|||
dms: Gestión documental
|
||||
entryCreate: Nueva entrada
|
||||
latestBuys: Últimas compras
|
||||
reserves: Reservas
|
||||
tickets: Tickets
|
||||
ticketCreate: Nuevo ticket
|
||||
boxing: Encajado
|
||||
|
@ -201,12 +213,13 @@ globals:
|
|||
roadmap: Troncales
|
||||
stops: Paradas
|
||||
routes: Rutas
|
||||
cmrsList: Listado de CMRs
|
||||
cmrsList: CMRs
|
||||
RouteList: Listado
|
||||
routeCreate: Nueva ruta
|
||||
RouteRoadmap: Troncales
|
||||
RouteRoadmapCreate: Crear troncal
|
||||
autonomous: Autónomos
|
||||
RouteExtendedList: Enrutador
|
||||
suppliers: Proveedores
|
||||
supplier: Proveedor
|
||||
supplierCreate: Nuevo proveedor
|
||||
|
@ -257,7 +270,7 @@ globals:
|
|||
tracking: Estados
|
||||
components: Componentes
|
||||
pictures: Fotos
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
ldap: LDAP
|
||||
samba: Samba
|
||||
twoFactor: Doble factor
|
||||
|
@ -267,6 +280,8 @@ globals:
|
|||
clientsActionsMonitor: Clientes y acciones
|
||||
serial: Facturas por serie
|
||||
medical: Mutua
|
||||
wasteRecalc: Recalcular mermas
|
||||
operator: Operario
|
||||
supplier: Proveedor
|
||||
created: Fecha creación
|
||||
worker: Trabajador
|
||||
|
@ -282,12 +297,32 @@ 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
|
||||
provinceFk: Provincia
|
||||
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:
|
||||
|
@ -316,134 +351,6 @@ resetPassword:
|
|||
repeatPassword: Repetir contraseña
|
||||
passwordNotMatch: Las contraseñas no coinciden
|
||||
passwordChanged: Contraseña cambiada
|
||||
customer:
|
||||
list:
|
||||
phone: Teléfono
|
||||
email: Email
|
||||
customerOrders: Mostrar órdenes del cliente
|
||||
moreOptions: Más opciones
|
||||
card:
|
||||
customerId: ID cliente
|
||||
salesPerson: Comercial
|
||||
credit: Crédito
|
||||
risk: Riesgo
|
||||
securedCredit: Crédito asegurado
|
||||
payMethod: Método de pago
|
||||
debt: Riesgo
|
||||
isFrozen: Cliente congelado
|
||||
hasDebt: Cliente con riesgo
|
||||
isDisabled: Cliente inactivo
|
||||
notChecked: Cliente no comprobado
|
||||
webAccountInactive: Sin acceso web
|
||||
noWebAccess: El acceso web está desactivado
|
||||
businessType: Tipo de negocio
|
||||
passwordRequirements: 'La contraseña debe tener al menos { length } caracteres de longitud, {nAlpha} caracteres alfabéticos, {nUpper} letras mayúsculas, {nDigits} dígitos y {nPunct} símbolos (Ej: $%&.)'
|
||||
businessTypeFk: Tipo de negocio
|
||||
summary:
|
||||
basicData: Datos básicos
|
||||
fiscalAddress: Dirección fiscal
|
||||
fiscalData: Datos fiscales
|
||||
billingData: Datos de facturación
|
||||
consignee: Consignatario pred.
|
||||
businessData: Datos comerciales
|
||||
financialData: Datos financieros
|
||||
customerId: ID cliente
|
||||
name: Nombre
|
||||
contact: Contacto
|
||||
phone: Teléfono
|
||||
mobile: Móvil
|
||||
email: Email
|
||||
salesPerson: Comercial
|
||||
contactChannel: Canal de contacto
|
||||
socialName: Razón social
|
||||
fiscalId: NIF/CIF
|
||||
postcode: Código postal
|
||||
province: Provincia
|
||||
country: País
|
||||
street: Calle
|
||||
isEqualizated: Recargo de equivalencia
|
||||
isActive: Activo
|
||||
invoiceByAddress: Facturar por consignatario
|
||||
verifiedData: Datos verificados
|
||||
hasToInvoice: Facturar
|
||||
notifyByEmail: Notificar por email
|
||||
vies: VIES
|
||||
payMethod: Método de pago
|
||||
bankAccount: Cuenta bancaria
|
||||
dueDay: Día de pago
|
||||
hasLcr: Recibido LCR
|
||||
hasCoreVnl: Recibido core VNL
|
||||
hasB2BVnl: Recibido B2B VNL
|
||||
addressName: Nombre de la dirección
|
||||
addressCity: Ciudad
|
||||
addressStreet: Calle
|
||||
username: Usuario
|
||||
webAccess: Acceso web
|
||||
totalGreuge: Greuge total
|
||||
mana: Maná
|
||||
priceIncreasingRate: Ratio de incremento de precio
|
||||
averageInvoiced: Facturación media
|
||||
claimRate: Ratio de reclamaciones
|
||||
risk: Riesgo
|
||||
riskInfo: Facturas menos recibos mas pedidos sin facturar
|
||||
credit: Crédito
|
||||
creditInfo: Riesgo máximo asumido por la empresa
|
||||
securedCredit: Crédito asegurado
|
||||
securedCreditInfo: Riesgo máximo asumido por Solunion
|
||||
balance: Balance
|
||||
balanceInfo: Facturas menos recibos
|
||||
balanceDue: Saldo vencido
|
||||
balanceDueInfo: Facturas fuera de plazo menos recibos
|
||||
recoverySince: Recobro desde
|
||||
businessType: Tipo de negocio
|
||||
city: Población
|
||||
descriptorInfo: Facturas menos recibos mas pedidos sin facturar
|
||||
rating: Clasificación
|
||||
recommendCredit: Crédito recomendado
|
||||
basicData:
|
||||
socialName: Nombre fiscal
|
||||
businessType: Tipo de negocio
|
||||
contact: Contacto
|
||||
youCanSaveMultipleEmails: Puede guardar varios correos electrónicos encadenándolos mediante comas sin espacios{','} ejemplo{':'} user{'@'}dominio{'.'}com, user2{'@'}dominio{'.'}com siendo el primer correo electrónico el principal
|
||||
email: Email
|
||||
phone: Teléfono
|
||||
mobile: Móvil
|
||||
salesPerson: Comercial
|
||||
contactChannel: Canal de contacto
|
||||
previousClient: Cliente anterior
|
||||
extendedList:
|
||||
tableVisibleColumns:
|
||||
id: Identificador
|
||||
name: Nombre
|
||||
socialName: Razón social
|
||||
fi: NIF / CIF
|
||||
salesPersonFk: Comercial
|
||||
credit: Crédito
|
||||
creditInsurance: Crédito asegurado
|
||||
phone: Teléfono
|
||||
mobile: Móvil
|
||||
street: Dirección fiscal
|
||||
countryFk: País
|
||||
provinceFk: Provincia
|
||||
city: Población
|
||||
postcode: Código postal
|
||||
email: Email
|
||||
created: Fecha creación
|
||||
businessTypeFk: Tipo de negocio
|
||||
payMethodFk: Forma de pago
|
||||
sageTaxTypeFk: Tipo de impuesto Sage
|
||||
sageTransactionTypeFk: Tipo tr. sage
|
||||
isActive: Activo
|
||||
isVies: Vies
|
||||
isTaxDataChecked: Datos comprobados
|
||||
isEqualizated: Recargo de equivalencias
|
||||
isFreezed: Congelado
|
||||
hasToInvoice: Factura
|
||||
hasToInvoiceByAddress: Factura por consigna
|
||||
isToBeMailed: Env. emails
|
||||
hasLcr: Recibido LCR
|
||||
hasCoreVnl: Recibido core VNL
|
||||
hasSepaVnl: Recibido B2B VNL
|
||||
entry:
|
||||
list:
|
||||
newEntry: Nueva entrada
|
||||
|
@ -596,7 +503,7 @@ ticket:
|
|||
tracking: Estados
|
||||
components: Componentes
|
||||
pictures: Fotos
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
list:
|
||||
nickname: Alias
|
||||
state: Estado
|
||||
|
@ -614,6 +521,8 @@ ticket:
|
|||
warehouse: Almacén
|
||||
customerCard: Ficha del cliente
|
||||
alias: Alias
|
||||
ticketList: Listado de tickets
|
||||
newOrder: Nuevo pedido
|
||||
boxing:
|
||||
expedition: Expedición
|
||||
item: Artículo
|
||||
|
@ -635,6 +544,7 @@ ticket:
|
|||
landed: Entregado
|
||||
consigneePhone: Tel. consignatario
|
||||
consigneeMobile: Móv. consignatario
|
||||
consigneeAddress: Dir. consignatario
|
||||
clientPhone: Tel. cliente
|
||||
clientMobile: Móv. cliente
|
||||
consignee: Consignatario
|
||||
|
@ -657,13 +567,16 @@ 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
|
||||
|
@ -839,6 +752,7 @@ worker:
|
|||
balance: Balance
|
||||
formation: Formación
|
||||
medical: Mutua
|
||||
operator: Operario
|
||||
list:
|
||||
name: Nombre
|
||||
email: Email
|
||||
|
@ -850,6 +764,7 @@ worker:
|
|||
newWorker: Nuevo trabajador
|
||||
card:
|
||||
workerId: ID Trabajador
|
||||
user: Usuario
|
||||
name: Nombre
|
||||
email: Correo personal
|
||||
phone: Teléfono
|
||||
|
@ -926,7 +841,30 @@ 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
|
||||
wagonsList: Listado vagones
|
||||
wagonCreate: Crear tipo
|
||||
wagonEdit: Editar tipo
|
||||
typesList: Listado tipos
|
||||
typeCreate: Crear tipo
|
||||
typeEdit: Editar tipo
|
||||
wagonCounter: Contador de carros
|
||||
wagonTray: Listado bandejas
|
||||
type:
|
||||
name: Nombre
|
||||
submit: Guardar
|
||||
|
@ -955,21 +893,6 @@ 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': Sí
|
||||
'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
|
||||
|
@ -985,6 +908,7 @@ supplier:
|
|||
account: Cuenta
|
||||
payMethod: Método de pago
|
||||
payDay: Dia de pago
|
||||
country: País
|
||||
summary:
|
||||
responsible: Responsable
|
||||
notes: Notas
|
||||
|
@ -1083,6 +1007,7 @@ travel:
|
|||
warehouseOut: Alm.entrada
|
||||
totalEntries: ∑
|
||||
totalEntriesTooltip: Entradas totales
|
||||
daysOnward: Días de llegada en adelante
|
||||
summary:
|
||||
confirmed: Confirmado
|
||||
entryId: Id entrada
|
||||
|
@ -1158,7 +1083,7 @@ item:
|
|||
producer: Productor
|
||||
landed: F. entrega
|
||||
fixedPrice:
|
||||
itemId: ID Artículo
|
||||
itemFk: ID Artículo
|
||||
groupingPrice: Precio grouping
|
||||
packingPrice: Precio packing
|
||||
hasMinPrice: Tiene precio mínimo
|
||||
|
|
|
@ -5,11 +5,14 @@ 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',
|
||||
|
@ -18,27 +21,31 @@ const columns = computed(() => [
|
|||
isId: true,
|
||||
field: 'id',
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
name: 'search',
|
||||
attrs: {
|
||||
url: 'VnUsers/preview',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'username',
|
||||
name: 'roleFk',
|
||||
label: t('role'),
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
name: 'roleFk',
|
||||
attrs: {
|
||||
url: 'VnRoles',
|
||||
optionValue: 'id',
|
||||
optionLabel: 'name',
|
||||
},
|
||||
},
|
||||
format: ({ role }, dashIfEmpty) => dashIfEmpty(role?.name),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'nickname',
|
||||
label: t('Nickname'),
|
||||
isTitle: true,
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -50,9 +57,6 @@ const columns = computed(() => [
|
|||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -104,17 +108,25 @@ 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>
|
||||
|
||||
|
|
|
@ -46,13 +46,9 @@ const columns = computed(() => [
|
|||
]);
|
||||
|
||||
const deleteAlias = async (row) => {
|
||||
try {
|
||||
await axios.delete(`${urlPath.value}/${row.id}`);
|
||||
notify(t('User removed'), 'positive');
|
||||
fetchAliases();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
await axios.delete(`${urlPath.value}/${row.id}`);
|
||||
notify(t('User removed'), 'positive');
|
||||
fetchAliases();
|
||||
};
|
||||
|
||||
watch(
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import { ref, watch } from 'vue';
|
||||
|
@ -24,7 +25,7 @@ watch(
|
|||
<template>
|
||||
<FormModel
|
||||
ref="formModelRef"
|
||||
:url="`VnUsers/preview`"
|
||||
url="VnUsers/preview"
|
||||
:url-update="`VnUsers/${route.params.id}/update-user`"
|
||||
:filter="accountFilter"
|
||||
model="Accounts"
|
||||
|
@ -43,6 +44,15 @@ watch(
|
|||
option-value="code"
|
||||
option-label="code"
|
||||
/>
|
||||
<VnSelectEnum
|
||||
schema="account"
|
||||
table="user"
|
||||
column="twoFactor"
|
||||
v-model="data.twoFactor"
|
||||
:label="t('account.card.twoFactor')"
|
||||
option-value="code"
|
||||
option-label="code"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -10,7 +10,7 @@ const { t } = useI18n();
|
|||
<VnCard
|
||||
data-key="Account"
|
||||
:descriptor="AccountDescriptor"
|
||||
search-data-key="AccountUsers"
|
||||
search-data-key="AccountList"
|
||||
:searchbar-props="{
|
||||
url: 'VnUsers/preview',
|
||||
label: t('account.search'),
|
||||
|
|
|
@ -4,9 +4,12 @@ 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,
|
||||
|
@ -62,6 +65,19 @@ 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')"
|
||||
|
@ -92,6 +108,17 @@ 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
|
||||
|
@ -138,6 +165,5 @@ async function sync() {
|
|||
<QItem v-ripple clickable @click="showSyncDialog = true">
|
||||
<QItemSection>{{ t('account.card.actions.sync.name') }}</QItemSection>
|
||||
</QItem>
|
||||
|
||||
<QSeparator />
|
||||
</template>
|
||||
|
|
|
@ -61,23 +61,15 @@ const fetchAccountExistence = async () => {
|
|||
};
|
||||
|
||||
const deleteMailAlias = async (row) => {
|
||||
try {
|
||||
await axios.delete(`${urlPath}/${row.id}`);
|
||||
fetchMailAliases();
|
||||
notify(t('Unsubscribed from alias!'), 'positive');
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
await axios.delete(`${urlPath}/${row.id}`);
|
||||
fetchMailAliases();
|
||||
notify(t('Unsubscribed from alias!'), 'positive');
|
||||
};
|
||||
|
||||
const createMailAlias = async (mailAliasFormData) => {
|
||||
try {
|
||||
await axios.post(urlPath, mailAliasFormData);
|
||||
notify(t('Subscribed to alias!'), 'positive');
|
||||
fetchMailAliases();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
await axios.post(urlPath, mailAliasFormData);
|
||||
notify(t('Subscribed to alias!'), 'positive');
|
||||
fetchMailAliases();
|
||||
};
|
||||
|
||||
const fetchMailAliases = async () => {
|
||||
|
|
|
@ -19,7 +19,15 @@ watch(
|
|||
</script>
|
||||
<template>
|
||||
<FetchData url="VnRoles" auto-load @on-fetch="(data) => (rolesOptions = data)" />
|
||||
<FormModel ref="formModelRef" model="AccountPrivileges" url="VnUsers" auto-load>
|
||||
<FormModel
|
||||
ref="formModelRef"
|
||||
model="AccountPrivileges"
|
||||
url="VnUsers/preview"
|
||||
:filter="{ where: { id: route.params.id } }"
|
||||
:url-create="`VnUsers/${route.params.id}/privileges`"
|
||||
:id="route.params.id"
|
||||
auto-load
|
||||
>
|
||||
<template #form="{ data }">
|
||||
<div class="q-gutter-y-sm">
|
||||
<QCheckbox
|
||||
|
|
|
@ -46,29 +46,15 @@ const columns = computed(() => [
|
|||
]);
|
||||
|
||||
const deleteSubRole = async (row) => {
|
||||
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);
|
||||
}
|
||||
await axios.delete(`${urlPath.value}/${row.id}`);
|
||||
fetchSubRoles();
|
||||
notify(t('Role removed. Changes will take a while to fully propagate.'), 'positive');
|
||||
};
|
||||
|
||||
const createSubRole = async (subRoleFormData) => {
|
||||
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);
|
||||
}
|
||||
await axios.post(urlPath.value, subRoleFormData);
|
||||
notify(t('Role added! Changes will take a while to fully propagate.'), 'positive');
|
||||
fetchSubRoles();
|
||||
};
|
||||
|
||||
watch(
|
||||
|
@ -142,7 +128,13 @@ const redirectToRoleSummary = (id) =>
|
|||
<SubRoleCreateForm @on-submit-create-subrole="createSubRole" />
|
||||
</QDialog>
|
||||
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
||||
<QBtn fab icon="add" color="primary" @click="openCreateSubRoleForm()">
|
||||
<QBtn
|
||||
fab
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
color="primary"
|
||||
@click="openCreateSubRoleForm()"
|
||||
>
|
||||
<QTooltip>{{ t('warehouses.add') }}</QTooltip>
|
||||
</QBtn>
|
||||
</QPageSticky>
|
||||
|
|
|
@ -35,6 +35,7 @@ account:
|
|||
willDeactivated: User will be deactivated
|
||||
activated: User activated!
|
||||
deactivated: User deactivated!
|
||||
twoFactor: Two factor
|
||||
actions:
|
||||
setPassword: Set password
|
||||
disableAccount:
|
||||
|
|
|
@ -32,6 +32,7 @@ account:
|
|||
activated: ¡Usuario activado!
|
||||
deactivated: ¡Usuario desactivado!
|
||||
newUser: Nuevo usuario
|
||||
twoFactor: Doble factor
|
||||
privileges:
|
||||
delegate: Puede delegar privilegios
|
||||
actions:
|
||||
|
|
|
@ -3,58 +3,18 @@ import { ref } from 'vue';
|
|||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||
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';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
|
||||
import axios from 'axios';
|
||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
const claimStates = ref([]);
|
||||
const claimStatesCopy = ref([]);
|
||||
const optionsList = ref([]);
|
||||
|
||||
const workersOptions = ref([]);
|
||||
|
||||
function setClaimStates(data) {
|
||||
claimStates.value = data;
|
||||
claimStatesCopy.value = data;
|
||||
}
|
||||
|
||||
async function getEnumValues() {
|
||||
optionsList.value = [{ id: null, description: t('claim.null') }];
|
||||
const { data } = await axios.get(`Applications/get-enum-values`, {
|
||||
params: {
|
||||
schema: 'vn',
|
||||
table: 'claim',
|
||||
column: 'pickup',
|
||||
},
|
||||
});
|
||||
for (let value of data)
|
||||
optionsList.value.push({ id: value, description: t(`claim.${value}`) });
|
||||
}
|
||||
|
||||
getEnumValues();
|
||||
|
||||
const statesFilter = {
|
||||
options: claimStates,
|
||||
filterFn: (options, value) => {
|
||||
const search = value.toLowerCase();
|
||||
|
||||
if (value === '') return claimStatesCopy.value;
|
||||
|
||||
return options.value.filter((row) => {
|
||||
const description = row.description.toLowerCase();
|
||||
|
||||
return description.indexOf(search) > -1;
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -70,7 +30,7 @@ const statesFilter = {
|
|||
auto-load
|
||||
:reload="true"
|
||||
>
|
||||
<template #form="{ data, validate, filter }">
|
||||
<template #form="{ data, validate }">
|
||||
<VnRow>
|
||||
<VnInput
|
||||
v-model="data.client.name"
|
||||
|
@ -101,20 +61,14 @@ const statesFilter = {
|
|||
/>
|
||||
</template>
|
||||
</VnSelect>
|
||||
<QSelect
|
||||
<VnSelect
|
||||
v-model="data.claimStateFk"
|
||||
:options="claimStates"
|
||||
option-value="id"
|
||||
option-label="description"
|
||||
emit-value
|
||||
url="ClaimStates"
|
||||
:label="t('claim.state')"
|
||||
map-options
|
||||
use-input
|
||||
@filter="(value, update) => filter(value, update, statesFilter)"
|
||||
option-label="description"
|
||||
:rules="validate('claim.claimStateFk')"
|
||||
:input-debounce="0"
|
||||
>
|
||||
</QSelect>
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QInput
|
||||
|
@ -123,16 +77,14 @@ const statesFilter = {
|
|||
:rules="validate('claim.packages')"
|
||||
type="number"
|
||||
/>
|
||||
<QSelect
|
||||
<VnSelectEnum
|
||||
v-model="data.pickup"
|
||||
:options="optionsList"
|
||||
option-value="id"
|
||||
option-label="description"
|
||||
emit-value
|
||||
:label="t('claim.pickup')"
|
||||
map-options
|
||||
use-input
|
||||
:input-debounce="0"
|
||||
table="claim"
|
||||
column="pickup"
|
||||
option-label="description"
|
||||
:translation="(value) => t(`claim.${value}`)"
|
||||
:default-options="[{ id: null, description: t('claim.null') }]"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
|
|
|
@ -16,7 +16,6 @@ const claimReasons = ref([]);
|
|||
const claimResults = ref([]);
|
||||
const claimResponsibles = ref([]);
|
||||
const claimRedeliveries = ref([]);
|
||||
const workers = ref([]);
|
||||
const selected = ref([]);
|
||||
const saveButtonRef = ref();
|
||||
|
||||
|
@ -82,7 +81,9 @@ const columns = computed(() => [
|
|||
label: t('Worker'),
|
||||
field: (row) => row.workerFk,
|
||||
sortable: true,
|
||||
options: workers.value,
|
||||
url: 'Workers/search',
|
||||
where: { active: 1 },
|
||||
sortBy: 'name ASC',
|
||||
model: 'workerFk',
|
||||
optionValue: 'id',
|
||||
optionLabel: 'nickname',
|
||||
|
@ -129,13 +130,6 @@ const columns = computed(() => [
|
|||
@on-fetch="(data) => (claimRedeliveries = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="Workers/search"
|
||||
:where="{ active: 1 }"
|
||||
order="name ASC"
|
||||
@on-fetch="(data) => (workers = data)"
|
||||
auto-load
|
||||
/>
|
||||
<CrudModel
|
||||
data-key="ClaimDevelopments"
|
||||
url="ClaimDevelopments"
|
||||
|
@ -165,6 +159,9 @@ const columns = computed(() => [
|
|||
>
|
||||
<VnSelect
|
||||
v-model="row[col.model]"
|
||||
:url="col.url"
|
||||
:where="col.where"
|
||||
:sort-by="col.sortBy"
|
||||
:options="col.options"
|
||||
:option-value="col.optionValue"
|
||||
:option-label="col.optionLabel"
|
||||
|
|
|
@ -45,7 +45,7 @@ async function onFetchClaim(data) {
|
|||
|
||||
const amount = ref();
|
||||
const amountClaimed = ref();
|
||||
async function onFetch(rows, newRows) {
|
||||
function onFetch(rows, newRows) {
|
||||
if (newRows) rows = newRows;
|
||||
amount.value = 0;
|
||||
amountClaimed.value = 0;
|
||||
|
@ -155,7 +155,7 @@ function showImportDialog() {
|
|||
async function saveWhenHasChanges() {
|
||||
if (claimLinesForm.value.getChanges().updates) {
|
||||
await claimLinesForm.value.onSubmit();
|
||||
await claimLinesForm.value.reload();
|
||||
onFetch(claimLinesForm.value.formData);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -211,7 +211,7 @@ async function saveWhenHasChanges() {
|
|||
<template #body-cell-claimed="{ row }">
|
||||
<QTd auto-width align="right" class="text-primary">
|
||||
<QInput
|
||||
v-model="row.quantity"
|
||||
v-model.number="row.quantity"
|
||||
type="number"
|
||||
dense
|
||||
@keyup.enter="saveWhenHasChanges()"
|
||||
|
@ -266,7 +266,9 @@ async function saveWhenHasChanges() {
|
|||
<template v-if="column.name === 'claimed'">
|
||||
<QItemLabel class="text-primary">
|
||||
<QInput
|
||||
v-model="props.row.quantity"
|
||||
v-model.number="
|
||||
props.row.quantity
|
||||
"
|
||||
type="number"
|
||||
dense
|
||||
autofocus
|
||||
|
@ -315,7 +317,7 @@ async function saveWhenHasChanges() {
|
|||
</div>
|
||||
|
||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||
<QBtn fab color="primary" icon="add" @click="showImportDialog()" />
|
||||
<QBtn fab color="primary" shortcut="+" icon="add" @click="showImportDialog()" />
|
||||
</QPageSticky>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -246,7 +246,13 @@ function onDrag() {
|
|||
</QDialog>
|
||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||
<label for="fileInput">
|
||||
<QBtn fab @click="inputFile.nativeEl.click()" icon="add" color="primary">
|
||||
<QBtn
|
||||
fab
|
||||
@click="inputFile.nativeEl.click()"
|
||||
shortcut="+"
|
||||
icon="add"
|
||||
color="primary"
|
||||
>
|
||||
<QInput
|
||||
ref="inputFile"
|
||||
type="file"
|
||||
|
|
|
@ -94,8 +94,8 @@ const detailsColumns = ref([
|
|||
{
|
||||
name: 'total',
|
||||
label: 'claim.total',
|
||||
field: ({ sale }) =>
|
||||
toCurrency(sale.quantity * sale.price * ((100 - sale.discount) / 100)),
|
||||
field: (row) =>
|
||||
toCurrency(row.quantity * row.sale.price * ((100 - row.sale.discount) / 100)),
|
||||
sortable: true,
|
||||
},
|
||||
]);
|
||||
|
@ -204,7 +204,7 @@ function claimUrl(section) {
|
|||
top
|
||||
color="black"
|
||||
text-color="white"
|
||||
:label="t('ticket.summary.changeState')"
|
||||
:label="t('globals.changeState')"
|
||||
>
|
||||
<QList>
|
||||
<QVirtualScroll
|
||||
|
|
|
@ -52,6 +52,7 @@ const columns = computed(() => [
|
|||
name: 'attendedBy',
|
||||
orderBy: 'workerFk',
|
||||
columnFilter: {
|
||||
name: 'attenderFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Workers/activeWithInheritedRole',
|
||||
|
|
|
@ -5,15 +5,12 @@ import { useRoute, useRouter } from 'vue-router';
|
|||
|
||||
import axios from 'axios';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const addresses = ref([]);
|
||||
const client = ref(null);
|
||||
const provincesLocation = ref([]);
|
||||
|
||||
const addressFilter = {
|
||||
fields: [
|
||||
|
@ -41,7 +38,13 @@ const addressFilter = {
|
|||
{
|
||||
relation: 'province',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
fields: ['id', 'name', 'countryFk'],
|
||||
include: [
|
||||
{
|
||||
relation: 'country',
|
||||
scope: { fields: ['id', 'name'] },
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -83,13 +86,6 @@ const getClientData = async (id) => {
|
|||
}
|
||||
};
|
||||
|
||||
const setProvince = (provinceFk) => {
|
||||
const result = provincesLocation.value.filter(
|
||||
(province) => province.id === provinceFk
|
||||
);
|
||||
return result[0]?.name || '';
|
||||
};
|
||||
|
||||
const isDefaultAddress = (address) => {
|
||||
return client?.value?.defaultAddressFk === address.id ? 1 : 0;
|
||||
};
|
||||
|
@ -128,12 +124,6 @@ const toCustomerAddressEdit = (addressId) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
@on-fetch="(data) => (provincesLocation = data)"
|
||||
auto-load
|
||||
url="Provinces/location"
|
||||
/>
|
||||
|
||||
<div class="full-width flex justify-center">
|
||||
<QCard class="card-width q-pa-lg" v-if="addresses.length">
|
||||
<QCardSection>
|
||||
|
@ -177,7 +167,14 @@ const toCustomerAddressEdit = (addressId) => {
|
|||
<div>{{ item.street }}</div>
|
||||
<div>
|
||||
{{ item.postalCode }} - {{ item.city }},
|
||||
{{ setProvince(item.provinceFk) }}
|
||||
{{ item.province.name }}
|
||||
</div>
|
||||
<div>
|
||||
{{ item.phone }}
|
||||
<span v-if="item.mobile"
|
||||
>,
|
||||
{{ item.mobile }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<QCheckbox
|
||||
|
|
|
@ -5,29 +5,27 @@ import { useRoute } from 'vue-router';
|
|||
import { useAcl } from 'src/composables/useAcl';
|
||||
import axios from 'axios';
|
||||
import { useQuasar } from 'quasar';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
||||
import { toCurrency, toDate, toDateHourMin } from 'src/filters';
|
||||
import { useState } from 'composables/useState';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
import { useSession } from 'composables/useSession';
|
||||
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnSubToolbar from 'components/ui/VnSubToolbar.vue';
|
||||
import VnFilter from 'components/VnTable/VnFilter.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
|
||||
import CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment.vue';
|
||||
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
||||
|
||||
const { openConfirmationModal } = useVnConfirm();
|
||||
const { sendEmail } = usePrintService();
|
||||
const { sendEmail, openReport } = usePrintService();
|
||||
const { t } = useI18n();
|
||||
const { hasAny } = useAcl();
|
||||
|
||||
const session = useSession();
|
||||
const tokenMultimedia = session.getTokenMultimedia();
|
||||
const currentBalance = ref({});
|
||||
const quasar = useQuasar();
|
||||
const route = useRoute();
|
||||
const state = useState();
|
||||
|
@ -35,9 +33,9 @@ const stateStore = useStateStore();
|
|||
const user = state.getUser();
|
||||
|
||||
const clientRisk = ref([]);
|
||||
const companies = ref([]);
|
||||
const tableRef = ref();
|
||||
const companyId = ref();
|
||||
const companyLastId = ref(user.value.companyFk);
|
||||
const companyId = ref(user.value.companyFk);
|
||||
const balances = ref([]);
|
||||
const vnFilterRef = ref({});
|
||||
const filter = computed(() => {
|
||||
|
@ -47,43 +45,16 @@ const filter = computed(() => {
|
|||
};
|
||||
});
|
||||
|
||||
const companyFilterColumn = {
|
||||
align: 'left',
|
||||
name: 'companyId',
|
||||
label: t('Company'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Companies',
|
||||
optionLabel: 'code',
|
||||
sortBy: 'code',
|
||||
limit: 0,
|
||||
},
|
||||
columnFilter: {
|
||||
event: {
|
||||
remove: () => (companyId.value = null),
|
||||
'update:modelValue': (newCompanyFk) => {
|
||||
if (!newCompanyFk) return;
|
||||
vnFilterRef.value.addFilter(newCompanyFk);
|
||||
companyLastId.value = newCompanyFk;
|
||||
},
|
||||
blur: () =>
|
||||
!companyId.value &&
|
||||
(companyId.value = companyLastId.value ?? user.value.companyFk),
|
||||
},
|
||||
},
|
||||
visible: false,
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
align: 'right',
|
||||
name: 'payed',
|
||||
label: t('Date'),
|
||||
format: ({ payed }) => toDate(payed),
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
align: 'right',
|
||||
name: 'created',
|
||||
label: t('Creation date'),
|
||||
format: ({ created }) => toDateHourMin(created),
|
||||
|
@ -91,16 +62,10 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'workerFk',
|
||||
label: t('Employee'),
|
||||
columnField: {
|
||||
component: 'userLink',
|
||||
attrs: ({ row }) => {
|
||||
return {
|
||||
workerId: row.workerFk,
|
||||
name: row.userName,
|
||||
};
|
||||
},
|
||||
attrs: ({ row }) => ({ workerId: row.workerFk, name: row.userName }),
|
||||
},
|
||||
cardVisible: true,
|
||||
},
|
||||
|
@ -125,14 +90,14 @@ const columns = computed(() => [
|
|||
isId: true,
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
align: 'left',
|
||||
name: 'credit',
|
||||
label: t('Havings'),
|
||||
format: ({ credit }) => credit && toCurrency(credit),
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
align: 'left',
|
||||
name: 'balance',
|
||||
label: t('Balance'),
|
||||
format: ({ balance }) => toCurrency(balance),
|
||||
|
@ -171,41 +136,20 @@ const columns = computed(() => [
|
|||
|
||||
onBeforeMount(() => {
|
||||
stateStore.rightDrawer = true;
|
||||
companyId.value = user.value.companyFk;
|
||||
});
|
||||
|
||||
async function getClientRisk() {
|
||||
const { data } = await axios.get(`clientRisks`, {
|
||||
params: {
|
||||
filter: JSON.stringify({
|
||||
include: { relation: 'company', scope: { fields: ['code'] } },
|
||||
where: { clientFk: route.params.id, companyFk: user.value.companyFk },
|
||||
}),
|
||||
},
|
||||
});
|
||||
clientRisk.value = data;
|
||||
return clientRisk.value;
|
||||
}
|
||||
async function getCurrentBalance(data) {
|
||||
currentBalance.value[companyId.value] = {
|
||||
amount: 0,
|
||||
code: companies.value.find((c) => c.id === companyId.value)?.code,
|
||||
};
|
||||
|
||||
async function getCurrentBalance() {
|
||||
const currentBalance = (await getClientRisk()).find((balance) => {
|
||||
return balance.companyFk === companyId.value;
|
||||
});
|
||||
return currentBalance && currentBalance.amount;
|
||||
}
|
||||
|
||||
async function onFetch(data) {
|
||||
balances.value = [];
|
||||
for (const [index, balance] of data.entries()) {
|
||||
if (index === 0) {
|
||||
balance.balance = await getCurrentBalance();
|
||||
continue;
|
||||
}
|
||||
const previousBalance = data[index - 1];
|
||||
balance.balance =
|
||||
previousBalance?.balance - (previousBalance?.debit - previousBalance?.credit);
|
||||
for (const balance of data) {
|
||||
currentBalance.value[balance.companyFk] = {
|
||||
code: balance.company.code,
|
||||
amount: balance.amount,
|
||||
};
|
||||
}
|
||||
balances.value = data;
|
||||
}
|
||||
|
||||
const showNewPaymentDialog = () => {
|
||||
|
@ -220,31 +164,48 @@ const showNewPaymentDialog = () => {
|
|||
};
|
||||
|
||||
const showBalancePdf = ({ id }) => {
|
||||
const url = `api/InvoiceOuts/${id}/download?access_token=${tokenMultimedia}`;
|
||||
window.open(url, '_blank');
|
||||
openReport(`InvoiceOuts/${id}/download`, {}, '_blank');
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="Companies"
|
||||
auto-load
|
||||
@on-fetch="(data) => (companies = data)"
|
||||
></FetchData>
|
||||
<FetchData
|
||||
v-if="companies.length > 0"
|
||||
url="clientRisks"
|
||||
:filter="{
|
||||
include: { relation: 'company', scope: { fields: ['code'] } },
|
||||
where: { clientFk: route.params.id },
|
||||
}"
|
||||
auto-load
|
||||
@on-fetch="getCurrentBalance"
|
||||
></FetchData>
|
||||
|
||||
<VnSubToolbar class="q-mb-md">
|
||||
<template #st-data>
|
||||
<div class="column justify-center q-px-md q-py-sm">
|
||||
<span class="text-bold">{{ t('Total by company') }}</span>
|
||||
<div class="row justify-center" v-if="clientRisk?.length">
|
||||
{{ clientRisk[0].company.code }}:
|
||||
{{ toCurrency(clientRisk[0].amount) }}
|
||||
<div class="row justify-center">
|
||||
{{ currentBalance[companyId]?.code }}:
|
||||
{{ toCurrency(currentBalance[companyId]?.amount) }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #st-actions>
|
||||
<div>
|
||||
<VnFilter
|
||||
<VnSelect
|
||||
:label="t('Company')"
|
||||
ref="vnFilterRef"
|
||||
v-model="companyId"
|
||||
data-key="CustomerBalance"
|
||||
:column="companyFilterColumn"
|
||||
search-url="balance"
|
||||
/>
|
||||
:options="companies"
|
||||
option-label="code"
|
||||
option-value="id"
|
||||
></VnSelect>
|
||||
</div>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
|
@ -258,7 +219,7 @@ const showBalancePdf = ({ id }) => {
|
|||
:right-search="false"
|
||||
:is-editable="false"
|
||||
:column-search="false"
|
||||
@on-fetch="onFetch"
|
||||
:disable-option="{ card: true }"
|
||||
auto-load
|
||||
>
|
||||
<template #column-balance="{ rowIndex }">
|
||||
|
@ -266,7 +227,7 @@ const showBalancePdf = ({ id }) => {
|
|||
</template>
|
||||
<template #column-description="{ row }">
|
||||
<div class="link" v-if="row.isInvoice">
|
||||
{{ row.description }}
|
||||
{{ t('bill', { ref: row.description }) }}
|
||||
<InvoiceOutDescriptorProxy :id="row.description" />
|
||||
</div>
|
||||
<span v-else class="q-pa-xs dotted rounded-borders" :title="row.description">
|
||||
|
|
|
@ -16,6 +16,20 @@ const { t } = useI18n();
|
|||
const businessTypes = ref([]);
|
||||
const contactChannels = ref([]);
|
||||
const title = ref();
|
||||
const handleSalesModelValue = (val) => ({
|
||||
or: [
|
||||
{ id: val },
|
||||
{ name: val },
|
||||
{ nickname: { like: '%' + val + '%' } },
|
||||
{ code: { like: `${val}%` } },
|
||||
],
|
||||
});
|
||||
|
||||
const exprBuilder = (param, value) => {
|
||||
return {
|
||||
and: [{ active: { neq: false } }, handleSalesModelValue(value)],
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -25,6 +39,7 @@ const title = ref();
|
|||
/>
|
||||
<FetchData
|
||||
url="BusinessTypes"
|
||||
:filter="{ fields: ['code', 'description'], order: 'description ASC ' }"
|
||||
@on-fetch="(data) => (businessTypes = data)"
|
||||
auto-load
|
||||
/>
|
||||
|
@ -33,12 +48,12 @@ const title = ref();
|
|||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('globals.name')"
|
||||
:rules="validate('client.socialName')"
|
||||
:rules="validate('client.name')"
|
||||
autofocus
|
||||
clearable
|
||||
v-model="data.name"
|
||||
/>
|
||||
<QSelect
|
||||
<VnSelect
|
||||
:input-debounce="0"
|
||||
:label="t('customer.basicData.businessType')"
|
||||
:options="businessTypes"
|
||||
|
@ -89,20 +104,20 @@ const title = ref();
|
|||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
url="Workers/activeWithInheritedRole"
|
||||
:filter="{ where: { role: 'salesPerson' } }"
|
||||
option-filter="firstName"
|
||||
url="Workers/search"
|
||||
v-model="data.salesPersonFk"
|
||||
:label="t('customer.basicData.salesPerson')"
|
||||
:params="{
|
||||
departmentCodes: ['VT', 'shopping'],
|
||||
}"
|
||||
:fields="['id', 'nickname']"
|
||||
sort-by="nickname ASC"
|
||||
option-label="nickname"
|
||||
option-value="id"
|
||||
:rules="validate('client.salesPersonFk')"
|
||||
:use-like="false"
|
||||
:emit-value="false"
|
||||
@update:model-value="
|
||||
(val) => {
|
||||
title = val?.nickname;
|
||||
data.salesPersonFk = val?.id;
|
||||
}
|
||||
"
|
||||
:expr-builder="exprBuilder"
|
||||
emit-value
|
||||
auto-load
|
||||
>
|
||||
<template #prepend>
|
||||
<VnAvatar
|
||||
|
@ -111,8 +126,19 @@ const title = ref();
|
|||
:title="title"
|
||||
/>
|
||||
</template>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
||||
<QItemLabel caption
|
||||
>{{ scope.opt?.nickname }},
|
||||
{{ scope.opt?.code }}</QItemLabel
|
||||
>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
<QSelect
|
||||
<VnSelect
|
||||
v-model="data.contactChannelFk"
|
||||
:options="contactChannels"
|
||||
option-value="id"
|
||||
|
@ -125,7 +151,8 @@ const title = ref();
|
|||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QSelect
|
||||
<VnSelect
|
||||
url="Clients"
|
||||
:input-debounce="0"
|
||||
:label="t('customer.basicData.previousClient')"
|
||||
:options="clients"
|
||||
|
@ -134,7 +161,9 @@ const title = ref();
|
|||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
sort-by="name ASC"
|
||||
v-model="data.transferorFk"
|
||||
:fields="['id', 'name']"
|
||||
>
|
||||
<template #append>
|
||||
<QIcon name="info" class="cursor-pointer">
|
||||
|
@ -145,7 +174,7 @@ const title = ref();
|
|||
}}</QTooltip>
|
||||
</QIcon>
|
||||
</template>
|
||||
</QSelect>
|
||||
</VnSelect>
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ref } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
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';
|
||||
|
@ -14,8 +13,6 @@ import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
|
|||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
const payMethods = ref([]);
|
||||
const bankEntitiesOptions = ref([]);
|
||||
const bankEntitiesRef = ref(null);
|
||||
|
||||
const filter = {
|
||||
|
@ -31,15 +28,6 @@ const getBankEntities = (data, formData) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<fetch-data @on-fetch="(data) => (payMethods = data)" auto-load url="PayMethods" />
|
||||
<fetch-data
|
||||
ref="bankEntitiesRef"
|
||||
@on-fetch="(data) => (bankEntitiesOptions = data)"
|
||||
:filter="filter"
|
||||
auto-load
|
||||
url="BankEntities"
|
||||
/>
|
||||
|
||||
<FormModel
|
||||
:url-update="`Clients/${route.params.id}`"
|
||||
:url="`Clients/${route.params.id}/getCard`"
|
||||
|
@ -49,8 +37,9 @@ const getBankEntities = (data, formData) => {
|
|||
<template #form="{ data, validate }">
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
auto-load
|
||||
url="PayMethods"
|
||||
:label="t('Billing data')"
|
||||
:options="payMethods"
|
||||
hide-selected
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
|
@ -69,7 +58,10 @@ const getBankEntities = (data, formData) => {
|
|||
</VnInput>
|
||||
<VnSelectDialog
|
||||
:label="t('Swift / BIC')"
|
||||
:options="bankEntitiesOptions"
|
||||
ref="bankEntitiesRef"
|
||||
:filter="filter"
|
||||
auto-load
|
||||
url="BankEntities"
|
||||
:acls="[{ model: 'BankEntity', props: '*', accessType: 'WRITE' }]"
|
||||
:rules="validate('Worker.bankEntity')"
|
||||
hide-selected
|
||||
|
@ -85,9 +77,8 @@ const getBankEntities = (data, formData) => {
|
|||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection v-if="scope.opt">
|
||||
<QItemLabel
|
||||
>{{ scope.opt.bic }} {{ scope.opt.name }}</QItemLabel
|
||||
>
|
||||
<QItemLabel>{{ scope.opt.bic }} </QItemLabel>
|
||||
<QItemLabel caption> {{ scope.opt.name }}</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import CustomerDescriptor from './CustomerDescriptor.vue';
|
||||
import CustomerFilter from '../CustomerFilter.vue';
|
||||
const route = useRoute();
|
||||
|
||||
const routeName = computed(() => route.name);
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Client"
|
||||
base-url="Clients"
|
||||
:descriptor="CustomerDescriptor"
|
||||
:filter-panel="CustomerFilter"
|
||||
:filter-panel="routeName != 'CustomerConsumption' && CustomerFilter"
|
||||
search-data-key="CustomerList"
|
||||
:searchbar-props="{
|
||||
url: 'Clients/extendedListFilter',
|
||||
url: 'Clients/filter',
|
||||
label: 'Search customer',
|
||||
info: 'You can search by customer id or name',
|
||||
}"
|
||||
|
|
|
@ -1,15 +1,241 @@
|
|||
<script setup>
|
||||
import CustomerConsumptionFilter from './CustomerConsumptionFilter.vue';
|
||||
import { useStateStore } from 'src/stores/useStateStore';
|
||||
import { ref, computed, onBeforeMount } from 'vue';
|
||||
import axios from 'axios';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { toDate } from 'src/filters/index';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import { usePrintService } from 'src/composables/usePrintService';
|
||||
import { useVnConfirm } from 'src/composables/useVnConfirm';
|
||||
|
||||
const { openConfirmationModal } = useVnConfirm();
|
||||
const { openReport, sendEmail } = usePrintService();
|
||||
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
|
||||
const arrayData = useArrayData('Client');
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const campaignList = ref();
|
||||
const showActionBtns = computed(() => handleQueryParams());
|
||||
function handleQueryParams() {
|
||||
const query = getQueryParams();
|
||||
return query.from && query.to;
|
||||
}
|
||||
const columns = computed(() => [
|
||||
{
|
||||
name: 'search',
|
||||
align: 'left',
|
||||
label: t('globals.search'),
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
name: 'itemFk',
|
||||
align: 'left',
|
||||
label: t('globals.item'),
|
||||
columnClass: 'shrink',
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
name: 'itemId',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'ticketFk',
|
||||
align: 'left',
|
||||
label: t('globals.ticket'),
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'shipped',
|
||||
align: 'left',
|
||||
label: t('globals.shipped'),
|
||||
format: ({ shipped }) => toDate(shipped),
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
align: 'left',
|
||||
label: t('globals.description'),
|
||||
columnClass: 'expand',
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'quantity',
|
||||
label: t('globals.quantity'),
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'grouped',
|
||||
label: t('Group by items'),
|
||||
component: 'checkbox',
|
||||
visible: false,
|
||||
orderBy: false,
|
||||
},
|
||||
]);
|
||||
|
||||
onBeforeMount(async () => {
|
||||
campaignList.value = (await axios('Campaigns/latest')).data;
|
||||
});
|
||||
|
||||
function getQueryParams() {
|
||||
return JSON.parse(route.query.consumption ?? '{}');
|
||||
}
|
||||
function getParams() {
|
||||
const query = getQueryParams();
|
||||
return {
|
||||
from: query.from,
|
||||
to: query.to,
|
||||
recipient: arrayData.store.data.email,
|
||||
recipientId: arrayData.store.data.id,
|
||||
};
|
||||
}
|
||||
const userParams = computed(() => {
|
||||
const minDate = Date.vnNew();
|
||||
minDate.setHours(0, 0, 0, 0);
|
||||
minDate.setMonth(minDate.getMonth() - 2);
|
||||
|
||||
const maxDate = Date.vnNew();
|
||||
maxDate.setHours(23, 59, 59, 59);
|
||||
|
||||
return {
|
||||
campaign: campaignList.value[0]?.id,
|
||||
from: minDate,
|
||||
to: maxDate,
|
||||
};
|
||||
});
|
||||
const openReportPdf = () => {
|
||||
openReport(`Clients/${route.params.id}/campaign-metrics-pdf`, getParams());
|
||||
};
|
||||
|
||||
const openSendEmailDialog = async () => {
|
||||
openConfirmationModal(
|
||||
t('The consumption report will be sent'),
|
||||
t('Please, confirm'),
|
||||
() => sendCampaignMetricsEmail({ address: arrayData.store.data.email })
|
||||
);
|
||||
};
|
||||
const sendCampaignMetricsEmail = ({ address }) => {
|
||||
sendEmail(`Clients/${route.params.id}/campaign-metrics-email`, {
|
||||
recipient: address,
|
||||
...getParams(),
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Teleport to="#right-panel" v-if="useStateStore().isHeaderMounted()">
|
||||
<CustomerConsumptionFilter data-key="CustomerConsumption" />
|
||||
</Teleport>
|
||||
<VnTable
|
||||
v-if="campaignList"
|
||||
data-key="CustomerConsumption"
|
||||
url="Clients/consumption"
|
||||
:order="['itemTypeFk', 'itemName', 'itemSize', 'description']"
|
||||
:columns="columns"
|
||||
search-url="consumption"
|
||||
:filter="filter"
|
||||
:user-params="userParams"
|
||||
:default-remove="false"
|
||||
:default-reset="false"
|
||||
:default-save="false"
|
||||
:has-sub-toolbar="true"
|
||||
auto-load
|
||||
>
|
||||
<template #moreBeforeActions>
|
||||
<QBtn
|
||||
color="primary"
|
||||
flat
|
||||
icon-right="picture_as_pdf"
|
||||
@click="openReportPdf()"
|
||||
:disabled="!showActionBtns"
|
||||
>
|
||||
<QTooltip>{{ t('globals.downloadPdf') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
color="primary"
|
||||
flat
|
||||
icon-right="email"
|
||||
@click="openSendEmailDialog()"
|
||||
:disabled="!showActionBtns"
|
||||
>
|
||||
<QTooltip>{{ t('Send to email') }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
<template #column-itemFk="{ row }">
|
||||
<span class="link">
|
||||
{{ row.itemFk }}
|
||||
<ItemDescriptorProxy :id="row.itemFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-ticketFk="{ row }">
|
||||
<span class="link">
|
||||
{{ row.ticketFk }}
|
||||
<TicketDescriptorProxy :id="row.ticketFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-description="{ row }">
|
||||
<div>{{ row.concept }}</div>
|
||||
<div v-if="row.subName" class="subName">
|
||||
{{ row.subName }}
|
||||
</div>
|
||||
<FetchedTags :item="row" :max-length="3" />
|
||||
</template>
|
||||
<template #moreFilterPanel="{ params }">
|
||||
<div class="column no-wrap flex-center q-gutter-y-md q-mt-xs q-pr-xl">
|
||||
<VnSelect
|
||||
v-model="params.campaign"
|
||||
:options="campaignList"
|
||||
:label="t('globals.campaign')"
|
||||
:filled="true"
|
||||
class="q-px-sm q-pt-none fit"
|
||||
dense
|
||||
option-label="code"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>
|
||||
{{ scope.opt?.code }}
|
||||
{{
|
||||
new Date(scope.opt?.dated).getFullYear()
|
||||
}}</QItemLabel
|
||||
>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
<VnInputDate
|
||||
v-model="params.from"
|
||||
:label="t('globals.from')"
|
||||
:filled="true"
|
||||
class="q-px-xs q-pt-none fit"
|
||||
dense
|
||||
/>
|
||||
<VnInputDate
|
||||
v-model="params.to"
|
||||
:label="t('globals.to')"
|
||||
:filled="true"
|
||||
class="q-px-xs q-pt-none fit"
|
||||
dense
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Enter a new search: Introduce una nueva búsqueda
|
||||
Group by items: Agrupar por artículos
|
||||
</i18n>
|
||||
|
|
|
@ -5,6 +5,8 @@ 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 } });
|
||||
|
@ -33,6 +35,8 @@ defineProps({ dataKey: { type: String, required: true } });
|
|||
<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"
|
||||
|
@ -43,35 +47,97 @@ defineProps({ dataKey: { type: String, required: true } });
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<!--It's required to include the relation category !! There's 413 records in production-->
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
v-model="params.typeId"
|
||||
url="ItemTypes"
|
||||
:label="t('params.type')"
|
||||
: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"
|
||||
:label="t('params.category')"
|
||||
:fields="['id', 'name']"
|
||||
sort-by="name ASC"
|
||||
:label="t('params.categoryId')"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
v-model="params.categoryId"
|
||||
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>
|
||||
|
@ -82,10 +148,30 @@ en:
|
|||
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>
|
||||
|
|
|
@ -56,17 +56,18 @@ const customerContactsRef = ref(null);
|
|||
</div>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QIcon
|
||||
<QBtn
|
||||
@click="customerContactsRef.insert()"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
name="add"
|
||||
size="sm"
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Add contact') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QBtn>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
</template>
|
||||
|
|
|
@ -53,6 +53,8 @@ const openDialog = (item) => {
|
|||
promise: updateData,
|
||||
},
|
||||
});
|
||||
updateData();
|
||||
showQPageSticky.value = true;
|
||||
};
|
||||
|
||||
const openViewCredit = (credit) => {
|
||||
|
|
|
@ -1,23 +1,17 @@
|
|||
<script setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import { QBtn } from 'quasar';
|
||||
|
||||
import { toCurrency, toDateHourMin } from 'src/filters';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
|
||||
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';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
const clientInformasRef = ref(null);
|
||||
const rows = ref([]);
|
||||
const tableRef = ref();
|
||||
|
||||
const filter = {
|
||||
include: [
|
||||
|
@ -37,10 +31,9 @@ const filter = {
|
|||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
field: 'created',
|
||||
format: (value) => toDateHourMin(value),
|
||||
format: ({ created }) => toDateHourMin(created),
|
||||
label: t('Since'),
|
||||
name: 'since',
|
||||
name: 'created',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -51,66 +44,56 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'right',
|
||||
field: 'rating',
|
||||
label: t('Rating'),
|
||||
label: t('customer.summary.rating'),
|
||||
name: 'rating',
|
||||
create: true,
|
||||
columnCreate: {
|
||||
component: 'number',
|
||||
autofocus: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
field: 'recommendedCredit',
|
||||
format: (value) => toCurrency(value),
|
||||
label: t('Recommended credit'),
|
||||
format: ({ recommendedCredit }) => toCurrency(recommendedCredit),
|
||||
label: t('customer.summary.recommendCredit'),
|
||||
name: 'recommendedCredit',
|
||||
create: true,
|
||||
columnCreate: {
|
||||
component: 'number',
|
||||
autofocus: true,
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
watch(
|
||||
() => route.params.id,
|
||||
(newValue) => {
|
||||
if (!newValue) return;
|
||||
filter.where.clientFk = newValue;
|
||||
clientInformasRef.value?.fetch();
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
:filter="filter"
|
||||
@on-fetch="(data) => (rows = data)"
|
||||
auto-load
|
||||
ref="clientInformasRef"
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="ClientInformas"
|
||||
url="ClientInformas"
|
||||
/>
|
||||
|
||||
<FormModel
|
||||
:form-initial-data="{}"
|
||||
:observe-form-changes="false"
|
||||
:url-create="`Clients/${route.params.id}/setRating`"
|
||||
:filter="filter"
|
||||
:order="['created DESC']"
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
:is-editable="false"
|
||||
:use-model="true"
|
||||
:column-search="false"
|
||||
:disable-option="{ card: true }"
|
||||
auto-load
|
||||
:create="{
|
||||
urlCreate: `Clients/${route.params.id}/setRating`,
|
||||
title: 'Create rating',
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {},
|
||||
}"
|
||||
>
|
||||
<template #form="{ data }">
|
||||
<VnRow>
|
||||
<div class="col">
|
||||
<VnInput
|
||||
:label="t('Rating')"
|
||||
clearable
|
||||
type="number"
|
||||
v-model.number="data.rating"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<VnInput
|
||||
:label="t('Recommended credit')"
|
||||
clearable
|
||||
type="number"
|
||||
v-model.number="data.recommendedCredit"
|
||||
/>
|
||||
</div>
|
||||
</VnRow>
|
||||
<template #column-employee="{ row }">
|
||||
<span class="link">{{ row.worker.user.nickname }}</span>
|
||||
<WorkerDescriptorProxy :id="row.worker.id" />
|
||||
</template>
|
||||
</FormModel>
|
||||
|
||||
<div class="full-width flex justify-center" v-if="rows.length">
|
||||
<QTable
|
||||
</VnTable>
|
||||
<!-- <QTable
|
||||
:columns="columns"
|
||||
:pagination="{ rowsPerPage: 0 }"
|
||||
:rows="rows"
|
||||
|
@ -120,22 +103,16 @@ watch(
|
|||
class="card-width q-px-lg"
|
||||
>
|
||||
<template #body-cell-employee="{ row }">
|
||||
<QTd auto-width @click.stop>
|
||||
<QBtn color="blue" flat no-caps>{{ row.worker.user.nickname }}</QBtn>
|
||||
<QTd @click.stop>
|
||||
<span class="link">{{ row.worker.user.nickname }}</span>
|
||||
<WorkerDescriptorProxy :id="row.clientFk" />
|
||||
</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
</div>
|
||||
|
||||
<h5 class="flex justify-center color-vn-label" v-else>
|
||||
{{ t('globals.noResults') }}
|
||||
</h5>
|
||||
</QTable> -->
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Rating: Clasificación
|
||||
Recommended credit: Crédito recomendado
|
||||
Since: Desde
|
||||
Employee: Empleado
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ref, computed } from 'vue';
|
|||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { toCurrency, toDate } from 'src/filters';
|
||||
import { dashIfEmpty, toCurrency, toDate } from 'src/filters';
|
||||
|
||||
import useCardDescription from 'src/composables/useCardDescription';
|
||||
|
||||
|
@ -11,6 +11,10 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
|||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||
import CustomerDescriptorMenu from './CustomerDescriptorMenu.vue';
|
||||
import { useState } from 'src/composables/useState';
|
||||
const state = useState();
|
||||
|
||||
const customer = computed(() => state.get('customer'));
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -43,7 +47,7 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
:subtitle="data.subtitle"
|
||||
@on-fetch="setData"
|
||||
:summary="$props.summary"
|
||||
data-key="customerData"
|
||||
data-key="customer"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<CustomerDescriptorMenu :customer="entity" />
|
||||
|
@ -57,35 +61,46 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
:value="toCurrency(entity.creditInsurance)"
|
||||
/>
|
||||
|
||||
<VnLv :label="t('customer.card.debt')" :value="toCurrency(entity.debt)" />
|
||||
<VnLv v-if="entity.salesPersonUser" :label="t('customer.card.salesPerson')">
|
||||
<VnLv
|
||||
:label="t('customer.card.debt')"
|
||||
:value="toCurrency(entity.debt)"
|
||||
:info="t('customer.summary.riskInfo')"
|
||||
/>
|
||||
<VnLv :label="t('customer.card.salesPerson')">
|
||||
<template #value>
|
||||
<VnUserLink
|
||||
:name="entity.salesPersonUser?.name"
|
||||
v-if="entity.salesPersonUser"
|
||||
:name="entity.salesPersonUser.name"
|
||||
:worker-id="entity.salesPersonFk"
|
||||
/>
|
||||
<span v-else>{{ dashIfEmpty(entity.salesPersonUser) }}</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('customer.card.businessTypeFk')"
|
||||
:value="entity.businessTypeFk"
|
||||
:value="entity.businessType.description"
|
||||
/>
|
||||
</template>
|
||||
<template #icons="{ entity }">
|
||||
<QCardActions class="q-gutter-x-md">
|
||||
<template #icons>
|
||||
<QCardActions v-if="customer" class="q-gutter-x-md">
|
||||
<QIcon
|
||||
v-if="!entity.isActive"
|
||||
v-if="!customer.isActive"
|
||||
name="vn:disabled"
|
||||
size="xs"
|
||||
color="primary"
|
||||
>
|
||||
<QTooltip>{{ t('customer.card.isDisabled') }}</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon v-if="entity.isFreezed" name="vn:frozen" size="xs" color="primary">
|
||||
<QIcon
|
||||
v-if="customer.isFreezed"
|
||||
name="vn:frozen"
|
||||
size="xs"
|
||||
color="primary"
|
||||
>
|
||||
<QTooltip>{{ t('customer.card.isFrozen') }}</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="!entity.account.active"
|
||||
v-if="!customer.account?.active"
|
||||
color="primary"
|
||||
name="vn:noweb"
|
||||
size="xs"
|
||||
|
@ -93,7 +108,7 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
<QTooltip>{{ t('customer.card.webAccountInactive') }}</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="entity.debt > entity.credit"
|
||||
v-if="customer.debt > customer.credit"
|
||||
name="vn:risk"
|
||||
size="xs"
|
||||
color="primary"
|
||||
|
@ -101,7 +116,7 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
<QTooltip>{{ t('customer.card.hasDebt') }}</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="!entity.isTaxDataChecked"
|
||||
v-if="!customer.isTaxDataChecked"
|
||||
name="vn:no036"
|
||||
size="xs"
|
||||
color="primary"
|
||||
|
@ -109,7 +124,7 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
<QTooltip>{{ t('customer.card.notChecked') }}</QTooltip>
|
||||
</QIcon>
|
||||
<QBtn
|
||||
v-if="entity.unpaid"
|
||||
v-if="customer.unpaid"
|
||||
flat
|
||||
size="sm"
|
||||
icon="vn:Client_unpaid"
|
||||
|
@ -121,13 +136,13 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
<br />
|
||||
{{
|
||||
t('unpaidDated', {
|
||||
dated: toDate(entity.unpaid.dated),
|
||||
dated: toDate(customer.unpaid.dated),
|
||||
})
|
||||
}}
|
||||
<br />
|
||||
{{
|
||||
t('unpaidAmount', {
|
||||
amount: toCurrency(entity.unpaid.amount),
|
||||
amount: toCurrency(customer.unpaid.amount),
|
||||
})
|
||||
}}
|
||||
</QTooltip>
|
||||
|
@ -139,7 +154,13 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
<QBtn
|
||||
:to="{
|
||||
name: 'TicketList',
|
||||
query: { table: JSON.stringify({ clientFk: entity.id }) },
|
||||
query: {
|
||||
from: undefined,
|
||||
to: undefined,
|
||||
table: JSON.stringify({
|
||||
clientFk: entity.id,
|
||||
}),
|
||||
},
|
||||
}"
|
||||
size="md"
|
||||
icon="vn:ticket"
|
||||
|
@ -160,23 +181,8 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
</QBtn>
|
||||
<QBtn
|
||||
:to="{
|
||||
name: 'OrderCreate',
|
||||
query: { clientId: entity.id },
|
||||
}"
|
||||
size="md"
|
||||
icon="vn:basketadd"
|
||||
color="primary"
|
||||
>
|
||||
<QTooltip>{{ t('New order') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
:to="{
|
||||
name: 'AccountList',
|
||||
query: {
|
||||
table: JSON.stringify({
|
||||
filter: { where: { id: entity.id } },
|
||||
}),
|
||||
},
|
||||
name: 'AccountSummary',
|
||||
params: { id: entity.id },
|
||||
}"
|
||||
size="md"
|
||||
icon="face"
|
||||
|
@ -184,6 +190,18 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
>
|
||||
<QTooltip>{{ t('Go to user') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
v-if="entity.supplier"
|
||||
:to="{
|
||||
name: 'SupplierSummary',
|
||||
params: { id: entity.supplier.id },
|
||||
}"
|
||||
size="md"
|
||||
icon="vn:supplier"
|
||||
color="primary"
|
||||
>
|
||||
<QTooltip>{{ t('Go to supplier') }}</QTooltip>
|
||||
</QBtn>
|
||||
</QCardActions>
|
||||
</template>
|
||||
</CardDescriptor>
|
||||
|
@ -197,8 +215,8 @@ es:
|
|||
Go to module index: Ir al índice del módulo
|
||||
Customer ticket list: Listado de tickets del cliente
|
||||
Customer invoice out list: Listado de facturas del cliente
|
||||
New order: Nuevo pedido
|
||||
Go to user: Ir al usuario
|
||||
Go to supplier: Ir al proveedor
|
||||
Customer unpaid: Cliente impago
|
||||
Unpaid: Impagado
|
||||
unpaidDated: 'Fecha {dated}'
|
||||
|
|
|
@ -8,6 +8,9 @@ import { useQuasar } from 'quasar';
|
|||
import useNotify from 'src/composables/useNotify';
|
||||
|
||||
import VnSmsDialog from 'src/components/common/VnSmsDialog.vue';
|
||||
import TicketCreateDialog from 'src/pages/Ticket/TicketCreateDialog.vue';
|
||||
import OrderCreateDialog from 'src/pages/Order/Card/OrderCreateDialog.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const $props = defineProps({
|
||||
customer: {
|
||||
|
@ -40,20 +43,32 @@ const sendSms = async (payload) => {
|
|||
notify(error.message, 'positive');
|
||||
}
|
||||
};
|
||||
|
||||
const ticketCreateFormDialog = ref(null);
|
||||
const openTicketCreateForm = () => {
|
||||
ticketCreateFormDialog.value.show();
|
||||
};
|
||||
const orderCreateFormDialog = ref(null);
|
||||
const openOrderCreateForm = () => {
|
||||
orderCreateFormDialog.value.show();
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QItem v-ripple clickable>
|
||||
<QItem v-ripple clickable @click="openTicketCreateForm()">
|
||||
<QItemSection>
|
||||
<RouterLink
|
||||
:to="{
|
||||
name: 'TicketCreate',
|
||||
query: { clientFk: customer.id },
|
||||
}"
|
||||
class="color-vn-text"
|
||||
>
|
||||
{{ t('Simple ticket') }}
|
||||
</RouterLink>
|
||||
{{ t('globals.pageTitles.createTicket') }}
|
||||
<QDialog ref="ticketCreateFormDialog">
|
||||
<TicketCreateDialog />
|
||||
</QDialog>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-ripple clickable @click="openOrderCreateForm()">
|
||||
<QItemSection>
|
||||
{{ t('globals.pageTitles.createOrder') }}
|
||||
<QDialog ref="orderCreateFormDialog">
|
||||
<OrderCreateDialog :client-fk="customer.id" />
|
||||
</QDialog>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-ripple clickable>
|
||||
|
|
|
@ -236,6 +236,7 @@ const toCustomerFileManagementCreate = () => {
|
|||
@click.stop="toCustomerFileManagementCreate()"
|
||||
color="primary"
|
||||
fab
|
||||
shortcut="+"
|
||||
icon="add"
|
||||
/>
|
||||
<QTooltip>
|
||||
|
|
|
@ -93,8 +93,9 @@ function handleLocation(data, location) {
|
|||
<VnRow>
|
||||
<VnLocation
|
||||
:rules="validate('Worker.postcode')"
|
||||
:roles-allowed-to-create="['deliveryAssistant', 'administrative']"
|
||||
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
|
||||
v-model="data.postcode"
|
||||
:location="data"
|
||||
@update:model-value="(location) => handleLocation(data, location)"
|
||||
/>
|
||||
</VnRow>
|
||||
|
@ -134,15 +135,17 @@ function handleLocation(data, location) {
|
|||
</QTooltip>
|
||||
</QIcon>
|
||||
</div>
|
||||
<QCheckbox :label="t('Verified data')" v-model="data.isTaxDataChecked" />
|
||||
<QCheckbox :label="t('Daily invoice')" v-model="data.hasDailyInvoice" />
|
||||
</VnRow>
|
||||
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('Electronic invoice')"
|
||||
v-model="data.hasElectronicInvoice"
|
||||
/><QCheckbox
|
||||
:label="t('Verified data')"
|
||||
v-model="data.isTaxDataChecked"
|
||||
/>
|
||||
<QCheckbox :label="t('Daily invoice')" v-model="data.hasDailyInvoice" />
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -5,10 +5,10 @@ import { useRoute } from 'vue-router';
|
|||
import { toCurrency } from 'src/filters';
|
||||
import { toDateTimeFormat } from 'src/filters/date';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
const entityId = computed(() => route.params.id);
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const rows = ref([]);
|
||||
const totalAmount = ref();
|
||||
const tableRef = ref();
|
||||
const filter = computed(() => {
|
||||
|
@ -28,7 +28,7 @@ const filter = computed(() => {
|
|||
},
|
||||
],
|
||||
where: {
|
||||
clientFk: route.params.id,
|
||||
clientFk: entityId,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
@ -47,7 +47,6 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'userFk',
|
||||
label: t('Created by'),
|
||||
component: 'userLink',
|
||||
attrs: ({ row }) => {
|
||||
|
@ -73,6 +72,7 @@ const columns = computed(() => [
|
|||
columnCreate: {
|
||||
component: 'select',
|
||||
url: 'greugeTypes',
|
||||
sortBy: 'name ASC ',
|
||||
limit: 0,
|
||||
},
|
||||
},
|
||||
|
@ -84,14 +84,14 @@ const columns = computed(() => [
|
|||
create: true,
|
||||
},
|
||||
]);
|
||||
|
||||
const setRows = (data) => {
|
||||
rows.value = data;
|
||||
totalAmount.value = data.reduce((acc, { amount = 0 }) => acc + amount, 0);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
:url="`Greuges/${entityId}/sumAmount`"
|
||||
auto-load
|
||||
@on-fetch="({ sumAmount }) => (totalAmount = sumAmount)"
|
||||
></FetchData>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="Greuges"
|
||||
|
@ -104,10 +104,10 @@ const setRows = (data) => {
|
|||
:is-editable="false"
|
||||
:use-model="true"
|
||||
:column-search="false"
|
||||
@on-fetch="(data) => setRows(data)"
|
||||
:disable-option="{ card: true }"
|
||||
:create="{
|
||||
urlCreate: `Greuges`,
|
||||
title: t('New credit'),
|
||||
title: t('New greuge'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: { shipped: new Date(), clientFk: route.params.id },
|
||||
}"
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import { toDateTimeFormat } from 'src/filters/date';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import { dashIfEmpty } from 'src/filters';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
||||
const rows = ref([]);
|
||||
|
||||
const filter = {
|
||||
include: [
|
||||
{ relation: 'mandateType', scope: { fields: ['id', 'name'] } },
|
||||
{ relation: 'mandateType', scope: { fields: ['id', 'code'] } },
|
||||
{ relation: 'company', scope: { fields: ['id', 'code'] } },
|
||||
],
|
||||
where: { clientFk: route.params.id },
|
||||
|
@ -22,114 +21,61 @@ const filter = {
|
|||
limit: 20,
|
||||
};
|
||||
|
||||
const tableColumnComponents = {
|
||||
id: {
|
||||
component: 'span',
|
||||
props: () => {},
|
||||
event: () => {},
|
||||
},
|
||||
company: {
|
||||
component: 'span',
|
||||
props: () => {},
|
||||
event: () => {},
|
||||
},
|
||||
type: {
|
||||
component: 'span',
|
||||
props: () => {},
|
||||
event: () => {},
|
||||
},
|
||||
registerDate: {
|
||||
component: 'span',
|
||||
props: () => {},
|
||||
event: () => {},
|
||||
},
|
||||
endDate: {
|
||||
component: 'span',
|
||||
props: () => {},
|
||||
event: () => {},
|
||||
},
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
field: 'id',
|
||||
label: t('Id'),
|
||||
name: 'id',
|
||||
label: t('globals.id'),
|
||||
field: 'id',
|
||||
isId: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: (row) => row.company.code,
|
||||
label: t('Company'),
|
||||
cardVisible: true,
|
||||
format: ({ company }) => company.code,
|
||||
label: t('globals.company'),
|
||||
name: 'company',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: (row) => row.mandateType.name,
|
||||
label: t('Type'),
|
||||
cardVisible: true,
|
||||
format: ({ mandateType }) => mandateType.code,
|
||||
label: t('globals.type'),
|
||||
name: 'type',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: 'created',
|
||||
cardVisible: true,
|
||||
label: t('Register date'),
|
||||
name: 'registerDate',
|
||||
format: (value) => toDateTimeFormat(value),
|
||||
name: 'created',
|
||||
format: ({ created }) => toDateTimeFormat(created),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: 'finished',
|
||||
align: 'right',
|
||||
cardVisible: true,
|
||||
name: 'finished',
|
||||
label: t('End date'),
|
||||
name: 'endDate',
|
||||
format: (value) => (value ? toDateTimeFormat(value) : '-'),
|
||||
format: ({ finished }) => dashIfEmpty(toDateTimeFormat(finished)),
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
:filter="filter"
|
||||
@on-fetch="(data) => (rows = data)"
|
||||
auto-load
|
||||
url="Mandates"
|
||||
/>
|
||||
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<QTable
|
||||
<VnTable
|
||||
:filter="filter"
|
||||
auto-load
|
||||
url="Mandates"
|
||||
:columns="columns"
|
||||
:pagination="{ rowsPerPage: 12 }"
|
||||
:rows="rows"
|
||||
class="full-width q-mt-md"
|
||||
row-key="id"
|
||||
v-if="rows?.length"
|
||||
>
|
||||
<template #body-cell="props">
|
||||
<QTd :props="props">
|
||||
<QTr :props="props" class="cursor-pointer">
|
||||
<component
|
||||
:is="tableColumnComponents[props.col.name].component"
|
||||
@click="tableColumnComponents[props.col.name].event(props)"
|
||||
class="rounded-borders q-pa-sm"
|
||||
v-bind="tableColumnComponents[props.col.name].props(props)"
|
||||
>
|
||||
{{ props.value }}
|
||||
</component>
|
||||
</QTr>
|
||||
</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
|
||||
<h5 class="flex justify-center color-vn-label" v-else>
|
||||
{{ t('globals.noResults') }}
|
||||
</h5>
|
||||
:right-search="false"
|
||||
:row-click="false"
|
||||
/>
|
||||
</QPage>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Id: Id
|
||||
Company: Empresa
|
||||
Type: Tipo
|
||||
Register date: Fecha alta
|
||||
End date: Fecha baja
|
||||
</i18n>
|
||||
|
|
|
@ -22,5 +22,6 @@ const noteFilter = computed(() => {
|
|||
:filter="noteFilter"
|
||||
:body="{ clientFk: route.params.id }"
|
||||
style="overflow-y: auto"
|
||||
:select-type="true"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -89,9 +89,10 @@ function setFinished(id) {
|
|||
:columns="columns"
|
||||
:use-model="true"
|
||||
:right-search="false"
|
||||
:disable-option="{ card: true }"
|
||||
:create="{
|
||||
urlCreate: 'Recoveries',
|
||||
title: 'New recovery',
|
||||
title: t('New recovery'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: { clientFk: route.params.id, started: Date.vnNew() },
|
||||
}"
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import { QBtn } from 'quasar';
|
||||
import { QBtn, useQuasar } from 'quasar';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import { toDateTimeFormat } from 'src/filters/date';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import { dashIfEmpty } from 'src/filters';
|
||||
import CustomerSamplesCreate from '../components/CustomerSamplesCreate.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const rows = ref([]);
|
||||
|
||||
const filter = {
|
||||
include: [
|
||||
|
@ -26,108 +25,87 @@ const filter = {
|
|||
limit: 20,
|
||||
};
|
||||
|
||||
const tableColumnComponents = {
|
||||
sent: {
|
||||
component: 'span',
|
||||
props: () => {},
|
||||
event: () => {},
|
||||
},
|
||||
description: {
|
||||
component: 'span',
|
||||
props: () => {},
|
||||
event: () => {},
|
||||
},
|
||||
worker: {
|
||||
component: QBtn,
|
||||
props: () => ({ flat: true, color: 'blue', noCaps: true }),
|
||||
event: () => {},
|
||||
},
|
||||
company: {
|
||||
component: 'span',
|
||||
props: () => {},
|
||||
event: () => {},
|
||||
},
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
field: 'created',
|
||||
name: 'created',
|
||||
label: t('Sent'),
|
||||
name: 'sent',
|
||||
format: (value) => toDateTimeFormat(value),
|
||||
format: ({ created }) => toDateTimeFormat(created),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: (value) => value.type.description,
|
||||
format: (row) => row.type.description,
|
||||
label: t('Description'),
|
||||
name: 'description',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: (value) => value.user.name,
|
||||
label: t('Worker'),
|
||||
name: 'worker',
|
||||
columnField: {
|
||||
component: 'userLink',
|
||||
attrs: ({ row }) => {
|
||||
return {
|
||||
defaultName: true,
|
||||
workerId: row?.user?.id,
|
||||
name: row?.user?.name,
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: (value) => value.company?.code,
|
||||
format: ({ company }) => company?.code ?? dashIfEmpty(company),
|
||||
label: t('Company'),
|
||||
name: 'company',
|
||||
},
|
||||
]);
|
||||
const quasar = useQuasar();
|
||||
|
||||
const toCustomerSamplesCreate = () => {
|
||||
router.push({ name: 'CustomerSamplesCreate' });
|
||||
quasar
|
||||
.dialog({
|
||||
component: CustomerSamplesCreate,
|
||||
})
|
||||
.onOk(() => tableRef.value.reload());
|
||||
};
|
||||
const tableRef = ref();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
:filter="filter"
|
||||
@on-fetch="(data) => (rows = data)"
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="ClientSamples"
|
||||
auto-load
|
||||
:filter="filter"
|
||||
url="ClientSamples"
|
||||
/>
|
||||
|
||||
<div class="full-width flex justify-center">
|
||||
<QPage class="card-width q-pa-lg">
|
||||
<QTable
|
||||
:columns="columns"
|
||||
:pagination="{ rowsPerPage: 12 }"
|
||||
:rows="rows"
|
||||
class="full-width q-mt-md"
|
||||
row-key="id"
|
||||
:no-data-label="t('globals.noResults')"
|
||||
>
|
||||
<template #body-cell="props">
|
||||
<QTd :props="props">
|
||||
<QTr :props="props" class="cursor-pointer">
|
||||
<component
|
||||
:is="tableColumnComponents[props.col.name].component"
|
||||
class="col-content"
|
||||
v-bind="
|
||||
tableColumnComponents[props.col.name].props(props)
|
||||
"
|
||||
@click="
|
||||
tableColumnComponents[props.col.name].event(props)
|
||||
"
|
||||
>
|
||||
{{ props.value }}
|
||||
<WorkerDescriptorProxy
|
||||
:id="props.row.userFk"
|
||||
v-if="props.col.name === 'worker'"
|
||||
/>
|
||||
</component>
|
||||
</QTr>
|
||||
</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
</QPage>
|
||||
</div>
|
||||
:columns="columns"
|
||||
:pagination="{ rowsPerPage: 12 }"
|
||||
:disable-option="{ card: true }"
|
||||
:right-search="false"
|
||||
:rows="rows"
|
||||
:order="['created DESC']"
|
||||
class="full-width q-mt-md"
|
||||
row-key="id"
|
||||
:create="false"
|
||||
:no-data-label="t('globals.noResults')"
|
||||
>
|
||||
<template #column-worker="{ row }">
|
||||
<div v-if="row.user">
|
||||
<span class="link">{{ row.user?.name }}</span
|
||||
><WorkerDescriptorProxy :id="row.userFk" />
|
||||
</div>
|
||||
<span v-else>{{ dashIfEmpty(row.user) }}</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
|
||||
<QPageSticky :offset="[18, 18]">
|
||||
<QBtn @click.stop="toCustomerSamplesCreate()" color="primary" fab icon="add" />
|
||||
<QBtn
|
||||
@click.stop="toCustomerSamplesCreate()"
|
||||
color="primary"
|
||||
fab
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
/>
|
||||
<QTooltip>
|
||||
{{ t('Send sample') }}
|
||||
</QTooltip>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<script setup>
|
||||
import { computed, ref, onMounted } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||
|
||||
import { toCurrency, toPercentage, toDate } from 'src/filters';
|
||||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||
import CustomerSummaryTable from 'src/pages/Customer/components/CustomerSummaryTable.vue';
|
||||
|
@ -12,6 +13,7 @@ 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: {
|
||||
|
@ -23,11 +25,6 @@ const $props = defineProps({
|
|||
const entityId = computed(() => $props.id || route.params.id);
|
||||
const customer = computed(() => summary.value.entity);
|
||||
const summary = ref();
|
||||
const clientUrl = ref();
|
||||
|
||||
onMounted(async () => {
|
||||
clientUrl.value = (await getUrl('client/')) + entityId.value + '/';
|
||||
});
|
||||
|
||||
const balanceDue = computed(() => {
|
||||
return (
|
||||
|
@ -40,11 +37,11 @@ const balanceDue = computed(() => {
|
|||
const balanceDueWarning = computed(() => (balanceDue.value ? 'negative' : ''));
|
||||
|
||||
const claimRate = computed(() => {
|
||||
return customer.value.claimsRatio.claimingRate;
|
||||
return customer.value.claimsRatio?.claimingRate ?? 0;
|
||||
});
|
||||
|
||||
const priceIncreasingRate = computed(() => {
|
||||
return customer.value.claimsRatio.priceIncreasing / 100;
|
||||
return customer.value.claimsRatio?.priceIncreasing ?? 0 / 100;
|
||||
});
|
||||
|
||||
const debtWarning = computed(() => {
|
||||
|
@ -58,6 +55,11 @@ const creditWarning = computed(() => {
|
|||
|
||||
return tooMuchInsurance || noCreditInsurance ? 'negative' : '';
|
||||
});
|
||||
const sumRisk = ({ clientRisks }) => {
|
||||
let total = clientRisks.reduce((acc, { amount }) => acc + amount, 0);
|
||||
|
||||
return total;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -91,7 +93,13 @@ const creditWarning = computed(() => {
|
|||
<VnLv
|
||||
:label="t('customer.summary.salesPerson')"
|
||||
:value="entity?.salesPersonUser?.name"
|
||||
/>
|
||||
>
|
||||
<template #value>
|
||||
<VnUserLink
|
||||
:name="entity.salesPersonUser?.name"
|
||||
:worker-id="entity.salesPersonFk"
|
||||
/> </template
|
||||
></VnLv>
|
||||
<VnLv
|
||||
:label="t('customer.summary.contactChannel')"
|
||||
:value="entity?.contactChannel?.name"
|
||||
|
@ -131,7 +139,7 @@ const creditWarning = computed(() => {
|
|||
:url="`#/customer/${entityId}/fiscal-data`"
|
||||
:text="t('customer.summary.fiscalData')"
|
||||
/>
|
||||
<VnRow>
|
||||
<VnRow class="block">
|
||||
<VnLv
|
||||
:label="t('customer.summary.isEqualizated')"
|
||||
:value="entity.isEqualizated"
|
||||
|
@ -140,8 +148,6 @@ const creditWarning = computed(() => {
|
|||
:label="t('customer.summary.isActive')"
|
||||
:value="entity.isActive"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnLv
|
||||
:label="t('customer.summary.verifiedData')"
|
||||
:value="entity.isTaxDataChecked"
|
||||
|
@ -150,8 +156,6 @@ const creditWarning = computed(() => {
|
|||
:label="t('customer.summary.hasToInvoice')"
|
||||
:value="entity.hasToInvoice"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnLv
|
||||
:label="t('customer.summary.notifyByEmail')"
|
||||
:value="entity.isToBeMailed"
|
||||
|
@ -162,7 +166,7 @@ const creditWarning = computed(() => {
|
|||
<QCard class="vn-one">
|
||||
<VnTitle
|
||||
:url="`#/customer/${entityId}/billing-data`"
|
||||
:text="t('customer.summary.billingData')"
|
||||
:text="t('customer.summary.payMethodFk')"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('customer.summary.payMethod')"
|
||||
|
@ -170,7 +174,7 @@ const creditWarning = computed(() => {
|
|||
/>
|
||||
<VnLv :label="t('customer.summary.bankAccount')" :value="entity.iban" />
|
||||
<VnLv :label="t('customer.summary.dueDay')" :value="entity.dueDay" />
|
||||
<VnRow class="q-mt-sm" wrap>
|
||||
<VnRow class="q-mt-sm block">
|
||||
<VnLv :label="t('customer.summary.hasLcr')" :value="entity.hasLcr" />
|
||||
<VnLv
|
||||
:label="t('customer.summary.hasCoreVnl')"
|
||||
|
@ -185,7 +189,7 @@ const creditWarning = computed(() => {
|
|||
</QCard>
|
||||
<QCard class="vn-one" v-if="entity.defaultAddress">
|
||||
<VnTitle
|
||||
:url="`#/customer/${entityId}/consignees`"
|
||||
:url="`#/customer/${entityId}/address`"
|
||||
:text="t('customer.summary.consignee')"
|
||||
/>
|
||||
<VnLv
|
||||
|
@ -218,7 +222,7 @@ const creditWarning = computed(() => {
|
|||
</QCard>
|
||||
<QCard class="vn-one" v-if="entity.account">
|
||||
<VnTitle
|
||||
:url="`https://grafana.verdnatura.es/d/adjlxzv5yjt34d/analisis-de-clientes-7c-crm?orgId=1&var-clientFk=${entityId}`"
|
||||
:url="`${grafanaUrl}/d/adjlxzv5yjt34d/analisis-de-clientes-7c-crm?orgId=1&var-clientFk=${entityId}`"
|
||||
:text="t('customer.summary.businessData')"
|
||||
icon="vn:grafana"
|
||||
/>
|
||||
|
@ -231,7 +235,6 @@ const creditWarning = computed(() => {
|
|||
:value="toCurrency(entity?.mana?.mana)"
|
||||
/>
|
||||
<VnLv
|
||||
v-if="entity.claimsRatio"
|
||||
:label="t('customer.summary.priceIncreasingRate')"
|
||||
:value="toPercentage(priceIncreasingRate)"
|
||||
/>
|
||||
|
@ -240,15 +243,14 @@ const creditWarning = computed(() => {
|
|||
:value="toCurrency(entity?.averageInvoiced?.invoiced)"
|
||||
/>
|
||||
<VnLv
|
||||
v-if="entity.claimsRatio"
|
||||
:label="t('customer.summary.claimRate')"
|
||||
:value="toPercentage(claimRate)"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one" v-if="entity.account">
|
||||
<VnTitle
|
||||
:url="`https://grafana.verdnatura.es/d/40buzE4Vk/comportamiento-pagos-clientes?orgId=1&var-clientFk=${entityId}`"
|
||||
:text="t('customer.summary.financialData')"
|
||||
:url="`${grafanaUrl}/d/40buzE4Vk/comportamiento-pagos-clientes?orgId=1&var-clientFk=${entityId}`"
|
||||
:text="t('customer.summary.payMethodFk')"
|
||||
icon="vn:grafana"
|
||||
/>
|
||||
<VnLv
|
||||
|
@ -266,15 +268,13 @@ const creditWarning = computed(() => {
|
|||
/>
|
||||
|
||||
<VnLv
|
||||
v-if="entity.creditInsurance"
|
||||
:label="t('customer.summary.securedCredit')"
|
||||
:value="toCurrency(entity.creditInsurance)"
|
||||
:info="t('customer.summary.securedCreditInfo')"
|
||||
/>
|
||||
|
||||
<VnLv
|
||||
:label="t('customer.summary.balance')"
|
||||
:value="toCurrency(entity.sumRisk) || toCurrency(0)"
|
||||
:value="toCurrency(sumRisk(entity)) || toCurrency(0)"
|
||||
:info="t('customer.summary.balanceInfo')"
|
||||
/>
|
||||
|
||||
|
@ -301,7 +301,7 @@ const creditWarning = computed(() => {
|
|||
:value="entity.recommendedCredit"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCard>
|
||||
<VnTitle :text="t('Latest tickets')" />
|
||||
<CustomerSummaryTable />
|
||||
</QCard>
|
||||
|
|
|
@ -92,7 +92,7 @@ const onSubmit = async () => {
|
|||
notify('globals.dataSaved', 'positive');
|
||||
unpaidClient.value = true;
|
||||
} catch (error) {
|
||||
notify('errors.create', 'negative');
|
||||
notify('errors.writeRequest', 'negative');
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
@ -151,7 +151,10 @@ watch(
|
|||
clearable
|
||||
type="number"
|
||||
v-model="amount"
|
||||
/>
|
||||
autofocus
|
||||
>
|
||||
<template #append>€</template></VnInput
|
||||
>
|
||||
</div>
|
||||
</VnRow>
|
||||
</QForm>
|
||||
|
|
|
@ -3,14 +3,11 @@ 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);
|
||||
|
||||
|
@ -21,21 +18,11 @@ 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"
|
||||
|
@ -69,21 +56,29 @@ async function hasCustomerRole() {
|
|||
</template>
|
||||
<template #moreActions>
|
||||
<QBtn
|
||||
:label="t('Change password')"
|
||||
:label="t('globals.changePass')"
|
||||
color="primary"
|
||||
icon="edit"
|
||||
:disable="!canChangePassword"
|
||||
@click="showChangePasswordDialog()"
|
||||
@click="$refs.changePassRef.show"
|
||||
/>
|
||||
</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>
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useRoute } from 'vue-router';
|
|||
|
||||
import axios from 'axios';
|
||||
|
||||
import { toCurrency, toDateHourMinSec } from 'src/filters';
|
||||
import { toCurrency, toDateHourMin } from 'src/filters';
|
||||
|
||||
import CustomerCloseIconTooltip from '../components/CustomerCloseIconTooltip.vue';
|
||||
import CustomerCheckIconTooltip from '../components/CustomerCheckIconTooltip.vue';
|
||||
|
@ -74,7 +74,7 @@ const columns = computed(() => [
|
|||
field: 'created',
|
||||
label: t('Date'),
|
||||
name: 'date',
|
||||
format: (value) => toDateHourMinSec(value),
|
||||
format: (value) => toDateHourMin(value),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue