Compare commits
846 Commits
Author | SHA1 | Date |
---|---|---|
|
75258f1763 | |
|
091b597f34 | |
|
b26cf1b76f | |
|
d3679ae52c | |
|
3ec49358ad | |
|
028d0b85aa | |
|
e78dfdac0e | |
|
f499915ef4 | |
|
3844855b19 | |
|
4ceb51b59e | |
|
4524e3a887 | |
|
ad370ba09a | |
|
889dcd1fe8 | |
|
097db01ac3 | |
|
49d6e2801d | |
|
41993fdd07 | |
|
dd8894ff39 | |
|
2f639cc1c0 | |
|
983043382d | |
|
5153bf62a2 | |
|
54a679f0ce | |
|
36f8a43f34 | |
|
6af6f92192 | |
|
2a0b251b14 | |
|
bf5cbf37a8 | |
|
aede2d4051 | |
|
16b84ce2ec | |
|
31c715c40d | |
|
c72c76bdb3 | |
|
ebf09db00d | |
|
44053fa039 | |
|
f9e19bb9ca | |
|
c3ea43e7e1 | |
|
04380327ab | |
|
8d1110d09e | |
|
12e5241a10 | |
|
612b2ac8f2 | |
|
ad42096eca | |
|
a7f476417e | |
|
a6ad406623 | |
|
fbd7a8d95c | |
|
009c221de3 | |
|
1689d100d5 | |
|
feedd08879 | |
|
1ab7280d66 | |
|
24ec314f34 | |
|
c3a4366d7d | |
|
6d4277cf91 | |
|
54687e2e05 | |
|
e0b148ddfd | |
|
0b42a3c61b | |
|
d49d6cf0ba | |
|
df8dc7cc77 | |
|
0c8df1c7a1 | |
|
5d600359fa | |
|
f55bd3768f | |
|
6233545418 | |
|
2295497e62 | |
|
aae791f721 | |
|
f96d809afe | |
|
6f155fbe36 | |
|
a97b823695 | |
|
1943296492 | |
|
568c3e687b | |
|
ab262dc328 | |
|
ed6171da78 | |
|
b6115837ae | |
|
103df4e31e | |
|
2d9870a930 | |
|
884d6abdd9 | |
|
136d2de399 | |
|
455f72c352 | |
|
d9abe0ab08 | |
|
ff9849589e | |
|
43b1d828e8 | |
|
26151605fa | |
|
b03d1c48c5 | |
|
ab064e52aa | |
|
0fe4c3c7d3 | |
|
a0ae1e37f1 | |
|
361ebddd2f | |
|
611e6d2993 | |
|
18ebdfc92a | |
|
0cdec41ca0 | |
|
0709fe3127 | |
|
298e17210a | |
|
df764e0960 | |
|
8e413e7f60 | |
|
083317beb2 | |
|
180c7bba8e | |
|
a4a9b1aa18 | |
|
daaf954def | |
|
f91a97e5e9 | |
|
07027e8a8c | |
|
f94cee238e | |
|
e6fc241e92 | |
|
64f2b9582e | |
|
b0dea86050 | |
|
3109611794 | |
|
86af06b3ce | |
|
19adf86f9f | |
|
8aa5a3b01a | |
|
241bd26b1f | |
|
88ef5230f9 | |
|
01aa6eaab6 | |
|
9e23313c3b | |
|
b6ad9a9122 | |
|
25cec0a709 | |
|
b4f811b7b8 | |
|
32edc951f2 | |
|
7e738a50d8 | |
|
8b101d5625 | |
|
40dedad49f | |
|
f16bb64b49 | |
|
a1c01d1154 | |
|
969660ae77 | |
|
d4a7789101 | |
|
442820db4e | |
|
7bde4f2939 | |
|
7a2249b6ce | |
|
6993d2af58 | |
|
f8a87de356 | |
|
7bfd17d1f7 | |
|
183b265ba9 | |
|
7f1ad2b049 | |
|
9306c6de4f | |
|
35fce7e656 | |
|
72ff345744 | |
|
1996cce12f | |
|
de57f6b132 | |
|
c45d9f4f09 | |
|
d4ed3d3a92 | |
|
84a2b8ca82 | |
|
41f9fb4a9a | |
|
7f0f69ae6f | |
|
e72acd21f3 | |
|
a960ff43a7 | |
|
bd4ffa35bf | |
|
2bfa6c8373 | |
|
622bb221ab | |
|
f2eb4d4c11 | |
|
2c32244617 | |
|
61e6aa2a5a | |
|
7837a11254 | |
|
59deb90428 | |
|
83bc9d9de4 | |
|
afc8abe090 | |
|
26e13bb7d0 | |
|
d0e5e5d748 | |
|
5f614e0d6d | |
|
c82c591c71 | |
|
7c2e418e87 | |
|
1f4663e68f | |
|
c2bdb0766f | |
|
233399dcb3 | |
|
ca91beddf3 | |
|
cb328f13a3 | |
|
9d84ce3a0d | |
|
071295c521 | |
|
ccf56fdebf | |
|
8cecd276b0 | |
|
8e0ffe8f49 | |
|
3f88449718 | |
|
bdbe219549 | |
|
9f3d147d4c | |
|
874a8347a5 | |
|
2f7b8ccc38 | |
|
f86dc34a1d | |
|
ab6940b7db | |
|
937b06c198 | |
|
d7ca5c3e08 | |
|
24ccf9ce2f | |
|
abab532379 | |
|
02306e8351 | |
|
0c198b4101 | |
|
7805b78cdf | |
|
2c0f2cc72d | |
|
d077225e9e | |
|
91f3da78cf | |
|
2ee835bbb9 | |
|
0c1f054b7f | |
|
aa04349845 | |
|
c4bbffc98f | |
|
e6cf5ef2fb | |
|
28ad29c686 | |
|
45e26bbd49 | |
|
eb729acc59 | |
|
50beca0cf3 | |
|
9ce0349f41 | |
|
3f8292c261 | |
|
fceab8c182 | |
|
657deb8541 | |
|
e77aae4826 | |
|
746972d226 | |
|
2c42f3b54b | |
|
f79292d4e2 | |
|
c42061a8d1 | |
|
03d814d5ed | |
|
7ee7e8336a | |
|
3f8d3737f6 | |
|
2246c21986 | |
|
3e25daa75c | |
|
b9072ecb7f | |
|
251cdd32ee | |
|
98ecb8e365 | |
|
75a621094c | |
|
81758cf340 | |
|
5b8c089734 | |
|
e18125420b | |
|
8052477b7f | |
|
48a88985ad | |
|
f569c45f80 | |
|
f3882c7f9a | |
|
6dc39d6611 | |
|
bcecf2ed6c | |
|
d2e875c812 | |
|
c20b7b1b5e | |
|
da3bff7f17 | |
|
e47c6da01e | |
|
bb44fbd56a | |
|
c3eaea124e | |
|
48e2a10102 | |
|
671a732816 | |
|
838caaa516 | |
|
3512e61875 | |
|
e2f4a0f43a | |
|
c23dfa8a5f | |
|
aefc872465 | |
|
56fe4c3486 | |
|
6331fee2e1 | |
|
60bdd285bf | |
|
cf5d2e622c | |
|
48392b5480 | |
|
1bd592db0f | |
|
a2aae3bd73 | |
|
eabb1db02a | |
|
a9feca596a | |
|
3203e35698 | |
|
ec6b61b414 | |
|
c87707a0ca | |
|
d2cd21f2eb | |
|
f5bc472f53 | |
|
1410eec595 | |
|
cdc5ebcd57 | |
|
3cc2717a90 | |
|
75c5d9ffd7 | |
|
03b3ac7a81 | |
|
401d062115 | |
|
3ed094444b | |
|
c35b763376 | |
|
5e778d2ba6 | |
|
9ccc8e83b3 | |
|
6c3952d10d | |
|
b9da8267eb | |
|
9c84f25c0c | |
|
962ba75bfa | |
|
0ece5eb7a4 | |
|
31739faa0a | |
|
52c9cbf859 | |
|
fc98bd5162 | |
|
62c14fea4d | |
|
ed87bcb914 | |
|
e2d2fd8d33 | |
|
89a4cff1ed | |
|
3e37ca1c3d | |
|
06f5100936 | |
|
432a58f2e7 | |
|
bac377d47f | |
|
7ba19ba370 | |
|
43a2eecf3f | |
|
7e82b75228 | |
|
67bf5a9a1c | |
|
67cd2b1fd2 | |
|
dfd676613f | |
|
648c4243c1 | |
|
088bf86b2b | |
|
82a3e9e7ad | |
|
7a16d32d26 | |
|
e8a169e274 | |
|
d1a3c5fde4 | |
|
caf220442a | |
|
566c90aed4 | |
|
a7c66ff0b2 | |
|
6f0310cb14 | |
|
8275340f0e | |
|
1f81ac53cb | |
|
8eb5866fad | |
|
916f20ea70 | |
|
56b8f97039 | |
|
8a070607c8 | |
|
a26a1b2198 | |
|
fb421bd6cb | |
|
f48aea9414 | |
|
eb787e04cc | |
|
a5d11b1613 | |
|
c9255c9ba3 | |
|
2333e3b878 | |
|
10cf8ddbda | |
|
08c3d2d4fb | |
|
53b81e42be | |
|
d52bdbc546 | |
|
59b91ffc61 | |
|
4416820122 | |
|
54b7907866 | |
|
687bd6fc4b | |
|
4d1f22f529 | |
|
4640cffc30 | |
|
0e97150278 | |
|
f4e97d1778 | |
|
8942218f7b | |
|
03e6a9b81c | |
|
217688b103 | |
|
08ac21bbb7 | |
|
cf8d92ce25 | |
|
5dfae7102b | |
|
9c15e716cf | |
|
3100311732 | |
|
36dbab13a7 | |
|
d8f66b63c2 | |
|
87812e1b04 | |
|
bf20906042 | |
|
b796623e13 | |
|
ebb0e6bc31 | |
|
78f225ffa9 | |
|
5cac424387 | |
|
c4258e9056 | |
|
c34a52bde1 | |
|
284d4509b1 | |
|
3bed3d96b4 | |
|
2695a96f39 | |
|
ed88d17566 | |
|
95c02274d8 | |
|
cc8e8aa2b3 | |
|
47210cc26e | |
|
d81c537e4f | |
|
88801796d5 | |
|
76c496df89 | |
|
d44e145793 | |
|
6a5817844e | |
|
915aad5a32 | |
|
fcf91a18d8 | |
|
f695dbdda3 | |
|
e940e9ec26 | |
|
413f9b767e | |
|
050e7d1dab | |
|
ee7bbf69a0 | |
|
c405f1ede4 | |
|
1524ab3284 | |
|
305feb1ac2 | |
|
a672292f03 | |
|
8d4fdbbae4 | |
|
00c7d41b38 | |
|
fad073842b | |
|
cd31a524cf | |
|
3d878d50c6 | |
|
d996f06fd4 | |
|
e478176c4a | |
|
9a9e96c86c | |
|
ea1384b7c4 | |
|
a2451bf825 | |
|
59fe13f151 | |
|
83635cfa2e | |
|
fcb351c7d8 | |
|
aa00a6343f | |
|
d20f300a43 | |
|
6e2a57cdb8 | |
|
387905e89c | |
|
51d5bcf6ae | |
|
643d2dd994 | |
|
9fb6716498 | |
|
5f78920db5 | |
|
57ee6f3570 | |
|
4636968674 | |
|
cacd7d3fbb | |
|
7ccd79affb | |
|
afc9488f76 | |
|
14915266d4 | |
|
00a2266a4d | |
|
d031bab5b4 | |
|
e3f1164353 | |
|
eab544feef | |
|
30ca458048 | |
|
cfe1f93c68 | |
|
a00bbce4aa | |
|
01ca48a51c | |
|
e5446589e8 | |
|
11ff4fddd7 | |
|
940db0ae30 | |
|
f86ae72cdb | |
|
91d1f520c4 | |
|
e5f5c60e87 | |
|
daba43e915 | |
|
92136fe797 | |
|
99ec7c7fc3 | |
|
9e2d2f167e | |
|
5f39620f69 | |
|
0044fcfaa9 | |
|
0ae481ee4a | |
|
f8fe66c090 | |
|
80097b2d4b | |
|
50836956f8 | |
|
314a1d6f16 | |
|
92160fc101 | |
|
3afc37d0e1 | |
|
ac121ee176 | |
|
3b7b0291db | |
|
3cae4565da | |
|
65c90ec860 | |
|
a6644a1cf2 | |
|
42258687d5 | |
|
e2a91d7596 | |
|
1260fcaa20 | |
|
2be1c44f83 | |
|
40baca19b5 | |
|
64ebe19a42 | |
|
91de8dd3e9 | |
|
8c5fe29da4 | |
|
b91712ea9e | |
|
ea305d5812 | |
|
84c1f0905e | |
|
9fb40e3090 | |
|
b9e6947f21 | |
|
02fe790204 | |
|
2c6e6bdfa9 | |
|
1f53fe4643 | |
|
7ae8244cd2 | |
|
4ce7dc9a01 | |
|
f5fda9ae7e | |
|
cedd84dc9b | |
|
aff6620ece | |
|
4a5b09fc56 | |
|
388081d10e | |
|
abf1dfd37b | |
|
343d9434e1 | |
|
3eb1861ea5 | |
|
38d940fde4 | |
|
817ac7750b | |
|
281f33047a | |
|
982713f4a2 | |
|
66ee03032f | |
|
317aae6286 | |
|
669b05826e | |
|
86bcb7e3dd | |
|
754d4c41c3 | |
|
f163ac5b11 | |
|
bfcf7916b4 | |
|
8dd4a6dacf | |
|
47a768004b | |
|
e67b6fbf12 | |
|
220c8e8062 | |
|
0f4ed51427 | |
|
24fd2152bb | |
|
27267c08a6 | |
|
f5def21b26 | |
|
5213ca1672 | |
|
2082f7a9bc | |
|
a9447b7af8 | |
|
ff00e0a5ef | |
|
6c2855a7a4 | |
|
ce33e2cb15 | |
|
1dc6f3fd80 | |
|
f36ff5233e | |
|
c9624beb7f | |
|
2c476e0bf2 | |
|
51160cd1d3 | |
|
37751d99dd | |
|
e85061f348 | |
|
e85939e211 | |
|
7571e7f6ea | |
|
5a7afb66b6 | |
|
9818b0babe | |
|
3afe9de1c9 | |
|
cb80d58006 | |
|
1bfb376e19 | |
|
256f449630 | |
|
9bf43e6dd0 | |
|
f8a17deded | |
|
93ad15685f | |
|
131dd2421b | |
|
9cda22a4d9 | |
|
efd8ea47f5 | |
|
b3cd417673 | |
|
985a63b9c6 | |
|
3b245cb901 | |
|
c4ed1168ea | |
|
e0c9fc7c60 | |
|
d9031969b0 | |
|
7e0cdda6aa | |
|
97b9a31f8e | |
|
c5eb824d2f | |
|
e0b1d73f3f | |
|
a9814013cb | |
|
18dd98cf7d | |
|
605b702742 | |
|
6e05933728 | |
|
bd6fda1130 | |
|
0445ac0442 | |
|
b759d8a3dd | |
|
24d1ccdd9b | |
|
4240c5ab51 | |
|
1feb2b2db2 | |
|
3b35907547 | |
|
54bff16431 | |
|
9589279fa2 | |
|
0583403b20 | |
|
61abe5bb2f | |
|
e32a1ef17e | |
|
94a2b35193 | |
|
879f957348 | |
|
b6c116aee9 | |
|
787c6b1b79 | |
|
d0d4889a16 | |
|
51b8f5921e | |
|
56882dcfc9 | |
|
990f5b1f7e | |
|
b33511a3ed | |
|
d787d8e861 | |
|
a5953a22f5 | |
|
11fc8ce52e | |
|
6a8d702fcf | |
|
b788e29663 | |
|
89cbca08c9 | |
|
5910b8dabd | |
|
c264406f0e | |
|
ec6d1fd4af | |
|
c1d281348b | |
|
f950dd0bd7 | |
|
e29ba01e51 | |
|
d6255b03be | |
|
fe98c3f9fb | |
|
5fa4e29c51 | |
|
67b9460fbd | |
|
3b8f06a3ba | |
|
b13d6388f5 | |
|
dc3fe4c228 | |
|
642ed4c283 | |
|
e1f3eafcaf | |
|
20539a1c09 | |
|
c24d5b56d8 | |
|
bb18351550 | |
|
60e2e1e2e7 | |
|
fcb3f12f90 | |
|
ff3a9c72e8 | |
|
4a6d0a2d73 | |
|
cc39ba274c | |
|
d6afd16fa2 | |
|
e07016c87c | |
|
8df86a326b | |
|
97d981fe89 | |
|
aeabd7b353 | |
|
fb2dd94da7 | |
|
6661a3dfdc | |
|
19761526c1 | |
|
0c0c6f540f | |
|
c9d7978519 | |
|
1e734703b2 | |
|
9ee06e52b0 | |
|
f8272a4df2 | |
|
c30d44d801 | |
|
98d0791202 | |
|
f802a1e7a1 | |
|
1f1b901047 | |
|
622d2eeae3 | |
|
e4f5cc6786 | |
|
610efcd747 | |
|
d6cd3b4621 | |
|
e475ef63f9 | |
|
973f13bc8a | |
|
3a83af4818 | |
|
8e24c7d1ba | |
|
e501e6dc9b | |
|
f6bfb3c8ec | |
|
15669ba5a9 | |
|
718e418d30 | |
|
76d6daf34b | |
|
aaae380f07 | |
|
6f94d7322f | |
|
56437162ca | |
|
e89d58afee | |
|
9947d32036 | |
|
ecbea7fa6c | |
|
bef565c064 | |
|
2ddbd2d903 | |
|
88dd90a2bb | |
|
05304b96d0 | |
|
4b6fa1dfae | |
|
7785b483ec | |
|
400aa04046 | |
|
d93e34e13b | |
|
8618425413 | |
|
eed96ea4eb | |
|
cfe7a23ccd | |
|
c90429e557 | |
|
0267427113 | |
|
5523041678 | |
|
00030ae266 | |
|
8f978b2c5c | |
|
33529a052a | |
|
0c65053b4f | |
|
c014dbfd2d | |
|
e4fc2cdc6e | |
|
a8071581a0 | |
|
1771608eff | |
|
a068ed3f6c | |
|
12dcab0543 | |
|
fd862edbef | |
|
7d318e0e07 | |
|
9818b545c2 | |
|
66b9250a35 | |
|
27423f3211 | |
|
6e6234a0b6 | |
|
0d600e0d16 | |
|
ea63ddc24d | |
|
ad4910948d | |
|
dccbb41ab1 | |
|
75dc8e5656 | |
|
d3869ba122 | |
|
e8c6e713c2 | |
|
56dd0d9626 | |
|
362217114a | |
|
37f98c8f80 | |
|
6aa041a872 | |
|
607f946e0a | |
|
6f3689651a | |
|
b4530e2cf2 | |
|
13ee40af94 | |
|
b78e60873e | |
|
485dd17f88 | |
|
5bdf4ab290 | |
|
39135845da | |
|
4a8b243ae1 | |
|
1b52f820ca | |
|
2cce35ccaf | |
|
c23ae39ae1 | |
|
c1842a4bc6 | |
|
863957812b | |
|
ea510de356 | |
|
86c51e4e99 | |
|
bdec030f66 | |
|
258c4d134b | |
|
4c59d4cb10 | |
|
fd04b7b52f | |
|
e3e7a3375a | |
|
f48f112773 | |
|
f13e6e14da | |
|
29094f4d90 | |
|
05e1abae63 | |
|
a8df499138 | |
|
491008a4a3 | |
|
0031abf841 | |
|
cf28002926 | |
|
f292de3db0 | |
|
e2f8e1e0a5 | |
|
7633d0ce69 | |
|
307a53849b | |
|
de65d14a33 | |
|
6db09cd73a | |
|
65d1b4a7fd | |
|
a265550138 | |
|
2b112b51e6 | |
|
98ba481976 | |
|
4304da8316 | |
|
22faafd907 | |
|
b1fd26327a | |
|
6ab21a1b03 | |
|
44b8713915 | |
|
491a4f8762 | |
|
fae0d8a444 | |
|
d49c5db49e | |
|
5454d00ca4 | |
|
a76692dff6 | |
|
6c9e85c574 | |
|
c7807adb4c | |
|
5cb66d89d1 | |
|
1583304c80 | |
|
0bf19d0da0 | |
|
a63cbb8f08 | |
|
8fc79a4d5d | |
|
ee8527f6a3 | |
|
c5ef139004 | |
|
5d4acebccd | |
|
078713348e | |
|
e000ca66bc | |
|
76f8fdc8b8 | |
|
528a4bbda0 | |
|
53a230db30 | |
|
47b1fce0b9 | |
|
705efcf1d3 | |
|
6b507bf7ae | |
|
d4403cecc0 | |
|
a63446f86b | |
|
c89f7f6113 | |
|
89dca1575e | |
|
88efda26d7 | |
|
6fb4b69ab6 | |
|
6be191c945 | |
|
59b06bea01 | |
|
2efa03454b | |
|
2cfc560649 | |
|
f8efe73da7 | |
|
4c63845dca | |
|
6c58e8012f | |
|
0996a390ec | |
|
c50e803993 | |
|
c43e4f7ccf | |
|
7b1508eed0 | |
|
db8ce4725f | |
|
25ca797140 | |
|
19bfd3b24b | |
|
b62f27a1f5 | |
|
a59c313a41 | |
|
d1d7ffa42c | |
|
2525560fe9 | |
|
8a0700e3ce | |
|
aba3f87040 | |
|
89a1a9624d | |
|
fd80d694cc | |
|
fd2f0d430e | |
|
5d3ff618e2 | |
|
6af2512780 | |
|
a1009d2790 | |
|
c606eb6d71 | |
|
0deda2f72e | |
|
d92ff2ca32 | |
|
5fd74760c9 | |
|
6c354182b8 | |
|
7b625e77cf | |
|
02604def33 | |
|
cc0029420f | |
|
d2410bd92c | |
|
a781fe31c7 | |
|
a47568156f | |
|
83cd10e83d | |
|
f1abfc2fe3 | |
|
41828a374b | |
|
19eaf275cd | |
|
8abea66221 | |
|
d386374c90 | |
|
0436cb50bf | |
|
af0f32ae31 | |
|
3215d047ff | |
|
caa3116f5c | |
|
09ba6b3e89 | |
|
6e4c2524b7 | |
|
720b943f60 | |
|
2737b93895 | |
|
4e4dbaba15 | |
|
b9cbc99dd1 | |
|
88ecc0209e | |
|
d28ee67bc2 | |
|
7dfc775299 | |
|
e52d7cb7e8 | |
|
2469e2e368 | |
|
042979a8fe | |
|
6b7b0c907a | |
|
a23c8d9caf | |
|
e006efb01a | |
|
47667d1cd8 | |
|
70ba354321 | |
|
8ae723ea62 | |
|
16f9072c5f | |
|
78a07415ea | |
|
b8d0f76adf | |
|
3b8b5e5535 | |
|
d4b101d9bb | |
|
827fd35d78 | |
|
96b4960358 | |
|
e0ffa0f0ec | |
|
480cee44bd | |
|
239641eb10 | |
|
8f5a3788d6 | |
|
e4750fc92a | |
|
d371048d3b | |
|
16def8477c | |
|
841974a026 | |
|
840abbcd2b | |
|
da26cb6d08 | |
|
6f7abca1b1 | |
|
ef32ed1461 | |
|
733489514a | |
|
ddb4ab09c4 | |
|
0c87ae654b | |
|
aa27073b22 | |
|
13ca9e5c47 | |
|
f058f239ab | |
|
efb565d32c | |
|
2cf223ff8b | |
|
7b43fdd7e4 | |
|
6a876e010f | |
|
b77ef2d470 | |
|
3bc1d9d757 | |
|
c54191f12b | |
|
1edbba1eba | |
|
6841dd28be | |
|
e41a12e7a9 | |
|
bafe1f8c03 | |
|
35253779e6 | |
|
edfa831a84 | |
|
588b5d2a07 | |
|
f3ab292c32 | |
|
d1e834989f | |
|
3b1f7c96c5 | |
|
da7121aa50 | |
|
575bfd06be | |
|
43350c66d6 | |
|
03f825ad3e | |
|
6db39eb1da | |
|
0595654d86 | |
|
1341e08efe | |
|
f0ba03db3d | |
|
212879f340 | |
|
2c433fa01e | |
|
c423a765ef | |
|
897061f92b | |
|
87aea478c3 | |
|
b76c721258 | |
|
f5c849f4f1 | |
|
964850c4af | |
|
5b5171ab1d | |
|
0973600efa | |
|
f36ab51499 | |
|
7fb7825a6b | |
|
26c9046903 | |
|
155a2102cf | |
|
42023e7f61 | |
|
af1b0541d5 | |
|
594f249340 | |
|
1f6a4278a9 | |
|
a16a6b1957 | |
|
bf1818220d | |
|
7edeb2037c | |
|
e458f8a174 | |
|
96462ac1a1 | |
|
def4d7e09e | |
|
eea838f05a | |
|
60371af939 | |
|
4c0223d4af | |
|
cf72038ee4 | |
|
0a8e6e6330 | |
|
710043a9dc | |
|
a499f12623 | |
|
5d9406c777 | |
|
78ef7c144f | |
|
4dc55c0878 | |
|
9ca849cbd5 | |
|
8ad33e6d40 |
|
@ -1,4 +1,7 @@
|
|||
*.iml
|
||||
*.apk
|
||||
*.ap_
|
||||
*.aab
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
|
@ -7,8 +10,13 @@
|
|||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
/.idea/inspectionProfiles/Project_Default.xml
|
||||
/app/.idea/workspace.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/app/release
|
||||
/app/beta
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
*.jar
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AppInsightsSettings">
|
||||
<option name="selectedTabId" value="Firebase Crashlytics" />
|
||||
<option name="tabSettings">
|
||||
<map>
|
||||
<entry key="Android Vitals">
|
||||
<value>
|
||||
<InsightsFilterSettings>
|
||||
<option name="connection">
|
||||
<ConnectionSetting>
|
||||
<option name="appId" value="com.verdnatura.verdnaturaventas" />
|
||||
</ConnectionSetting>
|
||||
</option>
|
||||
<option name="failureTypes">
|
||||
<list>
|
||||
<option value="FATAL" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="signal" value="SIGNAL_UNSPECIFIED" />
|
||||
<option name="timeIntervalDays" value="ONE_DAY" />
|
||||
<option name="visibilityType" value="ALL" />
|
||||
</InsightsFilterSettings>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="Firebase Crashlytics">
|
||||
<value>
|
||||
<InsightsFilterSettings>
|
||||
<option name="connection">
|
||||
<ConnectionSetting>
|
||||
<option name="appId" value="es.verdnatura.sfusion" />
|
||||
<option name="mobileSdkAppId" value="1:975691769093:android:83eff0dadf5ca9d3e3c36c" />
|
||||
<option name="projectId" value="picking-2b9a0" />
|
||||
<option name="projectNumber" value="975691769093" />
|
||||
</ConnectionSetting>
|
||||
</option>
|
||||
<option name="signal" value="SIGNAL_UNSPECIFIED" />
|
||||
<option name="timeIntervalDays" value="SIXTY_DAYS" />
|
||||
<option name="versions">
|
||||
<list>
|
||||
<VersionSetting>
|
||||
<option name="buildVersion" value="324" />
|
||||
<option name="displayName" value="24.32 (324)" />
|
||||
<option name="displayVersion" value="24.32" />
|
||||
</VersionSetting>
|
||||
</list>
|
||||
</option>
|
||||
<option name="visibilityType" value="ALL" />
|
||||
</InsightsFilterSettings>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WizardSettings">
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="imageWizard">
|
||||
<value>
|
||||
<PersistentState />
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="vectorWizard">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="vectorAssetStep">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="assetSourceType" value="FILE" />
|
||||
<entry key="outputName" value="ic_troncales" />
|
||||
<entry key="sourceFile" value="C:\Users\sergiodt\Downloads\ic_troncales.svg" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -117,6 +117,9 @@
|
|||
</codeStyleSettings>
|
||||
<codeStyleSettings language="kotlin">
|
||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
|
||||
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
||||
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="11" />
|
||||
<bytecodeTargetLevel target="21" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<value>
|
||||
<entry key="app">
|
||||
<State />
|
||||
</entry>
|
||||
</value>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetSelector">
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2024-07-24T04:57:28.186915600Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=21114523025303" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
<DialogSelection />
|
||||
</SelectionState>
|
||||
</selectionStates>
|
||||
</component>
|
||||
</project>
|
|
@ -4,18 +4,17 @@
|
|||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
<option name="disableWrapperSourceDistributionNotification" value="true" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="$PROJECT_DIR$/../../../../gradle/gradle-7.5" />
|
||||
<option name="gradleJvm" value="jbr-17" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="DeprecatedCallableAddReplaceWith" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="RedundantSamConstructor" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="UnusedSymbol" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
|
@ -26,5 +26,10 @@
|
|||
<option name="name" value="maven" />
|
||||
<option name="url" value="https://jitpack.io" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="2.0.20" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
332
.idea/misc.xml
332
.idea/misc.xml
|
@ -1,9 +1,339 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="..\:/Users/sergiodt/.gradle/caches/transforms-3/e9164bf73e63cfbbe0209ceba1baaefb/transformed/jetified-android-image-picker-3.0.0-beta5/res/layout/ef_fragment_image_picker.xml" value="0.13508771929824562" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/background_gradient.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/background_round_corner.xml" value="0.2205" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/ic_collection.xml" value="0.1705" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/ic_history_orang.xml" value="0.22037037037037038" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/ic_history_orange_24dp.xml" value="0.16666666666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.13541666666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/selector_bottombar_text.xml" value="0.13541666666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/alpha_b_circle_outline.xml" value="0.2359375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/alpha_f_circle_outline.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_and_round.xml" value="0.2185" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_and_round_collection_fragment.xml" value="0.269" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_item_color.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_oval_checked.xml" value="0.2359375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_oval_unchecked.xml" value="0.30052083333333335" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_round.xml" value="0.2555" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_round_corner.xml" value="0.2205" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_round_square.xml" value="0.2205" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_roundl.xml" value="0.232" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_test.xml" value="0.269" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/barcode.xml" value="0.2359375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/barcode_scan.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/border.xml" value="0.27447916666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/border_parental.xml" value="0.11979166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/btn_blue.xml" value="0.27447916666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/btn_green.xml" value="0.2205" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/btn_ios_like.xml" value="0.2635" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/btn_orange.xml" value="0.2635" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/btn_white_transparent.xml" value="0.2635" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/buffer_accumulate.xml" value="0.18489583333333334" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/buffer_accumulation.xml" value="0.19814814814814816" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/buffer_desactivate.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/buffer_empty.xml" value="0.13333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/buffer_fill.xml" value="0.19814814814814816" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/buffer_flejado.xml" value="0.2916666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/buffer_full.xml" value="0.18489583333333334" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/buffer_load.xml" value="0.14666666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/buffer_off.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/buffer_outline.xml" value="0.22407407407407406" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/car.xml" value="0.30052083333333335" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/car_control.xml" value="0.22407407407407406" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/car_info.xml" value="0.2916666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/check.xml" value="0.1305" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/circleshape.xml" value="0.11979166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/component_progress.xml" value="0.11979166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/crane.xml" value="0.23802083333333332" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/custom_ripple.xml" value="0.2175" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/custom_ripple_nomenuinit.xml" value="0.213" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/day_of_sale.xml" value="0.184375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/delete.xml" value="0.19166666666666668" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/drawable_white_circle.xml" value="0.1775" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/emoticon_error.xml" value="0.27447916666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/emoticon_error_fragment.xml" value="0.26" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/eraser.xml" value="0.26564102564102565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/face_man_outline.xml" value="0.22708333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/filter_outline.xml" value="0.22239583333333332" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/human_dolly.xml" value="0.2111111111111111" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_add_black_24dp.xml" value="0.22708333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_arrow_back_black_24dp.xml" value="0.22708333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_arrow_drop_down_black_24dp.xml" value="0.22708333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_autorenew_black_24dp.xml" value="0.1775" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_barcode_ui_selected.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_baseline_star_24.xml" value="0.1775" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_build_black_24dp.xml" value="0.22708333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_chevron_left.xml" value="0.215" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_chevron_right_black_24dp.xml" value="0.1775" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_claim_ui.xml" value="0.186" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_claims.xml" value="0.2425" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_cmr.xml" value="0.267" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_collectionTicket.xml" value="0.1905" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_controller_ui.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_controller_ui_selected.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_corridor_ui.xml" value="0.186" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_dashboard_black_24dp.xml" value="0.1775" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_delete_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_delete_forever_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_device_hub_black_24dp.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_device_hub_black_24dp_selected.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_eye_ui.xml" value="0.2015" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_eye_ui_selected.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_flash_auto_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_history_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_history_orange.xml" value="0.22037037037037038" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_icon_configuracion.xml" value="0.26" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_init.xml" value="0.186" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_init_selected.xml" value="0.26" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_init_ui.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_init_ui_selected.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_item.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_launcher_background.xml" value="0.24010416666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_florist_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_florist_black_24dp_selected.xml" value="0.21041666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_parking_black_24dp.xml" value="0.21041666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_parking_orange_24dp.xml" value="0.21041666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_shipping_black_24dp.xml" value="0.11979166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_shipping_black_24dp_selected.xml" value="0.11979166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_logo.xml" value="0.266" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_logo_salix.xml" value="0.266" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_loyalty_black_24dp.xml" value="0.21041666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_mode_edit_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_more_vert_black_24dp.xml" value="0.26" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_move_to_inbox_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_packaging.xml" value="0.258" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_packing_mistake.xml" value="0.1315" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_pallet_scan_expedition.xml" value="0.1005" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_pallet_ui.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_parking_ui.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_parking_ui_selected.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_picker_ui.xml" value="0.186" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_playlist_add_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_print_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_qr_ui.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_reubication.xml" value="0.138" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_send_black_24dp.xml" value="0.134375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_setting_ui.xml" value="0.26" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_setting_ui_selected.xml" value="0.26" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_settings.xml" value="0.26" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_settings_selected.xml" value="0.26" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_spa_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_spa_black_launcher.xml" value="0.19479166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_star_ko.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_start_ok.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_streetview_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_swap_horiz_black_24dp.xml" value="0.11979166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_ticket.xml" value="0.1705" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_transaction.xml" value="0.22708333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_ubicator_check.xml" value="0.2295" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_verified_user_black_24dp.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_verified_user_black_24dp_selected.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_visibility.xml" value="0.1775" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_visibility_black_24dp.xml" value="0.2546875" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_visibility_black_24dp_white.xml" value="0.2546875" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_visibility_white_24dp.xml" value="0.2546875" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_vn_logo_negativo_app_warehouse.xml" value="0.18" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_worker.xml" value="0.265" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/init_icon.xml" value="0.2635" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/init_selected_icon.xml" value="0.2635" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/lift.xml" value="0.1925" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/list_divider_items.xml" value="0.1985" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/movie_plus_outline.xml" value="0.134375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/pallet_shipping.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/pallet_shipping_black.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/pallet_shipping_selected.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/phone_call.xml" value="0.26145833333333335" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/previous_delete.xml" value="0.27447916666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/qrcode_scan.xml" value="0.17395833333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/rectangle.xml" value="0.31979166666666664" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/revision_icon.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/round.xml" value="0.1915" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/round_av_timer_24.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/round_outline.xml" value="0.11979166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/settings_icon.xml" value="0.2635" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/settings_icon_selected.xml" value="0.2635" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/walk.xml" value="0.10885416666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/worker.xml" value="0.12" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/worker_mistake.xml" value="0.15364583333333334" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/activity_imageview.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/activity_login.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/activity_main.xml" value="0.17916666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/buyers_fragment.xml" value="0.18333333333333332" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_dialog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_edit_dialog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_edit_dialog_three_values.xml" value="0.2" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_edit_dialog_two_values.xml" value="0.2203125" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_hour.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_list_dialog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_three_dialog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_two_dialog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_ubicador_dialog.xml" value="0.2453125" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_ajustes.xml" value="0.24166666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_automatic_add_item.xml" value="0.20625" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_buffer.xml" value="0.1408514492753623" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_buffer_load.xml" value="0.20923913043478262" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_buffer_loadexpedition.xml" value="0.1398176291793313" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_buscar_item.xml" value="0.21014492753623187" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_buscar_item_all.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_collection.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_controlador.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_expedition_pallet.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_expedition_pallet_detail.xml" value="0.15579710144927536" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_expedition_scan.xml" value="0.21666666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_expedition_truck_list.xml" value="0.15579710144927536" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_expeditionscan_sorter.xml" value="0.196875" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_expeditionstate.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_faltas.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_general_black.xml" value="0.264" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_historico.xml" value="0.1734375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_historicovehiculo.xml" value="0.23052536231884058" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_inventary.xml" value="0.264" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_inventary_old.xml" value="0.22604166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_item_card.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemdayofsale_card.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemexpeditionstate_card.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemproposal.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemshelvingdayofsale.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemshelvinglog.xml" value="0.28169014084507044" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_login.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_packaging.xml" value="0.1956140350877193" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_packaging_count.xml" value="0.23229166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_packaging_obs.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_packaging_summary.xml" value="0.2" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_packaging_supplier.xml" value="0.2515625" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_paletizador_menu.xml" value="0.13829787234042554" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_parking.xml" value="0.16666666666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_pasillero.xml" value="0.21" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_pre_sacador.xml" value="0.29809358752166376" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_qr.xml" value="0.19882246376811594" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_reubication_collection.xml" value="0.22083333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_sacador.xml" value="0.12952898550724637" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_sacador_associatesmarttag.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_shelving_parking.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_shelvinglog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_smarttag_register.xml" value="0.3118811881188119" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_testing_print.xml" value="0.12462006079027356" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_transferencia.xml" value="0.10666666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_ubicador.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_vehiclecontrol.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_vehiclecontrol_user.xml" value="0.23052536231884058" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_web.xml" value="0.2463768115942029" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_workermistake.xml" value="0.2265625" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/ic_packing_mistake.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_ajustes_row.xml" value="0.16666666666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_article_row.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_article_row_fragment.xml" value="0.3275862068965517" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_article_row_presacador.xml" value="0.4" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_article_row_reubication_fragment.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_barcode_row.xml" value="0.15579710144927536" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_buyer_row.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_card_row.xml" value="0.2269021739130435" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_collection_row.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_escaner_row.xml" value="0.15353260869565216" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_expedition_view_row.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_expeditionpallet_row.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_expeditionscan_row.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_expeditionstate_row.xml" value="0.23489583333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_expeditiontruck_row.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_faltas_row.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_general_row.xml" value="0.13360507246376813" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_general_row_image.xml" value="0.2131578947368421" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_historico_row.xml" value="0.15353260869565216" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_historicovehiculo_row.xml" value="0.18795289855072464" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_image_row.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_inventary_row.xml" value="0.15163934426229508" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_itemshelvingdayofsale_row.xml" value="0.18206521739130435" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_itemsupplier_row.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_location_all_row.xml" value="0.12259371833839919" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_location_row.xml" value="0.16875" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_main_menu.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_pasilleros_main_menu.xml" value="0.33" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_placement_reubication_row.xml" value="0.27447916666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_placement_row.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_proposal_row.xml" value="0.22604166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_reposicion.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_shelvingdayofsale_row.xml" value="0.2375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_shelvinglog_row.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_shelvingparking_row.xml" value="0.1793478260869565" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_smarttag_row.xml" value="0.20153985507246377" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_toolbar_row.xml" value="0.15307971014492755" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_ubication_row.xml" value="0.11822916666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_work_forms_row.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_worker_image.xml" value="0.23177083333333334" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_workermistake_row.xml" value="0.4466666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/qauality_fragment.xml" value="0.15353260869565216" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/reposicion_fragment.xml" value="0.15353260869565216" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/shelvinglog_row.xml" value="0.18385416666666668" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/testing_print.xml" value="0.1802536231884058" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/toolbar.xml" value="0.15353260869565216" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/toolbarUI.xml" value="0.29846014492753625" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/toolbar_fragment.xml" value="0.22" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="NullableNotNullManager">
|
||||
<option name="myDefaultNullable" value="androidx.annotation.Nullable" />
|
||||
<option name="myDefaultNotNull" value="androidx.annotation.NonNull" />
|
||||
<option name="myNullables">
|
||||
<value>
|
||||
<list size="16">
|
||||
<item index="0" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
|
||||
<item index="1" class="java.lang.String" itemvalue="org.jspecify.nullness.Nullable" />
|
||||
<item index="2" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
|
||||
<item index="3" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
|
||||
<item index="4" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
|
||||
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
|
||||
<item index="6" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.Nullable" />
|
||||
<item index="7" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
|
||||
<item index="8" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
||||
<item index="9" class="java.lang.String" itemvalue="jakarta.annotation.Nullable" />
|
||||
<item index="10" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
|
||||
<item index="11" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
|
||||
<item index="12" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
|
||||
<item index="13" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
|
||||
<item index="14" class="java.lang.String" itemvalue="android.annotation.Nullable" />
|
||||
<item index="15" class="java.lang.String" itemvalue="org.jspecify.annotations.Nullable" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myNotNulls">
|
||||
<value>
|
||||
<list size="15">
|
||||
<item index="0" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
|
||||
<item index="1" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
|
||||
<item index="2" class="java.lang.String" itemvalue="jakarta.annotation.Nonnull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
|
||||
<item index="4" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
|
||||
<item index="5" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
||||
<item index="6" class="java.lang.String" itemvalue="org.jspecify.nullness.NonNull" />
|
||||
<item index="7" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
|
||||
<item index="8" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
|
||||
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
|
||||
<item index="10" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
|
||||
<item index="11" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
|
||||
<item index="12" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
|
||||
<item index="13" class="java.lang.String" itemvalue="android.annotation.NonNull" />
|
||||
<item index="14" class="java.lang.String" itemvalue="org.jspecify.annotations.NonNull" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
<component name="VisualizationToolProject">
|
||||
<option name="state">
|
||||
<ProjectState>
|
||||
<option name="scale" value="0.2298076923076923" />
|
||||
</ProjectState>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/../.." />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="navEditor-manualLayoutAlgorithm2">
|
||||
<option name="myPositions">
|
||||
<map>
|
||||
<entry key="nav_graph.xml">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPositions">
|
||||
<map>
|
||||
<entry key="ajustesFragment">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="-226" />
|
||||
<option name="y" value="103" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="showTicketFragment">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="-512" />
|
||||
<option name="y" value="86" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,263 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="direct_access_persist.xml">
|
||||
<option name="deviceSelectionList">
|
||||
<list>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="27" />
|
||||
<option name="brand" value="DOCOMO" />
|
||||
<option name="codename" value="F01L" />
|
||||
<option name="id" value="F01L" />
|
||||
<option name="manufacturer" value="FUJITSU" />
|
||||
<option name="name" value="F-01L" />
|
||||
<option name="screenDensity" value="360" />
|
||||
<option name="screenX" value="720" />
|
||||
<option name="screenY" value="1280" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="28" />
|
||||
<option name="brand" value="DOCOMO" />
|
||||
<option name="codename" value="SH-01L" />
|
||||
<option name="id" value="SH-01L" />
|
||||
<option name="manufacturer" value="SHARP" />
|
||||
<option name="name" value="AQUOS sense2 SH-01L" />
|
||||
<option name="screenDensity" value="480" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2160" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="31" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="a51" />
|
||||
<option name="id" value="a51" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy A51" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="akita" />
|
||||
<option name="id" value="akita" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 8a" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="b0q" />
|
||||
<option name="id" value="b0q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy S22 Ultra" />
|
||||
<option name="screenDensity" value="600" />
|
||||
<option name="screenX" value="1440" />
|
||||
<option name="screenY" value="3088" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="32" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="bluejay" />
|
||||
<option name="id" value="bluejay" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 6a" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="29" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="crownqlteue" />
|
||||
<option name="id" value="crownqlteue" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Note9" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="2220" />
|
||||
<option name="screenY" value="1080" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="dm3q" />
|
||||
<option name="id" value="dm3q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy S23 Ultra" />
|
||||
<option name="screenDensity" value="600" />
|
||||
<option name="screenX" value="1440" />
|
||||
<option name="screenY" value="3088" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="felix" />
|
||||
<option name="id" value="felix" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Fold" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="2208" />
|
||||
<option name="screenY" value="1840" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="felix_camera" />
|
||||
<option name="id" value="felix_camera" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Fold (Camera-enabled)" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="2208" />
|
||||
<option name="screenY" value="1840" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="gts8uwifi" />
|
||||
<option name="id" value="gts8uwifi" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Tab S8 Ultra" />
|
||||
<option name="screenDensity" value="320" />
|
||||
<option name="screenX" value="1848" />
|
||||
<option name="screenY" value="2960" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="husky" />
|
||||
<option name="id" value="husky" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 8 Pro" />
|
||||
<option name="screenDensity" value="390" />
|
||||
<option name="screenX" value="1008" />
|
||||
<option name="screenY" value="2244" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="30" />
|
||||
<option name="brand" value="motorola" />
|
||||
<option name="codename" value="java" />
|
||||
<option name="id" value="java" />
|
||||
<option name="manufacturer" value="Motorola" />
|
||||
<option name="name" value="G20" />
|
||||
<option name="screenDensity" value="280" />
|
||||
<option name="screenX" value="720" />
|
||||
<option name="screenY" value="1600" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="lynx" />
|
||||
<option name="id" value="lynx" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 7a" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="31" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="oriole" />
|
||||
<option name="id" value="oriole" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 6" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="panther" />
|
||||
<option name="id" value="panther" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 7" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="31" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="q2q" />
|
||||
<option name="id" value="q2q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Z Fold3" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1768" />
|
||||
<option name="screenY" value="2208" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="q5q" />
|
||||
<option name="id" value="q5q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Z Fold5" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1812" />
|
||||
<option name="screenY" value="2176" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="30" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="r11" />
|
||||
<option name="id" value="r11" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Watch" />
|
||||
<option name="screenDensity" value="320" />
|
||||
<option name="screenX" value="384" />
|
||||
<option name="screenY" value="384" />
|
||||
<option name="type" value="WEAR_OS" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="30" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="redfin" />
|
||||
<option name="id" value="redfin" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 5" />
|
||||
<option name="screenDensity" value="440" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2340" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="shiba" />
|
||||
<option name="id" value="shiba" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 8" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="tangorpro" />
|
||||
<option name="id" value="tangorpro" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Tablet" />
|
||||
<option name="screenDensity" value="320" />
|
||||
<option name="screenX" value="1600" />
|
||||
<option name="screenY" value="2560" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="29" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="x1q" />
|
||||
<option name="id" value="x1q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy S20" />
|
||||
<option name="screenDensity" value="480" />
|
||||
<option name="screenX" value="1440" />
|
||||
<option name="screenY" value="3200" />
|
||||
</PersistentDeviceSelectionData>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RenderSettings">
|
||||
<option name="showDecorations" value="true" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="StudioBotProjectSettings">
|
||||
<option name="shareContext" value="OptedOut" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,31 @@
|
|||
# Version XX.XX - XXXX-XX-XX
|
||||
|
||||
### Added 🆕
|
||||
|
||||
- feat: refs #5443 collectionFragmentChecker by:Sergio De la torre
|
||||
- feat: refs#6845 userInterface by:Sergio De la torre
|
||||
- feat: refs #6845 userIterface by:Sergio De la torre
|
||||
- feat: refs #6861 reservas by:Sergio De la torre
|
||||
- feat: refs #6869 itemShelvings (warehouse/dev_6078, warehouse/dev, dev_6078) by:Sergio De la
|
||||
torre
|
||||
- feat: refs #7266 printItem by:Sergio De la torre
|
||||
- feat: refs #7922 scanOrder by:Sergio De la torre
|
||||
- feat: refs #8020 controlVehiculos by:Sergio De la torre
|
||||
- feat: refs #8022 kotlin versionCatalog by:Sergio De la torre
|
||||
- feat: refs #8082 ticketPickup by:Sergio De la torre
|
||||
- feat: refs #8099 addSalarySupplement by:Sergio De la torre
|
||||
- feat: refs #8150 moveExpedition by:Sergio De la torre
|
||||
- feat: refs #8150 moveExpeditions by:Sergio De la torre
|
||||
- feat: refs #8175 crashlyticsAndUpdate by:Sergio De la torre
|
||||
- feat: refs #8175 refactorCode by:Sergio De la torre
|
||||
- feat: refs #8176 refactorSearchDialog by:Sergio De la torre
|
||||
- feat: refs #8182 zoneClickable by:Sergio De la torre
|
||||
- feat: refs#8213 reservas by:Sergio De la torre
|
||||
|
||||
### Changed 📦
|
||||
|
||||
- feat: refs #8175 refactorCode by:Sergio De la torre
|
||||
- feat: refs #8176 refactorSearchDialog by:Sergio De la torre
|
||||
|
||||
### Fixed 🛠️
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# appverdnatura
|
||||
App para gestión del almacén de verdnatura
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "es.verdnatura.alpha",
|
||||
"variantName": "alphaRelease",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 200,
|
||||
"versionName": "23.22.1Beta",
|
||||
"outputFile": "app-alpha-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "es.verdnatura.beta",
|
||||
"variantName": "beta",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 144,
|
||||
"versionName": "9.6Beta",
|
||||
"outputFile": "app-beta.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "es.verdnatura.sfusion",
|
||||
"variantName": "betaRelease",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 314,
|
||||
"versionName": "24.28Beta",
|
||||
"outputFile": "app-beta-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File",
|
||||
"baselineProfiles": [
|
||||
{
|
||||
"minApi": 28,
|
||||
"maxApi": 30,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/1/app-beta-release.dm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"minApi": 31,
|
||||
"maxApi": 2147483647,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/0/app-beta-release.dm"
|
||||
]
|
||||
}
|
||||
],
|
||||
"minSdkVersionForDexing": 26
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "es.verdnatura.betatesting",
|
||||
"variantName": "betatestingRelease",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 187,
|
||||
"versionName": "23.20Beta",
|
||||
"outputFile": "app-betatesting-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
148
app/build.gradle
148
app/build.gradle
|
@ -1,91 +1,169 @@
|
|||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
apply plugin: 'com.google.devtools.ksp'
|
||||
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.3"
|
||||
|
||||
namespace = "es.verdnatura"
|
||||
compileSdk 34
|
||||
defaultConfig {
|
||||
applicationId "es.verdnatura"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 64
|
||||
// versionName "5.4.4"
|
||||
versionName "6.1.6" //control vehiculo , visualizar y filtrar historico
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 33 // se deja con target si no Play Protect la bloquea
|
||||
versionCode 330
|
||||
versionName = "24.38"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
/*debuggable false
|
||||
shrinkResources true
|
||||
minifyEnabled true*/
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
||||
//package de la app general = "package_name": "es.verdnatura"
|
||||
//package de la app beta = "package_name": "es.verdnatura.sfusion"
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.all { output ->
|
||||
def flavorName = variant.productFlavors[0].name
|
||||
def apkName
|
||||
|
||||
if (flavorName == "beta") {
|
||||
apkName = "vn-pickingBeta.apk"
|
||||
} else if (flavorName == "general") {
|
||||
apkName = "vn-picking.apk"
|
||||
} else {
|
||||
apkName = "vn-picking.apk"
|
||||
}
|
||||
|
||||
output.outputFileName = apkName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions += "version"
|
||||
productFlavors {
|
||||
create("beta") {
|
||||
applicationIdSuffix = ".sfusion"
|
||||
}
|
||||
create("general") {
|
||||
//versionNameSuffix = "General"
|
||||
}
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
|
||||
}
|
||||
/*kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
kotlin {
|
||||
jvmToolchain(8)
|
||||
}
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.4.3"
|
||||
}
|
||||
*/
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.google.firebase:firebase-crashlytics-ktx:19.0.3'
|
||||
implementation 'com.google.firebase:firebase-analytics-ktx:22.0.2'
|
||||
implementation 'com.google.android.gms:play-services-location:21.3.0'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.7.7'
|
||||
implementation 'androidx.core:core-ktx:1.13.1'
|
||||
kapt "androidx.room:room-compiler:2.6.1"
|
||||
implementation 'androidx.room:room-ktx:2.6.1'
|
||||
debugImplementation fileTree(dir: 'libs/debug', include: ['*.jar'])
|
||||
releaseImplementation fileTree(dir: 'libs/release', include: ['*.jar'])
|
||||
|
||||
//canvas
|
||||
implementation 'com.simplify:ink:1.0.0'
|
||||
|
||||
// Kotlin and Android
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.core:core-ktx:1.2.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'androidx.core:core-ktx:1.13.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.0.2'
|
||||
|
||||
//tests
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
|
||||
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
|
||||
implementation "com.airbnb.android:lottie:$lottieVersion"
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
|
||||
//Fragments
|
||||
implementation("androidx.fragment:fragment-ktx:1.8.2")
|
||||
|
||||
// Architecture components
|
||||
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle"
|
||||
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle"
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
|
||||
// Koin for DI
|
||||
implementation "org.koin:koin-core:$koin"
|
||||
implementation "org.koin:koin-android:$koin"
|
||||
implementation "org.koin:koin-androidx-scope:$koin"
|
||||
implementation "org.koin:koin-androidx-viewmodel:$koin"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.4"
|
||||
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.8.4"
|
||||
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
||||
|
||||
//Koin new resolve
|
||||
implementation "io.insert-koin:koin-core:$koin"
|
||||
implementation "io.insert-koin:koin-android:$koin"
|
||||
implementation "io.insert-koin:koin-androidx-scope:$koin"
|
||||
implementation "io.insert-koin:koin-androidx-viewmodel:$koin"
|
||||
|
||||
// Image libraries
|
||||
implementation "io.coil-kt:coil:$coil"
|
||||
implementation "com.github.bumptech.glide:glide:$glide"
|
||||
implementation "com.github.bumptech.glide:okhttp3-integration:$glide"
|
||||
kapt "com.github.bumptech.glide:compiler:$glide"
|
||||
//kapt "com.github.bumptech.glide:compiler:$glide"
|
||||
ksp("com.github.bumptech.glide:ksp:$glide")
|
||||
|
||||
// Add the Firebase Crashlytics SDK.
|
||||
implementation 'com.google.firebase:firebase-analytics:17.5.0'
|
||||
implementation 'com.google.firebase:firebase-crashlytics:17.2.1'
|
||||
implementation 'com.google.firebase:firebase-analytics:22.0.2'
|
||||
|
||||
//search
|
||||
implementation 'com.github.mirrajabi:search-dialog:1.1'
|
||||
|
||||
//logs
|
||||
implementation 'com.jakewharton.timber:timber:4.7.1'
|
||||
|
||||
//pickerImage
|
||||
implementation 'com.github.esafirm:android-image-picker:3.0.0-beta5'
|
||||
|
||||
//preferences
|
||||
implementation("androidx.datastore:datastore-preferences:1.1.1")
|
||||
implementation 'androidx.datastore:datastore-core:1.1.1'
|
||||
|
||||
|
||||
// Compose
|
||||
/* implementation(platform("androidx.compose:compose-bom:2024.02.01"))
|
||||
implementation("androidx.compose.ui:ui")
|
||||
implementation("androidx.compose.material:material")
|
||||
implementation("androidx.compose.runtime:runtime")
|
||||
implementation("androidx.activity:activity-compose:1.8.2")
|
||||
implementation("androidx.compose.ui:ui-graphics")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview")*/
|
||||
}
|
||||
|
|
|
@ -0,0 +1,178 @@
|
|||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
id("kotlin-kapt")
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.crashlytics")
|
||||
id("com.google.devtools.ksp")
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "es.verdnatura"
|
||||
compileSdk = 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "es.verdnatura"
|
||||
minSdk = 26
|
||||
targetSdk = 33 // se deja con target si no Play Protect la bloquea
|
||||
versionCode = 405
|
||||
versionName = "25.12" // REvisor para reservas
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
//debuggable = false
|
||||
//shrinkResources = true
|
||||
//minifyEnabled = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
getByName("debug") {
|
||||
isMinifyEnabled = false
|
||||
|
||||
}
|
||||
}
|
||||
//package de la app general = "package_name": "es.verdnatura"
|
||||
//package de la app beta = "package_name": "es.verdnatura.sfusion"
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.all { output ->
|
||||
val flavorName = variant.productFlavors[0].name
|
||||
val buildTypeName = variant.buildType.name
|
||||
|
||||
val apkName = when (flavorName) {
|
||||
"beta" -> "vn-pickingBeta-${buildTypeName}.apk"
|
||||
else -> "vn-picking-${buildTypeName}.apk"
|
||||
}
|
||||
output.outputFile.renameTo(File(output.outputFile.parentFile, apkName))
|
||||
true
|
||||
}
|
||||
|
||||
}
|
||||
flavorDimensions += "version"
|
||||
productFlavors {
|
||||
create("beta") {
|
||||
applicationIdSuffix = ".sfusion"
|
||||
}
|
||||
create("general") {}
|
||||
}
|
||||
kapt {
|
||||
correctErrorTypes = true
|
||||
useBuildCache = true
|
||||
|
||||
kotlinOptions {
|
||||
languageVersion = "1.9"
|
||||
}
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
//compose = true
|
||||
|
||||
/*kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.4.3"
|
||||
}
|
||||
*/
|
||||
dataBinding = true
|
||||
|
||||
compose = true
|
||||
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
/* composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.5.15"
|
||||
}*/
|
||||
/* kotlin {
|
||||
jvmToolchain(17)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}*/
|
||||
|
||||
dependencies {
|
||||
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
|
||||
implementation(libs.firebase.crashlytics.ktx)
|
||||
implementation(libs.firebase.analytics.ktx)
|
||||
implementation(libs.play.services.location)
|
||||
implementation(libs.navigation.fragment.ktx)
|
||||
implementation(libs.androidx.navigation.ui.ktx)
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.recyclerview)
|
||||
implementation(libs.androidx.room.ktx)
|
||||
//kapt(libs.androidx.room.compiler)
|
||||
ksp(libs.androidx.room.compiler)
|
||||
implementation(libs.androidx.room.runtime)
|
||||
implementation(libs.ink)
|
||||
implementation(libs.kotlin.stdlib.jdk7)
|
||||
implementation(libs.androidx.appcompat)
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.constraintlayout)
|
||||
implementation(libs.androidx.legacy.support.v4)
|
||||
implementation(libs.androidx.lifecycle.extensions)
|
||||
implementation(libs.material)
|
||||
implementation(libs.retrofit)
|
||||
implementation(libs.converter.gson)
|
||||
implementation(libs.converter.scalars)
|
||||
implementation(libs.lottie)
|
||||
implementation(libs.androidx.swiperefreshlayout)
|
||||
implementation(libs.androidx.fragment.ktx)
|
||||
implementation(libs.androidx.lifecycle.viewmodel.ktx)
|
||||
implementation(libs.androidx.lifecycle.livedata.ktx)
|
||||
implementation(libs.androidx.legacy.support.v4)
|
||||
implementation(libs.koin.core)
|
||||
implementation(libs.koin.android)
|
||||
implementation(libs.koin.androidx.scope)
|
||||
implementation(libs.koin.androidx.viewmodel)
|
||||
implementation(libs.glide)
|
||||
implementation(libs.okhttp3.integration)
|
||||
ksp(libs.glide.ksp)
|
||||
implementation(libs.firebase.analytics)
|
||||
implementation(libs.android.image.picker)
|
||||
implementation(libs.androidx.datastore.preferences)
|
||||
implementation(libs.androidx.datastore.core)
|
||||
implementation(libs.zxing.android.embedded) { isTransitive = false }
|
||||
implementation(libs.core)
|
||||
//implementation(libs.koin.androidx.compose)
|
||||
|
||||
// Compose
|
||||
|
||||
val composeBom = platform("androidx.compose:compose-bom:2024.10.01")
|
||||
implementation(composeBom)
|
||||
androidTestImplementation(composeBom)
|
||||
// Choose one of the following:
|
||||
// Material Design 3
|
||||
implementation(libs.androidx.material3)
|
||||
implementation(libs.androidx.ui)
|
||||
// Android Studio Preview support
|
||||
implementation(libs.androidx.ui.tooling.preview)
|
||||
debugImplementation(libs.androidx.ui.tooling)
|
||||
// UI Tests
|
||||
androidTestImplementation(libs.androidx.ui.test.junit4)
|
||||
debugImplementation(libs.androidx.ui.test.manifest)
|
||||
// custom design system based on Foundation)
|
||||
//implementation(libs.androidx.material.icons.core)
|
||||
// Optional - Add full set of material icons
|
||||
implementation(libs.androidx.material.icons.extended)
|
||||
// Optional - Add window size utils
|
||||
implementation(libs.androidx.adaptive)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
||||
implementation(libs.lottie.compose)
|
||||
testImplementation(libs.junit)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "es.verdnatura",
|
||||
"variantName": "debug",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 144,
|
||||
"versionName": "9.6Beta",
|
||||
"outputFile": "app-debug.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
clean_build_2gb_4workers {
|
||||
tasks = [":app:assembleDebug"]
|
||||
gradle-args = ["--max-workers=4"]
|
||||
jvm-args = ["-Xmx2048m"]
|
||||
cleanup-tasks = ["clean"]
|
||||
}
|
||||
clean_build_parallelGC {grad
|
||||
tasks = [":app:assembleDebug"]
|
||||
jvm-args = ["-XX:+UseParallelGC"]
|
||||
cleanup-tasks = ["clean"]
|
||||
}
|
||||
|
||||
clean_build_G1GC_4gb {
|
||||
tasks = [":app:assembleDebug"]
|
||||
jvm-args = ["-Xmx4096m", "-XX:+UseG1GC"]
|
||||
cleanup-tasks = ["clean"]
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -1,34 +1,91 @@
|
|||
{
|
||||
"project_info": {
|
||||
"project_number": "519813071137",
|
||||
"firebase_url": "https://gestoralmacen-bfa2a.firebaseio.com",
|
||||
"project_id": "gestoralmacen-bfa2a",
|
||||
"storage_bucket": "gestoralmacen-bfa2a.appspot.com"
|
||||
"project_number": "975691769093",
|
||||
"project_id": "picking-2b9a0",
|
||||
"storage_bucket": "picking-2b9a0.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:519813071137:android:3de54686c580a6f79dfe60",
|
||||
"mobilesdk_app_id": "1:975691769093:android:83eff0dadf5ca9d3e3c36c",
|
||||
"android_client_info": {
|
||||
"package_name": "es.verdnatura"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "519813071137-5099s9mme9juufnrkm88ajt5n7cmluqh.apps.googleusercontent.com",
|
||||
"client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyA74wQCwDCpCjWs49lCX5m2SsdqcYb_J8s"
|
||||
"current_key": "AIzaSyC3skTw7I7BbOuSS4jOBa373zV5e8wCMDM"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "519813071137-5099s9mme9juufnrkm88ajt5n7cmluqh.apps.googleusercontent.com",
|
||||
"client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:975691769093:android:83eff0dadf5ca9d3e3c36c",
|
||||
"android_client_info": {
|
||||
"package_name": "es.verdnatura.sfusion"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyC3skTw7I7BbOuSS4jOBa373zV5e8wCMDM"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:975691769093:android:83eff0dadf5ca9d3e3c36c",
|
||||
"android_client_info": {
|
||||
"package_name": "es.verdnatura.alpha"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyC3skTw7I7BbOuSS4jOBa373zV5e8wCMDM"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
# proguardFiles setting in build.gradle.kts.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
@ -19,3 +19,6 @@
|
|||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
# Optimize options
|
||||
#-keep class es.verdnatura.** { *; }
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,18 +1,20 @@
|
|||
{
|
||||
"version": 2,
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "es.verdnatura",
|
||||
"variantName": "processReleaseResources",
|
||||
"applicationId": "es.verdnatura.sfusion",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 64,
|
||||
"versionName": "6.1.6",
|
||||
"attributes": [],
|
||||
"versionCode": 161,
|
||||
"versionName": "23.3Beta",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
]
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"5.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release","dirName":""},"path":"app-release.apk","properties":{}}]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,15 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="es.verdnatura">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
android:required="false" />
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||
<uses-permission android:name="android.permission.PREVENT_POWER_KEY" />
|
||||
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
||||
|
||||
<uses-permission android:name="android.permission.LAUNCH_APPS" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
<application
|
||||
android:name=".MobileApplication"
|
||||
|
@ -20,23 +23,60 @@
|
|||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity android:name=".presentation.view.feature.imageview.activity.ImageViewActivity" android:configChanges="orientation"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".presentation.view.feature.articulo.fragment.ImageViewActivity"
|
||||
android:configChanges="orientation"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".presentation.composable.ImageViewActivityComposable"
|
||||
android:configChanges="orientation"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".presentation.view.feature.restaurant.RestaurantActivity"
|
||||
android:configChanges="orientation"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".presentation.view.feature.main.activity.MainActivity"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize"
|
||||
android:configChanges="orientation"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".presentation.view.feature.delivery.activity.SignedActivity"
|
||||
android:configChanges="orientation"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".presentation.view.feature.login.activity.LoginActivity"
|
||||
android:configChanges="orientation"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="image/*" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
</application>
|
||||
|
||||
|
||||
</manifest>
|
|
@ -1,20 +1,186 @@
|
|||
package es.verdnatura
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.Application
|
||||
import android.graphics.Color
|
||||
import android.media.MediaPlayer
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.widget.Toast
|
||||
import es.verdnatura.dataStore.DataStoreLocal
|
||||
import es.verdnatura.di.viewModelModule
|
||||
import es.verdnatura.domain.ConstAndValues
|
||||
import es.verdnatura.domain.RestClient
|
||||
import es.verdnatura.domain.SalixService
|
||||
import es.verdnatura.domain.toast
|
||||
import es.verdnatura.presentation.common.InteceptorListener
|
||||
import es.verdnatura.presentation.common.LoginListener
|
||||
import es.verdnatura.presentation.common.MainActivityListener
|
||||
import es.verdnatura.presentation.common.SignListener
|
||||
import es.verdnatura.presentation.view.component.CustomDialogMainActivity
|
||||
import es.verdnatura.presentation.view.feature.login.activity.LoginActivity
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.koin.android.ext.koin.androidContext
|
||||
import org.koin.core.context.loadKoinModules
|
||||
import org.koin.core.context.startKoin
|
||||
import java.io.File
|
||||
|
||||
class MobileApplication : Application(), InteceptorListener {
|
||||
private lateinit var interceptoreListener: InteceptorListener
|
||||
private var mainActivityListener: MainActivityListener? = null
|
||||
private var loginListener: LoginListener? = null
|
||||
private var signListener: SignListener? = null
|
||||
private var isActivityLoginRunning = false
|
||||
|
||||
fun setMainListener(listener: MainActivityListener) {
|
||||
mainActivityListener = listener
|
||||
}
|
||||
|
||||
fun setLoginListener(listener: LoginListener) {
|
||||
loginListener = listener
|
||||
}
|
||||
|
||||
fun setSignListener(listener: SignListener) {
|
||||
signListener = listener
|
||||
}
|
||||
|
||||
lateinit var salix: SalixService
|
||||
var userId: Int? = null
|
||||
var userName: String? = null
|
||||
var renewPeriod: Long = 0
|
||||
var renewInterval: Long = 0
|
||||
var userPassword: String? = null
|
||||
var hasNetwork: Boolean = true
|
||||
var serialNumber: String? = ""
|
||||
var versionName: String = ""
|
||||
var androidId: String = ""
|
||||
var mperror: MediaPlayer? = null
|
||||
var mpok: MediaPlayer? = null
|
||||
var dataStoreApp = DataStoreLocal(this)
|
||||
private lateinit var customDialog: CustomDialogMainActivity
|
||||
private val handler = Handler(Looper.getMainLooper())
|
||||
|
||||
class MobileApplication: Application() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
startKoin { androidContext(this@MobileApplication)
|
||||
mperror = MediaPlayer.create((this), R.raw.error)
|
||||
mpok = MediaPlayer.create((this), R.raw.ok)
|
||||
startKoin {
|
||||
androidContext(this@MobileApplication)
|
||||
val moduleList = listOf(viewModelModule)
|
||||
loadKoinModules(moduleList)
|
||||
}
|
||||
|
||||
|
||||
runBlocking {
|
||||
dataStoreApp.editDataStoreKey(
|
||||
ConstAndValues.BASEURLSALIX, ConstAndValues.BASE_URL_SALIX
|
||||
)
|
||||
}
|
||||
val restClient = RestClient(this, this)
|
||||
salix = restClient.salixClient
|
||||
|
||||
registerActivityLifecycleCallbacks(object : ActivityLifecycleCallbacks {
|
||||
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {
|
||||
}
|
||||
|
||||
override fun onActivityStarted(activity: Activity) {
|
||||
}
|
||||
|
||||
override fun onActivityResumed(activity: Activity) {
|
||||
isActivityLoginRunning = activity.javaClass == LoginActivity::class.java
|
||||
}
|
||||
|
||||
override fun onActivityPaused(activity: Activity) {
|
||||
if (activity.javaClass == LoginActivity::class.java) {
|
||||
isActivityLoginRunning = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActivityStopped(activity: Activity) {
|
||||
}
|
||||
|
||||
override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) {
|
||||
}
|
||||
|
||||
override fun onActivityDestroyed(activity: Activity) {
|
||||
isActivityLoginRunning = false
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
fun messageToast(isError: Boolean, message: String, isToasted: Boolean = false) {
|
||||
when (isError) {
|
||||
false -> mpok
|
||||
true -> mperror
|
||||
}?.start()
|
||||
|
||||
if (isToasted) message.toast(
|
||||
this, color = if (isError) {
|
||||
Color.RED
|
||||
} else {
|
||||
Color.BLUE
|
||||
},
|
||||
duration = if (isError) Toast.LENGTH_LONG else Toast.LENGTH_SHORT
|
||||
)
|
||||
}
|
||||
|
||||
fun isLoginRunning(): Boolean {
|
||||
return isActivityLoginRunning
|
||||
}
|
||||
|
||||
override fun onInterceptionResult(visibility: Int) {
|
||||
if (mainActivityListener != null) {
|
||||
handler.post {
|
||||
(this.mainActivityListener)?.onApplicationEventAnimation(visibility)
|
||||
}
|
||||
}
|
||||
if (loginListener != null) {
|
||||
handler.post {
|
||||
(this.loginListener)?.onApplicationEventAnimation(visibility)
|
||||
}
|
||||
}
|
||||
if (signListener != null) {
|
||||
handler.post {
|
||||
(this.signListener)?.onApplicationEventAnimation(visibility)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun getLanguage(): String {
|
||||
val settings = this.resources.configuration
|
||||
return settings.locales.get(0).language
|
||||
}
|
||||
|
||||
fun clearApplicationData() {
|
||||
try {
|
||||
val cacheDir = this.cacheDir
|
||||
val appDir = File(cacheDir.parent ?: return)
|
||||
if (appDir.exists()) {
|
||||
val children = appDir.list() ?: return
|
||||
for (child in children) {
|
||||
if (child != "lib") {
|
||||
deleteDir(File(appDir, child))
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
private fun deleteDir(dir: File): Boolean {
|
||||
if (dir.isDirectory) {
|
||||
val children = dir.list() ?: return false
|
||||
for (child in children) {
|
||||
val success = deleteDir(File(dir, child))
|
||||
if (!success) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return dir.delete()
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,439 @@
|
|||
package es.verdnatura.dataStore
|
||||
|
||||
import android.content.Context
|
||||
import androidx.datastore.core.DataStore
|
||||
import androidx.datastore.preferences.core.Preferences
|
||||
import androidx.datastore.preferences.core.booleanPreferencesKey
|
||||
import androidx.datastore.preferences.core.edit
|
||||
import androidx.datastore.preferences.core.intPreferencesKey
|
||||
import androidx.datastore.preferences.core.longPreferencesKey
|
||||
import androidx.datastore.preferences.core.stringPreferencesKey
|
||||
import androidx.datastore.preferences.preferencesDataStore
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.domain.ConstAndValues.BASEURLLILIUM
|
||||
import es.verdnatura.domain.ConstAndValues.BASEURLSALIX
|
||||
import es.verdnatura.domain.ConstAndValues.BASE_URL_LILIUM
|
||||
import es.verdnatura.domain.ConstAndValues.BASE_URL_SALIX
|
||||
import es.verdnatura.domain.ConstAndValues.COMPANYFK
|
||||
import es.verdnatura.domain.ConstAndValues.ENTRYID
|
||||
import es.verdnatura.domain.ConstAndValues.ENTRYNUMBERIMAGES
|
||||
import es.verdnatura.domain.ConstAndValues.ENTRYOBSERVATIONORIGINAL
|
||||
import es.verdnatura.domain.ConstAndValues.ENTRYOBSERVATIONS
|
||||
import es.verdnatura.domain.ConstAndValues.ITEMPACKING
|
||||
import es.verdnatura.domain.ConstAndValues.NUMBEROFWAGONS
|
||||
import es.verdnatura.domain.ConstAndValues.PRINTERFK
|
||||
import es.verdnatura.domain.ConstAndValues.PRINTERFKDEFAULT
|
||||
import es.verdnatura.domain.ConstAndValues.PRINTERNAME
|
||||
import es.verdnatura.domain.ConstAndValues.RESERVATIONMODE
|
||||
import es.verdnatura.domain.ConstAndValues.SECTORDESCRIP
|
||||
import es.verdnatura.domain.ConstAndValues.SECTORFK
|
||||
import es.verdnatura.domain.ConstAndValues.SECTORFKDEFAULT
|
||||
import es.verdnatura.domain.ConstAndValues.SECTORISONRESERVATIONMODE
|
||||
import es.verdnatura.domain.ConstAndValues.SUPPLIERID
|
||||
import es.verdnatura.domain.ConstAndValues.SUPPLIERNAME
|
||||
import es.verdnatura.domain.ConstAndValues.TRAINNAME
|
||||
import es.verdnatura.domain.ConstAndValues.WAREHOUSEFK
|
||||
import es.verdnatura.domain.ConstAndValues.WAREHOUSEFKDEFAULT
|
||||
import es.verdnatura.domain.ConstAndValues.WORKFORMSELECTED
|
||||
import es.verdnatura.presentation.view.feature.login.model.OperatorSalix
|
||||
import es.verdnatura.presentation.view.feature.login.model.WorkForms
|
||||
import es.verdnatura.presentation.view.feature.login.model.WorkerData
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.json.JSONObject
|
||||
import java.util.Calendar
|
||||
|
||||
val Context.dataStore: DataStore<Preferences> by preferencesDataStore(name = "settings")
|
||||
val Context.dataStoreWork: DataStore<Preferences> by preferencesDataStore(name = "workForm")
|
||||
|
||||
class DataStoreLocal(var mobileApplication: MobileApplication) {
|
||||
val IMAGES_KEY = stringPreferencesKey("images_key")
|
||||
|
||||
suspend fun saveDataOperator(operator: OperatorSalix) {
|
||||
|
||||
editDataStoreKey(
|
||||
SECTORFK, if (operator.sector != null) {
|
||||
operator.sector.id
|
||||
} else {
|
||||
SECTORFKDEFAULT
|
||||
}
|
||||
)
|
||||
editDataStoreKey(
|
||||
WAREHOUSEFK, if (operator.sector != null) {
|
||||
operator.sector.warehouseFk
|
||||
} else {
|
||||
WAREHOUSEFKDEFAULT
|
||||
}
|
||||
)
|
||||
editDataStoreKey(
|
||||
SECTORDESCRIP, if (operator.sector != null) {
|
||||
operator.sector.description
|
||||
} else {
|
||||
mobileApplication.getString(R.string.Sinsector)
|
||||
}
|
||||
)
|
||||
|
||||
editDataStoreKey(
|
||||
PRINTERFK, if (operator.printer != null) {
|
||||
operator.printer.id
|
||||
} else {
|
||||
PRINTERFKDEFAULT
|
||||
}
|
||||
)
|
||||
editDataStoreKey(
|
||||
PRINTERNAME, if (operator.printer != null) {
|
||||
operator.printer.name
|
||||
} else {
|
||||
mobileApplication.getString(R.string.printerWithout)
|
||||
}
|
||||
)
|
||||
|
||||
editDataStoreKey(
|
||||
TRAINNAME, if (operator.train != null) {
|
||||
operator.train.name
|
||||
} else {
|
||||
""
|
||||
}
|
||||
)
|
||||
editDataStoreKey(
|
||||
NUMBEROFWAGONS, operator.numberOfWagons
|
||||
)
|
||||
|
||||
editDataStoreKey(
|
||||
ITEMPACKING,
|
||||
if (operator.itemPackingTypeFk != null) operator.itemPackingTypeFk.toString() else ""
|
||||
)
|
||||
|
||||
|
||||
editDataStoreKey(
|
||||
RESERVATIONMODE, operator.isOnReservationMode
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
//Tarea 6868
|
||||
suspend fun saveWorkerData(operator: WorkerData) {
|
||||
|
||||
editDataStoreKey(
|
||||
SECTORFK, if (operator.sector != null) {
|
||||
operator.sector.id
|
||||
} else {
|
||||
SECTORFKDEFAULT
|
||||
}
|
||||
)
|
||||
|
||||
if (operator.sector?.isOnReservationMode != null) {
|
||||
editDataStoreKey(
|
||||
SECTORISONRESERVATIONMODE,
|
||||
operator.sector.isOnReservationMode
|
||||
)
|
||||
} else {
|
||||
mobileApplication.dataStore.edit { preferences ->
|
||||
preferences.remove(stringPreferencesKey(SECTORISONRESERVATIONMODE))
|
||||
}
|
||||
}
|
||||
editDataStoreKey(
|
||||
WAREHOUSEFK, if (operator.sector != null) {
|
||||
operator.sector.warehouseFk
|
||||
} else {
|
||||
WAREHOUSEFKDEFAULT
|
||||
}
|
||||
)
|
||||
editDataStoreKey(
|
||||
SECTORDESCRIP, if (operator.sector != null) {
|
||||
operator.sector.description
|
||||
} else {
|
||||
mobileApplication.getString(R.string.Sinsector)
|
||||
}
|
||||
)
|
||||
|
||||
editDataStoreKey(
|
||||
PRINTERFK, if (operator.printer != null) {
|
||||
operator.printer.id
|
||||
} else {
|
||||
PRINTERFKDEFAULT
|
||||
}
|
||||
)
|
||||
editDataStoreKey(
|
||||
PRINTERNAME, if (operator.printer != null) {
|
||||
operator.printer.name
|
||||
} else {
|
||||
mobileApplication.getString(R.string.printerWithout)
|
||||
}
|
||||
)
|
||||
|
||||
editDataStoreKey(
|
||||
TRAINNAME, if (operator.train != null) {
|
||||
operator.train.name
|
||||
} else {
|
||||
""
|
||||
}
|
||||
)
|
||||
editDataStoreKey(
|
||||
NUMBEROFWAGONS, operator.numberOfWagons
|
||||
)
|
||||
editDataStoreKey(
|
||||
RESERVATIONMODE, operator.isOnReservationMode
|
||||
)
|
||||
editDataStoreKey(
|
||||
ITEMPACKING,
|
||||
operator.itemPackingTypeFk
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun isPreferenceExists(key: String): Boolean {
|
||||
val preferencesKey = booleanPreferencesKey(key)
|
||||
val preferences = mobileApplication.dataStore.data.first()
|
||||
return preferences.contains(preferencesKey)
|
||||
}
|
||||
|
||||
inline fun <reified T> readDataStoreKey(key: String): T {
|
||||
|
||||
return when (T::class) {
|
||||
Int::class ->
|
||||
runBlocking {
|
||||
mobileApplication.dataStore.data
|
||||
.map { preferences -> preferences[intPreferencesKey(key)] ?: -1 }
|
||||
.first() as T
|
||||
}
|
||||
|
||||
String::class -> runBlocking {
|
||||
mobileApplication.dataStore.data
|
||||
.map { preferences ->
|
||||
preferences[stringPreferencesKey(key)] ?: if (key == BASEURLSALIX) {
|
||||
BASE_URL_SALIX
|
||||
} else {
|
||||
""
|
||||
}
|
||||
}
|
||||
.first() as T
|
||||
}
|
||||
|
||||
Boolean::class -> runBlocking {
|
||||
mobileApplication.dataStore.data
|
||||
.map { preferences -> preferences[booleanPreferencesKey(key)] ?: false }
|
||||
.first() as T
|
||||
}
|
||||
|
||||
Long::class -> runBlocking {
|
||||
mobileApplication.dataStore.data
|
||||
.map { preferences -> preferences[longPreferencesKey(key)] ?: 0 }
|
||||
.first() as T
|
||||
}
|
||||
|
||||
else -> "ERROR" as T
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
suspend fun editDataStoreKey(key: String, value: Any) {
|
||||
|
||||
mobileApplication.dataStore.edit { preferences ->
|
||||
when (value) {
|
||||
is Int -> preferences[intPreferencesKey(key)] = value
|
||||
is String -> preferences[stringPreferencesKey(key)] = value
|
||||
is Boolean -> preferences[booleanPreferencesKey(key)] = value
|
||||
is Long -> preferences[longPreferencesKey(key)] = value
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
suspend fun saveImages(images: MutableList<com.esafirm.imagepicker.model.Image>?) {
|
||||
val gson = Gson()
|
||||
val imagesJson = gson.toJson(images)
|
||||
mobileApplication.dataStore.edit { preferences ->
|
||||
preferences[IMAGES_KEY] = imagesJson
|
||||
}
|
||||
}
|
||||
|
||||
fun getImages(): Flow<List<com.esafirm.imagepicker.model.Image>> {
|
||||
val gson = Gson()
|
||||
return mobileApplication.dataStore.data.map { preferences ->
|
||||
val imagesJson = preferences[IMAGES_KEY]
|
||||
?: return@map emptyList<com.esafirm.imagepicker.model.Image>()
|
||||
val type = object : TypeToken<List<com.esafirm.imagepicker.model.Image>>() {}.type
|
||||
gson.fromJson(imagesJson, type)
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun deleteEntryPackaging() {
|
||||
mobileApplication.dataStoreApp.editDataStoreKey(ENTRYID, -1)
|
||||
mobileApplication.dataStoreApp.editDataStoreKey(SUPPLIERID, -1)
|
||||
mobileApplication.dataStoreApp.editDataStoreKey(SUPPLIERNAME, "")
|
||||
mobileApplication.dataStoreApp.editDataStoreKey(ENTRYOBSERVATIONORIGINAL, "")
|
||||
mobileApplication.dataStoreApp.editDataStoreKey(ENTRYOBSERVATIONS, "")
|
||||
mobileApplication.dataStoreApp.editDataStoreKey(ENTRYNUMBERIMAGES, 0)
|
||||
mobileApplication.dataStoreApp.editDataStoreKey(COMPANYFK, -1)
|
||||
|
||||
}
|
||||
|
||||
suspend fun deleteImages() {
|
||||
mobileApplication.dataStore.edit { preferences ->
|
||||
preferences.remove(IMAGES_KEY)
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun deleteWorkForm(nameWorkForm: Preferences.Key<String>) {
|
||||
|
||||
if (nameWorkForm.name == "all") {
|
||||
mobileApplication.dataStoreWork.edit {
|
||||
it.clear()
|
||||
}
|
||||
|
||||
} else {
|
||||
mobileApplication.dataStoreWork.edit { preferences ->
|
||||
preferences.remove(nameWorkForm)
|
||||
}
|
||||
mobileApplication.dataStoreApp.editDataStoreKey(
|
||||
WORKFORMSELECTED, "Producción"
|
||||
)
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"Producción",
|
||||
"https://salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
suspend fun getWorkForm(): List<WorkForms> {
|
||||
val listForms: ArrayList<WorkForms> = ArrayList()
|
||||
val preferences = mobileApplication.dataStoreWork.data.first()
|
||||
|
||||
preferences.asMap().forEach { entry ->
|
||||
val key = entry.key
|
||||
val value = entry.value
|
||||
|
||||
val json2 = JSONObject(value.toString())
|
||||
|
||||
listForms.add(
|
||||
WorkForms(
|
||||
key.name,
|
||||
json2.get("urlSalix").toString(),
|
||||
json2.get("isShowDelete").toString().toBoolean(),
|
||||
json2.get("created") as Long
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
if (listForms.isEmpty() || listForms.size == 1) {
|
||||
createWorksDefault()
|
||||
}
|
||||
//createWorksDefault()
|
||||
|
||||
return listForms.sortedBy { it.created }
|
||||
}
|
||||
|
||||
private suspend fun createWorksDefault() {
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"Producción",
|
||||
"https://salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"Test",
|
||||
urlSalix = "https://test-salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"Dev",
|
||||
urlSalix = "https://dev-salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"Aula formación",
|
||||
urlSalix = "http://pc525.samba.verdnatura.es:3000"
|
||||
)
|
||||
)
|
||||
val working_in_test = false
|
||||
if (working_in_test) {
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"TestHome",
|
||||
urlSalix = "https://test-salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"TestLOCAL",
|
||||
urlSalix = "http://10.1.4.42:3000"
|
||||
)
|
||||
)
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"TestLOCALHOME",
|
||||
urlSalix = "http://192.168.1.139:3000"
|
||||
)
|
||||
)
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"DEV SALIX",
|
||||
urlSalix = "https://dev-salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
} else {
|
||||
//deleteWorkForm("all")
|
||||
}
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
mobileApplication.getString(R.string.addWorkForm),
|
||||
"",
|
||||
isShowDelete = false,
|
||||
created = Calendar.getInstance().timeInMillis + Calendar.getInstance().timeInMillis
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
suspend fun saveWorkForm(workForm: WorkForms) {
|
||||
|
||||
val gson = Gson()
|
||||
val json = gson.toJson(workForm)
|
||||
mobileApplication.dataStoreWork.edit { preferences ->
|
||||
preferences[stringPreferencesKey(workForm.name)] = json
|
||||
}
|
||||
|
||||
runBlocking {
|
||||
|
||||
mobileApplication.dataStoreApp.editDataStoreKey(
|
||||
BASEURLSALIX,
|
||||
workForm.urlSalix
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun getServerSalix(): String {
|
||||
|
||||
var url =
|
||||
readDataStoreKey<String>(BASEURLSALIX)
|
||||
if (url.isBlank()) {
|
||||
url = BASE_URL_SALIX
|
||||
}
|
||||
return url
|
||||
}
|
||||
|
||||
fun getServerLilium(): String {
|
||||
|
||||
var url =
|
||||
readDataStoreKey<String>(BASEURLLILIUM)
|
||||
if (url.isBlank()) {
|
||||
url = BASE_URL_LILIUM
|
||||
}
|
||||
return url
|
||||
}
|
||||
}
|
|
@ -0,0 +1,210 @@
|
|||
package es.verdnatura.db
|
||||
|
||||
import android.content.Context
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Database
|
||||
import androidx.room.Delete
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.ProvidedTypeConverter
|
||||
import androidx.room.Query
|
||||
import androidx.room.Room
|
||||
import androidx.room.RoomDatabase
|
||||
import androidx.room.TypeConverter
|
||||
import androidx.room.TypeConverters
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ClientTicketSalix
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoPending
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.MyLocation
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteLoaded
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.SignedTickets
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.Ticket
|
||||
import java.util.Date
|
||||
|
||||
// Clase que representa la base de datos
|
||||
@Database(
|
||||
entities = [ExpeditionInfoLoadUnload::class, ExpeditionInfoPending::class, SignedTickets::class, RouteInfo::class, ClientTicketSalix::class, RouteLoaded::class],
|
||||
version = 1,
|
||||
exportSchema = false
|
||||
|
||||
)
|
||||
@TypeConverters(MapTypeConverter::class)
|
||||
abstract class DeliveryDatabase : RoomDatabase() {
|
||||
abstract fun expedicionDao(): ExpedicionDao
|
||||
abstract fun signedTicketDao(): SignedTicketDao
|
||||
abstract fun routesDao(): RoutesDao
|
||||
|
||||
abstract fun clienTicketDao(): ClientTicketDao
|
||||
|
||||
companion object {
|
||||
@Volatile
|
||||
private var INSTANCE: DeliveryDatabase? = null
|
||||
|
||||
fun getInstance(context: Context): DeliveryDatabase {
|
||||
return INSTANCE ?: synchronized(this) {
|
||||
val instance = Room.databaseBuilder(
|
||||
context.applicationContext, DeliveryDatabase::class.java, "expedition_database"
|
||||
).fallbackToDestructiveMigration(true)
|
||||
.addTypeConverter(MapTypeConverter())
|
||||
.fallbackToDestructiveMigration(true)
|
||||
.build()
|
||||
INSTANCE = instance
|
||||
instance
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Interfaz que define los métodos de acceso a datos para Expedicion
|
||||
@Dao
|
||||
interface ExpedicionDao {
|
||||
@Query("SELECT * FROM expedition e WHERE e.routeFk = :parametro1")
|
||||
suspend fun getAll(parametro1: Int): MutableList<ExpeditionInfoLoadUnload>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insert(expedition: MutableList<ExpeditionInfoLoadUnload>)
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insertPending(expeditionPending: MutableList<ExpeditionInfoPending>)
|
||||
|
||||
@Query("SELECT * FROM expeditionPending ep WHERE ep.routeFk=:routeFk")
|
||||
suspend fun getAllPending(routeFk: Int): MutableList<ExpeditionInfoLoadUnload>
|
||||
|
||||
@Query("SELECT * FROM expeditionPending")
|
||||
suspend fun getAllPendingExpeditions(): MutableList<ExpeditionInfoPending>
|
||||
|
||||
@Delete
|
||||
fun delete(expedition: ExpeditionInfoLoadUnload)
|
||||
|
||||
@Query("DELETE FROM expeditionPending WHERE code = :codeState")
|
||||
suspend fun getDeleteByState(codeState: String)
|
||||
|
||||
@Query("DELETE FROM expeditionPending")
|
||||
suspend fun getDeleteAllState()
|
||||
}
|
||||
|
||||
@Dao
|
||||
interface SignedTicketDao {
|
||||
@Query("SELECT * FROM signedPending ")
|
||||
suspend fun getAll(): List<SignedTickets>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insert(signedTicketPending: SignedTickets)
|
||||
|
||||
@Query("DELETE FROM signedPending WHERE fileName = :nameFile")
|
||||
fun deleteByNameFile(nameFile: String)
|
||||
}
|
||||
|
||||
@Dao
|
||||
interface RoutesDao {
|
||||
@Query("SELECT * FROM routes ")
|
||||
suspend fun getAll(): List<RouteInfo>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insert(routes: List<RouteInfo>)
|
||||
|
||||
@Query("DELETE FROM routes ")
|
||||
suspend fun delete()
|
||||
|
||||
@Query("DELETE FROM routes WHERE id = :routeId")
|
||||
suspend fun deleteByNameFile(routeId: String)
|
||||
|
||||
@Query("SELECT * FROM routesLoaded ")
|
||||
suspend fun getAllLoaded(): List<RouteLoaded>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insertLoaded(routeLoaded: RouteLoaded)
|
||||
|
||||
@Query("DELETE FROM routes WHERE dated != :today")
|
||||
suspend fun deleteLoaded(today: String)
|
||||
|
||||
}
|
||||
|
||||
@Dao
|
||||
interface ClientTicketDao {
|
||||
@Query("SELECT * FROM clientTickets ")
|
||||
suspend fun getAll(): List<ClientTicketSalix>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insert(routes: List<ClientTicketSalix>)
|
||||
|
||||
@Query("DELETE FROM clientTickets ")
|
||||
suspend fun delete()
|
||||
|
||||
@Query("DELETE FROM clientTickets WHERE id = :ticketId")
|
||||
suspend fun deleteById(ticketId: Int)
|
||||
|
||||
}
|
||||
|
||||
@ProvidedTypeConverter
|
||||
class MapTypeConverter {
|
||||
private val gson = Gson()
|
||||
|
||||
@TypeConverter
|
||||
fun fromMap(map: Map<String, String>): String {
|
||||
return gson.toJson(map)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun toMap(json: String): Map<String, String> {
|
||||
val type = object : TypeToken<Map<String, String>>() {}.type
|
||||
return gson.fromJson(json, type)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun fromDate(date: Date): Long {
|
||||
return date.time
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun toDate(timestamp: Long): Date {
|
||||
return Date(timestamp)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun fromMyLocation(location: MyLocation?): String? {
|
||||
return gson.toJson(location)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun toMyLocation(json: String?): MyLocation? {
|
||||
val type = object : TypeToken<MyLocation>() {}.type
|
||||
return gson.fromJson(json, type)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun fromPhones(phones: List<String>): String {
|
||||
return gson.toJson(phones)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun toPhones(json: String): List<String> {
|
||||
val type = object : TypeToken<List<String>>() {}.type
|
||||
return gson.fromJson(json, type)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun fromTickets(tickets: MutableList<Ticket>): String? {
|
||||
return gson.toJson(tickets)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun toTickets(json: String?): MutableList<Ticket> {
|
||||
val type = object : TypeToken<MutableList<Ticket>>() {}.type
|
||||
return gson.fromJson(json, type)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun fromNullableMap(map: MutableMap<String?, String?>): String {
|
||||
return gson.toJson(map)
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun toNullableMap(json: String): MutableMap<String?, String?> {
|
||||
val type = object : TypeToken<MutableMap<String?, String?>>() {}.type
|
||||
return gson.fromJson(json, type)
|
||||
}
|
||||
}
|
|
@ -2,37 +2,54 @@ package es.verdnatura.di
|
|||
|
||||
import es.verdnatura.presentation.view.feature.ajustes.fragment.AjustesViewModel
|
||||
import es.verdnatura.presentation.view.feature.articulo.fragment.ItemCardViewModel
|
||||
import es.verdnatura.presentation.view.feature.boxPicking.BoxPickingViewModel
|
||||
import es.verdnatura.presentation.view.feature.buffer.fragment.BufferFragmentViewModel
|
||||
import es.verdnatura.presentation.view.feature.buscaritem.fragment.BuscarItemComposeViewModel
|
||||
import es.verdnatura.presentation.view.feature.buscaritem.fragment.BuscarItemViewModel
|
||||
import es.verdnatura.presentation.view.feature.buscaritemall.fragment.BuscarItemAllViewModel
|
||||
import es.verdnatura.presentation.view.feature.calidad.fragment.BuyersViewModel
|
||||
import es.verdnatura.presentation.view.feature.calidad.fragment.QaualityViewModel
|
||||
import es.verdnatura.presentation.view.feature.category.ChangeCategoryViewModel
|
||||
import es.verdnatura.presentation.view.feature.claim.fragment.ubication.ClaimViewModel
|
||||
import es.verdnatura.presentation.view.feature.collection.fragment.CollectionCheckerViewModel
|
||||
import es.verdnatura.presentation.view.feature.collection.fragment.CollectionViewModel
|
||||
import es.verdnatura.presentation.view.feature.controlador.fragment.ControladorViewModel
|
||||
import es.verdnatura.presentation.view.feature.faltas.fragment.FaltasViewModel
|
||||
import es.verdnatura.presentation.view.feature.historico.fragment.HistoricoViewModel
|
||||
import es.verdnatura.presentation.view.feature.collection.fragment.CollectionViewModelCheckerPreviosNew
|
||||
import es.verdnatura.presentation.view.feature.controlvehiculo.fragment.ControlVehiculoViewModel
|
||||
import es.verdnatura.presentation.view.feature.delivery.viewmodels.DeliveryViewModel
|
||||
import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleViewModel
|
||||
import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleViewModelCompose
|
||||
import es.verdnatura.presentation.view.feature.historicoarticulo.fragment.HistoricoArticuloViewModel
|
||||
import es.verdnatura.presentation.view.feature.historicoshelvinglog.fragment.ShelvingLogViewModel
|
||||
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryViewModel
|
||||
import es.verdnatura.presentation.view.feature.login.fragment.LoginViewModel
|
||||
import es.verdnatura.presentation.view.feature.packaging.fragment.SupplierViewModel
|
||||
import es.verdnatura.presentation.view.feature.packingHolland.fragment.PackingHollandViewModel
|
||||
import es.verdnatura.presentation.view.feature.paletizador.fragment.CmrExpeditionPalletViewModel
|
||||
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionPalletDetailViewModel
|
||||
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionPalletViewModel
|
||||
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionScanSorterViewModel
|
||||
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionScanSorterViewModelCompose
|
||||
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionScanViewModel
|
||||
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionStateViewModel
|
||||
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionTruckListViewModel
|
||||
import es.verdnatura.presentation.view.feature.paletizador.fragment.PalletScanViewModel
|
||||
import es.verdnatura.presentation.view.feature.parking.fragment.ParkingViewModel
|
||||
import es.verdnatura.presentation.view.feature.pasillero.fragment.PasilleroViewModel
|
||||
import es.verdnatura.presentation.view.feature.precontrol.PreControladorViewModel
|
||||
import es.verdnatura.presentation.view.feature.presacador.fragment.PreSacadorViewModel
|
||||
import es.verdnatura.presentation.view.feature.reposicion.fragment.ReposicionViewModel
|
||||
import es.verdnatura.presentation.view.feature.qr.QrFragmentViewModel
|
||||
import es.verdnatura.presentation.view.feature.roadmap.fragment.RoadMapListViewModel
|
||||
import es.verdnatura.presentation.view.feature.sacador.fragment.SacadorViewModel
|
||||
import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingViewModel
|
||||
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemViewModel
|
||||
import es.verdnatura.presentation.view.feature.controlvehiculo.fragment.ControlVehiculoViewModel
|
||||
import es.verdnatura.presentation.view.feature.historicovehiculo.fragment.HistoricoVehiculoViewModel
|
||||
import es.verdnatura.presentation.view.feature.smarttag.sacador.AssociateTagsViewModel
|
||||
import es.verdnatura.presentation.view.feature.sacador.fragment.showticket.ShowTicketViewModel
|
||||
import es.verdnatura.presentation.view.feature.ticket.fragment.TicketViewModel
|
||||
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorViewModel
|
||||
import es.verdnatura.presentation.view.feature.workermistake.fragment.WorkerMistakeViewModel
|
||||
import org.koin.android.ext.koin.androidApplication
|
||||
import org.koin.android.ext.koin.androidContext
|
||||
import org.koin.androidx.viewmodel.dsl.viewModel
|
||||
import org.koin.dsl.module
|
||||
|
||||
val viewModelModule = module{
|
||||
val viewModelModule = module {
|
||||
|
||||
viewModel {
|
||||
WorkerMistakeViewModel(androidApplication())
|
||||
}
|
||||
|
||||
// Login
|
||||
viewModel {
|
||||
LoginViewModel(androidContext())
|
||||
|
@ -42,6 +59,13 @@ val viewModelModule = module{
|
|||
viewModel {
|
||||
PasilleroViewModel(androidContext())
|
||||
}
|
||||
//Pasilleros Dia de venta
|
||||
viewModel {
|
||||
DayOfSaleViewModel(androidContext())
|
||||
}
|
||||
viewModel {
|
||||
DayOfSaleViewModelCompose(androidApplication())
|
||||
}
|
||||
|
||||
// Pasilleros / Item Card
|
||||
viewModel {
|
||||
|
@ -50,7 +74,7 @@ val viewModelModule = module{
|
|||
|
||||
// Pasilleros / Item Card / Historico
|
||||
viewModel {
|
||||
HistoricoViewModel(androidContext())
|
||||
HistoricoArticuloViewModel(androidContext())
|
||||
}
|
||||
|
||||
// Pasilleros / Buscar Item
|
||||
|
@ -58,51 +82,56 @@ val viewModelModule = module{
|
|||
BuscarItemViewModel(androidContext())
|
||||
}
|
||||
|
||||
// Pasilleros / Buscar Item 2
|
||||
viewModel {
|
||||
BuscarItemAllViewModel(androidContext())
|
||||
BuscarItemComposeViewModel(androidApplication())
|
||||
}
|
||||
|
||||
viewModel{
|
||||
PreControladorViewModel(androidContext())
|
||||
// Pasilleros / Buscar Item 2
|
||||
|
||||
viewModel {
|
||||
ShowTicketViewModel(androidContext())
|
||||
}
|
||||
|
||||
// Pasilleros / Inventario
|
||||
viewModel {
|
||||
InventaryViewModel(androidContext())
|
||||
}
|
||||
// Pasilleros / Faltas
|
||||
viewModel {
|
||||
FaltasViewModel(androidContext())
|
||||
}
|
||||
|
||||
// ShelvingParking
|
||||
viewModel {
|
||||
ShelvingParkingViewModel(androidContext())
|
||||
}
|
||||
|
||||
// Ubicador
|
||||
viewModel {
|
||||
UbicadorViewModel(androidContext())
|
||||
}
|
||||
|
||||
// Ubicador // Automatic
|
||||
viewModel {
|
||||
AutomaticAddItemViewModel(androidContext())
|
||||
}
|
||||
|
||||
// Ajustes
|
||||
viewModel {
|
||||
AjustesViewModel(androidContext())
|
||||
}
|
||||
|
||||
// PALETIZADOR
|
||||
|
||||
viewModel {
|
||||
ExpeditionTruckListViewModel(androidContext())
|
||||
ExpeditionScanSorterViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
ExpeditionPalletViewModel(androidContext())
|
||||
ExpeditionScanSorterViewModelCompose(androidApplication())
|
||||
}
|
||||
|
||||
|
||||
viewModel {
|
||||
CmrExpeditionPalletViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
BufferFragmentViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
ExpeditionStateViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
ExpeditionTruckListViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
|
@ -112,6 +141,9 @@ val viewModelModule = module{
|
|||
viewModel {
|
||||
ExpeditionScanViewModel(androidContext())
|
||||
}
|
||||
viewModel {
|
||||
QrFragmentViewModel(androidContext())
|
||||
}
|
||||
|
||||
// SACADOR
|
||||
viewModel {
|
||||
|
@ -121,9 +153,11 @@ val viewModelModule = module{
|
|||
viewModel {
|
||||
CollectionViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
ControladorViewModel(androidContext())
|
||||
CollectionViewModelCheckerPreviosNew(androidContext())
|
||||
}
|
||||
viewModel {
|
||||
CollectionCheckerViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
|
@ -134,26 +168,41 @@ val viewModelModule = module{
|
|||
PreSacadorViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
ReposicionViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
BuyersViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
QaualityViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
ControlVehiculoViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel{
|
||||
HistoricoVehiculoViewModel(androidContext())
|
||||
viewModel {
|
||||
ShelvingLogViewModel(androidContext())
|
||||
}
|
||||
viewModel{
|
||||
AssociateTagsViewModel(androidContext())
|
||||
viewModel {
|
||||
ClaimViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
PalletScanViewModel(androidContext())
|
||||
}
|
||||
viewModel {
|
||||
SupplierViewModel(androidContext())
|
||||
}
|
||||
viewModel {
|
||||
DeliveryViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
PackingHollandViewModel(androidContext())
|
||||
}
|
||||
|
||||
viewModel {
|
||||
TicketViewModel(androidContext())
|
||||
}
|
||||
viewModel {
|
||||
RoadMapListViewModel(androidContext())
|
||||
}
|
||||
viewModel {
|
||||
ChangeCategoryViewModel(androidContext())
|
||||
}
|
||||
viewModel {
|
||||
BoxPickingViewModel(androidContext())
|
||||
}
|
||||
}
|
|
@ -1,16 +1,75 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import com.google.gson.GsonBuilder
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.domain.ConstAndValues.BASEURLSALIX
|
||||
import es.verdnatura.domain.ConstAndValues.BASE_URL_SALIX
|
||||
import es.verdnatura.presentation.common.InteceptorListener
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import okhttp3.OkHttpClient
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.gson.GsonConverterFactory
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class ApiSalixUtils {
|
||||
companion object {
|
||||
//const val BASE_URL:String = "http://192.168.1.108:8000/"
|
||||
const val BASE_URL:String = "https://salix.verdnatura.es/api/"
|
||||
fun getApiService():SalixService{
|
||||
val salixRetrofit = Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(
|
||||
GsonConverterFactory.create()).build()
|
||||
|
||||
fun getApiService(context: Context, myObserver: InteceptorListener?): SalixService {
|
||||
|
||||
var salixClient =
|
||||
OkHttpClient.Builder().addInterceptor(SalixInterceptor(context, myObserver))
|
||||
.connectTimeout(10, TimeUnit.SECONDS).writeTimeout(10, TimeUnit.SECONDS)
|
||||
.readTimeout(40, TimeUnit.SECONDS).build()
|
||||
|
||||
val salixRetrofit =
|
||||
Retrofit.Builder().client(salixClient).baseUrl(getBaseUrlLocal(context = context))
|
||||
.addConverterFactory(
|
||||
GsonConverterFactory.create(GsonBuilder().serializeNulls().create())
|
||||
).build()
|
||||
|
||||
return salixRetrofit.create(SalixService::class.java)
|
||||
}
|
||||
|
||||
private fun getBaseUrlLocal(context: Context): String {
|
||||
var myWorkFormSelected =
|
||||
(context as MobileApplication).dataStoreApp.readDataStoreKey(ConstAndValues.WORKFORMSELECTED) as String
|
||||
if (myWorkFormSelected != "Producción" && myWorkFormSelected.isNotBlank()) {
|
||||
runBlocking {
|
||||
var list = (context).dataStoreApp.getWorkForm()
|
||||
for (l in list) {
|
||||
if (l.name == myWorkFormSelected) {
|
||||
|
||||
context.dataStoreApp.editDataStoreKey(BASEURLSALIX, l.urlSalix)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
runBlocking {
|
||||
|
||||
context.dataStoreApp.editDataStoreKey(
|
||||
BASEURLSALIX,
|
||||
BASE_URL_SALIX
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
var url =
|
||||
(context).dataStoreApp.readDataStoreKey<String>(BASEURLSALIX)
|
||||
|
||||
if (url.isNullOrEmpty()) {
|
||||
runBlocking {
|
||||
(context).dataStoreApp.editDataStoreKey(
|
||||
BASEURLSALIX, BASE_URL_SALIX
|
||||
)
|
||||
}
|
||||
} else {
|
||||
if (!url.contains("http")) {
|
||||
url = "https://$url"
|
||||
}
|
||||
}
|
||||
|
||||
return if (url.isNullOrEmpty()) "$BASE_URL_SALIX/api/" else "$url/api/"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import android.preference.PreferenceManager
|
||||
import android.util.Log
|
||||
import okhttp3.OkHttpClient
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.gson.GsonConverterFactory
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
|
||||
class ApiUtils {
|
||||
companion object {
|
||||
//const val BASE_URL:String = "http://192.168.1.54:8009/"
|
||||
const val BASE_URL:String = "https://app.verdnatura.es/"
|
||||
//const val BASE_URL:String = "https://test-app.verdnatura.es/"
|
||||
//const val BASE_URL:String = "http://10.1.4.186/"
|
||||
|
||||
fun getApiService(context: Context):VerdnaturaService{
|
||||
val retrofit = Retrofit.Builder()
|
||||
.baseUrl(getBaseUrlLocal(context))
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.client(getRequestHeader())
|
||||
.build()
|
||||
return retrofit.create(VerdnaturaService::class.java)
|
||||
}
|
||||
|
||||
fun getBaseUrlLocal(context: Context): String {
|
||||
var url = this.getDefaults("base_url",context)
|
||||
if (url.isNullOrEmpty()){
|
||||
setDefaults("base_url", BASE_URL,context)
|
||||
}else{
|
||||
if (!url.contains("http")){
|
||||
url = "https://"+url
|
||||
}
|
||||
}
|
||||
|
||||
return if (url.isNullOrEmpty()) BASE_URL else url
|
||||
}
|
||||
|
||||
fun getRequestHeader(): OkHttpClient? {
|
||||
val client = OkHttpClient.Builder()
|
||||
.connectTimeout(10, TimeUnit.SECONDS)
|
||||
.writeTimeout(10, TimeUnit.SECONDS)
|
||||
.readTimeout(40, TimeUnit.SECONDS)
|
||||
.build()
|
||||
return client
|
||||
}
|
||||
|
||||
fun setDefaults(key: String?, value: String?, context: Context?) {
|
||||
val preferences: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
val editor = preferences.edit()
|
||||
editor.putString(key, value)
|
||||
editor.commit()
|
||||
}
|
||||
|
||||
fun getDefaults(key: String?, context: Context?): String? {
|
||||
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
return preferences.getString(key, null)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -2,14 +2,79 @@ package es.verdnatura.domain
|
|||
|
||||
object ConstAndValues {
|
||||
const val SACADOR = "PREPARED" //ITEMPICKER
|
||||
const val CONTROLADOR = "CHECKED"//CHECKER
|
||||
const val CONTROLADOR = "CHECKER"//ERA CHECKED --REVISADO.
|
||||
const val OK = "OK"
|
||||
const val PREPARED = "PREPARED"
|
||||
const val ON_PREPARATION = "ON_PREPARATION"
|
||||
const val CHECKED = "CHECKED"
|
||||
const val PRESACADOR = "PRESACADOR" //PREITEMPICKER
|
||||
const val PREITEMPICKER = "PREITEMPICKER"
|
||||
const val PREITEMPICKERTEST = "PREITEMPICKERTEST"
|
||||
const val SERIALNUMBER = "SERIALNUMBER"
|
||||
const val ON_CHECKING = "ON_CHECKING"
|
||||
const val PRECHECKER = "PRECHECKER"//PRECHECKER
|
||||
const val PRECHECKER = "PRECHECKER"
|
||||
const val MAINACTIVITY = "MAIN"
|
||||
const val VERTICKET = "SHOWTICKET"
|
||||
const val SECTORFKDEFAULT = -1
|
||||
const val PRINTERFKDEFAULT = -1
|
||||
const val WAREHOUSEFKDEFAULT = 60
|
||||
const val SECTORFK = "sectorFk"
|
||||
const val SECTORISONRESERVATIONMODE = "sectorIsOnReservationMode"
|
||||
const val TAG = "VERDNATURA::"
|
||||
const val USERFK = "userFk"
|
||||
const val USER = "user"
|
||||
const val PASSWORD = "password"
|
||||
const val TOKEN = "token"
|
||||
const val TOKENMULTIMEDIA = "tokenMultimedia"
|
||||
const val TTL = "ttl"
|
||||
const val TOKENCREATED = "tokenCreated"
|
||||
const val SECTORDESCRIP = "sectordescrip"
|
||||
const val HOLDPOSITION = "holdPosition"
|
||||
const val NUMBEROFWAGONS = "operatorNumberOfWagons"
|
||||
const val PRINTERNAME = "printername"
|
||||
const val PRINTERFK = "printerFk"
|
||||
const val WAREHOUSEFK = "warehouseFk"
|
||||
const val REMEMBER = "recordar"
|
||||
const val ANDROID_ID = "ANDROID_ID"
|
||||
const val DEVICENAME = "devicename"
|
||||
const val TRAINNAME = "trainName"
|
||||
const val TRAINFK = "trainFk"
|
||||
const val WORKFORMSELECTED = "workFormSelected"
|
||||
const val SUPPLIERID = "SUPPLIERID"
|
||||
const val SUPPLIERNAME = "SUPPLIERNAME"
|
||||
const val ENTRYID = "ENTRYID"
|
||||
const val COMPANYFK = "COMPANYFK"
|
||||
const val ENTRYOBSERVATIONORIGINAL = "ENTRYOBSERVATIONORIGINAL"
|
||||
const val ITEMPACKING = "itemPackingType"
|
||||
const val ITEMPACKINGFK = "itemPackingTypeFk"
|
||||
const val ITEMPACKINGTYPEFILTER = "itemPackingTypeFilter"
|
||||
const val BUYER = "buyernickname"
|
||||
const val BUYERID = "buyerid"
|
||||
const val WAGON = "wagon"
|
||||
const val TAGSTYPE = "tagstype"
|
||||
const val WAREHOUSEFK_DEFAULT = 60
|
||||
const val DATENOVEHICLE = "DATENOVEHICLE"
|
||||
const val DEPARTMENTMISTAKE = "DEPARTMENTMISTAKE"
|
||||
const val DEPARTMENTMISTAKEID = "DEPARTMENTMISTAKEID"
|
||||
const val ENTRYOBSERVATIONS = "ENTRYOBSERVATIONS"
|
||||
const val ENTRYNUMBERIMAGES = "ENTRYNUMBERIMAGES"
|
||||
const val ENTRYTYPE = "ENTRYTYPE"
|
||||
const val BASEURLSALIX = "base_urlSalix"
|
||||
const val BASEURLLILIUM = "base_urlLilium"
|
||||
const val BASE_URL_LILIUM = "https://lilium.verdnatura.es"
|
||||
const val BASE_URL_SALIX = "https://salix.verdnatura.es"
|
||||
const val ENTRY = "ENTRY"
|
||||
const val RENEWINTERVAL = "renewInterval"
|
||||
const val RENEWPERIOD = "renewPeriod"
|
||||
const val MENUBYDEFAULTSELECTED = "MENUBYDEFAULTSELECTED"
|
||||
const val INVENTORYPARKINGTO = "INVENTORYPARKINGTO"
|
||||
const val INVENTORYPARKINGFROM = "INVENTORYPARKINGFROM"
|
||||
const val LIMITRECORDSSHELVINGLOG = 50
|
||||
const val RESERVATIONMODE = "operatorReservationMode"
|
||||
const val MODELWORKERTYPEACTIVITY = "APP"
|
||||
const val FLINGTHRESHOLDVELOCITY = 2000f
|
||||
const val FLINGTHRESHOLDVERTICAL = 500f
|
||||
const val SCANNER_THRESHOLD_SPEED: Int = 60
|
||||
const val HUMAN_CHARACTERS_SECOND: Int = 100
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,121 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.text.Html
|
||||
import android.view.Gravity
|
||||
import android.view.ViewGroup
|
||||
import android.widget.EditText
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import es.verdnatura.R
|
||||
import java.text.SimpleDateFormat
|
||||
import java.time.ZonedDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
||||
fun Any.toast(context: Context?, duration: Int = Toast.LENGTH_SHORT): Toast {
|
||||
return Toast.makeText(context, this.toString(), duration).apply { show() }
|
||||
fun List<Any?>.formatWithQuotes(): String {
|
||||
return "[" + joinToString(", ") {
|
||||
when {
|
||||
it is String && (it.trim().startsWith("{") && it.trim()
|
||||
.endsWith("}")) -> "\"$it\""
|
||||
|
||||
it is String -> "\"$it\""
|
||||
else -> it.toString()
|
||||
}
|
||||
} + "]"
|
||||
}
|
||||
|
||||
fun Any.toast(
|
||||
context: Context?,
|
||||
duration: Int = Toast.LENGTH_SHORT,
|
||||
color: Int = Color.WHITE
|
||||
): Toast {
|
||||
val toast = Toast.makeText(
|
||||
context,
|
||||
Html.fromHtml("<font color='$color' ><b>$this</b></font>", 0),
|
||||
duration
|
||||
)
|
||||
toast.show()
|
||||
return toast.apply { show() }
|
||||
}
|
||||
|
||||
fun Context.showToastCenterWithBackground(textToShow: String) {
|
||||
(this as? Activity)?.window?.decorView?.let { rootView ->
|
||||
TextView(this).apply {
|
||||
text = textToShow
|
||||
setTextColor(getColor(R.color.verdnatura_orange_salix))
|
||||
textSize = 22f
|
||||
gravity = Gravity.CENTER
|
||||
setPadding(32, 16, 32, 16)
|
||||
background = GradientDrawable().apply {
|
||||
setColor(Color.BLACK)
|
||||
cornerRadius = 16f
|
||||
alpha = 220
|
||||
}
|
||||
layoutParams = FrameLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
).apply { gravity = Gravity.CENTER }
|
||||
alpha = 0f
|
||||
|
||||
(rootView as ViewGroup).addView(this)
|
||||
|
||||
animate().alpha(1f).setDuration(300).withEndAction {
|
||||
animate().alpha(0f).setStartDelay(1000).setDuration(300)
|
||||
.withEndAction { (rootView).removeView(this) }
|
||||
.start()
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <T : Any> T?.notNull(f: (it: T) -> Unit) {
|
||||
if (this != null) f(this)
|
||||
}
|
||||
|
||||
fun EditText.toInt(): Int {
|
||||
return this.text.toString().toInt()
|
||||
}
|
||||
|
||||
fun String.isParking(): Boolean {
|
||||
val regex = Regex("^[^ ]+-[^ ]+$")
|
||||
return this.length > 4 && regex.matches(this)
|
||||
}
|
||||
|
||||
fun String.isShelving(): Boolean {
|
||||
val regex = Regex("\\S{0,4}")
|
||||
return regex.matches(this)
|
||||
}
|
||||
|
||||
fun EditText.toLong(): Long {
|
||||
return this.text.toString().toLong()
|
||||
}
|
||||
|
||||
fun toDateString(date: Date): String {
|
||||
val format = SimpleDateFormat("dd-MM-yyyy", Locale.getDefault())
|
||||
return format.format(date)
|
||||
}
|
||||
|
||||
fun String?.isoToString(returnOnlyDate: Boolean = false): String {
|
||||
|
||||
return if (!this.isNullOrEmpty() && this.contains("T")) {
|
||||
val utcZonedDateTime = ZonedDateTime.parse(this, DateTimeFormatter.ISO_OFFSET_DATE_TIME)
|
||||
val myDate = utcZonedDateTime.withZoneSameInstant(ZonedDateTime.now().zone)
|
||||
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
|
||||
if (returnOnlyDate) {
|
||||
(myDate.format(DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm"))).replace("T", " ")
|
||||
.substring(0, 10)
|
||||
} else {
|
||||
(myDate.format(DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm"))).replace("T", " ")
|
||||
}
|
||||
} else if (!this.isNullOrEmpty() && !this.contains("T")) {
|
||||
this
|
||||
} else {
|
||||
""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
|
||||
import retrofit2.Call
|
||||
|
||||
class GetAjustesUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun getSectors(usuario:String,password:String) : Call<List<SectorItemVO>> {
|
||||
return restClient!!.getSectors("json","1",usuario,password,"application/json")
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.buscaritemall.model.ItemLocationAll
|
||||
import retrofit2.Call
|
||||
|
||||
class GetBuscarItemAllUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun searchItemsUbicadorAll(usuario:String,password:String,itemFk:String) : Call<List<ItemLocationAll>> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(itemFk)
|
||||
return restClient!!.searchItemsUbicadorAll("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
||||
import retrofit2.Call
|
||||
|
||||
class GetBuscarItemUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun searchItemsUbicador(usuario:String,password:String,itemFk:String) : Call<List<ItemLocationVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
return restClient!!.searchItemsUbicador("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
|
||||
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
|
||||
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
|
||||
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
||||
import retrofit2.Call
|
||||
|
||||
class GetInventaryUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun itemShelvingRadar(usuario:String,password:String,sectorFk:String) : Call<List<ItemInventaryVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(sectorFk)
|
||||
return restClient!!.itemShelvingRadar("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun itemShelvingRadarFilterBuyer(usuario:String,password:String,buyerFk:String,warehouseFk: String) : Call<List<ItemInventaryVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(buyerFk)
|
||||
params.add(warehouseFk)
|
||||
return restClient!!.itemShelvingRadarFilterBuyer("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun faultsReview(usuario:String,password:String,warehouseFk:String) : Call<List<ItemFaltasVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(warehouseFk)
|
||||
return restClient!!.faultsReview("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun faultsReview_isChecked(usuario:String,password:String,itemFk:String,warehouseFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(warehouseFk)
|
||||
return restClient!!.faultsReview_isChecked("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
|
||||
fun itemShelvingBuyerGet(usuario:String,password:String) : Call<List<BuyerVO>> {
|
||||
return restClient!!.itemShelvingBuyerGet("json","1",usuario,password,"application/json")
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemCardVO
|
||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingType
|
||||
import es.verdnatura.presentation.view.feature.historico.model.ItemHistoricoVO
|
||||
import retrofit2.Call
|
||||
|
||||
class GetItemCardUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun getItemCard(usuario:String,password:String,itemFk:String,warehouseFk:String) : Call<ItemCardVO> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(warehouseFk)
|
||||
return restClient!!.getItemCard("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun getItemPackingType(usuario:String,password:String) : Call<List<ItemPackingType>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
return restClient!!.getItemPackingType("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun itemStockUpdate(usuario:String,password:String,itemFk:String,warehouseFk:String,newVisible:String,isTrash:String ) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(warehouseFk)
|
||||
params.add(newVisible)
|
||||
params.add(isTrash)
|
||||
return restClient!!.itemStockUpdate("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun itemTrash(usuario:String,password:String,itemFk:String,warehouseFk:String,newVisible:String,isTrash:String ) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(warehouseFk)
|
||||
params.add(newVisible)
|
||||
params.add(isTrash)
|
||||
return restClient!!.itemTrash("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun itemPlacementSave(usuario:String,password:String,itemFk:String,warehouseFk:String,value:String ) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(warehouseFk)
|
||||
params.add(value)
|
||||
return restClient!!.itemPlacementSave("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun updateGrouping(usuario:String,password:String,itemFk:String,value:String ,warehouseFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(value)
|
||||
params.add(warehouseFk)
|
||||
return restClient!!.updateGrouping("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun updatePacking(usuario:String,password:String,itemFk:String,value:String ,warehouseFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(value)
|
||||
params.add(warehouseFk)
|
||||
return restClient!!.updatePacking("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun updatePackingType(usuario:String,password:String,itemFk:String,ItemPackingType:String) : Call<Boolean> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(ItemPackingType)
|
||||
return restClient!!.updatePackingType("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
|
||||
fun itemSaveMin(usuario:String,password:String,itemFk:String,value:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(value)
|
||||
return restClient!!.itemSaveMin("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun barcodes_edit(usuario:String,password:String,itemFk:String,value:String, delete:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(value)
|
||||
params.add(itemFk)
|
||||
params.add(delete)
|
||||
return restClient!!.barcodes_edit("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
|
||||
fun itemDiary(usuario:String,password:String,itemFk:String,warehouseFk: String) : Call<List<ItemHistoricoVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(warehouseFk)
|
||||
return restClient!!.itemDiary("json","1",usuario,password,"application/json",params = params)
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.login.model.LoginSalixVO
|
||||
import es.verdnatura.presentation.view.feature.login.model.SalixMessageVO
|
||||
import es.verdnatura.presentation.view.feature.login.model.versionApp
|
||||
import retrofit2.Call
|
||||
|
||||
class GetLoginUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun login(usuario:String,password:String,imei:String) : Call<String>{
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(usuario)
|
||||
params.add(password)
|
||||
//params.add(imei)
|
||||
return restClient!!.login("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun salixLogin(usuario:String,password:String) : Call<LoginSalixVO>{
|
||||
return salixClient!!.login("application/json", LoginSalixVO(usuario,password))
|
||||
}
|
||||
|
||||
fun checkVersion_old(usuario:String,password:String,version:String) : Call<Boolean> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(version)
|
||||
return restClient!!.version("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun sendChekingPresence(token:String,workerId:Int,message:String) : Call<Boolean>{
|
||||
return salixClient!!.sendChekingPresence(content_type = "application/json", authorization = token, params = SalixMessageVO(workerId = workerId,message = message))
|
||||
}
|
||||
|
||||
fun checkVersion(usuario:String,password:String,nameApp:String) : Call<versionApp> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(nameApp)
|
||||
return restClient!!.version2("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.*
|
||||
import retrofit2.Call
|
||||
|
||||
class GetPaletizadoresUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun expeditionTruckList(usuario:String,password:String) : Call<List<ItemExpeditionTruckVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
return restClient!!.expeditionTruckList("json","1",usuario,password,"application/json")
|
||||
}
|
||||
|
||||
fun expeditionTruckAdd(usuario:String,password:String,vHour:String,vDescription:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(vHour)
|
||||
params.add(vDescription)
|
||||
// //////Log.i("VERDNATURA:"," La hora es $vHour y descrip $vDescription")
|
||||
return restClient!!.expeditionTruckAdd("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun expeditionPallet_List(usuario:String,password:String,vTruckFk:String) : Call<List<ItemPalletVO>> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(vTruckFk)
|
||||
return restClient!!.expeditionPallet_List("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun expeditionScanAdd(usuario:String,password:String,vPalletFk:String,vTruckFk:String) : Call<List<ItemScanVO>> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(vPalletFk)
|
||||
params.add(vTruckFk)
|
||||
return restClient!!.expeditionScanAdd("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun expeditionScanPut(usuario:String,password:String,vPalletFk:String,vExpeditionFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(vPalletFk)
|
||||
params.add(vExpeditionFk)
|
||||
return restClient!!.expeditionScanPut("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
fun checkRouteExpeditionScanPut(usuario:String,password:String,vPalletFk:String,vExpeditionFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(vPalletFk)
|
||||
params.add(vExpeditionFk)
|
||||
return restClient!!.checkRouteExpeditionScanPut("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
|
||||
|
||||
fun expeditionPalletView(usuario:String,password:String,vPalletFk:String) : Call<List<ItemPalletViewVO>> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(vPalletFk)
|
||||
return restClient!!.expeditionPalletView("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun expeditionPalletDel(usuario:String,password:String,vPalletFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(vPalletFk)
|
||||
return restClient!!.expeditionPalletDel("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun expeditionScanList(usuario:String,password:String,vPalletFk:String) : Call<List<ItemExpeditionScanVO>> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(vPalletFk)
|
||||
return restClient!!.expeditionScanList("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun expeditionScanDel(usuario:String,password:String,vScanFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(vScanFk)
|
||||
return restClient!!.expeditionScanDel("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun expeditionPalletPrintSet(
|
||||
usuario: String,
|
||||
password: String,
|
||||
vPalletFk: String,
|
||||
vSectorFk: String
|
||||
) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(vPalletFk)
|
||||
params.add(vSectorFk)
|
||||
return restClient!!.expeditionPalletPrintSet("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import retrofit2.Call
|
||||
|
||||
class GetPreControladorUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
|
||||
fun collectionTicketGet(usuario:String,password:String,collectionFk:String,sectorFk:String,print:String,type:String) : Call<CollectionVO> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(collectionFk)
|
||||
params.add(sectorFk)
|
||||
params.add(print)
|
||||
params.add(type)
|
||||
return restClient!!.collection_getTickets("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.presacador.model.PreSacadorItemVO
|
||||
import retrofit2.Call
|
||||
|
||||
class GetPreSacadorUseCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun ticketToPrePrepare(usuario:String,password:String,ticketFk:String,sectorFk:String) : Call<List<PreSacadorItemVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(ticketFk)
|
||||
params.add(sectorFk)
|
||||
return restClient!!.ticketToPrePrepare("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemPlacementSupplyGetOrder(usuario:String,password:String,sectorFk:String) : Call<List<PreSacadorItemVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(sectorFk)
|
||||
return restClient!!.itemPlacementSupplyGetOrder("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemPlacementSupplyCloseOrder(usuario:String,password:String,id:String,quantity:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(id)
|
||||
params.add(quantity)
|
||||
return restClient!!.itemPlacementSupplyCloseOrder("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
|
||||
import es.verdnatura.presentation.view.feature.calidad.model.ItemBuyerVO
|
||||
import retrofit2.Call
|
||||
|
||||
class GetQualityUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun itemShelvingBuyerGet(usuario:String,password:String) : Call<List<BuyerVO>> {
|
||||
return restClient!!.itemShelvingBuyerGet("json","1",usuario,password,"application/json")
|
||||
}
|
||||
|
||||
fun itemShelvingBuyerTask(usuario:String,password:String, userFk: String) : Call<List<ItemBuyerVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(userFk)
|
||||
return restClient!!.itemShelvingBuyerTask("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemShelvingStarsUpdate(usuario:String,password:String, vId: String,vStars: String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(vId)
|
||||
params.add(vStars)
|
||||
return restClient!!.itemShelvingStarsUpdate("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import es.verdnatura.presentation.view.feature.collection.ItemVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.MistakeTypeVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyVO
|
||||
import retrofit2.Call
|
||||
|
||||
class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun collectionTicketGet(usuario:String,password:String,collectionFk:String,sectorFk:String,print:String,type:String) : Call<CollectionVO> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(collectionFk)
|
||||
params.add(sectorFk)
|
||||
params.add(print)
|
||||
params.add(type)
|
||||
return restClient!!.collectionTicketGet("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
|
||||
fun collectionNew(usuario:String,password:String,sectorFk:String,carros:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(sectorFk)
|
||||
params.add(carros)
|
||||
return restClient!!.collectionNew("json","1",usuario,password,"application/json",params)
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun collectionGet(usuario:String,password:String) : Call<List<CollectionVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
return restClient!!.collectionGet("json","1",usuario,password,"application/json")
|
||||
}
|
||||
|
||||
fun saleTrackingReplace(usuario:String,password:String,saleFk:String,vOriginalQuantity:String,vStateFk:String,vIsChecked:String,vBuyFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(saleFk)
|
||||
params.add(vOriginalQuantity)
|
||||
params.add(vStateFk)
|
||||
params.add(vIsChecked)
|
||||
params.add(vBuyFk)
|
||||
return restClient!!.saleTrackingReplace("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemPlacementSupplyAiming(usuario:String,password:String,shelvingFk:String,quantity:String,itemFk:String) : Call<List<PlacementSupplyVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(shelvingFk)
|
||||
params.add(quantity)
|
||||
params.add(itemFk)
|
||||
return restClient!!.itemPlacementSupplyAiming("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemShelvingSaleSupplyAdd(usuario:String,password:String,itemShelvingFk:String,saleFk:String,quantity:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemShelvingFk)
|
||||
params.add(saleFk)
|
||||
params.add(quantity)
|
||||
return restClient!!.itemShelvingSaleSupplyAdd("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemShelvingPlacementSupplyAdd(usuario:String,password:String,itemShelvingFk:String,itemPlacementSupplyFk:String,quantity:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemShelvingFk)
|
||||
params.add(itemPlacementSupplyFk)
|
||||
params.add(quantity)
|
||||
return restClient!!.itemShelvingPlacementSupplyAdd("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun collectionStickerPrint(usuario:String,password:String,collectionFk: String,sectorFk: String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(collectionFk)
|
||||
params.add(sectorFk)
|
||||
return restClient!!.collectionStickerPrint("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemGetAvailable(usuario:String,password:String,itemFk: String,warehouseFk: String) : Call<ItemVO> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(itemFk)
|
||||
params.add(warehouseFk)
|
||||
return restClient!!.itemGetAvailable("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun collectionAddItem(usuario:String,password:String,itemFk: String,quantityFk: String,ticketFk: String,warehouseFk: String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(itemFk)
|
||||
params.add(quantityFk)
|
||||
params.add(ticketFk)
|
||||
params.add(warehouseFk)
|
||||
return restClient!!.collectionAddItem("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun saleMove(usuario:String,password:String,saleFk: String,quantity: String,originalQuantity:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(saleFk)
|
||||
params.add(quantity)
|
||||
params.add(originalQuantity)
|
||||
return restClient!!.saleMove("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun collectionMissingTrash(usuario:String,password:String,saleFk: String,quantity: String,type:String,warehouseFk:String,originalQuantity: String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(saleFk)
|
||||
params.add(quantity)
|
||||
params.add(type)
|
||||
params.add(warehouseFk)
|
||||
params.add(originalQuantity)
|
||||
return restClient!!.collectionMissingTrash("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun saleTrackingDel(usuario:String,password:String,saleFk: String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(saleFk)
|
||||
return restClient!!.saleTrackingDel("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun collectionUpdateState(usuario:String,password:String,collectionFk: String,state : String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(collectionFk)
|
||||
params.add(state)
|
||||
return restClient!!.collectionUpdateState("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun getIdFromCode(usuario:String,password:String,code: String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(code)
|
||||
return restClient!!.getIdFromCode("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun collectionIncreaseQuantity(usuario:String,password:String,saleFk: String, quantity: String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(saleFk)
|
||||
params.add(quantity)
|
||||
return restClient!!.collectionIncreaseQuantity("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun saleMistakeAdd(usuario:String,password:String,vSaleFk: String, vUserFk: String, vTypeFk: String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(vSaleFk)
|
||||
params.add(vUserFk)
|
||||
params.add(vTypeFk)
|
||||
return restClient!!.saleMistakeAdd("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun mistakeType(usuario:String,password:String) : Call<List<MistakeTypeVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
return restClient!!.mistakeType("json","1",usuario,password,"application/json")
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.shelvingparking.model.ItemShelvingParkingVO
|
||||
import retrofit2.Call
|
||||
|
||||
class GetShelvingParkingUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun shelvingParking_get(usuario:String,password:String,vShelvingFk:String,vWarehouseFk:String,vDayRange:String) : Call<List<ItemShelvingParkingVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(vShelvingFk)
|
||||
params.add(vWarehouseFk)
|
||||
params.add(vDayRange)
|
||||
return restClient!!.shelvingParking_get("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
|
||||
import retrofit2.Call
|
||||
|
||||
class GetUbicadorUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun itemShelvingList(usuario:String,password:String,vShelvingFk:String) : Call<List<ItemUbicadorVO>> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(vShelvingFk)
|
||||
return restClient!!.itemShelvingList("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemShelvingMake(usuario:String,password:String,shelving:String,item:String,deep:String,quantity:String,packing:String,warehouse:String,level:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(shelving)
|
||||
params.add(item)
|
||||
params.add(deep)
|
||||
params.add(quantity)
|
||||
params.add(packing)
|
||||
params.add(warehouse)
|
||||
params.add(level)
|
||||
return restClient!!.itemShelvingMake("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemShelvingMakeEdit(usuario:String,password:String,shelving:String,item:String,deep:String,quantity:String,packing:String,warehouse:String,level:String,itemShelvingFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(shelving)
|
||||
params.add(item)
|
||||
params.add(deep)
|
||||
params.add(quantity)
|
||||
params.add(packing)
|
||||
params.add(warehouse)
|
||||
params.add(level)
|
||||
params.add(itemShelvingFk)
|
||||
return restClient!!.itemShelvingMakeEdit("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemShelvingMake_multi(usuario:String,password:String,shelving:String,items:List<String>,deep:String,warehouse:String,level:String) : Call<String> {
|
||||
val params:ArrayList<Any> = ArrayList();
|
||||
params.add(shelving)
|
||||
params.add(items)
|
||||
params.add(deep)
|
||||
params.add(warehouse)
|
||||
params.add(level)
|
||||
return restClient!!.itemShelvingMake_multi("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun shelvingPriorityUpdate(usuario:String,password:String,priority:String,shelving:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(priority)
|
||||
params.add(shelving)
|
||||
return restClient!!.shelvingPriorityUpdate("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun shelvingPark(usuario:String,password:String,shelving:String,parking:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(shelving)
|
||||
params.add(parking)
|
||||
return restClient!!.shelvingPark("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun shelvingChange(usuario:String,password:String,origen:String,destino:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(origen)
|
||||
params.add(destino)
|
||||
return restClient!!.shelvingChange("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun clearShelvingList(usuario:String,password:String,shelvingFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(shelvingFk)
|
||||
return restClient!!.clearShelvingList("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemShelvingTransfer(usuario:String,password:String,itemFk:String,shelvingFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
params.add(shelvingFk)
|
||||
return restClient!!.itemShelvingTransfer("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun itemShelvingDelete(usuario:String,password:String,itemFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList();
|
||||
params.add(itemFk)
|
||||
return restClient!!.itemShelvingDelete("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.view.feature.historico.model.ItemHistoricoVO
|
||||
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculo
|
||||
import retrofit2.Call
|
||||
|
||||
class GetVehicleControlTimeUserCase (context: Context) : RestClient(context) {
|
||||
|
||||
fun vehicleWarehouseTimeControl_insert(usuario:String,password:String,plateNumber:String,workerFk:String,direction:String) : Call<Boolean> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(plateNumber)
|
||||
params.add(workerFk)
|
||||
params.add(direction)
|
||||
return restClient!!.vehicleWarehouseTimeControl_insert("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
|
||||
fun vehicleWarehouseTimeControl_checkRegister(usuario:String,password:String,userFk:String) : Call<String> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(userFk)
|
||||
return restClient!!.vehicleWarehouseTimeControl_checkRegister("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
fun vehicleWarehouseTimeControl_getHistorical(usuario:String,password:String,PlateNumber:String,nameWorker:String) : Call<List<ItemHistoricoVehiculo>> {
|
||||
val params:ArrayList<String> = ArrayList()
|
||||
params.add(PlateNumber)
|
||||
params.add(nameWorker)
|
||||
return restClient!!.vehicleWarehouseTimeControl_getHistorical("json","1",usuario,password,"application/json",params)
|
||||
}
|
||||
|
||||
}
|
|
@ -1,15 +1,12 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.common.InteceptorListener
|
||||
|
||||
open class RestClient(context:Context) {
|
||||
var restClient:VerdnaturaService? = null
|
||||
var salixClient:SalixService? = null
|
||||
open class RestClient(context: Context, myObserver: InteceptorListener? = null) {
|
||||
var salixClient: SalixService
|
||||
|
||||
init {
|
||||
restClient = ApiUtils.getApiService(context)
|
||||
salixClient = ApiSalixUtils.getApiService()
|
||||
salixClient = ApiSalixUtils.getApiService(context, myObserver)
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.JsonObject
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.presentation.view.feature.login.activity.LoginActivity
|
||||
import org.json.JSONObject
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
abstract class SalixCallback<T>(val context: Context) : Callback<T> {
|
||||
|
||||
override fun onResponse(call: Call<T>, response: Response<T>) {
|
||||
if (response.isSuccessful) {
|
||||
onSuccess(response)
|
||||
} else {
|
||||
try {
|
||||
val errorBodyString = response.errorBody()?.string()
|
||||
if (response.code() == 555) {
|
||||
var message = JSONObject(response.message()).getString("Message")
|
||||
onError(Error(message))
|
||||
} else if (response.code() == 401) {
|
||||
if (!(context as MobileApplication).isLoginRunning()) {
|
||||
val intent = Intent(context, LoginActivity::class.java)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
context.startActivity(intent)
|
||||
exitProcess(0)
|
||||
} else {
|
||||
onError(Error(response.message().toString()))
|
||||
}
|
||||
} else {
|
||||
onError(Error(errorSalixMessage(response, errorBodyString)))
|
||||
}
|
||||
} catch (t: Throwable) {
|
||||
defaultErrorHandler(t)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<T>, t: Throwable) {
|
||||
try {
|
||||
onError(t)
|
||||
} catch (t: Throwable) {
|
||||
defaultErrorHandler(t)
|
||||
}
|
||||
}
|
||||
|
||||
fun defaultErrorHandler(t: Throwable) {
|
||||
//println("ErrorSalixx${t.message}")
|
||||
// (nameofFunction((this)) + t.message).toast(context)
|
||||
(context as MobileApplication).messageToast(
|
||||
true,
|
||||
(nameofFunction((this)) + t.message),
|
||||
isToasted = true
|
||||
)
|
||||
}
|
||||
|
||||
open fun onSuccess(response: Response<T>) {
|
||||
// (nameofFunction((this)) + context.getString(R.string.operationSuccessful)).toast(context)
|
||||
|
||||
(context as MobileApplication).messageToast(
|
||||
isError = false,
|
||||
message = context.getString(R.string.operationSuccessful)
|
||||
)
|
||||
}
|
||||
|
||||
open fun onError(t: Throwable) {
|
||||
throw t
|
||||
}
|
||||
|
||||
private fun errorSalixMessage(response: Response<T>, errorBody: String?): String {
|
||||
|
||||
var myErrorCodeBody = errorBody?.let { errorBodyString
|
||||
->
|
||||
JSONObject(errorBodyString).getJSONObject("error").optString("code")
|
||||
}
|
||||
myErrorCodeBody += errorBody?.let { errorBodyString
|
||||
->
|
||||
JSONObject(errorBodyString).getJSONObject("error").optString("message")
|
||||
}
|
||||
return try {
|
||||
val messageResponse = response.errorBody()!!.string()
|
||||
val jsonObject = Gson().fromJson(messageResponse, JsonObject::class.java)
|
||||
var messageJson = jsonObject?.getAsJsonObject("error")?.get("message")?.asString
|
||||
var messageJsonCode = jsonObject?.getAsJsonObject("error")?.get("code")?.asString ?: ""
|
||||
messageJson ?: "${response.message()}.$myErrorCodeBody.$messageJsonCode"
|
||||
} catch (ex: Exception) {
|
||||
response.message() + ".$myErrorCodeBody."
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun nameofFunction(function: Any): String {
|
||||
return try {
|
||||
function.javaClass.enclosingMethod!!.name + "->"
|
||||
} catch (e: Exception) {
|
||||
"ActivityMain->"
|
||||
}
|
||||
}
|
||||
|
||||
fun getMessageFromAllResponse(callFunction: String, responseMessage: String): String {
|
||||
|
||||
var messageFromError: String = try {
|
||||
val answerError = JSONObject(responseMessage)
|
||||
answerError.get("Message").toString()
|
||||
} catch (e: Exception) {
|
||||
responseMessage
|
||||
}
|
||||
|
||||
return "$messageFromError.\r${"Callback: $callFunction."}"
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.domain.ConstAndValues.TOKEN
|
||||
import es.verdnatura.presentation.common.InteceptorListener
|
||||
import okhttp3.Interceptor
|
||||
import okhttp3.Response
|
||||
import java.io.IOException
|
||||
|
||||
class SalixInterceptor(private val context: Context, private val listener: InteceptorListener?) :
|
||||
Interceptor {
|
||||
|
||||
@Throws(IOException::class)
|
||||
override fun intercept(chain: Interceptor.Chain): Response {
|
||||
|
||||
var request = chain.request()
|
||||
//sergio: condición para que añada o no headers según se vaya quitando de las llamadas
|
||||
//no quitar condición hasta que estén quitados
|
||||
if (request.headers().toString().isEmpty()) {
|
||||
val newRequest =
|
||||
request.newBuilder().addHeader("Content-Type", "application/json").addHeader(
|
||||
"Authorization",
|
||||
(context as MobileApplication).dataStoreApp.readDataStoreKey<String>(TOKEN)
|
||||
).addHeader("Accept-Language", context.getLanguage()).build()
|
||||
|
||||
request = newRequest
|
||||
}
|
||||
if (request.url().toString().contains("renew")) {
|
||||
return chain.proceed(request)
|
||||
} else {
|
||||
listener!!.onInterceptionResult(View.VISIBLE)
|
||||
val response = chain.proceed(request)
|
||||
listener.onInterceptionResult(View.INVISIBLE)
|
||||
return response
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,705 +0,0 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
|
||||
|
||||
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
|
||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemCardVO
|
||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingType
|
||||
import es.verdnatura.presentation.view.feature.buscaritemall.model.ItemLocationAll
|
||||
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
||||
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
|
||||
import es.verdnatura.presentation.view.feature.calidad.model.ItemBuyerVO
|
||||
import es.verdnatura.presentation.view.feature.collection.ItemVO
|
||||
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
|
||||
import es.verdnatura.presentation.view.feature.historico.model.ItemHistoricoVO
|
||||
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculo
|
||||
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
||||
import es.verdnatura.presentation.view.feature.login.model.versionApp
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.*
|
||||
import es.verdnatura.presentation.view.feature.presacador.model.PreSacadorItemVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.MistakeTypeVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyVO
|
||||
import es.verdnatura.presentation.view.feature.shelvingparking.model.ItemShelvingParkingVO
|
||||
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
|
||||
import retrofit2.Call
|
||||
import retrofit2.http.Body
|
||||
import retrofit2.http.Header
|
||||
import retrofit2.http.POST
|
||||
|
||||
|
||||
@JvmSuppressWildcards
|
||||
interface VerdnaturaService {
|
||||
|
||||
//LOGIN ========================================================================>
|
||||
@POST("security/login")
|
||||
fun login(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/version")
|
||||
fun version(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<Boolean>
|
||||
|
||||
@POST("/security/getVersion")
|
||||
fun version2(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<versionApp>
|
||||
|
||||
|
||||
|
||||
//AJUSTES ========================================================================>
|
||||
@POST("almacennew/sector_get")
|
||||
fun getSectors(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String):
|
||||
Call<List<SectorItemVO>>
|
||||
|
||||
|
||||
//PRESACADORES ========================================================================>
|
||||
|
||||
@POST("almacennew/ticketToPrePrepare")
|
||||
fun ticketToPrePrepare(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<PreSacadorItemVO>>
|
||||
|
||||
|
||||
@POST("almacennew/itemPlacementSupplyGetOrder")
|
||||
fun itemPlacementSupplyGetOrder(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<PreSacadorItemVO>>
|
||||
|
||||
@POST("almacennew/itemPlacementSupplyCloseOrder")
|
||||
fun itemPlacementSupplyCloseOrder(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
|
||||
|
||||
|
||||
//SACADORES / CONTROLADORES ========================================================================>
|
||||
@POST("almacennew/collectionGet")
|
||||
fun collectionGet(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String):
|
||||
Call<List<CollectionVO>>
|
||||
|
||||
@POST("almacennew/collectionNew")
|
||||
fun collectionNew(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/collectionTicketGet")
|
||||
fun collectionTicketGet(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<CollectionVO>
|
||||
//sergio: de momento se separa para ir viendo como funciona. El precontrol llamara a collectionTicketGet con otro parametro.
|
||||
@POST("almacennew/collection_getTickets")
|
||||
fun collection_getTickets(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<CollectionVO>
|
||||
|
||||
|
||||
|
||||
@POST("almacennew/saleTrackingReplace")
|
||||
fun saleTrackingReplace(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/itemPlacementSupplyAiming")
|
||||
fun itemPlacementSupplyAiming(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<PlacementSupplyVO>>
|
||||
|
||||
@POST("almacennew/itemShelvingSaleSupplyAdd")
|
||||
fun itemShelvingSaleSupplyAdd(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/itemShelvingPlacementSupplyAdd")
|
||||
fun itemShelvingPlacementSupplyAdd(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/collectionStickerPrint")
|
||||
fun collectionStickerPrint(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/itemGetAvailable")
|
||||
fun itemGetAvailable(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<ItemVO>
|
||||
|
||||
@POST("almacennew/collectionAddItem")
|
||||
fun collectionAddItem(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/saleMove")
|
||||
fun saleMove(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/collectionMissingTrash")
|
||||
fun collectionMissingTrash(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/saleTrackingDel")
|
||||
fun saleTrackingDel(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/collectionUpdateState")
|
||||
fun collectionUpdateState(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/barcodeToItem")
|
||||
fun getIdFromCode(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/collectionIncreaseQuantity")
|
||||
fun collectionIncreaseQuantity(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
|
||||
@POST("almacennew/saleMistakeAdd")
|
||||
fun saleMistakeAdd(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/mistakeType")
|
||||
fun mistakeType(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String):
|
||||
Call<List<MistakeTypeVO>>
|
||||
|
||||
//PASILLEROS ========================================================================>
|
||||
|
||||
//CONSULTAR ARTICULO ========================================================================>
|
||||
@POST("almacennew/itemDiary")
|
||||
fun itemDiary(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemHistoricoVO>>
|
||||
|
||||
@POST("almacennew/item_card")
|
||||
fun getItemCard(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<ItemCardVO>
|
||||
|
||||
@POST("almacennew/get_ItemPackingType")
|
||||
fun getItemPackingType(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemPackingType>>
|
||||
|
||||
|
||||
|
||||
@POST("almacennew/itemStockUpdate")
|
||||
fun itemStockUpdate(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/itemTrash")
|
||||
fun itemTrash(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/item_placement_save")
|
||||
fun itemPlacementSave(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/buy_updateGrouping")
|
||||
fun updateGrouping(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/buy_updatePacking")
|
||||
fun updatePacking(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/update_ItemPackingType")
|
||||
fun updatePackingType(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<Boolean>
|
||||
|
||||
@POST("almacennew/itemSaveMin")
|
||||
fun itemSaveMin(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
|
||||
@POST("almacennew/barcodes_edit")
|
||||
fun barcodes_edit(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
//BUSCAR ITEM ========================================================================>
|
||||
@POST("almacennew/getItemUbication")
|
||||
fun searchItemsUbicador(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemLocationVO>>
|
||||
|
||||
// BUSCAR ITEM ALL
|
||||
@POST("almacennew/getItemUbication")
|
||||
fun searchItemsUbicadorAll(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemLocationAll>>
|
||||
|
||||
//INVENTARIO ========================================================================>
|
||||
|
||||
|
||||
@POST("almacennew/itemShelvingRadar")
|
||||
fun itemShelvingRadar(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemInventaryVO>>
|
||||
|
||||
@POST("almacennew/itemShelving_filterBuyer")
|
||||
fun itemShelvingRadarFilterBuyer(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemInventaryVO>>
|
||||
|
||||
@POST("almacennew/faultsReview")
|
||||
fun faultsReview(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemFaltasVO>>
|
||||
|
||||
@POST("almacennew/faultsReview_isChecked")
|
||||
fun faultsReview_isChecked(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
//SHELVING PARKING ========================================================================>
|
||||
@POST("almacennew/shelvingParking_get")
|
||||
fun shelvingParking_get(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemShelvingParkingVO>>
|
||||
|
||||
|
||||
//CONTROL DE VEHICULOS
|
||||
@POST("almacennew/vehicleWarehouseTimeControl_insert")
|
||||
fun vehicleWarehouseTimeControl_insert(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<Boolean>
|
||||
|
||||
@POST("almacennew/vehicleWarehouseTimeControl_checkRegister")
|
||||
fun vehicleWarehouseTimeControl_checkRegister(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/vehicleWarehouseTimeControl_getHistorical")
|
||||
fun vehicleWarehouseTimeControl_getHistorical(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemHistoricoVehiculo>>
|
||||
|
||||
//UBICADOR ========================================================================>
|
||||
@POST("almacennew/itemShelvingList")
|
||||
fun itemShelvingList(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemUbicadorVO>>
|
||||
|
||||
@POST("almacennew/shelvingPriorityUpdate")
|
||||
fun shelvingPriorityUpdate(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/itemShelvingMake")
|
||||
fun itemShelvingMake(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/itemShelvingMakeEdit")
|
||||
fun itemShelvingMakeEdit(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/itemShelvingMake_multi")
|
||||
fun itemShelvingMake_multi(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<Any>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/shelvingPark")
|
||||
fun shelvingPark(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/shelvingChange")
|
||||
fun shelvingChange(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/clearShelvingList")
|
||||
fun clearShelvingList(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/itemShelvingTransfer")
|
||||
fun itemShelvingTransfer(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/itemShelvingDelete")
|
||||
fun itemShelvingDelete(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
//PALETIZADORES ========================================================================>
|
||||
@POST("almacennew/expeditionTruckList")
|
||||
fun expeditionTruckList(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String):
|
||||
Call<List<ItemExpeditionTruckVO>>
|
||||
|
||||
@POST("almacennew/expeditionTruckAdd")
|
||||
fun expeditionTruckAdd(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/expeditionPalletList")
|
||||
fun expeditionPallet_List(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemPalletVO>>
|
||||
|
||||
@POST("almacennew/expeditionScanAdd")
|
||||
fun expeditionScanAdd(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemScanVO>>
|
||||
|
||||
@POST("almacennew/expeditionScanPut")
|
||||
fun expeditionScanPut(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/checkRouteExpeditionScanPut")
|
||||
fun checkRouteExpeditionScanPut(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
|
||||
|
||||
@POST("almacennew/expeditionPalletView")
|
||||
fun expeditionPalletView(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemPalletViewVO>>
|
||||
|
||||
@POST("almacennew/expeditionPalletDel")
|
||||
fun expeditionPalletDel(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/expeditionScanList")
|
||||
fun expeditionScanList(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemExpeditionScanVO>>
|
||||
|
||||
@POST("almacennew/expeditionScanDel")
|
||||
fun expeditionScanDel(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
@POST("almacennew/expeditionPalletPrintSet")
|
||||
fun expeditionPalletPrintSet(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
|
||||
//CALIDAD
|
||||
@POST("almacennew/itemShelvingBuyerGet")
|
||||
fun itemShelvingBuyerGet(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String):
|
||||
Call<List<BuyerVO>>
|
||||
|
||||
@POST("almacennew/itemShelvingBuyerTask")
|
||||
fun itemShelvingBuyerTask(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<List<ItemBuyerVO>>
|
||||
|
||||
@POST("almacennew/itemShelvingStarsUpdate")
|
||||
fun itemShelvingStarsUpdate(@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>):
|
||||
Call<String>
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package es.verdnatura.domain.model
|
||||
|
||||
data class Filter(
|
||||
val fields: Map<String, Boolean>,
|
||||
val where: Map<String, Map<String, String>>
|
||||
)
|
|
@ -0,0 +1,43 @@
|
|||
package es.verdnatura.domain.userCases
|
||||
|
||||
import es.verdnatura.domain.SalixService
|
||||
import es.verdnatura.presentation.view.feature.packaging.model.NotificationQueue
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.WorkerActionSalix
|
||||
import retrofit2.Call
|
||||
|
||||
class GetItemFromBarcodeUseCase(private val salixService: SalixService) {
|
||||
fun execute(barcode: String): Call<Int?> {
|
||||
return salixService.barcodesToItem(barcode)
|
||||
}
|
||||
}
|
||||
|
||||
class GetItemPrintItemUseCase(private val salixService: SalixService) {
|
||||
fun execute(params: Any?): Call<Unit> {
|
||||
return salixService.printItem(params)
|
||||
}
|
||||
|
||||
fun executeBuyUltimate(params: Any): Call<Long> {
|
||||
return salixService.buyGetLastWithoutInventory(params)
|
||||
}
|
||||
}
|
||||
|
||||
class NotiticationUseCase(private val salixService: SalixService) {
|
||||
fun executeSendNotification(notificationQueue: NotificationQueue): Call<Void> {
|
||||
return salixService.notificationQueues(notificationQueue)
|
||||
}
|
||||
}
|
||||
|
||||
class WorkerActivityUseCase(private val salixService: SalixService) {
|
||||
fun addWorkerActivity(workerActionSalix: WorkerActionSalix): Call<Any> {
|
||||
return salixService.workerActivityAdd(workerActionSalix)
|
||||
}
|
||||
}
|
||||
|
||||
class OperatorUseCase(private val salixService: SalixService) {
|
||||
fun updateOperator(workerFk: Number, update: HashMap<String, Number>): Call<Unit> {
|
||||
return salixService.updateOperator(
|
||||
id = workerFk,
|
||||
params = update
|
||||
)
|
||||
}
|
||||
}
|
|
@ -1,24 +1,59 @@
|
|||
package es.verdnatura.presentation.base
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Bundle
|
||||
import android.os.Looper
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.databinding.ViewDataBinding
|
||||
import com.google.android.gms.location.FusedLocationProviderClient
|
||||
import com.google.android.gms.location.LocationCallback
|
||||
import com.google.android.gms.location.LocationResult
|
||||
import com.google.android.gms.location.Priority
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.domain.toast
|
||||
|
||||
interface LocationUpdateCallback {
|
||||
fun onLocationReceived(location: LocationResult)
|
||||
}
|
||||
|
||||
abstract class BaseActivity<T : ViewDataBinding> : AppCompatActivity() {
|
||||
|
||||
protected lateinit var mobileApplication: MobileApplication
|
||||
private val locationCallback = object : LocationCallback() {
|
||||
override fun onLocationResult(location: LocationResult) {
|
||||
locationUpdateCallback?.onLocationReceived(location)
|
||||
}
|
||||
}
|
||||
|
||||
var locationUpdateCallback: LocationUpdateCallback? = null
|
||||
|
||||
protected lateinit var binding: T
|
||||
|
||||
private lateinit var fusedLocationClient: FusedLocationProviderClient
|
||||
private val locationRequest =
|
||||
com.google.android.gms.location.LocationRequest.Builder(
|
||||
Priority.PRIORITY_LOW_POWER,
|
||||
10000L
|
||||
).apply {
|
||||
setMinUpdateIntervalMillis(5000L)
|
||||
}.build()
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(getLayoutId())
|
||||
initDataBinding()
|
||||
try {
|
||||
initDataBinding()
|
||||
} catch (ex: Exception) {
|
||||
ex.message!!.toast(context = this)
|
||||
}
|
||||
mobileApplication = application as MobileApplication
|
||||
init()
|
||||
}
|
||||
|
||||
|
@ -27,18 +62,61 @@ abstract class BaseActivity<T : ViewDataBinding> : AppCompatActivity() {
|
|||
open fun addBindingVariables() {}
|
||||
abstract fun init()
|
||||
|
||||
|
||||
private fun initDataBinding() {
|
||||
binding = DataBindingUtil.setContentView(this, getLayoutId())
|
||||
binding.lifecycleOwner = this
|
||||
addBindingVariables()
|
||||
}
|
||||
|
||||
fun hideKeyboard(view: View){
|
||||
fun hideKeyboard(view: View) {
|
||||
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
}
|
||||
|
||||
fun checkLocationPermission(): Boolean {
|
||||
return ContextCompat.checkSelfPermission(
|
||||
this,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
) == PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(
|
||||
this,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
) == PackageManager.PERMISSION_GRANTED
|
||||
}
|
||||
|
||||
fun requestLocationUpdates(
|
||||
fusedLocationClient: FusedLocationProviderClient
|
||||
) {
|
||||
|
||||
}
|
||||
if (ActivityCompat.checkSelfPermission(
|
||||
this,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(
|
||||
this,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION
|
||||
) != PackageManager.PERMISSION_GRANTED
|
||||
) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
fusedLocationClient.requestLocationUpdates(
|
||||
locationRequest,
|
||||
locationCallback,
|
||||
Looper.getMainLooper()
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
if (::fusedLocationClient.isInitialized) {
|
||||
fusedLocationClient.removeLocationUpdates(locationCallback)
|
||||
}
|
||||
locationUpdateCallback = null
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
fun stopLocationUpdates() {
|
||||
locationCallback?.let {
|
||||
fusedLocationClient.removeLocationUpdates(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,10 @@
|
|||
package es.verdnatura.presentation.base
|
||||
|
||||
import android.Manifest
|
||||
import android.app.AlarmManager
|
||||
import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.SharedPreferences
|
||||
import android.content.pm.PackageInfo
|
||||
import android.content.pm.PackageManager
|
||||
import android.media.AudioManager
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.speech.RecognitionListener
|
||||
import android.speech.RecognizerIntent
|
||||
import android.speech.SpeechRecognizer
|
||||
import android.speech.tts.TextToSpeech
|
||||
import android.speech.tts.UtteranceProgressListener
|
||||
import android.util.Log
|
||||
import android.provider.Settings
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
|
@ -23,64 +12,33 @@ import androidx.annotation.LayoutRes
|
|||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.databinding.ViewDataBinding
|
||||
import androidx.fragment.app.Fragment
|
||||
import es.verdnatura.domain.toast
|
||||
import es.verdnatura.presentation.common.mediaCurrentVolume
|
||||
import es.verdnatura.presentation.common.mediaMaxVolume
|
||||
import androidx.room.Room
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.ToolbarFragmentBinding
|
||||
import es.verdnatura.db.DeliveryDatabase
|
||||
import es.verdnatura.db.MapTypeConverter
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import org.koin.androidx.viewmodel.ext.android.viewModel
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
|
||||
abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelClass: KClass<V>) :
|
||||
Fragment(), TextToSpeech.OnInitListener , RecognitionListener{
|
||||
|
||||
protected val TAG="VERDNATURA"
|
||||
protected val PREFS_USER = "es.verdnatura.user.prefs"
|
||||
protected val USERFK = "userFk"
|
||||
protected val USER = "user"
|
||||
protected val PASSWORD = "password"
|
||||
protected val TOKEN = "token"
|
||||
protected val SECTORDESCRIP = "sectordescrip"
|
||||
protected val SECTORFK = "sectorFk"
|
||||
protected val WAREHOUSEFK = "warehouseFk"
|
||||
protected val RECORDAR = "recordar"
|
||||
protected val VOZ = "voz"
|
||||
//nuevo campo número carros ajustes y campos para guardar el buyerid y buyernickname
|
||||
protected val BUYER = "buyernickname"
|
||||
protected val BUYERID="buyerid"
|
||||
protected val CARRO="carro"
|
||||
protected val WAREHOUSEFK_DEFAULT=60
|
||||
|
||||
abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(
|
||||
viewModelClass: KClass<V>
|
||||
) : Fragment() {
|
||||
protected lateinit var mobileApplication: MobileApplication
|
||||
protected val viewModel: V by viewModel(viewModelClass)
|
||||
protected lateinit var binding: T
|
||||
private var isOnReadyForSpeech = false
|
||||
protected lateinit var ma: MainActivity
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
|
||||
if ((requireActivity().componentName).toString().contains("MainActivity")) {
|
||||
|
||||
private var textToSpeech: TextToSpeech? = null
|
||||
private var mAudioManager:AudioManager? = null
|
||||
protected var mSpeechRecognizer: SpeechRecognizer? = null
|
||||
private var mSpeechRecognizerIntent: Intent? = null
|
||||
|
||||
protected val NEW_COLLECTION = 0
|
||||
protected val LISTO = 1
|
||||
protected val CANCEL = 2
|
||||
protected val VOLVER = 3
|
||||
protected val REPITE = 4
|
||||
protected val OTRO = 5
|
||||
protected val FALTA = 6
|
||||
protected val ERROR = -1
|
||||
|
||||
val allowedStrings =
|
||||
Arrays.asList(
|
||||
"cero", "uno", "dos", "tres", "cuatro", "cinco", "seis", "siete",
|
||||
"ocho", "nueve", "diez", "once", "doce", "trece", "catorce",
|
||||
"quince", "dieziseis", "diezisiete", "dieziocho", "diezinueve", "veinte",
|
||||
"treinta", "cuarenta", "cincuenta", "sesenta", "setenta", "ochenta", "noventa",
|
||||
"cien", "mil"
|
||||
)
|
||||
|
||||
ma = activity as MainActivity
|
||||
}
|
||||
mobileApplication = requireActivity().application as MobileApplication
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
|
@ -88,16 +46,14 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
savedInstanceState: Bundle?
|
||||
): View? = inflater.inflate(getLayoutId(), container, false)
|
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
initDataBinding()
|
||||
getBundleArguments()
|
||||
observeViewModel()
|
||||
runSound()
|
||||
requestRecordAudioPermission()
|
||||
init()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@LayoutRes
|
||||
abstract fun getLayoutId(): Int
|
||||
|
@ -106,361 +62,119 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
open fun getBundleArguments() {}
|
||||
open fun addBindingVariables() {}
|
||||
|
||||
open fun setSpeak() {
|
||||
//VOZ
|
||||
textToSpeech = TextToSpeech(requireContext(),this)
|
||||
mAudioManager = requireActivity().getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
}
|
||||
|
||||
open fun restartapp(f : Fragment){
|
||||
val mStartActivity = Intent(context, f::class.java)
|
||||
val mPendingIntentId = 123456
|
||||
val mPendingIntent = PendingIntent.getActivity(
|
||||
context,
|
||||
mPendingIntentId,
|
||||
mStartActivity,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT
|
||||
)
|
||||
val mgr = context!!.getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
||||
mgr[AlarmManager.RTC, System.currentTimeMillis() + 100] = mPendingIntent
|
||||
System.exit(0)
|
||||
}
|
||||
|
||||
|
||||
open fun initialize(){
|
||||
//ESCUCHA
|
||||
try {
|
||||
mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(requireContext())
|
||||
mSpeechRecognizerIntent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH)
|
||||
mSpeechRecognizerIntent!!.putExtra(
|
||||
RecognizerIntent.EXTRA_LANGUAGE_MODEL,
|
||||
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM
|
||||
)
|
||||
mSpeechRecognizerIntent!!.putExtra(
|
||||
RecognizerIntent.EXTRA_LANGUAGE,
|
||||
Locale.getDefault()
|
||||
)
|
||||
mSpeechRecognizerIntent!!.putExtra(RecognizerIntent.EXTRA_PREFER_OFFLINE, false)
|
||||
mSpeechRecognizer?.setRecognitionListener(this)
|
||||
isOnReadyForSpeech = false;
|
||||
startListening()
|
||||
}catch (e:Exception){
|
||||
cancelSpeech()
|
||||
}
|
||||
}
|
||||
|
||||
private fun initDataBinding() {
|
||||
binding = DataBindingUtil.bind<T>(view!!)!!
|
||||
binding = DataBindingUtil.bind<T>(requireView())!!
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
binding.setVariable(BR.viewModel, this@BaseFragment.viewModel)
|
||||
lifecycle.addObserver(this@BaseFragment.viewModel)
|
||||
addBindingVariables()
|
||||
}
|
||||
|
||||
fun textScannedFilterDouble(textScanned: String): String {
|
||||
|
||||
override fun onInit(status: Int) {
|
||||
if (status == TextToSpeech.SUCCESS) {
|
||||
val spanish = Locale("es", "ES")
|
||||
textToSpeech!!.language = spanish
|
||||
textToSpeech!!.setOnUtteranceProgressListener(object: UtteranceProgressListener() {
|
||||
override fun onDone(utteranceId: String?) {
|
||||
Log.i("SPEEAK","on done")
|
||||
requireActivity().runOnUiThread(Runnable {
|
||||
if (mSpeechRecognizer != null){
|
||||
mSpeechRecognizer!!.destroy()
|
||||
mSpeechRecognizer = null
|
||||
}
|
||||
initialize()
|
||||
if (textScanned.length > 13) {
|
||||
val size = textScanned.length
|
||||
if (textScanned.substring((size / 2), size) == textScanned.substring(0, size / 2)
|
||||
) {
|
||||
return textScanned.substring(0, size / 2)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
override fun onError(utteranceId: String?) {
|
||||
"Error to speak".toast(requireContext())
|
||||
}
|
||||
|
||||
override fun onStart(utteranceId: String?) {
|
||||
Log.i("SPEEAK","on start")
|
||||
runSound()
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}else{
|
||||
"La voz no se ha podido iniciar".toast(requireContext())
|
||||
}
|
||||
}
|
||||
|
||||
private fun runSound(){
|
||||
// Get the maximum media/music volume
|
||||
val maxVolume = mAudioManager?.mediaMaxVolume
|
||||
// mAudioManager?.setMediaVolume(maxVolume!!)
|
||||
}
|
||||
|
||||
private fun muteSound() {
|
||||
if (mAudioManager?.mediaCurrentVolume != 0){
|
||||
// mAudioManager?.setMediaVolume(0)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun speak(frase:String) {
|
||||
textToSpeech!!.speak(frase, TextToSpeech.QUEUE_FLUSH, null, "frase")
|
||||
}
|
||||
|
||||
open fun startListening() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
muteSound()
|
||||
}
|
||||
mSpeechRecognizer!!.startListening(mSpeechRecognizerIntent)
|
||||
}
|
||||
|
||||
|
||||
override fun onReadyForSpeech(params: Bundle?) {
|
||||
isOnReadyForSpeech = true;
|
||||
Log.i("Speech", "onReadyForSpeech")
|
||||
}
|
||||
|
||||
override fun onBeginningOfSpeech() {
|
||||
Log.i("Speech", "onBeginningOfSpeech")
|
||||
}
|
||||
|
||||
override fun onRmsChanged(rmsdB: Float) {}
|
||||
|
||||
override fun onBufferReceived(buffer: ByteArray?) {
|
||||
Log.i("Speech", "onBufferReceived")
|
||||
}
|
||||
|
||||
override fun onEndOfSpeech() {
|
||||
Log.i("Speech", "onEndOfSpeech")
|
||||
}
|
||||
|
||||
override fun onError(error: Int) {
|
||||
if (!isOnReadyForSpeech && error == SpeechRecognizer.ERROR_NO_MATCH) {
|
||||
("Problemas con la velocidad de internet. No se puede usar la voz").toast(requireContext())
|
||||
return
|
||||
}else{
|
||||
Log.i("Speech", "onError "+error)
|
||||
if (mSpeechRecognizer != null) mSpeechRecognizer!!.destroy()
|
||||
mSpeechRecognizer = null
|
||||
initialize()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onResults(results: Bundle) {}
|
||||
|
||||
override fun onPartialResults(partialResults: Bundle?) {
|
||||
Log.i("Speech", "onPartialResults")
|
||||
}
|
||||
|
||||
override fun onEvent(eventType: Int, params: Bundle?) {
|
||||
Log.i("Speech", "onEvent")
|
||||
}
|
||||
|
||||
open fun checkText(text: String): Int {
|
||||
|
||||
//check for nuevo
|
||||
val nuevo = getMatch(text, "nuevo")
|
||||
|
||||
//check for listo
|
||||
val listo = getMatch(text, "listo")
|
||||
|
||||
//check for cancelar
|
||||
val cancelar = getMatch(text, "cancelar")
|
||||
|
||||
//check for volver
|
||||
val volver = getMatch(text, "volver")
|
||||
|
||||
//check for repite
|
||||
val repite = getMatch(text, "repite")
|
||||
|
||||
//check for siguiente
|
||||
val otro = getMatch(text, "otro")
|
||||
|
||||
//check for FALTA
|
||||
val falta = getMatch(text, "falta")
|
||||
val words = IntArray(7)
|
||||
words[0] = nuevo
|
||||
words[1] = listo
|
||||
words[2] = cancelar
|
||||
words[3] = volver
|
||||
words[4] = repite
|
||||
words[5] = otro
|
||||
words[6] = falta
|
||||
return getMax(words)
|
||||
}
|
||||
|
||||
private fun getMax(a: IntArray): Int {
|
||||
var max = a[0]
|
||||
var pos = 0
|
||||
for (i in a.indices) {
|
||||
if (a[i] > max) {
|
||||
max = a[i]
|
||||
pos = i
|
||||
}
|
||||
|
||||
}
|
||||
return if (max < 80) {
|
||||
-1
|
||||
} else pos
|
||||
return textScanned
|
||||
|
||||
}
|
||||
|
||||
private fun getMatch(a: String, b: String): Int {
|
||||
var count = 0
|
||||
val cha = a.toCharArray()
|
||||
val chb = b.toCharArray()
|
||||
for (i in cha) {
|
||||
for (x in chb) {
|
||||
if (x == i) {
|
||||
count += 1
|
||||
break
|
||||
}
|
||||
fun getTooltip(image: Int): String {
|
||||
|
||||
return when (image) {
|
||||
//itemCard
|
||||
R.drawable.ic_autorenew_black_24dp -> {
|
||||
getString(R.string.reloadItemData)
|
||||
}
|
||||
}
|
||||
val numChar = a.length
|
||||
if (numChar != 0)
|
||||
return count * 100 / numChar
|
||||
else
|
||||
return 100
|
||||
}
|
||||
|
||||
/* private fun requestReadPhoneStatePermission(){
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
val requiredPermission: String = Manifest.permission.READ_PHONE_STATE
|
||||
val res = context!!.checkCallingOrSelfPermission(requiredPermission)
|
||||
if (res == PackageManager.PERMISSION_DENIED) {
|
||||
requestPermissions(arrayOf(requiredPermission), 102)
|
||||
R.drawable.ic_history_black_24dp -> getString(R.string.showHistoricalItem)
|
||||
//presacador
|
||||
R.drawable.ic_local_parking_black_24dp -> getString(R.string.allowParking)
|
||||
//collection
|
||||
R.drawable.ic_print_black_24dp -> getString(R.string.printTicket)
|
||||
R.drawable.ic_playlist_add_black_24dp -> getString(R.string.addItem)
|
||||
R.drawable.ic_worker -> getString(R.string.showFacePicker)
|
||||
R.drawable.car -> getString(R.string.allowSelectVehicle)
|
||||
R.drawable.car_off -> getString(R.string.allowTakeoffVehicle)
|
||||
//REPETIDO:R.drawable.ic_history_black_24dp->"Realiza llamada al sacador"
|
||||
//sacador
|
||||
R.drawable.ic_add_black_24dp -> getString(R.string.newCollection)
|
||||
//REPETIDO: R.drawable.car->"Permite coger vehículo"
|
||||
//ubicador:
|
||||
//REPETIDO: R.drawable.ic_add_black_24dp->"Genera colección para sacar"
|
||||
//REPETIDO: ic_autorenew_black_24dp
|
||||
//historico articulo
|
||||
R.drawable.ic_transaction -> getString(R.string.showFilter)
|
||||
R.drawable.alpha_f_circle_outline -> getString(R.string.showFaults)
|
||||
R.drawable.alpha_b_circle_outline -> getString(R.string.showTrash)
|
||||
R.drawable.filter_outline -> getString(R.string.filterFlower)
|
||||
R.drawable.ic_mode_edit_black_24dp -> getString(R.string.allowChangeShelving)
|
||||
R.drawable.ic_delete_forever_black_24dp -> getString(R.string.deleteAllitems)
|
||||
R.drawable.ic_flash_auto_black_24dp -> getString(R.string.allowAutomaticAddItem)
|
||||
R.drawable.ic_logo_salix -> getString(R.string.accessSalix)
|
||||
R.drawable.ic_eye_ui -> getString(R.string.icViewCollection)
|
||||
R.drawable.ic_collection -> getString(R.string.icViewCollection)
|
||||
R.drawable.ic_ubicator_check -> getString(R.string.checkerUbication)
|
||||
R.drawable.ic_delivery_truck -> getString(R.string.loadRoute)
|
||||
R.drawable.ic_confirm -> getString(R.string.confirmDescription)
|
||||
R.drawable.camion -> getString(R.string.openLoadingConsignee)
|
||||
R.drawable.exit -> getString(R.string.exitScreen)
|
||||
R.drawable.ic_image_upload -> getString(R.string.messageUpload)
|
||||
R.drawable.expedition_find -> getString(R.string.showLogExpedition)
|
||||
R.drawable.ic_info_refresh -> getString(R.string.udpateRoutes)
|
||||
R.drawable.ic_info_delivery -> getString(R.string.info)
|
||||
R.drawable.ic_filter_inventory -> getString(R.string.filterNoReview)
|
||||
R.drawable.ic_remove_checks -> getString(R.string.resetReviewItems)
|
||||
R.drawable.ic_eye_inventory -> getString(R.string.inventoryShowParking)
|
||||
R.drawable.ic_sort -> getString(R.string.sortRouteSalix)
|
||||
R.drawable.ic_sign_ticket -> getString(R.string.signed)
|
||||
R.drawable.ic_send -> getString(R.string.sendDriverRoute)
|
||||
R.drawable.ic_add_multiple -> getString(R.string.addItemMultipleShelvings)
|
||||
R.drawable.ic_clean_shelving -> getString(R.string.activityOrganize)
|
||||
R.drawable.ic_booking -> getString(R.string.bookingNewSalesCollection)
|
||||
else -> {
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
fun hideBackButton(tool: ToolbarFragmentBinding) {
|
||||
tool.backButton.visibility = View.INVISIBLE
|
||||
}
|
||||
|
||||
private fun requestRecordAudioPermission() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
val requiredPermission: String = Manifest.permission.RECORD_AUDIO
|
||||
val res = context!!.checkCallingOrSelfPermission(requiredPermission)
|
||||
// If the user previously denied this permission then show a message explaining why
|
||||
// this permission is needed
|
||||
if (res == PackageManager.PERMISSION_DENIED) {
|
||||
requestPermissions(arrayOf(requiredPermission), 101)
|
||||
}
|
||||
fun getInfoVersionNameApp(): String {
|
||||
val manager: PackageManager = requireContext().packageManager
|
||||
val info: PackageInfo = manager.getPackageInfo(requireContext().packageName, 0)
|
||||
mobileApplication.versionName = info.versionName.toString()
|
||||
return mobileApplication.versionName
|
||||
}
|
||||
|
||||
fun getDevicePDA(): Int? {
|
||||
return try {
|
||||
Settings.Global.getString(
|
||||
mobileApplication.contentResolver, Settings.Global.DEVICE_NAME
|
||||
).toInt()
|
||||
} catch (ex: Exception) {
|
||||
null
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun cancelSpeech(){
|
||||
if (mSpeechRecognizer != null){
|
||||
mSpeechRecognizer!!.destroy()
|
||||
mSpeechRecognizer = null
|
||||
}
|
||||
}
|
||||
fun saveBuyer(buyernickname: String) {
|
||||
val prefs: SharedPreferences = activity!!.getSharedPreferences(PREFS_USER, 0)
|
||||
val editor = prefs.edit()
|
||||
editor.putString(BUYER, buyernickname)
|
||||
editor.apply()
|
||||
}
|
||||
fun saveBuyerId(buyerid: String) {
|
||||
val prefs: SharedPreferences = activity!!.getSharedPreferences(PREFS_USER, 0)
|
||||
val editor = prefs.edit()
|
||||
editor.putString(BUYERID, buyerid)
|
||||
editor.apply()
|
||||
}
|
||||
|
||||
fun getIMEI() :String {
|
||||
val prefs: SharedPreferences = activity!!.getSharedPreferences(PREFS_USER,0)
|
||||
val imei = prefs.getString("IMEI","0")
|
||||
return imei.toString()
|
||||
}
|
||||
|
||||
|
||||
/*open fun wordToNumber(input: String?): Int {
|
||||
var input = input
|
||||
var isValidInput = true
|
||||
var result = 0
|
||||
var finalResult = 0
|
||||
if (input != null && input.length > 0) {
|
||||
input = input.replace("-".toRegex(), " ")
|
||||
input = input.toLowerCase().replace(" and".toRegex(), " ")
|
||||
val splittedParts =
|
||||
input.trim { it <= ' ' }.split("\\s+".toRegex()).toTypedArray()
|
||||
for (str in splittedParts) {
|
||||
if (!es.verdnatura.warehouse.UTILS.Utils.allowedStrings.contains(str)) {
|
||||
isValidInput = false
|
||||
return -1
|
||||
}
|
||||
}
|
||||
if (isValidInput) {
|
||||
for (str in splittedParts) {
|
||||
if (str.equals("cero", ignoreCase = true)) {
|
||||
result += 0
|
||||
} else if (str.equals("uno", ignoreCase = true)) {
|
||||
result += 1
|
||||
} else if (str.equals("dos", ignoreCase = true)) {
|
||||
result += 2
|
||||
} else if (str.equals("tres", ignoreCase = true)) {
|
||||
result += 3
|
||||
} else if (str.equals("cuatro", ignoreCase = true)) {
|
||||
result += 4
|
||||
} else if (str.equals("cinco", ignoreCase = true)) {
|
||||
result += 5
|
||||
} else if (str.equals("seis", ignoreCase = true)) {
|
||||
result += 6
|
||||
} else if (str.equals("siete", ignoreCase = true)) {
|
||||
result += 7
|
||||
} else if (str.equals("ocho", ignoreCase = true)) {
|
||||
result += 8
|
||||
} else if (str.equals("nueve", ignoreCase = true)) {
|
||||
result += 9
|
||||
} else if (str.equals("diez", ignoreCase = true)) {
|
||||
result += 10
|
||||
} else if (str.equals("once", ignoreCase = true)) {
|
||||
result += 11
|
||||
} else if (str.equals("doce", ignoreCase = true)) {
|
||||
result += 12
|
||||
} else if (str.equals("trece", ignoreCase = true)) {
|
||||
result += 13
|
||||
} else if (str.equals("catorce", ignoreCase = true)) {
|
||||
result += 14
|
||||
} else if (str.equals("quince", ignoreCase = true)) {
|
||||
result += 15
|
||||
} else if (str.equals("dieziseis", ignoreCase = true)) {
|
||||
result += 16
|
||||
} else if (str.equals("diezisiete", ignoreCase = true)) {
|
||||
result += 17
|
||||
} else if (str.equals("dieziocho", ignoreCase = true)) {
|
||||
result += 18
|
||||
} else if (str.equals("diezinueve", ignoreCase = true)) {
|
||||
result += 19
|
||||
} else if (str.equals("veinte", ignoreCase = true)) {
|
||||
result += 20
|
||||
} else if (str.equals("treinta", ignoreCase = true)) {
|
||||
result += 30
|
||||
} else if (str.equals("cuarenta", ignoreCase = true)) {
|
||||
result += 40
|
||||
} else if (str.equals("cincuenta", ignoreCase = true)) {
|
||||
result += 50
|
||||
} else if (str.equals("sesenta", ignoreCase = true)) {
|
||||
result += 60
|
||||
} else if (str.equals("setenta", ignoreCase = true)) {
|
||||
result += 70
|
||||
} else if (str.equals("ochenta", ignoreCase = true)) {
|
||||
result += 80
|
||||
} else if (str.equals("noventa", ignoreCase = true)) {
|
||||
result += 90
|
||||
} else if (str.equals("cien", ignoreCase = true)) {
|
||||
result *= 100
|
||||
} else if (str.equals("mil", ignoreCase = true)) {
|
||||
result *= 1000
|
||||
finalResult += result
|
||||
result = 0
|
||||
}
|
||||
}
|
||||
finalResult += result
|
||||
return finalResult
|
||||
}
|
||||
}
|
||||
return finalResult
|
||||
}*/
|
||||
}
|
||||
|
||||
fun database(myContext: Context): DeliveryDatabase {
|
||||
return Room.databaseBuilder(
|
||||
myContext,
|
||||
DeliveryDatabase::class.java, "expediciones.db"
|
||||
).addTypeConverter(MapTypeConverter())
|
||||
.build()
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,19 @@
|
|||
package es.verdnatura.presentation.base
|
||||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import androidx.lifecycle.ViewModel
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.domain.SalixService
|
||||
|
||||
abstract class BaseViewModel : ViewModel, LifecycleObserver {
|
||||
lateinit var app: MobileApplication
|
||||
lateinit var salix: SalixService
|
||||
|
||||
constructor() : super()
|
||||
constructor(context: Context) : super() {
|
||||
app = context as MobileApplication
|
||||
salix = app.salix
|
||||
}
|
||||
}
|
||||
|
||||
abstract class BaseViewModel : ViewModel(), LifecycleObserver
|
|
@ -0,0 +1,13 @@
|
|||
package es.verdnatura.presentation.base
|
||||
|
||||
import android.app.Application
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import androidx.lifecycle.ViewModel
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.domain.SalixService
|
||||
|
||||
abstract class BaseViewModelCompose(application: Application) : ViewModel(), LifecycleObserver {
|
||||
protected val app: MobileApplication = application as MobileApplication
|
||||
protected val salix: SalixService = app.salix
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.databinding.ItemGeneralRowBinding
|
||||
|
||||
class GeneralAdapter(
|
||||
private var items: List<GeneralItem>,
|
||||
private val onDeleteItemRowClickListener: OnGeneralItemRowClickListener? = null,
|
||||
private var showDelete: Boolean = false,
|
||||
private val onRowClickListener: OnGeneralRowClickListener? = null
|
||||
) : RecyclerView.Adapter<GeneralAdapter.ItemHolder>() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
|
||||
return ItemHolder(
|
||||
ItemGeneralRowBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount() = items.size
|
||||
|
||||
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||
holder.bind(items[position])
|
||||
|
||||
}
|
||||
|
||||
inner class ItemHolder(
|
||||
val binding: ItemGeneralRowBinding
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
//private val res = binding.root.context.resources
|
||||
fun bind(item: GeneralItem) {
|
||||
binding.apply {
|
||||
this.item = item
|
||||
if (showDelete) itemImage.visibility = View.VISIBLE
|
||||
else itemImage.visibility = View.GONE
|
||||
|
||||
itemCode.visibility = View.GONE
|
||||
}
|
||||
binding.itemImage.setOnClickListener {
|
||||
onDeleteItemRowClickListener?.onGeneralItemRowClickListener(item)
|
||||
}
|
||||
binding.itemCode.setOnClickListener {
|
||||
onRowClickListener?.onRowClickListener(item)
|
||||
}
|
||||
binding.itemTitle.setOnClickListener {
|
||||
onRowClickListener?.onRowClickListener(item)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun updateItems(list: List<GeneralItem>) {
|
||||
items = list
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun setShowDelete(hasVisibility: Boolean) {
|
||||
showDelete = hasVisibility
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
import android.graphics.Rect
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
|
||||
class ItemDescorationCustomized(private val verticalSpaceHeight: Int) : RecyclerView.ItemDecoration() {
|
||||
|
||||
override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
|
||||
outRect.bottom = verticalSpaceHeight
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
import android.content.Context
|
||||
import android.net.ConnectivityManager
|
||||
import android.net.Network
|
||||
import android.net.NetworkCapabilities
|
||||
import android.net.NetworkRequest
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
|
||||
class NetworkUtilsApp(context: Context, applicationContext: MobileApplication) {
|
||||
|
||||
private val connectivityManager: ConnectivityManager =
|
||||
context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
|
||||
private val networkCallback: ConnectivityManager.NetworkCallback =
|
||||
object : ConnectivityManager.NetworkCallback() {
|
||||
override fun onAvailable(network: Network) {
|
||||
applicationContext.hasNetwork = true
|
||||
}
|
||||
|
||||
override fun onLost(network: Network) {
|
||||
applicationContext.hasNetwork = false
|
||||
(context as MainActivity).messageWithSound(
|
||||
context.getString(R.string.sin_internet),
|
||||
true,
|
||||
false
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun registerNetworkCallback() {
|
||||
val networkRequest = NetworkRequest.Builder()
|
||||
.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
|
||||
.build()
|
||||
connectivityManager.registerNetworkCallback(networkRequest, networkCallback)
|
||||
}
|
||||
|
||||
fun unregisterNetworkCallback() {
|
||||
connectivityManager.unregisterNetworkCallback(networkCallback)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
import android.app.AlertDialog
|
||||
import android.content.Context
|
||||
import android.text.InputType
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.domain.toast
|
||||
import es.verdnatura.presentation.view.component.CustomDialogInput
|
||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
||||
|
||||
class PrinterDialogManager(private val context: Context) {
|
||||
fun showPrintDialog(
|
||||
item: Long,
|
||||
itemName: String,
|
||||
onPrintClick: (Long, String, Int?, Int) -> Unit,
|
||||
onPrintChange: (String) -> Unit
|
||||
) {
|
||||
val customDialogList = CustomDialogList(context)
|
||||
customDialogList.getEditText().setRawInputType(InputType.TYPE_CLASS_NUMBER)
|
||||
customDialogList.getEditTextThree().setRawInputType(InputType.TYPE_CLASS_NUMBER)
|
||||
|
||||
customDialogList.setTitle(context.getString(R.string.itemName, item, itemName))
|
||||
.setOkButton(context.getString(R.string.printQr)) {
|
||||
handlePrintClick(item, customDialogList, onPrintClick, "qr")
|
||||
customDialogList.dismiss()
|
||||
}.setOkTwoButton(context.getString(R.string.printBarcode)) {
|
||||
handlePrintClick(item, customDialogList, onPrintClick, "barcode")
|
||||
customDialogList.dismiss()
|
||||
//Tarea 7823
|
||||
}.setOkThreeButton(context.getString(R.string.changePrinter)) {
|
||||
readQrPrinter(onPrintChange)
|
||||
}.setKoButton(context.getString(R.string.cancel)) {
|
||||
customDialogList.dismiss()
|
||||
}.setHintValueThree(context.getString(R.string.labelNumber))
|
||||
.setHintValue(context.getString(R.string.optionalPacking)).setTextThree(View.VISIBLE)
|
||||
.show()
|
||||
customDialogList.getFocusThree()
|
||||
}
|
||||
|
||||
private fun readQrPrinter(onPrintChange: (String) -> Unit) {
|
||||
val customDialogInput = CustomDialogInput(context)
|
||||
|
||||
customDialogInput.setTitle(context.getString(R.string.changePrinter))
|
||||
.setDescription(context.getString(R.string.scanQrPrinter))
|
||||
.setOkButton(context.getString(R.string.save)) {
|
||||
onPrintChange(customDialogInput.getValue())
|
||||
customDialogInput.dismiss()
|
||||
|
||||
}.setKoButton(context.getString(R.string.cancel)) {
|
||||
customDialogInput.dismiss()
|
||||
}.setValue("").show()
|
||||
customDialogInput.getEditText().requestFocus()
|
||||
customDialogInput.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
onPrintChange(customDialogInput.getValue())
|
||||
println("printerrr ${customDialogInput.getValue()}")
|
||||
customDialogInput.dismiss()
|
||||
return@setOnEditorActionListener true
|
||||
}
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private fun handlePrintClick(
|
||||
item: Long,
|
||||
customDialogList: CustomDialogList,
|
||||
onPrintClick: (Long, String, Int?, Int) -> Unit,
|
||||
labelType: String
|
||||
) {
|
||||
try {
|
||||
onPrintClick(
|
||||
item,
|
||||
labelType,
|
||||
if (customDialogList.getValue().isEmpty()) null else customDialogList.getValue()
|
||||
.toInt(),
|
||||
if (customDialogList.getValueOptional()
|
||||
.isEmpty()
|
||||
) 1 else customDialogList.getValueOptional().toInt()
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
} catch (ex: Exception) {
|
||||
context.getString(R.string.errorInput).toast(context)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class LabelDialogHelper(private val context: Context) {
|
||||
fun showLabelDialog(
|
||||
onItemSelected: (Int) -> Unit,
|
||||
) {
|
||||
val builder = AlertDialog.Builder(context)
|
||||
builder.setTitle(context.getString(R.string.selectLabeltoPrint))
|
||||
val labelCount = Array(10) { (it + 1).toString() }
|
||||
builder.setItems(labelCount) { _, which ->
|
||||
onItemSelected(which + 1)
|
||||
}
|
||||
builder.create().show()
|
||||
}
|
||||
}
|
|
@ -1,7 +1,52 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
class ResponseItemVO (
|
||||
var response:String = "",
|
||||
class ResponseItemVO(
|
||||
var response: String = "",
|
||||
var isError: Boolean = false,
|
||||
var errorMessage: String = ""
|
||||
)
|
||||
var errorMessage: String = "",
|
||||
var codeError: Int = 0,
|
||||
var routine: String = "",
|
||||
var data: Any? = null
|
||||
)
|
||||
|
||||
data class ResponseSign(
|
||||
val fileToSign: String = "",
|
||||
val isError: Boolean = false,
|
||||
val message: String = ""
|
||||
)
|
||||
|
||||
class ResponseHasOlder(
|
||||
var shelvingFkIn: String,
|
||||
var parking: String? = null,
|
||||
var shelvingFkOut: String? = null,
|
||||
var itemFk: Int? = null,
|
||||
var action: Action,
|
||||
var hasOlder: Boolean = false
|
||||
)
|
||||
|
||||
class ResponseItemExistsItemShelvingSale(
|
||||
var exists: Boolean,
|
||||
var position: Int,
|
||||
var quantity: Int
|
||||
)
|
||||
|
||||
class ResponseItemNumber(
|
||||
var response: Int? = null,
|
||||
var isError: Boolean = false,
|
||||
var errorMessage: String = "",
|
||||
var codeError: Int = 0
|
||||
)
|
||||
|
||||
class ResponseItemMachineControl(
|
||||
var response: String = "",
|
||||
var type: String
|
||||
)
|
||||
|
||||
class GeneralItem(
|
||||
var code: String? = "",
|
||||
var text: String? = ""
|
||||
)
|
||||
|
||||
enum class Action {
|
||||
PARKINEAR, TRANSFERIR
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
class ItemBarCodeSalix(
|
||||
var itemFk: Int,
|
||||
var code: String
|
||||
)
|
||||
|
||||
data class SaleTrackingReplaceSalix(
|
||||
var saleFk: Int,
|
||||
var originalQuantity: Int,
|
||||
var code: String,
|
||||
var isChecked: Boolean,
|
||||
var buyFk: Long,
|
||||
var isScanned: Boolean,
|
||||
)
|
||||
|
||||
data class SaleTrackingSalix(
|
||||
var saleFk: Int,
|
||||
var originalQuantity: Int,
|
||||
var code: String,
|
||||
var isChecked: Boolean,
|
||||
var buyFk: Long,
|
||||
var isScanned: Boolean?,
|
||||
var quantity: Int,
|
||||
var itemShelvingFk: Int
|
||||
|
||||
)
|
||||
|
||||
data class PackingSiteSalix(
|
||||
val ticketFk: Number,
|
||||
val workerFk: Number
|
||||
|
||||
)
|
||||
|
||||
data class ItemShelvingSaleSalix(
|
||||
var id: Int,
|
||||
var quantity: Int,
|
||||
var isItemShelvingSaleEmpty: Boolean?
|
||||
)
|
||||
|
||||
data class ItemShelving(
|
||||
var id: Int,
|
||||
var itemFk: Int,
|
||||
var shelvingFk: String,
|
||||
var position: Int,
|
||||
var quantity: Int,
|
||||
var visible: Int? = null,
|
||||
var available: Int? = null
|
||||
|
||||
)
|
||||
|
||||
data class ItemShelvingSalix(
|
||||
var visible: Int,
|
||||
var packing: Int?,
|
||||
var grouping: Int?,
|
||||
var available: Int?
|
||||
|
||||
)
|
||||
|
||||
data class ItemDiscardSalixShortage(
|
||||
var itemFk: Int,
|
||||
var warehouseFk: Int,
|
||||
var quantity: Int,
|
||||
var addressFk: Int?
|
||||
)
|
||||
|
||||
data class BackSalixCall(
|
||||
var schema: String = "vn",
|
||||
var params: ArrayList<Any?>
|
||||
)
|
||||
|
||||
data class CollectionItemSalix(
|
||||
var barcode: String,
|
||||
var quantity: Int,
|
||||
var ticketFk: Int,
|
||||
var warehouseFk: Int
|
||||
|
||||
)
|
||||
|
||||
//Tarea 6889
|
||||
data class ItemAddSale(
|
||||
var barcode: String,
|
||||
var quantity: Int,
|
||||
|
||||
)
|
||||
|
||||
data class TicketState(
|
||||
val ticketFk: Int = 0,
|
||||
val code: String = "",
|
||||
val user: UserSalix = UserSalix()
|
||||
) {
|
||||
data class UserSalix(
|
||||
val id: Int = 0,
|
||||
val username: String = ""
|
||||
)
|
||||
}
|
||||
|
||||
data class ExpeditionPrintOut(
|
||||
val expeditionFk: Long,
|
||||
val itemFk: Int,
|
||||
val isChecked: Boolean
|
||||
)
|
||||
|
||||
data class TicketPickupResponse(
|
||||
val id: Int,
|
||||
val agencyMode: AgencyMode?
|
||||
)
|
||||
|
||||
data class AgencyMode(
|
||||
val id: Int,
|
||||
val deliveryMethodFk: Int,
|
||||
val deliveryMethod: DeliveryMethod?
|
||||
)
|
||||
|
||||
data class DeliveryMethod(
|
||||
val id: Int,
|
||||
val code: String?
|
||||
)
|
|
@ -0,0 +1,62 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
import android.os.Build
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.databinding.ItemToolbarRowBinding
|
||||
|
||||
class ToolBarAdapterTooltip(
|
||||
|
||||
private var items: List<ImageView>,
|
||||
private val onOptionsSelectedListener: OnOptionsSelectedListener
|
||||
) : RecyclerView.Adapter<ToolBarAdapterTooltip.ItemHolder>() {
|
||||
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
|
||||
return ItemHolder(
|
||||
ItemToolbarRowBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount() = items.size
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||
holder.bind(items[position])
|
||||
|
||||
|
||||
}
|
||||
fun setItemsList(itemsNewList: List<ImageView>) {
|
||||
items = itemsNewList
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
inner class ItemHolder(
|
||||
val binding: ItemToolbarRowBinding
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
private val res = binding.root.context.resources
|
||||
|
||||
|
||||
fun bind(item: ImageView) {
|
||||
binding.apply {
|
||||
imagebuttonIcon.setImageDrawable(item.drawable)
|
||||
|
||||
imagebuttonIcon.setOnClickListener {
|
||||
onOptionsSelectedListener.onOptionsItemSelected(item.drawable)
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
imagebuttonIcon.tooltipText = item.tooltipText
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,109 +1,333 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.view.View
|
||||
import es.verdnatura.presentation.view.feature.ajustes.model.AjustesItemVO
|
||||
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemCardRowVO
|
||||
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
||||
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
|
||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemProposal
|
||||
import es.verdnatura.presentation.view.feature.claim.fragment.reubication.model.Reubication
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ClientTicketSalix
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSummary
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteComplement
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.Ticket
|
||||
import es.verdnatura.presentation.view.feature.historicoarticulo.model.ItemHistoricoVO
|
||||
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
||||
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventoryParking
|
||||
import es.verdnatura.presentation.view.feature.login.model.WorkForms
|
||||
import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import es.verdnatura.presentation.view.feature.roadmap.model.RoadMapTruck
|
||||
import es.verdnatura.presentation.view.feature.roadmap.model.RoadStopMapTruck
|
||||
import es.verdnatura.presentation.view.feature.roadmap.model.StopMapTruckPallet
|
||||
import es.verdnatura.presentation.view.feature.roadmap.model.TruckAction
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.Sale
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||
import es.verdnatura.presentation.view.feature.smarttag.model.SmartTag
|
||||
import es.verdnatura.presentation.view.feature.ubicador.model.ItemShelving
|
||||
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicador
|
||||
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
|
||||
import es.verdnatura.presentation.view.feature.workermistake.model.WorkerFromMistake
|
||||
|
||||
interface OnOptionsSelectedListener {
|
||||
fun onOptionsItemSelected(item: Drawable)
|
||||
}
|
||||
|
||||
interface OnPasillerosItemClickListener {
|
||||
fun onPasillerosItemClickListener(item: PasillerosItemVO,entryPoint:String)
|
||||
fun onPasillerosItemClickListener(
|
||||
item: PasillerosItemVO,
|
||||
entryPoint: String,
|
||||
param: Any? = null
|
||||
)
|
||||
}
|
||||
|
||||
interface OnMistakeWorkerClickListener {
|
||||
fun onMistakeWorkerClickListener(item: WorkerFromMistake)
|
||||
}
|
||||
|
||||
interface OnSalarySupplementClickListener {
|
||||
fun onSalarySupplementClickListener(item: RouteComplement)
|
||||
}
|
||||
|
||||
interface HideBottomNavigation {
|
||||
fun hideBottomNavigation(entryPoint: String)
|
||||
}
|
||||
|
||||
interface OnAjustesItemClickListener {
|
||||
fun onAjustesItemClickListener(item: AjustesItemVO)
|
||||
}
|
||||
|
||||
|
||||
interface OnItemCardRowClickListener {
|
||||
fun onItemCardRowClickListener(item: ItemCardRowVO)
|
||||
}
|
||||
|
||||
interface OnItemImageLoadRowClickListener {
|
||||
fun onItemImageLoadRowClickListener(item: ExpeditionInfoSummary)
|
||||
}
|
||||
|
||||
interface OnItemImageRouteRowClickListener {
|
||||
fun onItemImageRouteRowClickListener(item: RouteInfo, action: String)
|
||||
}
|
||||
|
||||
interface OnItemButtonTicketRowClickListener {
|
||||
fun onItemButtonTicketRowClickListener(item: ClientTicketSalix, action: String)
|
||||
}
|
||||
|
||||
interface OnItemButtonRoadMapStopRowClickListener {
|
||||
fun onItemButtonRoadMapStopRowClickListener(item: ClientTicketSalix, action: String)
|
||||
}
|
||||
|
||||
interface OnItemButtonCMRRowClickListener {
|
||||
fun onItemButtonCMRRowClickListener(item: Ticket)
|
||||
}
|
||||
|
||||
interface OnAddressRowClickListener {
|
||||
fun onAddressRowClickListener(item: ExpeditionInfoSummary)
|
||||
}
|
||||
|
||||
/*interface OnItemExpeditionStateRowClickListener {
|
||||
fun OnItemExpeditionStateRowClickListener(item: ItemExpeditionStateRow)
|
||||
}*/
|
||||
|
||||
interface OnBarcodeRowClickListener {
|
||||
fun onBarcodeRowClickListener(item: BarcodeVO)
|
||||
}
|
||||
|
||||
interface OnLocationRowClickListener {
|
||||
fun onLocationRowClickListener(item: ItemLocationVO)
|
||||
interface OnSmartTagRowClickListener {
|
||||
fun onSmartTagRowClickListener(item: SmartTag)
|
||||
}
|
||||
|
||||
interface OnGeneralItemRowClickListener {
|
||||
fun onGeneralItemRowClickListener(item: GeneralItem)
|
||||
}
|
||||
|
||||
interface OnGeneralRowClickListener {
|
||||
fun onRowClickListener(item: GeneralItem)
|
||||
}
|
||||
|
||||
interface OnImageTrashClickListener {
|
||||
fun onImageTrashClickListener(item: Any)
|
||||
}
|
||||
|
||||
interface OnEditSubQuantityListener {
|
||||
fun onEditSubQuantityListener(item: Any, text: String)
|
||||
}
|
||||
|
||||
interface AdapterCallback {
|
||||
fun getPosition(): Int
|
||||
}
|
||||
|
||||
interface OnItemClickListener {
|
||||
fun onItemClickListener(item: ItemSupplier)
|
||||
}
|
||||
|
||||
interface OnImageUpdateClickListener {
|
||||
fun onImageUpdateClickListener(item: Any)
|
||||
}
|
||||
|
||||
interface OnWorkFormsItemRowClickListener {
|
||||
fun onWorkFormsItemRowClickListener(item: WorkForms)
|
||||
}
|
||||
|
||||
interface OnTrashItemRowClickListener {
|
||||
fun onTrashItemRowClickListener(item: WorkForms)
|
||||
}
|
||||
|
||||
interface OnInvetoryNichoClickListener {
|
||||
fun onInvetoryNichoClickListener(item: ItemInventaryVO)
|
||||
}
|
||||
|
||||
interface OnFaltasNichoClickListener {
|
||||
fun onFaltasNichoClickListener(item: ItemFaltasVO)
|
||||
}
|
||||
|
||||
interface OnFaltasReviewClickListener {
|
||||
fun onFaltasReviewClickListener(item: ItemFaltasVO)
|
||||
interface OnItemProposalClickListener {
|
||||
fun onItemProposalClickListener(item: ItemProposal)
|
||||
}
|
||||
|
||||
interface OnAutomaticItemClickListener {
|
||||
fun onAutomaticItemClickListener(position: Int)
|
||||
}
|
||||
|
||||
interface OnClientHistoricItemClickListener {
|
||||
fun onClientHistoricItemClickListener(item: ItemHistoricoVO)
|
||||
}
|
||||
|
||||
interface OnOutQuantityHistoricItemClickListener {
|
||||
fun onOutQuantityHistoricItemClickListener(item: ItemHistoricoVO)
|
||||
}
|
||||
|
||||
interface OnVisibleClickListener {
|
||||
fun onVisibleClickListener(item: ItemUbicadorVO)
|
||||
}
|
||||
|
||||
interface OnVisibleClickListenerNew {
|
||||
fun onVisibleClickListener(item: ItemUbicador)
|
||||
}
|
||||
|
||||
interface OnVisibleClickListener6869 {
|
||||
fun onVisibleClickListener(item: ItemShelving)
|
||||
}
|
||||
|
||||
interface OnVisibleInventoryClickListener {
|
||||
fun onVisibleInventoryClickListener(item: ItemInventoryParking)
|
||||
}
|
||||
|
||||
interface OnMoreClickListener {
|
||||
fun onMoreClickListener(item: ItemUbicadorVO)
|
||||
}
|
||||
|
||||
interface OnMoreClickListenerNew {
|
||||
fun onMoreClickListener(item: ItemUbicador)
|
||||
}
|
||||
|
||||
interface OnMoreClickListener6869 {
|
||||
fun onMoreClickListener(item: ItemShelving)
|
||||
}
|
||||
|
||||
interface OnTruckClickListener {
|
||||
fun onTruckClickListener(item: ItemExpeditionTruckVO,entryPoint: String)
|
||||
fun onTruckClickListener(item: ItemExpeditionTruckVO, entryPoint: String)
|
||||
}
|
||||
|
||||
interface OnRoadMapClickListener {
|
||||
fun onRoadMapClickListener(item: RoadMapTruck, entryPoint: String)
|
||||
}
|
||||
|
||||
interface OnStopMapClickListener {
|
||||
fun onStopMapClickListener(
|
||||
item: RoadStopMapTruck,
|
||||
entryPoint: String,
|
||||
action: TruckAction,
|
||||
view: View? = null
|
||||
)
|
||||
}
|
||||
|
||||
interface OnStopMapLoadClickListener {
|
||||
fun onStopMapClickListener(item: RoadStopMapTruck, entryPoint: String)
|
||||
}
|
||||
|
||||
interface OnStopMapUnloadClickListener {
|
||||
fun onStopMapClickListener(item: RoadStopMapTruck, entryPoint: String)
|
||||
}
|
||||
|
||||
interface OnPrintClickListener {
|
||||
fun onPrintClickListener(item: StopMapTruckPallet, entryPoint: String)
|
||||
}
|
||||
|
||||
interface OnPalletClickListener {
|
||||
fun onPalletClickListener(itemTruck: ItemExpeditionTruckVO,itemPallet: ItemPalletVO)
|
||||
fun onPalletClickListener(itemTruck: ItemExpeditionTruckVO, itemPallet: ItemPalletVO)
|
||||
}
|
||||
|
||||
interface OnComprobarPalletViewClickListener {
|
||||
fun onComprobarPalletViewClickListener(itemTruck: ItemExpeditionTruckVO,itemPallet: ItemPalletVO)
|
||||
fun onComprobarPalletViewClickListener(
|
||||
itemTruck: ItemExpeditionTruckVO,
|
||||
itemPallet: ItemPalletVO
|
||||
)
|
||||
}
|
||||
|
||||
interface OnScanLongClickListener {
|
||||
fun onScanLongClickListener(ItemExpeditionScanVO: ItemExpeditionScanVO)
|
||||
fun onScanLongClickListener(itemExpeditionScanVO: ItemExpeditionScanVO)
|
||||
}
|
||||
|
||||
interface OnCollectionSelectedListener {
|
||||
fun onCollectionSelected(collection: CollectionVO,type:String)
|
||||
fun onCollectionSelected(collection: CollectionVO, type: String)
|
||||
}
|
||||
|
||||
interface OnCollectionTicketSelectedListener {
|
||||
fun onCollectionSelected(
|
||||
collection: CollectionTicket,
|
||||
type: String,
|
||||
hasPicking: Boolean = false,
|
||||
hasToAdd: Boolean = false
|
||||
)
|
||||
}
|
||||
|
||||
interface OnQuantityClickListener {
|
||||
fun onQuantityClick(sale: SaleVO)
|
||||
}
|
||||
|
||||
interface OnQuantityClickSaleListener {
|
||||
fun onQuantityClick(sale: Sale)
|
||||
}
|
||||
|
||||
interface OnPackingClickListener {
|
||||
fun onPackingClick(sale: SaleVO)
|
||||
}
|
||||
|
||||
interface OnPackingClickSaleListener {
|
||||
fun onPackingClick(sale: Sale)
|
||||
}
|
||||
|
||||
interface OnSaleClickListener {
|
||||
fun onSaleClick(sale: SaleVO)
|
||||
}
|
||||
|
||||
interface OnSaleClickSaleListener {
|
||||
fun onSaleClick(sale: Sale)
|
||||
}
|
||||
|
||||
interface OnReubicationClickListener {
|
||||
fun onReubicationClick(reubication: Reubication)
|
||||
}
|
||||
|
||||
interface OnMistakeClickListener {
|
||||
fun onMistakeClickListener(sale:SaleVO)
|
||||
fun onMistakeClickListener(sale: SaleVO)
|
||||
}
|
||||
|
||||
interface OnTicketClickListener {
|
||||
fun onTicketClickListener(sale: SaleVO)
|
||||
}
|
||||
|
||||
interface OnTicketColorListener {
|
||||
fun onTicketColorListener(sale: SaleVO)
|
||||
}
|
||||
|
||||
interface OnTicketClickSaleListener {
|
||||
fun onTicketClickListener(sale: Sale)
|
||||
}
|
||||
|
||||
interface OnSaleReserveClickListener {
|
||||
fun onSaleReserveListener(sale: Sale)
|
||||
}
|
||||
|
||||
interface OnAddItemClickListener {
|
||||
fun onAddItemClickListener(sale: Sale)
|
||||
}
|
||||
|
||||
interface OnBuyerSelectedListener {
|
||||
fun onBuyerSelected(userFk:String)
|
||||
fun onBuyerSelected(userFk: String)
|
||||
}
|
||||
|
||||
interface OnStarSelectedListener {
|
||||
fun onStarSelected(vId:String, vStars:String)
|
||||
fun onStarSelected(vId: String, vStars: String)
|
||||
}
|
||||
|
||||
interface onVehicleSelected{
|
||||
interface OnVehicleSelected {
|
||||
fun onVehicleClick(userFk: String)
|
||||
}
|
||||
|
||||
interface OnClickDynamic {
|
||||
fun onClickDynamic(addressFK: Int)
|
||||
}
|
||||
|
||||
interface InteceptorListener {
|
||||
fun onInterceptionResult(visibility: Int)
|
||||
}
|
||||
|
||||
interface MainActivityListener {
|
||||
fun onApplicationEventAnimation(visibility: Int)
|
||||
}
|
||||
|
||||
interface LoginListener {
|
||||
fun onApplicationEventAnimation(visibility: Int)
|
||||
}
|
||||
|
||||
interface SignListener {
|
||||
fun onApplicationEventAnimation(visibility: Int)
|
||||
}
|
||||
|
||||
interface OnBackPressedListener {
|
||||
fun onBackPressedHandled(): Boolean
|
||||
}
|
|
@ -3,11 +3,15 @@ package es.verdnatura.presentation.common
|
|||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageInfo
|
||||
import android.content.pm.PackageManager
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.media.AudioManager
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewTreeObserver
|
||||
|
@ -21,14 +25,19 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.request.target.CustomTarget
|
||||
import com.bumptech.glide.request.transition.Transition
|
||||
import es.verdnatura.BuildConfig
|
||||
import java.util.*
|
||||
|
||||
import java.text.DecimalFormat
|
||||
import java.text.ParseException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.time.LocalDate
|
||||
import java.time.LocalDateTime
|
||||
import java.time.LocalTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.Calendar
|
||||
import java.util.Locale
|
||||
|
||||
inline fun FragmentManager.inTransaction(func: FragmentTransaction.() -> FragmentTransaction) =
|
||||
beginTransaction().func().commit()
|
||||
|
||||
|
||||
fun <T> Context.openActivity(it: Class<T>, extras: Bundle.() -> Unit = {}) {
|
||||
val intent = Intent(this, it)
|
||||
intent.putExtras(Bundle().apply(extras))
|
||||
|
@ -67,23 +76,26 @@ fun View.setDimensions(width: Int, height: Int) {
|
|||
layoutParams?.height = height
|
||||
this.layoutParams = layoutParams
|
||||
}
|
||||
|
||||
fun View.setMargins(left: Int, top: Int, right: Int, bottom: Int) {
|
||||
val mlp = this.layoutParams as ViewGroup.MarginLayoutParams
|
||||
mlp.setMargins(left, top, right, bottom)
|
||||
}
|
||||
|
||||
fun ImageView.loadUrl(url: String) {
|
||||
Glide.with(context)
|
||||
.asBitmap()
|
||||
.load(url)
|
||||
.into(object : CustomTarget<Bitmap>() {
|
||||
fun ImageView.loadUrl(url: String?) {
|
||||
if (!url.isNullOrEmpty()) {
|
||||
Glide.with(context)
|
||||
.asBitmap()
|
||||
.load(url)
|
||||
.into(object : CustomTarget<Bitmap>() {
|
||||
|
||||
override fun onLoadCleared(placeholder: Drawable?) {}
|
||||
override fun onLoadCleared(placeholder: Drawable?) {}
|
||||
|
||||
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
|
||||
setImageBitmap(resource)
|
||||
}
|
||||
})
|
||||
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
|
||||
setImageBitmap(resource)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
inline val <reified T> T.TAG: String
|
||||
|
@ -119,12 +131,13 @@ fun Calendar.convertToDateString(): String {
|
|||
11 -> dayOfMonth = "Dic"
|
||||
}
|
||||
|
||||
return dayOfWeek + " " + day + " " + dayOfMonth
|
||||
return "$dayOfWeek $day $dayOfMonth"
|
||||
}
|
||||
|
||||
fun RecyclerView.addViewObserver(function: () -> Unit) {
|
||||
val view = this
|
||||
view.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
view.viewTreeObserver.addOnGlobalLayoutListener(object :
|
||||
ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
view.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
function.invoke()
|
||||
|
@ -140,13 +153,33 @@ fun Activity.hideKeyboard() {
|
|||
hideKeyboard(currentFocus ?: View(this))
|
||||
}
|
||||
|
||||
fun Activity.showKeyboardIn() {
|
||||
showKeyboardIn(currentFocus ?: View(this))
|
||||
}
|
||||
|
||||
fun Context.hideKeyboard(view: View) {
|
||||
val inputMethodManager = getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
val hideSoftInputFromWindow = inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
Handler(Looper.getMainLooper()).postDelayed({
|
||||
val inputMethodManager =
|
||||
getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
}, 100L)
|
||||
|
||||
}
|
||||
|
||||
fun Context.showKeyboard() {
|
||||
val imm = getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager?
|
||||
imm!!.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0)
|
||||
|
||||
}
|
||||
|
||||
fun Context.showKeyboardIn(view: View) {
|
||||
val imm = getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager?
|
||||
imm!!.showSoftInput(view, 0)
|
||||
|
||||
}
|
||||
|
||||
// Extension function to change media volume programmatically
|
||||
fun AudioManager.setMediaVolume(volumeIndex:Int) {
|
||||
fun AudioManager.setMediaVolume(volumeIndex: Int) {
|
||||
// Set media volume level
|
||||
this.setStreamVolume(
|
||||
AudioManager.STREAM_MUSIC, // Stream type
|
||||
|
@ -156,9 +189,59 @@ fun AudioManager.setMediaVolume(volumeIndex:Int) {
|
|||
}
|
||||
|
||||
// Extension property to get media maximum volume index
|
||||
val AudioManager.mediaMaxVolume:Int
|
||||
val AudioManager.mediaMaxVolume: Int
|
||||
get() = this.getStreamMaxVolume(AudioManager.STREAM_MUSIC)
|
||||
|
||||
// Extension property to get media/music current volume index
|
||||
val AudioManager.mediaCurrentVolume:Int
|
||||
val AudioManager.mediaCurrentVolume: Int
|
||||
get() = this.getStreamVolume(AudioManager.STREAM_MUSIC)
|
||||
|
||||
fun getHourDay(date: String): String? {
|
||||
return try {
|
||||
val format = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault())
|
||||
val cal = Calendar.getInstance()
|
||||
|
||||
cal.time = format.parse(date)!!
|
||||
val f = DecimalFormat("00")
|
||||
"" + f.format(cal[Calendar.HOUR_OF_DAY]) + ":" + f.format(cal[Calendar.MINUTE])
|
||||
} catch (e: ParseException) {
|
||||
e.printStackTrace()
|
||||
"00:00"
|
||||
}
|
||||
}
|
||||
|
||||
fun addDateToTime(time: String): String {
|
||||
val currentTime = Calendar.getInstance()
|
||||
val dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
|
||||
val currentDate = dateFormat.format(currentTime.time)
|
||||
|
||||
return "$currentDate $time"
|
||||
}
|
||||
|
||||
fun PackageManager.getPackageInfoCompat(packageName: String, flags: Int = 0): PackageInfo =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(flags.toLong()))
|
||||
} else {
|
||||
getPackageInfo(packageName, flags)
|
||||
}
|
||||
|
||||
fun convertToDateString(date: String?): String? {
|
||||
|
||||
if (date.isNullOrEmpty()) {
|
||||
return date
|
||||
}
|
||||
val formatoEntrada =
|
||||
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.getDefault()) // Formato de entrada
|
||||
val formatoSalida = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()) // Formato de salida
|
||||
val dateToConvert = formatoEntrada.parse(date) // Convertir fecha de String a objeto Date
|
||||
return formatoSalida.format(dateToConvert!!) // Convertir fecha a String con formato deseado
|
||||
}
|
||||
|
||||
fun getDayBounds(dateString: String): Pair<LocalDateTime, LocalDateTime> {
|
||||
val formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy")
|
||||
val date = LocalDate.parse(dateString, formatter)
|
||||
val startOfDay = date.atTime(LocalTime.MIN)
|
||||
val endOfDay = date.atTime(LocalTime.MAX)
|
||||
|
||||
return Pair(startOfDay, endOfDay)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
import android.content.Context
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import es.verdnatura.R
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Calendar
|
||||
import java.util.Locale
|
||||
|
||||
class FunctionUtils {
|
||||
fun getMessageFromJSON(json: String): String {
|
||||
val gson = Gson()
|
||||
var message = ""
|
||||
val tutorialMap: Map<String, Any> =
|
||||
gson.fromJson(json, object : TypeToken<Map<String, Any>>() {}.type)
|
||||
tutorialMap.forEach {
|
||||
if (it.key == "Message") {
|
||||
message = it.value.toString()
|
||||
}
|
||||
}
|
||||
return message
|
||||
}
|
||||
|
||||
fun getListFromJSON(json: String): List<String> {
|
||||
val gson = Gson()
|
||||
val list = mutableListOf<String>()
|
||||
// val mapType = object : TypeToken<Map<String, Any>>() {}.type
|
||||
val tutorialMap: Map<String, Any> =
|
||||
gson.fromJson(json, object : TypeToken<Map<String, Any>>() {}.type)
|
||||
tutorialMap.forEach {
|
||||
|
||||
list.add(it.key + ":" + it.value)
|
||||
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
private fun getCurdate(date: String, context: Context): String {
|
||||
val c = Calendar.getInstance()
|
||||
val df =
|
||||
SimpleDateFormat(context.getString(R.string.dateCompleteFormat), Locale.getDefault())
|
||||
val df2 = SimpleDateFormat(context.getString(R.string.timeFormat), Locale.getDefault())
|
||||
c.time = df.parse(date)!!
|
||||
return df2.format(c.time)
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
package es.verdnatura.presentation.common
|
||||
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.json.JSONObject
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
||||
data class ItemScanned(var scanned: JSONObject) {
|
||||
var table: String = scanned.get("table").toString()
|
||||
var id: Int = scanned.get("id").toString().toInt()
|
||||
var company: String = scanned.get("company").toString()
|
||||
var more: String = if (scanned.has("more")) scanned.get("more").toString() else ""
|
||||
var user: Int = scanned.get("user").toString().toInt()
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
var created = DateTimeFormatter.ISO_INSTANT.parse(scanned.get("created").toString())
|
||||
|
||||
}
|
||||
|
||||
fun itemScanIsQr(value: String): Boolean {
|
||||
|
||||
return try {
|
||||
ItemScanned(JSONObject(value))
|
||||
true
|
||||
|
||||
} catch (ex: Exception) {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
fun itemScanValue(value: String, table: Array<String>, field: String): Any {
|
||||
val item: ItemScanned
|
||||
return try {
|
||||
|
||||
try {
|
||||
item = ItemScanned(JSONObject(value))
|
||||
} catch (ex: Exception) {
|
||||
return value
|
||||
}
|
||||
|
||||
if (item.company == "vnl" && item.table in table) {
|
||||
when (item.table) {
|
||||
|
||||
"ticket" -> {
|
||||
return item.id
|
||||
}
|
||||
|
||||
"saleGroup" -> {
|
||||
return item.id
|
||||
}
|
||||
|
||||
"buy" -> {
|
||||
when (field) {
|
||||
"id" -> return item.id
|
||||
"more" -> return item.more
|
||||
}
|
||||
}
|
||||
|
||||
"expeditionPallet" -> {
|
||||
return item.id
|
||||
}
|
||||
|
||||
"printer" -> {
|
||||
return item.id
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
throw Exception("QR no válido")
|
||||
|
||||
} catch (ex: Exception) {
|
||||
throw ex
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,264 @@
|
|||
package es.verdnatura.presentation.composable
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.wrapContentSize
|
||||
import androidx.compose.foundation.lazy.LazyRow
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.foundation.text.KeyboardActions
|
||||
import androidx.compose.foundation.text.KeyboardOptions
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.HorizontalDivider
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.PlainTooltip
|
||||
import androidx.compose.material3.Switch
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextField
|
||||
import androidx.compose.material3.TextFieldDefaults
|
||||
import androidx.compose.material3.TooltipBox
|
||||
import androidx.compose.material3.TooltipDefaults
|
||||
import androidx.compose.material3.rememberTooltipState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Alignment.Companion.CenterVertically
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
|
||||
import androidx.compose.ui.res.colorResource
|
||||
import androidx.compose.ui.res.dimensionResource
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import es.verdnatura.R
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun CustomToolbar(
|
||||
title: String,
|
||||
subtitle: String? = null,
|
||||
showBackButton: Boolean = true,
|
||||
showSwitch: Boolean = false,
|
||||
iconList: List<IconToolBar> = emptyList(),
|
||||
onBackClick: () -> Unit = {},
|
||||
onSwitchChange: (Boolean) -> Unit = {},
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.background(Color.Black)
|
||||
) {
|
||||
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(56.dp),
|
||||
verticalAlignment = CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceBetween
|
||||
|
||||
) {
|
||||
if (showBackButton) {
|
||||
IconButton(
|
||||
onClick = { onBackClick() },
|
||||
modifier = Modifier.padding(start = 0.dp),
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_chevron_left),
|
||||
contentDescription = "Back",
|
||||
tint = Color.White
|
||||
)
|
||||
}
|
||||
}
|
||||
Text(
|
||||
modifier = Modifier.weight(1f),
|
||||
text = title,
|
||||
color = Color.White,
|
||||
fontSize = dimensionResource(id = R.dimen.title).value.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
|
||||
)
|
||||
|
||||
if (!subtitle.isNullOrEmpty()) {
|
||||
Text(
|
||||
modifier = Modifier.weight(1f),
|
||||
text = subtitle,
|
||||
color = Color.White.copy(alpha = 0.7f),
|
||||
fontSize = dimensionResource(id = R.dimen.subtitle).value.sp
|
||||
)
|
||||
}
|
||||
|
||||
if (iconList.isNotEmpty()) {
|
||||
LazyRow(
|
||||
horizontalArrangement = Arrangement.End, // Esto asegura que los iconos estén a la derecha
|
||||
) {
|
||||
items(iconList) { iconToolBar ->
|
||||
TooltipBox(
|
||||
positionProvider = TooltipDefaults.rememberPlainTooltipPositionProvider(),
|
||||
tooltip = {
|
||||
PlainTooltip {
|
||||
Text(iconToolBar.toolTip)
|
||||
}
|
||||
},
|
||||
state = rememberTooltipState()
|
||||
) {
|
||||
IconButton(
|
||||
onClick = { iconToolBar.onClickIcon() },
|
||||
) {
|
||||
|
||||
Icon(
|
||||
painter = painterResource(id = iconToolBar.idRes),
|
||||
contentDescription = iconToolBar.toolTip,
|
||||
tint = Color.White
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (showSwitch) {
|
||||
var switchState by remember { mutableStateOf(false) }
|
||||
Switch(
|
||||
checked = switchState,
|
||||
onCheckedChange = {
|
||||
switchState = it
|
||||
onSwitchChange(it)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HorizontalDivider(
|
||||
thickness = 1.dp,
|
||||
color = colorResource(id = R.color.verdnatura_brown_grey)
|
||||
)
|
||||
}
|
||||
|
||||
data class IconToolBar(
|
||||
val idRes: Int,
|
||||
val toolTip: String = "",
|
||||
val tint: Color = Color.White,
|
||||
val onClickIcon: () -> Unit,
|
||||
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun ScanLineTextSearch(
|
||||
value: String,
|
||||
onValueChange: (String) -> Unit,
|
||||
onImeAction: () -> Unit,
|
||||
modifier: Modifier = Modifier.wrapContentSize(),
|
||||
) {
|
||||
|
||||
val keyboardController = LocalSoftwareKeyboardController.current
|
||||
|
||||
Box(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
TextField(
|
||||
value = value,
|
||||
onValueChange = onValueChange,
|
||||
textStyle = TextStyle(
|
||||
color = Color.White,
|
||||
textAlign = TextAlign.Center
|
||||
),
|
||||
placeholder = {
|
||||
Box(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(id = R.string.Escaneaetiqueta),
|
||||
textAlign = TextAlign.Center,
|
||||
color = Color.White,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
}
|
||||
},
|
||||
singleLine = true,
|
||||
keyboardActions = KeyboardActions(
|
||||
onDone = {
|
||||
onImeAction()
|
||||
keyboardController?.hide()
|
||||
}
|
||||
|
||||
),
|
||||
keyboardOptions = KeyboardOptions.Default.copy(
|
||||
imeAction = ImeAction.Done
|
||||
),
|
||||
colors = TextFieldDefaults.colors(
|
||||
focusedContainerColor = Color.DarkGray, // Fondo cuando está enfocado
|
||||
unfocusedContainerColor = Color.DarkGray, // Fondo cuando NO está enfocado
|
||||
cursorColor = Color.White, // Color del cursor
|
||||
focusedTextColor = Color.White, // Color del texto cuando está enfocado
|
||||
unfocusedTextColor = Color.White, // Color del texto cuando NO está enfocado
|
||||
focusedPlaceholderColor = Color.Black, // Color del placeholder cuando está enfocado
|
||||
unfocusedPlaceholderColor = Color.Black // Color del placeholder cuando NO está enfocado
|
||||
),
|
||||
modifier = modifier
|
||||
.fillMaxWidth(fraction = 0.67f)
|
||||
.border(2.dp, Color.White, RoundedCornerShape(8.dp))
|
||||
.height(52.dp)
|
||||
/* .onFocusEvent {
|
||||
if (it.isFocused) {
|
||||
keyboardController?.hide()
|
||||
}
|
||||
}*/
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun PreviewToolbar() {
|
||||
CustomToolbar(
|
||||
title = "Mi Toolbar",
|
||||
subtitle = "10/20",
|
||||
showBackButton = true,
|
||||
showSwitch = true,
|
||||
iconList = listOf(
|
||||
IconToolBar(
|
||||
R.drawable.ic_parking_ui, "", tint = Color.Blue,
|
||||
onClickIcon = { }
|
||||
)
|
||||
),
|
||||
onBackClick = { /* Acción de volver atrás */ },
|
||||
onSwitchChange = { /* Acción del switch */ }
|
||||
)
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun PreviewScanLineTextSearch() {
|
||||
ScanLineTextSearch(
|
||||
value = stringResource(R.string.scanLabel),
|
||||
onValueChange = {},
|
||||
onImeAction = {})
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package es.verdnatura.presentation.composable
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import es.verdnatura.R
|
||||
|
||||
class ImageViewActivityComposable : ComponentActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContent {
|
||||
val imageUrl = intent.getStringExtra(getString(R.string.url)) ?: ""
|
||||
val title = intent.getStringExtra(getString(R.string.title)) ?: ""
|
||||
ImageViewScreen(imageUrl = imageUrl, titleToolBar = title, onBackClick = { finish() })
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package es.verdnatura.presentation.composable
|
||||
|
||||
import android.widget.ImageView
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.bumptech.glide.Glide
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun ImageViewScreen(imageUrl: String, titleToolBar:String ="",onBackClick: () -> Unit ) {
|
||||
|
||||
CustomToolbar(
|
||||
title = titleToolBar,
|
||||
subtitle = "",
|
||||
showBackButton = true,
|
||||
showSwitch = false,
|
||||
iconList = listOf(),
|
||||
onBackClick = onBackClick ,
|
||||
onSwitchChange = { }
|
||||
)
|
||||
Column(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Top
|
||||
) {
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
GlideImage(imageUrl = imageUrl)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun GlideImage(imageUrl: String) {
|
||||
androidx.compose.ui.viewinterop.AndroidView(
|
||||
factory = { context ->
|
||||
ImageView(context).apply {
|
||||
Glide.with(context)
|
||||
.load(imageUrl)
|
||||
.into(this)
|
||||
}
|
||||
},
|
||||
modifier = Modifier.fillMaxSize()
|
||||
)
|
||||
}
|
||||
|
||||
@Preview(showBackground = true)
|
||||
@Composable
|
||||
fun DefaultPreview() {
|
||||
ImageViewScreen(imageUrl = "https://example.com/image.jpg", "titleToolbar") {}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package es.verdnatura.presentation.composable
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.fadeIn
|
||||
import androidx.compose.animation.fadeOut
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.wrapContentWidth
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.dimensionResource
|
||||
import com.airbnb.lottie.compose.LottieAnimation
|
||||
import com.airbnb.lottie.compose.LottieCompositionSpec
|
||||
import com.airbnb.lottie.compose.LottieConstants
|
||||
import com.airbnb.lottie.compose.rememberLottieComposition
|
||||
import es.verdnatura.R
|
||||
|
||||
@Composable
|
||||
fun LottieLoadingAnimation(isVisible: Boolean = true) {
|
||||
AnimatedVisibility(
|
||||
visible = isVisible,
|
||||
enter = fadeIn(),
|
||||
exit = fadeOut()
|
||||
) {
|
||||
val composition by rememberLottieComposition(
|
||||
spec = LottieCompositionSpec.RawRes(R.raw.orange_loading)
|
||||
)
|
||||
|
||||
LottieAnimation(
|
||||
composition = composition,
|
||||
iterations = LottieConstants.IterateForever,
|
||||
speed = 2f,
|
||||
modifier = Modifier
|
||||
.wrapContentWidth()
|
||||
.height(dimensionResource(id = R.dimen.verdnatura_logo_large_height))
|
||||
)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package es.verdnatura.presentation.composable.ui
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
object VerdnaturaColors {
|
||||
|
||||
val OrangeSalix = Color(0xFFEC8916)
|
||||
val BlackCustomDialog = Color(0xFF1A1A1A)
|
||||
val BlackTextInput = Color(0xFF666666)
|
||||
val White = Color(0xFFFFFFFF)
|
||||
|
||||
// Colores principales
|
||||
val ColorPrimary = Color(0xFFF7931E)
|
||||
val ColorPrimaryDark = Color(0xFF8B4200)
|
||||
|
||||
// Negros
|
||||
/* val Black = Color(0xFF000000)
|
||||
val Black1 = Color(0xFF1D1D1D)
|
||||
val Black2 = Color(0xFF171717)
|
||||
val Black3 = Color(0xFF292929)
|
||||
val Black4 = Color(0xFF242424)
|
||||
val Black5 = Color(0xFF323232)
|
||||
val Black6 = Color(0xFF333333)
|
||||
val Black7 = Color(0xFF282828)
|
||||
val Black8 = Color(0xFF1A1A1A)
|
||||
val BlackCustomDialog = Color(0xFF464446)
|
||||
val Black8Alpha6 = Color(0x991A1A1A) // Con transparencia
|
||||
|
||||
// Grises
|
||||
val WarmGrey = Color(0xFF707070)
|
||||
val BrownGrey = Color(0xFF8F8F8F)
|
||||
val BrownGreyLight = Color(0xFFB8ADAD)
|
||||
|
||||
// Colores vivos
|
||||
val Red = Color(0xFFE74C3C)
|
||||
val WarmBrown = Color(0xFF8B4200)
|
||||
val PumpkinOrange = Color(0xFFF7931E)
|
||||
val PumpkinLight = Color(0xFFF77956)
|
||||
val PinkSalix = Color(0xFFFF99CC)
|
||||
val SunflowerYellow = Color(0xFFFFD400)
|
||||
val DarkSkyBlue = Color(0xFF4AB4E6)
|
||||
val DarkGreenVerdnatura = Color(0xFFA3D131)
|
||||
val DarkMint = Color(0xFF50BE87)
|
||||
val DarkMintLight = Color(0xFF80BE87)
|
||||
val DarkMintLightPrecontrolled = Color(0xFFB8DABA)
|
||||
val LightTeal = Color(0xFFB8ECD6)
|
||||
val White = Color(0xFFFFFFFF)
|
||||
val RedSalix = Color(0xFFFB5252)
|
||||
val OrangeSalix = Color(0xFFEC8916)
|
||||
|
||||
// Fondos
|
||||
val BackgroundItemPicker = Color(0xFF4D4D4D)
|
||||
val BackgroundSubtitleSettings = Color(0xFF1A1A1A)
|
||||
val BackgroundItemsMenus = Color(0xFF333333)
|
||||
|
||||
// Colores SALIX
|
||||
val SalixSuccessLight = Color(0xFFA3D131)
|
||||
val ColorHeader = Color(0xFF3D3D3D)
|
||||
val ColorMenuHeader = Color(0xFF3D3D3D)
|
||||
val ColorBg = Color(0xFF222222)
|
||||
val ColorBgDark = Color(0xFF222222)
|
||||
val ColorActive = Color(0xFF666666)
|
||||
val ColorActiveFont = Color(0xFFFFFFFF)
|
||||
val ColorBgPanel = Color(0xFF3C3B3B)
|
||||
val ColorMain = ColorPrimary
|
||||
val ColorMarginal = Color(0xFF222222)
|
||||
val ColorSuccess = Color(0xFFA3D131)
|
||||
val ColorNotice = Color(0xFF32B1CE)
|
||||
val ColorAlert = Color(0xFFFA3939)
|
||||
val ColorPink = Color(0xFFFF99CC)
|
||||
val ColorYellow = Color(0xFFFFFF00)*/
|
||||
}
|
|
@ -0,0 +1,168 @@
|
|||
package es.verdnatura.presentation.composable.ui
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.text.KeyboardActions
|
||||
import androidx.compose.foundation.text.KeyboardOptions
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextField
|
||||
import androidx.compose.material3.TextFieldDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
||||
@Composable
|
||||
fun DefaultButtonCustomDialog(
|
||||
text: String,
|
||||
onClick: () -> Unit = {},
|
||||
enabled: Boolean = true,
|
||||
leadingIcon: @Composable (() -> Unit)? = null
|
||||
) {
|
||||
Button(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
onClick = onClick,
|
||||
enabled = enabled,
|
||||
contentPadding = PaddingValues(
|
||||
start = if (leadingIcon == null) 16.dp else 8.dp,
|
||||
end = 16.dp
|
||||
),
|
||||
shape = MaterialTheme.shapes.small,
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
containerColor = VerdnaturaColors.ColorPrimary,
|
||||
contentColor = VerdnaturaColors.White
|
||||
)
|
||||
) {
|
||||
if (leadingIcon != null) {
|
||||
leadingIcon()
|
||||
}
|
||||
|
||||
Text(
|
||||
text = text.uppercase(),
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
textAlign = TextAlign.Center,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun TitleTextCustomDialog(
|
||||
title: String,
|
||||
) {
|
||||
Text(
|
||||
text = title,
|
||||
style = MaterialTheme.typography.titleLarge.copy(
|
||||
fontWeight = FontWeight.Bold
|
||||
),
|
||||
color = VerdnaturaColors.White,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(bottom = 8.dp)
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun DescriptionTextCustomDialog(
|
||||
description: String,
|
||||
) {
|
||||
Text(
|
||||
text = description,
|
||||
color = VerdnaturaColors.White,
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
modifier = Modifier.padding(bottom = 8.dp)
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ScanTextCustomDialog(
|
||||
value: TextFieldValue,
|
||||
onValueChange: (TextFieldValue) -> Unit,
|
||||
hint: String,
|
||||
onEnterPressed: (String) -> Unit = {},
|
||||
focusRequester: FocusRequester
|
||||
) {
|
||||
val keyboardController = LocalSoftwareKeyboardController.current
|
||||
|
||||
TextField(
|
||||
value = value,
|
||||
onValueChange = onValueChange,
|
||||
label = {
|
||||
Text(
|
||||
text = hint,
|
||||
textAlign = TextAlign.Center,
|
||||
color = Color.White,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp),
|
||||
)
|
||||
},
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.focusRequester(focusRequester)
|
||||
.border(1.dp, Color.White, shape = MaterialTheme.shapes.small)
|
||||
.background(Color.Transparent)
|
||||
.height(VerdnaturaDimens.minHeight),
|
||||
textStyle = CustomTextStyle,
|
||||
keyboardOptions =
|
||||
KeyboardOptions.Default.copy(
|
||||
imeAction = ImeAction.Done,
|
||||
keyboardType = KeyboardType.Number
|
||||
),
|
||||
singleLine = true,
|
||||
keyboardActions = KeyboardActions(
|
||||
onDone = {
|
||||
onEnterPressed(value.text)
|
||||
onValueChange(TextFieldValue(""))
|
||||
keyboardController?.hide()
|
||||
}
|
||||
),
|
||||
colors = TextFieldDefaults.colors(
|
||||
focusedContainerColor = Color.Transparent,
|
||||
unfocusedContainerColor = Color.Transparent,
|
||||
focusedTextColor = VerdnaturaColors.White,
|
||||
unfocusedTextColor = VerdnaturaColors.White
|
||||
)
|
||||
)
|
||||
LaunchedEffect(Unit) {
|
||||
focusRequester.requestFocus()
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(showBackground = true)
|
||||
@Composable
|
||||
fun PreviewCustomTextField() {
|
||||
val sampleText = remember { mutableStateOf(TextFieldValue("Texto de ejemplo")) }
|
||||
val focusRequester = remember { FocusRequester() }
|
||||
ScanTextCustomDialog(
|
||||
value = sampleText.value,
|
||||
onValueChange = { sampleText.value = it },
|
||||
hint = "Escribe algo...",
|
||||
onEnterPressed = { text -> println("Texto ingresado: $text") },
|
||||
focusRequester = focusRequester
|
||||
)
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package es.verdnatura.presentation.composable.ui
|
||||
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
||||
object VerdnaturaDimens {
|
||||
|
||||
/* val h1 = 96.sp
|
||||
val h2 = 60.sp
|
||||
val h3 = 48.sp
|
||||
val h4 = 34.sp
|
||||
val h5 = 24.sp
|
||||
val h6 = 20.sp
|
||||
val h7 = 18.sp
|
||||
val h9 = 14.sp*/
|
||||
|
||||
// Text sizes
|
||||
val fontSizeCustomDialogs = 16.sp
|
||||
|
||||
// Height Scan Text
|
||||
val minHeight = 48.dp
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue