Compare commits
746 Commits
warning_de
...
dev
Author | SHA1 | Date |
---|---|---|
Jon Elias | 909e6674d6 | |
Jon Elias | 0fe63abba6 | |
PAU ROVIRA ROSALENY | 5ae5cec9f9 | |
PAU ROVIRA ROSALENY | a09f430c60 | |
Jon Elias | 0fcd969c97 | |
Jon Elias | e710d45011 | |
Carlos Satorres | ccff995680 | |
Carlos Satorres | d94cd801cc | |
PAU ROVIRA ROSALENY | 4eebfd8769 | |
PAU ROVIRA ROSALENY | 39d6e818f5 | |
PAU ROVIRA ROSALENY | f69ed548f0 | |
Jon Elias | f6439ed356 | |
Jon Elias | fea59a729e | |
Jon Elias | c2a6dd7979 | |
PAU ROVIRA ROSALENY | 5b2987c95e | |
PAU ROVIRA ROSALENY | bd2db2ef58 | |
Jon Elias | 4246275759 | |
Jon Elias | f70dd41a37 | |
PAU ROVIRA ROSALENY | 023593eb45 | |
Jon Elias | 67872aca10 | |
Jon Elias | 59ca61c96f | |
PAU ROVIRA ROSALENY | e5a449c80c | |
PAU ROVIRA ROSALENY | 0de8af81d3 | |
PAU ROVIRA ROSALENY | 6cd0df04e6 | |
PAU ROVIRA ROSALENY | e13f46613f | |
Jorge Penadés | f3042b0326 | |
Jorge Penadés | b383efd99a | |
Jon Elias | 22ae08863b | |
PAU ROVIRA ROSALENY | 374118133a | |
Jon Elias | 788c6e8b61 | |
Jon Elias | 7547461282 | |
Jon Elias | ed211ba14b | |
PAU ROVIRA ROSALENY | 860f92cb42 | |
PAU ROVIRA ROSALENY | b2414f861b | |
PAU ROVIRA ROSALENY | 42e46a88fb | |
Jorge Penadés | c0e3a14e8b | |
Jorge Penadés | 7759a49f3a | |
PAU ROVIRA ROSALENY | 0d7d60a1e8 | |
PAU ROVIRA ROSALENY | 3e8b35e2e1 | |
PAU ROVIRA ROSALENY | 47603d1315 | |
PAU ROVIRA ROSALENY | 983b91fbdd | |
PAU ROVIRA ROSALENY | f6fc19f210 | |
PAU ROVIRA ROSALENY | ed0f33dbc5 | |
Carlos Satorres | 962ae4ca96 | |
Jon Elias | caffb672bc | |
Jon Elias | 6522df24b4 | |
Javier Segarra | b90f6b037c | |
Jon Elias | 71b5b8d47a | |
Javier Segarra | 68d1e1662e | |
Javier Segarra | dd3059b609 | |
Javier Segarra | ae0f08b2c6 | |
Javier Segarra | ebf2345fea | |
Javier Segarra | 96b05de066 | |
Javier Segarra | b7a841d998 | |
Javier Segarra | 8c680b375a | |
Javier Segarra | dc65f7ad20 | |
Javier Segarra | b87191c4d9 | |
Alex Moreno | f3854d9682 | |
Alex Moreno | c9adf048cc | |
Jon Elias | 8ada6bd3e3 | |
Jon Elias | 613ebc0eb4 | |
Carlos Satorres | d6338f1988 | |
Javier Segarra | 2fb7db051c | |
Javier Segarra | 2be0f515c8 | |
Carlos Satorres | 6d1767207c | |
Carlos Satorres | 19769b1a8b | |
Carlos Satorres | 2baa7c02f0 | |
PAU ROVIRA ROSALENY | 9c790f734c | |
PAU ROVIRA ROSALENY | 2dbda38ae7 | |
PAU ROVIRA ROSALENY | 95f96d7ebd | |
Javi Gallego | 88e040411f | |
PAU ROVIRA ROSALENY | a013152a09 | |
Javi Gallego | c30070f212 | |
Javi Gallego | 36554f9f32 | |
Javi Gallego | 63fc09ad1c | |
Javier Segarra | d749f52771 | |
Javier Segarra | 01c4553e5f | |
Jose Antonio Tubau | e1c70f9302 | |
PAU ROVIRA ROSALENY | 1a3446dd07 | |
Jon Elias | a8b28de2a4 | |
Jon Elias | db99a22254 | |
Jose Antonio Tubau | 0d9bb8af1d | |
PAU ROVIRA ROSALENY | 7748df1384 | |
Jorge Penadés | 30f61f970b | |
Carlos Satorres | 0c6da68962 | |
Carlos Satorres | 39d31ec330 | |
Carlos Satorres | 4132bb2b46 | |
Carlos Satorres | 067ecbf2dc | |
Alex Moreno | ff813dc97a | |
Alex Moreno | ad5056a783 | |
Alex Moreno | 5c761ca111 | |
Carlos Satorres | 4034320ff7 | |
Carlos Satorres | c64aad02e1 | |
Jon Elias | 802af41a10 | |
Javier Segarra | fa5bdfc5f6 | |
Jon Elias | 9991c4a462 | |
PAU ROVIRA ROSALENY | b2a345cf58 | |
PAU ROVIRA ROSALENY | 19994e0772 | |
Jorge Penadés | 02494d4bed | |
Jorge Penadés | 01e9ae2dce | |
Javi Gallego | c67baccaea | |
Carlos Satorres | 879373209e | |
Jose Antonio Tubau | c4dcac8c00 | |
Jon Elias | 55ac9e9329 | |
Jose Antonio Tubau | cc07d42de8 | |
Jose Antonio Tubau | f385dd4e83 | |
Javier Segarra | 3a8c35521e | |
Jon Elias | 15487bfbf2 | |
Alex Moreno | 01e726c6f7 | |
Alex Moreno | b26bdd861b | |
Jon Elias | 511f7ea283 | |
Jon Elias | 4ecce6af0a | |
Alex Moreno | 0f1d13e961 | |
Alex Moreno | 5d6c14f4d7 | |
Jose Antonio Tubau | f9c874df2c | |
PAU ROVIRA ROSALENY | 2f19f093cb | |
Jose Antonio Tubau | 6a17f87050 | |
Alex Moreno | afee23b99d | |
Jon Elias | 2f283d1a78 | |
Alex Moreno | a0a7ef6734 | |
Alex Moreno | 8b916016c6 | |
Jose Antonio Tubau | 9121929359 | |
Javier Segarra | e923ebcc72 | |
Javi Gallego | de6b4f1951 | |
Javi Gallego | d64c9e2a34 | |
Alex Moreno | d3e6462aed | |
Alex Moreno | a5ea756bc2 | |
Alex Moreno | b0420ee2b0 | |
Javier Segarra | ba3f6a79e6 | |
Javier Segarra | b266c44d34 | |
Javier Segarra | 8cbb97af29 | |
Javier Segarra | 0916afbe37 | |
Javier Segarra | 9dd216269a | |
Javier Segarra | d1ba6e580f | |
Javier Segarra | 13cd59c6bb | |
Jon Elias | 3aa8acf02a | |
Jon Elias | 0db556a97b | |
Jon Elias | 8642089bc7 | |
Robert Ferrús | 73f421f19e | |
Robert Ferrús | 2cc04da76c | |
Robert Ferrús | a5ea7ab104 | |
Carlos Satorres | 23f889af07 | |
Robert Ferrús | a34c6e1ecf | |
Robert Ferrús | a251053a84 | |
Alex Moreno | 24266b53d5 | |
Alex Moreno | 6b87402a6a | |
Jon Elias | 5927a60de2 | |
Jon Elias | b69f3a08be | |
Robert Ferrús | 9472f13695 | |
Alex Moreno | d292395bb7 | |
Jon Elias | 9c50079bfc | |
Alex Moreno | 02da97a8df | |
Jon Elias | 7121dc4e0d | |
Jon Elias | 2027c365fa | |
Alex Moreno | f2832d71de | |
Jon Elias | 376323652b | |
Jon Elias | 932457fcde | |
Jon Elias | 6696bc8841 | |
Alex Moreno | 6fee57be87 | |
Alex Moreno | e7628d3e4b | |
Jon Elias | 3334349163 | |
Alex Moreno | b47d022f94 | |
Alex Moreno | 431a68a0ad | |
Jose Antonio Tubau | 8d4dc5d9e1 | |
Robert Ferrús | 9deb5bceea | |
Jon Elias | 2b3ca85af4 | |
Jon Elias | f6494a077e | |
Robert Ferrús | 75ba4d4fd9 | |
Alex Moreno | 764bd3915e | |
Alex Moreno | 45982a8a7d | |
Alex Moreno | 8bb0923c8b | |
Alex Moreno | 83ab3eb31e | |
Alex Moreno | 1322dad63d | |
Alex Moreno | 2cd4058c1e | |
Alex Moreno | a1eda5350f | |
Alex Moreno | 198db0df49 | |
Alex Moreno | be3f853b14 | |
Alex Moreno | 6a9bbd93e8 | |
Robert Ferrús | 421b54cebe | |
Robert Ferrús | eaf5f491eb | |
Alex Moreno | f7e0fbf728 | |
Robert Ferrús | 26643fb158 | |
Alex Moreno | 34bf15c573 | |
Javier Segarra | 0aa9975535 | |
Javier Segarra | 24c62b4533 | |
Javier Segarra | 94d471e20f | |
Javier Segarra | 0c714d2c04 | |
Jorge Penadés | cbcb2f2c71 | |
Jorge Penadés | 04a6a49565 | |
Jorge Penadés | 8d8944afb3 | |
Jose Antonio Tubau | 22ed652b9e | |
Jose Antonio Tubau | 023a3b541a | |
Javier Segarra | c556a8b82d | |
Javier Segarra | fb5b347bb6 | |
Jon Elias | d4d03c160b | |
Robert Ferrús | 935b382ef2 | |
Robert Ferrús | b2e54e1f7f | |
Alex Moreno | 8b4dc73a2c | |
Jon Elias | 13b0becb6e | |
Robert Ferrús | c465286718 | |
Robert Ferrús | fb18d5eace | |
Alex Moreno | 3ef82599ce | |
Alex Moreno | f7b1d7bd37 | |
Robert Ferrús | 9269d17e85 | |
Alex Moreno | 658747d479 | |
Alex Moreno | 16ca18c945 | |
Alex Moreno | 4476df4608 | |
Alex Moreno | ae96349cff | |
Alex Moreno | a8a74cdb48 | |
Alex Moreno | 28905063b2 | |
Alex Moreno | 661f7bacd6 | |
Alex Moreno | cfcbb8bce5 | |
Alex Moreno | 1dc19a6eaa | |
Alex Moreno | 6ff1ae96d5 | |
Alex Moreno | cbf7ef7ccf | |
Alex Moreno | c6f613c5e5 | |
Robert Ferrús | 2ee3ba5251 | |
Alex Moreno | 221dda174a | |
Alex Moreno | 10448b9d77 | |
Alex Moreno | 6e588278d8 | |
Alex Moreno | 1455d8ce02 | |
Alex Moreno | e38e9b1dd7 | |
Alex Moreno | 8e3fad60c0 | |
Carlos Satorres | 227d3a8c88 | |
Jon Elias | 26bc5401f1 | |
Javier Segarra | a3acb3b190 | |
Alex Moreno | 55d86d3153 | |
Alex Moreno | e6279ff261 | |
Alex Moreno | d0176303da | |
Javier Segarra | 2c6d3de784 | |
Javier Segarra | c61e4d30f6 | |
Alex Moreno | 5b448e5bb3 | |
Jose Antonio Tubau | 878845627a | |
Javier Segarra | f0dc7b4a41 | |
Javier Segarra | bddfd91de1 | |
Javier Segarra | d9cc35280b | |
Javier Segarra | 58fd5a8326 | |
Alex Moreno | 23e1a58f28 | |
Alex Moreno | e53990d880 | |
Jon Elias | 3a20752ed3 | |
Jon Elias | 2298d4582f | |
Javier Segarra | d5ea4fb46d | |
Javier Segarra | 00c90b29e9 | |
Javier Segarra | f4adedb4f1 | |
Jon Elias | 867ac12042 | |
Jon Elias | 3453e1007b | |
Jon Elias | c59bc170a6 | |
Jon Elias | b67a6d5d75 | |
Jose Antonio Tubau | 5bb165757a | |
Jose Antonio Tubau | 9b3ebff1c7 | |
Jose Antonio Tubau | ff6e1c178d | |
Jose Antonio Tubau | 99df3c5df2 | |
Jon Elias | ac998d33aa | |
Javier Segarra | 31a5dd653c | |
Carlos Satorres | c77a462cb6 | |
Robert Ferrús | a0f4b74422 | |
PAU ROVIRA ROSALENY | 6cba927ebc | |
PAU ROVIRA ROSALENY | 5930985f0b | |
PAU ROVIRA ROSALENY | cd5654d91e | |
PAU ROVIRA ROSALENY | f01ed28d95 | |
Robert Ferrús | bf4faa88a1 | |
Carlos Satorres | 1ee8b68fce | |
Carlos Satorres | b7e71044b0 | |
Carlos Satorres | c8fe115fec | |
Robert Ferrús | c3b4856125 | |
Robert Ferrús | b9c7baa136 | |
Robert Ferrús | 961c9a6973 | |
Robert Ferrús | 1b567f8fa0 | |
Robert Ferrús | 2ffcb6dfe8 | |
Jon Elias | 8c46ee45c2 | |
Jon Elias | 807567cede | |
Jon Elias | 4c7a730d08 | |
Alex Moreno | e024d37f77 | |
PAU ROVIRA ROSALENY | 2070a142fd | |
PAU ROVIRA ROSALENY | c8bbb7c08b | |
Alex Moreno | f9dd927292 | |
Alex Moreno | a0895488b4 | |
Alex Moreno | f86dc7b60f | |
Alex Moreno | 58edd511dc | |
Jose Antonio Tubau | 2068fa4795 | |
PAU ROVIRA ROSALENY | 9f439a686f | |
PAU ROVIRA ROSALENY | b4741c9e6b | |
Alex Moreno | fc886c2a8b | |
Alex Moreno | a58f31f7d8 | |
Jon Elias | 81718c0c4d | |
Carlos Satorres | 7144bb3871 | |
Javier Segarra | 3ef43531c3 | |
Javier Segarra | 0658785a9a | |
PAU ROVIRA ROSALENY | a6adec0407 | |
PAU ROVIRA ROSALENY | d361ecd514 | |
Alex Moreno | 273d086154 | |
Alex Moreno | a8870ec46a | |
PAU ROVIRA ROSALENY | ffe17751d9 | |
Javier Segarra | 88ce527bf1 | |
PAU ROVIRA ROSALENY | f94c457263 | |
PAU ROVIRA ROSALENY | ea4a46d9c7 | |
Alex Moreno | 0b17da1b76 | |
Alex Moreno | 675820eff6 | |
Jon Elias | 3b0d0afddb | |
Javier Segarra | 48a1f89399 | |
Javier Segarra | c19f49dcdd | |
Alex Moreno | 650a5409b1 | |
Alex Moreno | 155b8b3743 | |
Alex Moreno | 1bbee11ec0 | |
Javier Segarra | 8dc277ec2a | |
Alex Moreno | 467cd8faf7 | |
Jon Elias | 6b84f24a08 | |
Jon Elias | 82010f1684 | |
Jon Elias | bb2c3fef51 | |
Jon Elias | f536d08317 | |
Alex Moreno | 18737878a0 | |
Alex Moreno | ba8db3b73f | |
Jose Antonio Tubau | d499565ca3 | |
Jose Antonio Tubau | 47cb1c2586 | |
Alex Moreno | 092745a069 | |
Alex Moreno | 9cd56bb33d | |
Robert Ferrús | 9d77c0bc93 | |
Robert Ferrús | 13290aa44b | |
Javier Segarra | 1ec91add8e | |
Robert Ferrús | db54277bc0 | |
PAU ROVIRA ROSALENY | d33909ad01 | |
PAU ROVIRA ROSALENY | 2aa7177449 | |
PAU ROVIRA ROSALENY | 4f31e7c553 | |
Robert Ferrús | 29f7bb1038 | |
Javier Segarra | 390c530d39 | |
Javier Segarra | 023d232ab5 | |
Javier Segarra | 44c7b87726 | |
Javier Segarra | ae19e8b3c6 | |
Jon Elias | 9e254a0c33 | |
Alex Moreno | fe7b37fd15 | |
Javier Segarra | 7d39211eeb | |
Javier Segarra | b74ee04557 | |
Javier Segarra | 100e3b4d72 | |
Javier Segarra | ea9e099523 | |
Jon Elias | 0659298b5f | |
Jose Antonio Tubau | 5618c1f53a | |
Jon Elias | 4c1631478c | |
PAU ROVIRA ROSALENY | 247701125c | |
Jose Antonio Tubau | 9cdcb63603 | |
Jose Antonio Tubau | d1168c3014 | |
PAU ROVIRA ROSALENY | 95a673a8ed | |
PAU ROVIRA ROSALENY | 1f5823536f | |
PAU ROVIRA ROSALENY | 6758c0a4e0 | |
PAU ROVIRA ROSALENY | 5e6a83c001 | |
Alex Moreno | 7054ad1d40 | |
Alex Moreno | 979c96c5ac | |
Alex Moreno | 5b5eca0606 | |
Javier Segarra | 58edb1007a | |
Javier Segarra | 00cea34dde | |
Alex Moreno | 7bca8a4194 | |
Javier Segarra | 21251a5167 | |
Jon Elias | 627289c58d | |
Alex Moreno | 350dedd78d | |
Jon Elias | a1ef002a24 | |
Jon Elias | 9cb0292361 | |
Jon Elias | 9383a3b4fb | |
Jon Elias | befbbf3f73 | |
Alex Moreno | aee29345a5 | |
Alex Moreno | ed5ce3c459 | |
Javier Segarra | 4e0967a26c | |
Alex Moreno | 5c593697b9 | |
Javier Segarra | b0c23b03fd | |
Javier Segarra | 26e6ceb24d | |
Robert Ferrús | b969824474 | |
Javier Segarra | 61e410aa1d | |
Jon Elias | a6e57127f9 | |
Robert Ferrús | dbd5b8f95f | |
Robert Ferrús | 78745cf7ce | |
Alex Moreno | 57fb85d278 | |
Javier Segarra | fe99bdf3fd | |
Alex Moreno | 1b394e3cac | |
Alex Moreno | b35952928c | |
Javi Gallego | ab0343582e | |
Alex Moreno | 9f280c6089 | |
Alex Moreno | a2499f11e1 | |
Alex Moreno | f3fbfe41bb | |
Robert Ferrús | d4a7a9374a | |
Jon Elias | 28db925645 | |
Alex Moreno | 6c6e4ca950 | |
Javier Segarra | df7ab77225 | |
Jorge Penadés | a0fc8a528c | |
Robert Ferrús | 3a95bdbbf7 | |
Jon Elias | 96d1ef7f68 | |
Jorge Penadés | ae507167b7 | |
PAU ROVIRA ROSALENY | 9dd53855b5 | |
PAU ROVIRA ROSALENY | 0f64477763 | |
PAU ROVIRA ROSALENY | 1fbcd0ccd5 | |
PAU ROVIRA ROSALENY | 402b2882da | |
PAU ROVIRA ROSALENY | e169031c19 | |
Robert Ferrús | b1d18de23e | |
PAU ROVIRA ROSALENY | df403e35e6 | |
PAU ROVIRA ROSALENY | e8cee99b78 | |
Carlos Satorres | 836f40867c | |
Jon Elias | eb1c621066 | |
Jon Elias | b36c53119c | |
Jon Elias | d178a77bc6 | |
Alex Moreno | e9555a6017 | |
Jon Elias | 7c91869c8b | |
Javi Gallego | 23bff237a5 | |
Alex Moreno | e6c16356be | |
Alex Moreno | bee5a1e82d | |
Javi Gallego | 590b4d9ca6 | |
Javi Gallego | 545cb19dce | |
Javi Gallego | d21e11cc3d | |
Javi Gallego | 45c4e08191 | |
Alex Moreno | 1feb26bd6d | |
Alex Moreno | 3cb21d7117 | |
Alex Moreno | 824b60df57 | |
Alex Moreno | 7357559c48 | |
Alex Moreno | 44d3fa7634 | |
Javier Segarra | c86dbcb456 | |
Javier Segarra | 3f753a97e7 | |
Javier Segarra | fb2baa6180 | |
Javier Segarra | 0b52be2568 | |
Javier Segarra | bbac57845a | |
Javier Segarra | 0f8edae458 | |
Jorge Penadés | f8bcc74133 | |
Jorge Penadés | e1b329db34 | |
Jorge Penadés | 0a97d0504b | |
Javi Gallego | 1e5c56e19b | |
Alex Moreno | ce0bfe12d7 | |
Jose Antonio Tubau | 9c6e41d2ae | |
Jose Antonio Tubau | 6f8b04a3ed | |
Jose Antonio Tubau | 096f0c57ba | |
Jon Elias | 84dd46b22c | |
Jon Elias | 5a5adbd165 | |
Jon Elias | 7eadb62af7 | |
Jon Elias | f1fb2f9904 | |
Jorge Penadés | 819a5e2d6e | |
Carlos Satorres | d8edd443c7 | |
Jon Elias | f7a3bdf997 | |
Carlos Satorres | a3fe097970 | |
Jon Elias | 5ed5554495 | |
Carlos Satorres | 77857e9d31 | |
Carlos Satorres | c7b24adc5a | |
Javier Segarra | 1f2746ac18 | |
Jorge Penadés | ff14d81f51 | |
Jorge Penadés | bdae839e50 | |
Carlos Satorres | 6d456f2352 | |
Javier Segarra | c3203b18e7 | |
Carlos Satorres | c333428389 | |
Carlos Satorres | a3cdb18535 | |
Jorge Penadés | ae68f25c3c | |
Jorge Penadés | ff95882e42 | |
Jon Elias | 773c917c20 | |
Carlos Satorres | a1254b25b4 | |
Jon Elias | efb0162f9c | |
Alex Moreno | 58b8b2f7b0 | |
Jorge Penadés | 8843318b66 | |
Alex Moreno | bb3ce4f862 | |
Javier Segarra | 6965c5ea78 | |
Javier Segarra | 06d42ca876 | |
Alex Moreno | 83fb97ad9b | |
Jon Elias | ad2e502010 | |
Jon Elias | b447df7217 | |
Jon Elias | ed0e4fadf8 | |
Jon Elias | 59783c3d3a | |
Jon Elias | 3b9ccab48c | |
Robert Ferrús | b78aa0f29b | |
Robert Ferrús | 6bc6797eba | |
Robert Ferrús | e71018866e | |
Javi Gallego | 579e675a22 | |
Javi Gallego | 9a29e7e2fd | |
Jose Antonio Tubau | 957bc34f00 | |
Javi Gallego | 7e1482dd3a | |
Javi Gallego | 94c0fa2aa7 | |
Jose Antonio Tubau | fcb34c9309 | |
PAU ROVIRA ROSALENY | dd88598072 | |
Jose Antonio Tubau | ae9c293e34 | |
Jose Antonio Tubau | f4ac7c1539 | |
PAU ROVIRA ROSALENY | 57804f9f2d | |
Jose Antonio Tubau | 9d32f6af3b | |
Jon Elias | cce3162816 | |
Jon Elias | 2c607ef8d9 | |
Jose Antonio Tubau | 0a7ac85729 | |
Jose Antonio Tubau | f1fc1e6734 | |
Jose Antonio Tubau | 508b6f226d | |
Jose Antonio Tubau | 833c4e1392 | |
Javier Segarra | 92311accb0 | |
Robert Ferrús | 8d428bbd13 | |
Javier Segarra | 7994f3c791 | |
Robert Ferrús | e25896fa77 | |
Jose Antonio Tubau | 6b90a083cb | |
Jose Antonio Tubau | 3305bb4222 | |
Jose Antonio Tubau | 3729834a86 | |
Javier Segarra | 179f5a684f | |
Javier Segarra | 04bbf9e9d7 | |
Alex Moreno | a738fe1579 | |
Alex Moreno | 94c0cccb1e | |
Alex Moreno | d95350a8eb | |
Javier Segarra | a5a2feb8fd | |
Javier Segarra | 3ab3f146d4 | |
Jorge Penadés | b89293a9a3 | |
Robert Ferrús | f3f4d03c16 | |
Robert Ferrús | 70b872b912 | |
Alex Moreno | 755fca504d | |
Pablo Natek | cc7f16b635 | |
Pablo Natek | 6c2fbea6d5 | |
Robert Ferrús | a6e3fd3480 | |
Jorge Penadés | ee66704a92 | |
PAU ROVIRA ROSALENY | 5fef000e02 | |
Jorge Penadés | e335322d5f | |
Jorge Penadés | 6ca732986d | |
Javi Gallego | 8c7747999d | |
Alex Moreno | b5a1d05ff0 | |
Alex Moreno | b8c8610781 | |
Jon Elias | 802df02581 | |
Alex Moreno | b41d5f19dc | |
Alex Moreno | 885bd631ff | |
Alex Moreno | f645e8982c | |
Robert Ferrús | 8182bf7b91 | |
Alex Moreno | a71da3a45d | |
Javier Segarra | 1befb353a9 | |
Javier Segarra | 0da3bcdf40 | |
Javier Segarra | 2d8dd46d15 | |
Jorge Penadés | 21958cfdb4 | |
Jose Antonio Tubau | b5bdb975b8 | |
Jose Antonio Tubau | 36473d979b | |
Jon Elias | d1be809b76 | |
Robert Ferrús | 764eef13c3 | |
Alex Moreno | 4c7a35f142 | |
Carlos Satorres | 46cdd9e62b | |
Carlos Satorres | 3fc7f34899 | |
Robert Ferrús | 0b9788d38b | |
Carlos Satorres | 38a180f92b | |
Jon Elias | 1f76d572ce | |
Jon Elias | 387c3c7649 | |
Carlos Satorres | 72f141315e | |
Carlos Satorres | 55dda496f3 | |
Pablo Natek | 4183ad3fa0 | |
Pablo Natek | a7fd073886 | |
Javier Segarra | 17f067144c | |
PAU ROVIRA ROSALENY | f8efb9e6e9 | |
PAU ROVIRA ROSALENY | c1e2e434ac | |
Alex Moreno | 2c67041030 | |
Carlos Satorres | 27f8a95e6f | |
Carlos Satorres | 621d038133 | |
Jose Antonio Tubau | e884bab1ea | |
Carlos Satorres | 4dcebc99bf | |
Jon Elias | 9f0d9bca29 | |
Jon Elias | 35e4f91154 | |
PAU ROVIRA ROSALENY | 584e299a8d | |
Carlos Satorres | 64fcf3c824 | |
Jose Antonio Tubau | bc53685765 | |
Jose Antonio Tubau | 771fec7177 | |
Jose Antonio Tubau | bd905ded3a | |
Jose Antonio Tubau | ecfacd4100 | |
Jon Elias | ad4a8beb0a | |
Jose Antonio Tubau | f16e956a53 | |
Jose Antonio Tubau | 0a577e0524 | |
Jose Antonio Tubau | d0e2093a1c | |
Jose Antonio Tubau | 0fdff03715 | |
Carlos Satorres | 3e8c090abd | |
Carlos Satorres | df1defa168 | |
Carlos Satorres | 23fab7d224 | |
PAU ROVIRA ROSALENY | 1966498d66 | |
Javier Segarra | 0a8312a3a8 | |
Javier Segarra | 6855a0efec | |
Javier Segarra | e751233233 | |
Javier Segarra | 449a790427 | |
Javier Segarra | eb008e8330 | |
Javier Segarra | b2b36289c7 | |
Javier Segarra | 06eb72764d | |
Javier Segarra | 3e4934fae1 | |
Javier Segarra | 2f3c5245c0 | |
Javier Segarra | 5af5c518b5 | |
Javier Segarra | 21cc6b3ecd | |
Javier Segarra | 252dd21492 | |
Javier Segarra | a8e1bdc684 | |
Javier Segarra | edceac850d | |
Javier Segarra | fce1068fbb | |
Javier Segarra | 1f1fc4d6b9 | |
Javier Segarra | 9fcea12580 | |
Jon Elias | 547e4847a7 | |
Jon Elias | b52956d27d | |
Jose Antonio Tubau | 1485166fdd | |
Jose Antonio Tubau | 10767615de | |
Robert Ferrús | 51fb940adb | |
Robert Ferrús | 65c2b24b78 | |
Carlos Satorres | 57aa38c84c | |
Alex Moreno | 074bb6c94c | |
Alex Moreno | d0e6c28ea2 | |
Alex Moreno | e9645cf86c | |
Alex Moreno | 06e04e1fb5 | |
Alex Moreno | 168fe4c5b1 | |
Javier Segarra | 7f281b8630 | |
Carlos Satorres | f8428a5591 | |
Carlos Satorres | 5a869f0722 | |
Javier Segarra | 70000e3eca | |
Javier Segarra | 6c96089445 | |
Javi Gallego | 803b8d508d | |
Robert Ferrús | 2246792404 | |
Jon Elias | d75c48df0f | |
Jon Elias | 19e8b948ae | |
Jon Elias | 1091a762de | |
Jon Elias | b48cc55f4b | |
Alex Moreno | fd589ff798 | |
Jon Elias | 9cd8b2e8d6 | |
Jon Elias | 2aff1d3d06 | |
PAU ROVIRA ROSALENY | 4b7b689a6c | |
Jose Antonio Tubau | 278faeb533 | |
Jose Antonio Tubau | 5b6ad1a7c0 | |
Carlos Satorres | f904c8cfd2 | |
Jose Antonio Tubau | e50b8f0094 | |
Jose Antonio Tubau | 3c87882805 | |
Carlos Satorres | 0ae2bbca34 | |
Jose Antonio Tubau | 86e0043fc7 | |
Jose Antonio Tubau | 3e59d7881a | |
Jose Antonio Tubau | eed06282d8 | |
Jose Antonio Tubau | 34cfd57589 | |
Jose Antonio Tubau | b26d1f7945 | |
Jon Elias | 36f44179b2 | |
Robert Ferrús | f922bcb750 | |
Robert Ferrús | 5b10a3e60f | |
Carlos Satorres | 8aba370063 | |
Carlos Satorres | 97140ae813 | |
Carlos Satorres | b479ce83e0 | |
Alex Moreno | cceb906d65 | |
Alex Moreno | f076df8f12 | |
Carlos Satorres | 3e16357878 | |
Jose Antonio Tubau | 37a71f7594 | |
Carlos Satorres | 66db2f0bd7 | |
Carlos Satorres | f139be4fcd | |
Jose Antonio Tubau | 663ca7c25d | |
Carlos Satorres | 3dbace5336 | |
PAU ROVIRA ROSALENY | 4f2e4e1304 | |
PAU ROVIRA ROSALENY | e00d836b50 | |
PAU ROVIRA ROSALENY | f2a8f724ce | |
Carlos Satorres | 63fb45b22d | |
Carlos Satorres | 916842ba93 | |
PAU ROVIRA ROSALENY | bf21c88f00 | |
Carlos Satorres | 9ab6ac9718 | |
Jose Antonio Tubau | 1a90be0561 | |
Alex Moreno | 0fba2ade32 | |
PAU ROVIRA ROSALENY | e0a9a5ca72 | |
PAU ROVIRA ROSALENY | a53ac3d6cc | |
Javier Segarra | cf6cf11179 | |
Javier Segarra | 7b170f05bf | |
Alex Moreno | 268ddb027b | |
Carlos Satorres | 5e0afd215f | |
Jose Antonio Tubau | 7786c1ed64 | |
Jose Antonio Tubau | 89cf61a750 | |
Jose Antonio Tubau | 967e3334ae | |
Jose Antonio Tubau | 531371543e | |
Jose Antonio Tubau | de7906bbf3 | |
Javier Segarra | 0b767ff812 | |
Jose Antonio Tubau | 37a87fa8e1 | |
PAU ROVIRA ROSALENY | a0b19f8e79 | |
Javier Segarra | a86b9067e2 | |
Javier Segarra | 3aa8b568c4 | |
Javier Segarra | 7630e6dfe4 | |
Javier Segarra | 800eac4e24 | |
Javier Segarra | 1a2046be74 | |
Javier Segarra | aaa08b9d2b | |
Javier Segarra | 2c86fb17f1 | |
Javier Segarra | 3ee8ff78ca | |
Carlos Satorres | 950bd5f3a7 | |
Javier Segarra | d92a09e228 | |
Javier Segarra | dae33e4df8 | |
Javier Segarra | 933e092da0 | |
Carlos Satorres | bbd2c86b61 | |
Carlos Satorres | e09bd48e1b | |
Carlos Satorres | 5893c0b9e9 | |
Carlos Satorres | 6b69884c2e | |
Carlos Satorres | 7619a5b4f5 | |
Carlos Satorres | 96e942af11 | |
Carlos Satorres | 3a060c9c6a | |
Javier Segarra | 9ae43244d9 | |
Javier Segarra | 8b3076640d | |
Javier Segarra | 632f7bbdeb | |
Javier Segarra | 9121e79533 | |
Javier Segarra | 34d08e4bfe | |
Javier Segarra | db00be75ad | |
Javier Segarra | 4fc3e1fabb | |
Javier Segarra | a5f41871ae | |
Javier Segarra | 494482b6a8 | |
Javier Segarra | 034148841f | |
Javier Segarra | 43e02ca00e | |
Carlos Satorres | bc9b19e2df | |
Javier Segarra | c0d8bf3a48 | |
Javier Segarra | 0e35b2b2d5 | |
Robert Ferrús | 85b3c3033a | |
Robert Ferrús | 870081677e | |
Carlos Satorres | 51a85343d9 | |
Javier Segarra | 7f5d9c7180 | |
Javier Segarra | aab98e3c45 | |
Robert Ferrús | 8a0b65998e | |
Robert Ferrús | b07286d43d | |
Robert Ferrús | 00b15c1129 | |
Javier Segarra | e3fa756b14 | |
Javier Segarra | c0be47a2e4 | |
Carlos Satorres | cac9a9139f | |
Robert Ferrús | f0f6a7e9a3 | |
Carlos Satorres | 351dc012eb | |
Javier Segarra | 994a22a195 | |
Javier Segarra | e948253bea | |
Javier Segarra | 09804e06c7 | |
Javier Segarra | 78e70f2b69 | |
Javier Segarra | 7325be2366 | |
Carlos Satorres | 640a7d4b14 | |
Carlos Satorres | b57b60dd84 | |
Javier Segarra | 3404bc6d0b | |
Javier Segarra | 218f45c289 | |
Javier Segarra | 7b8093c048 | |
Javier Segarra | da99d82504 | |
Javier Segarra | 8d2ad235fb | |
Javier Segarra | 4d602aadfd | |
Carlos Satorres | 257ec7926e | |
Carlos Satorres | f903432e74 | |
Carlos Satorres | 04d30186c2 | |
Carlos Satorres | f7fb18cf0a | |
Carlos Satorres | 02129591cf | |
Carlos Satorres | bf4d11545d | |
Carlos Satorres | 70847176ca | |
Carlos Satorres | 97ce44242c | |
Carlos Satorres | c75e4cbf95 | |
Carlos Satorres | 60e9accd99 | |
Robert Ferrús | 652e5c1838 | |
Robert Ferrús | a149c37fb2 | |
Robert Ferrús | 1bf754e81a | |
Robert Ferrús | 72d19b2347 | |
Robert Ferrús | 017d7a866d | |
Carlos Satorres | 00cd6feb12 | |
Carlos Satorres | 8f925401d5 | |
Carlos Satorres | 8363f813de | |
Carlos Satorres | 68d1d0dbb0 | |
Carlos Satorres | 0e7abe5fa4 | |
Carlos Satorres | 9c5620f340 | |
Carlos Satorres | 41e1d365f3 | |
Carlos Satorres | b6836fc59e | |
Alex Moreno | 81591b4f67 | |
Alex Moreno | 83a0ec7eb8 | |
Alex Moreno | 8d60754682 | |
Alex Moreno | ba57c2fcd9 | |
Carlos Satorres | 8490f24438 | |
Carlos Satorres | db3ff0416c | |
Carlos Satorres | d7044cfdcc | |
Carlos Satorres | f4792d7921 | |
Carlos Satorres | 960129f86c | |
Carlos Satorres | 6e261b7793 | |
Carlos Satorres | 4b44b9a979 | |
Carlos Satorres | 8f1ddb08b3 | |
Carlos Satorres | 330b1c1ec2 | |
Carlos Satorres | 6205feaca4 | |
Carlos Satorres | 0e691436e9 | |
Carlos Satorres | 81e6870f71 |
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
export default {
|
||||||
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
|
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
|
||||||
// This option interrupts the configuration hierarchy at this file
|
// This option interrupts the configuration hierarchy at this file
|
||||||
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
|
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
|
||||||
|
@ -58,7 +58,7 @@ module.exports = {
|
||||||
rules: {
|
rules: {
|
||||||
'prefer-promise-reject-errors': 'off',
|
'prefer-promise-reject-errors': 'off',
|
||||||
'no-unused-vars': 'warn',
|
'no-unused-vars': 'warn',
|
||||||
"vue/no-multiple-template-root": "off" ,
|
'vue/no-multiple-template-root': 'off',
|
||||||
// allow debugger during development only
|
// allow debugger during development only
|
||||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
},
|
},
|
|
@ -29,5 +29,9 @@ yarn-error.log*
|
||||||
*.sln
|
*.sln
|
||||||
|
|
||||||
# Cypress directories and files
|
# Cypress directories and files
|
||||||
/tests/cypress/videos
|
/test/cypress/videos
|
||||||
/tests/cypress/screenshots
|
/test/cypress/screenshots
|
||||||
|
|
||||||
|
# VitePress directories and files
|
||||||
|
/docs/.vitepress/cache
|
||||||
|
/docs/.vuepress
|
||||||
|
|
|
@ -1,23 +1,24 @@
|
||||||
const fs = require('fs');
|
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
||||||
const path = require('path');
|
import { join, resolve } from 'path';
|
||||||
|
|
||||||
function getCurrentBranchName(p = process.cwd()) {
|
function getCurrentBranchName(p = process.cwd()) {
|
||||||
if (!fs.existsSync(p)) return false;
|
if (!existsSync(p)) return false;
|
||||||
|
|
||||||
const gitHeadPath = path.join(p, '.git', 'HEAD');
|
const gitHeadPath = join(p, '.git', 'HEAD');
|
||||||
|
|
||||||
if (!fs.existsSync(gitHeadPath))
|
if (!existsSync(gitHeadPath)) {
|
||||||
return getCurrentBranchName(path.resolve(p, '..'));
|
return getCurrentBranchName(resolve(p, '..'));
|
||||||
|
}
|
||||||
|
|
||||||
const headContent = fs.readFileSync(gitHeadPath, 'utf-8');
|
const headContent = readFileSync(gitHeadPath, 'utf-8');
|
||||||
return headContent.trim().split('/')[2];
|
return headContent.trim().split('/')[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
const branchName = getCurrentBranchName();
|
const branchName = getCurrentBranchName();
|
||||||
|
|
||||||
if (branchName) {
|
if (branchName) {
|
||||||
const msgPath = `.git/COMMIT_EDITMSG`;
|
const msgPath = '.git/COMMIT_EDITMSG';
|
||||||
const msg = fs.readFileSync(msgPath, 'utf-8');
|
const msg = readFileSync(msgPath, 'utf-8');
|
||||||
const reference = branchName.match(/^\d+/);
|
const reference = branchName.match(/^\d+/);
|
||||||
|
|
||||||
const referenceTag = `refs #${reference}`;
|
const referenceTag = `refs #${reference}`;
|
||||||
|
@ -26,8 +27,7 @@ if (branchName) {
|
||||||
|
|
||||||
if (splitedMsg.length > 1) {
|
if (splitedMsg.length > 1) {
|
||||||
const finalMsg = splitedMsg[0] + ': ' + referenceTag + splitedMsg.slice(1).join(':');
|
const finalMsg = splitedMsg[0] + ': ' + referenceTag + splitedMsg.slice(1).join(':');
|
||||||
fs.writeFileSync(msgPath, finalMsg);
|
writeFileSync(msgPath, finalMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
export default {
|
||||||
singleQuote: true,
|
singleQuote: true,
|
||||||
printWidth: 90,
|
printWidth: 90,
|
||||||
tabWidth: 4,
|
tabWidth: 4,
|
||||||
|
|
154
CHANGELOG.md
154
CHANGELOG.md
|
@ -1,3 +1,157 @@
|
||||||
|
# Version 25.04 - 2025-01-28
|
||||||
|
|
||||||
|
### Added 🆕
|
||||||
|
|
||||||
|
- chore: add task comment by:jorgep
|
||||||
|
- chore: refs #8198 rollback by:jorgep
|
||||||
|
- chore: refs #8322 unnecessary prop by:alexm
|
||||||
|
- feat: refs #7055 added new test case by:provira
|
||||||
|
- feat: refs #7055 created FilterItemForm test by:provira
|
||||||
|
- feat: refs #7077 created test for VnInputTime by:provira
|
||||||
|
- feat: refs #7078 created test for VnJsonValue by:provira
|
||||||
|
- feat: refs #7087 added more test cases by:provira
|
||||||
|
- feat: refs #7087 added new test by:provira
|
||||||
|
- feat: refs #7087 created CardSummary test by:provira
|
||||||
|
- feat: refs #7088 created test for FetchedTags by:provira
|
||||||
|
- feat: refs #7202 added new field by:Jon
|
||||||
|
- feat: refs #7882 Added coords to create a address by:guillermo
|
||||||
|
- feat: refs #7957 add tooltip and i18n support for search link in VnSearchbar component by:jorgep
|
||||||
|
- feat: refs #7957 enhance search functionality and improve data filtering logic by:jorgep
|
||||||
|
- feat: refs #7957 open in new tab by:jorgep
|
||||||
|
- feat: refs #7957 simplify fn to by:jorgep
|
||||||
|
- feat: refs #7957 update VnSearchbar component with improved search URL handling and styling enhancements by:jorgep
|
||||||
|
- feat: refs #8117 filters and values added as needed by:jtubau
|
||||||
|
- feat: refs #8197 useHasContent and use in VnSection and RightMenu by:alexm
|
||||||
|
- feat: refs #8219 added invoice out e2e tests by:Jon
|
||||||
|
- feat: refs #8219 global invoicing e2e by:Jon
|
||||||
|
- feat: refs #8220 added barcodes e2e test by:Jon
|
||||||
|
- feat: refs #8220 created items e2e by:Jon
|
||||||
|
- feat: refs #8220 modified create item form and added respective e2e by:Jon
|
||||||
|
- feat: refs #8225 added account and invoiceOut modules by:Jon
|
||||||
|
- feat: refs #8225 added entry module and fixed translations by:Jon
|
||||||
|
- feat: refs #8225 added invoiceIn and travel module by:Jon
|
||||||
|
- feat: refs #8225 added moreOptions and use it in customer and ticket summary by:Jon
|
||||||
|
- feat: refs #8225 added route and shelving module by:Jon
|
||||||
|
- feat: refs #8225 added worker and zone modules by:Jon
|
||||||
|
- feat: refs #8225 use it in claim, item and order modules by:Jon
|
||||||
|
- feat: refs #8258 added button to pass to uppercase by:provira
|
||||||
|
- feat: refs #8258 added uppercase option to VnInput by:provira
|
||||||
|
- feat: refs #8258 added uppercase validation on supplier create by:provira
|
||||||
|
- feat: refs #8298 add price optimum input and update translations for bonus and price optimum by:jgallego
|
||||||
|
- feat: refs #8316 add entryFilter prop to VnTable component in EntryList by:jtubau
|
||||||
|
- feat: refs #8322 added department changes by:provira
|
||||||
|
- feat: refs #8372 workerPBX by:robert
|
||||||
|
- feat: refs #8381 add initial and final temperature fields to entry forms and summaries by:jgallego
|
||||||
|
- feat: refs #8381 add initial and final temperature labels in English and Spanish locales by:jgallego
|
||||||
|
- feat: refs #8381 add toCelsius filter and update temperature fields in entry forms and summaries by:jgallego
|
||||||
|
- feat: skip tests by:jorgep
|
||||||
|
- style: refs #7957 update VnSearchbar padding for improved layout by:jorgep
|
||||||
|
|
||||||
|
### Changed 📦
|
||||||
|
|
||||||
|
- perf: refs #8219 #8219 minor change by:Javier Segarra
|
||||||
|
- perf: refs #8220 on-fetch and added missing translations by:Jon
|
||||||
|
- perf: refs #8220 on-fetch by:Jon
|
||||||
|
- perf: refs #8220 translations by:Jon
|
||||||
|
- perf: refs #8220 use searchbar selector in e2e tests by:Jon
|
||||||
|
- perf: remove warning default value by:Javier Segarra
|
||||||
|
- refactor: redirect using params by:Jon
|
||||||
|
- refactor: refs #7077 removed some comments by:provira
|
||||||
|
- refactor: refs #7087 removed unused imports by:provira
|
||||||
|
- refactor: refs #7100 added const mockData by:jtubau
|
||||||
|
- refactor: refs #7100 delete unnecesary set prop by:jtubau
|
||||||
|
- refactor: refs #7100 refactorized with methods by:jtubau
|
||||||
|
- refactor: refs #7957 remove blank by:jorgep
|
||||||
|
- refactor: refs #8198 simplify data fetching and filtering logic by:jorgep
|
||||||
|
- refactor: refs #8198 simplify state management and data fetching in ItemDiary component by:jorgep
|
||||||
|
- refactor: refs #8219 modified e2e tests and fixed some translations by:Jon
|
||||||
|
- refactor: refs #8219 modified list test, created cypress download folder and added to gitignore by:Jon
|
||||||
|
- refactor: refs #8219 requested changes by:Jon
|
||||||
|
- refactor: refs #8219 use checkNotification command by:Jon
|
||||||
|
- refactor: refs #8220 added data-cy for e2e tests by:Jon
|
||||||
|
- refactor: refs #8220 requested changes by:Jon
|
||||||
|
- refactor: refs #8220 skip failling test and modifed tag test by:Jon
|
||||||
|
- refactor: refs #8225 requested changes by:Jon
|
||||||
|
- refactor: refs #8247 use new acl for sysadmin by:Jon
|
||||||
|
- refactor: refs #8316 added claimFilter by:jtubau
|
||||||
|
- refactor: refs #8316 added entryFilter by:jtubau
|
||||||
|
- refactor: refs #8316 add new localization keys and update existing ones for entry components by:jtubau
|
||||||
|
- refactor: refs #8316 moved localizations to local locale by:jtubau
|
||||||
|
- refactor: refs #8316 move order localization by:jtubau
|
||||||
|
- refactor: refs #8316 remove unused OrderSearchbar component by:jtubau
|
||||||
|
- refactor: refs #8316 update EntryCard to use user-filter prop and remove exprBuilder from EntryList by:jtubau
|
||||||
|
- refactor: refs #8316 used VnSection and VnCardBeta by:jtubau
|
||||||
|
- refactor: refs #8322 changed translations by:provira
|
||||||
|
- refactor: refs #8322 changed Worker component to use VnSection/VnCardBeta by:provira
|
||||||
|
- refactor: refs #8322 set department inside worker by:alexm
|
||||||
|
- refactor: skip intermitent failing test by:Jon
|
||||||
|
|
||||||
|
### Fixed 🛠️
|
||||||
|
|
||||||
|
- feat: refs #8225 added entry module and fixed translations by:Jon
|
||||||
|
- fix: added missing translations in InvoiceIn by:provira
|
||||||
|
- fix: changed invoiceIn for InvoiceIn by:provira
|
||||||
|
- fix: changed translations to only use "invoicein" by:provira
|
||||||
|
- fix: department descriptor link by:Jon
|
||||||
|
- fix: e2e tests by:Jon
|
||||||
|
- fix: entry summary view and build warnings by:Jon
|
||||||
|
- fix: fixed InvoiceIn filter translations by:provira
|
||||||
|
- fix: modified setData in customerDescriptor to show the icons by:Jon
|
||||||
|
- fix: redirect to TicketSale from OrderLines (origin/Fix-RedirectToTicketSale) by:Jon
|
||||||
|
- fix: redirect when confirming lines by:Jon
|
||||||
|
- fix: refs #7055 #7055 #7055 fixed some tests by:provira
|
||||||
|
- fix: refs #7077 removed unused imports by:provira
|
||||||
|
- fix: refs #7078 added missing case with array by:provira
|
||||||
|
- fix: refs #7087 fixed some tests by:provira
|
||||||
|
- fix: refs #7088 changed "vm.vm" to "vm" by:provira
|
||||||
|
- fix: refs #7088 changed wrapper to vm by:provira
|
||||||
|
- fix: refs #7699 add icons and hint by:carlossa
|
||||||
|
- fix: refs #7699 add pwd vnInput by:carlossa
|
||||||
|
- fix: refs #7699 fix component by:carlossa
|
||||||
|
- fix: refs #7699 fix password visibility by:carlossa
|
||||||
|
- fix: refs #7699 fix tfront clean code by:carlossa
|
||||||
|
- fix: refs #7699 fix vnChangePassword, clean VnInput by:carlossa
|
||||||
|
- fix: refs #7699 fix vnInputPassword by:carlossa
|
||||||
|
- fix: refs #7957 add missing closing brace by:jorgep
|
||||||
|
- fix: refs #7957 css by:jorgep
|
||||||
|
- fix: refs #7957 rollback by:jorgep
|
||||||
|
- fix: refs #7957 update data-cy by:jorgep
|
||||||
|
- fix: refs #7957 update visibility handling for clear icon in VnInput component by:jorgep
|
||||||
|
- fix: refs #7957 vn-searchbar test by:jorgep
|
||||||
|
- fix: refs #8117 update salesPersonFk filter options and URL for improved data retrieval by:jtubau
|
||||||
|
- fix: refs #8197 not use yet by:alexm
|
||||||
|
- fix: refs #8198 update query param by:jorgep
|
||||||
|
- fix: refs #8219 fixed e2e tests by:Jon
|
||||||
|
- fix: refs #8219 fixed summary and global tests by:Jon
|
||||||
|
- fix: refs #8219 forgotten dataCy by:Jon
|
||||||
|
- fix: refs #8219 global e2e by:Jon
|
||||||
|
- fix: refs #8219 requested changes by:Jon
|
||||||
|
- fix: refs #8220 itemTag test by:Javier Segarra
|
||||||
|
- fix: refs #8225 invoice in translations by:Jon
|
||||||
|
- fix: refs #8243 fixed SkeletonSummary by:provira
|
||||||
|
- fix: refs #8247 conflicts by:Jon
|
||||||
|
- fix: refs #8247 fixed acls and added lost options by:Jon
|
||||||
|
- fix: refs #8316 ref="claimFilterRef" by:alexm
|
||||||
|
- fix: refs #8316 userFilter by:alexm
|
||||||
|
- fix: refs #8316 use rightMenu by:alexm
|
||||||
|
- fix: refs #8316 use section-searchbar by:alexm
|
||||||
|
- fix: refs #8317 disable action buttons when no rows are selected in ItemFixedPrice by:jtubau
|
||||||
|
- fix: refs #8322 unnecessary section by:alexm
|
||||||
|
- fix: refs #8338 fixed VnTable translations by:provira
|
||||||
|
- fix: refs #8338 removed chipLocale property/added more translations by:provira
|
||||||
|
- fix: refs #8448 e2e by:Jon
|
||||||
|
- fix: refs #8448 not use croppie by:alexm
|
||||||
|
- fix: remove departmentCode by:Javier Segarra
|
||||||
|
- fix: removed unused searchbar by:PAU ROVIRA ROSALENY
|
||||||
|
- fix: skip failling e2e by:Jon
|
||||||
|
- fix: sort by name in description by:Jon
|
||||||
|
- fix: translations by:Jon
|
||||||
|
- fix: use entryFilter by:alexm
|
||||||
|
- fix(VnCardBeta): add userFilter by:alexm
|
||||||
|
- refactor: refs #8219 modified e2e tests and fixed some translations by:Jon
|
||||||
|
- revert: revert header by:alexm
|
||||||
|
- test: fix expedition e2e by:alexm
|
||||||
|
|
||||||
# Version 25.00 - 2025-01-14
|
# Version 25.00 - 2025-01-14
|
||||||
|
|
||||||
### Added 🆕
|
### Added 🆕
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
module.exports = { extends: ['@commitlint/config-conventional'] };
|
export default { extends: ['@commitlint/config-conventional'] };
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
const { defineConfig } = require('cypress');
|
import { defineConfig } from 'cypress';
|
||||||
// https://docs.cypress.io/app/tooling/reporters
|
// https://docs.cypress.io/app/tooling/reporters
|
||||||
// https://docs.cypress.io/app/references/configuration
|
// https://docs.cypress.io/app/references/configuration
|
||||||
// https://www.npmjs.com/package/cypress-mochawesome-reporter
|
// https://www.npmjs.com/package/cypress-mochawesome-reporter
|
||||||
|
|
||||||
module.exports = defineConfig({
|
export default defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
baseUrl: 'http://localhost:9000/',
|
baseUrl: 'http://localhost:9000/',
|
||||||
experimentalStudio: true,
|
experimentalStudio: true,
|
||||||
|
@ -30,9 +30,13 @@ module.exports = defineConfig({
|
||||||
testFiles: '**/*.spec.js',
|
testFiles: '**/*.spec.js',
|
||||||
supportFile: 'test/cypress/support/unit.js',
|
supportFile: 'test/cypress/support/unit.js',
|
||||||
},
|
},
|
||||||
setupNodeEvents(on, config) {
|
setupNodeEvents: async (on, config) => {
|
||||||
require('cypress-mochawesome-reporter/plugin')(on);
|
const plugin = await import('cypress-mochawesome-reporter/plugin');
|
||||||
// implement node event listeners here
|
plugin.default(on);
|
||||||
|
|
||||||
|
return config;
|
||||||
},
|
},
|
||||||
|
viewportWidth: 1280,
|
||||||
|
viewportHeight: 720,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
import { defineConfig } from 'vitepress';
|
||||||
|
|
||||||
|
// https://vitepress.dev/reference/site-config
|
||||||
|
export default defineConfig({
|
||||||
|
title: 'Lilium',
|
||||||
|
description: 'Lilium docs',
|
||||||
|
themeConfig: {
|
||||||
|
// https://vitepress.dev/reference/default-theme-config
|
||||||
|
nav: [
|
||||||
|
{ text: 'Home', link: '/' },
|
||||||
|
{ text: 'Components', link: '/components/vnInput' },
|
||||||
|
{ text: 'Composables', link: '/composables/useArrayData' },
|
||||||
|
],
|
||||||
|
|
||||||
|
sidebar: [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: 'Components',
|
||||||
|
collapsible: true,
|
||||||
|
collapsed: true,
|
||||||
|
items: [{ text: 'VnInput', link: '/components/vnInput' }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Composables',
|
||||||
|
collapsible: true,
|
||||||
|
collapsed: true,
|
||||||
|
items: [
|
||||||
|
{ text: 'useArrayData', link: '/composables/useArrayData' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
socialLinks: [{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }],
|
||||||
|
},
|
||||||
|
});
|
|
@ -0,0 +1,136 @@
|
||||||
|
# VnInput
|
||||||
|
|
||||||
|
`VnInput` is a custom input component that provides various useful features such as validation, input clearing, and more.
|
||||||
|
|
||||||
|
## Props
|
||||||
|
|
||||||
|
### `modelValue`
|
||||||
|
|
||||||
|
- **Type:** `String | Number`
|
||||||
|
- **Default:** `null`
|
||||||
|
- **Description:** The value of the model bound to the component.
|
||||||
|
|
||||||
|
### `isOutlined`
|
||||||
|
|
||||||
|
- **Type:** `Boolean`
|
||||||
|
- **Default:** `false`
|
||||||
|
- **Description:** If `true`, the component is rendered with an outlined style.
|
||||||
|
|
||||||
|
### `info`
|
||||||
|
|
||||||
|
- **Type:** `String`
|
||||||
|
- **Default:** `''`
|
||||||
|
- **Description:** Additional information displayed alongside the component.
|
||||||
|
|
||||||
|
### `clearable`
|
||||||
|
|
||||||
|
- **Type:** `Boolean`
|
||||||
|
- **Default:** `true`
|
||||||
|
- **Description:** If `true`, the component shows a button to clear the input.
|
||||||
|
|
||||||
|
### `emptyToNull`
|
||||||
|
|
||||||
|
- **Type:** `Boolean`
|
||||||
|
- **Default:** `true`
|
||||||
|
- **Description:** If `true`, converts empty inputs to `null`.
|
||||||
|
|
||||||
|
### `insertable`
|
||||||
|
|
||||||
|
- **Type:** `Boolean`
|
||||||
|
- **Default:** `false`
|
||||||
|
- **Description:** If `true`, allows the insertion of new values.
|
||||||
|
|
||||||
|
### `maxlength`
|
||||||
|
|
||||||
|
- **Type:** `Number`
|
||||||
|
- **Default:** `null`
|
||||||
|
- **Description:** The maximum number of characters allowed in the input.
|
||||||
|
|
||||||
|
### `uppercase`
|
||||||
|
|
||||||
|
- **Type:** `Boolean`
|
||||||
|
- **Default:** `false`
|
||||||
|
- **Description:** If `true`, converts the input text to uppercase.
|
||||||
|
|
||||||
|
## Emits
|
||||||
|
|
||||||
|
### `update:modelValue`
|
||||||
|
|
||||||
|
- **Description:** Emits the updated model value.
|
||||||
|
- **Behavior:** This event is emitted whenever the input value changes. It is used to update the model value bound to the component.
|
||||||
|
|
||||||
|
### `update:options`
|
||||||
|
|
||||||
|
- **Description:** Emits the updated options.
|
||||||
|
- **Behavior:** This event is emitted when the component's options change. It is useful for components with dynamic options.
|
||||||
|
|
||||||
|
### `keyup.enter`
|
||||||
|
|
||||||
|
- **Description:** Emits an event when the Enter key is pressed.
|
||||||
|
- **Behavior:** This event is emitted whenever the Enter key is pressed while the input is focused. It can be used to handle specific actions when the input is confirmed.
|
||||||
|
|
||||||
|
### `remove`
|
||||||
|
|
||||||
|
- **Description:** Emits an event to remove the current value.
|
||||||
|
- **Behavior:** This event is emitted when the clear button (close icon) is clicked. It is used to handle the removal of the current input value.
|
||||||
|
|
||||||
|
## Functions
|
||||||
|
|
||||||
|
### `focus`
|
||||||
|
|
||||||
|
- **Description:** Focuses the input.
|
||||||
|
- **Behavior:** This function is exposed so it can be called from outside the component. It uses `vnInputRef.value.focus()` to focus the input.
|
||||||
|
|
||||||
|
### `handleKeydown`
|
||||||
|
|
||||||
|
- **Description:** Handles the `keydown` event of the input.
|
||||||
|
- **Behavior:** This function is called whenever a key is pressed while the input is focused. If the pressed key is `Backspace`, it does nothing. If `insertable` is `true` and the pressed key is a number, it calls `handleInsertMode`.
|
||||||
|
|
||||||
|
### `handleInsertMode`
|
||||||
|
|
||||||
|
- **Description:** Handles the insertion mode of values.
|
||||||
|
- **Behavior:** This function is called when `insertable` is `true` and a numeric key is pressed. It inserts the value at the cursor position and updates the input value. Then, it moves the cursor to the correct position.
|
||||||
|
|
||||||
|
### `handleUppercase`
|
||||||
|
|
||||||
|
- **Description:** Converts the input value to uppercase.
|
||||||
|
- **Behavior:** This function is called when the uppercase icon is clicked. It converts the current input value to uppercase.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<template>
|
||||||
|
<VnInput
|
||||||
|
v-model="inputValue"
|
||||||
|
:isOutlined="true"
|
||||||
|
info="Additional information"
|
||||||
|
:clearable="true"
|
||||||
|
:emptyToNull="true"
|
||||||
|
:insertable="false"
|
||||||
|
:maxlength="50"
|
||||||
|
:uppercase="true"
|
||||||
|
@update:modelValue="handleUpdate"
|
||||||
|
@keyup.enter="handleEnter"
|
||||||
|
@remove="handleRemove"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
|
const inputValue = ref('');
|
||||||
|
|
||||||
|
const handleUpdate = (value) => {
|
||||||
|
console.log('Updated value:', value);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleEnter = () => {
|
||||||
|
console.log('Enter pressed');
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleRemove = () => {
|
||||||
|
console.log('Value removed');
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
```
|
|
@ -0,0 +1,215 @@
|
||||||
|
# useArrayData
|
||||||
|
|
||||||
|
`useArrayData` is a composable function that provides a set of utilities for managing array data in a Vue component. It leverages Pinia for state management and provides various methods for fetching, filtering, and manipulating data.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
|
|
||||||
|
const {
|
||||||
|
fetch,
|
||||||
|
applyFilter,
|
||||||
|
addFilter,
|
||||||
|
getCurrentFilter,
|
||||||
|
setCurrentFilter,
|
||||||
|
addFilterWhere,
|
||||||
|
addOrder,
|
||||||
|
deleteOrder,
|
||||||
|
refresh,
|
||||||
|
destroy,
|
||||||
|
loadMore,
|
||||||
|
store,
|
||||||
|
totalRows,
|
||||||
|
updateStateParams,
|
||||||
|
isLoading,
|
||||||
|
deleteOption,
|
||||||
|
reset,
|
||||||
|
resetPagination,
|
||||||
|
} = useArrayData('myKey', userOptions);
|
||||||
|
```
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
### `key`
|
||||||
|
|
||||||
|
- **Type:** `String`
|
||||||
|
- **Description:** A unique key to identify the data store.
|
||||||
|
|
||||||
|
### `userOptions`
|
||||||
|
|
||||||
|
- **Type:** `Object`
|
||||||
|
- **Description:** An object containing user-defined options for configuring the data store.
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### `fetch`
|
||||||
|
|
||||||
|
Fetches data from the server.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- **`options`** : An object with the following properties:
|
||||||
|
- `append` (Boolean): Whether to append the fetched data to the existing data.
|
||||||
|
- `updateRouter` (Boolean): Whether to update the router with the current filter.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
- **`Promise`** : A promise that resolves with the fetched data.
|
||||||
|
|
||||||
|
### `applyFilter`
|
||||||
|
|
||||||
|
Applies a filter to the data.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- **`filter`** : An object containing the filter criteria.
|
||||||
|
- **`params`** : Additional parameters for the filter.
|
||||||
|
- **`fetchOptions`** : Options for the fetch method.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
- **`Promise`** : A promise that resolves with the filtered data.
|
||||||
|
|
||||||
|
### `addFilter`
|
||||||
|
|
||||||
|
Adds a filter to the existing filters.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- **`filter`** : An object containing the filter criteria.
|
||||||
|
- **`params`** : Additional parameters for the filter.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
- **`Promise`** : A promise that resolves with the updated filter and parameters.
|
||||||
|
|
||||||
|
### `getCurrentFilter`
|
||||||
|
|
||||||
|
Gets the current filter applied to the data.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
- **`Object`** : The current filter and parameters.
|
||||||
|
|
||||||
|
### `setCurrentFilter`
|
||||||
|
|
||||||
|
Sets the current filter for the data.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
- **`Object`** : The current filter and parameters.
|
||||||
|
|
||||||
|
### `addFilterWhere`
|
||||||
|
|
||||||
|
Adds a `where` clause to the existing filters.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- **`where`** : An object containing the `where` clause.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
- **`Promise`** : A promise that resolves when the filter is applied.
|
||||||
|
|
||||||
|
### `addOrder`
|
||||||
|
|
||||||
|
Adds an order to the existing orders.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- **`field`** : The field to order by.
|
||||||
|
- **`direction`** : The direction of the order (`ASC` or `DESC`).
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
- **`Promise`** : A promise that resolves with the updated order.
|
||||||
|
|
||||||
|
### `deleteOrder`
|
||||||
|
|
||||||
|
Deletes an order from the existing orders.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- **`field`** : The field to delete the order for.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
- **`Promise`** : A promise that resolves when the order is deleted.
|
||||||
|
|
||||||
|
### `refresh`
|
||||||
|
|
||||||
|
Refreshes the data by re-fetching it from the server.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
- **`Promise`** : A promise that resolves with the refreshed data.
|
||||||
|
|
||||||
|
### `destroy`
|
||||||
|
|
||||||
|
Destroys the data store for the given key.
|
||||||
|
|
||||||
|
### `loadMore`
|
||||||
|
|
||||||
|
Loads more data by incrementing the pagination.
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
- **`Promise`** : A promise that resolves with the additional data.
|
||||||
|
|
||||||
|
### `updateStateParams`
|
||||||
|
|
||||||
|
Updates the state parameters with the given data.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- **`data`** : The data to update the state parameters with.
|
||||||
|
|
||||||
|
### `deleteOption`
|
||||||
|
|
||||||
|
Deletes an option from the store.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- **`option`** : The option to delete.
|
||||||
|
|
||||||
|
### `reset`
|
||||||
|
|
||||||
|
Resets the store to its default state.
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- **`opts`** : An array of options to reset.
|
||||||
|
|
||||||
|
### `resetPagination`
|
||||||
|
|
||||||
|
Resets the pagination for the store.
|
||||||
|
|
||||||
|
## Computed Properties
|
||||||
|
|
||||||
|
### `totalRows`
|
||||||
|
|
||||||
|
- **Description:** The total number of rows in the data.
|
||||||
|
- **Type:** `Number`
|
||||||
|
|
||||||
|
### `isLoading`
|
||||||
|
|
||||||
|
- **Description:** Whether the data is currently being loaded.
|
||||||
|
- **Type:** `Boolean`
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<script setup>
|
||||||
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
|
|
||||||
|
const userOptions = {
|
||||||
|
url: '/api/data',
|
||||||
|
limit: 10,
|
||||||
|
};
|
||||||
|
|
||||||
|
const arrayData = useArrayData('myKey', userOptions);
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
# https://vitepress.dev/reference/default-theme-home-page
|
||||||
|
layout: home
|
||||||
|
|
||||||
|
hero:
|
||||||
|
name: 'Lilium'
|
||||||
|
text: 'Lilium docs'
|
||||||
|
tagline: Powered by Verdnatura
|
||||||
|
actions:
|
||||||
|
- theme: brand
|
||||||
|
text: Docs
|
||||||
|
link: /components/vnInput
|
||||||
|
---
|
140
package.json
140
package.json
|
@ -1,68 +1,74 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "25.04.0",
|
"version": "25.06.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@8.15.1",
|
"packageManager": "pnpm@8.15.1",
|
||||||
"scripts": {
|
"type": "module",
|
||||||
"resetDatabase": "cd ../salix && gulp docker",
|
"scripts": {
|
||||||
"lint": "eslint --ext .js,.vue ./",
|
"resetDatabase": "cd ../salix && gulp docker",
|
||||||
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
"lint": "eslint --ext .js,.vue ./",
|
||||||
"test:e2e": "cypress open",
|
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
||||||
"test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run",
|
"test:e2e": "cypress open",
|
||||||
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
|
"test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run",
|
||||||
"test:unit": "vitest",
|
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
|
||||||
"test:unit:ci": "vitest run",
|
"test:unit": "vitest",
|
||||||
"commitlint": "commitlint --edit",
|
"test:unit:ci": "vitest run",
|
||||||
"prepare": "npx husky install",
|
"commitlint": "commitlint --edit",
|
||||||
"addReferenceTag": "node .husky/addReferenceTag.js"
|
"prepare": "npx husky install",
|
||||||
},
|
"addReferenceTag": "node .husky/addReferenceTag.js",
|
||||||
"dependencies": {
|
"docs:dev": "vitepress dev docs",
|
||||||
"@quasar/cli": "^2.3.0",
|
"docs:build": "vitepress build docs",
|
||||||
"@quasar/extras": "^1.16.9",
|
"docs:preview": "vitepress preview docs"
|
||||||
"axios": "^1.4.0",
|
},
|
||||||
"chromium": "^3.0.3",
|
"dependencies": {
|
||||||
"croppie": "^2.6.5",
|
"@quasar/cli": "^2.4.1",
|
||||||
"moment": "^2.30.1",
|
"@quasar/extras": "^1.16.16",
|
||||||
"pinia": "^2.1.3",
|
"axios": "^1.4.0",
|
||||||
"quasar": "^2.14.5",
|
"chromium": "^3.0.3",
|
||||||
"validator": "^13.9.0",
|
"croppie": "^2.6.5",
|
||||||
"vue": "^3.3.4",
|
"moment": "^2.30.1",
|
||||||
"vue-i18n": "^9.2.2",
|
"pinia": "^2.1.3",
|
||||||
"vue-router": "^4.2.1"
|
"quasar": "^2.17.7",
|
||||||
},
|
"validator": "^13.9.0",
|
||||||
"devDependencies": {
|
"vue": "^3.5.13",
|
||||||
"@commitlint/cli": "^19.2.1",
|
"vue-i18n": "^9.3.0",
|
||||||
"@commitlint/config-conventional": "^19.1.0",
|
"vue-router": "^4.2.5"
|
||||||
"@intlify/unplugin-vue-i18n": "^0.8.1",
|
},
|
||||||
"@pinia/testing": "^0.1.2",
|
"devDependencies": {
|
||||||
"@quasar/app-vite": "^1.7.3",
|
"@commitlint/cli": "^19.2.1",
|
||||||
"@quasar/quasar-app-extension-qcalendar": "4.0.0-beta.15",
|
"@commitlint/config-conventional": "^19.1.0",
|
||||||
"@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0",
|
"@intlify/unplugin-vue-i18n": "^0.8.2",
|
||||||
"@vue/test-utils": "^2.4.4",
|
"@pinia/testing": "^0.1.2",
|
||||||
"autoprefixer": "^10.4.14",
|
"@quasar/app-vite": "^2.0.8",
|
||||||
"cypress": "^13.6.6",
|
"@quasar/quasar-app-extension-qcalendar": "^4.0.2",
|
||||||
"cypress-mochawesome-reporter": "^3.8.2",
|
"@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0",
|
||||||
"eslint": "^8.41.0",
|
"@vue/test-utils": "^2.4.4",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"autoprefixer": "^10.4.14",
|
||||||
"eslint-plugin-cypress": "^2.13.3",
|
"cypress": "^13.6.6",
|
||||||
"eslint-plugin-vue": "^9.14.1",
|
"cypress-mochawesome-reporter": "^3.8.2",
|
||||||
"husky": "^8.0.0",
|
"eslint": "^9.18.0",
|
||||||
"postcss": "^8.4.23",
|
"eslint-config-prettier": "^10.0.1",
|
||||||
"prettier": "^2.8.8",
|
"eslint-plugin-cypress": "^4.1.0",
|
||||||
"vitest": "^0.31.1"
|
"eslint-plugin-vue": "^9.32.0",
|
||||||
},
|
"husky": "^8.0.0",
|
||||||
"engines": {
|
"postcss": "^8.4.23",
|
||||||
"node": "^20 || ^18 || ^16",
|
"prettier": "^3.4.2",
|
||||||
"npm": ">= 8.1.2",
|
"sass": "^1.83.4",
|
||||||
"yarn": ">= 1.21.1",
|
"vitepress": "^1.6.3",
|
||||||
"bun": ">= 1.0.25"
|
"vitest": "^0.34.0"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"engines": {
|
||||||
"@vitejs/plugin-vue": "^5.0.4",
|
"node": "^20 || ^18 || ^16",
|
||||||
"vite": "^5.1.4",
|
"npm": ">= 8.1.2",
|
||||||
"vitest": "^0.31.1"
|
"yarn": ">= 1.21.1",
|
||||||
}
|
"bun": ">= 1.0.25"
|
||||||
}
|
},
|
||||||
|
"overrides": {
|
||||||
|
"@vitejs/plugin-vue": "^5.2.1",
|
||||||
|
"vite": "^6.0.11",
|
||||||
|
"vitest": "^0.31.1"
|
||||||
|
}
|
||||||
|
}
|
4809
pnpm-lock.yaml
4809
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +1,14 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// https://github.com/michael-ciniawsky/postcss-load-config
|
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||||
|
|
||||||
module.exports = {
|
import autoprefixer from 'autoprefixer';
|
||||||
|
// Uncomment the following line if you want to support RTL CSS
|
||||||
|
// import rtlcss from 'postcss-rtlcss';
|
||||||
|
|
||||||
|
export default {
|
||||||
plugins: [
|
plugins: [
|
||||||
// https://github.com/postcss/autoprefixer
|
// https://github.com/postcss/autoprefixer
|
||||||
require('autoprefixer')({
|
autoprefixer({
|
||||||
overrideBrowserslist: [
|
overrideBrowserslist: [
|
||||||
'last 4 Chrome versions',
|
'last 4 Chrome versions',
|
||||||
'last 4 Firefox versions',
|
'last 4 Firefox versions',
|
||||||
|
@ -18,10 +22,7 @@ module.exports = {
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// https://github.com/elchininet/postcss-rtlcss
|
// https://github.com/elchininet/postcss-rtlcss
|
||||||
// If you want to support RTL css, then
|
// If you want to support RTL CSS, uncomment the following line:
|
||||||
// 1. yarn/npm install postcss-rtlcss
|
// rtlcss(),
|
||||||
// 2. optionally set quasar.config.js > framework > lang to an RTL language
|
|
||||||
// 3. uncomment the following line:
|
|
||||||
// require('postcss-rtlcss')
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
path: '/api',
|
||||||
|
rule: { target: 'http://0.0.0.0:3000' },
|
||||||
|
},
|
||||||
|
];
|
|
@ -8,11 +8,11 @@
|
||||||
// Configuration for your app
|
// Configuration for your app
|
||||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
|
||||||
|
|
||||||
const { configure } = require('quasar/wrappers');
|
import { configure } from 'quasar/wrappers';
|
||||||
const VueI18nPlugin = require('@intlify/unplugin-vue-i18n/vite');
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
||||||
const path = require('path');
|
import path from 'path';
|
||||||
|
|
||||||
module.exports = configure(function (/* ctx */) {
|
export default configure(function (/* ctx */) {
|
||||||
return {
|
return {
|
||||||
eslint: {
|
eslint: {
|
||||||
// fix: true,
|
// fix: true,
|
||||||
|
@ -179,7 +179,6 @@ module.exports = configure(function (/* ctx */) {
|
||||||
'render', // keep this as last one
|
'render', // keep this as last one
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
// https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
|
// https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
|
||||||
pwa: {
|
pwa: {
|
||||||
workboxMode: 'generateSW', // or 'injectManifest'
|
workboxMode: 'generateSW', // or 'injectManifest'
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@quasar/testing-unit-vitest": {
|
"@quasar/testing-unit-vitest": {
|
||||||
"options": ["scripts"]
|
"options": [
|
||||||
|
"scripts"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"@quasar/qcalendar": {}
|
"@quasar/qcalendar": {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ describe('Axios boot', () => {
|
||||||
describe('onRequest()', async () => {
|
describe('onRequest()', async () => {
|
||||||
it('should set the "Authorization" property on the headers', async () => {
|
it('should set the "Authorization" property on the headers', async () => {
|
||||||
const config = { headers: {} };
|
const config = { headers: {} };
|
||||||
|
localStorage.setItem('token', 'DEFAULT_TOKEN');
|
||||||
const resultConfig = onRequest(config);
|
const resultConfig = onRequest(config);
|
||||||
|
|
||||||
expect(resultConfig).toEqual(
|
expect(resultConfig).toEqual(
|
||||||
|
|
|
@ -3,9 +3,9 @@ import { useSession } from 'src/composables/useSession';
|
||||||
import { Router } from 'src/router';
|
import { Router } from 'src/router';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
|
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
|
||||||
|
import { getToken, isLoggedIn } from 'src/utils/session';
|
||||||
import { i18n } from 'src/boot/i18n';
|
import { i18n } from 'src/boot/i18n';
|
||||||
|
|
||||||
const session = useSession();
|
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
const stateQuery = useStateQueryStore();
|
const stateQuery = useStateQueryStore();
|
||||||
const baseUrl = '/api/';
|
const baseUrl = '/api/';
|
||||||
|
@ -13,7 +13,7 @@ axios.defaults.baseURL = baseUrl;
|
||||||
const axiosNoError = axios.create({ baseURL: baseUrl });
|
const axiosNoError = axios.create({ baseURL: baseUrl });
|
||||||
|
|
||||||
const onRequest = (config) => {
|
const onRequest = (config) => {
|
||||||
const token = session.getToken();
|
const token = getToken();
|
||||||
if (token.length && !config.headers.Authorization) {
|
if (token.length && !config.headers.Authorization) {
|
||||||
config.headers.Authorization = token;
|
config.headers.Authorization = token;
|
||||||
config.headers['Accept-Language'] = i18n.global.locale.value;
|
config.headers['Accept-Language'] = i18n.global.locale.value;
|
||||||
|
@ -37,15 +37,15 @@ const onResponse = (response) => {
|
||||||
return response;
|
return response;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onResponseError = (error) => {
|
const onResponseError = async (error) => {
|
||||||
stateQuery.remove(error.config);
|
stateQuery.remove(error.config);
|
||||||
|
|
||||||
if (session.isLoggedIn() && error.response?.status === 401) {
|
if (isLoggedIn() && error.response?.status === 401) {
|
||||||
session.destroy(false);
|
await useSession().destroy(false);
|
||||||
const hash = window.location.hash;
|
const hash = window.location.hash;
|
||||||
const url = hash.slice(1);
|
const url = hash.slice(1);
|
||||||
Router.push(`/login?redirect=${url}`);
|
Router.push(`/login?redirect=${url}`);
|
||||||
} else if (!session.isLoggedIn()) {
|
} else if (!isLoggedIn()) {
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, useAttrs, watch } from 'vue';
|
||||||
import { useRouter, onBeforeRouteLeave } from 'vue-router';
|
import { useRouter, onBeforeRouteLeave } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
@ -17,6 +17,7 @@ const quasar = useQuasar();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { validate } = useValidator();
|
const { validate } = useValidator();
|
||||||
|
const $attrs = useAttrs();
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
model: {
|
model: {
|
||||||
|
@ -113,9 +114,11 @@ onBeforeRouteLeave((to, from, next) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
async function fetch(data) {
|
async function fetch(data) {
|
||||||
resetData(data);
|
const keyData = $attrs['key-data'];
|
||||||
emit('onFetch', data);
|
const rows = keyData ? data[keyData] : data;
|
||||||
return data;
|
resetData(rows);
|
||||||
|
emit('onFetch', rows);
|
||||||
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetData(data) {
|
function resetData(data) {
|
||||||
|
@ -146,7 +149,7 @@ function filter(value, update, filterOptions) {
|
||||||
(ref) => {
|
(ref) => {
|
||||||
ref.setOptionIndex(-1);
|
ref.setOptionIndex(-1);
|
||||||
ref.moveOptionSelection(1, true);
|
ref.moveOptionSelection(1, true);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +215,7 @@ async function remove(data) {
|
||||||
|
|
||||||
if (preRemove.length) {
|
if (preRemove.length) {
|
||||||
newData = newData.filter(
|
newData = newData.filter(
|
||||||
(form) => !preRemove.some((index) => index == form.$index)
|
(form) => !preRemove.some((index) => index == form.$index),
|
||||||
);
|
);
|
||||||
const changes = getChanges();
|
const changes = getChanges();
|
||||||
if (!changes.creates?.length && !changes.updates?.length)
|
if (!changes.creates?.length && !changes.updates?.length)
|
||||||
|
|
|
@ -31,7 +31,6 @@ const props = defineProps({
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const itemTypesOptions = ref([]);
|
const itemTypesOptions = ref([]);
|
||||||
const suppliersOptions = ref([]);
|
|
||||||
const tagOptions = ref([]);
|
const tagOptions = ref([]);
|
||||||
const tagValues = ref([]);
|
const tagValues = ref([]);
|
||||||
const categoryList = ref(null);
|
const categoryList = ref(null);
|
||||||
|
@ -40,13 +39,13 @@ const selectedTypeFk = ref(getParamWhere(route.query.table, 'typeFk', false));
|
||||||
|
|
||||||
const selectedCategory = computed(() => {
|
const selectedCategory = computed(() => {
|
||||||
return (categoryList.value || []).find(
|
return (categoryList.value || []).find(
|
||||||
(category) => category?.id === selectedCategoryFk.value
|
(category) => category?.id === selectedCategoryFk.value,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const selectedType = computed(() => {
|
const selectedType = computed(() => {
|
||||||
return (itemTypesOptions.value || []).find(
|
return (itemTypesOptions.value || []).find(
|
||||||
(type) => type?.id === selectedTypeFk.value
|
(type) => type?.id === selectedTypeFk.value,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -134,13 +133,6 @@ const setCategoryList = (data) => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData url="ItemCategories" limit="30" auto-load @on-fetch="setCategoryList" />
|
<FetchData url="ItemCategories" limit="30" auto-load @on-fetch="setCategoryList" />
|
||||||
<FetchData
|
|
||||||
url="Suppliers"
|
|
||||||
limit="30"
|
|
||||||
auto-load
|
|
||||||
:filter="{ fields: ['id', 'name', 'nickname'], order: 'name ASC', limit: 30 }"
|
|
||||||
@on-fetch="(data) => (suppliersOptions = data)"
|
|
||||||
/>
|
|
||||||
<FetchData
|
<FetchData
|
||||||
url="Tags"
|
url="Tags"
|
||||||
:filter="{ fields: ['id', 'name', 'isFree'] }"
|
:filter="{ fields: ['id', 'name', 'isFree'] }"
|
||||||
|
@ -349,4 +341,11 @@ es:
|
||||||
floramondo: Floramondo
|
floramondo: Floramondo
|
||||||
salesPersonFk: Comprador
|
salesPersonFk: Comprador
|
||||||
categoryFk: Categoría
|
categoryFk: Categoría
|
||||||
|
Plant: Planta natural
|
||||||
|
Flower: Flor fresca
|
||||||
|
Handmade: Hecho a mano
|
||||||
|
Artificial: Artificial
|
||||||
|
Green: Verdes frescos
|
||||||
|
Accessories: Complementos florales
|
||||||
|
Fruit: Fruta
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -10,12 +10,13 @@ import routes from 'src/router/modules';
|
||||||
import LeftMenuItem from './LeftMenuItem.vue';
|
import LeftMenuItem from './LeftMenuItem.vue';
|
||||||
import LeftMenuItemGroup from './LeftMenuItemGroup.vue';
|
import LeftMenuItemGroup from './LeftMenuItemGroup.vue';
|
||||||
import VnInput from './common/VnInput.vue';
|
import VnInput from './common/VnInput.vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const navigation = useNavigationStore();
|
const navigation = useNavigationStore();
|
||||||
|
const router = useRouter();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
source: {
|
source: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -174,6 +175,10 @@ function normalize(text) {
|
||||||
.replace(/[\u0300-\u036f]/g, '')
|
.replace(/[\u0300-\u036f]/g, '')
|
||||||
.toLowerCase();
|
.toLowerCase();
|
||||||
}
|
}
|
||||||
|
const searchModule = () => {
|
||||||
|
const [item] = filteredItems.value;
|
||||||
|
if (item) router.push({ name: item.name });
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -188,10 +193,11 @@ function normalize(text) {
|
||||||
filled
|
filled
|
||||||
dense
|
dense
|
||||||
autofocus
|
autofocus
|
||||||
|
@keyup.enter.stop="searchModule()"
|
||||||
/>
|
/>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QSeparator />
|
<QSeparator />
|
||||||
<template v-if="filteredPinnedModules.size">
|
<template v-if="filteredPinnedModules.size && !search">
|
||||||
<LeftMenuItem
|
<LeftMenuItem
|
||||||
v-for="[key, pinnedModule] of filteredPinnedModules"
|
v-for="[key, pinnedModule] of filteredPinnedModules"
|
||||||
:key="key"
|
:key="key"
|
||||||
|
@ -215,11 +221,11 @@ function normalize(text) {
|
||||||
</LeftMenuItem>
|
</LeftMenuItem>
|
||||||
<QSeparator />
|
<QSeparator />
|
||||||
</template>
|
</template>
|
||||||
<template v-for="item in filteredItems" :key="item.name">
|
<template v-for="(item, index) in filteredItems" :key="item.name">
|
||||||
<template
|
<template
|
||||||
v-if="item.children && !filteredPinnedModules.has(item.name)"
|
v-if="search ||item.children && !filteredPinnedModules.has(item.name)"
|
||||||
>
|
>
|
||||||
<LeftMenuItem :item="item" group="modules">
|
<LeftMenuItem :item="item" group="modules" :class="search && index === 0 ? 'searched' : ''">
|
||||||
<template #side>
|
<template #side>
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="item.isPinned === true"
|
v-if="item.isPinned === true"
|
||||||
|
@ -336,6 +342,9 @@ function normalize(text) {
|
||||||
.header {
|
.header {
|
||||||
color: var(--vn-label-color);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
|
.searched{
|
||||||
|
background-color: var(--vn-section-hover-color);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
|
|
|
@ -20,6 +20,7 @@ const appName = 'Lilium';
|
||||||
const pinnedModulesRef = ref();
|
const pinnedModulesRef = ref();
|
||||||
|
|
||||||
onMounted(() => stateStore.setMounted());
|
onMounted(() => stateStore.setMounted());
|
||||||
|
const refresh = () => window.location.reload();
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QHeader color="white" elevated>
|
<QHeader color="white" elevated>
|
||||||
|
@ -64,6 +65,13 @@ onMounted(() => stateStore.setMounted());
|
||||||
<QSpace />
|
<QSpace />
|
||||||
<div class="q-pl-sm q-gutter-sm row items-center no-wrap">
|
<div class="q-pl-sm q-gutter-sm row items-center no-wrap">
|
||||||
<div id="actions-prepend"></div>
|
<div id="actions-prepend"></div>
|
||||||
|
<QIcon
|
||||||
|
name="refresh"
|
||||||
|
size="md"
|
||||||
|
color="red"
|
||||||
|
v-if="state.get('error')"
|
||||||
|
@click="refresh"
|
||||||
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:class="{ 'q-pa-none': quasar.platform.is.mobile }"
|
:class="{ 'q-pa-none': quasar.platform.is.mobile }"
|
||||||
id="pinnedModules"
|
id="pinnedModules"
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import quasarLang from 'src/utils/quasarLang';
|
||||||
|
|
||||||
import { onMounted, computed, ref } from 'vue';
|
import { onMounted, computed, ref } from 'vue';
|
||||||
import { Dark, Quasar } from 'quasar';
|
|
||||||
|
import { Dark } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
@ -31,14 +34,7 @@ const userLocale = computed({
|
||||||
|
|
||||||
value = localeEquivalence[value] ?? value;
|
value = localeEquivalence[value] ?? value;
|
||||||
|
|
||||||
try {
|
quasarLang(value);
|
||||||
/* @vite-ignore */
|
|
||||||
import(`../../node_modules/quasar/lang/${value}.mjs`).then((lang) => {
|
|
||||||
Quasar.lang.set(lang.default);
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
//
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ onMounted(() => {
|
||||||
watch(
|
watch(
|
||||||
() => $props.columns,
|
() => $props.columns,
|
||||||
(value) => splitColumns(value),
|
(value) => splitColumns(value),
|
||||||
{ immediate: true }
|
{ immediate: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
const isTableMode = computed(() => mode.value == TABLE_MODE);
|
const isTableMode = computed(() => mode.value == TABLE_MODE);
|
||||||
|
@ -212,7 +212,7 @@ function splitColumns(columns) {
|
||||||
// Status column
|
// Status column
|
||||||
if (splittedColumns.value.chips.length) {
|
if (splittedColumns.value.chips.length) {
|
||||||
splittedColumns.value.columnChips = splittedColumns.value.chips.filter(
|
splittedColumns.value.columnChips = splittedColumns.value.chips.filter(
|
||||||
(c) => !c.isId
|
(c) => !c.isId,
|
||||||
);
|
);
|
||||||
if (splittedColumns.value.columnChips.length)
|
if (splittedColumns.value.columnChips.length)
|
||||||
splittedColumns.value.columns.unshift({
|
splittedColumns.value.columns.unshift({
|
||||||
|
@ -314,7 +314,19 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
||||||
show-if-above
|
show-if-above
|
||||||
>
|
>
|
||||||
<QScrollArea class="fit">
|
<QScrollArea class="fit">
|
||||||
<VnTableFilter :data-key="$attrs['data-key']" :columns="columns" :redirect="redirect" />
|
<VnTableFilter
|
||||||
|
:data-key="$attrs['data-key']"
|
||||||
|
:columns="columns"
|
||||||
|
:redirect="redirect"
|
||||||
|
>
|
||||||
|
<template
|
||||||
|
v-for="(_, slotName) in $slots"
|
||||||
|
#[slotName]="slotData"
|
||||||
|
:key="slotName"
|
||||||
|
>
|
||||||
|
<slot :name="slotName" v-bind="slotData ?? {}" :key="slotName" />
|
||||||
|
</template>
|
||||||
|
</VnTableFilter>
|
||||||
</QScrollArea>
|
</QScrollArea>
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
<CrudModel
|
<CrudModel
|
||||||
|
@ -472,7 +484,9 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
||||||
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
|
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
|
||||||
"
|
"
|
||||||
:style="`visibility: ${
|
:style="`visibility: ${
|
||||||
(btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden'
|
((btn.show && btn.show(row)) ?? true)
|
||||||
|
? 'visible'
|
||||||
|
: 'hidden'
|
||||||
}`"
|
}`"
|
||||||
@click="btn.action(row)"
|
@click="btn.action(row)"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -62,5 +62,8 @@ function columnName(col) {
|
||||||
<span>{{ formatFn(tag.value) }}</span>
|
<span>{{ formatFn(tag.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-for="(_, slotName) in $slots" #[slotName]="slotData" :key="slotName">
|
||||||
|
<slot :name="slotName" v-bind="slotData ?? {}" :key="slotName" />
|
||||||
|
</template>
|
||||||
</VnFilterPanel>
|
</VnFilterPanel>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -0,0 +1,121 @@
|
||||||
|
import { describe, expect, it, beforeEach, afterEach, vi } from 'vitest';
|
||||||
|
import { createWrapper } from 'app/test/vitest/helper';
|
||||||
|
import VnVisibleColumn from '../VnVisibleColumn.vue';
|
||||||
|
import { axios } from 'app/test/vitest/helper';
|
||||||
|
|
||||||
|
describe('VnVisibleColumns', () => {
|
||||||
|
let wrapper;
|
||||||
|
let vm;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
wrapper = createWrapper(VnVisibleColumn, {
|
||||||
|
propsData: {
|
||||||
|
tableCode: 'testTable',
|
||||||
|
skip: ['skippedColumn'],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
vm = wrapper.vm;
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
vi.clearAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('setUserConfigViewData()', () => {
|
||||||
|
it('should initialize localColumns with visible configuration', () => {
|
||||||
|
vm.columns = [
|
||||||
|
{ name: 'columnMockName', label: undefined },
|
||||||
|
{ name: 'columnMockAddress', label: undefined },
|
||||||
|
{ name: 'columnMockId', label: undefined },
|
||||||
|
];
|
||||||
|
const configuration = {
|
||||||
|
columnMockName: true,
|
||||||
|
columnMockAddress: false,
|
||||||
|
columnMockId: true,
|
||||||
|
};
|
||||||
|
const expectedColumns = [
|
||||||
|
{ name: 'columnMockName', label: undefined, visible: true },
|
||||||
|
{ name: 'columnMockAddress', label: undefined, visible: false },
|
||||||
|
{ name: 'columnMockId', label: undefined, visible: true },
|
||||||
|
];
|
||||||
|
|
||||||
|
vm.setUserConfigViewData(configuration, false);
|
||||||
|
|
||||||
|
expect(vm.localColumns).toEqual(expectedColumns);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should skip columns based on props', () => {
|
||||||
|
vm.columns = [
|
||||||
|
{ name: 'columnMockName', label: undefined },
|
||||||
|
{ name: 'columnMockId', label: undefined },
|
||||||
|
{ name: 'skippedColumn', label: 'Skipped Column' },
|
||||||
|
];
|
||||||
|
const configuration = {
|
||||||
|
columnMockName: true,
|
||||||
|
skippedColumn: false,
|
||||||
|
columnMockId: true,
|
||||||
|
};
|
||||||
|
const expectedColumns = [
|
||||||
|
{ name: 'columnMockName', label: undefined, visible: true },
|
||||||
|
{ name: 'columnMockId', label: undefined, visible: true },
|
||||||
|
];
|
||||||
|
|
||||||
|
vm.setUserConfigViewData(configuration, false);
|
||||||
|
|
||||||
|
expect(vm.localColumns).toEqual(expectedColumns);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('toggleMarkAll()', () => {
|
||||||
|
it('should set all localColumns to visible=true', () => {
|
||||||
|
vm.localColumns = [
|
||||||
|
{ name: 'columnMockName', visible: false },
|
||||||
|
{ name: 'columnMockId', visible: false },
|
||||||
|
];
|
||||||
|
|
||||||
|
vm.toggleMarkAll(true);
|
||||||
|
|
||||||
|
expect(vm.localColumns.every((col) => col.visible)).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set all localColumns to visible=false', () => {
|
||||||
|
vm.localColumns = [
|
||||||
|
{ name: 'columnMockName', visible: true },
|
||||||
|
{ name: 'columnMockId', visible: true },
|
||||||
|
];
|
||||||
|
|
||||||
|
vm.toggleMarkAll(false);
|
||||||
|
|
||||||
|
expect(vm.localColumns.every((col) => col.visible)).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('saveConfig()', () => {
|
||||||
|
it('should call setUserConfigViewData and axios.post with correct params', async () => {
|
||||||
|
const mockAxiosPost = vi.spyOn(axios, 'post').mockResolvedValue({
|
||||||
|
data: [{ id: 1 }],
|
||||||
|
});
|
||||||
|
|
||||||
|
vm.localColumns = [
|
||||||
|
{ name: 'columnMockName', visible: true },
|
||||||
|
{ name: 'columnMockId', visible: false },
|
||||||
|
];
|
||||||
|
|
||||||
|
await vm.saveConfig();
|
||||||
|
|
||||||
|
expect(mockAxiosPost).toHaveBeenCalledWith('UserConfigViews/crud', {
|
||||||
|
creates: [
|
||||||
|
{
|
||||||
|
userFk: vm.user.id,
|
||||||
|
tableCode: vm.tableCode,
|
||||||
|
tableConfig: vm.tableCode,
|
||||||
|
configuration: {
|
||||||
|
columnMockName: true,
|
||||||
|
columnMockId: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,12 @@
|
||||||
|
export default function (initialFooter, data) {
|
||||||
|
const footer = data.reduce(
|
||||||
|
(acc, row) => {
|
||||||
|
Object.entries(initialFooter).forEach(([key, initialValue]) => {
|
||||||
|
acc[key] += row?.[key] !== undefined ? row[key] : initialValue;
|
||||||
|
});
|
||||||
|
return acc;
|
||||||
|
},
|
||||||
|
{ ...initialFooter }
|
||||||
|
);
|
||||||
|
return footer;
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
<script setup>
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
import { useHasContent } from 'src/composables/useHasContent';
|
||||||
|
import { watch } from 'vue';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const stateStore = useStateStore();
|
||||||
|
const hasContent = useHasContent('#advanced-menu');
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
isMainSection: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => $props.isMainSection,
|
||||||
|
(val) => {
|
||||||
|
if (stateStore) stateStore.rightAdvancedDrawer = val;
|
||||||
|
},
|
||||||
|
{ immediate: true },
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<Teleport to="#searchbar-after" v-if="stateStore.isHeaderMounted()">
|
||||||
|
<QBtn
|
||||||
|
v-if="hasContent || $slots['advanced-menu']"
|
||||||
|
flat
|
||||||
|
@click="stateStore.toggleRightAdvancedDrawer()"
|
||||||
|
round
|
||||||
|
icon="tune"
|
||||||
|
color="white"
|
||||||
|
>
|
||||||
|
<QTooltip bottom anchor="bottom right">
|
||||||
|
{{ t('globals.advancedMenu') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
</Teleport>
|
||||||
|
<QDrawer
|
||||||
|
v-model="stateStore.rightAdvancedDrawer"
|
||||||
|
side="right"
|
||||||
|
:width="256"
|
||||||
|
:overlay="!isMainSection"
|
||||||
|
v-bind="$attrs"
|
||||||
|
>
|
||||||
|
<QScrollArea class="fit">
|
||||||
|
<div id="advanced-menu"></div>
|
||||||
|
<slot v-if="!hasContent" name="advanced-menu" />
|
||||||
|
</QScrollArea>
|
||||||
|
</QDrawer>
|
||||||
|
</template>
|
|
@ -17,7 +17,7 @@ onMounted(() => {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Teleport to="#actions-append" v-if="stateStore.isHeaderMounted()">
|
<Teleport to="#actions-prepend" v-if="stateStore.isHeaderMounted()">
|
||||||
<div class="row q-gutter-x-sm">
|
<div class="row q-gutter-x-sm">
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="hasContent || $slots['right-panel']"
|
v-if="hasContent || $slots['right-panel']"
|
||||||
|
@ -26,6 +26,7 @@ onMounted(() => {
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
icon="dock_to_left"
|
icon="dock_to_left"
|
||||||
|
data-cy="toggle-right-drawer"
|
||||||
>
|
>
|
||||||
<QTooltip bottom anchor="bottom right">
|
<QTooltip bottom anchor="bottom right">
|
||||||
{{ t('globals.collapseMenu') }}
|
{{ t('globals.collapseMenu') }}
|
||||||
|
|
|
@ -12,6 +12,7 @@ const props = defineProps({
|
||||||
baseUrl: { type: String, default: undefined },
|
baseUrl: { type: String, default: undefined },
|
||||||
customUrl: { type: String, default: undefined },
|
customUrl: { type: String, default: undefined },
|
||||||
filter: { type: Object, default: () => {} },
|
filter: { type: Object, default: () => {} },
|
||||||
|
userFilter: { type: Object, default: () => {} },
|
||||||
descriptor: { type: Object, required: true },
|
descriptor: { type: Object, required: true },
|
||||||
filterPanel: { type: Object, default: undefined },
|
filterPanel: { type: Object, default: undefined },
|
||||||
searchDataKey: { type: String, default: undefined },
|
searchDataKey: { type: String, default: undefined },
|
||||||
|
@ -32,6 +33,7 @@ const url = computed(() => {
|
||||||
const arrayData = useArrayData(props.dataKey, {
|
const arrayData = useArrayData(props.dataKey, {
|
||||||
url: url.value,
|
url: url.value,
|
||||||
filter: props.filter,
|
filter: props.filter,
|
||||||
|
userFilter: props.userFilter,
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|
|
@ -102,7 +102,7 @@ const columns = computed(() => [
|
||||||
storage: 'dms',
|
storage: 'dms',
|
||||||
collection: null,
|
collection: null,
|
||||||
resolution: null,
|
resolution: null,
|
||||||
id: prop.row.file.split('.')[0],
|
id: Number(prop.row.file.split('.')[0]),
|
||||||
token: token,
|
token: token,
|
||||||
class: 'rounded',
|
class: 'rounded',
|
||||||
ratio: 1,
|
ratio: 1,
|
||||||
|
@ -202,7 +202,7 @@ const columns = computed(() => [
|
||||||
prop.row.id,
|
prop.row.id,
|
||||||
$props.downloadModel,
|
$props.downloadModel,
|
||||||
undefined,
|
undefined,
|
||||||
prop.row.download
|
prop.row.download,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -299,11 +299,12 @@ defineExpose({
|
||||||
:url="$props.model"
|
:url="$props.model"
|
||||||
:user-filter="dmsFilter"
|
:user-filter="dmsFilter"
|
||||||
:order="['dmsFk DESC']"
|
:order="['dmsFk DESC']"
|
||||||
:auto-load="true"
|
auto-load
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
>
|
>
|
||||||
<template #body>
|
<template #body>
|
||||||
<QTable
|
<QTable
|
||||||
|
v-if="rows"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
class="full-width q-mt-md"
|
class="full-width q-mt-md"
|
||||||
|
@ -373,7 +374,7 @@ defineExpose({
|
||||||
v-if="
|
v-if="
|
||||||
shouldRenderButton(
|
shouldRenderButton(
|
||||||
button.name,
|
button.name,
|
||||||
props.row.isDocuware
|
props.row.isDocuware,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
:is="button.component"
|
:is="button.component"
|
||||||
|
|
|
@ -75,6 +75,7 @@ const focus = () => {
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
focus,
|
focus,
|
||||||
|
vnInputRef,
|
||||||
});
|
});
|
||||||
|
|
||||||
const mixinRules = [
|
const mixinRules = [
|
||||||
|
@ -174,7 +175,11 @@ const handleUppercase = () => {
|
||||||
v-if="!$attrs.disabled && !($attrs.readonly) && $props.uppercase"
|
v-if="!$attrs.disabled && !($attrs.readonly) && $props.uppercase"
|
||||||
@click="handleUppercase"
|
@click="handleUppercase"
|
||||||
class="uppercase-icon"
|
class="uppercase-icon"
|
||||||
/>
|
>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('Convert to uppercase') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
|
||||||
<slot name="append" v-if="$slots.append && !$attrs.disabled" />
|
<slot name="append" v-if="$slots.append && !$attrs.disabled" />
|
||||||
<QIcon v-if="info" name="info">
|
<QIcon v-if="info" name="info">
|
||||||
|
@ -187,13 +192,26 @@ const handleUppercase = () => {
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.uppercase-icon {
|
||||||
|
transition: color 0.3s, transform 0.2s;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uppercase-icon:hover {
|
||||||
|
color: #ed9937;
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
inputMin: Must be more than {value}
|
inputMin: Must be more than {value}
|
||||||
maxLength: The value exceeds {value} characters
|
maxLength: The value exceeds {value} characters
|
||||||
inputMax: Must be less than {value}
|
inputMax: Must be less than {value}
|
||||||
|
|
||||||
es:
|
es:
|
||||||
inputMin: Debe ser mayor a {value}
|
inputMin: Debe ser mayor a {value}
|
||||||
maxLength: El valor excede los {value} carácteres
|
maxLength: El valor excede los {value} carácteres
|
||||||
inputMax: Debe ser menor a {value}
|
inputMax: Debe ser menor a {value}
|
||||||
|
Convert to uppercase: Convertir a mayúsculas
|
||||||
</i18n>
|
</i18n>
|
|
@ -105,6 +105,7 @@ const manageDate = (date) => {
|
||||||
:rules="mixinRules"
|
:rules="mixinRules"
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
@click="isPopupOpen = !isPopupOpen"
|
@click="isPopupOpen = !isPopupOpen"
|
||||||
|
@keydown="isPopupOpen = false"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
|
|
|
@ -79,6 +79,7 @@ function dateToTime(newDate) {
|
||||||
style="min-width: 100px"
|
style="min-width: 100px"
|
||||||
:rules="mixinRules"
|
:rules="mixinRules"
|
||||||
@click="isPopupOpen = !isPopupOpen"
|
@click="isPopupOpen = !isPopupOpen"
|
||||||
|
@keydown="isPopupOpen = false"
|
||||||
type="time"
|
type="time"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
>
|
>
|
||||||
|
|
|
@ -15,6 +15,7 @@ import FetchData from '../FetchData.vue';
|
||||||
import VnSelect from './VnSelect.vue';
|
import VnSelect from './VnSelect.vue';
|
||||||
import VnUserLink from '../ui/VnUserLink.vue';
|
import VnUserLink from '../ui/VnUserLink.vue';
|
||||||
import VnPaginate from '../ui/VnPaginate.vue';
|
import VnPaginate from '../ui/VnPaginate.vue';
|
||||||
|
import RightMenu from './RightMenu.vue';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const validationsStore = useValidator();
|
const validationsStore = useValidator();
|
||||||
|
@ -130,7 +131,7 @@ const actionsIcon = {
|
||||||
};
|
};
|
||||||
const validDate = new RegExp(
|
const validDate = new RegExp(
|
||||||
/^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])/.source +
|
/^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])/.source +
|
||||||
/T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/.source
|
/T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/.source,
|
||||||
);
|
);
|
||||||
|
|
||||||
function castJsonValue(value) {
|
function castJsonValue(value) {
|
||||||
|
@ -192,7 +193,7 @@ function getLogTree(data) {
|
||||||
user: log.user,
|
user: log.user,
|
||||||
userFk: log.userFk,
|
userFk: log.userFk,
|
||||||
logs: [],
|
logs: [],
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Model
|
// Model
|
||||||
|
@ -210,7 +211,7 @@ function getLogTree(data) {
|
||||||
id: log.changedModelId,
|
id: log.changedModelId,
|
||||||
showValue: log.changedModelValue,
|
showValue: log.changedModelValue,
|
||||||
logs: [],
|
logs: [],
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
nLogs = 0;
|
nLogs = 0;
|
||||||
}
|
}
|
||||||
|
@ -282,7 +283,7 @@ function setDate(type) {
|
||||||
to = date.adjustDate(
|
to = date.adjustDate(
|
||||||
to,
|
to,
|
||||||
{ hour: 21, minute: 59, second: 59, millisecond: 999 },
|
{ hour: 21, minute: 59, second: 59, millisecond: 999 },
|
||||||
true
|
true,
|
||||||
);
|
);
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -365,7 +366,7 @@ async function clearFilter() {
|
||||||
dateTo.value = undefined;
|
dateTo.value = undefined;
|
||||||
userRadio.value = undefined;
|
userRadio.value = undefined;
|
||||||
Object.keys(checkboxOptions.value).forEach(
|
Object.keys(checkboxOptions.value).forEach(
|
||||||
(opt) => (checkboxOptions.value[opt].selected = false)
|
(opt) => (checkboxOptions.value[opt].selected = false),
|
||||||
);
|
);
|
||||||
await applyFilter();
|
await applyFilter();
|
||||||
}
|
}
|
||||||
|
@ -378,7 +379,7 @@ watch(
|
||||||
() => router.currentRoute.value.params.id,
|
() => router.currentRoute.value.params.id,
|
||||||
() => {
|
() => {
|
||||||
applyFilter();
|
applyFilter();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
@ -391,7 +392,7 @@ watch(
|
||||||
const changedModel = item.changedModel;
|
const changedModel = item.changedModel;
|
||||||
return {
|
return {
|
||||||
locale: useCapitalize(
|
locale: useCapitalize(
|
||||||
validations[changedModel]?.locale?.name ?? changedModel
|
validations[changedModel]?.locale?.name ?? changedModel,
|
||||||
),
|
),
|
||||||
value: changedModel,
|
value: changedModel,
|
||||||
};
|
};
|
||||||
|
@ -507,7 +508,7 @@ watch(
|
||||||
:title="
|
:title="
|
||||||
date.formatDate(
|
date.formatDate(
|
||||||
log.creationDate,
|
log.creationDate,
|
||||||
'DD/MM/YYYY hh:mm:ss'
|
'DD/MM/YYYY hh:mm:ss',
|
||||||
) ?? `date:'dd/MM/yyyy HH:mm:ss'`
|
) ?? `date:'dd/MM/yyyy HH:mm:ss'`
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -577,7 +578,7 @@ watch(
|
||||||
t(
|
t(
|
||||||
`actions.${
|
`actions.${
|
||||||
actionsText[log.action]
|
actionsText[log.action]
|
||||||
}`
|
}`,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
@ -677,139 +678,144 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
<Teleport to="#right-panel" v-if="stateStore.isHeaderMounted()">
|
<RightMenu>
|
||||||
<QList dense>
|
<template #right-panel>
|
||||||
<QSeparator />
|
<QList dense>
|
||||||
<QItem class="q-mt-sm">
|
<QSeparator />
|
||||||
<QInput
|
<QItem class="q-mt-sm">
|
||||||
:label="t('globals.search')"
|
<QInput
|
||||||
v-model="searchInput"
|
:label="t('globals.search')"
|
||||||
class="full-width"
|
v-model="searchInput"
|
||||||
clearable
|
class="full-width"
|
||||||
clear-icon="close"
|
clearable
|
||||||
@keyup.enter="() => selectFilter('search')"
|
clear-icon="close"
|
||||||
@focusout="() => selectFilter('search')"
|
@keyup.enter="() => selectFilter('search')"
|
||||||
@clear="() => selectFilter('search')"
|
@focusout="() => selectFilter('search')"
|
||||||
>
|
@clear="() => selectFilter('search')"
|
||||||
<template #append>
|
>
|
||||||
<QIcon name="info" class="cursor-pointer">
|
<template #append>
|
||||||
<QTooltip>{{ t('tooltips.search') }}</QTooltip>
|
<QIcon name="info" class="cursor-pointer">
|
||||||
</QIcon>
|
<QTooltip>{{ t('tooltips.search') }}</QTooltip>
|
||||||
</template>
|
</QIcon>
|
||||||
</QInput>
|
</template>
|
||||||
</QItem>
|
</QInput>
|
||||||
<QItem>
|
</QItem>
|
||||||
<VnSelect
|
<QItem>
|
||||||
class="full-width"
|
|
||||||
:label="t('globals.entity')"
|
|
||||||
v-model="selectedFilters.changedModel"
|
|
||||||
option-label="locale"
|
|
||||||
option-value="value"
|
|
||||||
:options="actions"
|
|
||||||
@update:model-value="selectFilter('action')"
|
|
||||||
hide-selected
|
|
||||||
/>
|
|
||||||
</QItem>
|
|
||||||
<QItem class="q-mt-sm">
|
|
||||||
<QOptionGroup
|
|
||||||
size="sm"
|
|
||||||
v-model="userRadio"
|
|
||||||
:options="userTypes"
|
|
||||||
color="primary"
|
|
||||||
@update:model-value="selectFilter('userRadio')"
|
|
||||||
right-label
|
|
||||||
>
|
|
||||||
<template #label="{ label }">
|
|
||||||
{{ t(`Users.${label}`) }}
|
|
||||||
</template>
|
|
||||||
</QOptionGroup>
|
|
||||||
</QItem>
|
|
||||||
<QItem class="q-mt-sm">
|
|
||||||
<QItemSection v-if="userRadio !== null">
|
|
||||||
<VnSelect
|
<VnSelect
|
||||||
class="full-width"
|
class="full-width"
|
||||||
:label="t('globals.user')"
|
:label="t('globals.entity')"
|
||||||
v-model="userSelect"
|
v-model="selectedFilters.changedModel"
|
||||||
option-label="name"
|
option-label="locale"
|
||||||
option-value="id"
|
option-value="value"
|
||||||
:url="`${model}Logs/${$route.params.id}/editors`"
|
:options="actions"
|
||||||
:fields="['id', 'nickname', 'name', 'image']"
|
@update:model-value="selectFilter('action')"
|
||||||
sort-by="nickname"
|
|
||||||
@update:model-value="selectFilter('userSelect')"
|
|
||||||
hide-selected
|
hide-selected
|
||||||
|
/>
|
||||||
|
</QItem>
|
||||||
|
<QItem class="q-mt-sm">
|
||||||
|
<QOptionGroup
|
||||||
|
size="sm"
|
||||||
|
v-model="userRadio"
|
||||||
|
:options="userTypes"
|
||||||
|
color="primary"
|
||||||
|
@update:model-value="selectFilter('userRadio')"
|
||||||
|
right-label
|
||||||
>
|
>
|
||||||
<template #option="{ opt, itemProps }">
|
<template #label="{ label }">
|
||||||
<QItem v-bind="itemProps" class="q-pa-xs row items-center">
|
{{ t(`Users.${label}`) }}
|
||||||
<QItemSection class="col-3 items-center">
|
|
||||||
<VnAvatar :worker-id="opt.id" />
|
|
||||||
</QItemSection>
|
|
||||||
<QItemSection class="col-9 justify-center">
|
|
||||||
<span>{{ opt.name }}</span>
|
|
||||||
<span class="text-grey">{{ opt.nickname }}</span>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
</template>
|
||||||
</VnSelect>
|
</QOptionGroup>
|
||||||
</QItemSection>
|
</QItem>
|
||||||
</QItem>
|
<QItem class="q-mt-sm">
|
||||||
<QItem class="q-mt-sm">
|
<QItemSection v-if="userRadio !== null">
|
||||||
<QInput
|
<VnSelect
|
||||||
:label="t('globals.changes')"
|
class="full-width"
|
||||||
v-model="changeInput"
|
:label="t('globals.user')"
|
||||||
class="full-width"
|
v-model="userSelect"
|
||||||
clearable
|
option-label="name"
|
||||||
clear-icon="close"
|
option-value="id"
|
||||||
@keyup.enter="selectFilter('change')"
|
:url="`${model}Logs/${route.params.id}/editors`"
|
||||||
@focusout="selectFilter('change')"
|
:fields="['id', 'nickname', 'name', 'image']"
|
||||||
@clear="selectFilter('change')"
|
sort-by="nickname"
|
||||||
|
@update:model-value="selectFilter('userSelect')"
|
||||||
|
hide-selected
|
||||||
|
>
|
||||||
|
<template #option="{ opt, itemProps }">
|
||||||
|
<QItem
|
||||||
|
v-bind="itemProps"
|
||||||
|
class="q-pa-xs row items-center"
|
||||||
|
>
|
||||||
|
<QItemSection class="col-3 items-center">
|
||||||
|
<VnAvatar :worker-id="opt.id" />
|
||||||
|
</QItemSection>
|
||||||
|
<QItemSection class="col-9 justify-center">
|
||||||
|
<span>{{ opt.name }}</span>
|
||||||
|
<span class="text-grey">{{ opt.nickname }}</span>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelect>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem class="q-mt-sm">
|
||||||
|
<QInput
|
||||||
|
:label="t('globals.changes')"
|
||||||
|
v-model="changeInput"
|
||||||
|
class="full-width"
|
||||||
|
clearable
|
||||||
|
clear-icon="close"
|
||||||
|
@keyup.enter="selectFilter('change')"
|
||||||
|
@focusout="selectFilter('change')"
|
||||||
|
@clear="selectFilter('change')"
|
||||||
|
>
|
||||||
|
<template #append>
|
||||||
|
<QIcon name="info" class="cursor-pointer">
|
||||||
|
<QTooltip max-width="250px">{{
|
||||||
|
t('tooltips.changes')
|
||||||
|
}}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</template>
|
||||||
|
</QInput>
|
||||||
|
</QItem>
|
||||||
|
<QItem
|
||||||
|
:class="index == 'create' ? 'q-mt-md' : 'q-mt-xs'"
|
||||||
|
v-for="(checkboxOption, index) in checkboxOptions"
|
||||||
|
:key="index"
|
||||||
>
|
>
|
||||||
<template #append>
|
<QCheckbox
|
||||||
<QIcon name="info" class="cursor-pointer">
|
size="sm"
|
||||||
<QTooltip max-width="250px">{{
|
v-model="checkboxOption.selected"
|
||||||
t('tooltips.changes')
|
:label="t(`actions.${checkboxOption.label}`)"
|
||||||
}}</QTooltip>
|
@update:model-value="selectFilter"
|
||||||
</QIcon>
|
/>
|
||||||
</template>
|
</QItem>
|
||||||
</QInput>
|
<QItem class="q-mt-sm">
|
||||||
</QItem>
|
<QInput
|
||||||
<QItem
|
class="full-width"
|
||||||
:class="index == 'create' ? 'q-mt-md' : 'q-mt-xs'"
|
:label="t('globals.date')"
|
||||||
v-for="(checkboxOption, index) in checkboxOptions"
|
@click="dateFromDialog = true"
|
||||||
:key="index"
|
@focus="(evt) => evt.target.blur()"
|
||||||
>
|
@clear="selectFilter('date', 'to')"
|
||||||
<QCheckbox
|
v-model="dateFrom"
|
||||||
size="sm"
|
clearable
|
||||||
v-model="checkboxOption.selected"
|
clear-icon="close"
|
||||||
:label="t(`actions.${checkboxOption.label}`)"
|
/>
|
||||||
@update:model-value="selectFilter"
|
</QItem>
|
||||||
/>
|
<QItem class="q-mt-sm">
|
||||||
</QItem>
|
<QInput
|
||||||
<QItem class="q-mt-sm">
|
class="full-width"
|
||||||
<QInput
|
:label="t('globals.to')"
|
||||||
class="full-width"
|
@click="dateToDialog = true"
|
||||||
:label="t('globals.date')"
|
@focus="(evt) => evt.target.blur()"
|
||||||
@click="dateFromDialog = true"
|
@clear="selectFilter('date', 'from')"
|
||||||
@focus="(evt) => evt.target.blur()"
|
v-model="dateTo"
|
||||||
@clear="selectFilter('date', 'to')"
|
clearable
|
||||||
v-model="dateFrom"
|
clear-icon="close"
|
||||||
clearable
|
/>
|
||||||
clear-icon="close"
|
</QItem>
|
||||||
/>
|
</QList>
|
||||||
</QItem>
|
</template>
|
||||||
<QItem class="q-mt-sm">
|
</RightMenu>
|
||||||
<QInput
|
|
||||||
class="full-width"
|
|
||||||
:label="t('to')"
|
|
||||||
@click="dateToDialog = true"
|
|
||||||
@focus="(evt) => evt.target.blur()"
|
|
||||||
@clear="selectFilter('date', 'from')"
|
|
||||||
v-model="dateTo"
|
|
||||||
clearable
|
|
||||||
clear-icon="close"
|
|
||||||
/>
|
|
||||||
</QItem>
|
|
||||||
</QList>
|
|
||||||
</Teleport>
|
|
||||||
<QDialog v-model="dateFromDialog">
|
<QDialog v-model="dateFromDialog">
|
||||||
<QDate
|
<QDate
|
||||||
:years-in-month-view="false"
|
:years-in-month-view="false"
|
||||||
|
@ -1053,9 +1059,9 @@ en:
|
||||||
Deletes: Deletes
|
Deletes: Deletes
|
||||||
Accesses: Accesses
|
Accesses: Accesses
|
||||||
Users:
|
Users:
|
||||||
User: Usuario
|
User: User
|
||||||
All: Todo
|
All: All
|
||||||
System: Sistema
|
System: System
|
||||||
properties:
|
properties:
|
||||||
id: ID
|
id: ID
|
||||||
claimFk: Claim ID
|
claimFk: Claim ID
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import RightMenu from './RightMenu.vue';
|
import RightAdvancedMenu from './RightAdvancedMenu.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import VnTableFilter from '../VnTable/VnTableFilter.vue';
|
import VnTableFilter from '../VnTable/VnTableFilter.vue';
|
||||||
import { onBeforeMount, computed, ref } from 'vue';
|
import { onBeforeMount, onMounted, onUnmounted, computed, ref } from 'vue';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { useHasContent } from 'src/composables/useHasContent';
|
import { useHasContent } from 'src/composables/useHasContent';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
@ -47,16 +47,14 @@ const $props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
let arrayData;
|
let arrayData;
|
||||||
const sectionValue = computed(() => $props.section ?? $props.dataKey);
|
const sectionValue = computed(() => $props.section ?? $props.dataKey);
|
||||||
const isMainSection = computed(() => {
|
const isMainSection = ref(false);
|
||||||
const isSame = sectionValue.value == route.name;
|
|
||||||
if (!isSame && arrayData) {
|
|
||||||
arrayData.reset(['userParams', 'userFilter']);
|
|
||||||
}
|
|
||||||
return isSame;
|
|
||||||
});
|
|
||||||
const searchbarId = 'section-searchbar';
|
const searchbarId = 'section-searchbar';
|
||||||
|
const advancedMenuSlot = 'advanced-menu';
|
||||||
const hasContent = useHasContent(`#${searchbarId}`);
|
const hasContent = useHasContent(`#${searchbarId}`);
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
@ -67,7 +65,27 @@ onBeforeMount(() => {
|
||||||
...$props.arrayDataProps,
|
...$props.arrayDataProps,
|
||||||
navigate: $props.redirect,
|
navigate: $props.redirect,
|
||||||
});
|
});
|
||||||
|
checkIsMain();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const unsubscribe = router.afterEach(() => {
|
||||||
|
checkIsMain();
|
||||||
|
});
|
||||||
|
onUnmounted(unsubscribe);
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (arrayData) arrayData.destroy();
|
||||||
|
});
|
||||||
|
|
||||||
|
function checkIsMain() {
|
||||||
|
isMainSection.value = sectionValue.value == route.name;
|
||||||
|
if (!isMainSection.value && arrayData) {
|
||||||
|
arrayData.reset(['userParams', 'filter']);
|
||||||
|
arrayData.setCurrentFilter();
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<slot name="searchbar">
|
<slot name="searchbar">
|
||||||
|
@ -80,9 +98,9 @@ onBeforeMount(() => {
|
||||||
/>
|
/>
|
||||||
<div :id="searchbarId"></div>
|
<div :id="searchbarId"></div>
|
||||||
</slot>
|
</slot>
|
||||||
<RightMenu>
|
<RightAdvancedMenu :is-main-section="isMainSection">
|
||||||
<template #right-panel v-if="$slots['rightMenu'] || rightFilter">
|
<template #advanced-menu v-if="$slots[advancedMenuSlot] || rightFilter">
|
||||||
<slot name="rightMenu">
|
<slot :name="advancedMenuSlot">
|
||||||
<VnTableFilter
|
<VnTableFilter
|
||||||
v-if="rightFilter && columns"
|
v-if="rightFilter && columns"
|
||||||
:data-key="dataKey"
|
:data-key="dataKey"
|
||||||
|
@ -91,7 +109,7 @@ onBeforeMount(() => {
|
||||||
/>
|
/>
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
</RightAdvancedMenu>
|
||||||
<slot name="body" v-if="isMainSection" />
|
<slot name="body" v-if="isMainSection" />
|
||||||
<RouterView v-else />
|
<RouterView v-else />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -27,7 +27,7 @@ const $props = defineProps({
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
optionLabel: {
|
optionLabel: {
|
||||||
type: [String],
|
type: [String, Function],
|
||||||
default: 'name',
|
default: 'name',
|
||||||
},
|
},
|
||||||
optionValue: {
|
optionValue: {
|
||||||
|
@ -232,12 +232,15 @@ async function fetchFilter(val) {
|
||||||
} else defaultWhere = { [key]: getVal(val) };
|
} else defaultWhere = { [key]: getVal(val) };
|
||||||
const where = { ...(val ? defaultWhere : {}), ...$props.where };
|
const where = { ...(val ? defaultWhere : {}), ...$props.where };
|
||||||
$props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val));
|
$props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val));
|
||||||
const fetchOptions = { where, include, limit };
|
const filterOptions = { where, include, limit };
|
||||||
if (fields) fetchOptions.fields = fields;
|
if (fields) filterOptions.fields = fields;
|
||||||
if (sortBy) fetchOptions.order = sortBy;
|
if (sortBy) filterOptions.order = sortBy;
|
||||||
arrayData.resetPagination();
|
arrayData.resetPagination();
|
||||||
|
|
||||||
const { data } = await arrayData.applyFilter({ filter: fetchOptions });
|
const { data } = await arrayData.applyFilter(
|
||||||
|
{ filter: filterOptions },
|
||||||
|
{ updateRouter: false }
|
||||||
|
);
|
||||||
setOptions(data);
|
setOptions(data);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +297,7 @@ async function onScroll({ to, direction, from, index }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ opts: myOptions });
|
defineExpose({ opts: myOptions, vnSelectRef });
|
||||||
|
|
||||||
function handleKeyDown(event) {
|
function handleKeyDown(event) {
|
||||||
if (event.key === 'Tab' && !event.shiftKey) {
|
if (event.key === 'Tab' && !event.shiftKey) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useRole } from 'src/composables/useRole';
|
import { useRole } from 'src/composables/useRole';
|
||||||
import { useAcl } from 'src/composables/useAcl';
|
import { useAcl } from 'src/composables/useAcl';
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
const emit = defineEmits(['update:modelValue']);
|
const emit = defineEmits(['update:modelValue']);
|
||||||
|
|
||||||
const value = defineModel({ type: [String, Number, Object] });
|
const value = defineModel({ type: [String, Number, Object] });
|
||||||
|
const select = ref(null);
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
rolesAllowedToCreate: {
|
rolesAllowedToCreate: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
@ -33,10 +34,13 @@ const isAllowedToCreate = computed(() => {
|
||||||
if ($props.acls.length) return acl.hasAny($props.acls);
|
if ($props.acls.length) return acl.hasAny($props.acls);
|
||||||
return role.hasAny($props.rolesAllowedToCreate);
|
return role.hasAny($props.rolesAllowedToCreate);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
defineExpose({ vnSelectDialogRef: select });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
ref="select"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
@update:model-value="(...args) => emit('update:modelValue', ...args)"
|
@update:model-value="(...args) => emit('update:modelValue', ...args)"
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
|
|
||||||
|
const model = defineModel({ type: [String, Number, Object] });
|
||||||
|
const url = 'Suppliers';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<VnSelect
|
||||||
|
:label="$t('globals.supplier')"
|
||||||
|
v-bind="$attrs"
|
||||||
|
v-model="model"
|
||||||
|
:url="url"
|
||||||
|
option-value="id"
|
||||||
|
option-label="nickname"
|
||||||
|
:fields="['id', 'name', 'nickname', 'nif']"
|
||||||
|
sort-by="name ASC"
|
||||||
|
>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel>
|
||||||
|
{{ scope.opt?.name }}
|
||||||
|
</QItemLabel>
|
||||||
|
<QItemLabel caption>
|
||||||
|
{{
|
||||||
|
`#${scope.opt?.id} , ${scope.opt?.nickname} (${scope.opt?.nif})`
|
||||||
|
}}
|
||||||
|
</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelect>
|
||||||
|
</template>
|
|
@ -9,9 +9,9 @@ const $props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
hasInfo: {
|
info: {
|
||||||
type: Boolean,
|
type: String,
|
||||||
default: false,
|
default: undefined,
|
||||||
},
|
},
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: [String, Number, Object],
|
type: [String, Number, Object],
|
||||||
|
@ -53,13 +53,14 @@ const url = computed(() => {
|
||||||
:fields="['id', 'name', 'nickname', 'code']"
|
:fields="['id', 'name', 'nickname', 'code']"
|
||||||
:filter-options="['id', 'name', 'nickname', 'code']"
|
:filter-options="['id', 'name', 'nickname', 'code']"
|
||||||
sort-by="nickname ASC"
|
sort-by="nickname ASC"
|
||||||
|
data-cy="vnWorkerSelect"
|
||||||
>
|
>
|
||||||
<template #prepend v-if="$props.hasAvatar">
|
<template #prepend v-if="$props.hasAvatar">
|
||||||
<VnAvatar :worker-id="value" color="primary" :title="title" />
|
<VnAvatar :worker-id="value" color="primary" v-bind="$attrs" />
|
||||||
</template>
|
</template>
|
||||||
<template #append v-if="$props.hasInfo">
|
<template #append v-if="$props.info">
|
||||||
<QIcon name="info" class="cursor-pointer">
|
<QIcon name="info" class="cursor-pointer">
|
||||||
<QTooltip>{{ $t($props.hasInfo) }}</QTooltip>
|
<QTooltip>{{ $t($props.info) }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</template>
|
</template>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
|
@ -72,7 +73,8 @@ const url = computed(() => {
|
||||||
{{ scope.opt.nickname }}
|
{{ scope.opt.nickname }}
|
||||||
</QItemLabel>
|
</QItemLabel>
|
||||||
<QItemLabel caption v-else>
|
<QItemLabel caption v-else>
|
||||||
#{{ scope.opt.id }}, {{ scope.opt.nickname }}, {{ scope.opt.code }}
|
#{{ scope.opt.id }}, {{ scope.opt.nickname }},
|
||||||
|
{{ scope.opt.code }}
|
||||||
</QItemLabel>
|
</QItemLabel>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -10,6 +10,10 @@ defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: 'md-width',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
defineEmits([...useDialogPluginComponent.emits]);
|
defineEmits([...useDialogPluginComponent.emits]);
|
||||||
|
@ -17,7 +21,19 @@ defineEmits([...useDialogPluginComponent.emits]);
|
||||||
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QDialog ref="dialogRef" @hide="onDialogHide" full-width>
|
<QDialog ref="dialogRef" @hide="onDialogHide">
|
||||||
<component :is="summary" :id="id" />
|
<component :is="summary" :id="id" :class="width" />
|
||||||
</QDialog>
|
</QDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.md-width {
|
||||||
|
max-width: $width-md;
|
||||||
|
}
|
||||||
|
.lg-width {
|
||||||
|
max-width: $width-lg;
|
||||||
|
}
|
||||||
|
.xlg-width {
|
||||||
|
max-width: $width-xl;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -0,0 +1,146 @@
|
||||||
|
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||||
|
import { vi, afterEach, beforeEach, beforeAll, describe, expect, it } from 'vitest';
|
||||||
|
import VnDms from 'src/components/common/VnDms.vue';
|
||||||
|
|
||||||
|
class MockFormData {
|
||||||
|
constructor() {
|
||||||
|
this.entries = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
append(key, value) {
|
||||||
|
if (!key) {
|
||||||
|
throw new Error('Key is required for FormData.append');
|
||||||
|
}
|
||||||
|
this.entries[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
get(key) {
|
||||||
|
return this.entries[key] || null;
|
||||||
|
}
|
||||||
|
|
||||||
|
getAll() {
|
||||||
|
return this.entries;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
global.FormData = MockFormData;
|
||||||
|
|
||||||
|
describe('VnDms', () => {
|
||||||
|
let wrapper;
|
||||||
|
let vm;
|
||||||
|
let postMock;
|
||||||
|
|
||||||
|
const postResponseMock = { data: { success: true } };
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
hasFile: true,
|
||||||
|
hasFileAttached: true,
|
||||||
|
reference: 'DMS-test',
|
||||||
|
warehouseFk: 1,
|
||||||
|
companyFk: 2,
|
||||||
|
dmsTypeFk: 3,
|
||||||
|
description: 'This is a test description',
|
||||||
|
files: { name: 'example.txt', content: new Blob(['file content'], { type: 'text/plain' })},
|
||||||
|
};
|
||||||
|
|
||||||
|
const expectedBody = {
|
||||||
|
hasFile: true,
|
||||||
|
hasFileAttached: true,
|
||||||
|
reference: 'DMS-test',
|
||||||
|
warehouseId: 1,
|
||||||
|
companyId: 2,
|
||||||
|
dmsTypeId: 3,
|
||||||
|
description: 'This is a test description',
|
||||||
|
};
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
wrapper = createWrapper(VnDms, {
|
||||||
|
propsData: {
|
||||||
|
url: '/test',
|
||||||
|
formInitialData: { id: 1, reference: 'test' },
|
||||||
|
model: 'Worker',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
wrapper = wrapper.wrapper;
|
||||||
|
vm = wrapper.vm;
|
||||||
|
vi.spyOn(vm, '$emit');
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
postMock = vi.spyOn(axios, 'post').mockResolvedValue(postResponseMock);
|
||||||
|
vm.dms = data;
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
vi.clearAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('mapperDms', () => {
|
||||||
|
it('should map DMS data correctly and add file to FormData', () => {
|
||||||
|
const [formData, params] = vm.mapperDms(data);
|
||||||
|
|
||||||
|
expect(formData.get('example.txt')).toBe(data.files);
|
||||||
|
expect(expectedBody).toEqual(params.params);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should map DMS data correctly without file', () => {
|
||||||
|
delete data.files;
|
||||||
|
|
||||||
|
const [formData, params] = vm.mapperDms(data);
|
||||||
|
|
||||||
|
expect(formData.getAll()).toEqual({});
|
||||||
|
expect(expectedBody).toEqual(params.params);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getUrl', () => {
|
||||||
|
it('should returns prop url when is set', async () => {
|
||||||
|
expect(vm.getUrl()).toBe('/test');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should returns url dms/"props.formInitialData.id"/updateFile when prop url is null', async () => {
|
||||||
|
await wrapper.setProps({ url: null });
|
||||||
|
expect(vm.getUrl()).toBe('dms/1/updateFile');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should returns url "props.model"/"route.params.id"/uploadFile when formInitialData is null', async () => {
|
||||||
|
await wrapper.setProps({ formInitialData: null });
|
||||||
|
vm.route.params.id = '123';
|
||||||
|
expect(vm.getUrl()).toBe('Worker/123/uploadFile');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('save', () => {
|
||||||
|
it('should save data correctly', async () => {
|
||||||
|
await vm.save();
|
||||||
|
expect(postMock).toHaveBeenCalledWith(vm.getUrl(), expect.any(FormData), { params: expectedBody });
|
||||||
|
expect(wrapper.emitted('onDataSaved')).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('defaultData', () => {
|
||||||
|
it('should set dms with formInitialData', async () => {
|
||||||
|
const testData = {
|
||||||
|
hasFile: false,
|
||||||
|
hasFileAttached: false,
|
||||||
|
reference: 'defaultData-test',
|
||||||
|
warehouseFk: 2,
|
||||||
|
companyFk: 3,
|
||||||
|
dmsTypeFk: 2,
|
||||||
|
description: 'This is a test description'
|
||||||
|
}
|
||||||
|
await wrapper.setProps({ formInitialData: testData });
|
||||||
|
vm.defaultData();
|
||||||
|
|
||||||
|
expect(vm.dms).toEqual(testData);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should add reference with "route.params.id" to dms if formInitialData is null', async () => {
|
||||||
|
await wrapper.setProps({ formInitialData: null });
|
||||||
|
vm.route.params.id= '111';
|
||||||
|
vm.defaultData();
|
||||||
|
|
||||||
|
expect(vm.dms.reference).toBe('111');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,91 @@
|
||||||
|
import { createWrapper } from 'app/test/vitest/helper';
|
||||||
|
import { vi, describe, expect, it } from 'vitest';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
|
|
||||||
|
describe('VnInput', () => {
|
||||||
|
let vm;
|
||||||
|
let wrapper;
|
||||||
|
let input;
|
||||||
|
|
||||||
|
function generateWrapper(value, isOutlined, emptyToNull, insertable) {
|
||||||
|
wrapper = createWrapper(VnInput, {
|
||||||
|
props: {
|
||||||
|
modelValue: value,
|
||||||
|
isOutlined, emptyToNull, insertable,
|
||||||
|
maxlength: 101
|
||||||
|
},
|
||||||
|
attrs: {
|
||||||
|
label: 'test',
|
||||||
|
required: true,
|
||||||
|
maxlength: 101,
|
||||||
|
maxLength: 10,
|
||||||
|
'max-length':20
|
||||||
|
},
|
||||||
|
});
|
||||||
|
wrapper = wrapper.wrapper;
|
||||||
|
vm = wrapper.vm;
|
||||||
|
input = wrapper.find('[data-cy="test_input"]');
|
||||||
|
};
|
||||||
|
|
||||||
|
describe('value', () => {
|
||||||
|
it('should emit update:modelValue when value changes', async () => {
|
||||||
|
generateWrapper('12345', false, false, true)
|
||||||
|
await input.setValue('123');
|
||||||
|
expect(wrapper.emitted('update:modelValue')).toBeTruthy();
|
||||||
|
expect(wrapper.emitted('update:modelValue')[0]).toEqual(['123']);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should emit update:modelValue with null when input is empty', async () => {
|
||||||
|
generateWrapper('12345', false, true, true);
|
||||||
|
await input.setValue('');
|
||||||
|
expect(wrapper.emitted('update:modelValue')[0]).toEqual([null]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('styleAttrs', () => {
|
||||||
|
it('should return empty styleAttrs when isOutlined is false', async () => {
|
||||||
|
generateWrapper('123', false, false, false);
|
||||||
|
expect(vm.styleAttrs).toEqual({});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should set styleAttrs when isOutlined is true', async () => {
|
||||||
|
generateWrapper('123', true, false, false);
|
||||||
|
expect(vm.styleAttrs.outlined).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('handleKeydown', () => {
|
||||||
|
it('should do nothing when "Backspace" key is pressed', async () => {
|
||||||
|
generateWrapper('12345', false, false, true);
|
||||||
|
await input.trigger('keydown', { key: 'Backspace' });
|
||||||
|
expect(wrapper.emitted('update:modelValue')).toBeUndefined();
|
||||||
|
const spyhandler = vi.spyOn(vm, 'handleInsertMode');
|
||||||
|
expect(spyhandler).not.toHaveBeenCalled();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO: #8399 REDMINE
|
||||||
|
*/
|
||||||
|
it.skip('handleKeydown respects insertable behavior', async () => {
|
||||||
|
const expectedValue = '12345';
|
||||||
|
generateWrapper('1234', false, false, true);
|
||||||
|
vm.focus()
|
||||||
|
await input.trigger('keydown', { key: '5' });
|
||||||
|
await vm.$nextTick();
|
||||||
|
expect(wrapper.emitted('update:modelValue')).toBeTruthy();
|
||||||
|
expect(wrapper.emitted('update:modelValue')[0]).toEqual([expectedValue ]);
|
||||||
|
expect(vm.value).toBe( expectedValue);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('focus', () => {
|
||||||
|
it('should call focus method when input is focused', async () => {
|
||||||
|
generateWrapper('123', false, false, true);
|
||||||
|
const focusSpy = vi.spyOn(input.element, 'focus');
|
||||||
|
vm.focus();
|
||||||
|
expect(focusSpy).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -37,6 +37,10 @@ const $props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: 'md-width',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const state = useState();
|
const state = useState();
|
||||||
|
@ -128,9 +132,8 @@ const toModule = computed(() =>
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QBtn></slot
|
</QBtn></slot
|
||||||
>
|
>
|
||||||
|
|
||||||
<QBtn
|
<QBtn
|
||||||
@click.stop="viewSummary(entity.id, $props.summary)"
|
@click.stop="viewSummary(entity.id, $props.summary, $props.width)"
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
|
@ -175,7 +175,7 @@ async function fetch() {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.header.link:hover {
|
.header.link:hover {
|
||||||
color: lighten($primary, 20%);
|
color: rgba(var(--q-primary), 0.8);
|
||||||
}
|
}
|
||||||
.q-checkbox {
|
.q-checkbox {
|
||||||
& .q-checkbox__label {
|
& .q-checkbox__label {
|
||||||
|
|
|
@ -41,7 +41,7 @@ const card = toRef(props, 'item');
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<span class="link">
|
<span class="link" @click.stop>
|
||||||
{{ card.name }}
|
{{ card.name }}
|
||||||
<ItemDescriptorProxy :id="card.id" />
|
<ItemDescriptorProxy :id="card.id" />
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
import '@quasar/quasar-ui-qcalendar/src/QCalendarVariables.sass';
|
import '@quasar/quasar-ui-qcalendar/src/QCalendarVariables.scss';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
bordered: {
|
bordered: {
|
||||||
|
|
|
@ -190,7 +190,10 @@ const getLocale = (label) => {
|
||||||
const globalLocale = `globals.params.${param}`;
|
const globalLocale = `globals.params.${param}`;
|
||||||
if (te(globalLocale)) return t(globalLocale);
|
if (te(globalLocale)) return t(globalLocale);
|
||||||
else if (te(t(`params.${param}`)));
|
else if (te(t(`params.${param}`)));
|
||||||
else return t(`${route.meta.moduleName.toLowerCase()}.params.${param}`);
|
else {
|
||||||
|
const camelCaseModuleName = route.meta.moduleName.charAt(0).toLowerCase() + route.meta.moduleName.slice(1);
|
||||||
|
return t(`${camelCaseModuleName}.params.${param}`);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,10 @@ const props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
keyData: {
|
||||||
|
type: String,
|
||||||
|
default: undefined,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['onFetch', 'onPaginate', 'onChange']);
|
const emit = defineEmits(['onFetch', 'onPaginate', 'onChange']);
|
||||||
|
@ -119,7 +123,7 @@ watch(
|
||||||
() => props.data,
|
() => props.data,
|
||||||
() => {
|
() => {
|
||||||
store.data = props.data;
|
store.data = props.data;
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
@ -128,12 +132,12 @@ watch(
|
||||||
if (!mounted.value) return;
|
if (!mounted.value) return;
|
||||||
emit('onChange', data);
|
emit('onChange', data);
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => [props.url, props.filter],
|
() => [props.url, props.filter],
|
||||||
([url, filter]) => mounted.value && fetch({ url, filter })
|
([url, filter]) => mounted.value && fetch({ url, filter }),
|
||||||
);
|
);
|
||||||
const addFilter = async (filter, params) => {
|
const addFilter = async (filter, params) => {
|
||||||
await arrayData.addFilter({ filter, params });
|
await arrayData.addFilter({ filter, params });
|
||||||
|
@ -166,7 +170,7 @@ function emitStoreData() {
|
||||||
async function paginate() {
|
async function paginate() {
|
||||||
const { page, rowsPerPage, sortBy, descending } = pagination.value;
|
const { page, rowsPerPage, sortBy, descending } = pagination.value;
|
||||||
|
|
||||||
if (!props.url) return;
|
if (!arrayData.store.url) return;
|
||||||
|
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
await arrayData.loadMore();
|
await arrayData.loadMore();
|
||||||
|
@ -194,7 +198,7 @@ function endPagination() {
|
||||||
async function onLoad(index, done) {
|
async function onLoad(index, done) {
|
||||||
if (!store.data || !mounted.value) return done();
|
if (!store.data || !mounted.value) return done();
|
||||||
|
|
||||||
if (store.data.length === 0 || !props.url) return done(false);
|
if (store.data.length === 0 || !arrayData.store.url) return done(false);
|
||||||
|
|
||||||
pagination.value.page = pagination.value.page + 1;
|
pagination.value.page = pagination.value.page + 1;
|
||||||
|
|
||||||
|
@ -255,7 +259,7 @@ defineExpose({
|
||||||
:disable="disableInfiniteScroll || !store.hasMoreData"
|
:disable="disableInfiniteScroll || !store.hasMoreData"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
>
|
>
|
||||||
<slot name="body" :rows="store.data"></slot>
|
<slot name="body" :rows="keyData ? store.data[keyData] : store.data"></slot>
|
||||||
<div v-if="isLoading" class="spinner info-row q-pa-md text-center">
|
<div v-if="isLoading" class="spinner info-row q-pa-md text-center">
|
||||||
<QSpinner color="primary" size="md" />
|
<QSpinner color="primary" size="md" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -102,7 +102,7 @@ watch(
|
||||||
(val) => {
|
(val) => {
|
||||||
arrayData = useArrayData(val, { ...props });
|
arrayData = useArrayData(val, { ...props });
|
||||||
store = arrayData.store;
|
store = arrayData.store;
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -113,23 +113,20 @@ onMounted(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
async function search() {
|
async function search() {
|
||||||
const staticParams = Object.keys(store.userParams ?? {}).length
|
|
||||||
? store.userParams
|
|
||||||
: store.defaultParams;
|
|
||||||
arrayData.resetPagination();
|
arrayData.resetPagination();
|
||||||
|
|
||||||
const filter = {
|
let filter = { params: { search: searchText.value } };
|
||||||
params: {
|
|
||||||
search: searchText.value,
|
|
||||||
},
|
|
||||||
filter: props.filter,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!props.searchRemoveParams || !searchText.value) {
|
if (!props.searchRemoveParams || !searchText.value) {
|
||||||
filter.params = {
|
filter = {
|
||||||
...staticParams,
|
params: {
|
||||||
search: searchText.value,
|
...store.userParams,
|
||||||
|
search: searchText.value,
|
||||||
|
},
|
||||||
|
filter: store.filter,
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
arrayData.reset(['currentFilter', 'userParams']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.whereFilter) {
|
if (props.whereFilter) {
|
||||||
|
@ -179,6 +176,7 @@ async function search() {
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t(props.info) }}</QTooltip>
|
<QTooltip>{{ t(props.info) }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
<div id="searchbar-after"></div>
|
||||||
</template>
|
</template>
|
||||||
</VnInput>
|
</VnInput>
|
||||||
</QForm>
|
</QForm>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { defineProps, ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
import { vi, describe, expect, it, beforeEach, afterEach } from 'vitest';
|
||||||
|
import { createWrapper } from 'app/test/vitest/helper';
|
||||||
|
import VnImg from 'src/components/ui/VnImg.vue';
|
||||||
|
|
||||||
|
let wrapper;
|
||||||
|
let vm;
|
||||||
|
const isEmployeeMock = vi.fn();
|
||||||
|
|
||||||
|
function generateWrapper(storage = 'images') {
|
||||||
|
wrapper = createWrapper(VnImg, {
|
||||||
|
props: {
|
||||||
|
id: 123,
|
||||||
|
zoomResolution: '400x400',
|
||||||
|
storage,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
wrapper = wrapper.wrapper;
|
||||||
|
vm = wrapper.vm;
|
||||||
|
vm.timeStamp = 'timestamp';
|
||||||
|
};
|
||||||
|
|
||||||
|
vi.mock('src/composables/useSession', () => ({
|
||||||
|
useSession: () => ({
|
||||||
|
getTokenMultimedia: () => 'token',
|
||||||
|
}),
|
||||||
|
}));
|
||||||
|
|
||||||
|
vi.mock('src/composables/useRole', () => ({
|
||||||
|
useRole: () => ({
|
||||||
|
isEmployee: isEmployeeMock,
|
||||||
|
}),
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
describe('VnImg', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
isEmployeeMock.mockReset();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
vi.clearAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getUrl', () => {
|
||||||
|
it('should return /api/{storage}/{id}/downloadFile?access_token={token} when storage is dms', async () => {
|
||||||
|
isEmployeeMock.mockReturnValue(false);
|
||||||
|
generateWrapper('dms');
|
||||||
|
await vm.$nextTick();
|
||||||
|
const url = vm.getUrl();
|
||||||
|
expect(url).toBe('/api/dms/123/downloadFile?access_token=token');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return /no-user.png when role is not employee and storage is not dms', async () => {
|
||||||
|
isEmployeeMock.mockReturnValue(false);
|
||||||
|
generateWrapper();
|
||||||
|
await vm.$nextTick();
|
||||||
|
const url = vm.getUrl();
|
||||||
|
expect(url).toBe('/no-user.png');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return /api/{storage}/{collection}/{curResolution}/{id}/download?access_token={token}&{timeStamp} when zoom is false and role is employee and storage is not dms', async () => {
|
||||||
|
isEmployeeMock.mockReturnValue(true);
|
||||||
|
generateWrapper();
|
||||||
|
await vm.$nextTick();
|
||||||
|
const url = vm.getUrl();
|
||||||
|
expect(url).toBe('/api/images/catalog/200x200/123/download?access_token=token×tamp');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return /api/{storage}/{collection}/{curResolution}/{id}/download?access_token={token}&{timeStamp} when zoom is true and role is employee and storage is not dms', async () => {
|
||||||
|
isEmployeeMock.mockReturnValue(true);
|
||||||
|
generateWrapper();
|
||||||
|
await vm.$nextTick();
|
||||||
|
const url = vm.getUrl(true);
|
||||||
|
expect(url).toBe('/api/images/catalog/400x400/123/download?access_token=token×tamp');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('reload', () => {
|
||||||
|
it('should update the timestamp', async () => {
|
||||||
|
generateWrapper();
|
||||||
|
const initialTimestamp = wrapper.vm.timeStamp;
|
||||||
|
|
||||||
|
wrapper.vm.reload();
|
||||||
|
const newTimestamp = wrapper.vm.timeStamp;
|
||||||
|
|
||||||
|
expect(initialTimestamp).not.toEqual(newTimestamp);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,71 @@
|
||||||
|
import { vi, describe, expect, it, beforeEach, afterEach } from 'vitest';
|
||||||
|
import { createWrapper } from 'app/test/vitest/helper';
|
||||||
|
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||||
|
|
||||||
|
describe('VnSearchbar', () => {
|
||||||
|
let vm;
|
||||||
|
let wrapper;
|
||||||
|
let applyFilterSpy;
|
||||||
|
const searchText = 'Bolas de madera';
|
||||||
|
const userParams = {staticKey: 'staticValue'};
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
wrapper = createWrapper(VnSearchbar, {
|
||||||
|
propsData: {
|
||||||
|
dataKey: 'testKey',
|
||||||
|
filter: null,
|
||||||
|
whereFilter: null,
|
||||||
|
searchRemoveParams: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
wrapper = wrapper.wrapper;
|
||||||
|
vm = wrapper.vm;
|
||||||
|
|
||||||
|
vm.searchText = searchText;
|
||||||
|
vm.arrayData.store.userParams = userParams;
|
||||||
|
applyFilterSpy = vi.spyOn(vm.arrayData, 'applyFilter').mockImplementation(() => {});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
vi.clearAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('search resets pagination and applies filter', async () => {
|
||||||
|
const resetPaginationSpy = vi.spyOn(vm.arrayData, 'resetPagination').mockImplementation(() => {});
|
||||||
|
await vm.search();
|
||||||
|
|
||||||
|
expect(resetPaginationSpy).toHaveBeenCalled();
|
||||||
|
expect(applyFilterSpy).toHaveBeenCalledWith({
|
||||||
|
params: { search: searchText },
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('search includes static params if searchRemoveParams is false', async () => {
|
||||||
|
wrapper.setProps({ searchRemoveParams: false });
|
||||||
|
await vm.$nextTick();
|
||||||
|
await vm.search();
|
||||||
|
|
||||||
|
expect(applyFilterSpy).toHaveBeenCalledWith({
|
||||||
|
params: { staticKey: 'staticValue', search: searchText },
|
||||||
|
filter: {skip: 0},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('updates store when dataKey changes', async () => {
|
||||||
|
expect(vm.store.userParams).toEqual(userParams);
|
||||||
|
wrapper.setProps({ dataKey: 'newTestKey' });
|
||||||
|
await vm.$nextTick();
|
||||||
|
expect(vm.store.userParams).toEqual({});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('computes the "to" property correctly for redirection', () => {
|
||||||
|
vm.arrayData.store.searchUrl = 'searchParam';
|
||||||
|
vm.arrayData.store.currentFilter = { category: 'plants' };
|
||||||
|
const expectedQuery = JSON.stringify({
|
||||||
|
...vm.arrayData.store.currentFilter,
|
||||||
|
search: searchText,
|
||||||
|
});
|
||||||
|
expect(vm.to.query.searchParam).toBe(expectedQuery);
|
||||||
|
});
|
||||||
|
});
|
|
@ -9,7 +9,7 @@ const arrayDataStore = useArrayDataStore();
|
||||||
|
|
||||||
export function useArrayData(key, userOptions) {
|
export function useArrayData(key, userOptions) {
|
||||||
key ??= useRoute().meta.moduleName;
|
key ??= useRoute().meta.moduleName;
|
||||||
|
|
||||||
if (!key) throw new Error('ArrayData: A key is required to use this composable');
|
if (!key) throw new Error('ArrayData: A key is required to use this composable');
|
||||||
|
|
||||||
if (!arrayDataStore.get(key)) arrayDataStore.set(key);
|
if (!arrayDataStore.get(key)) arrayDataStore.set(key);
|
||||||
|
@ -33,10 +33,11 @@ export function useArrayData(key, userOptions) {
|
||||||
: JSON.parse(params?.filter ?? '{}');
|
: JSON.parse(params?.filter ?? '{}');
|
||||||
delete params.filter;
|
delete params.filter;
|
||||||
|
|
||||||
store.userParams = { ...store.userParams, ...params };
|
store.userParams = params;
|
||||||
store.filter = { ...filter, ...store.userFilter };
|
store.filter = { ...filter, ...store.userFilter };
|
||||||
if (filter?.order) store.order = filter.order;
|
if (filter?.order) store.order = filter.order;
|
||||||
}
|
}
|
||||||
|
setCurrentFilter();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (key && userOptions) setOptions();
|
if (key && userOptions) setOptions();
|
||||||
|
@ -78,11 +79,7 @@ export function useArrayData(key, userOptions) {
|
||||||
|
|
||||||
cancelRequest();
|
cancelRequest();
|
||||||
canceller = new AbortController();
|
canceller = new AbortController();
|
||||||
const { params, limit } = getCurrentFilter();
|
const { params, limit } = setCurrentFilter();
|
||||||
|
|
||||||
store.currentFilter = JSON.parse(JSON.stringify(params));
|
|
||||||
delete store.currentFilter.filter.include;
|
|
||||||
store.currentFilter.filter = JSON.stringify(store.currentFilter.filter);
|
|
||||||
|
|
||||||
let exprFilter;
|
let exprFilter;
|
||||||
if (store?.exprBuilder) {
|
if (store?.exprBuilder) {
|
||||||
|
@ -107,7 +104,7 @@ export function useArrayData(key, userOptions) {
|
||||||
store.hasMoreData = limit && response.data.length >= limit;
|
store.hasMoreData = limit && response.data.length >= limit;
|
||||||
|
|
||||||
if (!append && !isDialogOpened() && updateRouter) {
|
if (!append && !isDialogOpened() && updateRouter) {
|
||||||
if (updateStateParams(response.data)?.redirect) return;
|
if (updateStateParams(response.data)?.redirect && !store.keepData) return;
|
||||||
}
|
}
|
||||||
store.isLoading = false;
|
store.isLoading = false;
|
||||||
canceller = null;
|
canceller = null;
|
||||||
|
@ -142,12 +139,12 @@ export function useArrayData(key, userOptions) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function applyFilter({ filter, params }) {
|
async function applyFilter({ filter, params }, fetchOptions = {}) {
|
||||||
if (filter) store.userFilter = filter;
|
if (filter) store.userFilter = filter;
|
||||||
store.filter = {};
|
store.filter = {};
|
||||||
if (params) store.userParams = { ...params };
|
if (params) store.userParams = { ...params };
|
||||||
|
|
||||||
const response = await fetch({});
|
const response = await fetch(fetchOptions);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,10 +170,9 @@ export function useArrayData(key, userOptions) {
|
||||||
|
|
||||||
async function addOrder(field, direction = 'ASC') {
|
async function addOrder(field, direction = 'ASC') {
|
||||||
const newOrder = field + ' ' + direction;
|
const newOrder = field + ' ' + direction;
|
||||||
let order = store.order || [];
|
const order = toArray(store.order);
|
||||||
if (typeof order == 'string') order = [order];
|
|
||||||
|
|
||||||
let index = order.findIndex((o) => o.split(' ')[0] === field);
|
let index = getOrderIndex(order, field);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
order[index] = newOrder;
|
order[index] = newOrder;
|
||||||
} else {
|
} else {
|
||||||
|
@ -193,16 +189,24 @@ export function useArrayData(key, userOptions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteOrder(field) {
|
async function deleteOrder(field) {
|
||||||
let order = store.order ?? [];
|
const order = toArray(store.order);
|
||||||
if (typeof order == 'string') order = [order];
|
const index = getOrderIndex(order, field);
|
||||||
|
|
||||||
const index = order.findIndex((o) => o.split(' ')[0] === field);
|
|
||||||
if (index > -1) order.splice(index, 1);
|
if (index > -1) order.splice(index, 1);
|
||||||
|
|
||||||
store.order = order;
|
store.order = order;
|
||||||
fetch({});
|
fetch({});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getOrderIndex(order, field) {
|
||||||
|
return order.findIndex((o) => o.split(' ')[0] === field);
|
||||||
|
}
|
||||||
|
|
||||||
|
function toArray(str = []) {
|
||||||
|
if (!str) return [];
|
||||||
|
if (Array.isArray(str)) return str;
|
||||||
|
if (typeof str === 'string') return str.split(',').map((item) => item.trim());
|
||||||
|
}
|
||||||
|
|
||||||
function sanitizerParams(params, exprBuilder) {
|
function sanitizerParams(params, exprBuilder) {
|
||||||
for (const param in params) {
|
for (const param in params) {
|
||||||
if (params[param] === '' || params[param] === null) {
|
if (params[param] === '' || params[param] === null) {
|
||||||
|
@ -276,14 +280,14 @@ export function useArrayData(key, userOptions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCurrentFilter() {
|
function getCurrentFilter() {
|
||||||
|
if (!Object.keys(store.userParams).length)
|
||||||
|
store.userParams = store.defaultParams ?? {};
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
limit: store.limit,
|
limit: store.limit,
|
||||||
|
...store.userFilter,
|
||||||
};
|
};
|
||||||
|
|
||||||
let userParams = { ...store.userParams };
|
|
||||||
|
|
||||||
Object.assign(filter, store.userFilter);
|
|
||||||
|
|
||||||
let where;
|
let where;
|
||||||
if (filter?.where || store.filter?.where)
|
if (filter?.where || store.filter?.where)
|
||||||
where = Object.assign(filter?.where ?? {}, store.filter?.where ?? {});
|
where = Object.assign(filter?.where ?? {}, store.filter?.where ?? {});
|
||||||
|
@ -291,15 +295,22 @@ export function useArrayData(key, userOptions) {
|
||||||
filter.where = where;
|
filter.where = where;
|
||||||
const params = { filter };
|
const params = { filter };
|
||||||
|
|
||||||
Object.assign(params, userParams);
|
Object.assign(params, store.userParams);
|
||||||
if (params.filter) params.filter.skip = store.skip;
|
if (params.filter) params.filter.skip = store.skip;
|
||||||
if (store?.order && typeof store?.order == 'string') store.order = [store.order];
|
if (store.order) params.filter.order = toArray(store.order);
|
||||||
if (store.order?.length) params.filter.order = [...store.order];
|
|
||||||
else delete params.filter.order;
|
else delete params.filter.order;
|
||||||
|
|
||||||
return { filter, params, limit: filter.limit };
|
return { filter, params, limit: filter.limit };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setCurrentFilter() {
|
||||||
|
const { params, limit } = getCurrentFilter();
|
||||||
|
store.currentFilter = JSON.parse(JSON.stringify(params));
|
||||||
|
delete store.currentFilter.filter.include;
|
||||||
|
store.currentFilter.filter = JSON.stringify(store.currentFilter.filter);
|
||||||
|
return { params, limit };
|
||||||
|
}
|
||||||
|
|
||||||
function processData(data, { map = true, append = true }) {
|
function processData(data, { map = true, append = true }) {
|
||||||
if (!append) {
|
if (!append) {
|
||||||
store.data = [];
|
store.data = [];
|
||||||
|
@ -333,6 +344,7 @@ export function useArrayData(key, userOptions) {
|
||||||
applyFilter,
|
applyFilter,
|
||||||
addFilter,
|
addFilter,
|
||||||
getCurrentFilter,
|
getCurrentFilter,
|
||||||
|
setCurrentFilter,
|
||||||
addFilterWhere,
|
addFilterWhere,
|
||||||
addOrder,
|
addOrder,
|
||||||
deleteOrder,
|
deleteOrder,
|
||||||
|
|
|
@ -29,8 +29,12 @@ export function useFilterParams(key) {
|
||||||
orders.value = orderObject;
|
orders.value = orderObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setUserParams(watchedParams) {
|
function setUserParams(watchedParams = {}) {
|
||||||
if (!watchedParams || Object.keys(watchedParams).length == 0) return;
|
if (Object.keys(watchedParams).length == 0) {
|
||||||
|
params.value = {};
|
||||||
|
orders.value = {};
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof watchedParams == 'string') watchedParams = JSON.parse(watchedParams);
|
if (typeof watchedParams == 'string') watchedParams = JSON.parse(watchedParams);
|
||||||
if (typeof watchedParams?.filter == 'string')
|
if (typeof watchedParams?.filter == 'string')
|
||||||
|
|
|
@ -5,7 +5,7 @@ export function useHasContent(selector) {
|
||||||
const hasContent = ref();
|
const hasContent = ref();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
container.value = document.querySelector(selector);
|
container.value = document?.querySelector(selector);
|
||||||
if (!container.value) return;
|
if (!container.value) return;
|
||||||
|
|
||||||
const observer = new MutationObserver(() => {
|
const observer = new MutationObserver(() => {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import axios from 'axios';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import useNotify from './useNotify';
|
import useNotify from './useNotify';
|
||||||
import { useTokenConfig } from './useTokenConfig';
|
import { useTokenConfig } from './useTokenConfig';
|
||||||
|
import { getToken, getTokenMultimedia } from 'src/utils/session';
|
||||||
const TOKEN_MULTIMEDIA = 'tokenMultimedia';
|
const TOKEN_MULTIMEDIA = 'tokenMultimedia';
|
||||||
const TOKEN = 'token';
|
const TOKEN = 'token';
|
||||||
|
|
||||||
|
@ -15,19 +16,6 @@ export function useSession() {
|
||||||
let isCheckingToken = false;
|
let isCheckingToken = false;
|
||||||
let intervalId = null;
|
let intervalId = null;
|
||||||
|
|
||||||
function getToken() {
|
|
||||||
const localToken = localStorage.getItem(TOKEN);
|
|
||||||
const sessionToken = sessionStorage.getItem(TOKEN);
|
|
||||||
|
|
||||||
return localToken || sessionToken || '';
|
|
||||||
}
|
|
||||||
function getTokenMultimedia() {
|
|
||||||
const localTokenMultimedia = localStorage.getItem(TOKEN_MULTIMEDIA);
|
|
||||||
const sessionTokenMultimedia = sessionStorage.getItem(TOKEN_MULTIMEDIA);
|
|
||||||
|
|
||||||
return localTokenMultimedia || sessionTokenMultimedia || '';
|
|
||||||
}
|
|
||||||
|
|
||||||
function setSession(data) {
|
function setSession(data) {
|
||||||
let keepLogin = data.keepLogin;
|
let keepLogin = data.keepLogin;
|
||||||
const storage = keepLogin ? localStorage : sessionStorage;
|
const storage = keepLogin ? localStorage : sessionStorage;
|
||||||
|
|
|
@ -4,10 +4,10 @@ import { useQuasar } from 'quasar';
|
||||||
export function useSummaryDialog() {
|
export function useSummaryDialog() {
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
|
||||||
function viewSummary(id, summary) {
|
function viewSummary(id, summary, width) {
|
||||||
quasar.dialog({
|
quasar.dialog({
|
||||||
component: VnSummaryDialog,
|
component: VnSummaryDialog,
|
||||||
componentProps: { id, summary },
|
componentProps: { id, summary, width },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// app global css in SCSS form
|
// app global css in SCSS form
|
||||||
@import './icons.scss';
|
@import './icons.scss';
|
||||||
@import '@quasar/quasar-ui-qcalendar/src/QCalendarMonth.sass';
|
@import '@quasar/quasar-ui-qcalendar/src/QCalendarMonth.scss';
|
||||||
|
|
||||||
body.body--light {
|
body.body--light {
|
||||||
--vn-header-color: #cecece;
|
--vn-header-color: #cecece;
|
||||||
|
@ -310,6 +310,14 @@ input::-webkit-inner-spin-button {
|
||||||
.no-visible {
|
.no-visible {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.q-item > .q-item__section:has(.q-checkbox) {
|
||||||
|
max-width: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row > .column:has(.q-checkbox) {
|
||||||
|
max-width: fit-content;
|
||||||
|
}
|
||||||
.q-field__inner {
|
.q-field__inner {
|
||||||
.q-field__control {
|
.q-field__control {
|
||||||
min-height: auto !important;
|
min-height: auto !important;
|
||||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 186 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -1,10 +1,10 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'icon';
|
font-family: 'icon';
|
||||||
src: url('fonts/icon.eot?y0x93o');
|
src: url('fonts/icon.eot?uocffs');
|
||||||
src: url('fonts/icon.eot?y0x93o#iefix') format('embedded-opentype'),
|
src: url('fonts/icon.eot?uocffs#iefix') format('embedded-opentype'),
|
||||||
url('fonts/icon.ttf?y0x93o') format('truetype'),
|
url('fonts/icon.ttf?uocffs') format('truetype'),
|
||||||
url('fonts/icon.woff?y0x93o') format('woff'),
|
url('fonts/icon.woff?uocffs') format('woff'),
|
||||||
url('fonts/icon.svg?y0x93o#icon') format('svg');
|
url('fonts/icon.svg?uocffs#icon') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: block;
|
font-display: block;
|
||||||
|
@ -25,8 +25,17 @@
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-entry_lastbuys:before {
|
.icon-inactive-car:before {
|
||||||
content: "\e91a";
|
content: "\e978";
|
||||||
|
}
|
||||||
|
.icon-hasItemLost:before {
|
||||||
|
content: "\e957";
|
||||||
|
}
|
||||||
|
.icon-hasItemDelay:before {
|
||||||
|
content: "\e96d";
|
||||||
|
}
|
||||||
|
.icon-add_entries:before {
|
||||||
|
content: "\e953";
|
||||||
}
|
}
|
||||||
.icon-100:before {
|
.icon-100:before {
|
||||||
content: "\e901";
|
content: "\e901";
|
||||||
|
@ -52,6 +61,9 @@
|
||||||
.icon-addperson:before {
|
.icon-addperson:before {
|
||||||
content: "\e908";
|
content: "\e908";
|
||||||
}
|
}
|
||||||
|
.icon-agencia_tributaria:before {
|
||||||
|
content: "\e948";
|
||||||
|
}
|
||||||
.icon-agency:before {
|
.icon-agency:before {
|
||||||
content: "\e92a";
|
content: "\e92a";
|
||||||
}
|
}
|
||||||
|
@ -189,6 +201,9 @@
|
||||||
.icon-entry:before {
|
.icon-entry:before {
|
||||||
content: "\e937";
|
content: "\e937";
|
||||||
}
|
}
|
||||||
|
.icon-entry_lastbuys:before {
|
||||||
|
content: "\e91a";
|
||||||
|
}
|
||||||
.icon-exit:before {
|
.icon-exit:before {
|
||||||
content: "\e938";
|
content: "\e938";
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,11 @@ $dark-shadow-color: black;
|
||||||
$layout-shadow-dark: 0 0 10px 2px #00000033, 0 0px 10px #0000003d;
|
$layout-shadow-dark: 0 0 10px 2px #00000033, 0 0px 10px #0000003d;
|
||||||
$spacing-md: 16px;
|
$spacing-md: 16px;
|
||||||
$color-font-secondary: #777;
|
$color-font-secondary: #777;
|
||||||
|
$width-xs: 400px;
|
||||||
|
$width-sm: 544px;
|
||||||
|
$width-md: 800px;
|
||||||
|
$width-lg: 1280px;
|
||||||
|
$width-xl: 1600px;
|
||||||
.bg-success {
|
.bg-success {
|
||||||
background-color: $positive;
|
background-color: $positive;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ import getUpdatedValues from './getUpdatedValues';
|
||||||
import getParamWhere from './getParamWhere';
|
import getParamWhere from './getParamWhere';
|
||||||
import parsePhone from './parsePhone';
|
import parsePhone from './parsePhone';
|
||||||
import isDialogOpened from './isDialogOpened';
|
import isDialogOpened from './isDialogOpened';
|
||||||
|
import toCelsius from './toCelsius';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getUpdatedValues,
|
getUpdatedValues,
|
||||||
|
@ -36,4 +37,5 @@ export {
|
||||||
dashIfEmpty,
|
dashIfEmpty,
|
||||||
dateRange,
|
dateRange,
|
||||||
getParamWhere,
|
getParamWhere,
|
||||||
|
toCelsius,
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
export default function toCelsius(value) {
|
||||||
|
return value ? `${value}°C` : '';
|
||||||
|
}
|
|
@ -2,12 +2,14 @@ globals:
|
||||||
lang:
|
lang:
|
||||||
es: Spanish
|
es: Spanish
|
||||||
en: English
|
en: English
|
||||||
quantity: Quantity
|
|
||||||
language: Language
|
language: Language
|
||||||
|
quantity: Quantity
|
||||||
entity: Entity
|
entity: Entity
|
||||||
|
preview: Preview
|
||||||
user: User
|
user: User
|
||||||
details: Details
|
details: Details
|
||||||
collapseMenu: Collapse left menu
|
collapseMenu: Collapse lateral menu
|
||||||
|
advancedMenu: Advanced menu
|
||||||
backToDashboard: Return to dashboard
|
backToDashboard: Return to dashboard
|
||||||
notifications: Notifications
|
notifications: Notifications
|
||||||
userPanel: User panel
|
userPanel: User panel
|
||||||
|
@ -35,7 +37,6 @@ globals:
|
||||||
confirm: Confirm
|
confirm: Confirm
|
||||||
assign: Assign
|
assign: Assign
|
||||||
back: Back
|
back: Back
|
||||||
downloadPdf: Download PDF
|
|
||||||
yes: 'Yes'
|
yes: 'Yes'
|
||||||
no: 'No'
|
no: 'No'
|
||||||
noChanges: No changes to save
|
noChanges: No changes to save
|
||||||
|
@ -59,6 +60,7 @@ globals:
|
||||||
downloadCSVSuccess: CSV downloaded successfully
|
downloadCSVSuccess: CSV downloaded successfully
|
||||||
reference: Reference
|
reference: Reference
|
||||||
agency: Agency
|
agency: Agency
|
||||||
|
entry: Entry
|
||||||
warehouseOut: Warehouse Out
|
warehouseOut: Warehouse Out
|
||||||
warehouseIn: Warehouse In
|
warehouseIn: Warehouse In
|
||||||
landed: Landed
|
landed: Landed
|
||||||
|
@ -67,11 +69,11 @@ globals:
|
||||||
amount: Amount
|
amount: Amount
|
||||||
packages: Packages
|
packages: Packages
|
||||||
download: Download
|
download: Download
|
||||||
|
downloadPdf: Download PDF
|
||||||
selectRows: 'Select all { numberRows } row(s)'
|
selectRows: 'Select all { numberRows } row(s)'
|
||||||
allRows: 'All { numberRows } row(s)'
|
allRows: 'All { numberRows } row(s)'
|
||||||
markAll: Mark all
|
markAll: Mark all
|
||||||
requiredField: Required field
|
requiredField: Required field
|
||||||
valueCantBeEmpty: Value cannot be empty
|
|
||||||
class: clase
|
class: clase
|
||||||
type: Type
|
type: Type
|
||||||
reason: reason
|
reason: reason
|
||||||
|
@ -81,6 +83,9 @@ globals:
|
||||||
warehouse: Warehouse
|
warehouse: Warehouse
|
||||||
company: Company
|
company: Company
|
||||||
fieldRequired: Field required
|
fieldRequired: Field required
|
||||||
|
valueCantBeEmpty: Value cannot be empty
|
||||||
|
Value can't be blank: Value cannot be blank
|
||||||
|
Value can't be null: Value cannot be null
|
||||||
allowedFilesText: 'Allowed file types: { allowedContentTypes }'
|
allowedFilesText: 'Allowed file types: { allowedContentTypes }'
|
||||||
smsSent: SMS sent
|
smsSent: SMS sent
|
||||||
confirmDeletion: Confirm deletion
|
confirmDeletion: Confirm deletion
|
||||||
|
@ -130,6 +135,26 @@ globals:
|
||||||
medium: Medium
|
medium: Medium
|
||||||
big: Big
|
big: Big
|
||||||
email: Email
|
email: Email
|
||||||
|
supplier: Supplier
|
||||||
|
ticketList: Ticket List
|
||||||
|
created: Created
|
||||||
|
worker: Worker
|
||||||
|
now: Now
|
||||||
|
name: Name
|
||||||
|
new: New
|
||||||
|
comment: Comment
|
||||||
|
observations: Observations
|
||||||
|
goToModuleIndex: Go to module index
|
||||||
|
createInvoiceIn: Create invoice in
|
||||||
|
myAccount: My account
|
||||||
|
noOne: No one
|
||||||
|
maxTemperature: Max
|
||||||
|
minTemperature: Min
|
||||||
|
changePass: Change password
|
||||||
|
deleteConfirmTitle: Delete selected elements
|
||||||
|
changeState: Change state
|
||||||
|
raid: 'Raid {daysInForward} days'
|
||||||
|
isVies: Vies
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Login
|
logIn: Login
|
||||||
addressEdit: Update address
|
addressEdit: Update address
|
||||||
|
@ -151,13 +176,14 @@ globals:
|
||||||
subRoles: Subroles
|
subRoles: Subroles
|
||||||
inheritedRoles: Inherited Roles
|
inheritedRoles: Inherited Roles
|
||||||
customers: Customers
|
customers: Customers
|
||||||
|
customerCreate: New customer
|
||||||
|
createCustomer: Create customer
|
||||||
|
createOrder: New order
|
||||||
list: List
|
list: List
|
||||||
webPayments: Web Payments
|
webPayments: Web Payments
|
||||||
extendedList: Extended list
|
extendedList: Extended list
|
||||||
notifications: Notifications
|
notifications: Notifications
|
||||||
defaulter: Defaulter
|
defaulter: Defaulter
|
||||||
customerCreate: New customer
|
|
||||||
createOrder: New order
|
|
||||||
fiscalData: Fiscal data
|
fiscalData: Fiscal data
|
||||||
billingData: Billing data
|
billingData: Billing data
|
||||||
consignees: Consignees
|
consignees: Consignees
|
||||||
|
@ -193,27 +219,28 @@ globals:
|
||||||
claims: Claims
|
claims: Claims
|
||||||
claimCreate: New claim
|
claimCreate: New claim
|
||||||
lines: Lines
|
lines: Lines
|
||||||
photos: Photos
|
|
||||||
development: Development
|
development: Development
|
||||||
|
photos: Photos
|
||||||
action: Action
|
action: Action
|
||||||
invoiceOuts: Invoice out
|
invoiceOuts: Invoice out
|
||||||
negativeBases: Negative Bases
|
negativeBases: Negative Bases
|
||||||
globalInvoicing: Global invoicing
|
globalInvoicing: Global invoicing
|
||||||
invoiceOutCreate: Create invoice out
|
invoiceOutCreate: Create invoice out
|
||||||
|
order: Orders
|
||||||
|
orderList: List
|
||||||
|
orderCreate: New order
|
||||||
|
catalog: Catalog
|
||||||
|
volume: Volume
|
||||||
shelving: Shelving
|
shelving: Shelving
|
||||||
shelvingList: Shelving List
|
shelvingList: Shelving List
|
||||||
shelvingCreate: New shelving
|
shelvingCreate: New shelving
|
||||||
invoiceIns: Invoices In
|
invoiceIns: Invoices In
|
||||||
invoiceInCreate: Create invoice in
|
invoiceInCreate: Create invoice in
|
||||||
vat: VAT
|
vat: VAT
|
||||||
|
labeler: Labeler
|
||||||
dueDay: Due day
|
dueDay: Due day
|
||||||
intrastat: Intrastat
|
intrastat: Intrastat
|
||||||
corrective: Corrective
|
corrective: Corrective
|
||||||
order: Orders
|
|
||||||
orderList: List
|
|
||||||
orderCreate: New order
|
|
||||||
catalog: Catalog
|
|
||||||
volume: Volume
|
|
||||||
workers: Workers
|
workers: Workers
|
||||||
workerCreate: New worker
|
workerCreate: New worker
|
||||||
department: Department
|
department: Department
|
||||||
|
@ -226,10 +253,10 @@ globals:
|
||||||
wagonsList: Wagons List
|
wagonsList: Wagons List
|
||||||
wagonCreate: Create wagon
|
wagonCreate: Create wagon
|
||||||
wagonEdit: Edit wagon
|
wagonEdit: Edit wagon
|
||||||
|
wagonCounter: Trolley counter
|
||||||
typesList: Types List
|
typesList: Types List
|
||||||
typeCreate: Create type
|
typeCreate: Create type
|
||||||
typeEdit: Edit type
|
typeEdit: Edit type
|
||||||
wagonCounter: Trolley counter
|
|
||||||
roadmap: Roadmap
|
roadmap: Roadmap
|
||||||
stops: Stops
|
stops: Stops
|
||||||
routes: Routes
|
routes: Routes
|
||||||
|
@ -238,21 +265,16 @@ globals:
|
||||||
routeCreate: New route
|
routeCreate: New route
|
||||||
RouteRoadmap: Roadmaps
|
RouteRoadmap: Roadmaps
|
||||||
RouteRoadmapCreate: Create roadmap
|
RouteRoadmapCreate: Create roadmap
|
||||||
|
RouteExtendedList: Router
|
||||||
autonomous: Autonomous
|
autonomous: Autonomous
|
||||||
suppliers: Suppliers
|
suppliers: Suppliers
|
||||||
supplier: Supplier
|
supplier: Supplier
|
||||||
expedition: Expedition
|
|
||||||
services: Service
|
|
||||||
components: Components
|
|
||||||
pictures: Pictures
|
|
||||||
packages: Packages
|
|
||||||
tracking: Tracking
|
|
||||||
labeler: Labeler
|
|
||||||
supplierCreate: New supplier
|
supplierCreate: New supplier
|
||||||
accounts: Accounts
|
accounts: Accounts
|
||||||
addresses: Addresses
|
addresses: Addresses
|
||||||
agencyTerm: Agency agreement
|
agencyTerm: Agency agreement
|
||||||
travel: Travels
|
travel: Travels
|
||||||
|
create: Create
|
||||||
extraCommunity: Extra community
|
extraCommunity: Extra community
|
||||||
travelCreate: New travel
|
travelCreate: New travel
|
||||||
history: Log
|
history: Log
|
||||||
|
@ -260,14 +282,13 @@ globals:
|
||||||
items: Items
|
items: Items
|
||||||
diary: Diary
|
diary: Diary
|
||||||
tags: Tags
|
tags: Tags
|
||||||
create: Create
|
|
||||||
buyRequest: Buy requests
|
|
||||||
fixedPrice: Fixed prices
|
fixedPrice: Fixed prices
|
||||||
|
buyRequest: Buy requests
|
||||||
wasteBreakdown: Waste breakdown
|
wasteBreakdown: Waste breakdown
|
||||||
itemCreate: New item
|
itemCreate: New item
|
||||||
barcode: Barcodes
|
|
||||||
tax: Tax
|
tax: Tax
|
||||||
botanical: Botanical
|
botanical: Botanical
|
||||||
|
barcode: Barcodes
|
||||||
itemTypeCreate: New item type
|
itemTypeCreate: New item type
|
||||||
family: Item Type
|
family: Item Type
|
||||||
lastEntries: Last entries
|
lastEntries: Last entries
|
||||||
|
@ -283,13 +304,20 @@ globals:
|
||||||
formation: Formation
|
formation: Formation
|
||||||
locations: Locations
|
locations: Locations
|
||||||
warehouses: Warehouses
|
warehouses: Warehouses
|
||||||
saleTracking: Sale tracking
|
|
||||||
roles: Roles
|
roles: Roles
|
||||||
connections: Connections
|
connections: Connections
|
||||||
acls: ACLs
|
acls: ACLs
|
||||||
mailForwarding: Mail forwarding
|
mailForwarding: Mail forwarding
|
||||||
mailAlias: Mail alias
|
mailAlias: Mail alias
|
||||||
privileges: Privileges
|
privileges: Privileges
|
||||||
|
observation: Notes
|
||||||
|
expedition: Expedition
|
||||||
|
saleTracking: Sale tracking
|
||||||
|
services: Service
|
||||||
|
tracking: Tracking
|
||||||
|
components: Components
|
||||||
|
pictures: Pictures
|
||||||
|
packages: Packages
|
||||||
ldap: LDAP
|
ldap: LDAP
|
||||||
samba: Samba
|
samba: Samba
|
||||||
twoFactor: Two factor
|
twoFactor: Two factor
|
||||||
|
@ -298,29 +326,15 @@ globals:
|
||||||
ticketsMonitor: Tickets monitor
|
ticketsMonitor: Tickets monitor
|
||||||
clientsActionsMonitor: Clients and actions
|
clientsActionsMonitor: Clients and actions
|
||||||
serial: Serial
|
serial: Serial
|
||||||
|
business: Business
|
||||||
medical: Mutual
|
medical: Mutual
|
||||||
pit: IRPF
|
pit: IRPF
|
||||||
RouteExtendedList: Router
|
|
||||||
wasteRecalc: Waste recaclulate
|
wasteRecalc: Waste recaclulate
|
||||||
operator: Operator
|
operator: Operator
|
||||||
parking: Parking
|
parking: Parking
|
||||||
supplier: Supplier
|
|
||||||
created: Created
|
|
||||||
worker: Worker
|
|
||||||
now: Now
|
|
||||||
name: Name
|
|
||||||
new: New
|
|
||||||
comment: Comment
|
|
||||||
observations: Observations
|
|
||||||
goToModuleIndex: Go to module index
|
|
||||||
unsavedPopup:
|
unsavedPopup:
|
||||||
title: Unsaved changes will be lost
|
title: Unsaved changes will be lost
|
||||||
subtitle: Are you sure exit without saving?
|
subtitle: Are you sure exit without saving?
|
||||||
createInvoiceIn: Create invoice in
|
|
||||||
myAccount: My account
|
|
||||||
noOne: No one
|
|
||||||
maxTemperature: Max
|
|
||||||
minTemperature: Min
|
|
||||||
params:
|
params:
|
||||||
clientFk: Client id
|
clientFk: Client id
|
||||||
salesPersonFk: Sales person
|
salesPersonFk: Sales person
|
||||||
|
@ -338,19 +352,13 @@ globals:
|
||||||
supplierFk: Supplier
|
supplierFk: Supplier
|
||||||
supplierRef: Supplier ref
|
supplierRef: Supplier ref
|
||||||
serial: Serial
|
serial: Serial
|
||||||
amount: Importe
|
amount: Amount
|
||||||
awbCode: AWB
|
awbCode: AWB
|
||||||
correctedFk: Rectified
|
correctedFk: Rectified
|
||||||
correctingFk: Rectificative
|
correctingFk: Rectificative
|
||||||
daysOnward: Days onward
|
daysOnward: Days onward
|
||||||
countryFk: Country
|
countryFk: Country
|
||||||
companyFk: Company
|
companyFk: Company
|
||||||
changePass: Change password
|
|
||||||
setPass: Set password
|
|
||||||
deleteConfirmTitle: Delete selected elements
|
|
||||||
changeState: Change state
|
|
||||||
raid: 'Raid {daysInForward} days'
|
|
||||||
isVies: Vies
|
|
||||||
errors:
|
errors:
|
||||||
statusUnauthorized: Access denied
|
statusUnauthorized: Access denied
|
||||||
statusInternalServerError: An internal server error has ocurred
|
statusInternalServerError: An internal server error has ocurred
|
||||||
|
@ -446,6 +454,7 @@ ticket:
|
||||||
service: Service
|
service: Service
|
||||||
attender: Attender
|
attender: Attender
|
||||||
ok: Ok
|
ok: Ok
|
||||||
|
consigneeStreet: Street
|
||||||
create:
|
create:
|
||||||
address: Address
|
address: Address
|
||||||
invoiceOut:
|
invoiceOut:
|
||||||
|
@ -490,21 +499,6 @@ invoiceOut:
|
||||||
comercial: Comercial
|
comercial: Comercial
|
||||||
errors:
|
errors:
|
||||||
downloadCsvFailed: CSV download failed
|
downloadCsvFailed: CSV download failed
|
||||||
shelving:
|
|
||||||
list:
|
|
||||||
parking: Parking
|
|
||||||
priority: Priority
|
|
||||||
newShelving: New Shelving
|
|
||||||
summary:
|
|
||||||
recyclable: Recyclable
|
|
||||||
parking:
|
|
||||||
pickingOrder: Picking order
|
|
||||||
sector: Sector
|
|
||||||
row: Row
|
|
||||||
column: Column
|
|
||||||
searchBar:
|
|
||||||
info: You can search by parking code
|
|
||||||
label: Search parking...
|
|
||||||
department:
|
department:
|
||||||
chat: Chat
|
chat: Chat
|
||||||
bossDepartment: Boss Department
|
bossDepartment: Boss Department
|
||||||
|
@ -516,6 +510,24 @@ department:
|
||||||
hasToSendMail: Send check-ins by email
|
hasToSendMail: Send check-ins by email
|
||||||
departmentRemoved: Department removed
|
departmentRemoved: Department removed
|
||||||
worker:
|
worker:
|
||||||
|
pageTitles:
|
||||||
|
workers: Workers
|
||||||
|
list: List
|
||||||
|
basicData: Basic data
|
||||||
|
summary: Summary
|
||||||
|
notifications: Notifications
|
||||||
|
workerCreate: New worker
|
||||||
|
department: Department
|
||||||
|
pda: PDA
|
||||||
|
notes: Notas
|
||||||
|
dms: My documentation
|
||||||
|
pbx: Private Branch Exchange
|
||||||
|
log: Log
|
||||||
|
calendar: Calendar
|
||||||
|
timeControl: Time control
|
||||||
|
locker: Locker
|
||||||
|
balance: Balance
|
||||||
|
medical: Medical
|
||||||
list:
|
list:
|
||||||
department: Department
|
department: Department
|
||||||
schedule: Schedule
|
schedule: Schedule
|
||||||
|
@ -531,15 +543,24 @@ worker:
|
||||||
role: Role
|
role: Role
|
||||||
sipExtension: Extension
|
sipExtension: Extension
|
||||||
locker: Locker
|
locker: Locker
|
||||||
fiDueDate: FI due date
|
fiDueDate: DNI expiration date
|
||||||
sex: Sex
|
sex: Sex
|
||||||
seniority: Seniority
|
seniority: Antiquity
|
||||||
fi: DNI/NIE/NIF
|
fi: DNI/NIE/NIF
|
||||||
birth: Birth
|
birth: Birth
|
||||||
isFreelance: Freelance
|
isFreelance: Freelance
|
||||||
isSsDiscounted: SS Bonification
|
isSsDiscounted: SS Bonification
|
||||||
hasMachineryAuthorized: Machinery authorized
|
hasMachineryAuthorized: Machinery authorized
|
||||||
isDisable: Disable
|
isDisable: Disable
|
||||||
|
business: Business
|
||||||
|
started: Started
|
||||||
|
ended: Ended
|
||||||
|
reasonEnd: Reason End
|
||||||
|
department: Departament
|
||||||
|
workerBusinessCategory: Worker Business Category
|
||||||
|
notes: Notes
|
||||||
|
workCenter: Center
|
||||||
|
professionalCategory: Professional Category
|
||||||
notificationsManager:
|
notificationsManager:
|
||||||
activeNotifications: Active notifications
|
activeNotifications: Active notifications
|
||||||
availableNotifications: Available notifications
|
availableNotifications: Available notifications
|
||||||
|
@ -598,6 +619,23 @@ worker:
|
||||||
sizeLimit: Size limit
|
sizeLimit: Size limit
|
||||||
isOnReservationMode: Reservation mode
|
isOnReservationMode: Reservation mode
|
||||||
machine: Machine
|
machine: Machine
|
||||||
|
business:
|
||||||
|
tableVisibleColumns:
|
||||||
|
started: Start Date
|
||||||
|
ended: End Date
|
||||||
|
company: Company
|
||||||
|
reasonEnd: Reason for Termination
|
||||||
|
department: Department
|
||||||
|
professionalCategory: Professional Category
|
||||||
|
calendarType: Work Calendar
|
||||||
|
workCenter: Work Center
|
||||||
|
payrollCategories: Contract Category
|
||||||
|
occupationCode: Contribution Code
|
||||||
|
rate: Rate
|
||||||
|
businessType: Contract Type
|
||||||
|
amount: Salary
|
||||||
|
basicSalary: Transport Workers Salary
|
||||||
|
notes: Notes
|
||||||
wagon:
|
wagon:
|
||||||
type:
|
type:
|
||||||
submit: Submit
|
submit: Submit
|
||||||
|
@ -696,6 +734,9 @@ supplier:
|
||||||
consumption:
|
consumption:
|
||||||
entry: Entry
|
entry: Entry
|
||||||
travel:
|
travel:
|
||||||
|
search: Search travel
|
||||||
|
searchInfo: You can search by travel id or name
|
||||||
|
id: Id
|
||||||
travelList:
|
travelList:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
ref: Reference
|
ref: Reference
|
||||||
|
@ -704,6 +745,7 @@ travel:
|
||||||
totalEntries: Total entries
|
totalEntries: Total entries
|
||||||
totalEntriesTooltip: Total entries
|
totalEntriesTooltip: Total entries
|
||||||
daysOnward: Landed days onwards
|
daysOnward: Landed days onwards
|
||||||
|
awb: AWB
|
||||||
summary:
|
summary:
|
||||||
entryId: Entry Id
|
entryId: Entry Id
|
||||||
freight: Freight
|
freight: Freight
|
||||||
|
@ -725,62 +767,7 @@ travel:
|
||||||
destination: Destination
|
destination: Destination
|
||||||
thermograph: Thermograph
|
thermograph: Thermograph
|
||||||
travelFileDescription: 'Travel id { travelId }'
|
travelFileDescription: 'Travel id { travelId }'
|
||||||
item:
|
carrier: Carrier
|
||||||
descriptor:
|
|
||||||
buyer: Buyer
|
|
||||||
color: Color
|
|
||||||
category: Category
|
|
||||||
available: Available
|
|
||||||
warehouseText: 'Calculated on the warehouse of { warehouseName }'
|
|
||||||
itemDiary: Item diary
|
|
||||||
list:
|
|
||||||
id: Identifier
|
|
||||||
stems: Stems
|
|
||||||
category: Category
|
|
||||||
typeName: Type
|
|
||||||
isActive: Active
|
|
||||||
userName: Buyer
|
|
||||||
weightByPiece: Weight/Piece
|
|
||||||
stemMultiplier: Multiplier
|
|
||||||
fixedPrice:
|
|
||||||
itemFk: Item ID
|
|
||||||
groupingPrice: Grouping price
|
|
||||||
packingPrice: Packing price
|
|
||||||
hasMinPrice: Has min price
|
|
||||||
minPrice: Min price
|
|
||||||
started: Started
|
|
||||||
ended: Ended
|
|
||||||
create:
|
|
||||||
priority: Priority
|
|
||||||
buyRequest:
|
|
||||||
requester: Requester
|
|
||||||
requested: Requested
|
|
||||||
attender: Atender
|
|
||||||
achieved: Achieved
|
|
||||||
concept: Concept
|
|
||||||
summary:
|
|
||||||
otherData: Other data
|
|
||||||
tax: Tax
|
|
||||||
botanical: Botanical
|
|
||||||
barcode: Barcode
|
|
||||||
completeName: Complete name
|
|
||||||
family: Familiy
|
|
||||||
stems: Stems
|
|
||||||
multiplier: Multiplier
|
|
||||||
buyer: Buyer
|
|
||||||
doPhoto: Do photo
|
|
||||||
intrastatCode: Intrastat code
|
|
||||||
ref: Reference
|
|
||||||
relevance: Relevance
|
|
||||||
weight: Weight (gram)/stem
|
|
||||||
units: Units/box
|
|
||||||
expense: Expense
|
|
||||||
generic: Generic
|
|
||||||
recycledPlastic: Recycled plastic
|
|
||||||
nonRecycledPlastic: Non recycled plastic
|
|
||||||
minSalesQuantity: Min sales quantity
|
|
||||||
genus: Genus
|
|
||||||
specie: Specie
|
|
||||||
components:
|
components:
|
||||||
topbar: {}
|
topbar: {}
|
||||||
itemsFilterPanel:
|
itemsFilterPanel:
|
||||||
|
|
|
@ -5,9 +5,11 @@ globals:
|
||||||
language: Idioma
|
language: Idioma
|
||||||
quantity: Cantidad
|
quantity: Cantidad
|
||||||
entity: Entidad
|
entity: Entidad
|
||||||
|
preview: Vista previa
|
||||||
user: Usuario
|
user: Usuario
|
||||||
details: Detalles
|
details: Detalles
|
||||||
collapseMenu: Contraer menú lateral
|
collapseMenu: Contraer menú lateral
|
||||||
|
advancedMenu: Menú avanzado
|
||||||
backToDashboard: Volver al tablón
|
backToDashboard: Volver al tablón
|
||||||
notifications: Notificaciones
|
notifications: Notificaciones
|
||||||
userPanel: Panel de usuario
|
userPanel: Panel de usuario
|
||||||
|
@ -53,11 +55,12 @@ globals:
|
||||||
today: Hoy
|
today: Hoy
|
||||||
yesterday: Ayer
|
yesterday: Ayer
|
||||||
dateFormat: es-ES
|
dateFormat: es-ES
|
||||||
noSelectedRows: No tienes ninguna línea seleccionada
|
|
||||||
microsip: Abrir en MicroSIP
|
microsip: Abrir en MicroSIP
|
||||||
|
noSelectedRows: No tienes ninguna línea seleccionada
|
||||||
downloadCSVSuccess: Descarga de CSV exitosa
|
downloadCSVSuccess: Descarga de CSV exitosa
|
||||||
reference: Referencia
|
reference: Referencia
|
||||||
agency: Agencia
|
agency: Agencia
|
||||||
|
entry: Entrada
|
||||||
warehouseOut: Alm. salida
|
warehouseOut: Alm. salida
|
||||||
warehouseIn: Alm. entrada
|
warehouseIn: Alm. entrada
|
||||||
landed: F. entrega
|
landed: F. entrega
|
||||||
|
@ -132,6 +135,26 @@ globals:
|
||||||
medium: Mediano/a
|
medium: Mediano/a
|
||||||
big: Grande
|
big: Grande
|
||||||
email: Correo
|
email: Correo
|
||||||
|
supplier: Proveedor
|
||||||
|
ticketList: Listado de tickets
|
||||||
|
created: Fecha creación
|
||||||
|
worker: Trabajador
|
||||||
|
now: Ahora
|
||||||
|
name: Nombre
|
||||||
|
new: Nuevo
|
||||||
|
comment: Comentario
|
||||||
|
observations: Observaciones
|
||||||
|
goToModuleIndex: Ir al índice del módulo
|
||||||
|
createInvoiceIn: Crear factura recibida
|
||||||
|
myAccount: Mi cuenta
|
||||||
|
noOne: Nadie
|
||||||
|
maxTemperature: Máx
|
||||||
|
minTemperature: Mín
|
||||||
|
changePass: Cambiar contraseña
|
||||||
|
deleteConfirmTitle: Eliminar los elementos seleccionados
|
||||||
|
changeState: Cambiar estado
|
||||||
|
raid: 'Redada {daysInForward} días'
|
||||||
|
isVies: Vies
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Inicio de sesión
|
logIn: Inicio de sesión
|
||||||
addressEdit: Modificar consignatario
|
addressEdit: Modificar consignatario
|
||||||
|
@ -154,17 +177,17 @@ globals:
|
||||||
inheritedRoles: Roles heredados
|
inheritedRoles: Roles heredados
|
||||||
customers: Clientes
|
customers: Clientes
|
||||||
customerCreate: Nuevo cliente
|
customerCreate: Nuevo cliente
|
||||||
|
createCustomer: Crear cliente
|
||||||
createOrder: Nuevo pedido
|
createOrder: Nuevo pedido
|
||||||
list: Listado
|
list: Listado
|
||||||
webPayments: Pagos Web
|
webPayments: Pagos Web
|
||||||
extendedList: Listado extendido
|
extendedList: Listado extendido
|
||||||
notifications: Notificaciones
|
notifications: Notificaciones
|
||||||
defaulter: Morosos
|
defaulter: Morosos
|
||||||
createCustomer: Crear cliente
|
|
||||||
fiscalData: Datos fiscales
|
fiscalData: Datos fiscales
|
||||||
billingData: Forma de pago
|
billingData: Forma de pago
|
||||||
consignees: Consignatarios
|
consignees: Consignatarios
|
||||||
'address-create': Nuevo consignatario
|
address-create: Nuevo consignatario
|
||||||
notes: Notas
|
notes: Notas
|
||||||
credits: Créditos
|
credits: Créditos
|
||||||
greuges: Greuges
|
greuges: Greuges
|
||||||
|
@ -230,10 +253,10 @@ globals:
|
||||||
wagonsList: Listado vagones
|
wagonsList: Listado vagones
|
||||||
wagonCreate: Crear tipo
|
wagonCreate: Crear tipo
|
||||||
wagonEdit: Editar tipo
|
wagonEdit: Editar tipo
|
||||||
|
wagonCounter: Contador de carros
|
||||||
typesList: Listado tipos
|
typesList: Listado tipos
|
||||||
typeCreate: Crear tipo
|
typeCreate: Crear tipo
|
||||||
typeEdit: Editar tipo
|
typeEdit: Editar tipo
|
||||||
wagonCounter: Contador de carros
|
|
||||||
roadmap: Troncales
|
roadmap: Troncales
|
||||||
stops: Paradas
|
stops: Paradas
|
||||||
routes: Rutas
|
routes: Rutas
|
||||||
|
@ -242,8 +265,8 @@ globals:
|
||||||
routeCreate: Nueva ruta
|
routeCreate: Nueva ruta
|
||||||
RouteRoadmap: Troncales
|
RouteRoadmap: Troncales
|
||||||
RouteRoadmapCreate: Crear troncal
|
RouteRoadmapCreate: Crear troncal
|
||||||
autonomous: Autónomos
|
|
||||||
RouteExtendedList: Enrutador
|
RouteExtendedList: Enrutador
|
||||||
|
autonomous: Autónomos
|
||||||
suppliers: Proveedores
|
suppliers: Proveedores
|
||||||
supplier: Proveedor
|
supplier: Proveedor
|
||||||
supplierCreate: Nuevo proveedor
|
supplierCreate: Nuevo proveedor
|
||||||
|
@ -303,28 +326,15 @@ globals:
|
||||||
ticketsMonitor: Monitor de tickets
|
ticketsMonitor: Monitor de tickets
|
||||||
clientsActionsMonitor: Clientes y acciones
|
clientsActionsMonitor: Clientes y acciones
|
||||||
serial: Facturas por serie
|
serial: Facturas por serie
|
||||||
|
business: Contratos
|
||||||
medical: Mutua
|
medical: Mutua
|
||||||
pit: IRPF
|
pit: IRPF
|
||||||
wasteRecalc: Recalcular mermas
|
wasteRecalc: Recalcular mermas
|
||||||
operator: Operario
|
operator: Operario
|
||||||
parking: Parking
|
parking: Parking
|
||||||
supplier: Proveedor
|
|
||||||
created: Fecha creación
|
|
||||||
worker: Trabajador
|
|
||||||
now: Ahora
|
|
||||||
name: Nombre
|
|
||||||
new: Nuevo
|
|
||||||
comment: Comentario
|
|
||||||
observations: Observaciones
|
|
||||||
goToModuleIndex: Ir al índice del módulo
|
|
||||||
unsavedPopup:
|
unsavedPopup:
|
||||||
title: Los cambios que no haya guardado se perderán
|
title: Los cambios que no haya guardado se perderán
|
||||||
subtitle: ¿Seguro que quiere salir sin guardar?
|
subtitle: ¿Seguro que quiere salir sin guardar?
|
||||||
createInvoiceIn: Crear factura recibida
|
|
||||||
myAccount: Mi cuenta
|
|
||||||
noOne: Nadie
|
|
||||||
maxTemperature: Máx
|
|
||||||
minTemperature: Mín
|
|
||||||
params:
|
params:
|
||||||
clientFk: Id cliente
|
clientFk: Id cliente
|
||||||
salesPersonFk: Comercial
|
salesPersonFk: Comercial
|
||||||
|
@ -347,12 +357,6 @@ globals:
|
||||||
packing: ITP
|
packing: ITP
|
||||||
countryFk: País
|
countryFk: País
|
||||||
companyFk: Empresa
|
companyFk: Empresa
|
||||||
changePass: Cambiar contraseña
|
|
||||||
setPass: Establecer contraseña
|
|
||||||
deleteConfirmTitle: Eliminar los elementos seleccionados
|
|
||||||
changeState: Cambiar estado
|
|
||||||
raid: 'Redada {daysInForward} días'
|
|
||||||
isVies: Vies
|
|
||||||
errors:
|
errors:
|
||||||
statusUnauthorized: Acceso denegado
|
statusUnauthorized: Acceso denegado
|
||||||
statusInternalServerError: Ha ocurrido un error interno del servidor
|
statusInternalServerError: Ha ocurrido un error interno del servidor
|
||||||
|
@ -445,13 +449,18 @@ ticket:
|
||||||
purchaseRequest: Petición de compra
|
purchaseRequest: Petición de compra
|
||||||
service: Servicio
|
service: Servicio
|
||||||
attender: Consignatario
|
attender: Consignatario
|
||||||
|
consigneeStreet: Dirección
|
||||||
create:
|
create:
|
||||||
address: Dirección
|
address: Dirección
|
||||||
invoiceOut:
|
order:
|
||||||
card:
|
field:
|
||||||
issued: Fecha emisión
|
salesPersonFk: Comercial
|
||||||
customerCard: Ficha del cliente
|
form:
|
||||||
ticketList: Listado de tickets
|
clientFk: Cliente
|
||||||
|
addressFk: Dirección
|
||||||
|
agencyModeFk: Agencia
|
||||||
|
list:
|
||||||
|
newOrder: Nuevo Pedido
|
||||||
summary:
|
summary:
|
||||||
issued: Fecha
|
issued: Fecha
|
||||||
dued: Fecha límite
|
dued: Fecha límite
|
||||||
|
@ -462,47 +471,6 @@ invoiceOut:
|
||||||
fee: Cuota
|
fee: Cuota
|
||||||
tickets: Tickets
|
tickets: Tickets
|
||||||
totalWithVat: Importe
|
totalWithVat: Importe
|
||||||
globalInvoices:
|
|
||||||
errors:
|
|
||||||
chooseValidClient: Selecciona un cliente válido
|
|
||||||
chooseValidCompany: Selecciona una empresa válida
|
|
||||||
chooseValidPrinter: Selecciona una impresora válida
|
|
||||||
chooseValidSerialType: Selecciona una tipo de serie válida
|
|
||||||
fillDates: La fecha de la factura y la fecha máxima deben estar completas
|
|
||||||
invoiceDateLessThanMaxDate: La fecha de la factura no puede ser menor que la fecha máxima
|
|
||||||
invoiceWithFutureDate: Existe una factura con una fecha futura
|
|
||||||
noTicketsToInvoice: No existen tickets para facturar
|
|
||||||
criticalInvoiceError: Error crítico en la facturación proceso detenido
|
|
||||||
invalidSerialTypeForAll: El tipo de serie debe ser global cuando se facturan todos los clientes
|
|
||||||
table:
|
|
||||||
addressId: Id dirección
|
|
||||||
streetAddress: Dirección fiscal
|
|
||||||
statusCard:
|
|
||||||
percentageText: '{getPercentage}% {getAddressNumber} de {getNAddresses}'
|
|
||||||
pdfsNumberText: '{nPdfs} de {totalPdfs} PDFs'
|
|
||||||
negativeBases:
|
|
||||||
clientId: Id cliente
|
|
||||||
base: Base
|
|
||||||
active: Activo
|
|
||||||
hasToInvoice: Facturar
|
|
||||||
verifiedData: Datos comprobados
|
|
||||||
comercial: Comercial
|
|
||||||
errors:
|
|
||||||
downloadCsvFailed: Error al descargar CSV
|
|
||||||
shelving:
|
|
||||||
list:
|
|
||||||
parking: Parking
|
|
||||||
priority: Prioridad
|
|
||||||
newShelving: Nuevo Carro
|
|
||||||
summary:
|
|
||||||
recyclable: Reciclable
|
|
||||||
parking:
|
|
||||||
pickingOrder: Orden de recogida
|
|
||||||
row: Fila
|
|
||||||
column: Columna
|
|
||||||
searchBar:
|
|
||||||
info: Puedes buscar por código de parking
|
|
||||||
label: Buscar parking...
|
|
||||||
department:
|
department:
|
||||||
chat: Chat
|
chat: Chat
|
||||||
bossDepartment: Jefe de departamento
|
bossDepartment: Jefe de departamento
|
||||||
|
@ -514,6 +482,26 @@ department:
|
||||||
hasToSendMail: Enviar fichadas por mail
|
hasToSendMail: Enviar fichadas por mail
|
||||||
departmentRemoved: Departamento eliminado
|
departmentRemoved: Departamento eliminado
|
||||||
worker:
|
worker:
|
||||||
|
pageTitles:
|
||||||
|
workers: Trabajadores
|
||||||
|
list: Listado
|
||||||
|
basicData: Datos básicos
|
||||||
|
summary: Resumen
|
||||||
|
notifications: Notificaciones
|
||||||
|
workerCreate: Nuevo trabajador
|
||||||
|
department: Departamentos
|
||||||
|
pda: PDA
|
||||||
|
notes: Notas
|
||||||
|
dms: Mi documentación
|
||||||
|
pbx: Centralita
|
||||||
|
log: Historial
|
||||||
|
calendar: Calendario
|
||||||
|
timeControl: Control de horario
|
||||||
|
locker: Taquilla
|
||||||
|
balance: Balance
|
||||||
|
business: Contrato
|
||||||
|
formation: Formación
|
||||||
|
medical: Mutua
|
||||||
list:
|
list:
|
||||||
department: Departamento
|
department: Departamento
|
||||||
schedule: Horario
|
schedule: Horario
|
||||||
|
@ -538,6 +526,15 @@ worker:
|
||||||
isSsDiscounted: Bonificación SS
|
isSsDiscounted: Bonificación SS
|
||||||
hasMachineryAuthorized: Autorizado para maquinaria
|
hasMachineryAuthorized: Autorizado para maquinaria
|
||||||
isDisable: Deshabilitado
|
isDisable: Deshabilitado
|
||||||
|
business: Contrato
|
||||||
|
started: Antigüedad
|
||||||
|
ended: Fin
|
||||||
|
reasonEnd: Motivo finalización
|
||||||
|
department: Departamento
|
||||||
|
workerBusinessCategory: Categoria profesional
|
||||||
|
notes: Notas
|
||||||
|
workCenter: Centro
|
||||||
|
professionalCategory: Categoria profesional
|
||||||
notificationsManager:
|
notificationsManager:
|
||||||
activeNotifications: Notificaciones activas
|
activeNotifications: Notificaciones activas
|
||||||
availableNotifications: Notificaciones disponibles
|
availableNotifications: Notificaciones disponibles
|
||||||
|
@ -584,6 +581,23 @@ worker:
|
||||||
debit: Debe
|
debit: Debe
|
||||||
credit: Haber
|
credit: Haber
|
||||||
concept: Concepto
|
concept: Concepto
|
||||||
|
business:
|
||||||
|
tableVisibleColumns:
|
||||||
|
started: Fecha inicio
|
||||||
|
ended: Fecha fin
|
||||||
|
company: Empresa
|
||||||
|
reasonEnd: Motivo finalización
|
||||||
|
department: Departamento
|
||||||
|
professionalCategory: Categoria profesional
|
||||||
|
calendarType: Calendario laboral
|
||||||
|
workCenter: Centro
|
||||||
|
payrollCategories: Categoria contrato
|
||||||
|
occupationCode: Cotización
|
||||||
|
rate: Tarifa
|
||||||
|
businessType: Contrato
|
||||||
|
amount: Salario
|
||||||
|
basicSalary: Salario transportistas
|
||||||
|
notes: Notas
|
||||||
operator:
|
operator:
|
||||||
numberOfWagons: Número de vagones
|
numberOfWagons: Número de vagones
|
||||||
train: tren
|
train: tren
|
||||||
|
@ -596,7 +610,6 @@ worker:
|
||||||
sizeLimit: Tamaño límite
|
sizeLimit: Tamaño límite
|
||||||
isOnReservationMode: Modo de reserva
|
isOnReservationMode: Modo de reserva
|
||||||
machine: Máquina
|
machine: Máquina
|
||||||
|
|
||||||
wagon:
|
wagon:
|
||||||
type:
|
type:
|
||||||
submit: Guardar
|
submit: Guardar
|
||||||
|
@ -692,6 +705,9 @@ supplier:
|
||||||
consumption:
|
consumption:
|
||||||
entry: Entrada
|
entry: Entrada
|
||||||
travel:
|
travel:
|
||||||
|
search: Buscar envío
|
||||||
|
searchInfo: Buscar envío por id o nombre
|
||||||
|
id: Id
|
||||||
travelList:
|
travelList:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
ref: Referencia
|
ref: Referencia
|
||||||
|
@ -700,6 +716,7 @@ travel:
|
||||||
totalEntries: ∑
|
totalEntries: ∑
|
||||||
totalEntriesTooltip: Entradas totales
|
totalEntriesTooltip: Entradas totales
|
||||||
daysOnward: Días de llegada en adelante
|
daysOnward: Días de llegada en adelante
|
||||||
|
awb: AWB
|
||||||
summary:
|
summary:
|
||||||
entryId: Id entrada
|
entryId: Id entrada
|
||||||
freight: Porte
|
freight: Porte
|
||||||
|
@ -721,62 +738,7 @@ travel:
|
||||||
destination: Destino
|
destination: Destino
|
||||||
thermograph: Termógrafo
|
thermograph: Termógrafo
|
||||||
travelFileDescription: 'Id envío { travelId }'
|
travelFileDescription: 'Id envío { travelId }'
|
||||||
item:
|
carrier: Transportista
|
||||||
descriptor:
|
|
||||||
buyer: Comprador
|
|
||||||
color: Color
|
|
||||||
category: Categoría
|
|
||||||
available: Disponible
|
|
||||||
warehouseText: 'Calculado sobre el almacén de { warehouseName }'
|
|
||||||
itemDiary: Registro de compra-venta
|
|
||||||
list:
|
|
||||||
id: Identificador
|
|
||||||
stems: Tallos
|
|
||||||
category: Reino
|
|
||||||
typeName: Tipo
|
|
||||||
isActive: Activo
|
|
||||||
weightByPiece: Peso (gramos)/tallo
|
|
||||||
userName: Comprador
|
|
||||||
stemMultiplier: Multiplicador
|
|
||||||
fixedPrice:
|
|
||||||
itemFk: ID Artículo
|
|
||||||
groupingPrice: Precio grouping
|
|
||||||
packingPrice: Precio packing
|
|
||||||
hasMinPrice: Tiene precio mínimo
|
|
||||||
minPrice: Precio min
|
|
||||||
started: Inicio
|
|
||||||
ended: Fin
|
|
||||||
create:
|
|
||||||
priority: Prioridad
|
|
||||||
summary:
|
|
||||||
otherData: Otros datos
|
|
||||||
tax: IVA
|
|
||||||
botanical: Botánico
|
|
||||||
barcode: Código de barras
|
|
||||||
completeName: Nombre completo
|
|
||||||
family: Familia
|
|
||||||
stems: Tallos
|
|
||||||
multiplier: Multiplicador
|
|
||||||
buyer: Comprador
|
|
||||||
doPhoto: Hacer foto
|
|
||||||
intrastatCode: Código intrastat
|
|
||||||
ref: Referencia
|
|
||||||
relevance: Relevancia
|
|
||||||
weight: Peso (gramos)/tallo
|
|
||||||
units: Unidades/caja
|
|
||||||
expense: Gasto
|
|
||||||
generic: Genérico
|
|
||||||
recycledPlastic: Plástico reciclado
|
|
||||||
nonRecycledPlastic: Plástico no reciclado
|
|
||||||
minSalesQuantity: Cantidad mínima de venta
|
|
||||||
genus: Genus
|
|
||||||
specie: Specie
|
|
||||||
buyRequest:
|
|
||||||
requester: Solicitante
|
|
||||||
requested: Solicitado
|
|
||||||
attender: Comprador
|
|
||||||
achieved: Conseguido
|
|
||||||
concept: Concepto
|
|
||||||
components:
|
components:
|
||||||
topbar: {}
|
topbar: {}
|
||||||
itemsFilterPanel:
|
itemsFilterPanel:
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
import { Dark, Quasar } from 'quasar';
|
import { Dark, Quasar } from 'quasar';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { localeEquivalence } from 'src/i18n/index';
|
||||||
|
import quasarLang from 'src/utils/quasarLang';
|
||||||
|
|
||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
|
|
||||||
|
@ -12,18 +14,9 @@ const userLocale = computed({
|
||||||
set(value) {
|
set(value) {
|
||||||
locale.value = value;
|
locale.value = value;
|
||||||
|
|
||||||
if (value === 'en') value = 'en-GB';
|
value = localeEquivalence[value] ?? value;
|
||||||
|
|
||||||
// FIXME: Dynamic imports from absolute paths are not compatible with vite:
|
quasarLang(value);
|
||||||
// https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations
|
|
||||||
try {
|
|
||||||
const langList = import.meta.glob('../../node_modules/quasar/lang/*.mjs');
|
|
||||||
langList[`../../node_modules/quasar/lang/${value}.mjs`]().then((lang) => {
|
|
||||||
Quasar.lang.set(lang.default);
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
//
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { useQuasar } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useStateStore } from 'src/stores/useStateStore';
|
|
||||||
import { toDate, toPercentage, toCurrency } from 'filters/index';
|
import { toDate, toPercentage, toCurrency } from 'filters/index';
|
||||||
import { tMobile } from 'src/composables/tMobile';
|
import { tMobile } from 'src/composables/tMobile';
|
||||||
import CrudModel from 'src/components/CrudModel.vue';
|
import CrudModel from 'src/components/CrudModel.vue';
|
||||||
|
@ -13,11 +12,11 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const stateStore = computed(() => useStateStore());
|
|
||||||
const claim = ref(null);
|
const claim = ref(null);
|
||||||
const claimRef = ref();
|
const claimRef = ref();
|
||||||
const claimId = route.params.id;
|
const claimId = route.params.id;
|
||||||
|
@ -201,58 +200,62 @@ async function post(query, params) {
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="(data) => (destinationTypes = data)"
|
@on-fetch="(data) => (destinationTypes = data)"
|
||||||
/>
|
/>
|
||||||
<Teleport to="#right-panel" v-if="stateStore.isHeaderMounted() && claim">
|
<RightMenu v-if="claim">
|
||||||
<QCard class="totalClaim q-my-md q-pa-sm no-box-shadow">
|
<template #right-panel>
|
||||||
{{ `${t('Total claimed')}: ${toCurrency(totalClaimed)}` }}
|
<QCard class="totalClaim q-my-md q-pa-sm no-box-shadow">
|
||||||
</QCard>
|
{{ `${t('Total claimed')}: ${toCurrency(totalClaimed)}` }}
|
||||||
<QCard class="q-mb-md q-pa-sm no-box-shadow">
|
</QCard>
|
||||||
<QItem class="justify-between">
|
<QCard class="q-mb-md q-pa-sm no-box-shadow">
|
||||||
<QItemLabel class="slider-container">
|
<QItem class="justify-between">
|
||||||
<p class="text-primary">
|
<QItemLabel class="slider-container">
|
||||||
{{ t('claim.actions') }}
|
<p class="text-primary">
|
||||||
</p>
|
{{ t('claim.actions') }}
|
||||||
<QSlider
|
</p>
|
||||||
class="responsibility { 'background-color:primary': quasar.platform.is.mobile }"
|
<QSlider
|
||||||
v-model="claim.responsibility"
|
class="responsibility { 'background-color:primary': quasar.platform.is.mobile }"
|
||||||
:label-value="t('claim.responsibility')"
|
v-model="claim.responsibility"
|
||||||
@change="(value) => save({ responsibility: value })"
|
:label-value="t('claim.responsibility')"
|
||||||
label-always
|
@change="(value) => save({ responsibility: value })"
|
||||||
color="primary"
|
label-always
|
||||||
markers
|
color="primary"
|
||||||
:marker-labels="marker_labels"
|
markers
|
||||||
:min="DEFAULT_MIN_RESPONSABILITY"
|
:marker-labels="marker_labels"
|
||||||
:max="DEFAULT_MAX_RESPONSABILITY"
|
:min="DEFAULT_MIN_RESPONSABILITY"
|
||||||
|
:max="DEFAULT_MAX_RESPONSABILITY"
|
||||||
|
/>
|
||||||
|
</QItemLabel>
|
||||||
|
</QItem>
|
||||||
|
</QCard>
|
||||||
|
<QCard class="q-mb-md q-pa-sm no-box-shadow" style="margin-bottom: 1em">
|
||||||
|
<QItemLabel class="mana q-mb-md">
|
||||||
|
<QCheckbox
|
||||||
|
v-model="claim.isChargedToMana"
|
||||||
|
@update:model-value="(value) => save({ isChargedToMana: value })"
|
||||||
/>
|
/>
|
||||||
|
<span>{{ t('mana') }}</span>
|
||||||
</QItemLabel>
|
</QItemLabel>
|
||||||
</QItem>
|
</QCard>
|
||||||
</QCard>
|
<QCard class="q-mb-md q-pa-sm no-box-shadow" style="position: static">
|
||||||
<QCard class="q-mb-md q-pa-sm no-box-shadow" style="margin-bottom: 1em">
|
<QInput
|
||||||
<QItemLabel class="mana q-mb-md">
|
:disable="
|
||||||
<QCheckbox
|
!(
|
||||||
v-model="claim.isChargedToMana"
|
claim.responsibility >=
|
||||||
@update:model-value="(value) => save({ isChargedToMana: value })"
|
Math.ceil(DEFAULT_MAX_RESPONSABILITY) / 2
|
||||||
|
)
|
||||||
|
"
|
||||||
|
:label="t('confirmGreuges')"
|
||||||
|
class="q-field__native text-grey-2"
|
||||||
|
type="number"
|
||||||
|
placeholder="0"
|
||||||
|
id="multiplicatorValue"
|
||||||
|
name="multiplicatorValue"
|
||||||
|
min="0"
|
||||||
|
max="50"
|
||||||
|
v-model="multiplicatorValue"
|
||||||
/>
|
/>
|
||||||
<span>{{ t('mana') }}</span>
|
</QCard>
|
||||||
</QItemLabel>
|
</template>
|
||||||
</QCard>
|
</RightMenu>
|
||||||
<QCard class="q-mb-md q-pa-sm no-box-shadow" style="position: static">
|
|
||||||
<QInput
|
|
||||||
:disable="
|
|
||||||
!(claim.responsibility >= Math.ceil(DEFAULT_MAX_RESPONSABILITY) / 2)
|
|
||||||
"
|
|
||||||
:label="t('confirmGreuges')"
|
|
||||||
class="q-field__native text-grey-2"
|
|
||||||
type="number"
|
|
||||||
placeholder="0"
|
|
||||||
id="multiplicatorValue"
|
|
||||||
name="multiplicatorValue"
|
|
||||||
min="0"
|
|
||||||
max="50"
|
|
||||||
v-model="multiplicatorValue"
|
|
||||||
/>
|
|
||||||
</QCard>
|
|
||||||
</Teleport>
|
|
||||||
<Teleport to="#st-data" v-if="stateStore.isSubToolbarShown()"> </Teleport>
|
|
||||||
<CrudModel
|
<CrudModel
|
||||||
v-if="claim"
|
v-if="claim"
|
||||||
data-key="ClaimEnds"
|
data-key="ClaimEnds"
|
||||||
|
|
|
@ -134,7 +134,7 @@ const STATE_COLOR = {
|
||||||
order: ['cs.priority ASC', 'created ASC'],
|
order: ['cs.priority ASC', 'created ASC'],
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #rightMenu>
|
<template #advanced-menu>
|
||||||
<ClaimFilter data-key="ClaimList" ref="claimFilterRef" />
|
<ClaimFilter data-key="ClaimList" ref="claimFilterRef" />
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
|
|
|
@ -38,7 +38,7 @@ const getBankEntities = (data, formData) => {
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.payMethod"
|
v-model="data.payMethodFk"
|
||||||
/>
|
/>
|
||||||
<VnInput :label="t('Due day')" clearable v-model="data.dueDay" />
|
<VnInput :label="t('Due day')" clearable v-model="data.dueDay" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
|
@ -1,25 +1,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
import VnCardBeta from 'components/common/VnCardBeta.vue';
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
|
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
|
||||||
import CustomerDescriptor from './CustomerDescriptor.vue';
|
import CustomerDescriptor from './CustomerDescriptor.vue';
|
||||||
import CustomerFilter from '../CustomerFilter.vue';
|
|
||||||
const route = useRoute();
|
|
||||||
|
|
||||||
const routeName = computed(() => route.name);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnCard
|
<VnCardBeta
|
||||||
data-key="Client"
|
data-key="Client"
|
||||||
base-url="Clients"
|
base-url="Clients"
|
||||||
:descriptor="CustomerDescriptor"
|
:descriptor="CustomerDescriptor"
|
||||||
:filter-panel="routeName != 'CustomerConsumption' && CustomerFilter"
|
|
||||||
search-data-key="CustomerList"
|
|
||||||
:searchbar-props="{
|
|
||||||
url: 'Clients/filter',
|
|
||||||
label: 'Search customer',
|
|
||||||
info: 'You can search by customer id or name',
|
|
||||||
}"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -152,7 +152,8 @@ const updateDateParams = (value, params) => {
|
||||||
v-if="campaignList"
|
v-if="campaignList"
|
||||||
data-key="CustomerConsumption"
|
data-key="CustomerConsumption"
|
||||||
url="Clients/consumption"
|
url="Clients/consumption"
|
||||||
:order="['itemTypeFk', 'itemName', 'itemSize', 'description']"
|
:order="['itemTypeFk', 'itemName', 'itemSize', 'description']"
|
||||||
|
:filter="{ where: { clientFk: route.params.id } }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
search-url="consumption"
|
search-url="consumption"
|
||||||
:user-params="userParams"
|
:user-params="userParams"
|
||||||
|
|
|
@ -1,177 +0,0 @@
|
||||||
<script setup>
|
|
||||||
import { useI18n } from 'vue-i18n';
|
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
|
||||||
import { QItem } from 'quasar';
|
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
|
||||||
import { QItemSection } from 'quasar';
|
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
|
||||||
import { toDate } from 'src/filters';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
|
||||||
defineProps({ dataKey: { type: String, required: true } });
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<VnFilterPanel :data-key="dataKey" :search-button="true">
|
|
||||||
<template #tags="{ tag, formatFn }">
|
|
||||||
<div class="q-gutter-x-xs">
|
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
|
||||||
<span>{{ formatFn(tag.value) }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #body="{ params }">
|
|
||||||
<QItem>
|
|
||||||
<QItemSection>
|
|
||||||
<VnInput
|
|
||||||
:label="t('params.item')"
|
|
||||||
v-model="params.itemId"
|
|
||||||
is-outlined
|
|
||||||
lazy-rules
|
|
||||||
/>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem>
|
|
||||||
<QItemSection>
|
|
||||||
<VnSelect
|
|
||||||
v-model="params.buyerId"
|
|
||||||
url="TicketRequests/getItemTypeWorker"
|
|
||||||
:fields="['id', 'nickname']"
|
|
||||||
sort-by="nickname ASC"
|
|
||||||
:label="t('params.buyer')"
|
|
||||||
option-value="id"
|
|
||||||
option-label="nickname"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
rounded
|
|
||||||
/>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem>
|
|
||||||
<QItemSection>
|
|
||||||
<VnSelect
|
|
||||||
v-model="params.typeId"
|
|
||||||
url="ItemTypes"
|
|
||||||
:include="['category']"
|
|
||||||
:fields="['id', 'name', 'categoryFk']"
|
|
||||||
sort-by="name ASC"
|
|
||||||
:label="t('params.typeId')"
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
rounded
|
|
||||||
>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption>{{
|
|
||||||
scope.opt?.category?.name
|
|
||||||
}}</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem>
|
|
||||||
<QItemSection>
|
|
||||||
<VnSelect
|
|
||||||
v-model="params.categoryId"
|
|
||||||
url="ItemCategories"
|
|
||||||
:fields="['id', 'name']"
|
|
||||||
sort-by="name ASC"
|
|
||||||
:label="t('params.categoryId')"
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
rounded
|
|
||||||
/>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem>
|
|
||||||
<QItemSection>
|
|
||||||
<VnSelect
|
|
||||||
v-model="params.campaignId"
|
|
||||||
url="Campaigns/latest"
|
|
||||||
sort-by="dated DESC"
|
|
||||||
:label="t('params.campaignId')"
|
|
||||||
option-label="code"
|
|
||||||
option-value="id"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
rounded
|
|
||||||
>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{
|
|
||||||
t(`params.${scope.opt?.code}`)
|
|
||||||
}}</QItemLabel>
|
|
||||||
<QItemLabel caption>{{
|
|
||||||
toDate(scope.opt.dated)
|
|
||||||
}}</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem>
|
|
||||||
<QItemSection>
|
|
||||||
<VnInputDate
|
|
||||||
:label="t('params.from')"
|
|
||||||
v-model="params.from"
|
|
||||||
@update:model-value="searchFn()"
|
|
||||||
is-outlined
|
|
||||||
/>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem>
|
|
||||||
<QItemSection>
|
|
||||||
<VnInputDate
|
|
||||||
:label="t('params.to')"
|
|
||||||
v-model="params.to"
|
|
||||||
@update:model-value="searchFn()"
|
|
||||||
is-outlined
|
|
||||||
/>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnFilterPanel>
|
|
||||||
</template>
|
|
||||||
<i18n>
|
|
||||||
en:
|
|
||||||
params:
|
|
||||||
item: Item id
|
|
||||||
buyer: Buyer
|
|
||||||
type: Type
|
|
||||||
category: Category
|
|
||||||
itemId: Item id
|
|
||||||
buyerId: Buyer
|
|
||||||
typeId: Type
|
|
||||||
categoryId: Category
|
|
||||||
from: From
|
|
||||||
to: To
|
|
||||||
campaignId: Campaña
|
|
||||||
valentinesDay: Valentine's Day
|
|
||||||
mothersDay: Mother's Day
|
|
||||||
allSaints: All Saints' Day
|
|
||||||
es:
|
|
||||||
params:
|
|
||||||
item: Id artículo
|
|
||||||
buyer: Comprador
|
|
||||||
type: Tipo
|
|
||||||
category: Categoría
|
|
||||||
itemId: Id Artículo
|
|
||||||
buyerId: Comprador
|
|
||||||
typeId: Tipo
|
|
||||||
categoryId: Reino
|
|
||||||
from: Desde
|
|
||||||
to: Hasta
|
|
||||||
campaignId: Campaña
|
|
||||||
valentinesDay: Día de San Valentín
|
|
||||||
mothersDay: Día de la Madre
|
|
||||||
allSaints: Día de Todos los Santos
|
|
||||||
</i18n>
|
|
|
@ -59,6 +59,7 @@ const columns = computed(() => [
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnTable
|
<VnTable
|
||||||
|
:user-filter="{ include: filter.include }"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="ClientCredit"
|
data-key="ClientCredit"
|
||||||
url="ClientCredits"
|
url="ClientCredits"
|
||||||
|
|
|
@ -53,6 +53,7 @@ const debtWarning = computed(() => {
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
data-key="customer"
|
data-key="customer"
|
||||||
|
width="lg-width"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<CustomerDescriptorMenu :customer="entity" />
|
<CustomerDescriptorMenu :customer="entity" />
|
||||||
|
@ -187,14 +188,18 @@ const debtWarning = computed(() => {
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBtn
|
<QBtn
|
||||||
:to="{
|
:to="{
|
||||||
name: 'AccountSummary',
|
name: 'OrderList',
|
||||||
params: { id: entity.id },
|
query: {
|
||||||
|
createForm: JSON.stringify({
|
||||||
|
clientFk: entity.id,
|
||||||
|
}),
|
||||||
|
},
|
||||||
}"
|
}"
|
||||||
size="md"
|
size="md"
|
||||||
icon="face"
|
icon="vn:basketadd"
|
||||||
color="primary"
|
color="primary"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Go to user') }}</QTooltip>
|
<QTooltip>{{ t('globals.pageTitles.createOrder') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="entity.supplier"
|
v-if="entity.supplier"
|
||||||
|
@ -218,14 +223,9 @@ en:
|
||||||
unpaidDated: 'Date {dated}'
|
unpaidDated: 'Date {dated}'
|
||||||
unpaidAmount: 'Amount {amount}'
|
unpaidAmount: 'Amount {amount}'
|
||||||
es:
|
es:
|
||||||
Go to module index: Ir al índice del módulo
|
|
||||||
Customer ticket list: Listado de tickets del cliente
|
Customer ticket list: Listado de tickets del cliente
|
||||||
Customer invoice out list: Listado de facturas del cliente
|
Customer invoice out list: Listado de facturas del cliente
|
||||||
New order: Nuevo pedido
|
|
||||||
New ticket: Nuevo ticket
|
|
||||||
Go to user: Ir al usuario
|
|
||||||
Go to supplier: Ir al proveedor
|
Go to supplier: Ir al proveedor
|
||||||
Customer unpaid: Cliente impago
|
|
||||||
Unpaid: Impagado
|
Unpaid: Impagado
|
||||||
unpaidDated: 'Fecha {dated}'
|
unpaidDated: 'Fecha {dated}'
|
||||||
unpaidAmount: 'Importe {amount}'
|
unpaidAmount: 'Importe {amount}'
|
||||||
|
|
|
@ -51,7 +51,6 @@ const openCreateForm = (type) => {
|
||||||
};
|
};
|
||||||
const clientFk = {
|
const clientFk = {
|
||||||
ticket: 'clientId',
|
ticket: 'clientId',
|
||||||
order: 'clientFk',
|
|
||||||
};
|
};
|
||||||
const key = clientFk[type];
|
const key = clientFk[type];
|
||||||
if (!key) return;
|
if (!key) return;
|
||||||
|
@ -70,11 +69,6 @@ const openCreateForm = (type) => {
|
||||||
{{ t('globals.pageTitles.createTicket') }}
|
{{ t('globals.pageTitles.createTicket') }}
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem v-ripple clickable @click="openCreateForm('order')">
|
|
||||||
<QItemSection>
|
|
||||||
{{ t('globals.pageTitles.createOrder') }}
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem v-ripple clickable>
|
<QItem v-ripple clickable>
|
||||||
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
|
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -84,6 +84,7 @@ const columns = computed(() => [
|
||||||
component: 'number',
|
component: 'number',
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
required: true,
|
required: true,
|
||||||
|
positive: false,
|
||||||
},
|
},
|
||||||
format: ({ amount }) => toCurrency(amount),
|
format: ({ amount }) => toCurrency(amount),
|
||||||
create: true,
|
create: true,
|
||||||
|
|
|
@ -50,7 +50,8 @@ const filterClientFindOne = {
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QCheckbox :label="t('Unpaid client')" v-model="data.unpaid" />
|
<QCheckbox :label="t('Unpaid client')" v-model="data.unpaid"
|
||||||
|
data-cy="UnpaidCheckBox" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow class="row q-gutter-md q-mb-md" v-show="data.unpaid">
|
<VnRow class="row q-gutter-md q-mb-md" v-show="data.unpaid">
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
|
@ -169,9 +170,16 @@ en:
|
||||||
fi: FI
|
fi: FI
|
||||||
salesPersonFk: Salesperson
|
salesPersonFk: Salesperson
|
||||||
provinceFk: Province
|
provinceFk: Province
|
||||||
|
isActive: Is active
|
||||||
city: City
|
city: City
|
||||||
phone: Phone
|
phone: Phone
|
||||||
email: Email
|
email: Email
|
||||||
|
isToBeMailed: Mailed
|
||||||
|
isEqualizated: Equailized
|
||||||
|
businessTypeFk: Business type
|
||||||
|
sageTaxTypeFk: Sage Tax Type
|
||||||
|
sageTransactionTypeFk: Sage Tax Type
|
||||||
|
payMethodFk: Billing data
|
||||||
zoneFk: Zone
|
zoneFk: Zone
|
||||||
socialName : Social name
|
socialName : Social name
|
||||||
name: Name
|
name: Name
|
||||||
|
@ -180,6 +188,13 @@ es:
|
||||||
params:
|
params:
|
||||||
search: Contiene
|
search: Contiene
|
||||||
fi: NIF
|
fi: NIF
|
||||||
|
isActive: Activo
|
||||||
|
isToBeMailed: A enviar
|
||||||
|
isEqualizated: Recargo de equivalencia
|
||||||
|
businessTypeFk: Tipo de negocio
|
||||||
|
sageTaxTypeFk: Tipo de impuesto Sage
|
||||||
|
sageTransactionTypeFk: Tipo de impuesto Sage
|
||||||
|
payMethodFk: Forma de pago
|
||||||
salesPersonFk: Comercial
|
salesPersonFk: Comercial
|
||||||
provinceFk: Provincia
|
provinceFk: Provincia
|
||||||
city: Ciudad
|
city: Ciudad
|
||||||
|
|
|
@ -5,18 +5,19 @@ import { useRouter } from 'vue-router';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
|
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
|
||||||
import CustomerSummary from './Card/CustomerSummary.vue';
|
import CustomerSummary from './Card/CustomerSummary.vue';
|
||||||
import CustomerFilter from './CustomerFilter.vue';
|
import CustomerFilter from './CustomerFilter.vue';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
import VnLocation from 'src/components/common/VnLocation.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
|
||||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
const dataKey = 'CustomerList';
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -37,8 +38,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('globals.name'),
|
|
||||||
name: 'name',
|
name: 'name',
|
||||||
|
label: t('globals.name'),
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
create: true,
|
create: true,
|
||||||
columnClass: 'expand',
|
columnClass: 'expand',
|
||||||
|
@ -50,25 +51,30 @@ const columns = computed(() => [
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
create: true,
|
create: true,
|
||||||
columnClass: 'expand',
|
columnClass: 'expand',
|
||||||
attrs: {
|
|
||||||
uppercase: true,
|
|
||||||
},
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
|
url: 'Clients',
|
||||||
|
fields: ['socialName'],
|
||||||
|
optionLabel: 'socialName',
|
||||||
|
optionValue: 'socialName',
|
||||||
uppercase: false,
|
uppercase: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
attrs: {
|
||||||
|
uppercase: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.fi'),
|
|
||||||
name: 'fi',
|
name: 'fi',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.fi'),
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
|
|
||||||
name: 'salesPersonFk',
|
name: 'salesPersonFk',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Workers/activeWithInheritedRole',
|
url: 'Workers/activeWithInheritedRole',
|
||||||
|
@ -84,8 +90,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.credit'),
|
|
||||||
name: 'credit',
|
name: 'credit',
|
||||||
|
label: t('customer.summary.credit'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'number',
|
component: 'number',
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
|
@ -93,8 +99,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.creditInsurance'),
|
|
||||||
name: 'creditInsurance',
|
name: 'creditInsurance',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.creditInsurance'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'number',
|
component: 'number',
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
|
@ -102,8 +108,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.phone'),
|
|
||||||
name: 'phone',
|
name: 'phone',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.phone'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'number',
|
component: 'number',
|
||||||
|
@ -122,8 +128,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.mobile'),
|
|
||||||
name: 'mobile',
|
name: 'mobile',
|
||||||
|
label: t('customer.summary.mobile'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'number',
|
component: 'number',
|
||||||
|
@ -132,8 +138,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.street'),
|
|
||||||
name: 'street',
|
name: 'street',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.street'),
|
||||||
create: true,
|
create: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
|
@ -142,8 +148,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.countryFk'),
|
|
||||||
name: 'countryFk',
|
name: 'countryFk',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.countryFk'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'select',
|
component: 'select',
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
|
@ -156,8 +162,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.provinceFk'),
|
|
||||||
name: 'provinceFk',
|
name: 'provinceFk',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.provinceFk'),
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Provinces',
|
url: 'Provinces',
|
||||||
|
@ -169,24 +175,24 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.city'),
|
|
||||||
name: 'city',
|
name: 'city',
|
||||||
|
label: t('customer.summary.city'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.postcode'),
|
|
||||||
name: 'postcode',
|
name: 'postcode',
|
||||||
|
label: t('customer.summary.postcode'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('globals.params.email'),
|
|
||||||
name: 'email',
|
name: 'email',
|
||||||
|
label: t('globals.params.email'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.created'),
|
|
||||||
name: 'created',
|
name: 'created',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.created'),
|
||||||
format: ({ created }) => toDate(created),
|
format: ({ created }) => toDate(created),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'date',
|
component: 'date',
|
||||||
|
@ -196,10 +202,13 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.businessTypeFk'),
|
|
||||||
name: 'businessTypeFk',
|
name: 'businessTypeFk',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.businessTypeFk'),
|
||||||
create: true,
|
create: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
columnFilter: {
|
||||||
|
inWhere: true,
|
||||||
|
},
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'BusinessTypes',
|
url: 'BusinessTypes',
|
||||||
fields: ['code', 'description'],
|
fields: ['code', 'description'],
|
||||||
|
@ -214,8 +223,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.payMethodFk'),
|
|
||||||
name: 'payMethodFk',
|
name: 'payMethodFk',
|
||||||
|
label: t('customer.summary.payMethodFk'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
|
@ -235,8 +244,6 @@ const columns = computed(() => [
|
||||||
optionLabel: 'vat',
|
optionLabel: 'vat',
|
||||||
url: 'SageTaxTypes',
|
url: 'SageTaxTypes',
|
||||||
},
|
},
|
||||||
alias: 'sti',
|
|
||||||
inWhere: true,
|
|
||||||
},
|
},
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.sageTaxType),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.sageTaxType),
|
||||||
},
|
},
|
||||||
|
@ -250,15 +257,13 @@ const columns = computed(() => [
|
||||||
optionLabel: 'transaction',
|
optionLabel: 'transaction',
|
||||||
url: 'SageTransactionTypes',
|
url: 'SageTransactionTypes',
|
||||||
},
|
},
|
||||||
alias: 'stt',
|
|
||||||
inWhere: true,
|
|
||||||
},
|
},
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.sageTransactionType),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.sageTransactionType),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.isActive'),
|
|
||||||
name: 'isActive',
|
name: 'isActive',
|
||||||
|
label: t('customer.summary.isActive'),
|
||||||
chip: {
|
chip: {
|
||||||
color: null,
|
color: null,
|
||||||
condition: (value) => !value,
|
condition: (value) => !value,
|
||||||
|
@ -270,24 +275,24 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('globals.isVies'),
|
|
||||||
name: 'isVies',
|
name: 'isVies',
|
||||||
|
label: t('globals.isVies'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.isTaxDataChecked'),
|
|
||||||
name: 'isTaxDataChecked',
|
name: 'isTaxDataChecked',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.isTaxDataChecked'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.isEqualizated'),
|
|
||||||
name: 'isEqualizated',
|
name: 'isEqualizated',
|
||||||
|
label: t('customer.summary.isEqualizated'),
|
||||||
create: true,
|
create: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
|
@ -295,8 +300,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.isFreezed'),
|
|
||||||
name: 'isFreezed',
|
name: 'isFreezed',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.isFreezed'),
|
||||||
chip: {
|
chip: {
|
||||||
color: null,
|
color: null,
|
||||||
condition: (value) => value,
|
condition: (value) => value,
|
||||||
|
@ -308,48 +313,48 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.hasToInvoice'),
|
|
||||||
name: 'hasToInvoice',
|
name: 'hasToInvoice',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.hasToInvoice'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.hasToInvoiceByAddress'),
|
|
||||||
name: 'hasToInvoiceByAddress',
|
name: 'hasToInvoiceByAddress',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.hasToInvoiceByAddress'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.isToBeMailed'),
|
|
||||||
name: 'isToBeMailed',
|
name: 'isToBeMailed',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.isToBeMailed'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.hasLcr'),
|
|
||||||
name: 'hasLcr',
|
name: 'hasLcr',
|
||||||
|
label: t('customer.summary.hasLcr'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.hasCoreVnl'),
|
|
||||||
name: 'hasCoreVnl',
|
name: 'hasCoreVnl',
|
||||||
|
label: t('customer.summary.hasCoreVnl'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.hasSepaVnl'),
|
|
||||||
name: 'hasSepaVnl',
|
name: 'hasSepaVnl',
|
||||||
|
label: t('customer.extendedList.tableVisibleColumns.hasSepaVnl'),
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
|
@ -398,82 +403,91 @@ function handleLocation(data, location) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSearchbar
|
<VnSection
|
||||||
:info="t('You can search by customer id or name')"
|
:data-key="dataKey"
|
||||||
:label="t('Search customer')"
|
:columns="columns"
|
||||||
data-key="CustomerList"
|
prefix="customer"
|
||||||
/>
|
:array-data-props="{
|
||||||
<RightMenu>
|
url: 'Clients/filter',
|
||||||
<template #right-panel>
|
order: ['id DESC'],
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template #advanced-menu>
|
||||||
<CustomerFilter data-key="CustomerList" />
|
<CustomerFilter data-key="CustomerList" />
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
<template #body>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="CustomerList"
|
:data-key="dataKey"
|
||||||
url="Clients/filter"
|
url="Clients/filter"
|
||||||
order="id DESC"
|
:create="{
|
||||||
:create="{
|
urlCreate: 'Clients/createWithUser',
|
||||||
urlCreate: 'Clients/createWithUser',
|
title: t('globals.pageTitles.customerCreate'),
|
||||||
title: t('globals.pageTitles.customerCreate'),
|
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
formInitialData: {
|
||||||
formInitialData: {
|
active: true,
|
||||||
active: true,
|
isEqualizated: false,
|
||||||
isEqualizated: false,
|
},
|
||||||
},
|
|
||||||
}"
|
|
||||||
:columns="columns"
|
|
||||||
:right-search="false"
|
|
||||||
redirect="customer"
|
|
||||||
>
|
|
||||||
<template #more-create-dialog="{ data }">
|
|
||||||
<VnSelectWorker
|
|
||||||
:label="t('customer.summary.salesPerson')"
|
|
||||||
v-model="data.salesPersonFk"
|
|
||||||
:params="{
|
|
||||||
departmentCodes: ['VT', 'shopping'],
|
|
||||||
}"
|
}"
|
||||||
:has-avatar="true"
|
:columns="columns"
|
||||||
:id-value="data.salesPersonFk"
|
:right-search="false"
|
||||||
emit-value
|
redirect="customer"
|
||||||
auto-load
|
|
||||||
>
|
>
|
||||||
<template #prepend>
|
<template #more-create-dialog="{ data }">
|
||||||
<VnAvatar
|
<VnSelectWorker
|
||||||
:worker-id="data.salesPersonFk"
|
:label="t('customer.summary.salesPerson')"
|
||||||
color="primary"
|
v-model="data.salesPersonFk"
|
||||||
:title="title"
|
:params="{
|
||||||
|
departmentCodes: ['VT', 'shopping'],
|
||||||
|
}"
|
||||||
|
:has-avatar="true"
|
||||||
|
:id-value="data.salesPersonFk"
|
||||||
|
emit-value
|
||||||
|
auto-load
|
||||||
|
>
|
||||||
|
<template #prepend>
|
||||||
|
<VnAvatar
|
||||||
|
:worker-id="data.salesPersonFk"
|
||||||
|
color="primary"
|
||||||
|
:title="title"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
||||||
|
<QItemLabel caption
|
||||||
|
>{{ scope.opt?.nickname }},
|
||||||
|
{{ scope.opt?.code }}</QItemLabel
|
||||||
|
>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelectWorker>
|
||||||
|
<VnLocation
|
||||||
|
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"
|
||||||
|
v-model="data.location"
|
||||||
|
@update:model-value="(location) => handleLocation(data, location)"
|
||||||
/>
|
/>
|
||||||
|
<QInput v-model="data.userName" :label="t('Web user')" />
|
||||||
|
<QInput
|
||||||
|
:label="t('Email')"
|
||||||
|
clearable
|
||||||
|
type="email"
|
||||||
|
v-model="data.email"
|
||||||
|
>
|
||||||
|
<template #append>
|
||||||
|
<QIcon name="info" class="cursor-info">
|
||||||
|
<QTooltip max-width="400px">{{
|
||||||
|
t('customer.basicData.youCanSaveMultipleEmails')
|
||||||
|
}}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</template>
|
||||||
|
</QInput>
|
||||||
</template>
|
</template>
|
||||||
<template #option="scope">
|
</VnTable>
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption
|
|
||||||
>{{ scope.opt?.nickname }},
|
|
||||||
{{ scope.opt?.code }}</QItemLabel
|
|
||||||
>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelectWorker>
|
|
||||||
<VnLocation
|
|
||||||
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"
|
|
||||||
v-model="data.location"
|
|
||||||
@update:model-value="(location) => handleLocation(data, location)"
|
|
||||||
/>
|
|
||||||
<QInput v-model="data.userName" :label="t('Web user')" />
|
|
||||||
<QInput :label="t('Email')" clearable type="email" v-model="data.email">
|
|
||||||
<template #append>
|
|
||||||
<QIcon name="info" class="cursor-info">
|
|
||||||
<QTooltip max-width="400px">{{
|
|
||||||
t('customer.basicData.youCanSaveMultipleEmails')
|
|
||||||
}}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
</template>
|
|
||||||
</QInput>
|
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnSection>
|
||||||
</template>
|
</template>
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
|
|
|
@ -11,14 +11,14 @@ import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue';
|
import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue';
|
||||||
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const dataRef = ref(null);
|
const dataRef = ref(null);
|
||||||
|
|
||||||
const balanceDueTotal = ref(0);
|
|
||||||
const selected = ref([]);
|
const selected = ref([]);
|
||||||
|
const arrayData = useArrayData('CustomerDefaulter');
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -165,26 +165,37 @@ const viewAddObservation = (rowsSelected) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onFetch = async (data) => {
|
|
||||||
balanceDueTotal.value = data.reduce((acc, { amount = 0 }) => acc + amount, 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
function exprBuilder(param, value) {
|
function exprBuilder(param, value) {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'clientFk':
|
|
||||||
return { [`d.${param}`]: value };
|
|
||||||
case 'creditInsurance':
|
|
||||||
case 'amount':
|
|
||||||
case 'workerFk':
|
|
||||||
case 'departmentFk':
|
|
||||||
case 'countryFk':
|
|
||||||
case 'payMethod':
|
|
||||||
case 'salesPersonFk':
|
case 'salesPersonFk':
|
||||||
|
case 'creditInsurance':
|
||||||
|
case 'countryFk':
|
||||||
|
return { [`c.${param}`]: value };
|
||||||
|
case 'payMethod':
|
||||||
|
return { [`c.payMethodFk`]: value };
|
||||||
|
case 'workerFk':
|
||||||
|
return { [`co.${param}`]: value };
|
||||||
|
case 'departmentFk':
|
||||||
|
return { [`wd.${param}`]: value };
|
||||||
|
case 'amount':
|
||||||
|
case 'clientFk':
|
||||||
return { [`d.${param}`]: value };
|
return { [`d.${param}`]: value };
|
||||||
case 'created':
|
case 'created':
|
||||||
return { 'd.created': { between: dateRange(value) } };
|
return { 'd.created': { between: dateRange(value) } };
|
||||||
case 'defaulterSinced':
|
case 'defaulterSinced':
|
||||||
return { 'd.defaulterSinced': { between: dateRange(value) } };
|
return { 'd.defaulterSinced': { between: dateRange(value) } };
|
||||||
|
case 'isWorker': {
|
||||||
|
if (value == undefined) return;
|
||||||
|
const search = value ? 'worker' : { neq: 'worker' };
|
||||||
|
return { 'c.businessTypeFk': search };
|
||||||
|
}
|
||||||
|
case 'hasRecovery': {
|
||||||
|
if (value == undefined) return;
|
||||||
|
const search = value ? null : { neq: null };
|
||||||
|
return { 'r.finished': search };
|
||||||
|
}
|
||||||
|
case 'observation':
|
||||||
|
return { 'co.text': { like: `%${value}%` } };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -192,7 +203,7 @@ function exprBuilder(param, value) {
|
||||||
<template>
|
<template>
|
||||||
<VnSubToolbar>
|
<VnSubToolbar>
|
||||||
<template #st-data>
|
<template #st-data>
|
||||||
<CustomerBalanceDueTotal :amount="balanceDueTotal" />
|
<CustomerBalanceDueTotal :amount="arrayData.store.data?.amount" />
|
||||||
</template>
|
</template>
|
||||||
<template #st-actions>
|
<template #st-actions>
|
||||||
<QBtn
|
<QBtn
|
||||||
|
@ -211,8 +222,6 @@ function exprBuilder(param, value) {
|
||||||
url="Defaulters/filter"
|
url="Defaulters/filter"
|
||||||
:expr-builder="exprBuilder"
|
:expr-builder="exprBuilder"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
@on-fetch="onFetch"
|
|
||||||
:use-model="true"
|
|
||||||
:table="{
|
:table="{
|
||||||
'row-key': 'clientFk',
|
'row-key': 'clientFk',
|
||||||
selection: 'multiple',
|
selection: 'multiple',
|
||||||
|
@ -221,6 +230,7 @@ function exprBuilder(param, value) {
|
||||||
:disable-option="{ card: true }"
|
:disable-option="{ card: true }"
|
||||||
auto-load
|
auto-load
|
||||||
:order="['amount DESC']"
|
:order="['amount DESC']"
|
||||||
|
key-data="defaulters"
|
||||||
>
|
>
|
||||||
<template #column-clientFk="{ row }">
|
<template #column-clientFk="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { onBeforeMount, ref } from 'vue';
|
import { onBeforeMount, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
import VnLocation from 'src/components/common/VnLocation.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
@ -13,11 +13,12 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||||
import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
|
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const quasar = useQuasar();
|
||||||
const urlUpdate = ref('');
|
const urlUpdate = ref('');
|
||||||
const agencyModes = ref([]);
|
const agencyModes = ref([]);
|
||||||
const incoterms = ref([]);
|
const incoterms = ref([]);
|
||||||
|
@ -83,8 +84,26 @@ const deleteNote = (id, index) => {
|
||||||
notes.value.splice(index, 1);
|
notes.value.splice(index, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDataSaved = async () => {
|
const updateAddress = async (data) => {
|
||||||
let payload = {
|
await axios.patch(urlUpdate.value, data);
|
||||||
|
};
|
||||||
|
|
||||||
|
const updateAddressTicket = async () => {
|
||||||
|
urlUpdate.value += '?updateObservations=true';
|
||||||
|
};
|
||||||
|
|
||||||
|
const updateObservations = async (payload) => {
|
||||||
|
await axios.post('AddressObservations/crud', payload);
|
||||||
|
notes.value = [];
|
||||||
|
deletes.value = [];
|
||||||
|
toCustomerAddress();
|
||||||
|
};
|
||||||
|
async function updateAll({ data, payload }) {
|
||||||
|
await updateObservations(payload);
|
||||||
|
await updateAddress(data);
|
||||||
|
}
|
||||||
|
function getPayload() {
|
||||||
|
return {
|
||||||
creates: notes.value.filter((note) => note.$isNew),
|
creates: notes.value.filter((note) => note.$isNew),
|
||||||
deletes: deletes.value,
|
deletes: deletes.value,
|
||||||
updates: notes.value
|
updates: notes.value
|
||||||
|
@ -101,14 +120,40 @@ const onDataSaved = async () => {
|
||||||
where: { id: note.id },
|
where: { id: note.id },
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
await axios.post('AddressObservations/crud', payload);
|
async function handleDialog(data) {
|
||||||
notes.value = [];
|
const payload = getPayload();
|
||||||
deletes.value = [];
|
const body = { data, payload };
|
||||||
toCustomerAddress();
|
if (payload.updates.length) {
|
||||||
};
|
quasar
|
||||||
|
.dialog({
|
||||||
|
component: VnConfirm,
|
||||||
|
componentProps: {
|
||||||
|
title: t(
|
||||||
|
'confirmTicket'
|
||||||
|
),
|
||||||
|
message: t('confirmDeletionMessage'),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.onOk(async () => {
|
||||||
|
await updateAddressTicket();
|
||||||
|
await updateAll(body);
|
||||||
|
toCustomerAddress();
|
||||||
|
})
|
||||||
|
.onCancel(async () => {
|
||||||
|
await updateAll(body);
|
||||||
|
toCustomerAddress();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
updateAll(body);
|
||||||
|
toCustomerAddress();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const toCustomerAddress = () => {
|
const toCustomerAddress = () => {
|
||||||
|
notes.value = [];
|
||||||
|
deletes.value = [];
|
||||||
router.push({
|
router.push({
|
||||||
name: 'CustomerAddress',
|
name: 'CustomerAddress',
|
||||||
params: {
|
params: {
|
||||||
|
@ -143,7 +188,7 @@ function handleLocation(data, location) {
|
||||||
:observe-form-changes="false"
|
:observe-form-changes="false"
|
||||||
:url-update="urlUpdate"
|
:url-update="urlUpdate"
|
||||||
:url="`Addresses/${route.params.addressId}`"
|
:url="`Addresses/${route.params.addressId}`"
|
||||||
@on-data-saved="onDataSaved()"
|
:save-fn="handleDialog"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #moreActions>
|
<template #moreActions>
|
||||||
|
@ -336,4 +381,9 @@ es:
|
||||||
Remove note: Eliminar nota
|
Remove note: Eliminar nota
|
||||||
Longitude: Longitud
|
Longitude: Longitud
|
||||||
Latitude: Latitud
|
Latitude: Latitud
|
||||||
|
confirmTicket: ¿Desea modificar también los estados de todos los tickets que están a punto de ser servidos?
|
||||||
|
confirmDeletionMessage: Si le das a aceptar, se modificaran todas las notas de los ticket a futuro
|
||||||
|
en:
|
||||||
|
confirmTicket: Do you also want to modify the states of all the tickets that are about to be served?
|
||||||
|
confirmDeletionMessage: If you click accept, all the notes of the future tickets will be modified
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -214,7 +214,7 @@ const toCustomerSamples = () => {
|
||||||
<template #custom-buttons>
|
<template #custom-buttons>
|
||||||
<QBtn
|
<QBtn
|
||||||
:disabled="isLoading || !sampleType?.hasPreview"
|
:disabled="isLoading || !sampleType?.hasPreview"
|
||||||
:label="t('Preview')"
|
:label="t('globals.preview')"
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
@click.stop="getPreview()"
|
@click.stop="getPreview()"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
@ -353,7 +353,6 @@ es:
|
||||||
Its only used when sample is sent: Se utiliza únicamente cuando se envía la plantilla
|
Its only used when sample is sent: Se utiliza únicamente cuando se envía la plantilla
|
||||||
To who should the recipient replay?: ¿A quien debería responder el destinatario?
|
To who should the recipient replay?: ¿A quien debería responder el destinatario?
|
||||||
Edit address: Editar dirección
|
Edit address: Editar dirección
|
||||||
Preview: Vista previa
|
|
||||||
Email cannot be blank: Debes introducir un email
|
Email cannot be blank: Debes introducir un email
|
||||||
Choose a sample: Selecciona una plantilla
|
Choose a sample: Selecciona una plantilla
|
||||||
Choose a company: Selecciona una empresa
|
Choose a company: Selecciona una empresa
|
||||||
|
|
|
@ -114,7 +114,7 @@ const columns = computed(() => [
|
||||||
action: ({ id }) =>
|
action: ({ id }) =>
|
||||||
window.open(
|
window.open(
|
||||||
router.resolve({ params: { id }, name: 'TicketSale' }).href,
|
router.resolve({ params: { id }, name: 'TicketSale' }).href,
|
||||||
'_blank'
|
'_blank',
|
||||||
),
|
),
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
|
@ -122,7 +122,7 @@ const columns = computed(() => [
|
||||||
title: t('components.smartCard.viewSummary'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
action: (row) => viewSummary(row.id, TicketSummary),
|
action: (row) => viewSummary(row.id, TicketSummary, 'lg-width'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
import { describe, it, expect, vi, afterEach } from 'vitest';
|
||||||
|
import axios from 'axios';
|
||||||
|
import { getAddresses } from 'src/pages/Customer/composables/getAddresses';
|
||||||
|
|
||||||
|
vi.mock('axios');
|
||||||
|
|
||||||
|
describe('getAddresses', () => {
|
||||||
|
afterEach(() => {
|
||||||
|
vi.clearAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should fetch addresses with correct parameters for a valid clientId', async () => {
|
||||||
|
const clientId = '12345';
|
||||||
|
|
||||||
|
await getAddresses(clientId);
|
||||||
|
|
||||||
|
expect(axios.get).toHaveBeenCalledWith(`Clients/${clientId}/addresses`, {
|
||||||
|
params: {
|
||||||
|
filter: JSON.stringify({
|
||||||
|
fields: ['nickname', 'street', 'city', 'id'],
|
||||||
|
where: { isActive: true },
|
||||||
|
order: 'nickname ASC',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return undefined when clientId is not provided', async () => {
|
||||||
|
await getAddresses(undefined);
|
||||||
|
|
||||||
|
expect(axios.get).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,41 @@
|
||||||
|
import { describe, it, expect, vi, afterEach } from 'vitest';
|
||||||
|
import axios from 'axios';
|
||||||
|
import { getClient } from 'src/pages/Customer/composables/getClient';
|
||||||
|
|
||||||
|
vi.mock('axios');
|
||||||
|
|
||||||
|
describe('getClient', () => {
|
||||||
|
afterEach(() => {
|
||||||
|
vi.clearAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
const generateParams = (clientId) => ({
|
||||||
|
params: {
|
||||||
|
filter: JSON.stringify({
|
||||||
|
include: {
|
||||||
|
relation: 'defaultAddress',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'agencyModeFk'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
where: { id: clientId },
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should fetch client data with correct parameters for a valid clientId', async () => {
|
||||||
|
const clientId = '12345';
|
||||||
|
|
||||||
|
await getClient(clientId);
|
||||||
|
|
||||||
|
expect(axios.get).toHaveBeenCalledWith('Clients', generateParams(clientId));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return undefined when clientId is not provided', async () => {
|
||||||
|
const clientId = undefined;
|
||||||
|
|
||||||
|
await getClient(clientId);
|
||||||
|
|
||||||
|
expect(axios.get).toHaveBeenCalledWith('Clients', generateParams(clientId));
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,14 @@
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
export async function getAddresses(clientId) {
|
||||||
|
if (!clientId) return;
|
||||||
|
const filter = {
|
||||||
|
fields: ['nickname', 'street', 'city', 'id'],
|
||||||
|
where: { isActive: true },
|
||||||
|
order: 'nickname ASC',
|
||||||
|
};
|
||||||
|
const params = { filter: JSON.stringify(filter) };
|
||||||
|
return await axios.get(`Clients/${clientId}/addresses`, {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
};
|
|
@ -0,0 +1,15 @@
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
export async function getClient(clientId) {
|
||||||
|
const filter = {
|
||||||
|
include: {
|
||||||
|
relation: 'defaultAddress',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'agencyModeFk'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
where: { id: clientId },
|
||||||
|
};
|
||||||
|
const params = { filter: JSON.stringify(filter) };
|
||||||
|
return await axios.get('Clients', { params });
|
||||||
|
};
|
|
@ -94,6 +94,8 @@ customer:
|
||||||
hasToInvoiceByAddress: Invoice by address
|
hasToInvoiceByAddress: Invoice by address
|
||||||
isToBeMailed: Mailing
|
isToBeMailed: Mailing
|
||||||
hasSepaVnl: VNL B2B received
|
hasSepaVnl: VNL B2B received
|
||||||
|
search: Search customer
|
||||||
|
searchInfo: You can search by customer ID
|
||||||
params:
|
params:
|
||||||
id: Id
|
id: Id
|
||||||
isWorker: Is Worker
|
isWorker: Is Worker
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
Search customer: Buscar cliente
|
|
||||||
You can search by customer id or name: Puedes buscar por id o nombre del cliente
|
|
||||||
customer:
|
customer:
|
||||||
card:
|
card:
|
||||||
debt: Riesgo
|
debt: Riesgo
|
||||||
|
@ -96,6 +94,8 @@ customer:
|
||||||
hasToInvoiceByAddress: Factura por consigna
|
hasToInvoiceByAddress: Factura por consigna
|
||||||
isToBeMailed: Env. emails
|
isToBeMailed: Env. emails
|
||||||
hasSepaVnl: Recibido B2B VNL
|
hasSepaVnl: Recibido B2B VNL
|
||||||
|
search: Buscar cliente
|
||||||
|
searchInfo: Puedes buscar por id o nombre del cliente
|
||||||
params:
|
params:
|
||||||
id: ID
|
id: ID
|
||||||
isWorker: Es trabajador
|
isWorker: Es trabajador
|
||||||
|
|
|
@ -10,4 +10,4 @@ import DepartmentDescriptor from 'pages/Department/Card/DepartmentDescriptor.vue
|
||||||
base-url="Departments"
|
base-url="Departments"
|
||||||
:descriptor="DepartmentDescriptor"
|
:descriptor="DepartmentDescriptor"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRole } from 'src/composables/useRole';
|
import { useRole } from 'src/composables/useRole';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
@ -11,8 +10,9 @@ import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||||
import FilterTravelForm from 'src/components/FilterTravelForm.vue';
|
import FilterTravelForm from 'src/components/FilterTravelForm.vue';
|
||||||
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
|
import VnSelectSupplier from 'src/components/common/VnSelectSupplier.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -26,6 +26,7 @@ const onFilterTravelSelected = (formData, id) => {
|
||||||
formData.travelFk = id;
|
formData.travelFk = id;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
ref="companiesRef"
|
ref="companiesRef"
|
||||||
|
@ -51,28 +52,12 @@ const onFilterTravelSelected = (formData, id) => {
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelectSupplier
|
||||||
:label="t('globals.supplier')"
|
|
||||||
v-model="data.supplierFk"
|
v-model="data.supplierFk"
|
||||||
url="Suppliers"
|
|
||||||
option-value="id"
|
|
||||||
option-label="nickname"
|
|
||||||
:fields="['id', 'nickname']"
|
|
||||||
hide-selected
|
hide-selected
|
||||||
:required="true"
|
:required="true"
|
||||||
map-options
|
map-options
|
||||||
>
|
/>
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
{{ scope.opt?.nickname }}, {{ scope.opt?.id }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
<VnSelectDialog
|
<VnSelectDialog
|
||||||
:label="t('entry.basicData.travel')"
|
:label="t('entry.basicData.travel')"
|
||||||
v-model="data.travelFk"
|
v-model="data.travelFk"
|
||||||
|
@ -93,14 +78,13 @@ const onFilterTravelSelected = (formData, id) => {
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QItemLabel
|
<QItemLabel>
|
||||||
>{{ scope.opt?.agencyModeName }} -
|
{{ scope.opt?.agencyModeName }} -
|
||||||
{{ scope.opt?.warehouseInName }} ({{
|
{{ scope.opt?.warehouseInName }}
|
||||||
toDate(scope.opt?.shipped)
|
({{ toDate(scope.opt?.shipped) }}) →
|
||||||
}}) → {{ scope.opt?.warehouseOutName }} ({{
|
{{ scope.opt?.warehouseOutName }}
|
||||||
toDate(scope.opt?.landed)
|
({{ toDate(scope.opt?.landed) }})
|
||||||
}})</QItemLabel
|
</QItemLabel>
|
||||||
>
|
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
|
@ -126,6 +110,13 @@ const onFilterTravelSelected = (formData, id) => {
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
<VnInputNumber
|
||||||
|
:label="t('entry.summary.commission')"
|
||||||
|
v-model="data.commission"
|
||||||
|
step="1"
|
||||||
|
autofocus
|
||||||
|
:positive="false"
|
||||||
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('entry.summary.currency')"
|
:label="t('entry.summary.currency')"
|
||||||
v-model="data.currencyFk"
|
v-model="data.currencyFk"
|
||||||
|
@ -133,12 +124,23 @@ const onFilterTravelSelected = (formData, id) => {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="code"
|
option-label="code"
|
||||||
/>
|
/>
|
||||||
<QInput
|
</VnRow>
|
||||||
:label="t('entry.summary.commission')"
|
<VnRow>
|
||||||
v-model="data.commission"
|
<VnInputNumber
|
||||||
type="number"
|
v-model="data.initialTemperature"
|
||||||
autofocus
|
name="initialTemperature"
|
||||||
min="0"
|
:label="t('entry.basicData.initialTemperature')"
|
||||||
|
:step="0.5"
|
||||||
|
:decimal-places="2"
|
||||||
|
:positive="false"
|
||||||
|
/>
|
||||||
|
<VnInputNumber
|
||||||
|
v-model="data.finalTemperature"
|
||||||
|
name="finalTemperature"
|
||||||
|
:label="t('entry.basicData.finalTemperature')"
|
||||||
|
:step="0.5"
|
||||||
|
:decimal-places="2"
|
||||||
|
:positive="false"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
|
|
@ -2,13 +2,10 @@
|
||||||
import { ref, computed, onMounted } from 'vue';
|
import { ref, computed, onMounted } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
import filter from './EntryFilter.js';
|
|
||||||
import EntryDescriptorMenu from './EntryDescriptorMenu.vue';
|
import EntryDescriptorMenu from './EntryDescriptorMenu.vue';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
@ -23,7 +20,42 @@ const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const entryDescriptorRef = ref(null);
|
const entryDescriptorRef = ref(null);
|
||||||
const url = ref();
|
const url = ref();
|
||||||
|
const entryFilter = {
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'travel',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'landed', 'shipped', 'agencyModeFk', 'warehouseOutFk'],
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'agency',
|
||||||
|
scope: {
|
||||||
|
fields: ['name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'warehouseOut',
|
||||||
|
scope: {
|
||||||
|
fields: ['name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'warehouseIn',
|
||||||
|
scope: {
|
||||||
|
fields: ['name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'supplier',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'nickname'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
const entityId = computed(() => {
|
const entityId = computed(() => {
|
||||||
return $props.id || route.params.id;
|
return $props.id || route.params.id;
|
||||||
});
|
});
|
||||||
|
@ -58,9 +90,10 @@ const getEntryRedirectionFilter = (entry) => {
|
||||||
ref="entryDescriptorRef"
|
ref="entryDescriptorRef"
|
||||||
module="Entry"
|
module="Entry"
|
||||||
:url="`Entries/${entityId}`"
|
:url="`Entries/${entityId}`"
|
||||||
:filter="filter"
|
:userFilter="entryFilter"
|
||||||
title="supplier.nickname"
|
title="supplier.nickname"
|
||||||
data-key="Entry"
|
data-key="Entry"
|
||||||
|
width="lg-width"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<EntryDescriptorMenu :id="entity.id" />
|
<EntryDescriptorMenu :id="entity.id" />
|
||||||
|
@ -147,7 +180,7 @@ es:
|
||||||
Supplier card: Ficha del proveedor
|
Supplier card: Ficha del proveedor
|
||||||
All travels with current agency: Todos los envíos con la agencia actual
|
All travels with current agency: Todos los envíos con la agencia actual
|
||||||
All entries with current supplier: Todas las entradas con el proveedor actual
|
All entries with current supplier: Todas las entradas con el proveedor actual
|
||||||
Go to module index: Ir al índice del modulo
|
Show entry report: Ver informe del pedido
|
||||||
Inventory entry: Es inventario
|
Inventory entry: Es inventario
|
||||||
Virtual entry: Es una redada
|
Virtual entry: Es una redada
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
import axios from 'axios';
|
||||||
import { usePrintService } from 'composables/usePrintService';
|
import { usePrintService } from 'composables/usePrintService';
|
||||||
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
||||||
|
|
||||||
const { openReport } = usePrintService();
|
const { openReport } = usePrintService();
|
||||||
|
|
||||||
|
@ -9,14 +15,47 @@ const $props = defineProps({
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const { t } = useI18n();
|
||||||
|
const { notify } = useNotify();
|
||||||
|
const quasar = useQuasar();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
function showEntryReport() {
|
function showEntryReport() {
|
||||||
openReport(`Entries/${$props.id}/entry-order-pdf`);
|
openReport(`Entries/${$props.id}/entry-order-pdf`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const openDialog = () => {
|
||||||
|
quasar.dialog({
|
||||||
|
component: VnConfirm,
|
||||||
|
componentProps: {
|
||||||
|
title: t('transferEntryDialog'),
|
||||||
|
promise: transferEntry,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const transferEntry = async () => {
|
||||||
|
const { data } = await axios.post(`Entries/${route.params.id}/transfer`);
|
||||||
|
notify('globals.dataSaved', 'positive');
|
||||||
|
const url = `#/entry/${data.newEntryFk.newEntryFk}/summary`;
|
||||||
|
window.open(url, '_blank');
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QItem v-ripple clickable @click="showEntryReport">
|
<QItem v-ripple clickable @click="showEntryReport">
|
||||||
<QItemSection>{{ $t('entryList.list.showEntryReport') }}</QItemSection>
|
<QItemSection>{{ $t('entry.descriptorMenu.showEntryReport') }}</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem v-ripple clickable @click="openDialog">
|
||||||
|
<QItemSection>{{ t('transferEntry') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
en:
|
||||||
|
transferEntryDialog: The entries will be transferred to the next day
|
||||||
|
transferEntry: Transfer Entry
|
||||||
|
es:
|
||||||
|
transferEntryDialog: Se van a transferir las compras al dia siguiente
|
||||||
|
transferEntry: Transferir Entrada
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -7,7 +7,7 @@ import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
||||||
|
|
||||||
import { toDate, toCurrency } from 'src/filters';
|
import { toDate, toCurrency, toCelsius } from 'src/filters';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
||||||
|
@ -193,6 +193,14 @@ const fetchEntryBuys = async () => {
|
||||||
:label="t('entry.summary.invoiceNumber')"
|
:label="t('entry.summary.invoiceNumber')"
|
||||||
:value="entry.invoiceNumber"
|
:value="entry.invoiceNumber"
|
||||||
/>
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('entry.basicData.initialTemperature')"
|
||||||
|
:value="toCelsius(entry.initialTemperature)"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('entry.basicData.finalTemperature')"
|
||||||
|
:value="toCelsius(entry.finalTemperature)"
|
||||||
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue