mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Compare commits
688 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58c0d30af3 | ||
|
|
4336350140 | ||
|
|
a3c31f7d86 | ||
|
|
6ee9daf768 | ||
|
|
d086f7694a | ||
|
|
f4c86a1b51 | ||
|
|
02bcb7bcc7 | ||
|
|
d55a3f3340 | ||
|
|
47346e9f2c | ||
|
|
f28200164b | ||
|
|
6e674b47ac | ||
|
|
0c879dc4c9 | ||
|
|
9d216f0cea | ||
|
|
16aeb16519 | ||
|
|
2f5f2a03dd | ||
|
|
8c78316718 | ||
|
|
841a7a31fa | ||
|
|
6d9173deba | ||
|
|
82a8eed652 | ||
|
|
77ca05ebe5 | ||
|
|
da912d2fdf | ||
|
|
297dc56fe5 | ||
|
|
b0b91c959e | ||
|
|
a7e9acd435 | ||
|
|
d75b03debd | ||
|
|
685a3eb14f | ||
|
|
94ff59ebab | ||
|
|
a065a92616 | ||
|
|
aed84912a3 | ||
|
|
1ec9cce439 | ||
|
|
5811b6e3d1 | ||
|
|
98a879a0e9 | ||
|
|
98ff3980f8 | ||
|
|
eb17c208f9 | ||
|
|
fa9f6432c3 | ||
|
|
6ac835de2e | ||
|
|
696d434979 | ||
|
|
48c1312cea | ||
|
|
0c240cee9a | ||
|
|
f90e34bb47 | ||
|
|
9de9b41575 | ||
|
|
60a8ae6675 | ||
|
|
5434b51f75 | ||
|
|
93118f9c32 | ||
|
|
43e6d1b933 | ||
|
|
10c2a1c55c | ||
|
|
9affc6a945 | ||
|
|
e013d81e3d | ||
|
|
6fea506e05 | ||
|
|
069cb043ee | ||
|
|
46a3214bc6 | ||
|
|
392ba6f3d1 | ||
|
|
868187aaaf | ||
|
|
9124e03c11 | ||
|
|
12c154934d | ||
|
|
fe57484c03 | ||
|
|
29d2fc34ab | ||
|
|
b352476301 | ||
|
|
f3af4e586c | ||
|
|
43f276596a | ||
|
|
dc75c5139a | ||
|
|
4eda15fb71 | ||
|
|
95e294c9ec | ||
|
|
4806ba540f | ||
|
|
2de75ef7f4 | ||
|
|
d4f7b318e7 | ||
|
|
f8486bcbf8 | ||
|
|
afa1861181 | ||
|
|
f883e66c96 | ||
|
|
de29d7e7d7 | ||
|
|
44b870d248 | ||
|
|
26e973828f | ||
|
|
48d4341e2d | ||
|
|
1d5077061e | ||
|
|
2d2e0a5b24 | ||
|
|
b53371d870 | ||
|
|
2b95ede1a2 | ||
|
|
ef02197bab | ||
|
|
086c5ab264 | ||
|
|
8bf3f72ad3 | ||
|
|
5ef34347a3 | ||
|
|
e48b9d84e5 | ||
|
|
03abc395f2 | ||
|
|
7fa9457550 | ||
|
|
edb599b426 | ||
|
|
062a3abc2d | ||
|
|
6b028ba849 | ||
|
|
23779fd5e4 | ||
|
|
20ff594014 | ||
|
|
9be73a8ff1 | ||
|
|
10f6368524 | ||
|
|
a23171ea51 | ||
|
|
658f0eccbb | ||
|
|
7656f5d20f | ||
|
|
9c86adf0f4 | ||
|
|
b29d88be25 | ||
|
|
79efa50a34 | ||
|
|
3ef427aa7d | ||
|
|
0ec35b1f0d | ||
|
|
b4278aabbf | ||
|
|
a16430d10c | ||
|
|
ee546ffdd6 | ||
|
|
3bcfc673f7 | ||
|
|
78e28c517b | ||
|
|
fb7a3a681b | ||
|
|
71412f8d4b | ||
|
|
c3b52ef00a | ||
|
|
cfee804339 | ||
|
|
e3e53b1504 | ||
|
|
70513ae989 | ||
|
|
5ca552d380 | ||
|
|
712c204bca | ||
|
|
3e0509d232 | ||
|
|
ed2f555d84 | ||
|
|
c0eb71f67f | ||
|
|
585f5a4cfa | ||
|
|
8b00807a20 | ||
|
|
7600838490 | ||
|
|
4cddd031aa | ||
|
|
a9e53272c6 | ||
|
|
85f893c7ed | ||
|
|
c9a631df2a | ||
|
|
d47a089bfb | ||
|
|
dbafbd6391 | ||
|
|
75f827aee9 | ||
|
|
b2f8d978c6 | ||
|
|
54987dd622 | ||
|
|
ec4d5bd9a2 | ||
|
|
149c0d4de4 | ||
|
|
7cdf09322c | ||
|
|
310c3c4005 | ||
|
|
195464361d | ||
|
|
86da71d6c0 | ||
|
|
fe99a5cc55 | ||
|
|
72d494c640 | ||
|
|
fbdc38b6c4 | ||
|
|
0459071ce3 | ||
|
|
dc8939c35f | ||
|
|
b13b2b9b95 | ||
|
|
3fc0278776 | ||
|
|
b25759670e | ||
|
|
97fd7e3d78 | ||
|
|
1b7c36664e | ||
|
|
fd8de65749 | ||
|
|
cab470bd86 | ||
|
|
9d6e5e9420 | ||
|
|
1fca7d2a6c | ||
|
|
4cff185b4b | ||
|
|
57504f42d8 | ||
|
|
6acb1f6484 | ||
|
|
9800483433 | ||
|
|
b7e1882bd8 | ||
|
|
3fabe308cd | ||
|
|
ac4d721de0 | ||
|
|
2786fb30ba | ||
|
|
978c882ed9 | ||
|
|
3dd8ed85b4 | ||
|
|
ebe2923512 | ||
|
|
19d7ca70b4 | ||
|
|
6d16b66a76 | ||
|
|
cd75fcf6c2 | ||
|
|
aaf45afbfe | ||
|
|
1bebe96df6 | ||
|
|
fba7699d0b | ||
|
|
a1438f91e9 | ||
|
|
69ec17ef92 | ||
|
|
c72e0f7268 | ||
|
|
2554083557 | ||
|
|
ae46863d77 | ||
|
|
9aba846112 | ||
|
|
4e03874e2b | ||
|
|
ca7da94fd8 | ||
|
|
5c05be22f5 | ||
|
|
e1478e3ae8 | ||
|
|
56f9c24527 | ||
|
|
e833921d2f | ||
|
|
2d511c6d18 | ||
|
|
3fcce8574e | ||
|
|
dd0a162a47 | ||
|
|
748a37f670 | ||
|
|
44ab87961a | ||
|
|
3fad554dbd | ||
|
|
bee1b1a097 | ||
|
|
759c5d6bdd | ||
|
|
b5024c5a16 | ||
|
|
642e822e0e | ||
|
|
10ddaf4384 | ||
|
|
75390d2a48 | ||
|
|
82ea33e9ca | ||
|
|
813deb49a4 | ||
|
|
c0cd68a747 | ||
|
|
50395d3142 | ||
|
|
d86148420a | ||
|
|
7dd2c09641 | ||
|
|
3414d9f057 | ||
|
|
71076d36a1 | ||
|
|
c02b5ccd85 | ||
|
|
ea6739d565 | ||
|
|
874e1d7f02 | ||
|
|
417770e716 | ||
|
|
ea695105b5 | ||
|
|
43072dcfcd | ||
|
|
13e32149c1 | ||
|
|
6766801aed | ||
|
|
1399171cc2 | ||
|
|
185493f846 | ||
|
|
4b79ee5f68 | ||
|
|
e8873ccb4f | ||
|
|
9fd126ca0f | ||
|
|
1ecfeca88c | ||
|
|
031b93af5e | ||
|
|
9aa6cf7804 | ||
|
|
fe65359d71 | ||
|
|
67f04856a8 | ||
|
|
39372f7bd7 | ||
|
|
1d472d0dec | ||
|
|
e6ac57ac3a | ||
|
|
cd16e8527c | ||
|
|
697a073330 | ||
|
|
3bee30ac60 | ||
|
|
26c5361b0a | ||
|
|
8fe0a82b75 | ||
|
|
92ecdb4163 | ||
|
|
bd190145f6 | ||
|
|
d41cd695a8 | ||
|
|
3f6251fa29 | ||
|
|
d2dcfa5848 | ||
|
|
138b7824ba | ||
|
|
dd00c30503 | ||
|
|
c07046e2f6 | ||
|
|
b3deaa65f6 | ||
|
|
26143980b3 | ||
|
|
402bfdac30 | ||
|
|
c806b3e889 | ||
|
|
68311f8fa4 | ||
|
|
b1cd163900 | ||
|
|
828e06b271 | ||
|
|
f783926deb | ||
|
|
28c1ba1ad4 | ||
|
|
dd84e428e3 | ||
|
|
79d45513a5 | ||
|
|
099a4e682d | ||
|
|
1ab7cb517f | ||
|
|
63dc188d5e | ||
|
|
36cbe7b2ce | ||
|
|
ea848f51e7 | ||
|
|
f575cba75c | ||
|
|
7f7ba35c01 | ||
|
|
ec818e3571 | ||
|
|
08123c7ea9 | ||
|
|
744bd9d1be | ||
|
|
28bf71e77e | ||
|
|
20a3940605 | ||
|
|
a98e4417c0 | ||
|
|
b94c586bc5 | ||
|
|
a48e6f6c1b | ||
|
|
5c4a225180 | ||
|
|
b20382ed56 | ||
|
|
2b555691a4 | ||
|
|
2be8e15797 | ||
|
|
48750f7cb8 | ||
|
|
5f1b5b679d | ||
|
|
8955d1bba0 | ||
|
|
fb6ee65865 | ||
|
|
d1b22dfff3 | ||
|
|
fda068fe83 | ||
|
|
39fb6b6f9b | ||
|
|
7b795c1da9 | ||
|
|
0030bd1464 | ||
|
|
9e26a39660 | ||
|
|
ad0cc85991 | ||
|
|
ba3d4c0c82 | ||
|
|
d31ab5b104 | ||
|
|
30295c4390 | ||
|
|
1d074c2151 | ||
|
|
1147c5b2ca | ||
|
|
026e51081c | ||
|
|
98ae82147c | ||
|
|
41c62b97d5 | ||
|
|
dbefd95b5e | ||
|
|
5fb3943634 | ||
|
|
6c885f0f42 | ||
|
|
5d9c4315d8 | ||
|
|
99f0672f9d | ||
|
|
598e81ed32 | ||
|
|
7e8daea233 | ||
|
|
4916f823aa | ||
|
|
ffc3736f4b | ||
|
|
41ffffe170 | ||
|
|
2a12e21cf4 | ||
|
|
0158106f28 | ||
|
|
fa94392fb6 | ||
|
|
3c2c3a1801 | ||
|
|
070cb1abc1 | ||
|
|
e91a8d603f | ||
|
|
4d77d4df77 | ||
|
|
055c6b78af | ||
|
|
d113f2a5fc | ||
|
|
a631d057f1 | ||
|
|
8f7c3a9369 | ||
|
|
a873499b97 | ||
|
|
b66b1fcdae | ||
|
|
4c81f0f27b | ||
|
|
c286189225 | ||
|
|
66892ed51a | ||
|
|
623753a745 | ||
|
|
1ec523f558 | ||
|
|
0fefdfb619 | ||
|
|
f50d4fdee0 | ||
|
|
5d4d3d4fcf | ||
|
|
5fb782aeba | ||
|
|
d268cc7bb7 | ||
|
|
40531d769c | ||
|
|
5f70275ed4 | ||
|
|
f8e0d71b15 | ||
|
|
85e83807cf | ||
|
|
01865cd769 | ||
|
|
045614fd0c | ||
|
|
ba470aa75e | ||
|
|
3db6cb2db3 | ||
|
|
9bf66a35f9 | ||
|
|
e4611cc604 | ||
|
|
705b0d8a71 | ||
|
|
f71ae8a496 | ||
|
|
d122af286b | ||
|
|
f81abab355 | ||
|
|
eec829de0f | ||
|
|
2595cb85f7 | ||
|
|
2a5675c526 | ||
|
|
965e8b144e | ||
|
|
05dcf75ff9 | ||
|
|
a92847d80d | ||
|
|
6074af349f | ||
|
|
c18409a6f7 | ||
|
|
d625e0b643 | ||
|
|
8d16c4c97f | ||
|
|
2a1b547b74 | ||
|
|
80a6527a5a | ||
|
|
ec240283d9 | ||
|
|
15b6b1271a | ||
|
|
b15ae89944 | ||
|
|
623c0eada5 | ||
|
|
937ba3ca0a | ||
|
|
6f2035febe | ||
|
|
2207aae679 | ||
|
|
a32ca23ca5 | ||
|
|
aba3cf99a3 | ||
|
|
d10899d9ea | ||
|
|
cea2433c3e | ||
|
|
6b430f9440 | ||
|
|
984a549dc3 | ||
|
|
4569dbe800 | ||
|
|
f5a05bf0d8 | ||
|
|
54df1b3e51 | ||
|
|
e1155277fc | ||
|
|
3acd9ed35c | ||
|
|
ab0866b57e | ||
|
|
5725989343 | ||
|
|
1b112961d1 | ||
|
|
af7355a780 | ||
|
|
27be399727 | ||
|
|
b7a75188d8 | ||
|
|
fc8e69b5de | ||
|
|
7e3b9be506 | ||
|
|
d1facd3656 | ||
|
|
e6d600cf57 | ||
|
|
60aec2eff0 | ||
|
|
dd59ae7f69 | ||
|
|
f18d075220 | ||
|
|
b22bcd46ff | ||
|
|
948bab47b8 | ||
|
|
9b11671d34 | ||
|
|
09491cfc6d | ||
|
|
bd041a2e09 | ||
|
|
4fe49fe559 | ||
|
|
2116779527 | ||
|
|
5024d3b707 | ||
|
|
b113162582 | ||
|
|
edb0960a51 | ||
|
|
5e1f1ca81c | ||
|
|
eeaac6fdb0 | ||
|
|
832f08d13a | ||
|
|
e1393c96ca | ||
|
|
ec84564f28 | ||
|
|
83f6132b6a | ||
|
|
4acc942100 | ||
|
|
434f9600b7 | ||
|
|
440eb2a996 | ||
|
|
db0063314b | ||
|
|
4e6bc33b05 | ||
|
|
28fe72c1ec | ||
|
|
886e03af2f | ||
|
|
9d4b34b35b | ||
|
|
9311070f26 | ||
|
|
94e0748234 | ||
|
|
23e336c7ac | ||
|
|
a26a78c9fe | ||
|
|
c00ca35f09 | ||
|
|
57d7191332 | ||
|
|
9b29997498 | ||
|
|
3d77ba49ac | ||
|
|
939169c504 | ||
|
|
91c4beea0f | ||
|
|
151a6fd16b | ||
|
|
200ced62fb | ||
|
|
1076ec777c | ||
|
|
6866cecdfa | ||
|
|
0ea968a900 | ||
|
|
87a0a5846d | ||
|
|
af79969d96 | ||
|
|
49f026629c | ||
|
|
4dccd55490 | ||
|
|
5c350acb1c | ||
|
|
110a5ed398 | ||
|
|
0d4534eff4 | ||
|
|
b01888f092 | ||
|
|
8744441c8a | ||
|
|
6daa37a5c0 | ||
|
|
cb114283ea | ||
|
|
cab36f375b | ||
|
|
091bfc710f | ||
|
|
69e4670a17 | ||
|
|
41757254d6 | ||
|
|
d55079f474 | ||
|
|
ca6979e394 | ||
|
|
8f62ccb9b7 | ||
|
|
5da545c751 | ||
|
|
d1f1f62f9a | ||
|
|
02b4693068 | ||
|
|
901c1589ee | ||
|
|
4057445562 | ||
|
|
21f26669b4 | ||
|
|
afce55dab5 | ||
|
|
38aac70705 | ||
|
|
0764484f41 | ||
|
|
87c7fceae9 | ||
|
|
cc1410fbb5 | ||
|
|
58f95bd34c | ||
|
|
7493697955 | ||
|
|
2d69810c5d | ||
|
|
f2ec806d9c | ||
|
|
afa3de8040 | ||
|
|
d5d378a604 | ||
|
|
bb8dc3f3bc | ||
|
|
cdf25ee580 | ||
|
|
6d42820f94 | ||
|
|
d3ef281e66 | ||
|
|
ba59bfd8a4 | ||
|
|
c15a66d2e1 | ||
|
|
efd5629715 | ||
|
|
96bcaf1b40 | ||
|
|
783d2a6a7e | ||
|
|
f39cc49cd2 | ||
|
|
9c60a2c294 | ||
|
|
1990bc1ad8 | ||
|
|
c9159a3096 | ||
|
|
29acf957ae | ||
|
|
82d8ab0bce | ||
|
|
49aa1e189c | ||
|
|
2b4d8fbd63 | ||
|
|
1c493c7238 | ||
|
|
7ee6e48f17 | ||
|
|
0fbba0fa9d | ||
|
|
a14059a77d | ||
|
|
ac64908c2b | ||
|
|
b63eda8adf | ||
|
|
94e476d21f | ||
|
|
85d2db52ae | ||
|
|
13e2097272 | ||
|
|
df7f4d0a31 | ||
|
|
ecbab52f06 | ||
|
|
386480d493 | ||
|
|
daa73d1aca | ||
|
|
7597a58f53 | ||
|
|
cd99b502d8 | ||
|
|
ba6dd01446 | ||
|
|
98ea70bfa0 | ||
|
|
40abefa908 | ||
|
|
ec07a3cd3d | ||
|
|
6882201533 | ||
|
|
32a7537cff | ||
|
|
94e30b5416 | ||
|
|
71d6680b8b | ||
|
|
69a26be0b4 | ||
|
|
86500dc2aa | ||
|
|
a93eef38c0 | ||
|
|
f60e7a97fd | ||
|
|
b38ad54e15 | ||
|
|
0e85811cab | ||
|
|
51f86cfef4 | ||
|
|
fa75d7c440 | ||
|
|
f0946edfe0 | ||
|
|
ce24aef5aa | ||
|
|
a739e78ff7 | ||
|
|
03863d2bb2 | ||
|
|
e2bcb80ac4 | ||
|
|
84c3b39e15 | ||
|
|
c6743d8c6b | ||
|
|
c684fb8357 | ||
|
|
fd8766ec77 | ||
|
|
3e66f475e5 | ||
|
|
6de27703af | ||
|
|
f448c95bbe | ||
|
|
39bb25e959 | ||
|
|
3793585c38 | ||
|
|
7ef95f82c0 | ||
|
|
a46145f44f | ||
|
|
20d4cb1366 | ||
|
|
f269fb9104 | ||
|
|
ac0c1f3c70 | ||
|
|
a58e0fe217 | ||
|
|
09790b35ef | ||
|
|
c4a7c05c05 | ||
|
|
155d05265d | ||
|
|
4b4450d34f | ||
|
|
447165f8a1 | ||
|
|
c1b85b7409 | ||
|
|
cc5b310694 | ||
|
|
1ac2e1a8a6 | ||
|
|
2acc339341 | ||
|
|
894a11c9c1 | ||
|
|
5864e2d36e | ||
|
|
6bd28bcad8 | ||
|
|
4187380225 | ||
|
|
786cb06c7d | ||
|
|
60595059e2 | ||
|
|
41f9f07a80 | ||
|
|
e5afa3a26e | ||
|
|
b3c4a38b0f | ||
|
|
18d98500e9 | ||
|
|
a821117b83 | ||
|
|
a146782bcd | ||
|
|
eba60a6130 | ||
|
|
3213c30a37 | ||
|
|
6fe68322da | ||
|
|
1dddaf9b14 | ||
|
|
e5bdaa603a | ||
|
|
9d1b059835 | ||
|
|
b70ba7085a | ||
|
|
97e8d1d708 | ||
|
|
6e25dec617 | ||
|
|
9b5e70dc17 | ||
|
|
529ea20289 | ||
|
|
95e5bf16dd | ||
|
|
3e15e87b11 | ||
|
|
1fb162bb4c | ||
|
|
04ac55b91e | ||
|
|
08a4536a6a | ||
|
|
01fe6abeed | ||
|
|
a7944af73d | ||
|
|
094ef92638 | ||
|
|
98e4136be5 | ||
|
|
61598fc971 | ||
|
|
e4a7fe7cb2 | ||
|
|
8ba0ac0b8f | ||
|
|
511bb73278 | ||
|
|
2522ac4ad5 | ||
|
|
89f97ba0ec | ||
|
|
ef4454ddba | ||
|
|
0d16be3f94 | ||
|
|
70dde65687 | ||
|
|
33cfee2f9f | ||
|
|
8f2403394e | ||
|
|
2f9751f7ea | ||
|
|
b475476a22 | ||
|
|
01bfd4bd9d | ||
|
|
128a2127c9 | ||
|
|
22860839e6 | ||
|
|
117f0b41a2 | ||
|
|
5efc3dc221 | ||
|
|
7d399b4c6d | ||
|
|
691853843d | ||
|
|
08529b3e7e | ||
|
|
d576f3ea96 | ||
|
|
63597b0221 | ||
|
|
afbd2b520e | ||
|
|
8e1631bfc7 | ||
|
|
63cb82717b | ||
|
|
cb1fd77531 | ||
|
|
77e4a6c465 | ||
|
|
200dde18e8 | ||
|
|
fe92c31f4a | ||
|
|
cb039fd880 | ||
|
|
3ae31ec1ce | ||
|
|
12c9914d1b | ||
|
|
0876f2ae0d | ||
|
|
f2e63fff2e | ||
|
|
33fc5bbaa2 | ||
|
|
b3f5780862 | ||
|
|
c60554a14a | ||
|
|
ad1b9f3f2f | ||
|
|
c16e008ba1 | ||
|
|
9215d3292b | ||
|
|
ea9724a671 | ||
|
|
02fc3089d6 | ||
|
|
18e5fd19fa | ||
|
|
f037bda1de | ||
|
|
0c369b618d | ||
|
|
65eb33ad9e | ||
|
|
e8d610f9df | ||
|
|
718f9c4af8 | ||
|
|
db7c397345 | ||
|
|
e19a407a39 | ||
|
|
3c104158db | ||
|
|
d9e0a6a04f | ||
|
|
99f127148e | ||
|
|
cce6ba65dd | ||
|
|
bb6162059d | ||
|
|
32a2610e7d | ||
|
|
e1846b1030 | ||
|
|
dcc808a8b9 | ||
|
|
986d068e28 | ||
|
|
65d9325287 | ||
|
|
e5a85caef6 | ||
|
|
e6d9545c30 | ||
|
|
4162215582 | ||
|
|
2b8b690892 | ||
|
|
b4a9a6fea5 | ||
|
|
cf66d96746 | ||
|
|
c82db9716c | ||
|
|
b1db06a3c6 | ||
|
|
a199f80ed4 | ||
|
|
2cd6b05aba | ||
|
|
9bcf0d5b38 | ||
|
|
9795734dc8 | ||
|
|
e5242bab49 | ||
|
|
d4052a0e62 | ||
|
|
b5b4f6df82 | ||
|
|
d89ae67c4d | ||
|
|
a225a4e440 | ||
|
|
626ced812a | ||
|
|
75bdb82b5c | ||
|
|
74ba812061 | ||
|
|
c966c3b8d7 | ||
|
|
762d0ca338 | ||
|
|
131b22576b | ||
|
|
704da21c60 | ||
|
|
8bbb150b07 | ||
|
|
9670ca0fbb | ||
|
|
76f91e7854 | ||
|
|
f911f66ead | ||
|
|
1a8a12fb0c | ||
|
|
9bc41cf04f | ||
|
|
869532d094 | ||
|
|
db88121ed8 | ||
|
|
262baf1870 | ||
|
|
277a2a4d58 | ||
|
|
11a748b94e | ||
|
|
46cd05c54a | ||
|
|
ff3784ad3f | ||
|
|
4f18cf6645 | ||
|
|
aa982fe8df | ||
|
|
6a126835cc | ||
|
|
c95ce5eb12 | ||
|
|
86717f7b25 | ||
|
|
35fb4c03a7 | ||
|
|
f1cf828f34 | ||
|
|
ddf6d0b7e2 | ||
|
|
b1324c6269 | ||
|
|
26123510a6 | ||
|
|
5e7d4bf0c3 | ||
|
|
12f7e2d685 | ||
|
|
083f512aae | ||
|
|
5a06ba651a | ||
|
|
d31208d1e5 | ||
|
|
f49e5a8610 | ||
|
|
23ebe91d32 | ||
|
|
007dbc858f | ||
|
|
0a6d959742 | ||
|
|
06c19641b4 | ||
|
|
0f2fd47ca0 | ||
|
|
92031120e3 | ||
|
|
7f0c5b8a7a | ||
|
|
bcd2790649 | ||
|
|
7918c2f37c | ||
|
|
1ef7247311 | ||
|
|
235a2574dc | ||
|
|
4dc07d9872 | ||
|
|
a87c46843c | ||
|
|
7ff69d5e6d | ||
|
|
baca89c575 | ||
|
|
c5471fc25c | ||
|
|
e86b6443f2 | ||
|
|
bf4bb854b1 | ||
|
|
779241db7a | ||
|
|
11f1f6cff1 | ||
|
|
7ad6e1b76a | ||
|
|
d414122efd |
70
.env
Normal file
70
.env
Normal file
@@ -0,0 +1,70 @@
|
||||
# Default ENV vars (primarily for the development environment).
|
||||
# Create `.env.development.local` or `.env.test.local` to add any local overrides.
|
||||
|
||||
# Time zone must match the operating system time zone in order to pass all tests.
|
||||
# This string is the key for the MAPPING hash constant in ActiveSupport::TimeZone.
|
||||
# Documentation including the hash="https://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html
|
||||
TIMEZONE="Melbourne"
|
||||
|
||||
# Default country for dropdowns etc. See for codes="http://en.wikipedia.org/wiki/ISO_3166-1
|
||||
DEFAULT_COUNTRY_CODE="AU"
|
||||
|
||||
# Locale for translation.
|
||||
LOCALE="en"
|
||||
|
||||
# For multilingual - ENV doesn't have array so pass it as string with commas
|
||||
AVAILABLE_LOCALES="en,es"
|
||||
|
||||
# Spree zone.
|
||||
CHECKOUT_ZONE="Australia"
|
||||
|
||||
# Find currency codes at http://en.wikipedia.org/wiki/ISO_4217.
|
||||
CURRENCY="AUD"
|
||||
|
||||
# The whenever gem can set the `MAILTO` variable for our cron jobs.
|
||||
# You can define an email address to notify if any job outputs something.
|
||||
# But you need a working mail server setup so that the message is delivered.
|
||||
# See: config/schedule.rb
|
||||
# SCHEDULE_NOTIFICATIONS="admin@example.com"
|
||||
|
||||
# Mail settings
|
||||
MAIL_HOST="example.com"
|
||||
MAIL_DOMAIN="example.com"
|
||||
MAIL_PORT="25"
|
||||
SMTP_USERNAME="ofn"
|
||||
SMTP_PASSWORD="f00d"
|
||||
|
||||
# Optional mail settings
|
||||
# MAIL_SECURE_CONNECTION="TLS' # 'None' (default), 'SSL' or 'TLS'
|
||||
# MAILS_FROM="hello@example.com"
|
||||
# MAIL_BCC="manager@example.com"
|
||||
|
||||
# Javascript error reporting via Bugsnag.
|
||||
# BUGSNAG_JS_KEY=""
|
||||
|
||||
# SingleSignOn login for Discourse
|
||||
#
|
||||
# DISCOURSE_SSO_SECRET should be a random string. It must be the same as provided to your Discourse instance.
|
||||
# DISCOURSE_SSO_SECRET=""
|
||||
#
|
||||
# DISCOURSE_URL must be the URL of your Discourse instance.
|
||||
# DISCOURSE_URL="https://noticeboard.openfoodnetwork.org.au"
|
||||
|
||||
# see="https://developers.google.com/maps/documentation/javascript/get-api-key
|
||||
# GOOGLE_MAPS_API_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
# Stripe Connect details for instance account
|
||||
# Find these under 'API keys' and 'Connect' in your Stripe account dashboard -> Account Settings
|
||||
# Under 'Connect', the Redirect URI should be set to https://YOUR_SERVER_URL/stripe/callbacks (e.g. https://openfoodnetwork.org.uk/stripe/callbacks)
|
||||
# Under 'Webhooks', you should set up a Connect endpoint pointing to https://YOUR_SERVER_URL/stripe/webhooks e.g. (https://openfoodnetwork.org.uk/stripe/webhooks)
|
||||
# STRIPE_INSTANCE_SECRET_KEY="sk_test_xxxxxx" # This can be a test key or a live key
|
||||
# STRIPE_INSTANCE_PUBLISHABLE_KEY="pk_test_xxxx" # This can be a test key or a live key
|
||||
# STRIPE_CLIENT_ID="ca_xxxx" # This can be a development ID or a production ID
|
||||
# STRIPE_ENDPOINT_SECRET="whsec_xxxx"
|
||||
|
||||
# Feature toggles
|
||||
#
|
||||
# Adding user emails separated by commas will enable them the use of certain features. See
|
||||
# config/initializers/feature_toggles.rb for details.
|
||||
#
|
||||
# BETA_TESTERS="ofn@example.com,superadmin@example.com"
|
||||
7
.env.development
Normal file
7
.env.development
Normal file
@@ -0,0 +1,7 @@
|
||||
# ENV vars for the development environment
|
||||
# Override locally with `.env.development.local`
|
||||
|
||||
SECRET_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
OFN_REDIS_URL="redis://localhost:6379/1"
|
||||
OFN_REDIS_JOBS_URL="redis://localhost:6379/2"
|
||||
4
.env.test
Normal file
4
.env.test
Normal file
@@ -0,0 +1,4 @@
|
||||
# ENV vars for the test environment
|
||||
# Override locally with `.env.test.local`
|
||||
|
||||
SECRET_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
5
.github/codecov.yml
vendored
5
.github/codecov.yml
vendored
@@ -1,5 +0,0 @@
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
informational: true
|
||||
27
.github/workflows/build.yml
vendored
27
.github/workflows/build.yml
vendored
@@ -10,6 +10,7 @@ env:
|
||||
TIMEZONE: UTC
|
||||
COVERAGE: true
|
||||
RSPEC_RETRY_RETRY_COUNT: 3
|
||||
RAILS_ENV: test
|
||||
|
||||
jobs:
|
||||
test-controllers-and-serializers:
|
||||
@@ -53,9 +54,6 @@ jobs:
|
||||
- name: Run controller tests
|
||||
run: bundle exec rspec --profile -- spec/controllers spec/serializers
|
||||
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v1.3.1
|
||||
|
||||
test-models:
|
||||
runs-on: ubuntu-18.04
|
||||
services:
|
||||
@@ -97,9 +95,6 @@ jobs:
|
||||
- name: Run tests
|
||||
run: bundle exec rspec --profile -- spec/models
|
||||
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v1.3.1
|
||||
|
||||
test-admin-features-1:
|
||||
runs-on: ubuntu-18.04
|
||||
services:
|
||||
@@ -141,9 +136,6 @@ jobs:
|
||||
- name: Run admin feature tests
|
||||
run: bundle exec rspec --profile -- spec/features/admin/[a-o0-9]*_spec.rb
|
||||
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v1.3.1
|
||||
|
||||
test-admin-features-2:
|
||||
runs-on: ubuntu-18.04
|
||||
services:
|
||||
@@ -185,9 +177,6 @@ jobs:
|
||||
- name: Run admin feature tests
|
||||
run: bundle exec rspec --profile -- spec/features/admin/[p-z]*_spec.rb
|
||||
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v1.3.1
|
||||
|
||||
test-consumer-features:
|
||||
runs-on: ubuntu-18.04
|
||||
services:
|
||||
@@ -229,9 +218,6 @@ jobs:
|
||||
- name: Run consumer feature tests
|
||||
run: bundle exec rspec --profile -- spec/features/consumer
|
||||
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v1.3.1
|
||||
|
||||
test-engines-etc:
|
||||
runs-on: ubuntu-18.04
|
||||
services:
|
||||
@@ -273,13 +259,19 @@ jobs:
|
||||
- name: Run JS tests
|
||||
run: RAILS_ENV=test bundle exec rake karma:run
|
||||
|
||||
- name: Run jest tests
|
||||
run: yarn jest
|
||||
|
||||
# Migration tests need to be run in a separate task.
|
||||
# See: https://github.com/openfoodfoundation/openfoodnetwork/pull/6924#issuecomment-813056525
|
||||
- name: Run migration tests
|
||||
run: bundle exec rspec --pattern "spec/{migrations}/**/*_spec.rb"
|
||||
|
||||
- name: Run system tests
|
||||
run: bundle exec rspec --profile -- spec/system
|
||||
|
||||
- name: Run all other tests
|
||||
run: bundle exec rake ofn:specs:run:excluding_folders["models,controllers,serializers,features,lib,migrations"]
|
||||
run: bundle exec rake ofn:specs:run:excluding_folders["models,controllers,serializers,features,lib,migrations,system"]
|
||||
|
||||
test-the-rest:
|
||||
runs-on: ubuntu-18.04
|
||||
@@ -321,6 +313,3 @@ jobs:
|
||||
|
||||
- name: Run admin feature folders, engines, lib
|
||||
run: bundle exec rspec --profile --pattern "engines/*/spec/{,/*/**}/*_spec.rb,spec/features/admin/*/*_spec.rb,spec/lib/{,/*/**}/*_spec.rb"
|
||||
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v1.5.0
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,6 +2,9 @@
|
||||
.rbenv-version
|
||||
.python-version
|
||||
.byebug_history
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.swp
|
||||
*.swo
|
||||
*.swp
|
||||
|
||||
@@ -18,49 +18,22 @@
|
||||
#
|
||||
# This process probably doesn't need repeating. Otherwise there is plenty
|
||||
# of room for improvements and automation.
|
||||
|
||||
Layout/LineLength:
|
||||
Max: 100
|
||||
Exclude:
|
||||
- app/controllers/spree/admin/products_controller.rb
|
||||
- app/controllers/spree/admin/reports_controller.rb
|
||||
- app/controllers/spree/paypal_controller.rb
|
||||
- engines/order_management/spec/services/order_management/order/stripe_sca_payment_authorize_spec.rb
|
||||
- engines/order_management/spec/services/order_management/order/updater_spec.rb
|
||||
- engines/order_management/spec/services/order_management/reports/bulk_coop/bulk_coop_report_spec.rb
|
||||
- lib/open_food_network/reports/line_items.rb
|
||||
- spec/controllers/spree/admin/orders/invoices_spec.rb
|
||||
- spec/controllers/spree/admin/tax_rates_controller_spec.rb
|
||||
- spec/controllers/user_passwords_controller_spec.rb
|
||||
- spec/features/admin/configuration/general_settings_spec.rb
|
||||
- spec/features/consumer/shopping/unit_price_spec.rb
|
||||
- spec/helpers/admin/orders_helper_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_management_report_spec.rb
|
||||
- spec/lib/stripe/authorize_response_patcher_spec.rb
|
||||
- spec/services/bulk_invoice_service_spec.rb
|
||||
- spec/services/content_sanitizer_spec.rb
|
||||
- spec/services/process_payment_intent_spec.rb
|
||||
- spec/support/features/datepicker_helper.rb
|
||||
- app/controllers/admin/bulk_line_items_controller.rb
|
||||
- app/controllers/admin/contents_controller.rb
|
||||
- app/controllers/admin/customers_controller.rb
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
- app/controllers/admin/enterprise_relationships_controller.rb
|
||||
- app/controllers/admin/enterprise_roles_controller.rb
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/admin/inventory_items_controller.rb
|
||||
- app/controllers/admin/manager_invitations_controller.rb
|
||||
- app/controllers/admin/product_import_controller.rb
|
||||
- app/controllers/admin/schedules_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
- app/controllers/api/enterprise_attachment_controller.rb
|
||||
- app/controllers/api/product_images_controller.rb
|
||||
- app/controllers/spree/paypal_controller_decorator.rb
|
||||
- app/controllers/stripe/callbacks_controller.rb
|
||||
- app/controllers/api/v0/order_cycles_controller.rb
|
||||
- app/controllers/spree/paypal_controller.rb
|
||||
- app/helpers/angular_form_builder.rb
|
||||
- app/helpers/angular_form_helper.rb
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/enterprises_helper.rb
|
||||
- app/helpers/markdown_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/spree/orders_helper.rb
|
||||
- app/jobs/subscription_confirm_job.rb
|
||||
@@ -69,110 +42,91 @@ Layout/LineLength:
|
||||
- app/models/concerns/order_shipment.rb
|
||||
- app/models/concerns/product_stock.rb
|
||||
- app/models/concerns/variant_stock.rb
|
||||
- app/models/content_configuration.rb
|
||||
- app/models/customer.rb
|
||||
- app/models/enterprise_group.rb
|
||||
- app/models/enterprise_role.rb
|
||||
- app/models/inventory_item.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/spreadsheet_entry.rb
|
||||
- app/models/product_import/unit_converter.rb
|
||||
- app/models/proxy_order.rb
|
||||
- app/models/schedule.rb
|
||||
- app/models/spree/app_configuration.rb
|
||||
- app/models/spree/gateway/stripe_connect.rb
|
||||
- app/models/spree/image.rb
|
||||
- app/models/spree/line_item.rb
|
||||
- app/models/spree/order.rb
|
||||
- app/models/spree/payment_method.rb
|
||||
- app/models/spree/product.rb
|
||||
- app/models/spree/user.rb
|
||||
- app/models/spree/variant.rb
|
||||
- app/models/spree/preferences/store.rb
|
||||
- app/models/subscription.rb
|
||||
- app/models/variant_override.rb
|
||||
- app/serializers/api/admin/subscription_line_item_serializer.rb
|
||||
- app/serializers/api/admin/subscription_serializer.rb
|
||||
- app/services/cart_service.rb
|
||||
- app/services/checkout/post_checkout_actions.rb
|
||||
- app/services/default_stock_location.rb
|
||||
- app/services/embedded_page_service.rb
|
||||
- app/services/order_cycle_form.rb
|
||||
- app/services/order_factory.rb
|
||||
- app/services/order_syncer.rb
|
||||
- app/services/variant_units/variant_and_line_item_naming.rb
|
||||
- engines/order_management/app/services/order_management/reports/bulk_coop/bulk_coop_report.rb
|
||||
- engines/order_management/app/services/order_management/subscriptions/validator.rb
|
||||
- engines/order_management/spec/services/order_management/order/stripe_sca_payment_authorize_spec.rb
|
||||
- engines/order_management/spec/services/order_management/order/updater_spec.rb
|
||||
- engines/web/app/helpers/web/cookies_policy_helper.rb
|
||||
- engines/web/config/routes.rb
|
||||
- engines/web/spec/features/consumer/cookies_spec.rb
|
||||
- Gemfile
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/available_payment_method_filter.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
- lib/open_food_network/customers_report.rb
|
||||
- lib/open_food_network/enterprise_fee_applicator.rb
|
||||
- lib/open_food_network/enterprise_fee_calculator.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/open_food_network/group_buy_report.rb
|
||||
- lib/open_food_network/lettuce_share_report.rb
|
||||
- lib/open_food_network/order_cycle_form_applicator.rb
|
||||
- lib/open_food_network/order_cycle_management_report.rb
|
||||
- lib/open_food_network/order_cycle_permissions.rb
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/open_food_network/reports/line_items.rb
|
||||
- lib/open_food_network/sales_tax_report.rb
|
||||
- lib/open_food_network/scope_variants_for_search.rb
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
- lib/spree/core/calculated_adjustments.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- lib/stripe/credit_card_clone_finder.rb
|
||||
- lib/tasks/data.rake
|
||||
- lib/tasks/enterprises.rake
|
||||
- spec/controllers/admin/bulk_line_items_controller_spec.rb
|
||||
- spec/controllers/admin/column_preferences_controller_spec.rb
|
||||
- spec/controllers/admin/customers_controller_spec.rb
|
||||
- spec/controllers/admin/enterprises_controller_spec.rb
|
||||
- spec/controllers/admin/inventory_items_controller_spec.rb
|
||||
- spec/controllers/admin/manager_invitations_controller_spec.rb
|
||||
- spec/controllers/admin/order_cycles_controller_spec.rb
|
||||
- spec/controllers/admin/proxy_orders_controller_spec.rb
|
||||
- spec/controllers/admin/schedules_controller_spec.rb
|
||||
- spec/controllers/admin/stripe_accounts_controller_spec.rb
|
||||
- spec/controllers/admin/stripe_connect_settings_controller_spec.rb
|
||||
- spec/controllers/admin/subscription_line_items_controller_spec.rb
|
||||
- spec/controllers/admin/subscriptions_controller_spec.rb
|
||||
- spec/controllers/admin/variant_overrides_controller_spec.rb
|
||||
- spec/controllers/api/base_controller_spec.rb
|
||||
- spec/controllers/api/exchange_products_controller_spec.rb
|
||||
- spec/controllers/api/logos_controller_spec.rb
|
||||
- spec/controllers/api/order_cycles_controller_spec.rb
|
||||
- spec/controllers/api/orders_controller_spec.rb
|
||||
- spec/controllers/api/product_images_controller_spec.rb
|
||||
- spec/controllers/api/products_controller_spec.rb
|
||||
- spec/controllers/api/promo_images_controller_spec.rb
|
||||
- spec/controllers/api/states_controller_spec.rb
|
||||
- spec/controllers/api/terms_and_conditions_controller_spec.rb
|
||||
- spec/controllers/api/variants_controller_spec.rb
|
||||
- spec/controllers/api/v0/base_controller_spec.rb
|
||||
- spec/controllers/api/v0/enterprises_controller_spec.rb
|
||||
- spec/controllers/api/v0/exchange_products_controller_spec.rb
|
||||
- spec/controllers/api/v0/logos_controller_spec.rb
|
||||
- spec/controllers/api/v0/order_cycles_controller_spec.rb
|
||||
- spec/controllers/api/v0/orders_controller_spec.rb
|
||||
- spec/controllers/api/v0/product_images_controller_spec.rb
|
||||
- spec/controllers/api/v0/products_controller_spec.rb
|
||||
- spec/controllers/api/v0/promo_images_controller_spec.rb
|
||||
- spec/controllers/api/v0/terms_and_conditions_controller_spec.rb
|
||||
- spec/controllers/cart_controller_spec.rb
|
||||
- spec/controllers/checkout_controller_spec.rb
|
||||
- spec/controllers/enterprises_controller_spec.rb
|
||||
- spec/controllers/line_items_controller_spec.rb
|
||||
- spec/controllers/shop_controller_spec.rb
|
||||
- spec/controllers/shops_controller_spec.rb
|
||||
- spec/controllers/spree/admin/adjustments_controller_spec.rb
|
||||
- spec/controllers/spree/admin/base_controller_spec.rb
|
||||
- spec/controllers/spree/admin/orders_controller_spec.rb
|
||||
- spec/controllers/spree/admin/orders/customer_details_controller_spec.rb
|
||||
- spec/controllers/spree/admin/orders/invoices_spec.rb
|
||||
- spec/controllers/spree/admin/payment_methods_controller_spec.rb
|
||||
- spec/controllers/spree/admin/products_controller_spec.rb
|
||||
- spec/controllers/spree/admin/reports_controller_spec.rb
|
||||
- spec/controllers/spree/admin/variants_controller_spec.rb
|
||||
- spec/controllers/spree/credit_cards_controller_spec.rb
|
||||
- spec/controllers/spree/orders_controller_spec.rb
|
||||
- spec/controllers/spree/users_controller_spec.rb
|
||||
- spec/controllers/spree/user_sessions_controller_spec.rb
|
||||
- spec/controllers/stripe/callbacks_controller_spec.rb
|
||||
- spec/controllers/stripe/webhooks_controller_spec.rb
|
||||
- spec/controllers/user_confirmations_controller_spec.rb
|
||||
- spec/factories/line_item_factory.rb
|
||||
- spec/factories/order_factory.rb
|
||||
- spec/factories/shipment_factory.rb
|
||||
- spec/factories/stock_location_factory.rb
|
||||
- spec/factories/user_factory.rb
|
||||
- spec/features/admin/adjustments_spec.rb
|
||||
- spec/features/admin/bulk_order_management_spec.rb
|
||||
- spec/features/admin/bulk_product_update_spec.rb
|
||||
@@ -180,13 +134,10 @@ Layout/LineLength:
|
||||
- spec/features/admin/customers_spec.rb
|
||||
- spec/features/admin/enterprise_fees_spec.rb
|
||||
- spec/features/admin/enterprise_relationships_spec.rb
|
||||
- spec/features/admin/enterprise_roles_spec.rb
|
||||
- spec/features/admin/enterprises/images_spec.rb
|
||||
- spec/features/admin/enterprises/index_spec.rb
|
||||
- spec/features/admin/enterprises_spec.rb
|
||||
- spec/features/admin/enterprise_user_spec.rb
|
||||
- spec/features/admin/multilingual_spec.rb
|
||||
- spec/features/admin/order_cycles/complex_creating_specific_time_spec.rb
|
||||
- spec/features/admin/order_cycles/complex_editing_multiple_product_pages_spec.rb
|
||||
- spec/features/admin/order_cycles/complex_editing_spec.rb
|
||||
- spec/features/admin/order_cycles/complex_updating_specific_time_spec.rb
|
||||
@@ -195,6 +146,7 @@ Layout/LineLength:
|
||||
- spec/features/admin/order_spec.rb
|
||||
- spec/features/admin/overview_spec.rb
|
||||
- spec/features/admin/payment_method_spec.rb
|
||||
- spec/features/admin/payments_stripe_spec.rb
|
||||
- spec/features/admin/product_import_spec.rb
|
||||
- spec/features/admin/products_spec.rb
|
||||
- spec/features/admin/reports_spec.rb
|
||||
@@ -204,76 +156,49 @@ Layout/LineLength:
|
||||
- spec/features/admin/tag_rules_spec.rb
|
||||
- spec/features/admin/users_spec.rb
|
||||
- spec/features/admin/variant_overrides_spec.rb
|
||||
- spec/features/consumer/account/cards_spec.rb
|
||||
- spec/features/consumer/account/settings_spec.rb
|
||||
- spec/features/consumer/account_spec.rb
|
||||
- spec/features/consumer/authentication_spec.rb
|
||||
- spec/features/consumer/caching/darkswarm_caching_spec.rb
|
||||
- spec/features/consumer/caching/shops_caching_spec.rb
|
||||
- spec/features/consumer/groups_spec.rb
|
||||
- spec/features/consumer/multilingual_spec.rb
|
||||
- spec/features/consumer/producers_spec.rb
|
||||
- spec/features/consumer/registration_spec.rb
|
||||
- spec/features/consumer/shopping/cart_spec.rb
|
||||
- spec/features/consumer/shopping/checkout_auth_spec.rb
|
||||
- spec/features/consumer/shopping/checkout_spec.rb
|
||||
- spec/features/consumer/shopping/checkout_stripe_spec.rb
|
||||
- spec/features/consumer/shopping/embedded_groups_spec.rb
|
||||
- spec/features/consumer/shopping/embedded_shopfronts_spec.rb
|
||||
- spec/features/consumer/shopping/orders_spec.rb
|
||||
- spec/features/consumer/shopping/products_spec.rb
|
||||
- spec/features/consumer/shopping/shopping_spec.rb
|
||||
- spec/features/consumer/shopping/unit_price_spec.rb
|
||||
- spec/features/consumer/shopping/variant_overrides_spec.rb
|
||||
- spec/features/consumer/shops_spec.rb
|
||||
- spec/helpers/admin/subscriptions_helper_spec.rb
|
||||
- spec/helpers/checkout_helper_spec.rb
|
||||
- spec/helpers/enterprises_helper_spec.rb
|
||||
- spec/helpers/groups_helper_spec.rb
|
||||
- spec/helpers/injection_helper_spec.rb
|
||||
- spec/helpers/order_cycles_helper_spec.rb
|
||||
- spec/helpers/spree/admin/base_helper_spec.rb
|
||||
- spec/jobs/confirm_order_job_spec.rb
|
||||
- spec/jobs/subscription_confirm_job_spec.rb
|
||||
- spec/jobs/subscription_placement_job_spec.rb
|
||||
- spec/lib/open_food_network/address_finder_spec.rb
|
||||
- spec/lib/open_food_network/customers_report_spec.rb
|
||||
- spec/lib/open_food_network/enterprise_fee_applicator_spec.rb
|
||||
- spec/lib/open_food_network/enterprise_fee_calculator_spec.rb
|
||||
- spec/lib/open_food_network/group_buy_report_spec.rb
|
||||
- spec/lib/open_food_network/lettuce_share_report_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_form_applicator_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_management_report_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_permissions_spec.rb
|
||||
- spec/lib/open_food_network/order_grouper_spec.rb
|
||||
- spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb
|
||||
- spec/lib/open_food_network/permissions_spec.rb
|
||||
- spec/lib/open_food_network/products_and_inventory_report_spec.rb
|
||||
- spec/lib/open_food_network/scope_variant_to_hub_spec.rb
|
||||
- spec/lib/open_food_network/tag_rule_applicator_spec.rb
|
||||
- spec/lib/open_food_network/users_and_enterprises_report_spec.rb
|
||||
- spec/lib/open_food_network/xero_invoices_report_spec.rb
|
||||
- spec/lib/spree/core/calculated_adjustments_spec.rb
|
||||
- spec/lib/stripe/account_connector_spec.rb
|
||||
- spec/lib/stripe/webhook_handler_spec.rb
|
||||
- spec/lib/stripe/authorize_response_patcher_spec.rb
|
||||
- spec/mailers/order_mailer_spec.rb
|
||||
- spec/mailers/producer_mailer_spec.rb
|
||||
- spec/mailers/subscription_mailer_spec.rb
|
||||
- spec/models/calculator/flexi_rate_spec.rb
|
||||
- spec/models/calculator/price_sack_spec.rb
|
||||
- spec/models/calculator/weight_spec.rb
|
||||
- spec/models/column_preference_spec.rb
|
||||
- spec/models/concerns/order_shipment_spec.rb
|
||||
- spec/models/concerns/product_stock_spec.rb
|
||||
- spec/models/customer_spec.rb
|
||||
- spec/models/enterprise_caching_spec.rb
|
||||
- spec/models/enterprise_fee_spec.rb
|
||||
- spec/models/enterprise_group_spec.rb
|
||||
- spec/models/enterprise_relationship_spec.rb
|
||||
- spec/models/enterprise_spec.rb
|
||||
- spec/models/exchange_spec.rb
|
||||
- spec/models/order_cycle_spec.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
- spec/models/product_import/reset_absent_spec.rb
|
||||
- spec/models/proxy_order_spec.rb
|
||||
- spec/models/spree/ability_spec.rb
|
||||
- spec/models/spree/address_spec.rb
|
||||
- spec/models/spree/adjustment_spec.rb
|
||||
@@ -284,91 +209,50 @@ Layout/LineLength:
|
||||
- spec/models/spree/order/checkout_spec.rb
|
||||
- spec/models/spree/order_inventory_spec.rb
|
||||
- spec/models/spree/order_spec.rb
|
||||
- spec/models/spree/order/state_machine_spec.rb
|
||||
- spec/models/spree/payment_method_spec.rb
|
||||
- spec/models/spree/payment_spec.rb
|
||||
- spec/models/spree/product_set_spec.rb
|
||||
- spec/models/spree/product_spec.rb
|
||||
- spec/models/spree/return_authorization_spec.rb
|
||||
- spec/models/spree/shipping_method_spec.rb
|
||||
- spec/models/spree/stock_item_spec.rb
|
||||
- spec/models/spree/taxon_spec.rb
|
||||
- spec/models/spree/tax_rate_spec.rb
|
||||
- spec/models/spree/user_spec.rb
|
||||
- spec/models/spree/variant_spec.rb
|
||||
- spec/models/stripe_account_spec.rb
|
||||
- spec/models/tag_rule/discount_order_spec.rb
|
||||
- spec/models/tag_rule/filter_order_cycles_spec.rb
|
||||
- spec/models/tag_rule/filter_payment_methods_spec.rb
|
||||
- spec/models/tag_rule/filter_products_spec.rb
|
||||
- spec/models/tag_rule/filter_shipping_methods_spec.rb
|
||||
- spec/models/terms_of_service_file_spec.rb
|
||||
- spec/models/variant_override_spec.rb
|
||||
- spec/performance/orders_controller_spec.rb
|
||||
- spec/performance/shop_controller_spec.rb
|
||||
- spec/requests/api/orders_spec.rb
|
||||
- spec/requests/checkout/failed_checkout_spec.rb
|
||||
- spec/requests/embedded_shopfronts_headers_spec.rb
|
||||
- spec/serializers/api/admin/customer_serializer_spec.rb
|
||||
- spec/serializers/api/admin/exchange_serializer_spec.rb
|
||||
- spec/serializers/api/admin/for_order_cycle/supplied_product_serializer_spec.rb
|
||||
- spec/serializers/api/admin/order_cycle_serializer_spec.rb
|
||||
- spec/serializers/api/admin/subscription_customer_serializer_spec.rb
|
||||
- spec/serializers/api/admin/variant_override_serializer_spec.rb
|
||||
- spec/serializers/api/current_order_serializer_spec.rb
|
||||
- spec/serializers/api/enterprise_shopfront_serializer_spec.rb
|
||||
- spec/serializers/api/order_serializer_spec.rb
|
||||
- spec/services/address_geocoder_spec.rb
|
||||
- spec/services/cart_service_spec.rb
|
||||
- spec/services/checkout/form_data_adapter_spec.rb
|
||||
- spec/services/checkout/post_checkout_actions_spec.rb
|
||||
- spec/services/content_sanitizer_spec.rb
|
||||
- spec/services/embedded_page_service_spec.rb
|
||||
- spec/services/exchange_products_renderer_spec.rb
|
||||
- spec/services/order_cycle_distributed_products_spec.rb
|
||||
- spec/services/order_cycle_distributed_variants_spec.rb
|
||||
- spec/services/order_cycle_form_spec.rb
|
||||
- spec/services/order_factory_spec.rb
|
||||
- spec/services/order_syncer_spec.rb
|
||||
- spec/services/paypal_items_builder_spec.rb
|
||||
- spec/services/permissions/order_spec.rb
|
||||
- spec/services/permitted_attributes/order_cycle_spec.rb
|
||||
- spec/services/products_renderer_spec.rb
|
||||
- spec/services/product_tag_rules_filterer_spec.rb
|
||||
- spec/services/variant_units/option_value_namer_spec.rb
|
||||
- spec/spec_helper.rb
|
||||
- spec/support/cancan_helper.rb
|
||||
- spec/support/matchers/delegate_matchers.rb
|
||||
- spec/support/features/datepicker_helper.rb
|
||||
- spec/support/matchers/select2_matchers.rb
|
||||
- spec/support/matchers/table_matchers.rb
|
||||
- spec/support/request/shop_workflow.rb
|
||||
- spec/support/request/stripe_stubs.rb
|
||||
- spec/support/request/web_helper.rb
|
||||
- spec/support/seeds.rb
|
||||
- spec/swagger_helper.rb
|
||||
- spec/views/spree/admin/payment_methods/index.html.haml_spec.rb
|
||||
|
||||
Metrics/AbcSize:
|
||||
Max: 15
|
||||
Exclude:
|
||||
- app/controllers/admin/schedules_controller.rb
|
||||
- app/controllers/checkout_controller.rb
|
||||
- app/controllers/spree/admin/general_settings_controller.rb
|
||||
- app/controllers/spree/admin/images_controller.rb
|
||||
- app/controllers/spree/admin/mail_methods_controller.rb
|
||||
- app/controllers/spree/admin/shipping_methods_controller.rb
|
||||
- app/controllers/spree/paypal_controller.rb
|
||||
- app/helpers/spree/base_helper.rb
|
||||
- app/jobs/subscription_placement_job.rb
|
||||
- app/models/order_cycle.rb
|
||||
- app/models/product_import/unit_converter.rb
|
||||
- app/models/spree/gateway/pay_pal_express.rb
|
||||
- app/serializers/api/admin/enterprise_serializer.rb
|
||||
- app/services/order_factory.rb
|
||||
- app/services/variants_stock_levels.rb
|
||||
- engines/order_management/app/services/order_management/subscriptions/form.rb
|
||||
- lib/open_food_network/enterprise_fee_calculator.rb
|
||||
- lib/open_food_network/order_grouper.rb
|
||||
- lib/spree/core/controller_helpers/auth.rb
|
||||
- lib/spree/core/controller_helpers/common.rb
|
||||
- lib/spree/core/product_duplicator.rb
|
||||
- lib/stripe/authorize_response_patcher.rb
|
||||
- lib/stripe/profile_storer.rb
|
||||
- app/controllers/admin/bulk_line_items_controller.rb
|
||||
- app/controllers/admin/customers_controller.rb
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
@@ -376,19 +260,23 @@ Metrics/AbcSize:
|
||||
- app/controllers/admin/order_cycles_controller.rb
|
||||
- app/controllers/admin/product_import_controller.rb
|
||||
- app/controllers/admin/resource_controller.rb
|
||||
- app/controllers/admin/schedules_controller.rb
|
||||
- app/controllers/admin/stripe_accounts_controller.rb
|
||||
- app/controllers/admin/subscription_line_items_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
- app/controllers/api/enterprises_controller.rb
|
||||
- app/controllers/api/product_images_controller.rb
|
||||
- app/controllers/api/products_controller.rb
|
||||
- app/controllers/api/shipments_controller.rb
|
||||
- app/controllers/api/taxons_controller.rb
|
||||
- app/controllers/api/variants_controller.rb
|
||||
- app/controllers/application_controller.rb
|
||||
- app/controllers/cart_controller.rb
|
||||
- app/controllers/api/v0/enterprises_controller.rb
|
||||
- app/controllers/api/v0/product_images_controller.rb
|
||||
- app/controllers/api/v0/products_controller.rb
|
||||
- app/controllers/api/v0/shipments_controller.rb
|
||||
- app/controllers/api/v0/taxons_controller.rb
|
||||
- app/controllers/api/v0/variants_controller.rb
|
||||
- app/controllers/checkout_controller.rb
|
||||
- app/controllers/discourse_sso_controller.rb
|
||||
- app/controllers/enterprises_controller.rb
|
||||
- app/controllers/spree/admin/adjustments_controller.rb
|
||||
- app/controllers/spree/admin/general_settings_controller.rb
|
||||
- app/controllers/spree/admin/images_controller.rb
|
||||
- app/controllers/spree/admin/mail_methods_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/orders/customer_details_controller.rb
|
||||
- app/controllers/spree/admin/overview_controller.rb
|
||||
@@ -397,14 +285,14 @@ Metrics/AbcSize:
|
||||
- app/controllers/spree/admin/products_controller.rb
|
||||
- app/controllers/spree/admin/reports_controller.rb
|
||||
- app/controllers/spree/admin/search_controller.rb
|
||||
- app/controllers/spree/admin/shipping_methods_controller.rb
|
||||
- app/controllers/spree/admin/taxons_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/controllers/spree/admin/variants_controller.rb
|
||||
- app/controllers/spree/credit_cards_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/controllers/spree/paypal_controller_decorator.rb
|
||||
- app/controllers/spree/paypal_controller.rb
|
||||
- app/controllers/spree/user_passwords_controller.rb
|
||||
- app/controllers/spree/user_registrations_controller.rb
|
||||
- app/controllers/spree/users_controller.rb
|
||||
- app/controllers/spree/user_sessions_controller.rb
|
||||
- app/controllers/stripe/callbacks_controller.rb
|
||||
@@ -416,21 +304,26 @@ Metrics/AbcSize:
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/helpers/spree/admin/zones_helper.rb
|
||||
- app/helpers/spree/base_helper.rb
|
||||
- app/helpers/spree/orders_helper.rb
|
||||
- app/mailers/spree/order_mailer.rb
|
||||
- app/models/calculator/flat_percent_per_item.rb
|
||||
- app/models/column_preference.rb
|
||||
- app/models/enterprise_group.rb
|
||||
- app/models/enterprise.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
- app/models/order_cycle.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/product_import/product_importer.rb
|
||||
- app/models/product_import/unit_converter.rb
|
||||
- app/models/proxy_order.rb
|
||||
- app/models/spree/ability.rb
|
||||
- app/models/spree/address.rb
|
||||
- app/models/spree/gateway/pay_pal_express.rb
|
||||
- app/models/spree/item_adjustments.rb
|
||||
- app/models/spree/line_item.rb
|
||||
- app/models/spree/order/checkout.rb
|
||||
- app/models/spree/order_contents.rb
|
||||
- app/models/spree/order_inventory.rb
|
||||
- app/models/spree/order.rb
|
||||
- app/models/spree/payment/processing.rb
|
||||
@@ -445,13 +338,18 @@ Metrics/AbcSize:
|
||||
- app/models/spree/tax_rate.rb
|
||||
- app/models/spree/variant.rb
|
||||
- app/models/spree/zone.rb
|
||||
- app/serializers/api/product_serializer.rb
|
||||
- app/serializers/api/admin/enterprise_serializer.rb
|
||||
- app/serializers/api/variant_serializer.rb
|
||||
- app/services/cap_quantity.rb
|
||||
- app/services/cart_service.rb
|
||||
- app/services/create_order_cycle.rb
|
||||
- app/services/sets/model_set.rb
|
||||
- app/services/order_cycle_form.rb
|
||||
- app/services/order_factory.rb
|
||||
- app/services/order_syncer.rb
|
||||
- app/services/place_proxy_order.rb
|
||||
- app/services/process_payment_intent.rb
|
||||
- app/services/sets/model_set.rb
|
||||
- app/services/variants_stock_levels.rb
|
||||
- app/services/variant_units/option_value_namer.rb
|
||||
- app/services/variant_units/variant_and_line_item_naming.rb
|
||||
- engines/order_management/app/services/order_management/order/updater.rb
|
||||
@@ -459,11 +357,12 @@ Metrics/AbcSize:
|
||||
- engines/order_management/app/services/order_management/stock/estimator.rb
|
||||
- engines/order_management/app/services/order_management/stock/package.rb
|
||||
- engines/order_management/app/services/order_management/stock/packer.rb
|
||||
- engines/order_management/app/services/order_management/subscriptions/form.rb
|
||||
- engines/order_management/app/services/order_management/subscriptions/validator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_decorator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/customers_report.rb
|
||||
- lib/open_food_network/enterprise_fee_calculator.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/open_food_network/group_buy_report.rb
|
||||
- lib/open_food_network/lettuce_share_report.rb
|
||||
@@ -471,6 +370,7 @@ Metrics/AbcSize:
|
||||
- lib/open_food_network/order_cycle_form_applicator.rb
|
||||
- lib/open_food_network/order_cycle_management_report.rb
|
||||
- lib/open_food_network/order_cycle_permissions.rb
|
||||
- lib/open_food_network/order_grouper.rb
|
||||
- lib/open_food_network/orders_and_fulfillments_report/supplier_totals_report.rb
|
||||
- lib/open_food_network/packing_report.rb
|
||||
- lib/open_food_network/payments_report.rb
|
||||
@@ -482,14 +382,18 @@ Metrics/AbcSize:
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
- lib/spree/api/controller_setup.rb
|
||||
- lib/spree/core/calculated_adjustments.rb
|
||||
- lib/spree/core/controller_helpers/auth.rb
|
||||
- lib/spree/core/controller_helpers/common.rb
|
||||
- lib/spree/core/controller_helpers/order.rb
|
||||
- lib/spree/core/controller_helpers/respond_with.rb
|
||||
- lib/spree/core/delegate_belongs_to.rb
|
||||
- lib/spree/core/permalinks.rb
|
||||
- lib/spree/core/product_duplicator.rb
|
||||
- lib/spree/core/s3_support.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- lib/spree/money.rb
|
||||
- lib/stripe/account_connector.rb
|
||||
- lib/stripe/authorize_response_patcher.rb
|
||||
- lib/stripe/profile_storer.rb
|
||||
- lib/tasks/enterprises.rake
|
||||
- lib/tasks/sample_data/order_factory.rb
|
||||
- lib/tasks/sample_data/product_factory.rb
|
||||
@@ -521,16 +425,15 @@ Metrics/BlockLength:
|
||||
"scenario"
|
||||
]
|
||||
Exclude:
|
||||
- spec/features/admin/order_cycles/complex_updating_specific_time_spec.rb
|
||||
- spec/features/admin/tag_rules_spec.rb
|
||||
- app/models/spree/order/checkout.rb
|
||||
- app/models/spree/payment/processing.rb
|
||||
- app/models/spree/payment.rb
|
||||
- app/models/spree/shipment.rb
|
||||
- lib/spree/core/controller_helpers/common.rb
|
||||
- lib/tasks/data.rake
|
||||
- spec/controllers/spree/admin/invoices_controller_spec.rb
|
||||
- spec/factories/address_factory.rb
|
||||
- spec/factories/enterprise_factory.rb
|
||||
- spec/factories/line_item_factory.rb
|
||||
- spec/factories/order_cycle_factory.rb
|
||||
- spec/factories/order_factory.rb
|
||||
- spec/factories/payment_method_factory.rb
|
||||
@@ -541,11 +444,13 @@ Metrics/BlockLength:
|
||||
- spec/factories/subscription_factory.rb
|
||||
- spec/factories/user_factory.rb
|
||||
- spec/factories/variant_factory.rb
|
||||
- spec/features/admin/order_cycles/complex_updating_specific_time_spec.rb
|
||||
- spec/features/consumer/shopping/checkout_spec.rb
|
||||
- spec/features/consumer/shopping/embedded_shopfronts_spec.rb
|
||||
- spec/lib/open_food_network/group_buy_report_spec.rb
|
||||
- spec/models/tag_rule/discount_order_spec.rb
|
||||
- spec/requests/api/orders_spec.rb
|
||||
- spec/spec_helper.rb
|
||||
- spec/support/cancan_helper.rb
|
||||
- spec/support/matchers/select2_matchers.rb
|
||||
- spec/support/matchers/table_matchers.rb
|
||||
- spec/swagger_helper.rb
|
||||
@@ -553,30 +458,14 @@ Metrics/BlockLength:
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 6
|
||||
Exclude:
|
||||
- app/controllers/admin/resource_controller.rb
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/payment_methods_controller.rb
|
||||
- app/controllers/spree/admin/payments_controller.rb
|
||||
- app/controllers/spree/admin/products_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/spree/order_inventory.rb
|
||||
- app/models/spree/order.rb
|
||||
- app/models/spree/shipment.rb
|
||||
- app/models/spree/tax_rate.rb
|
||||
- app/models/spree/variant.rb
|
||||
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/parameters.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_decorator.rb
|
||||
- lib/open_food_network/group_buy_report.rb
|
||||
- lib/open_food_network/order_cycle_form_applicator.rb
|
||||
- lib/open_food_network/order_cycle_permissions.rb
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/spree/core/controller_helpers/common.rb
|
||||
- lib/stripe/authorize_response_patcher.rb
|
||||
- lib/stripe/credit_card_clone_destroyer.rb
|
||||
- spec/support/i18n_translations_checker.rb
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/spree/admin/taxons_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
@@ -584,67 +473,78 @@ Metrics/CyclomaticComplexity:
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/models/enterprise.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/spree/ability.rb
|
||||
- app/models/spree/address.rb
|
||||
- app/models/spree/order/checkout.rb
|
||||
- app/models/spree/payment_method.rb
|
||||
- app/models/spree/order_inventory.rb
|
||||
- app/models/spree/payment.rb
|
||||
- app/models/spree/preference.rb
|
||||
- app/models/spree/preferences/preferable.rb
|
||||
- app/models/spree/preferences/preferable_class_methods.rb
|
||||
- app/models/spree/preferences/preferable.rb
|
||||
- app/models/spree/product.rb
|
||||
- app/models/spree/return_authorization.rb
|
||||
- app/models/spree/shipment.rb
|
||||
- app/models/spree/tax_rate.rb
|
||||
- app/models/spree/variant.rb
|
||||
- app/models/spree/zone.rb
|
||||
- app/services/cart_service.rb
|
||||
- app/services/sets/variant_override_set.rb
|
||||
- engines/order_management/app/services/order_management/reports/bulk_coop/bulk_coop_report.rb
|
||||
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/parameters.rb
|
||||
- engines/order_management/app/services/order_management/stock/estimator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/spree/core/calculated_adjustments.rb
|
||||
- lib/spree/core/controller_helpers/order.rb
|
||||
- lib/spree/core/controller_helpers/respond_with.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 7
|
||||
Exclude:
|
||||
- app/controllers/spree/admin/payment_methods_controller.rb
|
||||
- app/controllers/spree/admin/payments_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/spree/order_inventory.rb
|
||||
- app/models/spree/shipment.rb
|
||||
- app/models/spree/variant.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_decorator.rb
|
||||
- lib/open_food_network/group_buy_report.rb
|
||||
- lib/open_food_network/order_cycle_form_applicator.rb
|
||||
- lib/open_food_network/order_cycle_permissions.rb
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/spree/core/calculated_adjustments.rb
|
||||
- lib/spree/core/controller_helpers/common.rb
|
||||
- lib/spree/core/controller_helpers/order.rb
|
||||
- lib/spree/core/controller_helpers/respond_with.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- lib/stripe/authorize_response_patcher.rb
|
||||
- lib/stripe/credit_card_clone_destroyer.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
- spec/support/i18n_translations_checker.rb
|
||||
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 7
|
||||
Exclude:
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/api/variants_controller.rb
|
||||
- app/controllers/api/v0/variants_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/payment_methods_controller.rb
|
||||
- app/controllers/spree/admin/payments_controller.rb
|
||||
- app/controllers/spree/admin/taxons_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/spree/ability.rb
|
||||
- app/models/spree/address.rb
|
||||
- app/models/spree/order/checkout.rb
|
||||
- app/models/spree/order.rb
|
||||
- app/models/spree/order_inventory.rb
|
||||
- app/models/spree/preferences/preferable_class_methods.rb
|
||||
- app/models/spree/preferences/preferable.rb
|
||||
- app/models/spree/product.rb
|
||||
- app/models/spree/return_authorization.rb
|
||||
- app/models/spree/tax_rate.rb
|
||||
- app/models/spree/variant.rb
|
||||
- app/models/spree/zone.rb
|
||||
- engines/order_management/app/services/order_management/reports/bulk_coop/bulk_coop_report.rb
|
||||
- engines/order_management/app/services/order_management/stock/estimator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/open_food_network/group_buy_report.rb
|
||||
- lib/open_food_network/order_cycle_form_applicator.rb
|
||||
- lib/open_food_network/order_cycle_permissions.rb
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/spree/core/calculated_adjustments.rb
|
||||
- lib/spree/core/controller_helpers/order.rb
|
||||
- lib/spree/core/controller_helpers/respond_with.rb
|
||||
@@ -654,6 +554,7 @@ Metrics/PerceivedComplexity:
|
||||
Metrics/MethodLength:
|
||||
Max: 10
|
||||
Exclude:
|
||||
- app/controllers/admin/bulk_line_items_controller.rb
|
||||
- app/controllers/admin/contents_controller.rb
|
||||
- app/controllers/admin/customers_controller.rb
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
@@ -663,11 +564,11 @@ Metrics/MethodLength:
|
||||
- app/controllers/admin/resource_controller.rb
|
||||
- app/controllers/admin/stripe_accounts_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
- app/controllers/api/products_controller.rb
|
||||
- app/controllers/api/shipments_controller.rb
|
||||
- app/controllers/api/taxons_controller.rb
|
||||
- app/controllers/api/variants_controller.rb
|
||||
- app/controllers/cart_controller.rb
|
||||
- app/controllers/api/v0/product_images_controller.rb
|
||||
- app/controllers/api/v0/products_controller.rb
|
||||
- app/controllers/api/v0/shipments_controller.rb
|
||||
- app/controllers/api/v0/taxons_controller.rb
|
||||
- app/controllers/api/v0/variants_controller.rb
|
||||
- app/controllers/shop_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/orders/customer_details_controller.rb
|
||||
@@ -681,7 +582,7 @@ Metrics/MethodLength:
|
||||
- app/controllers/spree/admin/variants_controller.rb
|
||||
- app/controllers/spree/credit_cards_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/controllers/spree/paypal_controller_decorator.rb
|
||||
- app/controllers/spree/paypal_controller.rb
|
||||
- app/controllers/spree/user_sessions_controller.rb
|
||||
- app/controllers/stripe/callbacks_controller.rb
|
||||
- app/controllers/user_confirmations_controller.rb
|
||||
@@ -692,6 +593,7 @@ Metrics/MethodLength:
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/mailers/producer_mailer.rb
|
||||
- app/models/calculator/default_tax.rb
|
||||
- app/models/column_preference.rb
|
||||
- app/models/enterprise.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
@@ -703,28 +605,30 @@ Metrics/MethodLength:
|
||||
- app/models/spree/ability.rb
|
||||
- app/models/spree/address.rb
|
||||
- app/models/spree/credit_card.rb
|
||||
- app/models/spree/gateway/pay_pal_express.rb
|
||||
- app/models/spree/order/checkout.rb
|
||||
- app/models/spree/order_contents.rb
|
||||
- app/models/spree/order_inventory.rb
|
||||
- app/models/spree/order.rb
|
||||
- app/models/spree/payment_method.rb
|
||||
- app/models/spree/payment/processing.rb
|
||||
- app/models/spree/preference.rb
|
||||
- app/models/spree/preferences/preferable_class_methods.rb
|
||||
- app/models/spree/preferences/preferable.rb
|
||||
- app/models/spree/preferences/store.rb
|
||||
- app/models/spree/product.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- app/models/spree/return_authorization.rb
|
||||
- app/models/spree/shipment.rb
|
||||
- app/models/spree/taxon.rb
|
||||
- app/models/spree/tax_rate.rb
|
||||
- app/models/spree/variant.rb
|
||||
- app/models/spree/zone.rb
|
||||
- app/serializers/api/admin/order_cycle_serializer.rb
|
||||
- app/serializers/api/cached_enterprise_serializer.rb
|
||||
- app/services/cart_service.rb
|
||||
- app/services/mail_configuration.rb
|
||||
- app/services/order_cycle_form.rb
|
||||
- app/services/permitted_attributes/checkout.rb
|
||||
- app/services/place_proxy_order.rb
|
||||
- app/services/process_payment_intent.rb
|
||||
- app/services/variant_units/option_value_namer.rb
|
||||
- engines/order_management/app/services/order_management/order/updater.rb
|
||||
- engines/order_management/app/services/order_management/reports/bulk_coop/bulk_coop_allocation_report.rb
|
||||
@@ -750,7 +654,6 @@ Metrics/MethodLength:
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/open_food_network/permissions.rb
|
||||
- lib/open_food_network/products_and_inventory_report.rb
|
||||
- lib/open_food_network/rack_request_blocker.rb
|
||||
- lib/open_food_network/reports/line_items.rb
|
||||
- lib/open_food_network/sales_tax_report.rb
|
||||
- lib/open_food_network/users_and_enterprises_report.rb
|
||||
@@ -772,32 +675,27 @@ Metrics/MethodLength:
|
||||
- spec/features/consumer/shopping/variant_overrides_spec.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
- spec/support/i18n_translations_checker.rb
|
||||
- app/controllers/admin/bulk_line_items_controller.rb
|
||||
- app/controllers/spree/paypal_controller.rb
|
||||
- app/jobs/subscription_placement_job.rb
|
||||
- app/models/spree/gateway/pay_pal_express.rb
|
||||
|
||||
Metrics/ClassLength:
|
||||
Max: 100
|
||||
Exclude:
|
||||
- app/controllers/admin/customers_controller.rb
|
||||
- app/controllers/spree/admin/payments_controller.rb
|
||||
- app/controllers/spree/paypal_controller.rb
|
||||
- engines/order_management/app/services/order_management/order/updater.rb
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/admin/order_cycles_controller.rb
|
||||
- app/controllers/admin/resource_controller.rb
|
||||
- app/controllers/admin/schedules_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
- app/controllers/api/products_controller.rb
|
||||
- app/controllers/api/v0/products_controller.rb
|
||||
- app/controllers/application_controller.rb
|
||||
- app/controllers/checkout_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/payment_methods_controller.rb
|
||||
- app/controllers/spree/admin/payments_controller.rb
|
||||
- app/controllers/spree/admin/products_controller.rb
|
||||
- app/controllers/spree/admin/reports_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/controllers/spree/paypal_controller.rb
|
||||
- app/models/enterprise.rb
|
||||
- app/models/order_cycle.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
@@ -812,12 +710,15 @@ Metrics/ClassLength:
|
||||
- app/models/spree/payment.rb
|
||||
- app/models/spree/product.rb
|
||||
- app/models/spree/shipment.rb
|
||||
- app/models/spree/tax_rate.rb
|
||||
- app/models/spree/user.rb
|
||||
- app/models/spree/variant.rb
|
||||
- app/models/spree/zone.rb
|
||||
- app/serializers/api/cached_enterprise_serializer.rb
|
||||
- app/serializers/api/enterprise_shopfront_serializer.rb
|
||||
- app/services/cart_service.rb
|
||||
- app/services/order_syncer.rb
|
||||
- engines/order_management/app/services/order_management/order/updater.rb
|
||||
- engines/order_management/app/services/order_management/reports/bulk_coop/bulk_coop_report.rb
|
||||
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/scope.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
@@ -838,20 +739,19 @@ Metrics/ModuleLength:
|
||||
- app/helpers/injection_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/helpers/spree/admin/orders_helper.rb
|
||||
- app/models/spree/order/checkout.rb
|
||||
- app/models/spree/payment/processing.rb
|
||||
- engines/order_management/spec/services/order_management/subscriptions/proxy_order_syncer_spec.rb
|
||||
- engines/order_management/spec/services/order_management/subscriptions/validator_spec.rb
|
||||
- engines/order_management/spec/services/order_management/subscriptions/summary_spec.rb
|
||||
- lib/open_food_network/column_preference_defaults.rb
|
||||
- spec/controllers/admin/order_cycles_controller_spec.rb
|
||||
- spec/controllers/api/orders_controller_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_form_applicator_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_permissions_spec.rb
|
||||
- spec/models/spree/adjustment_spec.rb
|
||||
- spec/models/spree/credit_card_spec.rb
|
||||
- spec/models/spree/line_item_spec.rb
|
||||
- spec/models/spree/product_spec.rb
|
||||
- spec/models/spree/tax_rate_spec.rb
|
||||
- spec/models/spree/variant_spec.rb
|
||||
|
||||
Metrics/ParameterLists:
|
||||
@@ -861,9 +761,16 @@ Metrics/ParameterLists:
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
- spec/features/admin/reports_spec.rb
|
||||
- spec/support/controller_requests_helper.rb
|
||||
|
||||
Lint/UselessAssignment:
|
||||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'app/models/spree/taxon.rb'
|
||||
- 'lib/spree/core/controller_helpers/common.rb'
|
||||
- app/models/spree/credit_card.rb
|
||||
- app/models/spree/taxon.rb
|
||||
- lib/spree/core/controller_helpers/common.rb
|
||||
|
||||
Metrics/BlockNesting:
|
||||
Max: 3
|
||||
Exclude:
|
||||
- app/models/spree/payment/processing.rb
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config --exclude-limit 1400`
|
||||
# on 2021-06-17 21:32:23 UTC using RuboCop version 1.17.0.
|
||||
# on 2021-07-13 21:27:42 UTC using RuboCop version 1.18.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
@@ -16,12 +16,14 @@ Gemspec/RequiredRubyVersion:
|
||||
- 'engines/order_management/order_management.gemspec'
|
||||
- 'engines/web/web.gemspec'
|
||||
|
||||
# Offense count: 25
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Layout/LineLength:
|
||||
Max: 148
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: symmetrical, new_line, same_line
|
||||
Layout/MultilineMethodCallBraceLayout:
|
||||
Exclude:
|
||||
- 'spec/features/consumer/account/payments_spec.rb'
|
||||
- 'spec/queries/payments_requiring_action_spec.rb'
|
||||
|
||||
# Offense count: 15
|
||||
# Configuration parameters: AllowedMethods.
|
||||
@@ -88,47 +90,6 @@ Lint/UselessMethodDefinition:
|
||||
- 'app/controllers/spree/user_registrations_controller.rb'
|
||||
- 'app/models/spree/gateway.rb'
|
||||
|
||||
# Offense count: 13
|
||||
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
||||
Metrics/AbcSize:
|
||||
Max: 25
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
||||
# IgnoredMethods: refine
|
||||
Metrics/BlockLength:
|
||||
Max: 30
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: CountComments, CountAsOne.
|
||||
Metrics/ClassLength:
|
||||
Max: 122
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: IgnoredMethods.
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 9
|
||||
|
||||
# Offense count: 10
|
||||
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
||||
Metrics/MethodLength:
|
||||
Max: 17
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: CountComments, CountAsOne.
|
||||
Metrics/ModuleLength:
|
||||
Max: 369
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: Max, CountKeywordArgs.
|
||||
Metrics/ParameterLists:
|
||||
MaxOptionalParameters: 4
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: IgnoredMethods.
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 10
|
||||
|
||||
# Offense count: 9
|
||||
Naming/AccessorMethodName:
|
||||
Exclude:
|
||||
@@ -181,12 +142,6 @@ Naming/VariableNumber:
|
||||
- 'spec/models/spree/tax_rate_spec.rb'
|
||||
- 'spec/requests/api/orders_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Rails/ActiveRecordAliases:
|
||||
Exclude:
|
||||
- 'app/models/spree/order_contents.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
@@ -222,25 +177,16 @@ Rails/ApplicationRecord:
|
||||
Exclude:
|
||||
- 'lib/tasks/data/remove_transient_data.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent.
|
||||
Rails/Blank:
|
||||
Exclude:
|
||||
- 'app/jobs/subscription_placement_job.rb'
|
||||
- 'app/models/spree/order_contents.rb'
|
||||
- 'app/services/content_sanitizer.rb'
|
||||
- 'engines/order_management/app/services/order_management/stock/package.rb'
|
||||
- 'lib/stripe/authorize_response_patcher.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: strict, flexible
|
||||
Rails/Date:
|
||||
Exclude:
|
||||
- 'app/models/order_cycle.rb'
|
||||
- 'app/models/spree/credit_card.rb'
|
||||
|
||||
# Offense count: 15
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: slashes, arguments
|
||||
@@ -258,18 +204,6 @@ Rails/FilePath:
|
||||
- 'spec/serializers/api/admin/enterprise_serializer_spec.rb'
|
||||
- 'spec/support/downloads_helper.rb'
|
||||
|
||||
# Offense count: 7
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/FindBy:
|
||||
Exclude:
|
||||
- 'app/models/enterprise.rb'
|
||||
- 'app/models/product_import/entry_processor.rb'
|
||||
- 'app/models/product_import/entry_validator.rb'
|
||||
- 'app/models/product_import/spreadsheet_data.rb'
|
||||
- 'app/models/spree/user.rb'
|
||||
|
||||
# Offense count: 11
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
@@ -406,7 +340,6 @@ Rails/SkipsModelValidations:
|
||||
- 'app/controllers/spree/admin/taxons_controller.rb'
|
||||
- 'app/controllers/spree/credit_cards_controller.rb'
|
||||
- 'app/jobs/subscription_confirm_job.rb'
|
||||
- 'app/jobs/subscription_placement_job.rb'
|
||||
- 'app/models/concerns/line_item_stock_changes.rb'
|
||||
- 'app/models/enterprise.rb'
|
||||
- 'app/models/enterprise_relationship.rb'
|
||||
@@ -431,6 +364,7 @@ Rails/SkipsModelValidations:
|
||||
- 'app/models/subscription.rb'
|
||||
- 'app/models/variant_override.rb'
|
||||
- 'app/services/order_factory.rb'
|
||||
- 'app/services/place_proxy_order.rb'
|
||||
- 'engines/order_management/app/services/order_management/order/updater.rb'
|
||||
- 'engines/order_management/spec/services/order_management/reports/enterprise_fee_summary/report_service_spec.rb'
|
||||
- 'engines/order_management/spec/services/order_management/subscriptions/stripe_payment_setup_spec.rb'
|
||||
@@ -473,7 +407,6 @@ Rails/SkipsModelValidations:
|
||||
- 'spec/features/consumer/shopping/unit_price_spec.rb'
|
||||
- 'spec/helpers/enterprises_helper_spec.rb'
|
||||
- 'spec/helpers/order_cycles_helper_spec.rb'
|
||||
- 'spec/jobs/subscription_placement_job_spec.rb'
|
||||
- 'spec/lib/open_food_network/address_finder_spec.rb'
|
||||
- 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb'
|
||||
- 'spec/lib/open_food_network/permissions_spec.rb'
|
||||
@@ -498,6 +431,7 @@ Rails/SkipsModelValidations:
|
||||
- 'spec/queries/outstanding_balance_spec.rb'
|
||||
- 'spec/serializers/api/admin/subscription_line_item_serializer_spec.rb'
|
||||
- 'spec/services/cache_service_spec.rb'
|
||||
- 'spec/services/cap_quantity_spec.rb'
|
||||
- 'spec/services/order_cart_reset_spec.rb'
|
||||
- 'spec/services/order_checkout_restart_spec.rb'
|
||||
- 'spec/services/order_cycle_distributed_products_spec.rb'
|
||||
@@ -533,7 +467,7 @@ Rails/UniqueValidationWithoutIndex:
|
||||
- 'app/models/spree/tax_category.rb'
|
||||
- 'app/models/spree/zone.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Offense count: 2
|
||||
# Configuration parameters: Environments.
|
||||
# Environments: development, test, production
|
||||
Rails/UnknownEnv:
|
||||
@@ -598,6 +532,14 @@ Style/ClassVars:
|
||||
Style/FormatStringToken:
|
||||
EnforcedStyle: unannotated
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: always, always_true, never
|
||||
Style/FrozenStringLiteralComment:
|
||||
Exclude:
|
||||
- '.simplecov'
|
||||
|
||||
# Offense count: 6
|
||||
# Cop supports --auto-correct.
|
||||
Style/GlobalStdStream:
|
||||
@@ -664,9 +606,9 @@ Style/NestedModifier:
|
||||
- 'spec/factories/order_factory.rb'
|
||||
- 'spec/features/admin/payments_stripe_spec.rb'
|
||||
- 'spec/features/admin/reports_spec.rb'
|
||||
- 'spec/jobs/subscription_placement_job_spec.rb'
|
||||
- 'spec/models/proxy_order_spec.rb'
|
||||
- 'spec/models/spree/line_item_spec.rb'
|
||||
- 'spec/services/place_proxy_order_spec.rb'
|
||||
|
||||
# Offense count: 34
|
||||
# Cop supports --auto-correct.
|
||||
@@ -731,7 +673,7 @@ Style/PreferredHashMethods:
|
||||
Exclude:
|
||||
- 'app/controllers/api/v0/shipments_controller.rb'
|
||||
|
||||
# Offense count: 236
|
||||
# Offense count: 223
|
||||
Style/Send:
|
||||
Exclude:
|
||||
- 'engines/order_management/spec/services/order_management/reports/bulk_coop/bulk_coop_report_spec.rb'
|
||||
@@ -791,6 +733,7 @@ Style/SlicingWithRange:
|
||||
|
||||
# Offense count: 43
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Mode.
|
||||
Style/StringConcatenation:
|
||||
Exclude:
|
||||
- 'app/controllers/admin/stripe_connect_settings_controller.rb'
|
||||
|
||||
@@ -16,5 +16,7 @@ SimpleCov.start 'rails' do
|
||||
add_filter '/lib/tasks/sample_data/'
|
||||
end
|
||||
|
||||
require 'codecov'
|
||||
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
||||
if ENV['CI']
|
||||
require 'codecov'
|
||||
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
||||
end
|
||||
|
||||
28
Gemfile
28
Gemfile
@@ -4,6 +4,8 @@ source 'https://rubygems.org'
|
||||
ruby "2.7.3"
|
||||
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }
|
||||
|
||||
gem 'dotenv-rails', require: 'dotenv/rails-now' # Load ENV vars before other gems
|
||||
|
||||
gem 'rails', '~> 6.1.4'
|
||||
|
||||
gem 'activemerchant', '>= 1.78.0'
|
||||
@@ -15,7 +17,7 @@ gem 'sass-rails', '< 5.1.0' # this restriction originates from the compass-rails
|
||||
gem 'webpacker', '~> 5'
|
||||
|
||||
gem 'i18n'
|
||||
gem 'i18n-js', '~> 3.8.3'
|
||||
gem 'i18n-js', '~> 3.9.0'
|
||||
gem 'rails-i18n'
|
||||
gem 'rails_safe_tasks', '~> 1.0'
|
||||
|
||||
@@ -23,6 +25,8 @@ gem "activerecord-import"
|
||||
gem "db2fog", github: "openfoodfoundation/db2fog", branch: "rails-6"
|
||||
gem "fog-aws", "~> 2.0" # db2fog does not support v3
|
||||
|
||||
gem "valid_email2"
|
||||
|
||||
gem "catalog", path: "./engines/catalog"
|
||||
gem 'dfc_provider', path: './engines/dfc_provider'
|
||||
gem "order_management", path: "./engines/order_management"
|
||||
@@ -45,15 +49,15 @@ gem 'paypal-sdk-merchant', '1.117.2'
|
||||
gem 'stripe'
|
||||
|
||||
gem 'devise'
|
||||
gem 'devise-i18n'
|
||||
gem 'devise-encryptable'
|
||||
gem 'devise-token_authenticatable'
|
||||
gem 'jwt', '~> 2.2'
|
||||
gem 'oauth2', '~> 1.4.7' # Used for Stripe Connect
|
||||
|
||||
gem 'kaminari', '~> 1.2.1'
|
||||
gem 'pagy', '~> 4.11'
|
||||
|
||||
gem 'andand'
|
||||
gem 'angularjs-rails', '1.5.5'
|
||||
gem 'angularjs-rails', '1.8.0'
|
||||
gem 'aws-sdk', '1.67.0'
|
||||
gem 'bugsnag'
|
||||
gem 'haml'
|
||||
@@ -70,21 +74,23 @@ gem 'bigdecimal', '3.0.2'
|
||||
gem 'bootsnap', require: false
|
||||
gem 'custom_error_message', github: 'jeremydurham/custom-err-msg'
|
||||
gem 'dalli'
|
||||
gem 'figaro'
|
||||
gem 'geocoder'
|
||||
gem 'gmaps4rails'
|
||||
gem 'mimemagic', '> 0.3.5'
|
||||
gem 'paperclip', '~> 3.4.1'
|
||||
gem 'paper_trail', '~> 10.3.1'
|
||||
gem 'paper_trail', '~> 12.1.0'
|
||||
gem 'rack-rewrite'
|
||||
gem 'rack-ssl', require: 'rack/ssl'
|
||||
gem 'roadie-rails'
|
||||
|
||||
gem 'puma'
|
||||
gem 'hiredis'
|
||||
gem 'redis', '>= 4.0', require: ['redis', 'redis/connection/hiredis']
|
||||
gem 'sidekiq'
|
||||
gem 'sidekiq-scheduler'
|
||||
|
||||
gem "cable_ready", "5.0.0.pre2"
|
||||
|
||||
gem 'combine_pdf'
|
||||
gem 'wicked_pdf'
|
||||
gem 'wkhtmltopdf-binary'
|
||||
@@ -108,7 +114,6 @@ gem 'foundation-icons-sass-rails'
|
||||
|
||||
gem 'foundation-rails', '= 5.5.2.1'
|
||||
|
||||
gem 'jquery-migrate-rails'
|
||||
gem 'jquery-rails', '4.4.0'
|
||||
gem 'jquery-ui-rails', '~> 4.2'
|
||||
gem "select2-rails", github: "openfoodfoundation/select2-rails", branch: "v349_with_thor_v1"
|
||||
@@ -125,7 +130,8 @@ gem "view_component", require: "view_component/engine"
|
||||
|
||||
group :production, :staging do
|
||||
gem 'ddtrace'
|
||||
gem 'unicorn-worker-killer'
|
||||
gem 'rack-timeout'
|
||||
gem 'sd_notify' # For better Systemd process management. Used by Puma.
|
||||
end
|
||||
|
||||
group :test, :development do
|
||||
@@ -145,8 +151,8 @@ group :test, :development do
|
||||
gem 'selenium-webdriver'
|
||||
gem 'shoulda-matchers'
|
||||
gem 'timecop'
|
||||
gem 'unicorn-rails'
|
||||
gem 'webdrivers'
|
||||
gem 'cuprite'
|
||||
end
|
||||
|
||||
group :test do
|
||||
@@ -164,8 +170,8 @@ end
|
||||
group :development do
|
||||
gem 'debugger-linecache'
|
||||
gem 'foreman'
|
||||
gem 'pry'
|
||||
gem 'pry-byebug'
|
||||
gem 'pry', '~> 0.13.0'
|
||||
gem 'pry-byebug', '~> 3.9.0'
|
||||
gem 'rubocop'
|
||||
gem 'rubocop-rails'
|
||||
gem 'spring'
|
||||
|
||||
298
Gemfile.lock
298
Gemfile.lock
@@ -57,62 +57,62 @@ GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
Ascii85 (1.1.0)
|
||||
actioncable (6.1.4)
|
||||
actionpack (= 6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
actioncable (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailbox (6.1.4)
|
||||
actionpack (= 6.1.4)
|
||||
activejob (= 6.1.4)
|
||||
activerecord (= 6.1.4)
|
||||
activestorage (= 6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
actionmailbox (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
activejob (= 6.1.4.1)
|
||||
activerecord (= 6.1.4.1)
|
||||
activestorage (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
mail (>= 2.7.1)
|
||||
actionmailer (6.1.4)
|
||||
actionpack (= 6.1.4)
|
||||
actionview (= 6.1.4)
|
||||
activejob (= 6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
actionmailer (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
actionview (= 6.1.4.1)
|
||||
activejob (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (6.1.4)
|
||||
actionview (= 6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
actionpack (6.1.4.1)
|
||||
actionview (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
rack (~> 2.0, >= 2.0.9)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actionpack-action_caching (1.2.2)
|
||||
actionpack (>= 4.0.0)
|
||||
actiontext (6.1.4)
|
||||
actionpack (= 6.1.4)
|
||||
activerecord (= 6.1.4)
|
||||
activestorage (= 6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
actiontext (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
activerecord (= 6.1.4.1)
|
||||
activestorage (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
nokogiri (>= 1.8.5)
|
||||
actionview (6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
actionview (6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
active_model_serializers (0.8.4)
|
||||
activemodel (>= 3.0)
|
||||
activejob (6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
activejob (6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
globalid (>= 0.3.6)
|
||||
activemerchant (1.121.0)
|
||||
activemerchant (1.123.0)
|
||||
activesupport (>= 4.2)
|
||||
builder (>= 2.1.2, < 4.0.0)
|
||||
i18n (>= 0.6.9)
|
||||
nokogiri (~> 1.4)
|
||||
activemodel (6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
activerecord (6.1.4)
|
||||
activemodel (= 6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
activerecord-import (1.1.0)
|
||||
activemodel (6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
activerecord (6.1.4.1)
|
||||
activemodel (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
activerecord-import (1.2.0)
|
||||
activerecord (>= 3.2)
|
||||
activerecord-postgresql-adapter (0.0.1)
|
||||
pg
|
||||
@@ -122,14 +122,14 @@ GEM
|
||||
multi_json (~> 1.11, >= 1.11.2)
|
||||
rack (>= 2.0.8, < 3)
|
||||
railties (>= 5.2.4.1)
|
||||
activestorage (6.1.4)
|
||||
actionpack (= 6.1.4)
|
||||
activejob (= 6.1.4)
|
||||
activerecord (= 6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
activestorage (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
activejob (= 6.1.4.1)
|
||||
activerecord (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
marcel (~> 1.0.0)
|
||||
mini_mime (>= 1.1.0)
|
||||
activesupport (6.1.4)
|
||||
activesupport (6.1.4.1)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
@@ -139,10 +139,9 @@ GEM
|
||||
activerecord (>= 5.0, < 6.2)
|
||||
acts_as_list (1.0.4)
|
||||
activerecord (>= 4.2)
|
||||
addressable (2.7.0)
|
||||
addressable (2.8.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
afm (0.2.2)
|
||||
andand (1.3.3)
|
||||
angular-rails-templates (1.1.0)
|
||||
railties (>= 4.2, < 7)
|
||||
sprockets (>= 3.0, < 5)
|
||||
@@ -150,7 +149,7 @@ GEM
|
||||
angular_rails_csrf (4.5.0)
|
||||
railties (>= 3, < 7)
|
||||
angularjs-file-upload-rails (2.4.1)
|
||||
angularjs-rails (1.5.5)
|
||||
angularjs-rails (1.8.0)
|
||||
ast (2.4.2)
|
||||
awesome_nested_set (3.4.0)
|
||||
activerecord (>= 4.0.0, < 7.0)
|
||||
@@ -163,15 +162,18 @@ GEM
|
||||
bcrypt (3.1.16)
|
||||
bigdecimal (3.0.2)
|
||||
bindex (0.8.1)
|
||||
bootsnap (1.7.5)
|
||||
bootsnap (1.9.0)
|
||||
msgpack (~> 1.0)
|
||||
bugsnag (6.21.0)
|
||||
bugsnag (6.22.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
builder (3.2.4)
|
||||
bullet (6.1.4)
|
||||
bullet (6.1.5)
|
||||
activesupport (>= 3.0.0)
|
||||
uniform_notifier (~> 1.11)
|
||||
byebug (11.1.3)
|
||||
cable_ready (5.0.0.pre2)
|
||||
rails (>= 5.2)
|
||||
thread-local (>= 1.1.0)
|
||||
cancancan (1.15.0)
|
||||
capybara (3.35.3)
|
||||
addressable
|
||||
@@ -185,9 +187,10 @@ GEM
|
||||
chronic (0.10.2)
|
||||
chunky_png (1.4.0)
|
||||
climate_control (0.2.0)
|
||||
cliver (0.3.2)
|
||||
cocaine (0.5.8)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
codecov (0.5.2)
|
||||
codecov (0.6.0)
|
||||
simplecov (>= 0.15, < 0.22)
|
||||
coderay (1.1.3)
|
||||
coffee-rails (5.0.0)
|
||||
@@ -222,6 +225,9 @@ GEM
|
||||
crass (1.0.6)
|
||||
css_parser (1.9.0)
|
||||
addressable
|
||||
cuprite (0.13)
|
||||
capybara (>= 2.1, < 4)
|
||||
ferrum (~> 0.11.0)
|
||||
dalli (2.7.11)
|
||||
database_cleaner (2.0.1)
|
||||
database_cleaner-active_record (~> 2.0.0)
|
||||
@@ -229,7 +235,7 @@ GEM
|
||||
activerecord (>= 5.a)
|
||||
database_cleaner-core (~> 2.0.0)
|
||||
database_cleaner-core (2.0.1)
|
||||
ddtrace (0.50.0)
|
||||
ddtrace (0.52.0)
|
||||
ffi (~> 1.0)
|
||||
msgpack
|
||||
debugger-linecache (1.2.0)
|
||||
@@ -241,10 +247,16 @@ GEM
|
||||
warden (~> 1.2.3)
|
||||
devise-encryptable (0.2.0)
|
||||
devise (>= 2.1.0)
|
||||
devise-i18n (1.10.0)
|
||||
devise (>= 4.8.0)
|
||||
devise-token_authenticatable (1.1.0)
|
||||
devise (>= 4.0.0, < 5.0.0)
|
||||
diff-lcs (1.4.4)
|
||||
docile (1.3.5)
|
||||
docile (1.4.0)
|
||||
dotenv (2.7.6)
|
||||
dotenv-rails (2.7.6)
|
||||
dotenv (= 2.7.6)
|
||||
railties (>= 3.2)
|
||||
e2mmap (0.1.0)
|
||||
erubi (1.10.0)
|
||||
et-orbi (1.2.4)
|
||||
@@ -265,10 +277,13 @@ GEM
|
||||
faraday-excon (1.1.0)
|
||||
faraday-net_http (1.0.1)
|
||||
faraday-net_http_persistent (1.1.0)
|
||||
ffaker (2.18.0)
|
||||
ffi (1.15.1)
|
||||
figaro (1.2.0)
|
||||
thor (>= 0.14.0, < 2)
|
||||
ferrum (0.11)
|
||||
addressable (~> 2.5)
|
||||
cliver (~> 0.3)
|
||||
concurrent-ruby (~> 1.1)
|
||||
websocket-driver (>= 0.6, < 0.8)
|
||||
ffaker (2.19.0)
|
||||
ffi (1.15.3)
|
||||
flipper (0.20.4)
|
||||
flipper-active_record (0.20.4)
|
||||
activerecord (>= 5.0, < 7)
|
||||
@@ -308,15 +323,13 @@ GEM
|
||||
rspec-core (~> 3.0)
|
||||
ruby-progressbar (~> 1.4)
|
||||
geocoder (1.6.7)
|
||||
get_process_mem (0.2.7)
|
||||
ffi (~> 1.0)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
globalid (0.5.2)
|
||||
activesupport (>= 5.0)
|
||||
gmaps4rails (2.1.2)
|
||||
good_migrations (0.1.0)
|
||||
activerecord (>= 3.1)
|
||||
railties (>= 3.1)
|
||||
haml (5.2.1)
|
||||
haml (5.2.2)
|
||||
temple (>= 0.8.0)
|
||||
tilt
|
||||
hashdiff (1.0.1)
|
||||
@@ -325,12 +338,11 @@ GEM
|
||||
hiredis (0.6.3)
|
||||
i18n (1.8.10)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n-js (3.8.3)
|
||||
i18n-js (3.9.0)
|
||||
i18n (>= 0.6.6)
|
||||
immigrant (0.3.6)
|
||||
activerecord (>= 3.0)
|
||||
ipaddress (0.8.3)
|
||||
jquery-migrate-rails (1.2.1)
|
||||
jquery-rails (4.4.0)
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
@@ -344,27 +356,14 @@ GEM
|
||||
multi_json (~> 1.0)
|
||||
rspec (>= 2.0, < 4.0)
|
||||
jwt (2.2.3)
|
||||
kaminari (1.2.1)
|
||||
activesupport (>= 4.1.0)
|
||||
kaminari-actionview (= 1.2.1)
|
||||
kaminari-activerecord (= 1.2.1)
|
||||
kaminari-core (= 1.2.1)
|
||||
kaminari-actionview (1.2.1)
|
||||
actionview
|
||||
kaminari-core (= 1.2.1)
|
||||
kaminari-activerecord (1.2.1)
|
||||
activerecord
|
||||
kaminari-core (= 1.2.1)
|
||||
kaminari-core (1.2.1)
|
||||
kgio (2.11.3)
|
||||
knapsack (3.1.0)
|
||||
knapsack (4.0.0)
|
||||
rake
|
||||
launchy (2.5.0)
|
||||
addressable (~> 2.7)
|
||||
letter_opener (1.7.0)
|
||||
launchy (~> 2.2)
|
||||
libv8-node (15.14.0.1)
|
||||
loofah (2.10.0)
|
||||
loofah (2.12.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
@@ -378,7 +377,7 @@ GEM
|
||||
nokogiri (~> 1)
|
||||
rake
|
||||
mini_mime (1.1.0)
|
||||
mini_portile2 (2.5.3)
|
||||
mini_portile2 (2.6.1)
|
||||
mini_racer (0.4.0)
|
||||
libv8-node (~> 15.14.0.0)
|
||||
minitest (5.14.4)
|
||||
@@ -390,9 +389,9 @@ GEM
|
||||
multi_json (1.15.0)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.1.1)
|
||||
nio4r (2.5.7)
|
||||
nokogiri (1.11.7)
|
||||
mini_portile2 (~> 2.5.0)
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.12.4)
|
||||
mini_portile2 (~> 2.6.1)
|
||||
racc (~> 1.4)
|
||||
oauth2 (1.4.7)
|
||||
faraday (>= 0.8, < 2.0)
|
||||
@@ -401,8 +400,9 @@ GEM
|
||||
multi_xml (~> 0.5)
|
||||
rack (>= 1.2, < 3)
|
||||
orm_adapter (0.5.0)
|
||||
paper_trail (10.3.1)
|
||||
activerecord (>= 4.2)
|
||||
pagy (4.11.0)
|
||||
paper_trail (12.1.0)
|
||||
activerecord (>= 5.2)
|
||||
request_store (~> 1.1)
|
||||
paperclip (3.4.2)
|
||||
activemodel (>= 3.0.0)
|
||||
@@ -410,10 +410,10 @@ GEM
|
||||
activesupport (>= 3.0.0)
|
||||
cocaine (~> 0.5.0)
|
||||
mime-types
|
||||
parallel (1.20.1)
|
||||
parallel (1.21.0)
|
||||
paranoia (2.4.3)
|
||||
activerecord (>= 4.0, < 6.2)
|
||||
parser (3.0.1.1)
|
||||
parser (3.0.2.0)
|
||||
ast (~> 2.4.1)
|
||||
paypal-sdk-core (0.3.4)
|
||||
multi_json (~> 1.0)
|
||||
@@ -427,18 +427,20 @@ GEM
|
||||
ruby-rc4
|
||||
ttfunk
|
||||
pg (1.2.3)
|
||||
power_assert (2.0.0)
|
||||
pry (0.14.1)
|
||||
power_assert (2.0.1)
|
||||
pry (0.13.1)
|
||||
coderay (~> 1.1)
|
||||
method_source (~> 1.0)
|
||||
pry-byebug (3.8.0)
|
||||
pry-byebug (3.9.0)
|
||||
byebug (~> 11.0)
|
||||
pry (~> 0.10)
|
||||
pry (~> 0.13.0)
|
||||
public_suffix (4.0.6)
|
||||
puma (5.4.0)
|
||||
nio4r (~> 2.0)
|
||||
raabro (1.4.0)
|
||||
racc (1.5.2)
|
||||
rack (2.2.3)
|
||||
rack-mini-profiler (2.3.2)
|
||||
rack-mini-profiler (2.3.3)
|
||||
rack (>= 1.2.0)
|
||||
rack-protection (2.1.0)
|
||||
rack
|
||||
@@ -449,20 +451,21 @@ GEM
|
||||
rack
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (6.1.4)
|
||||
actioncable (= 6.1.4)
|
||||
actionmailbox (= 6.1.4)
|
||||
actionmailer (= 6.1.4)
|
||||
actionpack (= 6.1.4)
|
||||
actiontext (= 6.1.4)
|
||||
actionview (= 6.1.4)
|
||||
activejob (= 6.1.4)
|
||||
activemodel (= 6.1.4)
|
||||
activerecord (= 6.1.4)
|
||||
activestorage (= 6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
rack-timeout (0.6.0)
|
||||
rails (6.1.4.1)
|
||||
actioncable (= 6.1.4.1)
|
||||
actionmailbox (= 6.1.4.1)
|
||||
actionmailer (= 6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
actiontext (= 6.1.4.1)
|
||||
actionview (= 6.1.4.1)
|
||||
activejob (= 6.1.4.1)
|
||||
activemodel (= 6.1.4.1)
|
||||
activerecord (= 6.1.4.1)
|
||||
activestorage (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
bundler (>= 1.15.0)
|
||||
railties (= 6.1.4)
|
||||
railties (= 6.1.4.1)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
rails-controller-testing (1.0.5)
|
||||
actionpack (>= 5.0.1.rc1)
|
||||
@@ -471,21 +474,20 @@ GEM
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.3.0)
|
||||
rails-html-sanitizer (1.4.1)
|
||||
loofah (~> 2.3)
|
||||
rails-i18n (6.0.0)
|
||||
i18n (>= 0.7, < 2)
|
||||
railties (>= 6.0.0, < 7)
|
||||
rails_safe_tasks (1.0.0)
|
||||
railties (6.1.4)
|
||||
actionpack (= 6.1.4)
|
||||
activesupport (= 6.1.4)
|
||||
railties (6.1.4.1)
|
||||
actionpack (= 6.1.4.1)
|
||||
activesupport (= 6.1.4.1)
|
||||
method_source
|
||||
rake (>= 0.13)
|
||||
thor (~> 1.0)
|
||||
rainbow (3.0.0)
|
||||
raindrops (0.19.1)
|
||||
rake (13.0.3)
|
||||
rake (13.0.6)
|
||||
ransack (2.4.2)
|
||||
activerecord (>= 5.2.4)
|
||||
activesupport (>= 5.2.4)
|
||||
@@ -494,7 +496,7 @@ GEM
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
redcarpet (3.5.1)
|
||||
redis (4.3.1)
|
||||
redis (4.4.0)
|
||||
regexp_parser (2.1.1)
|
||||
request_store (1.5.0)
|
||||
rack (>= 1.4)
|
||||
@@ -523,7 +525,7 @@ GEM
|
||||
rspec-mocks (3.10.2)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-rails (5.0.1)
|
||||
rspec-rails (5.0.2)
|
||||
actionpack (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
railties (>= 5.2)
|
||||
@@ -547,25 +549,25 @@ GEM
|
||||
rswag-ui (2.4.0)
|
||||
actionpack (>= 3.1, < 7.0)
|
||||
railties (>= 3.1, < 7.0)
|
||||
rubocop (1.18.1)
|
||||
rubocop (1.21.0)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.0.0.0)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml
|
||||
rubocop-ast (>= 1.7.0, < 2.0)
|
||||
rubocop-ast (>= 1.9.1, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.7.0)
|
||||
rubocop-ast (1.11.0)
|
||||
parser (>= 3.0.1.1)
|
||||
rubocop-rails (2.11.1)
|
||||
rubocop-rails (2.12.2)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 1.7.0, < 2.0)
|
||||
ruby-progressbar (1.11.0)
|
||||
ruby-rc4 (0.1.5)
|
||||
ruby2_keywords (0.0.4)
|
||||
rubyzip (2.3.0)
|
||||
rubyzip (2.3.2)
|
||||
rufus-scheduler (3.7.0)
|
||||
fugit (~> 1.1, >= 1.1.6)
|
||||
sass (3.4.25)
|
||||
@@ -575,13 +577,14 @@ GEM
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
tilt (>= 1.1, < 3)
|
||||
sd_notify (0.1.1)
|
||||
selenium-webdriver (3.142.7)
|
||||
childprocess (>= 0.5, < 4.0)
|
||||
rubyzip (>= 1.2.2)
|
||||
semantic_range (3.0.0)
|
||||
shoulda-matchers (4.5.1)
|
||||
activesupport (>= 4.2.0)
|
||||
sidekiq (6.2.1)
|
||||
shoulda-matchers (5.0.0)
|
||||
activesupport (>= 5.2.0)
|
||||
sidekiq (6.2.2)
|
||||
connection_pool (>= 2.2.2)
|
||||
rack (~> 2.0)
|
||||
redis (>= 4.2.0)
|
||||
@@ -598,7 +601,7 @@ GEM
|
||||
simplecov_json_formatter (~> 0.1)
|
||||
simplecov-html (0.12.3)
|
||||
simplecov_json_formatter (0.1.3)
|
||||
spring (2.1.1)
|
||||
spring (3.0.0)
|
||||
spring-commands-rspec (1.0.4)
|
||||
spring (>= 0.9.1)
|
||||
sprockets (3.7.2)
|
||||
@@ -616,12 +619,13 @@ GEM
|
||||
activerecord (>= 5.1)
|
||||
state_machines-activemodel (>= 0.8.0)
|
||||
stringex (2.8.5)
|
||||
stripe (5.35.0)
|
||||
stripe (5.38.0)
|
||||
temple (0.8.2)
|
||||
test-prof (1.0.6)
|
||||
test-unit (3.4.4)
|
||||
test-prof (1.0.7)
|
||||
test-unit (3.4.7)
|
||||
power_assert
|
||||
thor (1.1.0)
|
||||
thread-local (1.1.0)
|
||||
thwait (0.2.0)
|
||||
e2mmap
|
||||
tilt (2.0.10)
|
||||
@@ -632,20 +636,15 @@ GEM
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unicode-display_width (2.0.0)
|
||||
unicorn (6.0.0)
|
||||
kgio (~> 2.6)
|
||||
raindrops (~> 0.7)
|
||||
unicorn-rails (2.2.1)
|
||||
rack
|
||||
unicorn
|
||||
unicorn-worker-killer (0.4.5)
|
||||
get_process_mem (~> 0)
|
||||
unicorn (>= 4, < 7)
|
||||
uniform_notifier (1.14.2)
|
||||
view_component (2.34.0)
|
||||
activesupport (>= 5.0.0, < 7.0)
|
||||
view_component_storybook (0.8.0)
|
||||
view_component (>= 2.2)
|
||||
valid_email2 (4.0.0)
|
||||
activemodel (>= 3.2)
|
||||
mail (~> 2.5)
|
||||
view_component (2.40.0)
|
||||
activesupport (>= 5.0.0, < 8.0)
|
||||
method_source (~> 1.0)
|
||||
view_component_storybook (0.10.1)
|
||||
view_component (>= 2.36)
|
||||
warden (1.2.9)
|
||||
rack (>= 2.0.9)
|
||||
web-console (4.1.0)
|
||||
@@ -653,15 +652,15 @@ GEM
|
||||
activemodel (>= 6.0.0)
|
||||
bindex (>= 0.4.0)
|
||||
railties (>= 6.0.0)
|
||||
webdrivers (4.6.0)
|
||||
webdrivers (4.6.1)
|
||||
nokogiri (~> 1.6)
|
||||
rubyzip (>= 1.3.0)
|
||||
selenium-webdriver (>= 3.0, < 4.0)
|
||||
webmock (3.13.0)
|
||||
addressable (>= 2.3.6)
|
||||
webmock (3.14.0)
|
||||
addressable (>= 2.8.0)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff (>= 0.4.0, < 2.0.0)
|
||||
webpacker (5.4.0)
|
||||
webpacker (5.4.2)
|
||||
activesupport (>= 5.2)
|
||||
rack-proxy (>= 0.6.1)
|
||||
railties (>= 5.2)
|
||||
@@ -691,11 +690,10 @@ DEPENDENCIES
|
||||
activerecord-session_store
|
||||
acts-as-taggable-on (~> 8.1)
|
||||
acts_as_list (= 1.0.4)
|
||||
andand
|
||||
angular-rails-templates (>= 0.3.0)
|
||||
angular_rails_csrf
|
||||
angularjs-file-upload-rails (~> 2.4.1)
|
||||
angularjs-rails (= 1.5.5)
|
||||
angularjs-rails (= 1.8.0)
|
||||
awesome_nested_set
|
||||
awesome_print
|
||||
aws-sdk (= 1.67.0)
|
||||
@@ -704,6 +702,7 @@ DEPENDENCIES
|
||||
bugsnag
|
||||
bullet
|
||||
byebug
|
||||
cable_ready (= 5.0.0.pre2)
|
||||
cancancan (~> 1.15.0)
|
||||
capybara
|
||||
catalog!
|
||||
@@ -711,6 +710,7 @@ DEPENDENCIES
|
||||
coffee-rails (~> 5.0.0)
|
||||
combine_pdf
|
||||
compass-rails
|
||||
cuprite
|
||||
custom_error_message!
|
||||
dalli
|
||||
database_cleaner
|
||||
@@ -719,11 +719,12 @@ DEPENDENCIES
|
||||
debugger-linecache
|
||||
devise
|
||||
devise-encryptable
|
||||
devise-i18n
|
||||
devise-token_authenticatable
|
||||
dfc_provider!
|
||||
dotenv-rails
|
||||
factory_bot_rails (= 6.2.0)
|
||||
ffaker
|
||||
figaro
|
||||
flipper
|
||||
flipper-active_record
|
||||
flipper-ui
|
||||
@@ -739,15 +740,13 @@ DEPENDENCIES
|
||||
highline (= 2.0.3)
|
||||
hiredis
|
||||
i18n
|
||||
i18n-js (~> 3.8.3)
|
||||
i18n-js (~> 3.9.0)
|
||||
immigrant
|
||||
jquery-migrate-rails
|
||||
jquery-rails (= 4.4.0)
|
||||
jquery-ui-rails (~> 4.2)
|
||||
json
|
||||
json_spec (~> 1.1.4)
|
||||
jwt (~> 2.2)
|
||||
kaminari (~> 1.2.1)
|
||||
knapsack
|
||||
letter_opener (>= 1.4.1)
|
||||
mimemagic (> 0.3.5)
|
||||
@@ -756,17 +755,20 @@ DEPENDENCIES
|
||||
oauth2 (~> 1.4.7)
|
||||
ofn-qz!
|
||||
order_management!
|
||||
paper_trail (~> 10.3.1)
|
||||
pagy (~> 4.11)
|
||||
paper_trail (~> 12.1.0)
|
||||
paperclip (~> 3.4.1)
|
||||
paranoia (~> 2.4)
|
||||
paypal-sdk-merchant (= 1.117.2)
|
||||
pdf-reader
|
||||
pg (~> 1.2.3)
|
||||
pry
|
||||
pry-byebug
|
||||
pry (~> 0.13.0)
|
||||
pry-byebug (~> 3.9.0)
|
||||
puma
|
||||
rack-mini-profiler (< 3.0.0)
|
||||
rack-rewrite
|
||||
rack-ssl
|
||||
rack-timeout
|
||||
rails (~> 6.1.4)
|
||||
rails-controller-testing
|
||||
rails-i18n
|
||||
@@ -783,6 +785,7 @@ DEPENDENCIES
|
||||
rubocop
|
||||
rubocop-rails
|
||||
sass-rails (< 5.1.0)
|
||||
sd_notify
|
||||
select2-rails!
|
||||
selenium-webdriver
|
||||
shoulda-matchers
|
||||
@@ -798,8 +801,7 @@ DEPENDENCIES
|
||||
test-unit (~> 3.4)
|
||||
timecop
|
||||
uglifier (>= 1.0.3)
|
||||
unicorn-rails
|
||||
unicorn-worker-killer
|
||||
valid_email2
|
||||
view_component
|
||||
view_component_storybook
|
||||
web!
|
||||
|
||||
3
app/assets/images/edit-with-pen.svg
Normal file
3
app/assets/images/edit-with-pen.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.08646 2.11037L11.1222 4.40105C11.208 4.49756 11.208 4.65501 11.1222 4.75151L6.19306 10.2979L4.09861 10.5595C3.81875 10.595 3.58177 10.3284 3.61337 10.0135L3.84583 7.65677L8.775 2.11037C8.86076 2.01387 9.00069 2.01387 9.08646 2.11037ZM12.7427 1.52881L11.6413 0.28951C11.2983 -0.0965032 10.7408 -0.0965032 10.3955 0.28951L9.59653 1.18851C9.51076 1.28502 9.51076 1.44247 9.59653 1.53897L11.6323 3.82965C11.7181 3.92616 11.858 3.92616 11.9438 3.82965L12.7427 2.93065C13.0858 2.5421 13.0858 1.91483 12.7427 1.52881ZM8.66667 8.78941V11.3747H1.44444V3.2481H6.6309C6.70312 3.2481 6.77083 3.21508 6.82274 3.15921L7.72552 2.14339C7.89705 1.95038 7.77517 1.62278 7.53368 1.62278H1.08333C0.485243 1.62278 0 2.16878 0 2.84177V11.781C0 12.454 0.485243 13 1.08333 13H9.02778C9.62587 13 10.1111 12.454 10.1111 11.781V7.77359C10.1111 7.50186 9.81997 7.36726 9.64844 7.55773L8.74566 8.57355C8.69601 8.63196 8.66667 8.70815 8.66667 8.78941Z" fill="#4CB5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -10,5 +10,7 @@ angular.module("ofn.admin", [
|
||||
"admin.taxons",
|
||||
"infinite-scroll",
|
||||
"admin.orders"
|
||||
]).config ($httpProvider) ->
|
||||
]).config ($httpProvider, $locationProvider, $qProvider) ->
|
||||
$httpProvider.defaults.headers.common["Accept"] = "application/json, text/javascript, */*"
|
||||
$locationProvider.hashPrefix('')
|
||||
$qProvider.errorOnUnhandledRejections(false)
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
//
|
||||
|
||||
// jquery and angular
|
||||
//= require jquery
|
||||
//= require jquery-migrate-min
|
||||
//= require jquery2
|
||||
//= require jquery_ujs
|
||||
//= require jquery.ui.all
|
||||
//= require jquery.powertip
|
||||
|
||||
@@ -148,7 +148,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
$http(
|
||||
method: "DELETE"
|
||||
url: "/api/v0/products/" + product.id
|
||||
).success (data) ->
|
||||
).then (response) ->
|
||||
$scope.products.splice $scope.products.indexOf(product), 1
|
||||
DirtyProducts.deleteProduct product.id
|
||||
$scope.displayDirtyProducts()
|
||||
@@ -163,7 +163,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
$http(
|
||||
method: "DELETE"
|
||||
url: "/api/v0/products/" + product.permalink_live + "/variants/" + variant.id
|
||||
).success (data) ->
|
||||
).then (response) ->
|
||||
$scope.removeVariant(product, variant)
|
||||
else
|
||||
alert(t("delete_product_variant"))
|
||||
@@ -221,16 +221,16 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
import_date: $scope.q.importDateFilter
|
||||
page: $scope.page
|
||||
per_page: $scope.per_page
|
||||
).success((data) ->
|
||||
).then((response) ->
|
||||
DirtyProducts.clear()
|
||||
BulkProducts.updateVariantLists(data.products || [])
|
||||
BulkProducts.updateVariantLists(response.data.products || [])
|
||||
$timeout -> $scope.displaySuccess()
|
||||
).error (data, status) ->
|
||||
if status == 400 && data.errors?
|
||||
errorsString = ErrorsParser.toString(data.errors, status)
|
||||
).catch (response) ->
|
||||
if response.status == 400 && response.data.errors?
|
||||
errorsString = ErrorsParser.toString(response.data.errors, response.status)
|
||||
$scope.displayFailure t("products_update_error") + "\n" + errorsString
|
||||
else
|
||||
$scope.displayFailure t("products_update_error_data") + status
|
||||
$scope.displayFailure t("products_update_error_data") + response.status
|
||||
|
||||
$scope.cancel = (destination) ->
|
||||
$window.location = destination
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.customers").directive 'editAddressDialog', ($compile, $templateCache, DialogDefaults, Customers, StatusMessage, CountryStates) ->
|
||||
angular.module("admin.customers").directive 'editAddressDialog', ($rootScope, $compile, $templateCache, DialogDefaults, Customers, StatusMessage, CountryStates) ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, element, attr) ->
|
||||
@@ -18,6 +18,7 @@ angular.module("admin.customers").directive 'editAddressDialog', ($compile, $tem
|
||||
scope.customer = data
|
||||
scope.errors = []
|
||||
template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
StatusMessage.display('success', t('admin.customers.index.update_address_success'))
|
||||
else
|
||||
scope.errors.push(t('admin.customers.index.update_address_error'))
|
||||
@@ -33,4 +34,4 @@ angular.module("admin.customers").directive 'editAddressDialog', ($compile, $tem
|
||||
template = $compile($templateCache.get('admin/edit_address_dialog.html'))(scope)
|
||||
template.dialog(DialogDefaults)
|
||||
template.dialog('open')
|
||||
scope.$apply()
|
||||
$rootScope.$evalAsync()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.customers").directive 'newCustomerDialog', ($compile, $templateCache, DialogDefaults, CurrentShop, Customers) ->
|
||||
angular.module("admin.customers").directive 'newCustomerDialog', ($rootScope, $compile, $templateCache, DialogDefaults, CurrentShop, Customers) ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, element, attr) ->
|
||||
@@ -20,6 +20,7 @@ angular.module("admin.customers").directive 'newCustomerDialog', ($compile, $tem
|
||||
scope.email = ""
|
||||
scope.submitted = false
|
||||
template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
, (response) ->
|
||||
if response.data.errors
|
||||
scope.errors.push(error) for error in response.data.errors
|
||||
@@ -37,5 +38,6 @@ angular.module("admin.customers").directive 'newCustomerDialog', ($compile, $tem
|
||||
element.bind 'click', (e) ->
|
||||
if CurrentShop.shop.id
|
||||
template.dialog('open')
|
||||
$rootScope.$evalAsync()
|
||||
else
|
||||
alert(t('js.customers.select_shop'))
|
||||
|
||||
@@ -10,5 +10,5 @@ angular.module('admin.enterpriseFees').controller 'enterpriseFeesCtrl', ($scope,
|
||||
url += '&' + match[0]
|
||||
url
|
||||
|
||||
$http.get($scope.enterpriseFeesUrl()).success (data) ->
|
||||
$scope.enterprise_fees = data
|
||||
$http.get($scope.enterpriseFeesUrl()).then (response) ->
|
||||
$scope.enterprise_fees = response.data
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
angular.module("admin.enterprises")
|
||||
.controller "enterpriseCtrl", ($scope, $http, $window, NavigationCheck, enterprise, Enterprises, EnterprisePaymentMethods, EnterpriseShippingMethods, SideMenu, StatusMessage) ->
|
||||
.controller "enterpriseCtrl", ($scope, $http, $window, NavigationCheck, enterprise, Enterprises, EnterprisePaymentMethods, EnterpriseShippingMethods, SideMenu, StatusMessage, RequestMonitor) ->
|
||||
$scope.Enterprise = enterprise
|
||||
$scope.Enterprises = Enterprises
|
||||
$scope.PaymentMethods = EnterprisePaymentMethods.paymentMethods
|
||||
$scope.ShippingMethods = EnterpriseShippingMethods.shippingMethods
|
||||
$scope.navClear = NavigationCheck.clear
|
||||
$scope.menu = SideMenu
|
||||
$scope.newManager = { id: null, email: (t('add_manager')) }
|
||||
$scope.StatusMessage = StatusMessage
|
||||
$scope.RequestMonitor = RequestMonitor
|
||||
|
||||
$scope.$watch 'enterprise_form.$dirty', (newValue) ->
|
||||
StatusMessage.display 'notice', t('admin.unsaved_changes') if newValue
|
||||
@@ -59,11 +61,11 @@ angular.module("admin.enterprises")
|
||||
$scope.invite_errors = $scope.invite_success = null
|
||||
email = $scope.newUser
|
||||
|
||||
$http.post("/admin/manager_invitations", {email: email, enterprise_id: $scope.Enterprise.id}).success (data)->
|
||||
$scope.addManager({id: data.user, email: email})
|
||||
$http.post("/admin/manager_invitations", {email: email, enterprise_id: $scope.Enterprise.id}).then (response)->
|
||||
$scope.addManager({id: response.data.user, email: email})
|
||||
$scope.invite_success = t('user_invited', email: email)
|
||||
.error (data) ->
|
||||
$scope.invite_errors = data.errors
|
||||
.catch (response) ->
|
||||
$scope.invite_errors = response.data.errors
|
||||
|
||||
$scope.resetModal = ->
|
||||
$scope.newUser = $scope.invite_errors = $scope.invite_success = null
|
||||
@@ -90,3 +92,6 @@ angular.module("admin.enterprises")
|
||||
|
||||
$scope.translation = (key) ->
|
||||
t('js.admin.enterprises.form.images.' + key)
|
||||
|
||||
$scope.loadSuppliers = ->
|
||||
RequestMonitor.load $scope.suppliers = Enterprises.index(action: "visible", ams_prefix: "basic", "q[is_primary_producer_eq]": "true")
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
angular.module("admin.enterprises").directive "ofnProducerAutocomplete", (Enterprises, AutocompleteSelect2) ->
|
||||
scope: true
|
||||
link: (scope,element,attrs) ->
|
||||
scope.loadSuppliers() if !scope.suppliers
|
||||
multiple = scope.$eval attrs.multipleSelection
|
||||
placeholder = attrs.placeholder
|
||||
initialSelection = scope.$eval attrs.ngModel
|
||||
|
||||
setTimeout ->
|
||||
scope.suppliers.$promise.then (data) ->
|
||||
AutocompleteSelect2.autocomplete(
|
||||
multiple,
|
||||
placeholder,
|
||||
element,
|
||||
(-> Enterprises.findByID(initialSelection)),
|
||||
(-> Enterprises.findByIDs(initialSelection)),
|
||||
((term) -> Enterprises.findByTerm(scope.suppliers, term))
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.enterprises").directive 'termsAndConditionsWarning', ($compile, $templateCache, DialogDefaults, $timeout) ->
|
||||
angular.module("admin.enterprises").directive 'termsAndConditionsWarning', ($rootScope, $compile, $templateCache, DialogDefaults, $timeout) ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
|
||||
@@ -10,13 +10,14 @@ angular.module("admin.enterprises").directive 'termsAndConditionsWarning', ($com
|
||||
if scope.template.dialog
|
||||
scope.template.dialog(DialogDefaults)
|
||||
scope.template.dialog('open')
|
||||
scope.$apply()
|
||||
$rootScope.$evalAsync()
|
||||
|
||||
element.bind 'click', scope.hold_file_input_and_show_warning_modal
|
||||
|
||||
# When the user presses continue in the warning modal, we open the browser file input dialog
|
||||
scope.continue = ->
|
||||
scope.template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
|
||||
# unbind warning modal handler and click file input again to open the browser file input dialog
|
||||
element.unbind('click').trigger('click')
|
||||
@@ -27,4 +28,5 @@ angular.module("admin.enterprises").directive 'termsAndConditionsWarning', ($com
|
||||
|
||||
scope.close = ->
|
||||
scope.template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
return
|
||||
|
||||
@@ -15,19 +15,19 @@ angular.module("admin.enterprises").factory 'PermalinkChecker', ($q, $http) ->
|
||||
Accept: 'application/javascript'
|
||||
timeout: deferredAbort.promise
|
||||
)
|
||||
.success( (data) =>
|
||||
if data.length > @MAX_PERMALINK_LENGTH || !data.match(/^[\w-]+$/)
|
||||
.then( (response) =>
|
||||
if response.data.length > @MAX_PERMALINK_LENGTH || !response.data.match(/^[\w-]+$/)
|
||||
deferredRequest.resolve
|
||||
permalink: permalink
|
||||
available: t('js.error')
|
||||
else
|
||||
deferredRequest.resolve
|
||||
permalink: data
|
||||
permalink: response.data
|
||||
available: t('available')
|
||||
).error (data,status) =>
|
||||
if status == 409
|
||||
).catch (response) =>
|
||||
if response.status == 409
|
||||
deferredRequest.resolve
|
||||
permalink: data
|
||||
permalink: response.data
|
||||
available: t('js.unavailable')
|
||||
else
|
||||
# Something went wrong or request was aborted
|
||||
|
||||
@@ -35,7 +35,7 @@ angular.module("admin.indexUtils").factory 'Columns', ($rootScope, $http, $injec
|
||||
data:
|
||||
action_name: action_name
|
||||
column_preferences: (preference for column_name, preference of @columns)
|
||||
.success (data) =>
|
||||
for column in data
|
||||
.then (response) =>
|
||||
for column in response.data
|
||||
angular.extend(@columns[column.column_name], column)
|
||||
angular.extend(@savedColumns[column.column_name], column)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
angular.module("admin.indexUtils").factory "dataFetcher", ($http, $q, RequestMonitor) ->
|
||||
return (dataLocation) ->
|
||||
deferred = $q.defer()
|
||||
RequestMonitor.load $http.get(dataLocation).success((data) ->
|
||||
deferred.resolve data
|
||||
).error ->
|
||||
RequestMonitor.load $http.get(dataLocation).then((response) ->
|
||||
deferred.resolve response.data
|
||||
).catch ->
|
||||
deferred.reject()
|
||||
|
||||
deferred.promise
|
||||
|
||||
@@ -129,12 +129,12 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
|
||||
$scope.selectedUnitsVariant = unitsVariant
|
||||
|
||||
$scope.sumUnitValues = ->
|
||||
sum = $scope.filteredLineItems.reduce (sum,lineItem) ->
|
||||
sum = $scope.filteredLineItems?.reduce (sum,lineItem) ->
|
||||
sum + lineItem.final_weight_volume
|
||||
, 0
|
||||
|
||||
$scope.sumMaxUnitValues = ->
|
||||
sum = $scope.filteredLineItems.reduce (sum,lineItem) ->
|
||||
sum = $scope.filteredLineItems?.reduce (sum,lineItem) ->
|
||||
sum + lineItem.max_quantity * lineItem.units_variant.unit_value
|
||||
, 0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module('admin.orderCycles').controller 'AdminOrderCycleIncomingCtrl', ($scope, $controller, $location, Enterprise, OrderCycle, ExchangeProduct, ocInstance) ->
|
||||
angular.module('admin.orderCycles').controller 'AdminOrderCycleIncomingCtrl', ($scope, $rootScope, $controller, $location, Enterprise, OrderCycle, ExchangeProduct, ocInstance) ->
|
||||
$controller('AdminOrderCycleExchangesCtrl', {$scope: $scope, ocInstance: ocInstance, $location: $location})
|
||||
|
||||
$scope.view = 'incoming'
|
||||
@@ -28,4 +28,4 @@ angular.module('admin.orderCycles').controller 'AdminOrderCycleIncomingCtrl', ($
|
||||
$scope.selectAllVariants = (exchange, selected) ->
|
||||
$scope.loadAllExchangeProducts(exchange).then ->
|
||||
$scope.setExchangeVariants(exchange, $scope.suppliedVariants(exchange.enterprise_id), selected)
|
||||
$scope.$apply()
|
||||
$rootScope.$evalAsync()
|
||||
|
||||
@@ -18,7 +18,7 @@ angular.module('admin.orderCycles')
|
||||
OrderCycle.exchangeDirection(exchange)
|
||||
|
||||
$scope.enterprisesWithFees = ->
|
||||
$scope.enterprises[id] for id in OrderCycle.participatingEnterpriseIds() when $scope.enterpriseFeesForEnterprise(id).length > 0
|
||||
$scope.enterprises[id] for id in [OrderCycle.participatingEnterpriseIds()..., [OrderCycle.order_cycle.coordinator_id]...] when $scope.enterpriseFeesForEnterprise(id).length > 0
|
||||
|
||||
$scope.removeExchange = ($event, exchange) ->
|
||||
$event.preventDefault()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.orderCycles").directive 'scheduleDialog', ($window, $compile, $injector, $templateCache, DialogDefaults, OrderCycles, Schedules) ->
|
||||
angular.module("admin.orderCycles").directive 'scheduleDialog', ($rootScope, $window, $compile, $injector, $templateCache, DialogDefaults, OrderCycles, Schedules) ->
|
||||
restrict: 'A'
|
||||
scope:
|
||||
scheduleId: '@'
|
||||
@@ -22,9 +22,11 @@ angular.module("admin.orderCycles").directive 'scheduleDialog', ($window, $compi
|
||||
scope.template.dialog(angular.extend(settings,{width: $window.innerWidth * 0.6}))
|
||||
scope.template.dialog(close: -> scope.template.remove())
|
||||
scope.template.dialog('open')
|
||||
$rootScope.$evalAsync()
|
||||
|
||||
scope.close = ->
|
||||
scope.template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
return
|
||||
|
||||
scope.delete = ->
|
||||
@@ -55,6 +57,7 @@ angular.module("admin.orderCycles").directive 'scheduleDialog', ($window, $compi
|
||||
if data.id
|
||||
scope.submitted = false
|
||||
scope.template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
, (response) ->
|
||||
if response.data.errors
|
||||
scope.errors.push(error) for error in response.data.errors
|
||||
|
||||
@@ -8,19 +8,19 @@ angular.module("admin.orders").controller "bulkInvoiceCtrl", ($scope, $http, $ti
|
||||
$scope.poll_wait = 5 # 5 Seconds between each check
|
||||
$scope.poll_retries = 80 # Maximum checks before stopping
|
||||
|
||||
$http.post('/admin/orders/invoices', {order_ids: $scope.selected_orders}).success (data) ->
|
||||
$scope.invoice_id = data
|
||||
$http.post('/admin/orders/invoices', {order_ids: $scope.selected_orders}).then (response) ->
|
||||
$scope.invoice_id = response.data
|
||||
$scope.pollBulkInvoice()
|
||||
|
||||
$scope.pollBulkInvoice = ->
|
||||
$timeout($scope.nextPoll, $scope.poll_wait * 1000)
|
||||
|
||||
$scope.nextPoll = ->
|
||||
$http.get('/admin/orders/invoices/'+$scope.invoice_id+'/poll').success (data) ->
|
||||
$http.get('/admin/orders/invoices/'+$scope.invoice_id+'/poll').then (response) ->
|
||||
$scope.loading = false
|
||||
$scope.message = t('js.admin.orders.index.bulk_invoice_created')
|
||||
|
||||
.error (data) ->
|
||||
.catch (response) ->
|
||||
$scope.poll++
|
||||
|
||||
if $scope.poll > $scope.poll_retries
|
||||
|
||||
@@ -5,9 +5,9 @@ angular.module("admin.paymentMethods").controller "StripeController", ($scope, $
|
||||
$scope.$watch "paymentMethod.preferred_enterprise_id", (newID, oldID) ->
|
||||
return unless newID?
|
||||
$scope.stripe_account = {}
|
||||
$http.get("/admin/stripe_accounts/status.json?enterprise_id=#{newID}").success (data) ->
|
||||
angular.extend($scope.stripe_account, data)
|
||||
.error (response) ->
|
||||
$http.get("/admin/stripe_accounts/status.json?enterprise_id=#{newID}").then (response) ->
|
||||
angular.extend($scope.stripe_account, response.data)
|
||||
.catch (response) ->
|
||||
$scope.stripe_account.status = "request_failed"
|
||||
|
||||
$scope.current_enterprise_stripe_path = ->
|
||||
|
||||
@@ -84,14 +84,14 @@ angular.module("admin.productImport").controller "ImportFormCtrl", ($scope, $htt
|
||||
'end': end
|
||||
'filepath': ams_data.filepath
|
||||
'settings': ams_data.importSettings
|
||||
).success((data, status) ->
|
||||
angular.merge($scope.entries, angular.fromJson(data['entries']))
|
||||
$scope.sortUpdates(data['reset_counts'])
|
||||
).then((response) ->
|
||||
angular.merge($scope.entries, angular.fromJson(response.data['entries']))
|
||||
$scope.sortUpdates(response.data['reset_counts'])
|
||||
|
||||
$scope.updateProgress()
|
||||
).error((data, status) ->
|
||||
$scope.exception = data
|
||||
console.error(data)
|
||||
).catch((response) ->
|
||||
$scope.exception = response.data
|
||||
console.error(response.data)
|
||||
)
|
||||
|
||||
$scope.sortUpdates = (data) ->
|
||||
@@ -110,19 +110,19 @@ angular.module("admin.productImport").controller "ImportFormCtrl", ($scope, $htt
|
||||
'end': end
|
||||
'filepath': ams_data.filepath
|
||||
'settings': ams_data.importSettings
|
||||
).success((data, status) ->
|
||||
$scope.sortResults(data['results'])
|
||||
).then((response) ->
|
||||
$scope.sortResults(response.data['results'])
|
||||
|
||||
angular.forEach data['updated_ids'], (id) ->
|
||||
angular.forEach response.data['updated_ids'], (id) ->
|
||||
$scope.updated_ids.push(id)
|
||||
|
||||
angular.forEach data['errors'], (error) ->
|
||||
angular.forEach response.data['errors'], (error) ->
|
||||
$scope.update_errors.push(error)
|
||||
|
||||
$scope.updateProgress()
|
||||
).error((data, status) ->
|
||||
$scope.exception = data
|
||||
console.error(data)
|
||||
).catch((response) ->
|
||||
$scope.exception = response.data
|
||||
console.error(response.data)
|
||||
)
|
||||
|
||||
$scope.sortResults = (results) ->
|
||||
@@ -151,10 +151,10 @@ angular.module("admin.productImport").controller "ImportFormCtrl", ($scope, $htt
|
||||
'reset_absent': true,
|
||||
'updated_ids': $scope.updated_ids,
|
||||
'enterprises_to_reset': enterprises_to_reset
|
||||
).success((data, status) ->
|
||||
$scope.updates.products_reset = data
|
||||
).error((data, status) ->
|
||||
console.error(data)
|
||||
).then((response) ->
|
||||
$scope.updates.products_reset = response.data
|
||||
).catch((response) ->
|
||||
console.error(response.data)
|
||||
)
|
||||
|
||||
$scope.updateProgress = () ->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.resources").factory 'Enterprises', ($q, EnterpriseResource) ->
|
||||
angular.module("admin.resources").factory 'Enterprises', ($q, $filter, EnterpriseResource) ->
|
||||
new class Enterprises
|
||||
byID: {}
|
||||
pristineByID: {}
|
||||
@@ -50,6 +50,17 @@ angular.module("admin.resources").factory 'Enterprises', ($q, EnterpriseResource
|
||||
))
|
||||
deferred.promise
|
||||
|
||||
findByID: (id) ->
|
||||
@byID[id]
|
||||
|
||||
# For finding multiple Enterprises represented by comma delimited string
|
||||
findByIDs: (ids) ->
|
||||
@byID[id] for id in ids.split(",") when @byID[id]
|
||||
|
||||
findByTerm: (enterprises, term) ->
|
||||
$filter('filter')(enterprises, term)
|
||||
|
||||
|
||||
removeLogo: performActionOnEnterpriseResource(EnterpriseResource.removeLogo)
|
||||
removePromoImage: performActionOnEnterpriseResource(EnterpriseResource.removePromoImage)
|
||||
removeTermsAndConditions: performActionOnEnterpriseResource(EnterpriseResource.removeTermsAndConditions)
|
||||
|
||||
@@ -10,8 +10,8 @@ angular.module("ofn.admin").factory "BulkProducts", (ProductResource, dataFetche
|
||||
angular.extend(@pagination, data.pagination)
|
||||
|
||||
cloneProduct: (product) ->
|
||||
$http.post("/api/v0/products/" + product.id + "/clone").success (data) =>
|
||||
dataFetcher("/api/v0/products/" + data.id + "?template=bulk_show").then (newProduct) =>
|
||||
$http.post("/api/v0/products/" + product.id + "/clone").then (response) =>
|
||||
dataFetcher("/api/v0/products/" + response.data.id + "?template=bulk_show").then (newProduct) =>
|
||||
@unpackProduct newProduct
|
||||
@insertProductAfter(product, newProduct)
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
angular.module("ofn.admin").factory "ofnConfirmHandler", (pendingChanges, $compile, $q) ->
|
||||
return (scope, callback) ->
|
||||
template = "<div id='dialog-div' style='padding: 10px'><h6>" + t('js.services.unsaved_changes_message') + "</h6></div>"
|
||||
dialogDiv = $compile(template)(scope)
|
||||
return ->
|
||||
if pendingChanges.changeCount(pendingChanges.pendingChanges) > 0
|
||||
dialogDiv.dialog
|
||||
dialogClass: "no-close"
|
||||
resizable: false
|
||||
height: 140
|
||||
modal: true
|
||||
buttons:
|
||||
"SAVE": ->
|
||||
dialogDiv = $(this)
|
||||
$q.all(pendingChanges.submitAll()).then ->
|
||||
callback()
|
||||
dialogDiv.dialog "close"
|
||||
"IGNORE": ->
|
||||
callback()
|
||||
$(this).dialog "close"
|
||||
scope.$apply()
|
||||
dialogDiv.dialog "open"
|
||||
else
|
||||
callback()
|
||||
@@ -13,15 +13,15 @@ angular.module("ofn.admin").factory 'EnterpriseRelationships', ($http, enterpris
|
||||
|
||||
create: (parent_id, child_id, permissions) ->
|
||||
permissions = (name for name, enabled of permissions when enabled)
|
||||
$http.post('/admin/enterprise_relationships', {enterprise_relationship: {parent_id: parent_id, child_id: child_id, permissions_list: permissions}}).success (data, status) =>
|
||||
@enterprise_relationships.unshift(data)
|
||||
$http.post('/admin/enterprise_relationships', {enterprise_relationship: {parent_id: parent_id, child_id: child_id, permissions_list: permissions}}).then (response) =>
|
||||
@enterprise_relationships.unshift(response.data)
|
||||
@create_errors = ""
|
||||
|
||||
.error (response, status) =>
|
||||
@create_errors = response.errors
|
||||
.catch (response) =>
|
||||
@create_errors = response.data.errors
|
||||
|
||||
delete: (er) ->
|
||||
$http.delete('/admin/enterprise_relationships/' + er.id).success (data) =>
|
||||
$http.delete('/admin/enterprise_relationships/' + er.id).then (response) =>
|
||||
@enterprise_relationships.splice @enterprise_relationships.indexOf(er), 1
|
||||
|
||||
permission_presentation: (permission) ->
|
||||
|
||||
@@ -6,13 +6,13 @@ angular.module("ofn.admin").factory 'EnterpriseRoles', ($http, enterpriseRoles)
|
||||
@enterprise_roles = enterpriseRoles
|
||||
|
||||
create: (user_id, enterprise_id) ->
|
||||
$http.post('/admin/enterprise_roles', {enterprise_role: {user_id: user_id, enterprise_id: enterprise_id}}).success (data, status) =>
|
||||
@enterprise_roles.unshift(data)
|
||||
$http.post('/admin/enterprise_roles', {enterprise_role: {user_id: user_id, enterprise_id: enterprise_id}}).then (response) =>
|
||||
@enterprise_roles.unshift(response.data)
|
||||
@create_errors = ""
|
||||
|
||||
.error (response, status) =>
|
||||
@create_errors = response.errors
|
||||
.catch (response) =>
|
||||
@create_errors = response.data.errors
|
||||
|
||||
delete: (er) ->
|
||||
$http.delete('/admin/enterprise_roles/' + er.id).success (data) =>
|
||||
$http.delete('/admin/enterprise_roles/' + er.id).then (response) =>
|
||||
@enterprise_roles.splice @enterprise_roles.indexOf(er), 1
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
$(function() {
|
||||
var calculator_select = $('select#calc_type')
|
||||
var original_calc_type = calculator_select.attr('value');
|
||||
var calculator_select = $('select#calc_type');
|
||||
var original_calc_type = calculator_select.val();
|
||||
$('.calculator-settings-warning').hide();
|
||||
calculator_select.change(function() {
|
||||
if (calculator_select.attr('value') == original_calc_type) {
|
||||
|
||||
calculator_select.on("change", function() {
|
||||
if (calculator_select.val() === original_calc_type) {
|
||||
$('div.calculator-settings').show();
|
||||
$('.calculator-settings-warning').hide();
|
||||
$('.calculator-settings').find('input,textarea').prop("disabled", false);
|
||||
} else {
|
||||
$('div.calculator-settings').hide();
|
||||
$('.calculator-settings-warning').show();
|
||||
$('.calculator-settings').find('input,texttarea').prop("disabled", true);
|
||||
$('.calculator-settings').find('input,textarea').prop("disabled", true);
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
initAlert()
|
||||
initConfirm()
|
||||
|
||||
if ($('#variant_autocomplete_template').length > 0) {
|
||||
window.variantTemplate = Handlebars.compile($('#variant_autocomplete_template').text());
|
||||
window.variantStockTemplate = Handlebars.compile($('#variant_autocomplete_stock_template').text());
|
||||
@@ -45,7 +48,7 @@ $(document).ready(function() {
|
||||
if (quantity > maxQuantity) {
|
||||
quantity = maxQuantity;
|
||||
save.parents('tr').find('input.line_item_quantity').val(maxQuantity);
|
||||
alert(t("js.admin.orders.quantity_adjusted"));
|
||||
ofnAlert(t("js.admin.orders.quantity_adjusted"));
|
||||
}
|
||||
toggleItemEdit();
|
||||
|
||||
@@ -54,8 +57,9 @@ $(document).ready(function() {
|
||||
}
|
||||
$('a.save-item').click(handle_save_click);
|
||||
|
||||
handle_delete_click = function(){
|
||||
var del = $(this);
|
||||
handle_delete_click = function(elementSelector){
|
||||
var del = $(elementSelector);
|
||||
del.hide()
|
||||
var shipment_number = del.data('shipment-number');
|
||||
var variant_id = del.data('variant-id');
|
||||
|
||||
@@ -63,37 +67,48 @@ $(document).ready(function() {
|
||||
|
||||
adjustItems(shipment_number, variant_id, 0);
|
||||
}
|
||||
$('a.delete-item').click(handle_delete_click);
|
||||
|
||||
$('a.delete-item').click((event) => {
|
||||
ofnConfirm(() => {
|
||||
handle_delete_click('#custom-confirm');
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
adjustItems = function(shipment_number, variant_id, quantity){
|
||||
var shipment = _.findWhere(shipments, {number: shipment_number + ''});
|
||||
var inventory_units = _.where(shipment.inventory_units, {variant_id: variant_id});
|
||||
var shipment = _.findWhere(shipments, {number: shipment_number + ''});
|
||||
var inventory_units = _.where(shipment.inventory_units, {variant_id: variant_id});
|
||||
|
||||
var url = Spree.routes.orders_api + "/" + order_number + "/shipments/" + shipment_number;
|
||||
if (quantity == 0 && inventory_units.length == shipment.inventory_units.length) {
|
||||
ofnAlert(t("js.admin.orders.cannot_remove_last_item"));
|
||||
return;
|
||||
}
|
||||
|
||||
var new_quantity = 0;
|
||||
if(inventory_units.length<quantity){
|
||||
url += "/add"
|
||||
new_quantity = (quantity - inventory_units.length);
|
||||
}else if(inventory_units.length>quantity){
|
||||
url += "/remove"
|
||||
new_quantity = (inventory_units.length - quantity);
|
||||
}
|
||||
url += '.json';
|
||||
var url = Spree.routes.orders_api + "/" + order_number + "/shipments/" + shipment_number;
|
||||
|
||||
if (new_quantity == 0) {
|
||||
alert(t("js.admin.orders.quantity_unchanged"));
|
||||
} else {
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: Spree.url(url),
|
||||
data: { variant_id: variant_id, quantity: new_quantity }
|
||||
}).done(function( msg ) {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
var new_quantity = 0;
|
||||
if (inventory_units.length < quantity) {
|
||||
url += "/add";
|
||||
new_quantity = (quantity - inventory_units.length);
|
||||
} else if (inventory_units.length > quantity) {
|
||||
url += "/remove"
|
||||
new_quantity = (inventory_units.length - quantity);
|
||||
}
|
||||
url += '.json';
|
||||
|
||||
if (new_quantity == 0) {
|
||||
ofnAlert(t("js.admin.orders.quantity_unchanged"));
|
||||
} else {
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: Spree.url(url),
|
||||
data: { variant_id: variant_id, quantity: new_quantity }
|
||||
}).done(function( msg ) {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
toggleTrackingEdit = function(){
|
||||
@@ -147,3 +162,27 @@ addVariantFromStockLocation = function() {
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
initAlert = function() {
|
||||
$('#custom-alert .confirm').click(function(e) {
|
||||
$('#custom-alert').hide();
|
||||
})
|
||||
}
|
||||
|
||||
initConfirm = function() {
|
||||
$('#custom-confirm button.cancel').click(function(e) {
|
||||
$('#custom-confirm').hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
ofnAlert = function(message) {
|
||||
$('#custom-alert .message').text(message);
|
||||
$('#custom-alert').show();
|
||||
}
|
||||
|
||||
ofnConfirm = function(callback) {
|
||||
$('#custom-confirm').data($(event.target).data());
|
||||
$('#custom-confirm button.confirm').click(callback);
|
||||
$('#custom-confirm').show();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.subscriptions").directive 'newSubscriptionDialog', ($compile, $window, $templateCache, DialogDefaults, shops) ->
|
||||
angular.module("admin.subscriptions").directive 'newSubscriptionDialog', ($rootScope, $compile, $window, $templateCache, DialogDefaults, shops) ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, element, attr) ->
|
||||
@@ -26,3 +26,4 @@ angular.module("admin.subscriptions").directive 'newSubscriptionDialog', ($compi
|
||||
scope.newSubscription()
|
||||
else
|
||||
template.dialog('open')
|
||||
$rootScope.$evalAsync()
|
||||
|
||||
@@ -52,7 +52,7 @@ angular.module("admin.tagRules").controller "TagRulesCtrl", ($scope, $http, $fil
|
||||
$http
|
||||
method: "DELETE"
|
||||
url: "/admin/enterprises/#{enterprise.id}/tag_rules/#{tagRule.id}.json"
|
||||
.success ->
|
||||
.then ->
|
||||
tagGroup.rules.splice(index, 1)
|
||||
$scope.updateRuleCounts()
|
||||
$scope.enterprise_form.$setDirty()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.tagRules").directive 'newTagRuleDialog', ($compile, $templateCache, DialogDefaults) ->
|
||||
angular.module("admin.tagRules").directive 'newTagRuleDialog', ($rootScope, $compile, $templateCache, DialogDefaults) ->
|
||||
restrict: 'A'
|
||||
scope:
|
||||
tagGroup: '='
|
||||
@@ -22,8 +22,10 @@ angular.module("admin.tagRules").directive 'newTagRuleDialog', ($compile, $templ
|
||||
# Link opening of dialog to click event on element
|
||||
element.bind 'click', (e) ->
|
||||
template.dialog('open')
|
||||
$rootScope.$evalAsync()
|
||||
|
||||
scope.addRule = (tagGroup, ruleType) ->
|
||||
scope.addNewRuleTo(tagGroup, ruleType)
|
||||
template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
return
|
||||
|
||||
@@ -1,30 +1,17 @@
|
||||
angular.module("admin.taxons").directive "ofnTaxonAutocomplete", (Taxons, $sanitize) ->
|
||||
angular.module("admin.taxons").directive "ofnTaxonAutocomplete", (Taxons, AutocompleteSelect2) ->
|
||||
# Adapted from Spree's existing taxon autocompletion
|
||||
scope: true
|
||||
link: (scope,element,attrs) ->
|
||||
multiple = scope.$eval attrs.multipleSelection
|
||||
placeholder = attrs.placeholder
|
||||
initalSelection = scope.$eval attrs.ngModel
|
||||
initialSelection = scope.$eval attrs.ngModel
|
||||
|
||||
setTimeout ->
|
||||
element.select2
|
||||
placeholder: placeholder
|
||||
multiple: multiple
|
||||
initSelection: (element, callback) ->
|
||||
if multiple
|
||||
callback Taxons.findByIDs(initalSelection)
|
||||
else
|
||||
callback Taxons.findByID(initalSelection)
|
||||
query: (query) ->
|
||||
query.callback { results: Taxons.findByTerm(query.term) }
|
||||
formatResult: (taxon) ->
|
||||
$sanitize(taxon.name)
|
||||
formatSelection: (taxon) ->
|
||||
taxon.name
|
||||
|
||||
#Allows drag and drop
|
||||
if multiple
|
||||
element.select2("container").find("ul.select2-choices").sortable
|
||||
containment: 'parent'
|
||||
start: -> element.select2("onSortStart")
|
||||
update: -> element.select2("onSortEnd")
|
||||
AutocompleteSelect2.autocomplete(
|
||||
multiple,
|
||||
placeholder,
|
||||
element,
|
||||
(-> Taxons.findByID(initialSelection)),
|
||||
(-> Taxons.findByIDs(initialSelection)),
|
||||
((term) -> Taxons.findByTerm(term))
|
||||
)
|
||||
|
||||
@@ -9,9 +9,9 @@ angular.module("admin.users").directive "resendUserEmailConfirmation", ($http) -
|
||||
element.bind "click", ->
|
||||
return if sent
|
||||
scope.status = "sending"
|
||||
$http.post("/user/spree_user/confirmation", {spree_user: {email: scope.email}}).success (data) ->
|
||||
$http.post("/user/spree_user/confirmation", {spree_user: {email: scope.email}}).then (response) ->
|
||||
sent = true
|
||||
element.addClass "action--disabled"
|
||||
scope.status = "done"
|
||||
.error (data) ->
|
||||
.catch (response) ->
|
||||
scope.status = "failed"
|
||||
|
||||
@@ -12,7 +12,7 @@ $(document).ready(function() {
|
||||
altInput: true,
|
||||
altFormat: Spree.translations.flatpickr_date_format,
|
||||
dateFormat: "Y-m-d",
|
||||
locale: I18n.locale,
|
||||
locale: I18n.base_locale,
|
||||
plugins: [
|
||||
ShortcutButtonsPlugin({
|
||||
button: [{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module("admin.utils").directive 'helpModal', ($compile, $templateCache, $window, DialogDefaults) ->
|
||||
angular.module("admin.utils").directive 'helpModal', ($rootScope, $compile, $templateCache, $window, DialogDefaults) ->
|
||||
restrict: 'C'
|
||||
scope:
|
||||
template: '@'
|
||||
@@ -10,8 +10,11 @@ angular.module("admin.utils").directive 'helpModal', ($compile, $templateCache,
|
||||
template.dialog(DialogDefaults)
|
||||
|
||||
# Link opening of dialog to click event on element
|
||||
element.bind 'click', (e) -> template.dialog('open')
|
||||
element.bind 'click', (e) ->
|
||||
template.dialog('open')
|
||||
$rootScope.$evalAsync()
|
||||
|
||||
scope.close = ->
|
||||
template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
return
|
||||
|
||||
@@ -3,6 +3,7 @@ angular.module("admin.utils").directive "ofnWithTip", ($sanitize)->
|
||||
element.attr('data-powertip', $sanitize(attrs.ofnWithTip))
|
||||
element.powerTip
|
||||
smartPlacement: true
|
||||
placement: element.attr('powertip-location')
|
||||
fadeInTime: 50
|
||||
fadeOutTime: 50
|
||||
intentPollInterval: 300
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
angular.module("admin.utils").factory 'AutocompleteSelect2', ($sanitize) ->
|
||||
scope: true
|
||||
autocomplete: (
|
||||
multiple,
|
||||
placeholder,
|
||||
element,
|
||||
findByID,
|
||||
findByIDs,
|
||||
findByTerm
|
||||
) ->
|
||||
element.select2
|
||||
placeholder: placeholder
|
||||
multiple: multiple
|
||||
initSelection: (element, callback) ->
|
||||
if multiple
|
||||
callback findByIDs()
|
||||
else
|
||||
callback findByID()
|
||||
query: (query) ->
|
||||
query.callback { results: findByTerm(query.term) }
|
||||
formatResult: (item) ->
|
||||
$sanitize(item.name)
|
||||
formatSelection: (item) ->
|
||||
item.name
|
||||
|
||||
#Allows drag and drop
|
||||
if multiple
|
||||
element.select2("container").find("ul.select2-choices").sortable
|
||||
containment: 'parent'
|
||||
start: -> element.select2("onSortStart")
|
||||
update: -> element.select2("onSortEnd")
|
||||
@@ -10,12 +10,15 @@ angular.module("admin.utils").factory 'ConfirmDialog', ($rootScope, $q, $compile
|
||||
template = $compile($templateCache.get('admin/confirm_dialog.html'))(scope)
|
||||
template.dialog(DialogDefaults)
|
||||
template.dialog('open')
|
||||
$rootScope.$evalAsync()
|
||||
scope.confirm = ->
|
||||
deferred.resolve()
|
||||
template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
null
|
||||
scope.close = ->
|
||||
deferred.reject()
|
||||
template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
null
|
||||
deferred.promise
|
||||
|
||||
@@ -15,8 +15,10 @@ angular.module("admin.utils").factory 'InfoDialog', ($rootScope, $q, $compile, $
|
||||
template = $compile($templateCache.get(templateUrl))(scope)
|
||||
template.dialog(DialogDefaults)
|
||||
template.dialog('open')
|
||||
$rootScope.$evalAsync()
|
||||
scope.close = ->
|
||||
deferred.resolve()
|
||||
template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
null
|
||||
deferred.promise
|
||||
|
||||
@@ -62,14 +62,14 @@ angular.module("admin.variantOverrides").controller "AdminVariantOverridesCtrl",
|
||||
else
|
||||
StatusMessage.display 'progress', t('js.saving')
|
||||
DirtyVariantOverrides.save()
|
||||
.success (updatedVos) ->
|
||||
.then (updatedVos) ->
|
||||
DirtyVariantOverrides.clear()
|
||||
VariantOverrides.updateIds updatedVos
|
||||
VariantOverrides.updateIds updatedVos.data
|
||||
$scope.variant_overrides_form.$setPristine()
|
||||
StatusMessage.display 'success', t('js.changes_saved')
|
||||
VariantOverrides.updateData updatedVos # Refresh page data
|
||||
.error (data, status) ->
|
||||
StatusMessage.display 'failure', $scope.updateError(data, status)
|
||||
VariantOverrides.updateData updatedVos.data # Refresh page data
|
||||
.catch (response) ->
|
||||
StatusMessage.display 'failure', $scope.updateError(response.data, response.status)
|
||||
|
||||
|
||||
$scope.updateError = (data, status) ->
|
||||
@@ -98,11 +98,11 @@ angular.module("admin.variantOverrides").controller "AdminVariantOverridesCtrl",
|
||||
method: "POST"
|
||||
url: "/admin/variant_overrides/bulk_reset"
|
||||
data: { hub_id: $scope.hub_id }
|
||||
.success (updatedVos) ->
|
||||
VariantOverrides.updateData updatedVos
|
||||
.then (updatedVos) ->
|
||||
VariantOverrides.updateData updatedVos.data
|
||||
StatusMessage.display 'success', t('js.variant_overrides.stock_reset')
|
||||
.error (data, status) ->
|
||||
$timeout -> StatusMessage.display 'failure', $scope.updateError(data, status)
|
||||
.catch (response) ->
|
||||
$timeout -> StatusMessage.display 'failure', $scope.updateError(response.data, response.status)
|
||||
|
||||
# Variant override count_on_hand field placeholder logic:
|
||||
# on_demand true -- Show "On Demand"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#= require jquery
|
||||
#= require jquery2
|
||||
#= require jquery_ujs
|
||||
#= require jquery.ui.all
|
||||
#
|
||||
@@ -28,7 +28,6 @@
|
||||
#= require angular-rails-templates
|
||||
#= require_tree ../templates
|
||||
#
|
||||
#= require angular-backstretch.js
|
||||
#= require angular-flash.min.js
|
||||
#
|
||||
#= require moment/min/moment.min.js
|
||||
@@ -51,14 +50,27 @@
|
||||
#
|
||||
#= require modernizr
|
||||
#
|
||||
#= require foundation
|
||||
#= require ./darkswarm
|
||||
#= require ./overrides
|
||||
#= require_tree ./mixins
|
||||
#= require_tree ./directives
|
||||
#= require_tree .
|
||||
|
||||
$ ->
|
||||
# Hacky fix for issue - http://foundation.zurb.com/forum/posts/2112-foundation-5100-syntax-error-in-js
|
||||
Foundation.set_namespace ""
|
||||
$(document).foundation()
|
||||
document.addEventListener "turbo:load", ->
|
||||
window.injector = angular.bootstrap document.body, ["Darkswarm"]
|
||||
true
|
||||
|
||||
document.addEventListener "turbo:before-render", ->
|
||||
if window.injector
|
||||
rootscope = window.injector.get("$rootScope")
|
||||
rootscope?.$destroy()
|
||||
rootscope = null
|
||||
window.injector = null
|
||||
true
|
||||
|
||||
document.addEventListener "ajax:beforeSend", (event) =>
|
||||
window.Turbo.navigator.adapter.progressBar.setValue(0)
|
||||
window.Turbo.navigator.adapter.progressBar.show()
|
||||
|
||||
document.addEventListener "ajax:complete", (event) =>
|
||||
window.Turbo.navigator.adapter.progressBar.setValue(100)
|
||||
window.Turbo.navigator.adapter.progressBar.hide()
|
||||
|
||||
@@ -7,13 +7,3 @@ $ ->
|
||||
|
||||
($ 'form#update-cart').submit ->
|
||||
($ 'form#update-cart #update-button').attr('disabled', true)
|
||||
|
||||
|
||||
# Temporarily handles the cart showing stuff
|
||||
$(document).ready ->
|
||||
$('.cart_adjustment').hide()
|
||||
|
||||
$('td.cart-adjustments a').click ->
|
||||
$('.cart_adjustment').toggle()
|
||||
$(this).html(t('item_handling_fees'))
|
||||
false
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
Darkswarm.controller "ForgotCtrl", ($scope, $http, $location, AuthenticationService) ->
|
||||
angular.module('Darkswarm').controller "ForgotCtrl", ($scope, $http, $location, AuthenticationService) ->
|
||||
$scope.path = "/forgot"
|
||||
$scope.sent = false
|
||||
|
||||
$scope.submit = ->
|
||||
if $scope.spree_user.email != null
|
||||
$http.post("/user/spree_user/password", {spree_user: $scope.spree_user}).success (data)->
|
||||
$http.post("/user/spree_user/password", {spree_user: $scope.spree_user}).then (response)->
|
||||
$scope.sent = true
|
||||
.error (data, status) ->
|
||||
$scope.errors = data.error
|
||||
$scope.user_unconfirmed = (status == 401)
|
||||
.catch (response) ->
|
||||
$scope.errors = response.data.error
|
||||
$scope.user_unconfirmed = (response.status == 401)
|
||||
else
|
||||
$scope.errors = t 'email_required'
|
||||
|
||||
$scope.resend_confirmation = ->
|
||||
$http.post("/user/spree_user/confirmation", {spree_user: $scope.spree_user, return_url: $location.absUrl()}).success (data)->
|
||||
$http.post("/user/spree_user/confirmation", {spree_user: $scope.spree_user, return_url: $location.absUrl()}).then (response)->
|
||||
$scope.messages = t('devise.confirmations.send_instructions')
|
||||
.error (data) ->
|
||||
.catch (response) ->
|
||||
$scope.errors = t('devise.confirmations.failed_to_send')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "LoginCtrl", ($scope, $timeout, $location, $http, $window, AuthenticationService, Redirections, Loading) ->
|
||||
angular.module('Darkswarm').controller "LoginCtrl", ($scope, $timeout, $location, $http, $window, AuthenticationService, Redirections, Loading) ->
|
||||
$scope.path = "/login"
|
||||
|
||||
$scope.modalMessage = null
|
||||
@@ -10,20 +10,20 @@ Darkswarm.controller "LoginCtrl", ($scope, $timeout, $location, $http, $window,
|
||||
|
||||
$scope.submit = ->
|
||||
Loading.message = t 'logging_in'
|
||||
$http.post("/user/spree_user/sign_in", {spree_user: $scope.spree_user}).success (data)->
|
||||
$http.post("/user/spree_user/sign_in", {spree_user: $scope.spree_user}).then (response)->
|
||||
if Redirections.after_login
|
||||
$window.location.href = $window.location.origin + Redirections.after_login
|
||||
else
|
||||
$window.location.href = $window.location.origin + $window.location.pathname # Strips out hash fragments
|
||||
.error (data) ->
|
||||
.catch (response) ->
|
||||
Loading.clear()
|
||||
$scope.errors = data.message || data.error
|
||||
$scope.user_unconfirmed = (data.error == t('devise.failure.unconfirmed'))
|
||||
$scope.errors = response.data.message || response.data.error
|
||||
$scope.user_unconfirmed = (response.data.error == t('devise.failure.unconfirmed'))
|
||||
|
||||
$scope.resend_confirmation = ->
|
||||
$http.post("/user/spree_user/confirmation", {spree_user: $scope.spree_user, return_url: $location.absUrl()}).success (data)->
|
||||
$http.post("/user/spree_user/confirmation", {spree_user: $scope.spree_user, return_url: $location.absUrl()}).then (response)->
|
||||
$scope.messages = t('devise.confirmations.send_instructions')
|
||||
.error (data) ->
|
||||
.catch (response) ->
|
||||
$scope.errors = t('devise.confirmations.failed_to_send')
|
||||
|
||||
$timeout ->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "SignupCtrl", ($scope, $http, $window, $location, Redirections, AuthenticationService) ->
|
||||
angular.module('Darkswarm').controller "SignupCtrl", ($scope, $http, $window, $location, Redirections, AuthenticationService) ->
|
||||
$scope.path = "/signup"
|
||||
|
||||
$scope.spree_user.password_confirmation = ''
|
||||
@@ -8,8 +8,8 @@ Darkswarm.controller "SignupCtrl", ($scope, $http, $window, $location, Redirecti
|
||||
password: null
|
||||
|
||||
$scope.submit = ->
|
||||
$http.post("/user/spree_user", {spree_user: $scope.spree_user, return_url: $location.absUrl()}).success (data)->
|
||||
$http.post("/user/spree_user", {spree_user: $scope.spree_user, return_url: $location.absUrl()}).then (response)->
|
||||
$scope.errors = {email: null, password: null}
|
||||
$scope.messages = t('devise.user_registrations.spree_user.signed_up_but_unconfirmed')
|
||||
.error (data) ->
|
||||
$scope.errors = data
|
||||
.catch (response) ->
|
||||
$scope.errors = response.data
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "AuthenticationCtrl", ($scope, AuthenticationService, SpreeUser)->
|
||||
angular.module('Darkswarm').controller "AuthenticationCtrl", ($scope, AuthenticationService, SpreeUser)->
|
||||
$scope.open = AuthenticationService.open
|
||||
$scope.toggle = AuthenticationService.toggle
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "CartCtrl", ($scope, Cart, CurrentHub) ->
|
||||
angular.module('Darkswarm').controller "CartCtrl", ($scope, Cart, CurrentHub) ->
|
||||
$scope.Cart = Cart
|
||||
$scope.CurrentHub = CurrentHub
|
||||
$scope.max_characters = 20
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "CartDropdownCtrl", ($scope, Cart, BodyScroll) ->
|
||||
angular.module('Darkswarm').controller "CartDropdownCtrl", ($scope, Cart, BodyScroll) ->
|
||||
$scope.Cart = Cart
|
||||
$scope.showCartSidebar = false
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Darkswarm.controller "CartFormCtrl", ($scope) ->
|
||||
angular.module('Darkswarm').controller "CartFormCtrl", ($scope) ->
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "AccordionCtrl", ($scope, localStorageService, $timeout, $document, CurrentHub) ->
|
||||
angular.module('Darkswarm').controller "AccordionCtrl", ($scope, localStorageService, $timeout, $document, CurrentHub) ->
|
||||
$scope.accordionSections = ["details", "billing", "shipping", "payment"]
|
||||
$scope.accordion = { details: true, billing: true, shipping: true, payment: true }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Darkswarm.controller "BillingCtrl", ($scope, $timeout) ->
|
||||
angular.extend(this, new FieldsetMixin($scope))
|
||||
angular.module('Darkswarm').controller "BillingCtrl", ($scope, $timeout, $controller) ->
|
||||
angular.extend this, $controller('FieldsetMixin', {$scope: $scope})
|
||||
|
||||
$scope.name = "billing"
|
||||
$scope.nextPanel = "shipping"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "CheckoutCtrl", ($scope, localStorageService, Checkout, CurrentUser, CurrentHub, AuthenticationService, SpreeUser, $http) ->
|
||||
angular.module('Darkswarm').controller "CheckoutCtrl", ($scope, localStorageService, Checkout, CurrentUser, CurrentHub, AuthenticationService, SpreeUser, $http) ->
|
||||
$scope.Checkout = Checkout
|
||||
$scope.submitted = false
|
||||
|
||||
@@ -35,8 +35,8 @@ Darkswarm.controller "CheckoutCtrl", ($scope, localStorageService, Checkout, Cur
|
||||
$scope.$broadcast 'purchaseFormInvalid', $scope.formdata
|
||||
|
||||
$scope.ensureUserIsGuest = (callback = null) ->
|
||||
$http.post("/user/registered_email", {email: $scope.order.email}).success (data)->
|
||||
if data.registered == true
|
||||
$http.post("/user/registered_email", {email: $scope.order.email}).then (response)->
|
||||
if response.data.registered == true
|
||||
$scope.promptLogin()
|
||||
else
|
||||
$scope.validateForm() if $scope.submitted
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "CountryCtrl", ($scope, availableCountries) ->
|
||||
angular.module('Darkswarm').controller "CountryCtrl", ($scope, availableCountries) ->
|
||||
|
||||
$scope.countries = availableCountries
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Darkswarm.controller "DetailsCtrl", ($scope, $timeout, $http, CurrentUser, AuthenticationService, SpreeUser) ->
|
||||
angular.extend(this, new FieldsetMixin($scope))
|
||||
angular.module('Darkswarm').controller "DetailsCtrl", ($scope, $timeout, $http, CurrentUser, AuthenticationService, SpreeUser, $controller) ->
|
||||
angular.extend this, $controller('FieldsetMixin', {$scope: $scope})
|
||||
|
||||
$scope.name = "details"
|
||||
$scope.nextPanel = "billing"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Darkswarm.controller "PaymentCtrl", ($scope, $timeout, savedCreditCards, Dates) ->
|
||||
angular.extend(this, new FieldsetMixin($scope))
|
||||
angular.module('Darkswarm').controller "PaymentCtrl", ($scope, $timeout, savedCreditCards, Dates, $controller) ->
|
||||
angular.extend this, $controller('FieldsetMixin', {$scope: $scope})
|
||||
|
||||
$scope.savedCreditCards = savedCreditCards
|
||||
$scope.name = "payment"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Darkswarm.controller "ShippingCtrl", ($scope, $timeout, ShippingMethods) ->
|
||||
angular.extend(this, new FieldsetMixin($scope))
|
||||
angular.module('Darkswarm').controller "ShippingCtrl", ($scope, $timeout, ShippingMethods, $controller) ->
|
||||
angular.extend this, $controller('FieldsetMixin', {$scope: $scope})
|
||||
|
||||
$scope.ShippingMethods = ShippingMethods
|
||||
$scope.name = "shipping"
|
||||
$scope.nextPanel = "payment"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Darkswarm.controller "CreditCardsCtrl", ($scope, CreditCard, CreditCards) ->
|
||||
angular.extend(this, new FieldsetMixin($scope))
|
||||
angular.module('Darkswarm').controller "CreditCardsCtrl", ($scope, CreditCard, CreditCards, $controller) ->
|
||||
angular.extend this, $controller('FieldsetMixin', {$scope: $scope})
|
||||
|
||||
$scope.savedCreditCards = CreditCards.saved
|
||||
$scope.confirmSetDefault = CreditCards.confirmSetDefault
|
||||
$scope.CreditCard = CreditCard
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Darkswarm.controller "CurrentHubCtrl", ($scope, CurrentHub) ->
|
||||
angular.module('Darkswarm').controller "CurrentHubCtrl", ($scope, CurrentHub) ->
|
||||
$scope.CurrentHub = CurrentHub
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "EditBoughtOrderController", ($scope, $resource, $timeout, Cart, Messages) ->
|
||||
angular.module('Darkswarm').controller "EditBoughtOrderController", ($scope, $resource, $timeout, Cart, Messages) ->
|
||||
$scope.showBought = false
|
||||
$scope.removeEnabled = true
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "EnterprisesCtrl", ($scope, $rootScope, $timeout, $location, Enterprises, Search, $document, HashNavigation, FilterSelectorsService, EnterpriseModal, enterpriseMatchesNameQueryFilter, distanceWithinKmFilter) ->
|
||||
angular.module('Darkswarm').controller "EnterprisesCtrl", ($scope, $rootScope, $timeout, $location, Enterprises, Search, $document, HashNavigation, FilterSelectorsService, EnterpriseModal, enterpriseMatchesNameQueryFilter, distanceWithinKmFilter) ->
|
||||
$scope.Enterprises = Enterprises
|
||||
$scope.producers_to_filter = Enterprises.producers
|
||||
$scope.filterSelectors = FilterSelectorsService.createSelectors()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "GroupEnterprisesCtrl", ($scope, Search, FilterSelectorsService, EnterpriseModal) ->
|
||||
angular.module('Darkswarm').controller "GroupEnterprisesCtrl", ($scope, Search, FilterSelectorsService, EnterpriseModal) ->
|
||||
$scope.filterSelectors = FilterSelectorsService.createSelectors()
|
||||
$scope.query = Search.search()
|
||||
$scope.openModal = EnterpriseModal.open
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Darkswarm.controller "GroupPageCtrl", ($scope, enterprises, Enterprises) ->
|
||||
angular.module('Darkswarm').controller "GroupPageCtrl", ($scope, enterprises, Enterprises) ->
|
||||
$scope.Enterprises = Enterprises
|
||||
$scope.embedded_layout = window.location.search.indexOf("embedded_shopfront=true") != -1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "GroupTabsCtrl", ($scope, $controller, Navigation) ->
|
||||
angular.module('Darkswarm').controller "GroupTabsCtrl", ($scope, $controller, Navigation) ->
|
||||
angular.extend this, $controller('TabsCtrl', {$scope: $scope})
|
||||
|
||||
$scope.tabs =
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "GroupsCtrl", ($scope, Groups, Search) ->
|
||||
angular.module('Darkswarm').controller "GroupsCtrl", ($scope, Groups, Search) ->
|
||||
$scope.Groups = Groups
|
||||
$scope.order = 'position'
|
||||
$scope.query = Search.search()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "HomeCtrl", ($scope) ->
|
||||
angular.module('Darkswarm').controller "HomeCtrl", ($scope) ->
|
||||
$scope.brandStoryExpanded = false
|
||||
|
||||
$scope.toggleBrandStory = ->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "HubNodeCtrl", ($scope, HashNavigation, CurrentHub, $http, $timeout) ->
|
||||
angular.module('Darkswarm').controller "HubNodeCtrl", ($scope, HashNavigation, CurrentHub, $http, $timeout) ->
|
||||
$scope.shopfront_loading = false
|
||||
$scope.enterprise_details = []
|
||||
|
||||
@@ -9,6 +9,8 @@ Darkswarm.controller "HubNodeCtrl", ($scope, HashNavigation, CurrentHub, $http,
|
||||
# Toggles shopfront tabs open/closed. Fetches enterprise details from the api, diplays them and adds them
|
||||
# to $scope.enterprise_details, or simply displays the details again if previously fetched
|
||||
$scope.toggle = (event) ->
|
||||
return if event.target.closest("a")
|
||||
|
||||
if $scope.open()
|
||||
$scope.toggle_tab(event)
|
||||
return
|
||||
@@ -25,12 +27,12 @@ Darkswarm.controller "HubNodeCtrl", ($scope, HashNavigation, CurrentHub, $http,
|
||||
$scope.toggle_tab(event)
|
||||
|
||||
$http.get("/api/v0/shops/" + $scope.hub.id)
|
||||
.success (data) ->
|
||||
.then (response) ->
|
||||
$scope.shopfront_loading = false
|
||||
$scope.hub = data
|
||||
$scope.hub = response.data
|
||||
$scope.enterprise_details[$scope.hub.id] = $scope.hub
|
||||
.error (data) ->
|
||||
console.error(data)
|
||||
.catch (response) ->
|
||||
console.error(response.data)
|
||||
|
||||
$scope.toggle_tab = (event) ->
|
||||
HashNavigation.toggle $scope.hub.hash if event && !angular.element(event.target).inheritedData('is-link')
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Darkswarm.controller "MapCtrl", ($scope, MapConfiguration, OfnMap)->
|
||||
angular.module('Darkswarm').controller "MapCtrl", ($scope, MapConfiguration, OfnMap)->
|
||||
$scope.OfnMap = OfnMap
|
||||
$scope.map = angular.copy MapConfiguration.options
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "OffcanvasCtrl", ($scope) ->
|
||||
angular.module('Darkswarm').controller "OffcanvasCtrl", ($scope) ->
|
||||
$scope.menu = $(".left-off-canvas-menu")
|
||||
|
||||
$scope.setOffcanvasMenuHeight = ->
|
||||
@@ -9,3 +9,6 @@ Darkswarm.controller "OffcanvasCtrl", ($scope) ->
|
||||
$scope.setOffcanvasMenuHeight()
|
||||
|
||||
$scope.bind()
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
$(window).off("resize")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Darkswarm.controller "OrderCycleCtrl", ($scope, $rootScope, $timeout, OrderCycle) ->
|
||||
angular.module('Darkswarm').controller "OrderCycleCtrl", ($scope, $rootScope, $timeout, OrderCycle) ->
|
||||
$scope.order_cycle = OrderCycle.order_cycle
|
||||
$scope.OrderCycle = OrderCycle
|
||||
|
||||
Darkswarm.controller "OrderCycleChangeCtrl", ($scope, $rootScope, $timeout, OrderCycle, Products, Variants, Cart, ChangeableOrdersAlert) ->
|
||||
angular.module('Darkswarm').controller "OrderCycleChangeCtrl", ($scope, $rootScope, $timeout, OrderCycle, Products, Variants, Cart, ChangeableOrdersAlert) ->
|
||||
# Track previous order cycle id for use with revertOrderCycle()
|
||||
$scope.previous_order_cycle_id = OrderCycle.order_cycle.order_cycle_id
|
||||
$scope.$watch 'order_cycle.order_cycle_id', (newValue, oldValue)->
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Darkswarm.controller "OrdersCtrl", ($scope, Orders) ->
|
||||
angular.module('Darkswarm').controller "OrdersCtrl", ($scope, Orders) ->
|
||||
$scope.Orders = Orders
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "PageSelectionCtrl", ($scope, $rootScope, $location) ->
|
||||
angular.module('Darkswarm').controller "PageSelectionCtrl", ($scope, $rootScope, $location) ->
|
||||
$scope.selectedPage = ->
|
||||
# The path looks like `/contact` for the URL `https://ofn.org/shop#/contact`.
|
||||
# We remove the slash at the beginning.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "ProducerNodeCtrl", ($scope, HashNavigation, $anchorScroll, $http, $timeout) ->
|
||||
angular.module('Darkswarm').controller "ProducerNodeCtrl", ($scope, HashNavigation, $anchorScroll, $http, $timeout) ->
|
||||
$scope.shopfront_loading = false
|
||||
$scope.enterprise_details = []
|
||||
|
||||
@@ -9,6 +9,8 @@ Darkswarm.controller "ProducerNodeCtrl", ($scope, HashNavigation, $anchorScroll,
|
||||
# Toggles shopfront tabs open/closed. Fetches enterprise details from the api, diplays them and adds them
|
||||
# to $scope.enterprise_details, or simply displays the details again if previously fetched
|
||||
$scope.toggle = (event) ->
|
||||
return if event.target.closest("a")
|
||||
|
||||
if $scope.open()
|
||||
$scope.toggle_tab(event)
|
||||
return
|
||||
@@ -25,12 +27,12 @@ Darkswarm.controller "ProducerNodeCtrl", ($scope, HashNavigation, $anchorScroll,
|
||||
$scope.toggle_tab(event)
|
||||
|
||||
$http.get("/api/v0/shops/" + $scope.producer.id)
|
||||
.success (data) ->
|
||||
.then (response) ->
|
||||
$scope.shopfront_loading = false
|
||||
$scope.producer = data
|
||||
$scope.producer = response.data
|
||||
$scope.enterprise_details[$scope.producer.id] = $scope.producer
|
||||
.error (data) ->
|
||||
console.error(data)
|
||||
.catch (response) ->
|
||||
console.error(response.data)
|
||||
|
||||
$scope.toggle_tab = (event) ->
|
||||
HashNavigation.toggle $scope.producer.hash if event && !angular.element(event.target).inheritedData('is-link')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "ProductNodeCtrl", ($scope, $modal, FilterSelectorsService) ->
|
||||
angular.module('Darkswarm').controller "ProductNodeCtrl", ($scope, $modal, FilterSelectorsService) ->
|
||||
$scope.enterprise = $scope.product.supplier # For the modal, so it's consistent
|
||||
$scope.productPropertySelectors = FilterSelectorsService.createSelectors()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "ProductsCtrl", ($scope, $sce, $filter, $rootScope, Products, OrderCycle, OrderCycleResource, FilterSelectorsService, Cart, Dereferencer, Taxons, Properties, currentHub, $timeout) ->
|
||||
angular.module('Darkswarm').controller "ProductsCtrl", ($scope, $sce, $filter, $rootScope, Products, OrderCycle, OrderCycleResource, FilterSelectorsService, Cart, Dereferencer, Taxons, Properties, currentHub, $timeout) ->
|
||||
$scope.Products = Products
|
||||
$scope.Cart = Cart
|
||||
$scope.query = ""
|
||||
@@ -38,17 +38,12 @@ Darkswarm.controller "ProductsCtrl", ($scope, $sce, $filter, $rootScope, Product
|
||||
data.map( (taxon) ->
|
||||
$scope.supplied_taxons[taxon.id] = Taxons.taxons_by_id[taxon.id]
|
||||
)
|
||||
# Some taxons may be displayed in a dropdown.
|
||||
# Foundation needs initialising again to add dropdown actions.
|
||||
Foundation.init()
|
||||
|
||||
OrderCycleResource.properties params, (data)=>
|
||||
$scope.supplied_properties = {}
|
||||
data.map( (property) ->
|
||||
$scope.supplied_properties[property.id] = Properties.properties_by_id[property.id]
|
||||
)
|
||||
# Some properties may be displayed in a dropdown.
|
||||
# Foundation needs initialising again to add dropdown actions.
|
||||
Foundation.init()
|
||||
|
||||
$scope.loadMore = ->
|
||||
if ($scope.page * $scope.per_page) <= Products.products.length
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "RegistrationCtrl", ($scope, RegistrationService, EnterpriseRegistrationService, availableCountries, GmapsGeo) ->
|
||||
angular.module('Darkswarm').controller "RegistrationCtrl", ($scope, RegistrationService, EnterpriseRegistrationService, availableCountries, GmapsGeo) ->
|
||||
$scope.currentStep = RegistrationService.currentStep
|
||||
$scope.enterprise = EnterpriseRegistrationService.enterprise
|
||||
$scope.select = RegistrationService.select
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "RegistrationFormCtrl", ($scope, RegistrationService, EnterpriseRegistrationService) ->
|
||||
angular.module('Darkswarm').controller "RegistrationFormCtrl", ($scope, RegistrationService, EnterpriseRegistrationService) ->
|
||||
$scope.submitted = false
|
||||
$scope.isDisabled = false
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "ShopNodeCtrl", ($scope, HashNavigation, $anchorScroll) ->
|
||||
angular.module('Darkswarm').controller "ShopNodeCtrl", ($scope, HashNavigation, $anchorScroll) ->
|
||||
$scope.toggle = ->
|
||||
HashNavigation.toggle $scope.shop.hash
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "ShopVariantCtrl", ($scope, $modal, Cart) ->
|
||||
angular.module('Darkswarm').controller "ShopVariantCtrl", ($scope, $modal, Cart) ->
|
||||
$scope.updateCart = (line_item) ->
|
||||
Cart.adjust($scope.variant.line_item)
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Darkswarm.controller "AboutUsCtrl", ($scope, Shopfront) ->
|
||||
angular.module('Darkswarm').controller "AboutUsCtrl", ($scope, Shopfront) ->
|
||||
$scope.shopfront = Shopfront.shopfront
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Darkswarm.controller "ProducersTabCtrl", ($scope, Shopfront) ->
|
||||
angular.module('Darkswarm').controller "ProducersTabCtrl", ($scope, Shopfront) ->
|
||||
$scope.shopfront = Shopfront.shopfront
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "TabsCtrl", ($scope, Navigation) ->
|
||||
angular.module('Darkswarm').controller "TabsCtrl", ($scope, Navigation) ->
|
||||
$scope.isActive = Navigation.isActive
|
||||
|
||||
# Select tab by setting the url hash path.
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Darkswarm.controller "TmpCtrl", ($scope)->
|
||||
angular.module('Darkswarm').controller "TmpCtrl", ($scope)->
|
||||
$scope.test = {foo: "bar"}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
window.Darkswarm = angular.module("Darkswarm", [
|
||||
angular.module("Darkswarm", [
|
||||
'ngResource',
|
||||
'mm.foundation',
|
||||
'LocalStorageModule',
|
||||
@@ -12,9 +12,10 @@ window.Darkswarm = angular.module("Darkswarm", [
|
||||
'angularFileUpload',
|
||||
'angularSlideables',
|
||||
'OFNShared'
|
||||
]).config ($httpProvider, $tooltipProvider, $locationProvider, $anchorScrollProvider) ->
|
||||
]).config ($httpProvider, $tooltipProvider, $locationProvider, $anchorScrollProvider, $qProvider) ->
|
||||
$httpProvider.defaults.headers['common']['X-Requested-With'] = 'XMLHttpRequest'
|
||||
$httpProvider.defaults.headers.common['Accept'] = "application/json, text/javascript, */*"
|
||||
|
||||
$locationProvider.hashPrefix('')
|
||||
$qProvider.errorOnUnhandledRejections(false)
|
||||
# We manually handle our scrolling
|
||||
$anchorScrollProvider.disableAutoScrolling()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.directive "activeSelector", ->
|
||||
angular.module('Darkswarm').directive "activeSelector", ->
|
||||
# A generic selector that allows an object/scope to be toggled between active and inactive
|
||||
# Used in the filters, but hypothetically useable anywhere
|
||||
restrict: 'E'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.directive "activeTableHubLink", (CurrentHub, CurrentOrder) ->
|
||||
angular.module('Darkswarm').directive "activeTableHubLink", (CurrentHub, CurrentOrder) ->
|
||||
# Change the text of the hub link based on CurrentHub
|
||||
# To be used with ofnEmptiesCart
|
||||
# Takes "change" and "shop" as text string attributes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.directive 'auth', (AuthenticationService) ->
|
||||
angular.module('Darkswarm').directive 'auth', (AuthenticationService) ->
|
||||
restrict: 'A'
|
||||
link: (scope, elem, attrs) ->
|
||||
elem.bind "click", ->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.directive "bodyScroll", ($rootScope, BodyScroll) ->
|
||||
angular.module('Darkswarm').directive "bodyScroll", ($rootScope, BodyScroll) ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, elem, attrs) ->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.directive "ofnChangeHub", (CurrentHub, Cart) ->
|
||||
angular.module('Darkswarm').directive "ofnChangeHub", (CurrentHub, Cart) ->
|
||||
# Compares scope.hub with CurrentHub. Will trigger an confirmation if they are different,
|
||||
# and Cart isn't empty
|
||||
restrict: "A"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.directive "ofnChangeOrderCycle", (OrderCycle, Cart) ->
|
||||
angular.module('Darkswarm').directive "ofnChangeOrderCycle", (OrderCycle, Cart) ->
|
||||
# Compares chosen order cycle with pre-set OrderCycle. Will trigger
|
||||
# a confirmation if they are different, and Cart isn't empty
|
||||
restrict: "A"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.directive "changeableOrdersAlert", (ChangeableOrdersAlert) ->
|
||||
angular.module('Darkswarm').directive "changeableOrdersAlert", (ChangeableOrdersAlert) ->
|
||||
restrict: "C"
|
||||
scope: true
|
||||
link: (scope, element, attrs) ->
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user