forked from verdnatura/salix-front
Compare commits
675 Commits
fix-ScopeD
...
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 | 46dbab4757 | |
Jorge Penadés | 2e8397a34b | |
Javier Segarra | c21133ebd4 | |
Javier Segarra | ccfe61d777 | |
Alex Moreno | 5ca38ca825 | |
Jon Elias | 9db12a8dee | |
Jon Elias | 34f70d026e | |
Jorge Penadés | 5625ef4ce1 | |
Jon Elias | 07cd9d5aae | |
Jon Elias | 98faf22e73 | |
Jon Elias | 3a95cf123e | |
Jon Elias | 566d657f70 | |
Jorge Penadés | 41c43fde76 | |
Jorge Penadés | 84cf3bea95 | |
Javier Segarra | e40f216e33 | |
Javier Segarra | c7bef79c0a | |
Jorge Penadés | 47de2caed7 | |
Javier Segarra | 29e4c723c9 | |
Javier Segarra | 6dc337e585 | |
Jon Elias | 6edabd856c | |
Jon Elias | 479f2a8e53 | |
Jorge Penadés | da7d0326c0 | |
Jorge Penadés | 1ff15da8ca | |
Javier Segarra | cf95cd7db7 | |
Javier Segarra | 6ffd985575 | |
Javier Segarra | eb8690a422 | |
Javier Segarra | d384894bf0 | |
Javier Segarra | 27069e56b8 | |
Jorge Penadés | b015397822 | |
Jorge Penadés | 91dccd10d3 | |
Jorge Penadés | 9ec2fb4c77 | |
Jorge Penadés | 153c9b743f | |
Jorge Penadés | 98cdeabe9f | |
Jon Elias | 6f9e46f7a0 | |
Jorge Penadés | 4bf8e1224d | |
Jorge Penadés | e90b78c4c5 | |
Jorge Penadés | 6983245d7d | |
Jon Elias | c291ea267c | |
Javier Segarra | a5ea940dd8 | |
Jon Elias | 4a0b92eded | |
Jon Elias | bb1eb30a25 | |
Jon Elias | b4c46dc153 | |
Jon Elias | 4a1f5e922c | |
Jon Elias | 6a5f31ff1e | |
Jon Elias | 422907447b | |
Jon Elias | d1138529b2 | |
Jon Elias | ff7bcfb00a | |
Jon Elias | 8e35737c8e | |
Jon Elias | e7a89138ba | |
Jon Elias | 8f8462db94 | |
Jon Elias | 6248a4117d | |
Jon Elias | 0b961050a0 | |
Jon Elias | 94ae74ca7f | |
Jon Elias | 4630496361 | |
Jon Elias | 4636e2f2e6 | |
Jon Elias | 04f4521a59 | |
Jon Elias | 0e5607d685 | |
Jon Elias | e962063753 | |
Jon Elias | 8ff9dae1d8 | |
Jon Elias | 102f7fb13e | |
Jon Elias | 9f24a7bc29 | |
Jon Elias | db6f4fd15a | |
Jon Elias | 65e3fd874d | |
Jon Elias | f5eacea483 | |
Jon Elias | 1889aa85b5 | |
Jon Elias | 5edea7cad1 | |
Jon Elias | 0d9773a30f | |
Jon Elias | 4bc148f16b | |
Jon Elias | 5471607d32 | |
Jon Elias | cb7d729b0f | |
Jon Elias | f35e33cf10 | |
Jon Elias | d18ca14b4e | |
Jon Elias | 3d683c1da3 | |
Jon Elias | b622f6ef96 | |
Jon Elias | 8bcecb91c6 | |
Jon Elias | 45d9322892 | |
Javier Segarra | b8dea8551d | |
Javier Segarra | 071f3ba4d0 | |
Javier Segarra | 390ab9cfd1 | |
Javier Segarra | 14961d0aec | |
Jon Elias | ffa6ef57fe | |
Jon Elias | 6b2df03b06 | |
Jon Elias | 56c461f085 | |
Javier Segarra | 6218463e7e | |
Javier Segarra | 87eca93ef8 | |
Jon Elias | 79a26d7b94 | |
Jon Elias | 5f63a9b058 | |
Jon Elias | 85bc610298 | |
Jon Elias | 511d53d109 | |
Jon Elias | 574a2efc92 | |
Jon Elias | 23e5072d38 | |
Jon Elias | 4a57c53c3d | |
Jon Elias | 954a6ff6c0 | |
Jon Elias | 3330e43e25 | |
Jon Elias | 61f1eae282 | |
Jon Elias | 7c5f5aee77 | |
Jon Elias | 1dace39882 | |
Jon Elias | 2ab7d48b0c | |
Javier Segarra | 3f1c0b95fa |
180
CHANGELOG.md
180
CHANGELOG.md
|
@ -1,3 +1,183 @@
|
|||
# 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 🆕
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "salix-front",
|
||||
"version": "24.40.0",
|
||||
"version": "24.44.0",
|
||||
"description": "Salix frontend",
|
||||
"productName": "Salix",
|
||||
"author": "Verdnatura",
|
||||
|
|
|
@ -2,9 +2,11 @@ import axios from 'axios';
|
|||
import { useSession } from 'src/composables/useSession';
|
||||
import { Router } from 'src/router';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
|
||||
|
||||
const session = useSession();
|
||||
const { notify } = useNotify();
|
||||
const stateQuery = useStateQueryStore();
|
||||
const baseUrl = '/api/';
|
||||
|
||||
axios.defaults.baseURL = baseUrl;
|
||||
|
@ -15,7 +17,7 @@ const onRequest = (config) => {
|
|||
if (token.length && !config.headers.Authorization) {
|
||||
config.headers.Authorization = token;
|
||||
}
|
||||
|
||||
stateQuery.add(config);
|
||||
return config;
|
||||
};
|
||||
|
||||
|
@ -24,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');
|
||||
}
|
||||
|
||||
|
@ -35,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);
|
||||
|
@ -74,8 +48,6 @@ const onResponseError = (error) => {
|
|||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
notify(message, 'negative');
|
||||
|
||||
return Promise.reject(error);
|
||||
};
|
||||
|
||||
|
|
|
@ -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');
|
||||
};
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ const customer = computed(() => state.get('customer'));
|
|||
const bankEntityFormData = reactive({
|
||||
name: null,
|
||||
bic: null,
|
||||
countryFk: customer.value.countryFk,
|
||||
countryFk: customer.value?.countryFk,
|
||||
id: null,
|
||||
});
|
||||
|
||||
|
@ -31,8 +31,8 @@ const countriesFilter = {
|
|||
|
||||
const countriesOptions = ref([]);
|
||||
|
||||
const onDataSaved = (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', []);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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,6 +28,9 @@ 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);
|
||||
|
@ -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;
|
||||
|
|
|
@ -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',
|
||||
|
@ -69,7 +73,6 @@ const $props = defineProps({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
|
||||
hasSubToolbar: {
|
||||
type: Boolean,
|
||||
default: null,
|
||||
|
@ -98,10 +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();
|
||||
|
@ -122,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 = [
|
||||
{
|
||||
|
@ -147,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)
|
||||
|
@ -224,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
|
||||
|
@ -303,12 +316,20 @@ defineExpose({
|
|||
selected,
|
||||
CrudModelRef,
|
||||
params,
|
||||
tableRef,
|
||||
});
|
||||
|
||||
function handleOnDataSaved(_) {
|
||||
if (_.onDataSaved) _.onDataSaved(this);
|
||||
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
|
||||
|
@ -326,6 +347,13 @@ function handleOnDataSaved(_) {
|
|||
: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
|
||||
|
@ -335,7 +363,8 @@ function handleOnDataSaved(_) {
|
|||
)"
|
||||
:key="col.id"
|
||||
>
|
||||
<VnTableFilter
|
||||
<VnFilter
|
||||
ref="tableFilterRef"
|
||||
:column="col"
|
||||
:data-key="$attrs['data-key']"
|
||||
v-model="params[columnName(col)]"
|
||||
|
@ -359,10 +388,15 @@ function handleOnDataSaved(_) {
|
|||
: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'"
|
||||
|
@ -380,8 +414,10 @@ function handleOnDataSaved(_) {
|
|||
</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"
|
||||
|
@ -391,12 +427,7 @@ function handleOnDataSaved(_) {
|
|||
flat
|
||||
:style="isTableMode && `max-height: ${tableHeight}`"
|
||||
:virtual-scroll="isTableMode"
|
||||
@virtual-scroll="
|
||||
(event) =>
|
||||
event.index > rows.length - 2 &&
|
||||
($props.crudModel?.paginate ?? true) &&
|
||||
CrudModelRef.vnPaginateRef.paginate()
|
||||
"
|
||||
@virtual-scroll="handleScroll"
|
||||
@row-click="(_, row) => rowClickFunction && rowClickFunction(row)"
|
||||
@update:selected="emit('update:selected', $event)"
|
||||
>
|
||||
|
@ -420,13 +451,17 @@ function handleOnDataSaved(_) {
|
|||
<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'}`"
|
||||
|
@ -442,7 +477,7 @@ function handleOnDataSaved(_) {
|
|||
:search-url="searchUrl"
|
||||
/>
|
||||
</div>
|
||||
<VnTableFilter
|
||||
<VnFilter
|
||||
v-if="$props.columnSearch"
|
||||
:column="col"
|
||||
:show-title="true"
|
||||
|
@ -472,6 +507,7 @@ function handleOnDataSaved(_) {
|
|||
auto-width
|
||||
class="no-margin q-px-xs"
|
||||
:class="[getColAlign(col), col.columnClass]"
|
||||
:style="col.style"
|
||||
v-if="col.visible ?? true"
|
||||
@click.ctrl="
|
||||
($event) =>
|
||||
|
@ -500,6 +536,7 @@ function handleOnDataSaved(_) {
|
|||
:class="getColAlign(col)"
|
||||
class="sticky no-padding"
|
||||
@click="stopEventPropagation($event)"
|
||||
:style="col.style"
|
||||
>
|
||||
<QBtn
|
||||
v-for="(btn, index) of col.actions"
|
||||
|
@ -507,8 +544,12 @@ function handleOnDataSaved(_) {
|
|||
:key="index"
|
||||
:title="btn.title"
|
||||
:icon="btn.icon"
|
||||
class="q-px-sm text-primary-light"
|
||||
class="q-pa-xs"
|
||||
flat
|
||||
dense
|
||||
:class="
|
||||
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
|
||||
"
|
||||
:style="`visibility: ${
|
||||
(btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden'
|
||||
}`"
|
||||
|
@ -516,6 +557,29 @@ function handleOnDataSaved(_) {
|
|||
/>
|
||||
</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'"
|
||||
|
@ -632,25 +696,15 @@ function handleOnDataSaved(_) {
|
|||
</QCard>
|
||||
</component>
|
||||
</template>
|
||||
<template #bottom-row="{ cols }" v-if="footer">
|
||||
<QTr v-if="rows.length" class="bg-header" style="height: 30px">
|
||||
<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)"
|
||||
>
|
||||
<div
|
||||
v-if="col?.summation"
|
||||
:class="`text-${col?.align ?? 'left'}`"
|
||||
class="text-bold q-pa-sm"
|
||||
>
|
||||
{{
|
||||
rows.reduce(
|
||||
(sum, currentRow) => sum + currentRow[col.name],
|
||||
0
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
<slot :name="`column-footer-${col.name}`" />
|
||||
</QTh>
|
||||
</QTr>
|
||||
</template>
|
||||
|
@ -668,7 +722,7 @@ function handleOnDataSaved(_) {
|
|||
icon="add"
|
||||
shortcut="+"
|
||||
/>
|
||||
<QTooltip>
|
||||
<QTooltip self="top right">
|
||||
{{ createForm?.title }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
|
@ -729,16 +783,6 @@ es:
|
|||
color: var(--vn-text-color);
|
||||
}
|
||||
|
||||
.q-table--dark .q-table__bottom,
|
||||
.q-table--dark thead,
|
||||
.q-table--dark tr {
|
||||
border-color: var(--vn-section-color);
|
||||
}
|
||||
|
||||
.q-table__container > div:first-child {
|
||||
background-color: var(--vn-page-color);
|
||||
}
|
||||
|
||||
.grid-three {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(400px, max-content));
|
||||
|
@ -767,8 +811,15 @@ es:
|
|||
}
|
||||
}
|
||||
|
||||
.q-table th {
|
||||
padding: 0;
|
||||
.q-table {
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&__top {
|
||||
padding: 12px 0px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.vnTable {
|
||||
|
@ -806,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 {
|
||||
|
@ -851,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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -103,6 +103,7 @@ const mixinRules = [
|
|||
@click="
|
||||
() => {
|
||||
value = null;
|
||||
vnInputRef.focus();
|
||||
emit('remove');
|
||||
}
|
||||
"
|
||||
|
|
|
@ -3,6 +3,7 @@ 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({
|
||||
|
@ -20,6 +21,7 @@ const { validations } = useValidator();
|
|||
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => validations().required($attrs.required, val);
|
||||
const vnInputDateRef = ref(null);
|
||||
|
||||
const dateFormat = 'DD/MM/YYYY';
|
||||
const isPopupOpen = ref();
|
||||
|
@ -86,11 +88,17 @@ const styleAttrs = computed(() => {
|
|||
}
|
||||
: {};
|
||||
});
|
||||
|
||||
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"
|
||||
|
@ -113,6 +121,7 @@ const styleAttrs = computed(() => {
|
|||
!$attrs.disable
|
||||
"
|
||||
@click="
|
||||
vnInputDateRef.focus();
|
||||
model = null;
|
||||
isPopupOpen = false;
|
||||
"
|
||||
|
@ -126,6 +135,7 @@ const styleAttrs = computed(() => {
|
|||
/>
|
||||
</template>
|
||||
<QMenu
|
||||
v-if="$q.screen.gt.xs"
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
v-model="isPopupOpen"
|
||||
|
@ -134,19 +144,11 @@ const styleAttrs = computed(() => {
|
|||
: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>
|
||||
|
|
|
@ -3,6 +3,8 @@ 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 });
|
||||
|
@ -16,6 +18,7 @@ const props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
});
|
||||
const vnInputTimeRef = ref(null);
|
||||
const initialDate = ref(model.value ?? Date.vnNew());
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => validations().required($attrs.required, val);
|
||||
|
@ -69,6 +72,7 @@ function dateToTime(newDate) {
|
|||
<template>
|
||||
<div @mouseover="hover = true" @mouseleave="hover = false">
|
||||
<QInput
|
||||
ref="vnInputTimeRef"
|
||||
class="vn-input-time"
|
||||
mask="##:##"
|
||||
placeholder="--:--"
|
||||
|
@ -92,6 +96,7 @@ function dateToTime(newDate) {
|
|||
!$attrs.disable
|
||||
"
|
||||
@click="
|
||||
vnInputTimeRef.focus();
|
||||
model = null;
|
||||
isPopupOpen = false;
|
||||
"
|
||||
|
@ -104,6 +109,7 @@ function dateToTime(newDate) {
|
|||
/>
|
||||
</template>
|
||||
<QMenu
|
||||
v-if="$q.screen.gt.xs"
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
v-model="isPopupOpen"
|
||||
|
@ -112,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>
|
||||
|
|
|
@ -12,14 +12,46 @@ const props = defineProps({
|
|||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const locationProperties = [
|
||||
'postcode',
|
||||
(obj) =>
|
||||
obj.city
|
||||
? `${obj.city}${obj.province?.name ? `(${obj.province.name})` : ''}`
|
||||
: null,
|
||||
(obj) => obj.country?.name,
|
||||
];
|
||||
|
||||
const formatLocation = (obj, properties) => {
|
||||
const parts = properties.map((prop) => {
|
||||
if (typeof prop === 'string') {
|
||||
return obj[prop];
|
||||
} else if (typeof prop === 'function') {
|
||||
return prop(obj);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
const filteredParts = parts.filter(
|
||||
(part) => part !== null && part !== undefined && part !== ''
|
||||
);
|
||||
|
||||
return filteredParts.join(', ');
|
||||
};
|
||||
|
||||
const modelValue = ref(
|
||||
props.location
|
||||
? `${props.location?.postcode} - ${props.location?.city}(${props.location?.province?.name}), ${props.location?.country?.name}`
|
||||
: null
|
||||
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);
|
||||
};
|
||||
|
@ -41,6 +73,7 @@ const handleModelValue = (data) => {
|
|||
v-bind="$attrs"
|
||||
clearable
|
||||
:emit-value="false"
|
||||
:tooltip="t('Create new location')"
|
||||
>
|
||||
<template #form>
|
||||
<CreateNewPostcode
|
||||
|
@ -73,7 +106,9 @@ const handleModelValue = (data) => {
|
|||
<i18n>
|
||||
en:
|
||||
search_by_postalcode: Search by postalcode, town, province or country
|
||||
Create new location: Create new location
|
||||
es:
|
||||
Location: Ubicación
|
||||
Create new location: Crear nueva ubicación
|
||||
search_by_postalcode: Buscar por código postal, ciudad o país
|
||||
</i18n>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -38,6 +38,10 @@ const $props = defineProps({
|
|||
type: [Array],
|
||||
default: () => [],
|
||||
},
|
||||
exprBuilder: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
isClearable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
|
@ -137,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) {
|
||||
|
@ -179,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;
|
||||
|
@ -222,6 +228,8 @@ function nullishToTrue(value) {
|
|||
}
|
||||
|
||||
const getVal = (val) => ($props.useLike ? { like: `%${val}%` } : val);
|
||||
|
||||
defineExpose({ opts: myOptions });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -3,7 +3,6 @@ import { onMounted, ref, computed, watch } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { date } from 'quasar';
|
||||
import toDate from 'filters/toDate';
|
||||
import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue';
|
||||
|
||||
|
@ -59,7 +58,6 @@ const $props = defineProps({
|
|||
});
|
||||
|
||||
defineExpose({ search, sanitizer });
|
||||
|
||||
const emit = defineEmits([
|
||||
'update:modelValue',
|
||||
'refresh',
|
||||
|
@ -187,7 +185,6 @@ async function remove(key) {
|
|||
}
|
||||
|
||||
function formatValue(value) {
|
||||
if (value instanceof Date) return date.formatDate(value, 'DD/MM/YYYY');
|
||||
if (typeof value === 'boolean') return value ? t('Yes') : t('No');
|
||||
if (isNaN(value) && !isNaN(Date.parse(value))) return toDate(value);
|
||||
|
||||
|
@ -214,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>
|
||||
|
|
|
@ -58,7 +58,7 @@ defineExpose({
|
|||
: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">
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -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,15 +1,18 @@
|
|||
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',
|
||||
})
|
||||
|
|
|
@ -288,3 +288,7 @@ input::-webkit-inner-spin-button {
|
|||
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',
|
||||
});
|
||||
|
|
|
@ -50,6 +50,7 @@ globals:
|
|||
summary:
|
||||
basicData: Basic data
|
||||
daysOnward: Days onward
|
||||
daysAgo: Days ago
|
||||
today: Today
|
||||
yesterday: Yesterday
|
||||
dateFormat: en-GB
|
||||
|
@ -103,6 +104,8 @@ globals:
|
|||
ticket: Ticket
|
||||
campaign: Campaign
|
||||
weight: Weight
|
||||
error: Ups! Something went wrong
|
||||
recalc: Recalculate
|
||||
pageTitles:
|
||||
logIn: Login
|
||||
addressEdit: Update address
|
||||
|
@ -110,7 +113,7 @@ globals:
|
|||
basicData: Basic data
|
||||
log: Logs
|
||||
parkingList: Parkings list
|
||||
agencyList: Agencies list
|
||||
agencyList: Agencies
|
||||
agency: Agency
|
||||
workCenters: Work centers
|
||||
modes: Modes
|
||||
|
@ -134,7 +137,7 @@ globals:
|
|||
fiscalData: Fiscal data
|
||||
billingData: Billing data
|
||||
consignees: Consignees
|
||||
'address-create': New address
|
||||
address-create: New address
|
||||
notes: Notes
|
||||
credits: Credits
|
||||
greuges: Greuges
|
||||
|
@ -206,7 +209,7 @@ globals:
|
|||
roadmap: Roadmap
|
||||
stops: Stops
|
||||
routes: Routes
|
||||
cmrsList: CMRs list
|
||||
cmrsList: CMRs
|
||||
RouteList: List
|
||||
routeCreate: New route
|
||||
RouteRoadmap: Roadmaps
|
||||
|
@ -272,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
|
||||
|
@ -287,7 +293,10 @@ 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
|
||||
|
@ -295,12 +304,21 @@ globals:
|
|||
from: From
|
||||
To: To
|
||||
stateFk: State
|
||||
email: Email
|
||||
SSN: SSN
|
||||
fi: FI
|
||||
myTeam: My team
|
||||
departmentFk: Department
|
||||
changePass: Change password
|
||||
deleteConfirmTitle: Delete selected elements
|
||||
changeState: Change state
|
||||
errors:
|
||||
statusUnauthorized: Access denied
|
||||
statusInternalServerError: An internal server error has ocurred
|
||||
statusBadGateway: It seems that the server has fall down
|
||||
statusGatewayTimeout: Could not contact the server
|
||||
userConfig: Error fetching user config
|
||||
updateUserConfig: Error updating user config
|
||||
tokenConfig: Error fetching token config
|
||||
writeRequest: The requested operation could not be completed
|
||||
login:
|
||||
|
@ -494,6 +512,8 @@ ticket:
|
|||
warehouse: Warehouse
|
||||
customerCard: Customer card
|
||||
alias: Alias
|
||||
ticketList: Ticket List
|
||||
newOrder: New Order
|
||||
boxing:
|
||||
expedition: Expedition
|
||||
item: Item
|
||||
|
@ -515,6 +535,7 @@ ticket:
|
|||
landed: Landed
|
||||
consigneePhone: Consignee phone
|
||||
consigneeMobile: Consignee mobile
|
||||
consigneeAddress: Consignee address
|
||||
clientPhone: Client phone
|
||||
clientMobile: Client mobile
|
||||
consignee: Consignee
|
||||
|
@ -537,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
|
||||
|
@ -567,7 +592,6 @@ invoiceOut:
|
|||
client: Client
|
||||
company: Company
|
||||
customerCard: Customer card
|
||||
ticketList: Ticket List
|
||||
summary:
|
||||
issued: Issued
|
||||
created: Created
|
||||
|
@ -721,6 +745,7 @@ worker:
|
|||
locker: Locker
|
||||
balance: Balance
|
||||
medical: Medical
|
||||
operator: Operator
|
||||
list:
|
||||
name: Name
|
||||
email: Email
|
||||
|
@ -793,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
|
||||
|
@ -818,6 +843,18 @@ 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
|
||||
|
@ -857,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
|
||||
|
@ -900,6 +910,7 @@ supplier:
|
|||
account: Account
|
||||
payMethod: Pay Method
|
||||
payDay: Pay Day
|
||||
country: Country
|
||||
summary:
|
||||
responsible: Responsible
|
||||
notes: Notes
|
||||
|
@ -998,6 +1009,7 @@ travel:
|
|||
warehouseOut: Warehouse out
|
||||
totalEntries: Total entries
|
||||
totalEntriesTooltip: Total entries
|
||||
daysOnward: Landed days onwards
|
||||
summary:
|
||||
confirmed: Confirmed
|
||||
entryId: Entry Id
|
||||
|
@ -1073,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
|
||||
|
|
|
@ -49,6 +49,7 @@ globals:
|
|||
summary:
|
||||
basicData: Datos básicos
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
today: Hoy
|
||||
yesterday: Ayer
|
||||
dateFormat: es-ES
|
||||
|
@ -63,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)'
|
||||
|
@ -105,6 +106,8 @@ globals:
|
|||
ticket: Ticket
|
||||
campaign: Campaña
|
||||
weight: Peso
|
||||
error: ¡Ups! Algo salió mal
|
||||
recalc: Recalcular
|
||||
pageTitles:
|
||||
logIn: Inicio de sesión
|
||||
addressEdit: Modificar consignatario
|
||||
|
@ -112,7 +115,7 @@ globals:
|
|||
basicData: Datos básicos
|
||||
log: Historial
|
||||
parkingList: Listado de parkings
|
||||
agencyList: Listado de agencias
|
||||
agencyList: Agencias
|
||||
agency: Agencia
|
||||
workCenters: Centros de trabajo
|
||||
modes: Modos
|
||||
|
@ -161,6 +164,7 @@ globals:
|
|||
dms: Gestión documental
|
||||
entryCreate: Nueva entrada
|
||||
latestBuys: Últimas compras
|
||||
reserves: Reservas
|
||||
tickets: Tickets
|
||||
ticketCreate: Nuevo ticket
|
||||
boxing: Encajado
|
||||
|
@ -209,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
|
||||
|
@ -265,7 +270,7 @@ globals:
|
|||
tracking: Estados
|
||||
components: Componentes
|
||||
pictures: Fotos
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
ldap: LDAP
|
||||
samba: Samba
|
||||
twoFactor: Doble factor
|
||||
|
@ -275,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
|
||||
|
@ -290,7 +297,10 @@ 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
|
||||
|
@ -298,12 +308,21 @@ globals:
|
|||
from: Desde
|
||||
To: Hasta
|
||||
stateFk: Estado
|
||||
departmentFk: Departamento
|
||||
email: Correo
|
||||
SSN: NSS
|
||||
fi: NIF
|
||||
myTeam: Mi equipo
|
||||
changePass: Cambiar contraseña
|
||||
deleteConfirmTitle: Eliminar los elementos seleccionados
|
||||
changeState: Cambiar estado
|
||||
errors:
|
||||
statusUnauthorized: Acceso denegado
|
||||
statusInternalServerError: Ha ocurrido un error interno del servidor
|
||||
statusBadGateway: Parece ser que el servidor ha caído
|
||||
statusGatewayTimeout: No se ha podido contactar con el servidor
|
||||
userConfig: Error al obtener configuración de usuario
|
||||
updateUserConfig: Error al actualizar la configuración de usuario
|
||||
tokenConfig: Error al obtener configuración de token
|
||||
writeRequest: No se pudo completar la operación solicitada
|
||||
login:
|
||||
|
@ -484,7 +503,7 @@ ticket:
|
|||
tracking: Estados
|
||||
components: Componentes
|
||||
pictures: Fotos
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
list:
|
||||
nickname: Alias
|
||||
state: Estado
|
||||
|
@ -502,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
|
||||
|
@ -523,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
|
||||
|
@ -545,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
|
||||
|
@ -727,6 +752,7 @@ worker:
|
|||
balance: Balance
|
||||
formation: Formación
|
||||
medical: Mutua
|
||||
operator: Operario
|
||||
list:
|
||||
name: Nombre
|
||||
email: Email
|
||||
|
@ -815,6 +841,19 @@ 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
|
||||
|
@ -854,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
|
||||
|
@ -884,6 +908,7 @@ supplier:
|
|||
account: Cuenta
|
||||
payMethod: Método de pago
|
||||
payDay: Dia de pago
|
||||
country: País
|
||||
summary:
|
||||
responsible: Responsable
|
||||
notes: Notas
|
||||
|
@ -982,6 +1007,7 @@ travel:
|
|||
warehouseOut: Alm.entrada
|
||||
totalEntries: ∑
|
||||
totalEntriesTooltip: Entradas totales
|
||||
daysOnward: Días de llegada en adelante
|
||||
summary:
|
||||
confirmed: Confirmado
|
||||
entryId: Id entrada
|
||||
|
@ -1057,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(
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -204,7 +204,7 @@ function claimUrl(section) {
|
|||
top
|
||||
color="black"
|
||||
text-color="white"
|
||||
:label="t('ticket.summary.changeState')"
|
||||
:label="t('globals.changeState')"
|
||||
>
|
||||
<QList>
|
||||
<QVirtualScroll
|
||||
|
|
|
@ -16,7 +16,7 @@ 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';
|
||||
|
@ -33,9 +33,9 @@ const stateStore = useStateStore();
|
|||
const user = state.getUser();
|
||||
|
||||
const clientRisk = ref([]);
|
||||
const companies = ref([]);
|
||||
const tableRef = ref();
|
||||
const companyId = ref(user.value.companyFk);
|
||||
const companyLastId = ref(user.value.companyFk);
|
||||
const balances = ref([]);
|
||||
const vnFilterRef = ref({});
|
||||
const filter = computed(() => {
|
||||
|
@ -45,33 +45,6 @@ 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: 'right',
|
||||
|
@ -166,6 +139,11 @@ onBeforeMount(() => {
|
|||
});
|
||||
|
||||
async function getCurrentBalance(data) {
|
||||
currentBalance.value[companyId.value] = {
|
||||
amount: 0,
|
||||
code: companies.value.find((c) => c.id === companyId.value)?.code,
|
||||
};
|
||||
|
||||
for (const balance of data) {
|
||||
currentBalance.value[balance.companyFk] = {
|
||||
code: balance.company.code,
|
||||
|
@ -192,14 +170,21 @@ const showBalancePdf = ({ id }) => {
|
|||
|
||||
<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, companyFk: companyId },
|
||||
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">
|
||||
|
@ -212,13 +197,15 @@ const showBalancePdf = ({ id }) => {
|
|||
</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>
|
||||
|
|
|
@ -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
|
||||
|
@ -34,7 +48,7 @@ const title = ref();
|
|||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('globals.name')"
|
||||
:rules="validate('client.socialName')"
|
||||
:rules="validate('client.name')"
|
||||
autofocus
|
||||
clearable
|
||||
v-model="data.name"
|
||||
|
@ -98,8 +112,10 @@ const title = ref();
|
|||
}"
|
||||
:fields="['id', 'nickname']"
|
||||
sort-by="nickname ASC"
|
||||
option-label="nickname"
|
||||
option-value="id"
|
||||
:rules="validate('client.salesPersonFk')"
|
||||
:use-like="false"
|
||||
:expr-builder="exprBuilder"
|
||||
emit-value
|
||||
auto-load
|
||||
>
|
||||
|
|
|
@ -0,0 +1,177 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import { QItem } from 'quasar';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import { QItemSection } from 'quasar';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
|
||||
const { t } = useI18n();
|
||||
defineProps({ dataKey: { type: String, required: true } });
|
||||
</script>
|
||||
<template>
|
||||
<VnFilterPanel :data-key="dataKey" :search-button="true">
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ params }">
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('params.item')"
|
||||
v-model="params.itemId"
|
||||
is-outlined
|
||||
lazy-rules
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
v-model="params.buyerId"
|
||||
url="TicketRequests/getItemTypeWorker"
|
||||
:fields="['id', 'nickname']"
|
||||
sort-by="nickname ASC"
|
||||
:label="t('params.buyer')"
|
||||
option-value="id"
|
||||
option-label="nickname"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
v-model="params.typeId"
|
||||
url="ItemTypes"
|
||||
:include="['category']"
|
||||
:fields="['id', 'name', 'categoryFk']"
|
||||
sort-by="name ASC"
|
||||
:label="t('params.typeId')"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
||||
<QItemLabel caption>{{
|
||||
scope.opt?.category?.name
|
||||
}}</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
v-model="params.categoryId"
|
||||
url="ItemCategories"
|
||||
:fields="['id', 'name']"
|
||||
sort-by="name ASC"
|
||||
:label="t('params.categoryId')"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
v-model="params.campaignId"
|
||||
url="Campaigns/latest"
|
||||
sort-by="dated DESC"
|
||||
:label="t('params.campaignId')"
|
||||
option-label="code"
|
||||
option-value="id"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{
|
||||
t(`params.${scope.opt?.code}`)
|
||||
}}</QItemLabel>
|
||||
<QItemLabel caption>{{
|
||||
toDate(scope.opt.dated)
|
||||
}}</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('params.from')"
|
||||
v-model="params.from"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('params.to')"
|
||||
v-model="params.to"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
item: Item id
|
||||
buyer: Buyer
|
||||
type: Type
|
||||
category: Category
|
||||
itemId: Item id
|
||||
buyerId: Buyer
|
||||
typeId: Type
|
||||
categoryId: Category
|
||||
from: From
|
||||
to: To
|
||||
campaignId: Campaña
|
||||
valentinesDay: Valentine's Day
|
||||
mothersDay: Mother's Day
|
||||
allSaints: All Saints' Day
|
||||
es:
|
||||
params:
|
||||
item: Id artículo
|
||||
buyer: Comprador
|
||||
type: Tipo
|
||||
category: Categoría
|
||||
itemId: Id Artículo
|
||||
buyerId: Comprador
|
||||
typeId: Tipo
|
||||
categoryId: Reino
|
||||
from: Desde
|
||||
to: Hasta
|
||||
campaignId: Campaña
|
||||
valentinesDay: Día de San Valentín
|
||||
mothersDay: Día de la Madre
|
||||
allSaints: Día de Todos los Santos
|
||||
</i18n>
|
|
@ -190,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>
|
||||
|
@ -204,6 +216,7 @@ es:
|
|||
Customer ticket list: Listado de tickets del cliente
|
||||
Customer invoice out list: Listado de facturas del cliente
|
||||
Go to user: Ir al usuario
|
||||
Go to supplier: Ir al proveedor
|
||||
Customer unpaid: Cliente impago
|
||||
Unpaid: Impagado
|
||||
unpaidDated: 'Fecha {dated}'
|
||||
|
|
|
@ -93,6 +93,7 @@ function handleLocation(data, location) {
|
|||
<VnRow>
|
||||
<VnLocation
|
||||
:rules="validate('Worker.postcode')"
|
||||
:roles-allowed-to-create="['deliveryAssistant', 'administrative']"
|
||||
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
|
||||
:location="data"
|
||||
@update:model-value="(location) => handleLocation(data, location)"
|
||||
|
@ -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>
|
||||
|
|
|
@ -22,5 +22,6 @@ const noteFilter = computed(() => {
|
|||
:filter="noteFilter"
|
||||
:body="{ clientFk: route.params.id }"
|
||||
style="overflow-y: auto"
|
||||
:select-type="true"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -13,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: {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,35 +1,20 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
dataKey: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const provinces = ref();
|
||||
const workers = ref();
|
||||
const zones = ref();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData url="Provinces" @on-fetch="(data) => (provinces = data)" auto-load />
|
||||
<FetchData url="Zones" @on-fetch="(data) => (zones = data)" auto-load />
|
||||
<FetchData
|
||||
url="Workers/activeWithInheritedRole"
|
||||
:filter="{ where: { role: 'salesPerson' } }"
|
||||
@on-fetch="(data) => (workers = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true" search-url="table">
|
||||
<VnFilterPanel :data-key="dataKey" :search-button="true" search-url="table">
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
|
@ -65,15 +50,14 @@ const zones = ref();
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem class="q-mb-sm">
|
||||
<QItemSection v-if="!workers">
|
||||
<QSkeleton type="QInput" class="full-width" />
|
||||
</QItemSection>
|
||||
<QItemSection v-if="workers">
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
url="Workers/activeWithInheritedRole"
|
||||
:filter="{ where: { role: 'salesPerson' } }"
|
||||
auto-load
|
||||
:label="t('Salesperson')"
|
||||
v-model="params.salesPersonFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="workers"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
|
@ -88,15 +72,12 @@ const zones = ref();
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem class="q-mb-sm">
|
||||
<QItemSection v-if="!provinces">
|
||||
<QSkeleton type="QInput" class="full-width" />
|
||||
</QItemSection>
|
||||
<QItemSection v-if="provinces">
|
||||
<VnSelect
|
||||
<QItemSection
|
||||
><VnSelect
|
||||
url="Provinces"
|
||||
:label="t('Province')"
|
||||
v-model="params.provinceFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="provinces"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
|
@ -105,6 +86,7 @@ const zones = ref();
|
|||
dense
|
||||
outlined
|
||||
rounded
|
||||
auto-load
|
||||
:input-debounce="0"
|
||||
/>
|
||||
</QItemSection>
|
||||
|
@ -135,25 +117,21 @@ const zones = ref();
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection v-if="!zones">
|
||||
<QSkeleton type="QInput" class="full-width" />
|
||||
</QItemSection>
|
||||
<QItemSection v-if="zones">
|
||||
<VnSelect
|
||||
:label="t('Zone')"
|
||||
v-model="params.zoneFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="zones"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
hide-selected
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
/>
|
||||
</QItemSection>
|
||||
<VnSelect
|
||||
url="Zones"
|
||||
:label="t('Zone')"
|
||||
v-model="params.zoneFk"
|
||||
@update:model-value="searchFn()"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
hide-selected
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
auto-load
|
||||
/>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
|
|
|
@ -8,10 +8,10 @@ import VnLocation from 'src/components/common/VnLocation.vue';
|
|||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import CustomerSummary from './Card/CustomerSummary.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||
|
||||
import { toDate } from 'src/filters';
|
||||
import CustomerFilter from './CustomerFilter.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
@ -397,6 +397,11 @@ function handleLocation(data, location) {
|
|||
:label="t('Search customer')"
|
||||
data-key="Customer"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<CustomerFilter data-key="Customer" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="Customer"
|
||||
|
@ -413,6 +418,7 @@ function handleLocation(data, location) {
|
|||
order="id DESC"
|
||||
:columns="columns"
|
||||
redirect="customer"
|
||||
:right-search="false"
|
||||
auto-load
|
||||
>
|
||||
<template #more-create-dialog="{ data }">
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ref, computed } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { toCurrency, toDate, dateRange } from 'filters/index';
|
||||
import CustomerNotificationsFilter from './CustomerDefaulterFilter.vue';
|
||||
import CustomerBalanceDueTotal from './CustomerBalanceDueTotal.vue';
|
||||
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
|
@ -11,7 +10,6 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue';
|
||||
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -192,11 +190,6 @@ function exprBuilder(param, value) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<CustomerNotificationsFilter data-key="CustomerDefaulter" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnSubToolbar>
|
||||
<template #st-data>
|
||||
<CustomerBalanceDueTotal :amount="balanceDueTotal" />
|
||||
|
|
|
@ -25,19 +25,31 @@ const { notify } = useNotify();
|
|||
const { t } = useI18n();
|
||||
|
||||
const newObservation = ref(null);
|
||||
const obsId = ref(null);
|
||||
|
||||
const onSubmit = async () => {
|
||||
try {
|
||||
const data = $props.clients.map((item) => {
|
||||
return { clientFk: item.clientFk, text: newObservation.value };
|
||||
});
|
||||
await axios.post('ClientObservations', data);
|
||||
if (!obsId.value)
|
||||
obsId.value = (
|
||||
await axios.get('ObservationTypes/findOne', {
|
||||
params: { filter: { where: { description: 'Finance' } } },
|
||||
})
|
||||
).data?.id;
|
||||
|
||||
const payload = {
|
||||
const bodyObs = $props.clients.map((item) => {
|
||||
return {
|
||||
clientFk: item.clientFk,
|
||||
text: newObservation.value,
|
||||
observationTypeFk: obsId.value,
|
||||
};
|
||||
});
|
||||
await axios.post('ClientObservations', bodyObs);
|
||||
|
||||
const bodyObsMail = {
|
||||
defaulters: $props.clients,
|
||||
observation: newObservation.value,
|
||||
};
|
||||
await axios.post('Defaulters/observationEmail', payload);
|
||||
await axios.post('Defaulters/observationEmail', bodyObsMail);
|
||||
|
||||
await $props.promise();
|
||||
|
||||
|
|
|
@ -134,6 +134,7 @@ function handleLocation(data, location) {
|
|||
option-label="fiscalName"
|
||||
option-value="id"
|
||||
v-model="data.customsAgentFk"
|
||||
:tooltip="t('Create a new expense')"
|
||||
>
|
||||
<template #form>
|
||||
<CustomerNewCustomsAgent @on-data-saved="refreshData()" />
|
||||
|
|
|
@ -11,7 +11,7 @@ import VnRow from 'components/ui/VnRow.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||
import CustomsNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||
import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
@ -226,9 +226,10 @@ function handleLocation(data, location) {
|
|||
option-label="fiscalName"
|
||||
option-value="id"
|
||||
v-model="data.customsAgentFk"
|
||||
:tooltip="t('New customs agent')"
|
||||
>
|
||||
<template #form>
|
||||
<CustomsNewCustomsAgent />
|
||||
<CustomerNewCustomsAgent />
|
||||
</template>
|
||||
</VnSelectDialog>
|
||||
</div>
|
||||
|
@ -239,39 +240,33 @@ function handleLocation(data, location) {
|
|||
class="row q-gutter-md q-mb-md"
|
||||
v-for="(note, index) in notes"
|
||||
>
|
||||
<div class="col">
|
||||
<VnSelect
|
||||
:label="t('Observation type')"
|
||||
:options="observationTypes"
|
||||
hide-selected
|
||||
option-label="description"
|
||||
option-value="id"
|
||||
v-model="note.observationTypeFk"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<VnInput
|
||||
:label="t('Description')"
|
||||
:rules="validate('route.description')"
|
||||
clearable
|
||||
v-model="note.description"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<QIcon
|
||||
@click.stop="deleteNote(note.id, index)"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
name="delete"
|
||||
size="sm"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Remove note') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</div>
|
||||
<VnSelect
|
||||
:label="t('Observation type')"
|
||||
:options="observationTypes"
|
||||
hide-selected
|
||||
option-label="description"
|
||||
option-value="id"
|
||||
v-model="note.observationTypeFk"
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('Description')"
|
||||
:rules="validate('route.description')"
|
||||
clearable
|
||||
v-model="note.description"
|
||||
/>
|
||||
<QIcon
|
||||
:style="{ flex: 0, 'align-self': $q.screen.gt.xs ? 'end' : 'center' }"
|
||||
@click.stop="deleteNote(note.id, index)"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
name="delete"
|
||||
size="sm"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Remove note') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</VnRow>
|
||||
|
||||
<QBtn
|
||||
@click.stop="addNote()"
|
||||
class="cursor-pointer add-icon q-mt-md"
|
||||
|
@ -309,6 +304,7 @@ es:
|
|||
Mobile: Movíl
|
||||
Incoterms: Incoterms
|
||||
Customs agent: Agente de aduanas
|
||||
New customs agent: Nuevo agente de aduanas
|
||||
Notes: Notas
|
||||
Observation type: Tipo de observación
|
||||
Description: Descripción
|
||||
|
|
|
@ -1,139 +0,0 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import axios from 'axios';
|
||||
import { useDialogPluginComponent } from 'quasar';
|
||||
|
||||
import useNotify from 'src/composables/useNotify';
|
||||
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
|
||||
const { dialogRef } = useDialogPluginComponent();
|
||||
const { notify } = useNotify();
|
||||
const { t } = useI18n();
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
promise: {
|
||||
type: Function,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const userPasswords = ref({});
|
||||
|
||||
const closeButton = ref(null);
|
||||
const isLoading = ref(false);
|
||||
const newPassword = ref('');
|
||||
const requestPassword = ref('');
|
||||
|
||||
const onSubmit = async () => {
|
||||
isLoading.value = true;
|
||||
|
||||
if (newPassword.value !== requestPassword.value) {
|
||||
notify(t("Passwords don't match"), 'negative');
|
||||
isLoading.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
const payload = {
|
||||
newPassword: newPassword.value,
|
||||
};
|
||||
try {
|
||||
await axios.patch(`Clients/${$props.id}/setPassword`, payload);
|
||||
await $props.promise();
|
||||
} catch (error) {
|
||||
notify('errors.create', 'negative');
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
if (closeButton.value) closeButton.value.click();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QDialog ref="dialogRef">
|
||||
<FetchData
|
||||
@on-fetch="(data) => (userPasswords = data[0])"
|
||||
auto-load
|
||||
url="UserPasswords"
|
||||
/>
|
||||
<QCard class="q-pa-lg">
|
||||
<QCardSection>
|
||||
<QForm @submit.prevent="onSubmit">
|
||||
<span
|
||||
ref="closeButton"
|
||||
class="row justify-end close-icon"
|
||||
v-close-popup
|
||||
>
|
||||
<QIcon name="close" size="sm" />
|
||||
</span>
|
||||
|
||||
<VnRow class="row q-gutter-md q-mb-md" style="flex-direction: column">
|
||||
<div class="col">
|
||||
<VnInput
|
||||
:label="t('New password')"
|
||||
clearable
|
||||
v-model="newPassword"
|
||||
type="password"
|
||||
>
|
||||
<template #append>
|
||||
<QIcon name="info" class="cursor-info">
|
||||
<QTooltip>
|
||||
{{
|
||||
t('customer.card.passwordRequirements', {
|
||||
...userPasswords,
|
||||
})
|
||||
}}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</div>
|
||||
<div class="col">
|
||||
<VnInput
|
||||
:label="t('Request password')"
|
||||
clearable
|
||||
v-model="requestPassword"
|
||||
type="password"
|
||||
/>
|
||||
</div>
|
||||
</VnRow>
|
||||
|
||||
<div class="q-mt-lg row justify-end">
|
||||
<QBtn
|
||||
:disabled="isLoading"
|
||||
:label="t('globals.cancel')"
|
||||
:loading="isLoading"
|
||||
class="q-ml-sm"
|
||||
color="primary"
|
||||
flat
|
||||
type="reset"
|
||||
v-close-popup
|
||||
/>
|
||||
<QBtn
|
||||
:disabled="isLoading"
|
||||
:label="t('Change password')"
|
||||
:loading="isLoading"
|
||||
color="primary"
|
||||
type="submit"
|
||||
/>
|
||||
</div>
|
||||
</QForm>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
</QDialog>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
New password: Nueva contraseña
|
||||
Request password: Repetir contraseña
|
||||
Change password: Cambiar contraseña
|
||||
Passwords don't match: Las contraseñas no coinciden
|
||||
</i18n>
|
|
@ -138,7 +138,7 @@ const onSubmit = async () => {
|
|||
notify('globals.dataSaved', 'positive');
|
||||
onDataSaved(data);
|
||||
} catch (error) {
|
||||
notify('errors.create', 'negative');
|
||||
notify('errors.writeRequest', 'negative');
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import { useRoute, useRouter } from 'vue-router';
|
|||
import { date } from 'quasar';
|
||||
import { toDateFormat } from 'src/filters/date.js';
|
||||
|
||||
import { toCurrency } from 'src/filters';
|
||||
import { dashIfEmpty, toCurrency } from 'src/filters';
|
||||
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import TicketSummary from 'src/pages/Ticket/Card/TicketSummary.vue';
|
||||
|
@ -32,6 +32,16 @@ const filter = {
|
|||
},
|
||||
{ relation: 'invoiceOut', scope: { fields: ['id'] } },
|
||||
{ relation: 'agencyMode', scope: { fields: ['name'] } },
|
||||
{
|
||||
relation: 'ticketSales',
|
||||
scope: {
|
||||
fields: ['id', 'concept', 'itemFk'],
|
||||
include: { relation: 'item' },
|
||||
scope: {
|
||||
fields: ['id', 'name', 'itemPackingTypeFk'],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
where: { clientFk: route.params.id },
|
||||
order: ['shipped DESC', 'id'],
|
||||
|
@ -87,7 +97,12 @@ const columns = computed(() => [
|
|||
label: t('Total'),
|
||||
name: 'total',
|
||||
},
|
||||
|
||||
{
|
||||
align: 'left',
|
||||
name: 'itemPackingTypeFk',
|
||||
label: t('ticketSale.packaging'),
|
||||
format: (row) => getItemPackagingType(row),
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
label: '',
|
||||
|
@ -135,6 +150,15 @@ const setShippedColor = (date) => {
|
|||
if (difference == 0) return 'warning';
|
||||
if (difference < 0) return 'success';
|
||||
};
|
||||
|
||||
const getItemPackagingType = (row) => {
|
||||
const packagingType = row?.ticketSales
|
||||
.map((sale) => sale.item?.itemPackingTypeFk || '-')
|
||||
.filter((value) => value !== '-')
|
||||
.join(', ');
|
||||
|
||||
return dashIfEmpty(packagingType);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -58,7 +58,7 @@ customer:
|
|||
vies: VIES
|
||||
payMethod: Método de pago
|
||||
bankAccount: Cuenta bancaria
|
||||
dueDay: Día de pago
|
||||
dueDay: Vencimiento
|
||||
hasLcr: Recibido LCR
|
||||
hasCoreVnl: Recibido core VNL
|
||||
hasB2BVnl: Recibido B2B VNL
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
@ -11,17 +9,8 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
|||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
const workersOptions = ref([]);
|
||||
const clientsOptions = ref([]);
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
url="Workers/search"
|
||||
@on-fetch="(data) => (workersOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData url="Clients" @on-fetch="(data) => (clientsOptions = data)" auto-load />
|
||||
<FormModel
|
||||
:url="`Departments/${route.params.id}`"
|
||||
model="department"
|
||||
|
@ -62,7 +51,7 @@ const clientsOptions = ref([]);
|
|||
<VnSelect
|
||||
:label="t('department.bossDepartment')"
|
||||
v-model="data.workerFk"
|
||||
:options="workersOptions"
|
||||
url="Workers/search"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
hide-selected
|
||||
|
@ -72,7 +61,7 @@ const clientsOptions = ref([]);
|
|||
<VnSelect
|
||||
:label="t('department.selfConsumptionCustomer')"
|
||||
v-model="data.clientFk"
|
||||
:options="clientsOptions"
|
||||
url="Clients"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
hide-selected
|
||||
|
|
|
@ -10,6 +10,8 @@ import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.v
|
|||
import { toDate, toCurrency } from 'src/filters';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
import axios from 'axios';
|
||||
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
||||
import VnToSummary from 'src/components/ui/VnToSummary.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
@ -162,14 +164,12 @@ const fetchEntryBuys = async () => {
|
|||
data-key="EntrySummary"
|
||||
>
|
||||
<template #header-left>
|
||||
<router-link
|
||||
v-if="route.name !== 'EntrySummary'"
|
||||
:to="{ name: 'EntrySummary', params: { id: entityId } }"
|
||||
class="header link"
|
||||
:href="entryUrl"
|
||||
>
|
||||
<QIcon name="open_in_new" color="white" size="sm" />
|
||||
</router-link>
|
||||
<VnToSummary
|
||||
v-if="route?.name !== 'EntrySummary'"
|
||||
:route-name="'EntrySummary'"
|
||||
:entity-id="entityId"
|
||||
:url="entryUrl"
|
||||
/>
|
||||
</template>
|
||||
<template #header>
|
||||
<span>{{ entry.id }} - {{ entry.supplier.nickname }}</span>
|
||||
|
@ -184,7 +184,10 @@ const fetchEntryBuys = async () => {
|
|||
<QIcon name="open_in_new" />
|
||||
</router-link>
|
||||
<VnLv :label="t('entry.summary.commission')" :value="entry.commission" />
|
||||
<VnLv :label="t('entry.summary.currency')" :value="entry.currency.name" />
|
||||
<VnLv
|
||||
:label="t('entry.summary.currency')"
|
||||
:value="entry.currency?.name"
|
||||
/>
|
||||
<VnLv :label="t('entry.summary.company')" :value="entry.company.code" />
|
||||
<VnLv :label="t('entry.summary.reference')" :value="entry.reference" />
|
||||
<VnLv
|
||||
|
@ -210,12 +213,12 @@ const fetchEntryBuys = async () => {
|
|||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('entry.summary.travelAgency')"
|
||||
:value="entry.travel.agency.name"
|
||||
:value="entry.travel.agency?.name"
|
||||
/>
|
||||
<VnLv :label="t('shipped')" :value="toDate(entry.travel.shipped)" />
|
||||
<VnLv
|
||||
:label="t('entry.summary.travelWarehouseOut')"
|
||||
:value="entry.travel.warehouseOut.name"
|
||||
:value="entry.travel.warehouseOut?.name"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.travelDelivered')"
|
||||
|
@ -225,7 +228,7 @@ const fetchEntryBuys = async () => {
|
|||
<VnLv :label="t('landed')" :value="toDate(entry.travel.landed)" />
|
||||
<VnLv
|
||||
:label="t('entry.summary.travelWarehouseIn')"
|
||||
:value="entry.travel.warehouseIn.name"
|
||||
:value="entry.travel.warehouseIn?.name"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.travelReceived')"
|
||||
|
@ -281,17 +284,17 @@ const fetchEntryBuys = async () => {
|
|||
>
|
||||
<template #body="{ cols, row, rowIndex }">
|
||||
<QTr no-hover>
|
||||
<QTd v-for="col in cols" :key="col.name">
|
||||
<QTd v-for="col in cols" :key="col?.name">
|
||||
<component
|
||||
:is="tableColumnComponents[col.name].component(props)"
|
||||
v-bind="tableColumnComponents[col.name].props(props)"
|
||||
@click="tableColumnComponents[col.name].event(props)"
|
||||
:is="tableColumnComponents[col?.name].component()"
|
||||
v-bind="tableColumnComponents[col?.name].props()"
|
||||
@click="tableColumnComponents[col?.name].event()"
|
||||
class="col-content"
|
||||
>
|
||||
<template
|
||||
v-if="
|
||||
col.name !== 'observation' &&
|
||||
col.name !== 'isConfirmed'
|
||||
col?.name !== 'observation' &&
|
||||
col?.name !== 'isConfirmed'
|
||||
"
|
||||
>{{ col.value }}</template
|
||||
>
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
<script setup>
|
||||
import { onMounted, onUnmounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate } from 'src/filters';
|
||||
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const { t } = useI18n();
|
||||
import { toDate } from 'src/filters';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
|
||||
const columns = [
|
||||
{
|
||||
align: 'center',
|
||||
|
|
|
@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
|
|||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import ItemsFilterPanel from 'src/components/ItemsFilterPanel.vue';
|
||||
|
||||
|
@ -18,6 +19,7 @@ defineProps({
|
|||
|
||||
const itemTypeWorkersOptions = ref([]);
|
||||
const suppliersOptions = ref([]);
|
||||
const tagValues = ref([]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -45,19 +45,19 @@ const columns = [
|
|||
optionValue: 'id',
|
||||
useLike: false,
|
||||
},
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
label: t('Reserve'),
|
||||
name: 'reserve',
|
||||
columnFilter: false,
|
||||
create: true,
|
||||
component: 'number',
|
||||
summation: true,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
label: t('Bought'),
|
||||
name: 'bought',
|
||||
summation: true,
|
||||
|
@ -77,7 +77,7 @@ const columns = [
|
|||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('More'),
|
||||
title: t('View more details'),
|
||||
icon: 'search',
|
||||
isPrimary: true,
|
||||
action: (row) => {
|
||||
|
@ -101,14 +101,9 @@ const travel = ref(null);
|
|||
const userParams = ref({
|
||||
dated: Date.vnNew(),
|
||||
});
|
||||
|
||||
const filter = ref({
|
||||
where: {
|
||||
shipped: (userParams.value.dated
|
||||
? new Date(userParams.value.dated)
|
||||
: Date.vnNew()
|
||||
).setHours(0, 0, 0, 0),
|
||||
m3: { neq: null },
|
||||
},
|
||||
fields: ['id', 'm3', 'warehouseInFk'],
|
||||
include: [
|
||||
{
|
||||
relation: 'warehouseIn',
|
||||
|
@ -117,6 +112,13 @@ const filter = ref({
|
|||
},
|
||||
},
|
||||
],
|
||||
where: {
|
||||
shipped: (userParams.value.dated
|
||||
? new Date(userParams.value.dated)
|
||||
: Date.vnNew()
|
||||
).setHours(0, 0, 0, 0),
|
||||
m3: { neq: null },
|
||||
},
|
||||
});
|
||||
|
||||
const setUserParams = async ({ dated }) => {
|
||||
|
@ -128,6 +130,22 @@ const setUserParams = async ({ dated }) => {
|
|||
function openDialog() {
|
||||
travelDialogRef.value = true;
|
||||
}
|
||||
|
||||
function setFooter(data) {
|
||||
const footer = {
|
||||
bought: 0,
|
||||
reserve: 0,
|
||||
};
|
||||
data.forEach((row) => {
|
||||
footer.bought += row?.bought;
|
||||
footer.reserve += row?.reserve;
|
||||
});
|
||||
tableRef.value.footer = footer;
|
||||
}
|
||||
|
||||
function round(value) {
|
||||
return Math.round(value * 100) / 100;
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<VnSubToolbar>
|
||||
|
@ -139,20 +157,22 @@ function openDialog() {
|
|||
:filter="filter"
|
||||
@on-fetch="
|
||||
(data) => {
|
||||
travel = data.filter((data) => data.warehouseIn.code === 'VNH');
|
||||
travel = data.find(
|
||||
(data) => data.warehouseIn?.code.toLowerCase() === 'vnh'
|
||||
);
|
||||
}
|
||||
"
|
||||
/>
|
||||
<VnRow class="travel">
|
||||
<div v-if="travel">
|
||||
<span style="color: var(--vn-label-color)">
|
||||
{{ t('Booked trucks') }}:
|
||||
{{ t('Purchase Spaces') }}:
|
||||
</span>
|
||||
<span>
|
||||
{{ travel[0]?.m3 }}
|
||||
{{ travel?.m3 }}
|
||||
</span>
|
||||
<QBtn
|
||||
v-if="travel[0]?.m3"
|
||||
v-if="travel?.m3"
|
||||
style="max-width: 20%"
|
||||
flat
|
||||
icon="edit"
|
||||
|
@ -166,10 +186,10 @@ function openDialog() {
|
|||
</VnSubToolbar>
|
||||
<QDialog v-model="travelDialogRef" :maximized="true" :class="['vn-row', 'wrap']">
|
||||
<FormModelPopup
|
||||
:url-update="`Travels/${travel[0].id}`"
|
||||
:url-update="`Travels/${travel?.id}`"
|
||||
model="travel"
|
||||
:title="t('Travel m3')"
|
||||
:form-initial-data="{ id: travel[0].id, m3: travel[0].m3 }"
|
||||
:form-initial-data="{ id: travel?.id, m3: travel?.m3 }"
|
||||
@on-data-saved="fetchDataRef.fetch()"
|
||||
>
|
||||
<template #form-inputs="{ data }">
|
||||
|
@ -192,60 +212,90 @@ function openDialog() {
|
|||
/>
|
||||
</template>
|
||||
</RightMenu>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="StockBoughts"
|
||||
url="StockBoughts/getStockBought"
|
||||
save-url="StockBoughts/crud"
|
||||
order="reserve DESC"
|
||||
:right-search="false"
|
||||
:is-editable="true"
|
||||
:create="{
|
||||
urlCreate: 'StockBoughts',
|
||||
title: t('Reserve some space'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {
|
||||
workerFk: user.id,
|
||||
dated: Date.vnNow(),
|
||||
},
|
||||
}"
|
||||
:columns="columns"
|
||||
:user-params="userParams"
|
||||
:footer="true"
|
||||
auto-load
|
||||
>
|
||||
<template #column-workerFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row?.worker?.user?.name }}
|
||||
<WorkerDescriptorProxy :id="row?.workerFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</QPage>
|
||||
<div class="table-container">
|
||||
<div class="column items-center">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="StockBoughts"
|
||||
url="StockBoughts/getStockBought"
|
||||
save-url="StockBoughts/crud"
|
||||
order="reserve DESC"
|
||||
:right-search="false"
|
||||
:is-editable="true"
|
||||
@on-fetch="(data) => setFooter(data)"
|
||||
:create="{
|
||||
urlCreate: 'StockBoughts',
|
||||
title: t('Reserve some space'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {
|
||||
workerFk: user.id,
|
||||
dated: Date.vnNow(),
|
||||
},
|
||||
}"
|
||||
:columns="columns"
|
||||
:user-params="userParams"
|
||||
:footer="true"
|
||||
table-height="80vh"
|
||||
auto-load
|
||||
:column-search="false"
|
||||
>
|
||||
<template #column-workerFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row?.worker?.user?.name }}
|
||||
<WorkerDescriptorProxy :id="row?.workerFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-bought="{ row }">
|
||||
<span :class="{ 'text-negative': row.reserve < row.bought }">
|
||||
{{ row?.bought }}
|
||||
</span>
|
||||
</template>
|
||||
<template #column-footer-reserve>
|
||||
<span>
|
||||
{{ round(tableRef.footer.reserve) }}
|
||||
</span>
|
||||
</template>
|
||||
<template #column-footer-bought>
|
||||
<span
|
||||
:class="{
|
||||
'text-negative':
|
||||
tableRef.footer.reserve < tableRef.footer.bought,
|
||||
}"
|
||||
>
|
||||
{{ round(tableRef.footer.bought) }}
|
||||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="css" scoped>
|
||||
<style lang="scss" scoped>
|
||||
.travel {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.table-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.text-negative {
|
||||
color: $negative !important;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
en:
|
||||
Buyer: Buyer
|
||||
Reserve: Reserve
|
||||
Bought: Bought
|
||||
More: More
|
||||
Date: Date
|
||||
This buyer has already made a reservation for this date: This buyer has already made a reservation for this date
|
||||
es:
|
||||
Edit travel: Editar envío
|
||||
Travel: Envíos
|
||||
Booked trucks: Camiones reservados
|
||||
Purchase Spaces: Espacios de compra
|
||||
Buyer: Comprador
|
||||
Reserve: Reservado
|
||||
Bought: Comprado
|
||||
More: Más
|
||||
Date: Fecha
|
||||
View more details: Ver más detalles
|
||||
Reserve some space: Reservar espacio
|
||||
This buyer has already made a reservation for this date: Este comprador ya ha hecho una reserva para esta fecha
|
||||
This buyer has already made a reservation for this date: Este comprador ya ha hecho una reserva para esta fecha
|
||||
</i18n>
|
||||
|
|
|
@ -22,7 +22,7 @@ const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}
|
|||
const columns = [
|
||||
{
|
||||
align: 'left',
|
||||
label: 'Entry',
|
||||
label: t('Entry'),
|
||||
name: 'entryFk',
|
||||
isTitle: true,
|
||||
isId: true,
|
||||
|
@ -41,29 +41,33 @@ const columns = [
|
|||
create: true,
|
||||
columnClass: 'expand',
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'volume',
|
||||
label: t('Volume'),
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Packaging'),
|
||||
name: 'packagingFk',
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: 'Packing',
|
||||
name: 'packing',
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
<template>
|
||||
<QDialog :maximized="true">
|
||||
<QDialog>
|
||||
<div class="container">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
|
@ -78,13 +82,13 @@ const columns = [
|
|||
auto-load
|
||||
>
|
||||
<template #column-entryFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
<span class="link">
|
||||
{{ row?.entryFk }}
|
||||
<EntryDescriptorProxy :id="row.entryFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-itemName="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
<span class="link">
|
||||
{{ row?.itemName }}
|
||||
<ItemDescriptorProxy :id="row.itemFk" />
|
||||
</span>
|
||||
|
@ -93,14 +97,18 @@ const columns = [
|
|||
</div>
|
||||
</QDialog>
|
||||
</template>
|
||||
<style lang="css">
|
||||
.q-dialog__inner {
|
||||
<style lang="css" scoped>
|
||||
.container {
|
||||
max-width: 50vw;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: auto;
|
||||
background-color: var(--vn-section-color);
|
||||
padding: 4px;
|
||||
}
|
||||
.container > div > div > .q-table__top.relative-position.row.items-center {
|
||||
background-color: red !important;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
|
@ -110,4 +118,9 @@ const columns = [
|
|||
Bought: Comprado
|
||||
More: Más
|
||||
Date: Fecha
|
||||
Entry: Entrada
|
||||
Item: Artículo
|
||||
Name: Nombre
|
||||
Volume: Volumen
|
||||
Packaging: Embalage
|
||||
</i18n>
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
<script setup>
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import axios from 'axios';
|
||||
|
||||
const isLoading = ref(false);
|
||||
const dateFrom = ref();
|
||||
const dateTo = ref();
|
||||
|
||||
const optionsTo = computed(() => (date) => {
|
||||
if (!dateFrom.value) return true;
|
||||
return new Date(date) >= new Date(dateFrom.value);
|
||||
});
|
||||
|
||||
watch(dateFrom, (newDateFrom) => {
|
||||
if (dateTo.value && new Date(dateTo.value) < new Date(newDateFrom))
|
||||
dateTo.value = newDateFrom;
|
||||
});
|
||||
|
||||
const recalc = async () => {
|
||||
const { notify } = useNotify();
|
||||
|
||||
const params = {
|
||||
schema: 'bs',
|
||||
params: [new Date(dateFrom.value), new Date(dateTo.value)],
|
||||
};
|
||||
|
||||
try {
|
||||
isLoading.value = true;
|
||||
await axios.post('Applications/waste_addSales/execute-proc', params);
|
||||
notify('wasteRecalc.recalcOk', 'positive');
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="q-pa-lg row justify-center">
|
||||
<QCard class="bg-light" style="width: 300px">
|
||||
<QCardSection>
|
||||
<VnInputDate
|
||||
class="q-mb-lg"
|
||||
v-model="dateFrom"
|
||||
:label="$t('globals.from')"
|
||||
rounded
|
||||
dense
|
||||
/>
|
||||
<VnInputDate
|
||||
class="q-mb-lg"
|
||||
v-model="dateTo"
|
||||
:options="optionsTo"
|
||||
:label="$t('globals.to')"
|
||||
:disable="!dateFrom"
|
||||
rounded
|
||||
dense
|
||||
/>
|
||||
<QBtn
|
||||
color="primary"
|
||||
text-color="white"
|
||||
:label="$t('globals.recalc')"
|
||||
:loading="isLoading"
|
||||
:disable="isLoading || !(dateFrom && dateTo)"
|
||||
@click="recalc()"
|
||||
/>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
</div>
|
||||
</template>
|
|
@ -9,22 +9,27 @@ import VnTable from 'components/VnTable/VnTable.vue';
|
|||
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
const params = {
|
||||
daysOnward: 7,
|
||||
daysAgo: 3,
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: t('customer.extendedList.tableVisibleColumns.id'),
|
||||
label: t('myEntries.id'),
|
||||
columnFilter: false,
|
||||
isTitle: true,
|
||||
},
|
||||
{
|
||||
visible: false,
|
||||
align: 'right',
|
||||
label: t('shipped'),
|
||||
label: t('myEntries.shipped'),
|
||||
name: 'shipped',
|
||||
columnFilter: {
|
||||
name: 'fromShipped',
|
||||
label: t('fromShipped'),
|
||||
label: t('myEntries.fromShipped'),
|
||||
component: 'date',
|
||||
},
|
||||
format: ({ shipped }) => toDate(shipped),
|
||||
|
@ -32,11 +37,11 @@ const columns = computed(() => [
|
|||
{
|
||||
visible: false,
|
||||
align: 'left',
|
||||
label: t('shipped'),
|
||||
label: t('myEntries.shipped'),
|
||||
name: 'shipped',
|
||||
columnFilter: {
|
||||
name: 'toShipped',
|
||||
label: t('toShipped'),
|
||||
label: t('myEntries.toShipped'),
|
||||
component: 'date',
|
||||
},
|
||||
format: ({ shipped }) => toDate(shipped),
|
||||
|
@ -44,14 +49,14 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'right',
|
||||
label: t('shipped'),
|
||||
label: t('myEntries.shipped'),
|
||||
name: 'shipped',
|
||||
columnFilter: false,
|
||||
format: ({ shipped }) => toDate(shipped),
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
label: t('landed'),
|
||||
label: t('myEntries.landed'),
|
||||
name: 'landed',
|
||||
columnFilter: false,
|
||||
format: ({ landed }) => toDate(landed),
|
||||
|
@ -59,26 +64,36 @@ const columns = computed(() => [
|
|||
|
||||
{
|
||||
align: 'right',
|
||||
label: t('globals.wareHouseIn'),
|
||||
label: t('myEntries.wareHouseIn'),
|
||||
name: 'warehouseInFk',
|
||||
format: (row) => row.warehouseInName,
|
||||
format: (row) => {
|
||||
row.warehouseInName;
|
||||
},
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
name: 'warehouseInFk',
|
||||
label: t('myEntries.warehouseInFk'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'warehouses',
|
||||
fields: ['id', 'name'],
|
||||
optionLabel: 'name',
|
||||
optionValue: 'id',
|
||||
alias: 't',
|
||||
},
|
||||
alias: 't',
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('globals.daysOnward'),
|
||||
name: 'days',
|
||||
label: t('myEntries.daysOnward'),
|
||||
name: 'daysOnward',
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('myEntries.daysAgo'),
|
||||
name: 'daysAgo',
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
|
@ -88,6 +103,7 @@ const columns = computed(() => [
|
|||
{
|
||||
title: t('printLabels'),
|
||||
icon: 'print',
|
||||
isPrimary: true,
|
||||
action: (row) => printBuys(row.id),
|
||||
},
|
||||
],
|
||||
|
@ -114,9 +130,11 @@ const printBuys = (rowId) => {
|
|||
data-key="myEntriesList"
|
||||
url="Entries/filter"
|
||||
:columns="columns"
|
||||
:user-params="params"
|
||||
default-mode="card"
|
||||
order="shipped DESC"
|
||||
auto-load
|
||||
chip-locale="myEntries"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -6,9 +6,17 @@ entryFilter:
|
|||
filter:
|
||||
search: General search
|
||||
reference: Reference
|
||||
landed: Landed
|
||||
shipped: Shipped
|
||||
fromShipped: Shipped(from)
|
||||
toShipped: Shipped(to)
|
||||
printLabels: Print stickers
|
||||
viewLabel: View sticker
|
||||
myEntries:
|
||||
id: ID
|
||||
landed: Landed
|
||||
shipped: Shipped
|
||||
fromShipped: Shipped(from)
|
||||
toShipped: Shipped(to)
|
||||
printLabels: Print stickers
|
||||
viewLabel: View sticker
|
||||
wareHouseIn: Warehouse in
|
||||
warehouseInFk: Warehouse in
|
||||
daysOnward: Days onward
|
||||
daysAgo: Days ago
|
||||
wasteRecalc:
|
||||
recalcOk: The wastes were successfully recalculated
|
||||
|
|
|
@ -9,10 +9,17 @@ entryFilter:
|
|||
filter:
|
||||
search: Búsqueda general
|
||||
reference: Referencia
|
||||
|
||||
landed: F. llegada
|
||||
shipped: F. salida
|
||||
fromShipped: F. salida(desde)
|
||||
toShipped: F. salida(hasta)
|
||||
printLabels: Imprimir etiquetas
|
||||
viewLabel: Ver etiqueta
|
||||
myEntries:
|
||||
id: ID
|
||||
landed: F. llegada
|
||||
shipped: F. salida
|
||||
fromShipped: F. salida(desde)
|
||||
toShipped: F. salida(hasta)
|
||||
printLabels: Imprimir etiquetas
|
||||
viewLabel: Ver etiqueta
|
||||
wareHouseIn: Alm. entrada
|
||||
warehouseInFk: Alm. entrada
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
wasteRecalc:
|
||||
recalcOk: Se han recalculado las mermas correctamente
|
||||
|
|
|
@ -274,10 +274,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
:label="t('invoiceIn.summary.company')"
|
||||
:value="entity.company?.code"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.booked')"
|
||||
:value="invoiceIn?.isBooked"
|
||||
/>
|
||||
<VnLv :label="t('invoiceIn.isBooked')" :value="invoiceIn?.isBooked" />
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
|
|
|
@ -116,7 +116,7 @@ const activities = ref([]);
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
:label="t('params.isBooked')"
|
||||
:label="t('invoiceIn.isBooked')"
|
||||
v-model="params.isBooked"
|
||||
@update:model-value="searchFn()"
|
||||
toggle-indeterminate
|
||||
|
@ -170,7 +170,7 @@ es:
|
|||
awb: AWB
|
||||
amount: Importe
|
||||
issued: Emitida
|
||||
isBooked: Conciliada
|
||||
isBooked: Contabilizada
|
||||
account: Cuenta contable
|
||||
created: Creada
|
||||
dued: Vencida
|
||||
|
|
|
@ -65,7 +65,7 @@ const cols = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'isBooked',
|
||||
label: t('invoiceIn.list.isBooked'),
|
||||
label: t('invoiceIn.isBooked'),
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
invoiceIn:
|
||||
serial: Serial
|
||||
isBooked: Is booked
|
||||
list:
|
||||
ref: Reference
|
||||
supplier: Supplier
|
||||
|
@ -7,7 +8,6 @@ invoiceIn:
|
|||
serial: Serial
|
||||
file: File
|
||||
issued: Issued
|
||||
isBooked: Is booked
|
||||
awb: AWB
|
||||
amount: Amount
|
||||
card:
|
||||
|
@ -31,7 +31,6 @@ invoiceIn:
|
|||
sage: Sage withholding
|
||||
vat: Undeductible VAT
|
||||
company: Company
|
||||
booked: Booked
|
||||
expense: Expense
|
||||
taxableBase: Taxable base
|
||||
rate: Rate
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
invoiceIn:
|
||||
serial: Serie
|
||||
isBooked: Contabilizada
|
||||
list:
|
||||
ref: Referencia
|
||||
supplier: Proveedor
|
||||
|
@ -7,7 +8,6 @@ invoiceIn:
|
|||
shortIssued: F. emisión
|
||||
file: Fichero
|
||||
issued: Fecha emisión
|
||||
isBooked: Conciliada
|
||||
awb: AWB
|
||||
amount: Importe
|
||||
card:
|
||||
|
@ -31,7 +31,6 @@ invoiceIn:
|
|||
sage: Retención sage
|
||||
vat: Iva no deducible
|
||||
company: Empresa
|
||||
booked: Contabilizada
|
||||
expense: Gasto
|
||||
taxableBase: Base imp.
|
||||
rate: Tasa
|
||||
|
|
|
@ -9,7 +9,6 @@ import RefundInvoiceForm from 'src/components/RefundInvoiceForm.vue';
|
|||
import SendEmailDialog from 'components/common/SendEmailDialog.vue';
|
||||
|
||||
import useNotify from 'src/composables/useNotify';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
|
@ -30,8 +29,6 @@ const $props = defineProps({
|
|||
|
||||
const { notify } = useNotify();
|
||||
const router = useRouter();
|
||||
const session = useSession();
|
||||
const token = session.getToken();
|
||||
const { t } = useI18n();
|
||||
const { openReport, sendEmail } = usePrintService();
|
||||
const { openConfirmationModal } = useVnConfirm();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import InvoiceOutDescriptor from './InvoiceOutDescriptor.vue';
|
||||
import InvoiceOutSummary from './InvoiceOutSummary.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -10,6 +11,10 @@ const $props = defineProps({
|
|||
</script>
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<InvoiceOutDescriptor v-if="$props.id" :id="$props.id" />
|
||||
<InvoiceOutDescriptor
|
||||
v-if="$props.id"
|
||||
:id="$props.id"
|
||||
:summary="InvoiceOutSummary"
|
||||
/>
|
||||
</QPopupProxy>
|
||||
</template>
|
||||
|
|
|
@ -78,7 +78,7 @@ const ticketsColumns = ref([
|
|||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'quantity',
|
||||
name: 'nickname',
|
||||
label: t('invoiceOut.summary.nickname'),
|
||||
field: (row) => row.nickname,
|
||||
sortable: true,
|
||||
|
@ -172,11 +172,11 @@ const ticketsColumns = ref([
|
|||
</QBtn>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-quantity="{ value, row }">
|
||||
<template #body-cell-nickname="{ value, row }">
|
||||
<QTd>
|
||||
<QBtn class="no-uppercase link" flat dense>
|
||||
{{ value }}
|
||||
<CustomerDescriptorProxy :id="row.id" />
|
||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||
</QBtn>
|
||||
</QTd>
|
||||
</template>
|
||||
|
|
|
@ -15,25 +15,10 @@ const props = defineProps({
|
|||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const workers = ref();
|
||||
const workersCopy = ref();
|
||||
const states = ref();
|
||||
|
||||
function setWorkers(data) {
|
||||
workers.value = data;
|
||||
workersCopy.value = data;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData url="ClaimStates" @on-fetch="(data) => (states = data)" auto-load />
|
||||
<FetchData
|
||||
url="Workers/activeWithInheritedRole"
|
||||
:filter="{ where: { role: 'salesPerson' } }"
|
||||
@on-fetch="setWorkers"
|
||||
auto-load
|
||||
/>
|
||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
|
|
|
@ -13,6 +13,8 @@ import { toCurrency, toDate } from 'src/filters/index';
|
|||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { QBtn } from 'quasar';
|
||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import InvoiceOutFilter from './InvoiceOutFilter.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const stateStore = useStateStore();
|
||||
|
@ -27,13 +29,16 @@ const { openReport } = usePrintService();
|
|||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
name: 'id',
|
||||
label: t('invoiceOutList.tableVisibleColumns.id'),
|
||||
chip: {
|
||||
condition: () => true,
|
||||
},
|
||||
isId: true,
|
||||
columnFilter: {
|
||||
name: 'search',
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -179,6 +184,11 @@ watchEffect(selectedRows);
|
|||
:label="t('searchInvoice')"
|
||||
data-key="invoiceOut"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<InvoiceOutFilter data-key="invoiceOut" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnSubToolbar>
|
||||
<template #st-actions>
|
||||
<QBtn
|
||||
|
@ -203,6 +213,7 @@ watchEffect(selectedRows);
|
|||
active: true,
|
||||
},
|
||||
}"
|
||||
:right-search="false"
|
||||
v-model:selected="selectedRows"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
|
|
|
@ -9,6 +9,7 @@ import { useArrayData } from 'src/composables/useArrayData';
|
|||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import TicketDescriptorProxy from '../Ticket/Card/TicketDescriptorProxy.vue';
|
||||
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
|
@ -64,7 +65,8 @@ const columns = computed(() => [
|
|||
cardVisible: true,
|
||||
attrs: {
|
||||
url: 'Clients',
|
||||
fields: ['id', 'name'],
|
||||
optionLabel: 'socialName',
|
||||
optionValue: 'socialName',
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
|
@ -168,7 +170,6 @@ const downloadCSV = async () => {
|
|||
}
|
||||
}
|
||||
"
|
||||
:limit="0"
|
||||
:columns="columns"
|
||||
auto-load
|
||||
:is-editable="false"
|
||||
|
@ -192,10 +193,33 @@ const downloadCSV = async () => {
|
|||
<WorkerDescriptorProxy :id="row.comercialId" />
|
||||
</span>
|
||||
</template>
|
||||
<template #moreFilterPanel="{ params }">
|
||||
<VnInputDate
|
||||
:label="t('params.from')"
|
||||
v-model="params.from"
|
||||
class="q-px-xs q-pr-lg"
|
||||
filled
|
||||
dense
|
||||
/>
|
||||
<VnInputDate
|
||||
:label="t('params.to')"
|
||||
v-model="params.to"
|
||||
class="q-px-xs q-pr-lg"
|
||||
filled
|
||||
dense
|
||||
/>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Download as CSV: Descargar como CSV
|
||||
params:
|
||||
from: Desde
|
||||
to: Hasta
|
||||
en:
|
||||
params:
|
||||
from: From
|
||||
to: To
|
||||
</i18n>
|
||||
|
|
|
@ -171,7 +171,6 @@ const insertTag = (rows) => {
|
|||
<QBtn
|
||||
@click="insertTag(rows)"
|
||||
class="cursor-pointer"
|
||||
:disable="!validRow"
|
||||
color="primary"
|
||||
flat
|
||||
icon="add"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue