Compare commits
1193 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6c3dd40e8 | ||
|
|
4686741425 | ||
|
|
58c8571c67 | ||
|
|
a4b2831fea | ||
|
|
427ee27f63 | ||
|
|
00846087a3 | ||
|
|
c2f8e27464 | ||
|
|
3c0b22f9aa | ||
|
|
878570283d | ||
|
|
38cb928d94 | ||
|
|
feded70d8b | ||
|
|
ac448aef30 | ||
|
|
64d8de9e74 | ||
|
|
367831461c | ||
|
|
2fed98b0c7 | ||
|
|
16c8092fb3 | ||
|
|
3aa2794a77 | ||
|
|
c681e183d3 | ||
|
|
ac38e9e4bd | ||
|
|
bb75346e64 | ||
|
|
ef04a89a30 | ||
|
|
c09aa9df1f | ||
|
|
453de7ae8d | ||
|
|
1881be8ef8 | ||
|
|
18ef778655 | ||
|
|
bc1175fd01 | ||
|
|
2fae9e6465 | ||
|
|
e34989b02f | ||
|
|
8f4a43c26d | ||
|
|
77be225e55 | ||
|
|
d33df1e297 | ||
|
|
1be0390dd6 | ||
|
|
115ed0773a | ||
|
|
36804e3af8 | ||
|
|
9b39d94a16 | ||
|
|
ba2a837fc5 | ||
|
|
1c272881b6 | ||
|
|
c36deef3f3 | ||
|
|
9bed888bd5 | ||
|
|
8bb1aba44e | ||
|
|
0fac3dfe7c | ||
|
|
a455c63000 | ||
|
|
8da1819262 | ||
|
|
71234232e7 | ||
|
|
bb851e8854 | ||
|
|
cf20e0f503 | ||
|
|
00ddb3a4f2 | ||
|
|
56efcb46d6 | ||
|
|
b00d522379 | ||
|
|
5659feb406 | ||
|
|
d49ce8e581 | ||
|
|
9d5712d8e8 | ||
|
|
343b2e5f73 | ||
|
|
a2d8c2e97d | ||
|
|
3ec1dc7787 | ||
|
|
fc187696f8 | ||
|
|
046fe6dfc4 | ||
|
|
796179e485 | ||
|
|
aac04b4ca5 | ||
|
|
d3af8a21dc | ||
|
|
5e684c6c02 | ||
|
|
4697897b46 | ||
|
|
e88ef6f848 | ||
|
|
5ba4f333d8 | ||
|
|
d2d63fe898 | ||
|
|
c295259c3f | ||
|
|
04dab9359a | ||
|
|
95956952d4 | ||
|
|
5b87265a1b | ||
|
|
e0de5e3648 | ||
|
|
b4eed1d8a7 | ||
|
|
077de8c8ab | ||
|
|
0df31b8a7c | ||
|
|
ebd5a0a95e | ||
|
|
3c3d56fa4a | ||
|
|
2d1bb202e1 | ||
|
|
ed54c62b07 | ||
|
|
e6536d2dc4 | ||
|
|
3926fee542 | ||
|
|
fd50f49466 | ||
|
|
b90b157ce8 | ||
|
|
3dfec26511 | ||
|
|
21d052d865 | ||
|
|
93db5cb161 | ||
|
|
ef4e8c8326 | ||
|
|
2ce6f984ec | ||
|
|
e49a0aceaa | ||
|
|
59e81e9230 | ||
|
|
0e4b9e27ac | ||
|
|
8737b923d5 | ||
|
|
b8fbc0ee10 | ||
|
|
06d09f18f5 | ||
|
|
7fda0cd3d8 | ||
|
|
822c13b77c | ||
|
|
eadec98acc | ||
|
|
747f766872 | ||
|
|
9a699fc85e | ||
|
|
4d9b5cb52c | ||
|
|
b8a9faa590 | ||
|
|
53f5ed04ff | ||
|
|
7ca309daa8 | ||
|
|
b0536894bb | ||
|
|
cb00a7f083 | ||
|
|
86151241c6 | ||
|
|
c9f3165f0e | ||
|
|
b11c07b53f | ||
|
|
069140c383 | ||
|
|
27576d5fd4 | ||
|
|
df88823794 | ||
|
|
ba13c27387 | ||
|
|
521a0329de | ||
|
|
ddc24eff70 | ||
|
|
8f308930a0 | ||
|
|
2f183c7583 | ||
|
|
09c2d9b902 | ||
|
|
5d7d94ed31 | ||
|
|
d3b3b1e408 | ||
|
|
3333e49e26 | ||
|
|
08e0e72b16 | ||
|
|
37b161d889 | ||
|
|
fcca42fca2 | ||
|
|
dbaf658108 | ||
|
|
24d39050d3 | ||
|
|
39122ee1cf | ||
|
|
8fa289a9bf | ||
|
|
0fad5b6187 | ||
|
|
5032b3844c | ||
|
|
01ffee6f18 | ||
|
|
d789a3b27e | ||
|
|
db5ef68f4a | ||
|
|
03ebf6c791 | ||
|
|
19fdc685d1 | ||
|
|
0763301d49 | ||
|
|
9b0effcb29 | ||
|
|
504e57933e | ||
|
|
f0ba4f269c | ||
|
|
b53931d088 | ||
|
|
bc78a5b73d | ||
|
|
f8822ea706 | ||
|
|
c4fef1d4ad | ||
|
|
77db9688fc | ||
|
|
90890728ac | ||
|
|
c0846ae051 | ||
|
|
75227916d4 | ||
|
|
3c861a31b5 | ||
|
|
f7d70fc3b2 | ||
|
|
54268fc6a1 | ||
|
|
374729f04e | ||
|
|
f0447c65e6 | ||
|
|
ab768a7af5 | ||
|
|
ec59417fe6 | ||
|
|
ea0a50431f | ||
|
|
d3830257c5 | ||
|
|
c40d35724d | ||
|
|
34180c4920 | ||
|
|
78569c6b95 | ||
|
|
e725140294 | ||
|
|
9b2dbe0c7f | ||
|
|
b243115862 | ||
|
|
045793877d | ||
|
|
8cb208c6db | ||
|
|
331fae5f2b | ||
|
|
1bda46ce7c | ||
|
|
ea2e692b09 | ||
|
|
0b32c87d3a | ||
|
|
d9263e1f26 | ||
|
|
f4621a3d2c | ||
|
|
c7dd89935c | ||
|
|
85ac333a42 | ||
|
|
ef7a97678d | ||
|
|
6001f609ee | ||
|
|
9af5512ff2 | ||
|
|
ff24444fa6 | ||
|
|
392a5bbcd6 | ||
|
|
f3a695232c | ||
|
|
2eee189671 | ||
|
|
827be85373 | ||
|
|
3826dc9d1b | ||
|
|
3b5d8334e3 | ||
|
|
d3385526c1 | ||
|
|
76da8083f2 | ||
|
|
ce6e08ca31 | ||
|
|
ed48050eca | ||
|
|
173c519516 | ||
|
|
0b8df1f229 | ||
|
|
ae431e0f72 | ||
|
|
d44f99df84 | ||
|
|
ef7de1c5e0 | ||
|
|
bf4256a2e4 | ||
|
|
3fff7774fc | ||
|
|
1e291a9cb4 | ||
|
|
4d59d202e0 | ||
|
|
48cc297c9c | ||
|
|
4e6fb93757 | ||
|
|
b3939fa7be | ||
|
|
b194c7f007 | ||
|
|
da539e15c0 | ||
|
|
2e8083bb0a | ||
|
|
33cbc3218a | ||
|
|
2c2353f763 | ||
|
|
ab05e403ef | ||
|
|
a1a40199e2 | ||
|
|
a299fe4ff3 | ||
|
|
0adf212693 | ||
|
|
291e16216c | ||
|
|
e97d290deb | ||
|
|
b5ae63d97b | ||
|
|
7e181c7f33 | ||
|
|
b94807533b | ||
|
|
81ff51ede4 | ||
|
|
2f9294a984 | ||
|
|
12b667f5cf | ||
|
|
f9ef150b4c | ||
|
|
fdc463072a | ||
|
|
df260717ff | ||
|
|
326ebf456e | ||
|
|
db9546e083 | ||
|
|
c03fefd4da | ||
|
|
a8202f69b5 | ||
|
|
4b5eec5bde | ||
|
|
94ed8796dc | ||
|
|
629f397745 | ||
|
|
397961f610 | ||
|
|
cc2712d81a | ||
|
|
a9d56d4a61 | ||
|
|
9959ac1867 | ||
|
|
6868e26f77 | ||
|
|
d285bead48 | ||
|
|
ff2361e9cc | ||
|
|
3d2cac96be | ||
|
|
12123ae406 | ||
|
|
eaf2049b2b | ||
|
|
b3f84e0021 | ||
|
|
b60edf0fc1 | ||
|
|
fbc25de7ab | ||
|
|
f6d419734c | ||
|
|
12c37ad762 | ||
|
|
3c39e4eb59 | ||
|
|
e44d92dd8b | ||
|
|
8ba2528b6d | ||
|
|
faa64cc001 | ||
|
|
2664cf4613 | ||
|
|
161e45370d | ||
|
|
7da4af6897 | ||
|
|
79c1e48d45 | ||
|
|
88484d2652 | ||
|
|
4af9251ccc | ||
|
|
4467eea896 | ||
|
|
b2333d0229 | ||
|
|
d696311558 | ||
|
|
43509996a9 | ||
|
|
39d872bc65 | ||
|
|
680eeac585 | ||
|
|
5990dee938 | ||
|
|
b78b82222a | ||
|
|
1a45335732 | ||
|
|
b176265844 | ||
|
|
140fb4608d | ||
|
|
a95233e994 | ||
|
|
0f05e4a4c2 | ||
|
|
07df427285 | ||
|
|
882cb9b480 | ||
|
|
4ecd95d70a | ||
|
|
896d920a82 | ||
|
|
412fb62443 | ||
|
|
df29892958 | ||
|
|
fc39ad0f1f | ||
|
|
1dd9635bad | ||
|
|
1036b80fb4 | ||
|
|
3c95ccdd02 | ||
|
|
0861357f41 | ||
|
|
c2f9970306 | ||
|
|
f88615d6a6 | ||
|
|
dd50035fc4 | ||
|
|
30314c7f38 | ||
|
|
5466f47669 | ||
|
|
e7849fecdf | ||
|
|
f5f123e99c | ||
|
|
8b2b14a56b | ||
|
|
0e961da897 | ||
|
|
731bd5e58a | ||
|
|
df3dbbb56e | ||
|
|
2025fba8bb | ||
|
|
f5bfa2a115 | ||
|
|
88bce08fa4 | ||
|
|
76b95c4b37 | ||
|
|
678b6e290c | ||
|
|
47dd7f065c | ||
|
|
2dc708f244 | ||
|
|
a0bd10182d | ||
|
|
f20b16aa31 | ||
|
|
478cfbe54d | ||
|
|
c45be93bdd | ||
|
|
98b65f10ba | ||
|
|
7238eb905b | ||
|
|
523266ef83 | ||
|
|
d0afdb6832 | ||
|
|
4856abbc43 | ||
|
|
1686efbaf5 | ||
|
|
f50e33e654 | ||
|
|
42712d6b1c | ||
|
|
179e80883e | ||
|
|
0be36c7115 | ||
|
|
bdeb417507 | ||
|
|
62a445eda8 | ||
|
|
af9659af65 | ||
|
|
d8224249b8 | ||
|
|
7c8f8762dc | ||
|
|
9393e06d76 | ||
|
|
73e2d6cfe6 | ||
|
|
864457de58 | ||
|
|
06e89a7380 | ||
|
|
041501bf5c | ||
|
|
8ad3737404 | ||
|
|
fd50bf71f4 | ||
|
|
5bc4410d43 | ||
|
|
e6e8d67b4c | ||
|
|
e8c5bd2b3a | ||
|
|
cd49a81a82 | ||
|
|
1c0dbe6387 | ||
|
|
37baa873fe | ||
|
|
f0753799a3 | ||
|
|
c3e5a8df5a | ||
|
|
aed7eea6b3 | ||
|
|
1e2dfdeacc | ||
|
|
418aeb4f8d | ||
|
|
b13835e003 | ||
|
|
66bf650a36 | ||
|
|
6179dd0938 | ||
|
|
48ae62caa6 | ||
|
|
0b50741275 | ||
|
|
8ed739c668 | ||
|
|
a628795f4b | ||
|
|
278f0b2adf | ||
|
|
43edf0617e | ||
|
|
f0c2949808 | ||
|
|
1d8aa48d6d | ||
|
|
51a2bf49b3 | ||
|
|
bf84a1d7a8 | ||
|
|
83e9273d77 | ||
|
|
2314b29763 | ||
|
|
23481197fa | ||
|
|
c994b49361 | ||
|
|
cd4204283f | ||
|
|
e01bf29ce7 | ||
|
|
85bbe4f47b | ||
|
|
cd08d4f07a | ||
|
|
b5f0020ec4 | ||
|
|
0a854e01f2 | ||
|
|
59f42bbad0 | ||
|
|
4fc732e3f7 | ||
|
|
e58e1f05c8 | ||
|
|
092b915a8e | ||
|
|
23e81c1967 | ||
|
|
dd0dbc2bc6 | ||
|
|
2779617c1a | ||
|
|
3aa56ba3f4 | ||
|
|
f8efa8ab56 | ||
|
|
8c9bab8c18 | ||
|
|
8434bdafa1 | ||
|
|
414b1efb17 | ||
|
|
f6dbb64a04 | ||
|
|
57a81a3621 | ||
|
|
0903195b9b | ||
|
|
66b8d84857 | ||
|
|
fb16e75f12 | ||
|
|
0de8d6048b | ||
|
|
850f07ee0d | ||
|
|
597ca73272 | ||
|
|
d787cc9373 | ||
|
|
ee9b6e4b13 | ||
|
|
3a6e00ca30 | ||
|
|
392d43d6c1 | ||
|
|
fba58f4953 | ||
|
|
f5a65fff9b | ||
|
|
f1f354b619 | ||
|
|
bdff3496ac | ||
|
|
d2db48cd43 | ||
|
|
c723fb19dc | ||
|
|
8de7185411 | ||
|
|
35a3dd97fe | ||
|
|
c8237c68cb | ||
|
|
9307ccfde9 | ||
|
|
452e1eae1e | ||
|
|
f49538fe40 | ||
|
|
03bda751fc | ||
|
|
17b1538923 | ||
|
|
e14ab59b88 | ||
|
|
71bd69510f | ||
|
|
ac03f180b9 | ||
|
|
8695782e56 | ||
|
|
691f7f7b0a | ||
|
|
cfb4ebab79 | ||
|
|
8f2d07f6c4 | ||
|
|
786a360eaa | ||
|
|
f5b38f3cf8 | ||
|
|
0960963ec5 | ||
|
|
ec8fd404fb | ||
|
|
8e8890923f | ||
|
|
573e899c4d | ||
|
|
ed301a4f1f | ||
|
|
334ef77c64 | ||
|
|
2cfbdfac54 | ||
|
|
6f6c45f6ab | ||
|
|
01aea3489e | ||
|
|
ca81b04628 | ||
|
|
8365f650f9 | ||
|
|
40ef840129 | ||
|
|
5dd56cb04a | ||
|
|
64fcce8fb8 | ||
|
|
c65f3ea9bd | ||
|
|
a9d465c2cb | ||
|
|
1639969424 | ||
|
|
95d4224b84 | ||
|
|
f75579a4da | ||
|
|
0dea5da708 | ||
|
|
063a6e8ee5 | ||
|
|
fa8cc15ec4 | ||
|
|
734116a638 | ||
|
|
f800c75289 | ||
|
|
5093e12932 | ||
|
|
96a47a2105 | ||
|
|
cfb98ced39 | ||
|
|
e35c25813b | ||
|
|
bde9b729ef | ||
|
|
69bb3129fd | ||
|
|
3c7fff0e46 | ||
|
|
c5302e19c6 | ||
|
|
6120e178ce | ||
|
|
055bda7044 | ||
|
|
d14d7037fe | ||
|
|
426ae88979 | ||
|
|
2d75247534 | ||
|
|
17b7a7dfd6 | ||
|
|
386779d4aa | ||
|
|
359bcec34d | ||
|
|
cc3ad03aa4 | ||
|
|
f98854a83d | ||
|
|
b32a9ab20e | ||
|
|
9db94b5b0b | ||
|
|
a61ab18461 | ||
|
|
3c5d2d4211 | ||
|
|
f827f886e7 | ||
|
|
6f33d26015 | ||
|
|
5e3f88fc48 | ||
|
|
245a863319 | ||
|
|
dd5aea8de3 | ||
|
|
25ed36e3c6 | ||
|
|
f419c66df0 | ||
|
|
03c822e931 | ||
|
|
34c72a14b7 | ||
|
|
cb57c0198a | ||
|
|
94c07753ca | ||
|
|
1a6d16c71c | ||
|
|
d1941b6f7c | ||
|
|
35a300bd62 | ||
|
|
15b1e35e39 | ||
|
|
ddf62d526c | ||
|
|
5cea19f957 | ||
|
|
f7ea275033 | ||
|
|
ca935a36f0 | ||
|
|
5fdaba3b64 | ||
|
|
c4637bb573 | ||
|
|
a8fb574fa1 | ||
|
|
707b1e45bb | ||
|
|
6dc91153cc | ||
|
|
af3dad48f2 | ||
|
|
34eb725b29 | ||
|
|
6ef6a8254d | ||
|
|
22139c17f7 | ||
|
|
bd9c7dbb5d | ||
|
|
a20e627905 | ||
|
|
0cad5080cd | ||
|
|
e11faf35d2 | ||
|
|
0a468f2f29 | ||
|
|
404b6416f3 | ||
|
|
eecfa3ad00 | ||
|
|
4354a45061 | ||
|
|
554a3df3c8 | ||
|
|
5550598c91 | ||
|
|
65cc064d11 | ||
|
|
43056247e1 | ||
|
|
7e6a5232f7 | ||
|
|
1b577db125 | ||
|
|
a9b36ba2a0 | ||
|
|
bb987768d4 | ||
|
|
b0ff0406cf | ||
|
|
26b450fdd7 | ||
|
|
b8086a315e | ||
|
|
0c23606169 | ||
|
|
4f2018173e | ||
|
|
fc23f6ebd4 | ||
|
|
5ce73ac557 | ||
|
|
e6e2f17624 | ||
|
|
136a45b132 | ||
|
|
5a1d5ae853 | ||
|
|
ba5ef65515 | ||
|
|
dc0aa78c1d | ||
|
|
e786bbd650 | ||
|
|
4b62e14c46 | ||
|
|
05a389d706 | ||
|
|
5156d95c94 | ||
|
|
d9a1bbebee | ||
|
|
7c5c5178f8 | ||
|
|
f332793a7e | ||
|
|
88727ab663 | ||
|
|
4015d1c40b | ||
|
|
055a943190 | ||
|
|
c524b584d7 | ||
|
|
63a05f809a | ||
|
|
66ad2ceb87 | ||
|
|
f056d39a66 | ||
|
|
ff7749545d | ||
|
|
82c5d2831e | ||
|
|
261b0674ea | ||
|
|
b7fcd36411 | ||
|
|
767e5f9eed | ||
|
|
a37a0b1694 | ||
|
|
5e200384b1 | ||
|
|
d2da5132bd | ||
|
|
015ca1c537 | ||
|
|
3cb66b5626 | ||
|
|
494571455d | ||
|
|
d3856fedce | ||
|
|
df6f4ece2b | ||
|
|
f14bcd4a3a | ||
|
|
bbc979d4cd | ||
|
|
bb56107eab | ||
|
|
13179d80e5 | ||
|
|
de8f6b93ca | ||
|
|
984f0bcf94 | ||
|
|
1d9b2cda8d | ||
|
|
ade9364130 | ||
|
|
367f622f60 | ||
|
|
2f17d609e8 | ||
|
|
ceae0b202e | ||
|
|
ebd6ce7be8 | ||
|
|
3d3280f2b0 | ||
|
|
8fdcc8fab2 | ||
|
|
925e4c9da7 | ||
|
|
c748ee8779 | ||
|
|
983bc664fc | ||
|
|
d45e1a45d2 | ||
|
|
fbe796bf64 | ||
|
|
9d291f67f0 | ||
|
|
7ad9858445 | ||
|
|
dc1b86db24 | ||
|
|
1010d053cc | ||
|
|
2167163192 | ||
|
|
f68cd09177 | ||
|
|
290646e454 | ||
|
|
ab1f0724e1 | ||
|
|
1c23a6e957 | ||
|
|
cbf8930b1f | ||
|
|
9e457b736c | ||
|
|
7a1c4d3dbe | ||
|
|
aec1835e58 | ||
|
|
7e062f0e03 | ||
|
|
fda27cfe33 | ||
|
|
90613cbbb7 | ||
|
|
05f45ad302 | ||
|
|
02c9e6bc8e | ||
|
|
f272a3a7c8 | ||
|
|
fc236be953 | ||
|
|
b3ac64ea71 | ||
|
|
204e37d26a | ||
|
|
a18dd205a4 | ||
|
|
cb2fc2754c | ||
|
|
39da23cd67 | ||
|
|
86f42e96f4 | ||
|
|
d7acbcd7c8 | ||
|
|
4614b349d0 | ||
|
|
c4d98f6ef2 | ||
|
|
ba1e10d105 | ||
|
|
afe0299fcf | ||
|
|
c6c69b6fc0 | ||
|
|
0de4b12eac | ||
|
|
a2440635d6 | ||
|
|
da51ebad6a | ||
|
|
9a943e1f55 | ||
|
|
bf35ab6893 | ||
|
|
c2b964bd8a | ||
|
|
16d82deb89 | ||
|
|
01055ede4e | ||
|
|
26ad359e8a | ||
|
|
a0999650b9 | ||
|
|
e59b77b627 | ||
|
|
33ec4a6783 | ||
|
|
5312fab301 | ||
|
|
01e740d525 | ||
|
|
29e5b53309 | ||
|
|
a60cad77b0 | ||
|
|
498d407850 | ||
|
|
5acec234c9 | ||
|
|
1060e6328d | ||
|
|
de0405cd60 | ||
|
|
bffade18ba | ||
|
|
194be2ed53 | ||
|
|
e242d4c52c | ||
|
|
a9a802f3fa | ||
|
|
948259dd42 | ||
|
|
2f3a76ca77 | ||
|
|
89d6e89c86 | ||
|
|
a4ce107845 | ||
|
|
dbf294fe2f | ||
|
|
a09ae4d96b | ||
|
|
74e83ce538 | ||
|
|
17fcb40204 | ||
|
|
cfec5e811f | ||
|
|
5c51004e94 | ||
|
|
affb2bded5 | ||
|
|
5de83533a2 | ||
|
|
f3df10eefb | ||
|
|
edf2be7e71 | ||
|
|
31c6a90802 | ||
|
|
b675e8ee29 | ||
|
|
62bd3110aa | ||
|
|
272cfc712f | ||
|
|
442e87ae79 | ||
|
|
c8a1af5833 | ||
|
|
1966e8ed02 | ||
|
|
21e50d1f2e | ||
|
|
b0e4e5586c | ||
|
|
ea9930ef58 | ||
|
|
3c6c57f046 | ||
|
|
1073624f49 | ||
|
|
e5033054b7 | ||
|
|
4f19cc721d | ||
|
|
193e942af6 | ||
|
|
d6d4fd8cee | ||
|
|
73e3cee2a1 | ||
|
|
66728fd5ee | ||
|
|
8aa6799645 | ||
|
|
543d01394b | ||
|
|
50ad375e5b | ||
|
|
c0b1ebbf38 | ||
|
|
0758b7b9ae | ||
|
|
a0188cb85f | ||
|
|
95719f0166 | ||
|
|
0aca8548fd | ||
|
|
e855f8bf26 | ||
|
|
6d1497eedd | ||
|
|
2e8a884d1f | ||
|
|
2671feb4ca | ||
|
|
ec1fcbfc1d | ||
|
|
e812983693 | ||
|
|
eebffd6172 | ||
|
|
e5df645adc | ||
|
|
c47a5ad1fa | ||
|
|
1edabfb293 | ||
|
|
0510836020 | ||
|
|
7fbff5c589 | ||
|
|
de3e5ba176 | ||
|
|
85b5e5d6a9 | ||
|
|
bc7eb0f7cf | ||
|
|
426bc8000c | ||
|
|
78122fddf5 | ||
|
|
5cc4c0ebc2 | ||
|
|
ae3f15a8a1 | ||
|
|
924d7c0cf6 | ||
|
|
af21694fcd | ||
|
|
125ca3f548 | ||
|
|
749829f613 | ||
|
|
8ca9d70ea8 | ||
|
|
241eb051ac | ||
|
|
9d452b5659 | ||
|
|
b72d9db155 | ||
|
|
75f1c8d16a | ||
|
|
b6808b6ae8 | ||
|
|
183cbf1faf | ||
|
|
d012ed1d2a | ||
|
|
91c5c7f2b0 | ||
|
|
dc42691b2c | ||
|
|
060a4b64b3 | ||
|
|
8cc71648c9 | ||
|
|
17f0eaf795 | ||
|
|
8e7be69b15 | ||
|
|
31a4341f15 | ||
|
|
562b6d34ad | ||
|
|
ba300b0f64 | ||
|
|
433dd6e41b | ||
|
|
39f79538f8 | ||
|
|
aae80648ce | ||
|
|
14e8ef16ea | ||
|
|
76a48481de | ||
|
|
5048ff5823 | ||
|
|
f32598ceb7 | ||
|
|
7eb165af49 | ||
|
|
e554085c07 | ||
|
|
35a184e540 | ||
|
|
431f7b09a0 | ||
|
|
787f947be4 | ||
|
|
748dbd941d | ||
|
|
262156d8cd | ||
|
|
894fb5beee | ||
|
|
850df265db | ||
|
|
52e4fc8baf | ||
|
|
d7050dabb2 | ||
|
|
62277febb8 | ||
|
|
0d85b36ebb | ||
|
|
79129feec2 | ||
|
|
ba8cfb48e3 | ||
|
|
f5109fee1a | ||
|
|
a82dcf4204 | ||
|
|
0991a3941c | ||
|
|
5350255a2e | ||
|
|
c6ac8e68c6 | ||
|
|
636fb44364 | ||
|
|
b9d87a2590 | ||
|
|
d0879f6bdc | ||
|
|
39412059f1 | ||
|
|
8e3f6198c7 | ||
|
|
1474f56a08 | ||
|
|
01619e874a | ||
|
|
aeb222b695 | ||
|
|
68af20d25b | ||
|
|
56c560e1a7 | ||
|
|
1794a79824 | ||
|
|
035a6ddfd9 | ||
|
|
90834ce374 | ||
|
|
7b10461c5d | ||
|
|
ebfab6e49e | ||
|
|
fff08ddd0a | ||
|
|
72774975d1 | ||
|
|
f7f7d02248 | ||
|
|
3da810162c | ||
|
|
de955ed4f8 | ||
|
|
4fdf53b030 | ||
|
|
7faec0a307 | ||
|
|
6adcd10f6a | ||
|
|
fd16a9e386 | ||
|
|
0e36c1ea7e | ||
|
|
41e0db010d | ||
|
|
4d9dbb4cf7 | ||
|
|
e2669c5abf | ||
|
|
7d0c9d2176 | ||
|
|
08bc5795fd | ||
|
|
0810e32fbe | ||
|
|
a88ba56fb2 | ||
|
|
324f0ce79f | ||
|
|
7770e3a989 | ||
|
|
12265831e5 | ||
|
|
e788d84b31 | ||
|
|
13928cd0b8 | ||
|
|
727a2a3ab6 | ||
|
|
1ef4cef328 | ||
|
|
738fea9021 | ||
|
|
73d22cf841 | ||
|
|
a17d3855fa | ||
|
|
b20605478f | ||
|
|
cf8b97dffb | ||
|
|
3200a79366 | ||
|
|
fca26d909d | ||
|
|
e1242ead30 | ||
|
|
f7132957ea | ||
|
|
edba19cddb | ||
|
|
af583ab6dc | ||
|
|
a4888da793 | ||
|
|
05d2f69ce5 | ||
|
|
7823a372f3 | ||
|
|
5e8225889a | ||
|
|
e507153175 | ||
|
|
e098fb7912 | ||
|
|
0ed0fdd807 | ||
|
|
d62e75bffc | ||
|
|
244e0a4d88 | ||
|
|
3aa94b0e29 | ||
|
|
8058cf3667 | ||
|
|
918b092d1f | ||
|
|
ce189ec505 | ||
|
|
46363671db | ||
|
|
7fb95063aa | ||
|
|
b18f53fd0b | ||
|
|
d7e9facc29 | ||
|
|
ba401e52a1 | ||
|
|
78ac5cd26f | ||
|
|
334f194ce6 | ||
|
|
0ec8c6b23c | ||
|
|
c1aeeebcc5 | ||
|
|
c113b7d26c | ||
|
|
80791b62ac | ||
|
|
33931707de | ||
|
|
c1f3b6a7d8 | ||
|
|
3d49af5943 | ||
|
|
87e690ad04 | ||
|
|
e8dc7402e7 | ||
|
|
744dcab4b0 | ||
|
|
b2011bd384 | ||
|
|
b3eaafafeb | ||
|
|
ad47fda9e6 | ||
|
|
8dc8e637e8 | ||
|
|
fbd87cc7d5 | ||
|
|
697770531f | ||
|
|
b5e0b93bfd | ||
|
|
a27dc0198f | ||
|
|
2df4f146d2 | ||
|
|
aff98bd919 | ||
|
|
52c30c56c7 | ||
|
|
af81e6919f | ||
|
|
08d7c0a396 | ||
|
|
60eed18749 | ||
|
|
6b427a38fc | ||
|
|
a35c1ee5b0 | ||
|
|
3d26b21ccb | ||
|
|
18b0e27d07 | ||
|
|
fc48a44ca2 | ||
|
|
21871a3d5c | ||
|
|
1277747239 | ||
|
|
590177cc02 | ||
|
|
1808006e18 | ||
|
|
d01bf1d824 | ||
|
|
8cfb542bb7 | ||
|
|
49ed999526 | ||
|
|
ee871fb174 | ||
|
|
b34e2f672a | ||
|
|
bb191fac43 | ||
|
|
a80f4effdf | ||
|
|
14918d94be | ||
|
|
07c11d21eb | ||
|
|
3ab1978d2f | ||
|
|
d8842a3898 | ||
|
|
780becf1e2 | ||
|
|
7922c5406b | ||
|
|
81c6baf850 | ||
|
|
532bab2cc4 | ||
|
|
a5c12b4cb6 | ||
|
|
10eb7bc0aa | ||
|
|
8caad34202 | ||
|
|
0587fe5761 | ||
|
|
c26d1089bf | ||
|
|
64471ddce8 | ||
|
|
2c8be79fe3 | ||
|
|
95b5ac1000 | ||
|
|
49bfc31f8f | ||
|
|
b1c627176f | ||
|
|
7338a86491 | ||
|
|
2e46d53039 | ||
|
|
82c20ff1b9 | ||
|
|
1490131547 | ||
|
|
b0b9e8c073 | ||
|
|
920a0167c7 | ||
|
|
b1b918a3d1 | ||
|
|
7d672135c5 | ||
|
|
2ac9b07635 | ||
|
|
1250a94e56 | ||
|
|
9817a6b469 | ||
|
|
e66ebe6308 | ||
|
|
c50455f1cd | ||
|
|
207c174bc5 | ||
|
|
2cd893e2ec | ||
|
|
115fe360e6 | ||
|
|
f3d12004e2 | ||
|
|
368485b83e | ||
|
|
3dd22cfb12 | ||
|
|
045f2abce5 | ||
|
|
f18ece6893 | ||
|
|
6ecafee16f | ||
|
|
88631d3069 | ||
|
|
263ec25557 | ||
|
|
c61ae8cf12 | ||
|
|
710033ffd7 | ||
|
|
03ab2f9313 | ||
|
|
fc715477e4 | ||
|
|
31b653904a | ||
|
|
777d69acf0 | ||
|
|
f83b1ac5c2 | ||
|
|
c8528c3a17 | ||
|
|
37e792d65e | ||
|
|
9557ff9494 | ||
|
|
334d3954bf | ||
|
|
68139acee7 | ||
|
|
9e3c120d9f | ||
|
|
99e984a971 | ||
|
|
b701de16f1 | ||
|
|
e1e5796314 | ||
|
|
fe800bebb6 | ||
|
|
628769dbae | ||
|
|
f246d207d3 | ||
|
|
33f48c9429 | ||
|
|
c4ccd70fd0 | ||
|
|
c51aabbc33 | ||
|
|
a13428ca38 | ||
|
|
29a53f53bd | ||
|
|
0403c19796 | ||
|
|
b28be1e78d | ||
|
|
0f4ba9a89a | ||
|
|
37120ebc6f | ||
|
|
cae7d8076f | ||
|
|
fd40708d2c | ||
|
|
fec668e41a | ||
|
|
f7c15c2abb | ||
|
|
38c046d37e | ||
|
|
100e31d173 | ||
|
|
ecc06381b0 | ||
|
|
3d65b7de50 | ||
|
|
99605561ff | ||
|
|
402c084542 | ||
|
|
557c1fb828 | ||
|
|
fb06debc9c | ||
|
|
c1d933fbe0 | ||
|
|
c91a22c39f | ||
|
|
cf09268319 | ||
|
|
9d227984e3 | ||
|
|
1f09068bf5 | ||
|
|
472c2cb848 | ||
|
|
aca3f1cef1 | ||
|
|
c852292c72 | ||
|
|
8ef0beec18 | ||
|
|
fdf1a89a77 | ||
|
|
c0d59983d6 | ||
|
|
115558439f | ||
|
|
ce60ee00fd | ||
|
|
2de95ca830 | ||
|
|
0f20b6e811 | ||
|
|
10c1bd66be | ||
|
|
ef320cd1f1 | ||
|
|
1913a300de | ||
|
|
057aa9f933 | ||
|
|
3b733aa67a | ||
|
|
ba3a7d3895 | ||
|
|
4adeda874b | ||
|
|
08b5726748 | ||
|
|
9d35e2e9df | ||
|
|
a6c43e7a65 | ||
|
|
f7ff4366f6 | ||
|
|
c7da059b55 | ||
|
|
0417c8c2ea | ||
|
|
494086b30a | ||
|
|
65b02d74f0 | ||
|
|
556b2175a0 | ||
|
|
d856332f8e | ||
|
|
64c2e5160d | ||
|
|
b75f067c45 | ||
|
|
be23f1e8e4 | ||
|
|
99d19ff958 | ||
|
|
6054efe76f | ||
|
|
16f5b9de8b | ||
|
|
e189b848b3 | ||
|
|
cb45618c2c | ||
|
|
59be9dee3f | ||
|
|
7335b0489f | ||
|
|
f135a01073 | ||
|
|
682731ae05 | ||
|
|
6e21341112 | ||
|
|
db7006e95b | ||
|
|
52b6c46023 | ||
|
|
47c10a90e8 | ||
|
|
9b8d457360 | ||
|
|
18ca71d29f | ||
|
|
b6853a9fca | ||
|
|
4af7c0cd49 | ||
|
|
34bb5c4120 | ||
|
|
6b847a7931 | ||
|
|
15111d9995 | ||
|
|
8242ec91b8 | ||
|
|
19f2041b96 | ||
|
|
d2f9e9cc7d | ||
|
|
eaf7694374 | ||
|
|
4ad19577f6 | ||
|
|
35fc53e230 | ||
|
|
a70f082d5d | ||
|
|
05e667df5b | ||
|
|
467478a8ba | ||
|
|
062a8defad | ||
|
|
97342e2856 | ||
|
|
1ba168413c | ||
|
|
8f293fbf53 | ||
|
|
8446b9b8c4 | ||
|
|
4d2c87acee | ||
|
|
e7ccd8996e | ||
|
|
95e2b69c8d | ||
|
|
3c8c2cae49 | ||
|
|
45b2cab4f1 | ||
|
|
945fd3416a | ||
|
|
16c79c9036 | ||
|
|
1e5d5192ad | ||
|
|
c4572fefa4 | ||
|
|
fc7a509ab0 | ||
|
|
4b092b92f8 | ||
|
|
986bbb1b8c | ||
|
|
b7b7115225 | ||
|
|
564ee77084 | ||
|
|
d655eeea9c | ||
|
|
9bfd475a0e | ||
|
|
3e8a20e512 | ||
|
|
bba1aaecd9 | ||
|
|
c940e9d946 | ||
|
|
1fb5c73a23 | ||
|
|
4bfff16246 | ||
|
|
8836c15a0f | ||
|
|
747da7beff | ||
|
|
fecbfbc314 | ||
|
|
5b214500a7 | ||
|
|
02af509c1b | ||
|
|
e0dbae1c61 | ||
|
|
2a9859bc90 | ||
|
|
4f952a89ca | ||
|
|
0fb382c0a6 | ||
|
|
1c429eaf64 | ||
|
|
8ea947405a | ||
|
|
22d4ecc973 | ||
|
|
30fb3f7bbc | ||
|
|
4da1197ec6 | ||
|
|
2844fe1811 | ||
|
|
b8a24136e8 | ||
|
|
d18427f299 | ||
|
|
d83fdc103c | ||
|
|
50f6f68f79 | ||
|
|
20c0fe4a84 | ||
|
|
49bf382e60 | ||
|
|
89ebb1528b | ||
|
|
0089fe0ff9 | ||
|
|
859ca37828 | ||
|
|
db2a5f564f | ||
|
|
3a0dca69a6 | ||
|
|
dd26444705 | ||
|
|
4ae5dc2322 | ||
|
|
946b2ae323 | ||
|
|
01c1b9df45 | ||
|
|
862ce6de06 | ||
|
|
4ed253b50d | ||
|
|
205b5bb401 | ||
|
|
880ed70d9f | ||
|
|
eb2afed1a7 | ||
|
|
4a8d615387 | ||
|
|
34ef85a4ea | ||
|
|
5d081a72bc | ||
|
|
9abc118780 | ||
|
|
ed3e7636b8 | ||
|
|
116722ea8c | ||
|
|
55e7c7f351 | ||
|
|
34172a811d | ||
|
|
e51a05d8c8 | ||
|
|
645738d233 | ||
|
|
161aabbee7 | ||
|
|
dfa5a52cbc | ||
|
|
6aa7e3ca69 | ||
|
|
b509fa1b6d | ||
|
|
5e572b17d2 | ||
|
|
16e14cd24a | ||
|
|
287cf352ea | ||
|
|
fe3edbcb99 | ||
|
|
c5db586470 | ||
|
|
580530b4d7 | ||
|
|
b5460c7008 | ||
|
|
d9e2baba80 | ||
|
|
0b8614ade4 | ||
|
|
4d8bb571af | ||
|
|
d81a7906c4 | ||
|
|
00f8b8c5ee | ||
|
|
b1dffb5fca | ||
|
|
a7118df513 | ||
|
|
445b63695c | ||
|
|
e9d02d13d8 | ||
|
|
d235c68262 | ||
|
|
33debba630 | ||
|
|
b23a7d8a54 | ||
|
|
2123bfb81b | ||
|
|
101aa5f5e8 | ||
|
|
04ac933024 | ||
|
|
5ad800f39c | ||
|
|
bf3580fb9c | ||
|
|
b9c0d478cc | ||
|
|
ea3f35fdc3 | ||
|
|
9cd93328b4 | ||
|
|
acc1ff79e7 | ||
|
|
ea9d3bd64c | ||
|
|
8713271e72 | ||
|
|
a69259ed7e | ||
|
|
6c56996ca7 | ||
|
|
8b8f6963cf | ||
|
|
eb9a46efd5 | ||
|
|
439c227d10 | ||
|
|
77b5b2f941 | ||
|
|
9675228e3b | ||
|
|
c926e65fcb | ||
|
|
69a4927371 | ||
|
|
8a098a39ed | ||
|
|
9b1757f0bf | ||
|
|
63aba8035a | ||
|
|
e0245951b6 | ||
|
|
0f13826a1f | ||
|
|
a26a14bf3e | ||
|
|
b4b6a7cedc | ||
|
|
b30180aaa2 | ||
|
|
844bca4eab | ||
|
|
01be5c11b0 | ||
|
|
9af1ad05a2 | ||
|
|
0e711f545b | ||
|
|
3491da79dd | ||
|
|
56d1896165 | ||
|
|
80df2c7477 | ||
|
|
fea071239d | ||
|
|
eccb8a4bb1 | ||
|
|
521a9d2d0c | ||
|
|
81deeb571d | ||
|
|
d9952d56e2 | ||
|
|
e9ca0c3211 | ||
|
|
337ad8c030 | ||
|
|
617f4ff6e5 | ||
|
|
725dd3770b | ||
|
|
f25e876901 | ||
|
|
23ffd0aa54 | ||
|
|
43537b59fa | ||
|
|
a2b2367ee6 | ||
|
|
de5dfe235e | ||
|
|
d18a64a3f2 | ||
|
|
c706feea57 | ||
|
|
0be9786e46 | ||
|
|
392c6de0cf | ||
|
|
ff56761c58 | ||
|
|
a4f7c600dd | ||
|
|
b47fb53c48 | ||
|
|
fac0425534 | ||
|
|
67ebdfe475 | ||
|
|
1c0aeabf5b | ||
|
|
25103ff8f7 | ||
|
|
0a530c099d | ||
|
|
f170e3c302 | ||
|
|
dc4db1d9f9 | ||
|
|
ebd8560ab2 | ||
|
|
3e584d1c4f | ||
|
|
2fc0f95b68 | ||
|
|
4792caeabe | ||
|
|
493a76af2d | ||
|
|
d69f9bfcd1 | ||
|
|
b057b366f1 | ||
|
|
ce3eea84b1 | ||
|
|
66e6935e42 | ||
|
|
4cd31e0105 | ||
|
|
73f7215951 | ||
|
|
f790757bcf | ||
|
|
a5871d1d2a | ||
|
|
30c4a85ea5 | ||
|
|
e76d0a7dea | ||
|
|
0b4094c7a2 | ||
|
|
ba8ba1161e | ||
|
|
3d4c48b891 | ||
|
|
9c680b3fa9 | ||
|
|
07ed551fcf | ||
|
|
78efe378fc | ||
|
|
2f5f23f97d | ||
|
|
0ab170c68e | ||
|
|
8e4cf538ee | ||
|
|
1011cb9f7c | ||
|
|
bcbf47bced | ||
|
|
e2e70fd6a8 | ||
|
|
2554a9e826 | ||
|
|
bfd2998195 | ||
|
|
7d1ac4b10d | ||
|
|
7a7abd7abd | ||
|
|
5c67d50c84 | ||
|
|
fe003dfc1e | ||
|
|
03f97cafbd | ||
|
|
7535eab33e | ||
|
|
9446376976 | ||
|
|
672207c95a | ||
|
|
95eb6ade28 | ||
|
|
59adb0ec3f | ||
|
|
4790243ad0 | ||
|
|
e24695888c | ||
|
|
e8b1d54170 | ||
|
|
0e2cddfdc7 | ||
|
|
b1414fd9eb | ||
|
|
4436305b11 | ||
|
|
9b4af94e73 | ||
|
|
c98086f64d | ||
|
|
87be064697 | ||
|
|
a629d2e3f4 | ||
|
|
943efdc4de | ||
|
|
08b5e6d0c0 | ||
|
|
b0a2fdd578 | ||
|
|
5b62c3ff73 | ||
|
|
be49a5f0ce | ||
|
|
495c23de53 | ||
|
|
18e7915ff9 | ||
|
|
5455353bb8 | ||
|
|
f3bbecdc4b | ||
|
|
ec2e61d60a | ||
|
|
c7da5bdb93 | ||
|
|
327e9111cb | ||
|
|
d3046c0b9e | ||
|
|
508c1f3993 | ||
|
|
a1e73aefc0 | ||
|
|
dd9c53683d | ||
|
|
a825e627cd | ||
|
|
049191de55 | ||
|
|
12fee4adcd | ||
|
|
902291c67f | ||
|
|
f032bff8d4 | ||
|
|
0a9c5c1ad9 | ||
|
|
256dc55098 | ||
|
|
d2848d6277 |
3455 changed files with 370019 additions and 150865 deletions
13
.browserslistrc
Normal file
13
.browserslistrc
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Browsers that we support
|
||||
|
||||
# https://github.com/browserslist/browserslist#readme
|
||||
|
||||
>= 0.5%
|
||||
last 2 major versions
|
||||
not dead
|
||||
Chrome >= 60
|
||||
Firefox >= 60
|
||||
Firefox ESR
|
||||
iOS >= 12
|
||||
Safari >= 12
|
||||
not Explorer <= 11
|
||||
16
.dockerignore
Normal file
16
.dockerignore
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
.git
|
||||
*.md
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
.npmrc
|
||||
tests/
|
||||
Dockerfile*
|
||||
.dockerignore
|
||||
.git
|
||||
.gitignore
|
||||
README.md
|
||||
LICENSE
|
||||
.vscode
|
||||
vendor/
|
||||
public/build/
|
||||
auth.json
|
||||
|
|
@ -3,9 +3,9 @@ root = true
|
|||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
|
|
@ -13,3 +13,9 @@ trim_trailing_whitespace = false
|
|||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
[docker-compose.yml]
|
||||
indent_size = 4
|
||||
|
||||
[*.vue]
|
||||
indent_size = 2
|
||||
|
|
|
|||
132
.env.example
132
.env.example
|
|
@ -1,100 +1,102 @@
|
|||
### APPLICATION
|
||||
APP_NAME="Le Gaulois"
|
||||
APP_KEY=
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=
|
||||
APP_URL=http://localhost
|
||||
|
||||
## LOG LEVEL
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
## DATABASE
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=
|
||||
DB_USERNAME=
|
||||
DB_DATABASE=laravel
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
## DATABASE MIGRATION
|
||||
DB_DATABASE_2016=legaulois2016
|
||||
DB_USERNAME_2016=
|
||||
DB_PASSWORD_2016=
|
||||
|
||||
## DATABASE OPINSTA
|
||||
DB_DATABASE_OPINSTA=
|
||||
DB_USERNAME_OPINSTA=
|
||||
DB_PASSWORD_OPINSTA=
|
||||
DB_HOST_OPINSTA=
|
||||
DB_PORT_OPINSTA=
|
||||
|
||||
## MIGRATION
|
||||
MIGRATIONPAGINATION=20000
|
||||
|
||||
## OTHERS
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=database
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
## MAIL
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=
|
||||
MAIL_PORT=
|
||||
MAIL_USERNAME=
|
||||
MAIL_PASSWORD=
|
||||
MAIL_ENCRYPTION=
|
||||
MAIL_FROM_ADDRESS=no-reply@legaulois.fr
|
||||
MAIL_FROM_NAME="Contact Le Gaulois (legaulois.fr)"
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
## MAIL ADDRESSES
|
||||
MAIL_LIST_CONTACT=contact@legaulois.fr
|
||||
MAIL_LIST_PASSERELLE=passerelle.ldc@ldc.fr
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailpit
|
||||
MAIL_PORT=1025
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS="hello@example.com"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
MAIL_LIST_CONTACT=
|
||||
MAIL_LIST_PASSERELLE=
|
||||
MAIL_LIST_NL=
|
||||
MAIL_MKT_JEUX=
|
||||
|
||||
# Sentry
|
||||
SENTRY_LARAVEL_DSN=
|
||||
|
||||
## ARCHADIA
|
||||
BOUTIQUE_ARCHADIA_OP_CODE=16
|
||||
|
||||
## CRM
|
||||
# CRM
|
||||
CRM_ENDPOINT=
|
||||
CRM_API_TOKEN=
|
||||
CRM_TOKEN=
|
||||
CRM_PASSWORD=
|
||||
CRM_QUESTION_ID=
|
||||
|
||||
## MES BR
|
||||
MESBR_ENDPOINT=
|
||||
# DIGITAL RECRUITER
|
||||
DIGITAL_RECRUITER_URL=
|
||||
|
||||
# ADMIN SECURE
|
||||
# - API ENDPOINT (Optional)
|
||||
LDC_WEB_API_ENDPOINT="https://ldc-web.ldc.fr/api/ldc-networks"
|
||||
# - API KEY
|
||||
LDC_WEB_API_KEY=""
|
||||
# - LIST SEPARATED WITH ',' (Optional)
|
||||
LDC_WEB_CIDR_MANUAL_ALLOWED_LIST=""
|
||||
|
||||
#MESBR
|
||||
MESBR_REF_SITE=
|
||||
MESBR_REF_CAMP=
|
||||
MESBR_ENDPOINT=
|
||||
|
||||
## OP BR CHARCUT
|
||||
MESBR_REF_SITE_CHARCUT=
|
||||
MESBR_REF_CAMP_CHARCUT=
|
||||
MESBR_COUPON_1_CHARCUT=""
|
||||
MESBR_COUPON_2_CHARCUT=""
|
||||
MESBR_COUPON_3_CHARCUT=""
|
||||
# SAML
|
||||
SAML2_DEFAULT_TENANT_UUID=
|
||||
SAML2_SP_CERT_x509=
|
||||
SAML2_SP_CERT_PRIVATEKEY=
|
||||
SAML2_CONTACT_TECHNICAL_EMAIL=
|
||||
SAML2_CONTACT_SUPPORT_EMAIL=
|
||||
|
||||
## GOOGLE
|
||||
ANALYTICS_GOOGLE_ID=
|
||||
GOOGLE_MAP_API_KEY=
|
||||
|
||||
# Google Recaptcha
|
||||
# RECAPTCHA
|
||||
GOOGLE_RECAPTCHA_PUBLIC=
|
||||
GOOGLE_RECAPTCHA_PRIVATE=
|
||||
GOOGLE_RECAPTCHA_VERSION=
|
||||
|
||||
# Matomo
|
||||
MATOMO_SITE_ID=
|
||||
|
||||
## MERCANET
|
||||
MERCANET_SECRET=
|
||||
MERCANET_MERCHAND_ID=
|
||||
MERCANET_ENV=
|
||||
|
||||
# BYPASS THE CRM JUST LOGIN (needs debug mode)
|
||||
NOCRM=false
|
||||
## TELESCOPE
|
||||
TELESCOPE_ENABLED=
|
||||
|
||||
#OP INSTA
|
||||
## Démarre le à d-m-YYYY
|
||||
OPINSTA_START=
|
||||
## Fin le à d-m-YYYY
|
||||
OPINSTA_END=
|
||||
# MATOMO
|
||||
MATOMO_SITE_ID=
|
||||
|
||||
# MEILISEARCH
|
||||
MEILISEARCH_HOST=
|
||||
MEILISEARCH_KEY=
|
||||
|
||||
# LARAVEL SCOUT
|
||||
SCOUT_PREFIX=''
|
||||
SCOUT_QUEUE=
|
||||
|
||||
# REDIS
|
||||
REDIS_HOST=
|
||||
REDIS_PORT=
|
||||
REDIS_USERNAME=
|
||||
REDIS_PASSWORD=
|
||||
REDIS_PREFIX=
|
||||
REDIS_SCHEME=
|
||||
|
|
|
|||
62
.eslintrc.json
Normal file
62
.eslintrc.json
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:vue/vue3-strongly-recommended",
|
||||
"@vue/eslint-config-typescript"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.vue"],
|
||||
"rules": {
|
||||
"no-undef": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.vue"],
|
||||
"rules": {
|
||||
"indent": "off"
|
||||
}
|
||||
}
|
||||
],
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"ecmaVersion": "latest",
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": ["vue", "@typescript-eslint"],
|
||||
"ignorePatterns": [
|
||||
"webpack.mix.js",
|
||||
"**/*.php",
|
||||
"**/*.svg",
|
||||
"**/vendor/*.js",
|
||||
"**/vendor/**/*.js",
|
||||
"**/vendor/**/*.scss"
|
||||
],
|
||||
"rules": {
|
||||
"indent": ["error", 4, { "SwitchCase": 1 }],
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"quotes": ["error", "double"],
|
||||
"semi": ["error", "always"],
|
||||
"vue/script-indent": ["error", 2, { "baseIndent": 0, "switchCase": 1 }],
|
||||
"vue/one-component-per-file": "off"
|
||||
},
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"extensions": [".js", ".vue", ".ts", ".d.ts"]
|
||||
},
|
||||
"alias": {
|
||||
"extensions": [".vue", ".js", ".ts", ".scss", ".d.ts"],
|
||||
"map": [
|
||||
["~", "./resources/assets"],
|
||||
["@", "./node_modules"]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
14
.gitattributes
vendored
14
.gitattributes
vendored
|
|
@ -1,5 +1,11 @@
|
|||
* text=auto
|
||||
*.css linguist-vendored
|
||||
*.scss linguist-vendored
|
||||
*.js linguist-vendored
|
||||
* text=auto eol=lf
|
||||
|
||||
*.blade.php diff=html
|
||||
*.css diff=css
|
||||
*.html diff=html
|
||||
*.md diff=markdown
|
||||
*.php diff=php
|
||||
|
||||
/.github export-ignore
|
||||
CHANGELOG.md export-ignore
|
||||
.styleci.yml export-ignore
|
||||
|
|
|
|||
74
.gitignore
vendored
74
.gitignore
vendored
|
|
@ -1,32 +1,56 @@
|
|||
/node_modules
|
||||
/public/hot
|
||||
/public/storage/*
|
||||
/public/images/*
|
||||
/public/js/*
|
||||
/public/css/*
|
||||
/public/fonts/*
|
||||
/public/uploads/*
|
||||
/public/assets/*
|
||||
/public/cache/*
|
||||
/public/storage
|
||||
/public/sitemap.xml
|
||||
/storage/*.key
|
||||
/storage/inco/*.*
|
||||
/storage/eleveur/*.*
|
||||
/storage/app/public/*.*
|
||||
/storage/debugbar
|
||||
/vendor
|
||||
.env
|
||||
.env.backup
|
||||
.env.testing
|
||||
.env.production
|
||||
.phpunit.result.cache
|
||||
.stylelintcache
|
||||
/.fleet
|
||||
/.idea
|
||||
/.phpunit.cache
|
||||
/.vscode
|
||||
/node_modules
|
||||
/bootstrap
|
||||
/public/build
|
||||
/public/cache
|
||||
/public/hot
|
||||
/public/sitemap.xml
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/vendor
|
||||
auth.json
|
||||
docker-compose.override.yml
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
.idea/
|
||||
.vscode/
|
||||
mix-manifest.json
|
||||
workspace.code-workspace
|
||||
storage/crm_migration.csv
|
||||
auth.json
|
||||
.npmrc
|
||||
.npmrc
|
||||
/tests/coverage
|
||||
|
||||
# Ignore public favicon
|
||||
/public/android-chrome-192x192.png
|
||||
/public/android-chrome-512x512.png
|
||||
/public/apple-touch-icon.png
|
||||
/public/browserconfig.xml
|
||||
/public/browserconfig.xml
|
||||
/public/favicon-16x16.png
|
||||
/public/favicon-32x32.png
|
||||
/public/favicon.ico
|
||||
/public/mstile-150x150.png
|
||||
/public/safari-pinned-tab.svg
|
||||
/public/site.webmanifest
|
||||
|
||||
# Ignore Storage Arcadia (orders)
|
||||
storage/arcadia
|
||||
|
||||
# Ignore Storage Inco (images)
|
||||
storage/inco
|
||||
|
||||
# Ignore Storage tracabilite (eleveurs, lots, miseenplace)
|
||||
storage/tracabilite
|
||||
|
||||
# For new LG version ignore old assets
|
||||
oldAssets
|
||||
|
||||
/public/*
|
||||
!/public/newsletters/
|
||||
!/public/tdf-downloads
|
||||
|
|
|
|||
|
|
@ -1,11 +1,23 @@
|
|||
include:
|
||||
- project: 'ldc-web/shared-ci'
|
||||
ref: 'main'
|
||||
file: 'lint/lint7.3.yml'
|
||||
- project: 'ldc-web/shared-ci'
|
||||
ref: 'main'
|
||||
file: 'security/security7.3.yml'
|
||||
- project: "ldc-web/shared-ci"
|
||||
ref: "main"
|
||||
file: "lint/lint.yml"
|
||||
- project: "ldc-web/shared-ci"
|
||||
ref: "main"
|
||||
file: "security/security.yml"
|
||||
- project: "ldc-web/shared-ci"
|
||||
ref: "main"
|
||||
file: "build/docker-multistage.yml"
|
||||
- project: "ldc-web/shared-ci"
|
||||
ref: "main"
|
||||
file: "test/test.yml"
|
||||
- project: "ldc-web/shared-ci"
|
||||
ref: "main"
|
||||
file: "deploy/deploy.yml"
|
||||
|
||||
stages:
|
||||
- lint
|
||||
- security
|
||||
- lint
|
||||
- security
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
|
|
|||
13
.styleci.yml
13
.styleci.yml
|
|
@ -1,13 +0,0 @@
|
|||
php:
|
||||
preset: laravel
|
||||
disabled:
|
||||
- unused_use
|
||||
finder:
|
||||
not-name:
|
||||
- index.php
|
||||
- server.php
|
||||
js:
|
||||
finder:
|
||||
not-name:
|
||||
- webpack.mix.js
|
||||
css: true
|
||||
45
.stylelintrc.json
Normal file
45
.stylelintrc.json
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"extends": [
|
||||
"stylelint-config-standard-scss",
|
||||
"stylelint-config-sass-guidelines",
|
||||
"stylelint-config-idiomatic-order"
|
||||
],
|
||||
"plugins": [
|
||||
"stylelint-scss"
|
||||
],
|
||||
"files": [
|
||||
"**/*.css",
|
||||
"**/*.scss"
|
||||
],
|
||||
"ignoreFiles": [
|
||||
"**/vendor/*.css",
|
||||
"**/vendor/**/*.css",
|
||||
"**/vendor/*.scss",
|
||||
"**/vendor/**/*.scss",
|
||||
"**/vendor/*.sass",
|
||||
"**/vendor/**/*.sass",
|
||||
"**/vendor/*.less",
|
||||
"**/vendor/**/*.less"
|
||||
],
|
||||
"customSyntax": "postcss-scss",
|
||||
"rules": {
|
||||
"declaration-property-value-no-unknown": true,
|
||||
"selector-max-id": null,
|
||||
"color-no-invalid-hex": true,
|
||||
"order/properties-alphabetical-order": null,
|
||||
"max-nesting-depth": 5,
|
||||
"selector-max-compound-selectors": 5,
|
||||
"declaration-colon-newline-after": null,
|
||||
"value-list-comma-newline-after": null,
|
||||
"scss/double-slash-comment-empty-line-before": [
|
||||
"always",
|
||||
{
|
||||
"ignore": [
|
||||
"between-comments",
|
||||
"stylelint-commands",
|
||||
"inside-block"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
"phpcs.executablePath": "vendor/bin/phpcs",
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#145bac",
|
||||
"activityBar.activeBorder": "#eb549a",
|
||||
"activityBar.activeBackground": "#145bac",
|
||||
"activityBar.background": "#145bac",
|
||||
"activityBar.foreground": "#e7e7e7",
|
||||
"activityBar.inactiveForeground": "#e7e7e799",
|
||||
"activityBarBadge.background": "#eb549a",
|
||||
"activityBarBadge.foreground": "#15202b",
|
||||
"commandCenter.border": "#e7e7e799",
|
||||
"sash.hoverBorder": "#145bac",
|
||||
"statusBar.background": "#0f437e",
|
||||
"statusBar.foreground": "#e7e7e7",
|
||||
|
|
@ -17,8 +18,7 @@
|
|||
"titleBar.activeBackground": "#0f437e",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveBackground": "#0f437e99",
|
||||
"titleBar.inactiveForeground": "#e7e7e799",
|
||||
"commandCenter.border": "#e7e7e799"
|
||||
"titleBar.inactiveForeground": "#e7e7e799"
|
||||
},
|
||||
"peacock.remoteColor": "#0f437e"
|
||||
}
|
||||
|
|
|
|||
44
Dockerfile
Normal file
44
Dockerfile
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
FROM composer:2.8 AS vendor
|
||||
|
||||
ARG GITLAB_USER
|
||||
ARG GITLAB_PASSWORD
|
||||
|
||||
COPY database/ database/
|
||||
|
||||
COPY composer.json composer.json
|
||||
COPY composer.lock composer.lock
|
||||
|
||||
RUN composer config gitlab-token.lab.s-web.fr ${GITLAB_USER} ${GITLAB_PASSWORD}
|
||||
RUN composer install \
|
||||
--ignore-platform-reqs \
|
||||
--no-interaction \
|
||||
--no-plugins \
|
||||
--no-scripts \
|
||||
--no-dev \
|
||||
--prefer-dist
|
||||
|
||||
FROM node:20.18 AS frontend
|
||||
|
||||
ARG GITLAB_PASSWORD
|
||||
|
||||
RUN mkdir -p /app/public/build
|
||||
|
||||
COPY package*.json tsconfig.json vite.config.ts .eslintrc.json .stylelintrc.json /app/
|
||||
COPY resources/ /app/resources/
|
||||
WORKDIR /app
|
||||
RUN npm config set @ldc-web:registry https://lab.s-web.fr/api/v4/packages/npm/
|
||||
RUN npm config set -- '//lab.s-web.fr/api/v4/packages/npm/:_authToken' "${GITLAB_PASSWORD}"
|
||||
RUN npm ci && npm run prod
|
||||
|
||||
FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/ldcweb-production-8.3:170625-101047
|
||||
|
||||
ARG USER=www-data
|
||||
|
||||
COPY --chown=${USER}:${USER} . /app/srcs
|
||||
COPY --chown=${USER}:${USER} ./resources/favicon /app/srcs/public
|
||||
COPY --from=vendor --chown=${USER}:${USER} /app/vendor/ /app/srcs/vendor/
|
||||
COPY --from=frontend --chown=${USER}:${USER} /app/public/build/ /app/srcs/public/build/
|
||||
|
||||
USER root
|
||||
RUN chmod -R 755 /app/srcs/storage
|
||||
USER ${USER}
|
||||
112
README.md
112
README.md
|
|
@ -1,33 +1,91 @@
|
|||
# Le Gaulois
|
||||
|
||||
## .env
|
||||
En DEV et PROD mettre :
|
||||
```
|
||||
LOG_CHANNEL=stackProd
|
||||
## Optimiser Images
|
||||
|
||||
### PNG
|
||||
|
||||
apt install imagick
|
||||
convert -colors 256 -depth 8 +dither bg-footer-ori.png bg-footer-test.png
|
||||
<https://compresspng.com/>
|
||||
|
||||
### Autre
|
||||
|
||||
apt install trimage
|
||||
|
||||
# Copy paste from the admin secure readme.md
|
||||
Put every min in PROD :
|
||||
```php
|
||||
php artisan schedule:run
|
||||
```
|
||||
|
||||
## Flux
|
||||
Flux INCO dans :
|
||||
# Unit tests
|
||||
Create new `.env.testing` with a new empty database `le-gaulois-testing` and just run this command :
|
||||
```php
|
||||
php artisan test
|
||||
```
|
||||
storage/inco
|
||||
To see more details, please read the documentation of [uwil/unit-tests-laravel](https://lab.s-web.fr/ldc-web/projets/unit-tests-laravel/-/blob/main/README.md?ref_type=heads#documentation)
|
||||
|
||||
Legend : ✅ test added & operational, ⚠️ test added & operational but modified, ❌ no test (because no CRUD or specific model)
|
||||
|
||||
Models list :
|
||||
|
||||
✅ ActivityLog
|
||||
⚠️ Approach (label/demarche)
|
||||
❌ BlockList
|
||||
✅ BrandAdvantage
|
||||
❌ Breeder
|
||||
✅ Claim
|
||||
✅ ConsumptionMoment
|
||||
❌ Customer
|
||||
❌ DeliveryAddress
|
||||
✅ DemarcheSlide
|
||||
❌ DepartaimantsCollection
|
||||
✅ Discount
|
||||
❌ GeneralSetting
|
||||
✅ HistoricalMilestone
|
||||
❌ IncoNutritionalValue
|
||||
✅ KeyNumber
|
||||
✅ MainSlide
|
||||
✅ Meat
|
||||
⚠️ MenuNodeData
|
||||
❌ Message
|
||||
⚠️ News
|
||||
✅ NewsBreeding
|
||||
✅ NewsCategory
|
||||
⚠️ NewsClub (News/Survey)
|
||||
✅ NewsCorporate
|
||||
❌ Notification
|
||||
✅ Offer
|
||||
❌ Order
|
||||
❌ OrderSellItem
|
||||
✅ Product
|
||||
✅ ProductType
|
||||
✅ Profession
|
||||
✅ Range
|
||||
✅ Recipe
|
||||
✅ SellItem
|
||||
✅ StaticPage
|
||||
✅ Submeat
|
||||
✅ Subrange
|
||||
✅ SurveysAnswer
|
||||
✅ Testimonial
|
||||
❌ User
|
||||
✅ Video
|
||||
|
||||
# Meilisearch
|
||||
When deploying, if there any modification to a concerned Model, you may refresh Meilisearch cache. Concerned models are :
|
||||
- News
|
||||
- NewsBreeding
|
||||
- Product
|
||||
- Recipe
|
||||
|
||||
```sh
|
||||
php artisan scout:flush "\App\Models\News"
|
||||
php artisan scout:import "\App\Models\News"
|
||||
php artisan scout:flush "\App\Models\NewsBreeding"
|
||||
php artisan scout:import "\App\Models\NewsBreeding"
|
||||
php artisan scout:flush "\App\Models\Product"
|
||||
php artisan scout:import "\App\Models\Product"
|
||||
php artisan scout:flush "\App\Models\Recipe"
|
||||
php artisan scout:import "\App\Models\Recipe"
|
||||
```
|
||||
Flux Tracabilité dans :
|
||||
```
|
||||
storage/tracabilite
|
||||
```
|
||||
|
||||
## Scheduled Jobs
|
||||
- DeleteOrders : daily at 14
|
||||
|
||||
## Boutique
|
||||
Expédition de fond de carte magnétique
|
||||
Poids : 540
|
||||
Code Opération : 16
|
||||
Code Support : 1
|
||||
|
||||
Expédition de fond de carte papier
|
||||
Poids : 0
|
||||
Code Opération : 16
|
||||
Code Support : 0
|
||||
|
||||
- !! Vérifier que sell_items.archadia_id contient bien la bone valeur (Code support)
|
||||
|
|
|
|||
182
app/Auth/CrmUserProvider.php
Normal file
182
app/Auth/CrmUserProvider.php
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
<?php
|
||||
|
||||
namespace App\Auth;
|
||||
|
||||
use App\Models\Customer;
|
||||
use Illuminate\Auth\EloquentUserProvider;
|
||||
use Illuminate\Contracts\Auth\Authenticatable;
|
||||
use Illuminate\Contracts\Auth\UserProvider;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Str;
|
||||
use LDC\LDCCRM\Enums\ApiError;
|
||||
use LDC\LDCCRM\Exceptions\ApiErrorException;
|
||||
use LDC\LDCCRM\Exceptions\CrmException;
|
||||
use LDC\LDCCRM\Models\Customer as CrmCustomer;
|
||||
|
||||
/**
|
||||
* Crm user provider to integrate nicely with Laravel
|
||||
*/
|
||||
class CrmUserProvider extends EloquentUserProvider implements UserProvider
|
||||
{
|
||||
/**
|
||||
* The model to use, specified in auth config guard.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $usedModel = Customer::class;
|
||||
|
||||
/**
|
||||
* Retrieve a user by the given credentials.
|
||||
*
|
||||
* @param array $credentials
|
||||
* @return \Illuminate\Contracts\Auth\Authenticatable|null
|
||||
*/
|
||||
public function retrieveByCredentials(array $credentials): \Illuminate\Contracts\Auth\Authenticatable|null
|
||||
{
|
||||
// * Let laravel find a model
|
||||
$model = parent::retrieveByCredentials($credentials) ?? self::retrieveTrashed($credentials);
|
||||
|
||||
try {
|
||||
/** @var \LDC\LDCCRM\CrmApiV4 */
|
||||
$crm = app('crmAPI');
|
||||
|
||||
// Si pas de compte local.
|
||||
if (!$model) {
|
||||
$crmCustomer = $crm->getCustomer($credentials['email']);
|
||||
|
||||
if (!$crmCustomer) {
|
||||
// * Customer is not found on CRM.
|
||||
return null;
|
||||
}
|
||||
$model = $this->createLocalCustomer($crmCustomer);
|
||||
}
|
||||
|
||||
return $model;
|
||||
} catch (ApiErrorException $e) {
|
||||
// * Customer is not found.
|
||||
if ($e->getApiError()->equals(ApiError::modelNotFound)) {
|
||||
return null;
|
||||
}
|
||||
report($e);
|
||||
Log::error('Unhandled response ' . $e->getApiError()->label());
|
||||
} catch (CrmException | \Exception $e) {
|
||||
report($e);
|
||||
// Une erreur critique est survenue avec la CRM.
|
||||
return null;
|
||||
} //end try
|
||||
Log::error(__CLASS__ . '::retrieveByCredentials reached end of possibilities.');
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate a user against the given credentials.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Auth\Authenticatable $model
|
||||
* @param array $credentials
|
||||
* @return boolean
|
||||
* @throws \RuntimeException If model provided is not a Customer or connection to server fails.
|
||||
* @throws \LDC\LDCCRM\Exceptions\CrmException On CRM call error.
|
||||
* @throws \Exception On CRM call error.
|
||||
*/
|
||||
public function validateCredentials(Authenticatable $model, array $credentials): bool
|
||||
{
|
||||
/** @var \Illuminate\Database\Eloquent\Model $model */
|
||||
if (\get_class($model) !== $this->usedModel) {
|
||||
throw new \RuntimeException('Cannot authenticate any thing else than ' . $this->usedModel);
|
||||
}
|
||||
|
||||
try {
|
||||
/** @var \LDC\LDCCRM\CrmApiV4 */
|
||||
$crm = app('crmAPI');
|
||||
|
||||
// * If has trait soft delete and customer trashed, then restore customer.
|
||||
if (
|
||||
\in_array(\Illuminate\Database\Eloquent\SoftDeletes::class, \class_uses_recursive($model)) and
|
||||
// @phpstan-ignore-next-line
|
||||
$model->trashed()
|
||||
) {
|
||||
// @phpstan-ignore-next-line
|
||||
$model->restore();
|
||||
}
|
||||
|
||||
// * Ne devrait pas survenir, $crm->login throws ApiError::authFailed
|
||||
return $crm->login($credentials['email'], $credentials['password']);
|
||||
} catch (ApiErrorException $e) {
|
||||
// @phpstan-ignore-next-line
|
||||
if (!$model->hashcode or !CrmCustomer::find($model->hashcode)) {
|
||||
$model->forceDelete();
|
||||
return false;
|
||||
}
|
||||
if ($e->getApiError()->equals(ApiError::authFailed)) {
|
||||
return false;
|
||||
}
|
||||
// ! Assert Authenticable model must be valided (MustValidate trait).
|
||||
if ($e->getApiError()->equals(ApiError::customerNotActivated)) {
|
||||
Session::flash('warning', \trans('Vous devez activer votre compte'));
|
||||
return true;
|
||||
}
|
||||
} catch (CrmException | \Exception $e) {
|
||||
report($e);
|
||||
if (config('app.debug')) {
|
||||
throw $e;
|
||||
}
|
||||
return false;
|
||||
} //end try
|
||||
|
||||
Log::error(__CLASS__ . '::validateCredentials reached end of possibilities.');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a local customer
|
||||
*
|
||||
* @param \LDC\LDCCRM\Models\Customer $crmCustomer
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @throws \Throwable If saving to DB failed.
|
||||
*/
|
||||
private function createLocalCustomer(\LDC\LDCCRM\Models\Customer $crmCustomer): \Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
/** @var \Illuminate\Database\Eloquent\Model $model */
|
||||
$model = $this->usedModel::firstOrNew([
|
||||
'email' => $crmCustomer->email
|
||||
]);
|
||||
// @phpstan-ignore-next-line
|
||||
$model->hashcode = $crmCustomer->hashcode;
|
||||
// @phpstan-ignore-next-line
|
||||
$model->email_verified_at = $crmCustomer->status ? now() : null;
|
||||
$model->saveOrFail();
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a trashed customer by the given credentials.
|
||||
*
|
||||
* @param array $credentials
|
||||
* @return \Illuminate\Contracts\Auth\Authenticatable|null
|
||||
* @throws \ErrorException If cannot connect to LDAP.
|
||||
*/
|
||||
private function retrieveTrashed(array $credentials): ?\Illuminate\Contracts\Auth\Authenticatable
|
||||
{
|
||||
// * Make changes
|
||||
if (empty($credentials)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// First we will add each credential element to the query as a where clause.
|
||||
// Then we can execute the query and, if we found a customer, return it in a
|
||||
// Eloquent User "model" that will be utilized by the Guard instances.
|
||||
$query = $this->createModel()->newQuery();
|
||||
|
||||
foreach ($credentials as $key => $value) {
|
||||
if (!Str::contains($key, 'password')) {
|
||||
$query->where($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
return $query->withTrashed()->first();
|
||||
}
|
||||
}
|
||||
72
app/Auth/ReactivateCustomerProvider.php
Normal file
72
app/Auth/ReactivateCustomerProvider.php
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
namespace App\Auth;
|
||||
|
||||
use App\Models\Customer;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Auth\EloquentUserProvider;
|
||||
use Illuminate\Contracts\Auth\Authenticatable;
|
||||
use Illuminate\Contracts\Auth\UserProvider;
|
||||
|
||||
/**
|
||||
* Overload EloquentUserProvider to handle
|
||||
* Soft deleted Customers
|
||||
*/
|
||||
class ReactivateCustomerProvider extends EloquentUserProvider implements UserProvider
|
||||
{
|
||||
/**
|
||||
* Retrieve a customer by the given credentials.
|
||||
*
|
||||
* @param array $credentials
|
||||
* @return \Illuminate\Contracts\Auth\Authenticatable|null
|
||||
* @throws \ErrorException If cannot connect to LDAP.
|
||||
*/
|
||||
public function retrieveByCredentials(array $credentials): ?\Illuminate\Contracts\Auth\Authenticatable
|
||||
{
|
||||
// * Make changes
|
||||
if (empty($credentials)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// First we will add each credential element to the query as a where clause.
|
||||
// Then we can execute the query and, if we found a customer, return it in a
|
||||
// Eloquent User "model" that will be utilized by the Guard instances.
|
||||
$query = $this->createModel()->newQuery();
|
||||
|
||||
foreach ($credentials as $key => $value) {
|
||||
if (!Str::contains($key, 'password')) {
|
||||
$query->where($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
return $query->withTrashed()->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate a customer against the given credentials.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Auth\Authenticatable $customer
|
||||
* @param array $credentials
|
||||
* @return boolean
|
||||
* @throws \ErrorException If model provided is not a Customer or connection to server fails.
|
||||
*/
|
||||
public function validateCredentials(Authenticatable $customer, array $credentials): bool
|
||||
{
|
||||
/** @var \App\Models\Customer $customer */
|
||||
if ($customer instanceof Customer) {
|
||||
throw new \ErrorException('Cannot authenticate any thing else than ' . Customer::class);
|
||||
}
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
$plain = $credentials['password'];
|
||||
|
||||
/** @var \App\Models\Customer $customer */
|
||||
if ($this->hasher->check($plain, $customer->getAuthPassword())) {
|
||||
// * Restore customer
|
||||
return boolval($customer->restore());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -3,10 +3,10 @@
|
|||
namespace App\Casts;
|
||||
|
||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Custom cast Html Color
|
||||
* https://laravel.com/docs/8.x/eloquent-mutators#custom-casts
|
||||
*/
|
||||
//phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceAfterLastUsed
|
||||
//phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed
|
||||
|
|
@ -15,13 +15,13 @@ class HtmlColor implements CastsAttributes
|
|||
/**
|
||||
* Cast the given value.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param array $attributes
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param array $attributes
|
||||
* @return string
|
||||
*/
|
||||
public function get($model, $key, $value, $attributes)
|
||||
public function get(Model $model, string $key, mixed $value, array $attributes): string
|
||||
{
|
||||
return "#" . $this->zeropad(dechex($value), 6);
|
||||
}
|
||||
|
|
@ -29,18 +29,25 @@ class HtmlColor implements CastsAttributes
|
|||
/**
|
||||
* Prepare the given value for storage.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @param string $key
|
||||
* @param array $value
|
||||
* @param array $attributes
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param array $attributes
|
||||
* @return integer
|
||||
*/
|
||||
public function set($model, $key, $value, $attributes)
|
||||
public function set(Model $model, string $key, mixed $value, array $attributes): int
|
||||
{
|
||||
return \intval(hexdec(ltrim($value, '#')));
|
||||
}
|
||||
|
||||
private function zeropad($num, $lim)
|
||||
/**
|
||||
* Pad with zeros a numeric string
|
||||
*
|
||||
* @param string $num
|
||||
* @param integer $lim
|
||||
* @return string
|
||||
*/
|
||||
protected function zeropad(string $num, int $lim): string
|
||||
{
|
||||
return (strlen($num) >= $lim) ? $num : $this->zeropad("0" . $num, $lim);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,39 +3,44 @@
|
|||
namespace App\Casts;
|
||||
|
||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class NiceDate implements CastsAttributes
|
||||
{
|
||||
/**
|
||||
* Accessor
|
||||
* Cast the given value.
|
||||
*
|
||||
* @param mixed $model
|
||||
* @param mixed $key
|
||||
* @param mixed $value
|
||||
* @param mixed $attributes
|
||||
* @return mixed
|
||||
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed
|
||||
* @param \Illuminate\Database\Eloquent\Model|null $model
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param array $attributes
|
||||
* @return string
|
||||
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceAfterLastUsed
|
||||
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed
|
||||
*/
|
||||
public function get($model, $key, $value, $attributes)
|
||||
public function get(Model|null $model, string $key, mixed $value, array $attributes): string
|
||||
{
|
||||
// phpcs:enable
|
||||
$value = Carbon::parse($value);
|
||||
return $value->isToday() ?
|
||||
trans('Aujourd\'hui à :time', ['time' => $value->format('H:i')]) : $value->format('Y/m/d H:i');
|
||||
trans('Aujourd\'hui à :time', ['time' => $value->format('H:i')]) : $value->format('Y/m/d à H:i');
|
||||
}
|
||||
|
||||
/**
|
||||
* Mutator
|
||||
* Prepare the given value for storage.
|
||||
*
|
||||
* @param mixed $model
|
||||
* @param mixed $key
|
||||
* @param mixed $value
|
||||
* @param mixed $attributes
|
||||
* @return mixed
|
||||
* @param \Illuminate\Database\Eloquent\Model $model
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param array $attributes
|
||||
* @return string
|
||||
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceAfterLastUsed
|
||||
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed
|
||||
*/
|
||||
public function set($model, $key, $value, $attributes)
|
||||
public function set(Model $model, string $key, mixed $value, array $attributes): string
|
||||
{
|
||||
// phpcs:enable
|
||||
return Carbon::parse($value)->format('Y-m-d H:i:s');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
34
app/Console/Commands/FetchDigitalRecruiterOffersCommand.php
Normal file
34
app/Console/Commands/FetchDigitalRecruiterOffersCommand.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Jobs\FetchDigitalRecruiterOffers;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class FetchDigitalRecruiterOffersCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'uwil:digital-recruiter';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Fetch digital recruiter offers';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
(new FetchDigitalRecruiterOffers())->handle();
|
||||
$this->info('Offers fetch 👌');
|
||||
}
|
||||
}
|
||||
34
app/Console/Commands/FetchMesBrCommand.php
Normal file
34
app/Console/Commands/FetchMesBrCommand.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Jobs\FetchMesBr;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class FetchMesBrCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'uwil:mesbr';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Fetch mesbr discounts';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
(new FetchMesBr())->handle();
|
||||
$this->info('Discounts fetch 👌');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
/*
|
||||
* Command Name: LDC Web Status Checker
|
||||
* Description: Envoi des infos Serveur/Laravel vers LDC Web
|
||||
* Version: 1.1
|
||||
* Author: Vincent BRIDIER
|
||||
* Author URI: vincent.bridier@ldc.fr
|
||||
*/
|
||||
|
||||
class LdcWebStatusChecker extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'ldcweb:statuschecker';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Envoi des infos Serveur/Laravel vers LDC Web';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$data = [];
|
||||
$data['uuid'] = config('ldcweb.project_uuid');
|
||||
|
||||
// Sitemap.xml ?
|
||||
if (file_exists(public_path() . '/sitemap.xml')) {
|
||||
$data['sitemap'] = 'true';
|
||||
} else {
|
||||
$data['sitemap'] = 'false';
|
||||
}
|
||||
|
||||
// Robots.txt ?
|
||||
if (file_exists(public_path() . '/robots.txt')) {
|
||||
$data['robots'] = 'true';
|
||||
} else {
|
||||
$data['robots'] = 'false';
|
||||
}
|
||||
|
||||
// Check logs
|
||||
$data['logs'] = 0;
|
||||
$patherror = storage_path('/logs');
|
||||
$files = glob($patherror . '/*.log');
|
||||
if (count($files) > 0) {
|
||||
foreach ($files as $file) {
|
||||
$data['logs'] = $data['logs'] + filesize($file);
|
||||
}
|
||||
}
|
||||
|
||||
$data['code']['version'] = app()->version();
|
||||
|
||||
// Send by cURL
|
||||
$url = 'https://ldc-web.ldc.fr/api/status-checker';
|
||||
$ch = curl_init($url);
|
||||
$payload = ['token' => 'CE8S52Qq7stf5k8frF4T', 'datas' => json_encode($data)];
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
39
app/Console/Commands/MigrateOldMessage.php
Normal file
39
app/Console/Commands/MigrateOldMessage.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Message;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
|
||||
class MigrateOldMessage extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'app:migrate-old-message';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Command description';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
// Comment casting before run this command.
|
||||
$messages = Message::all();
|
||||
foreach ($messages as $message) {
|
||||
$message->setAttribute('message', Crypt::encryptString($message->getRawOriginal('message')));
|
||||
$message->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Jobs\PurgeNotifications as JobsPurgeNotifications;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
//phpcs:disable Generic.Files.LineLength.TooLong
|
||||
class PurgeNotifications extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'notifications:purge';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Purge the notifications table where the created_at date of a notification is older than 30 days';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info('Running the Job, this could take some time.');
|
||||
$job = new JobsPurgeNotifications();
|
||||
$job->handle();
|
||||
$this->info('Job completed');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Jobs\UpdateReductions as JobsUpdateReductions;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
//phpcs:disable Generic.Files.LineLength.TooLong
|
||||
class UpdateReductions extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'reductions:update';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Update the reductions that the application get from MesBR';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info('Running the Job, this could take some time.');
|
||||
$job = new JobsUpdateReductions();
|
||||
$job->console = $this;
|
||||
$job->handle();
|
||||
$this->info('Job completed');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class UserChangePassword extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'user:password';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Changes a user password';
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$email = $this->ask('What is the email?');
|
||||
$user = User::where('email', $email)->first();
|
||||
|
||||
if (!$user) {
|
||||
$this->error(sprintf('User %s could not be found', $email));
|
||||
return -1;
|
||||
}
|
||||
|
||||
$password = $this->secret('What is the password?');
|
||||
|
||||
$user->password = Hash::make($password);
|
||||
$user->saveOrFail();
|
||||
|
||||
$this->info('User updated.');
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,9 +2,13 @@
|
|||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\User;
|
||||
use App\Enums\Users\RoleEnum;
|
||||
use App\Models\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class UserCreate extends Command
|
||||
{
|
||||
|
|
@ -13,38 +17,189 @@ class UserCreate extends Command
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'user:create';
|
||||
protected $signature = 'uwil:user:create';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Create a backend user';
|
||||
protected $description = 'Create a backend admin user';
|
||||
|
||||
/**
|
||||
* The first name of the new user.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
protected $first_name;
|
||||
|
||||
/**
|
||||
* The last name of the new user.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
protected $last_name;
|
||||
|
||||
/**
|
||||
* The email of the new user.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
protected $email;
|
||||
|
||||
/**
|
||||
* The role of the new user.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
protected $role;
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return integer
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): void
|
||||
{
|
||||
$firstname = $this->ask('What is the firstname?');
|
||||
$lastname = $this->ask('What is the lastname?');
|
||||
$email = $this->ask('What is the email?');
|
||||
$role = $this->ask('What is the role 1 (SuperAdmin) or 2 (Admin) ?') == '1' ? 1 : 2;
|
||||
$pwd = $this->secret('What is the password?');
|
||||
$this->first_name = null;
|
||||
$this->addFirstName();
|
||||
|
||||
$user = new User();
|
||||
$user->firstname = $firstname;
|
||||
$user->lastname = $lastname;
|
||||
$user->email = $email;
|
||||
$user->role = $role;
|
||||
$user->password = Hash::make($pwd);
|
||||
$user->email_verified_at = date('Y-m-d H:i:s');
|
||||
$this->last_name = null;
|
||||
$this->addLastName();
|
||||
|
||||
$this->email = null;
|
||||
$this->addEmail();
|
||||
|
||||
$this->role = null;
|
||||
$this->addRole();
|
||||
|
||||
$user = new User([
|
||||
'first_name' => $this->first_name,
|
||||
'last_name' => $this->last_name,
|
||||
'email' => $this->email,
|
||||
'role' => $this->role,
|
||||
'published' => true,
|
||||
'published_at' => Carbon::now(),
|
||||
]);
|
||||
$user->saveOrFail();
|
||||
|
||||
$this->info('User created.');
|
||||
return 0;
|
||||
$this->info('User created 👌');
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a first name to the user.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addFirstName(): void
|
||||
{
|
||||
while (is_null($this->first_name)) {
|
||||
try {
|
||||
$tmp = $this->ask('Type the wanted user first name', 'Admin');
|
||||
$validator = Validator::make(['first_name' => $tmp], [
|
||||
'first_name' => 'required|min:3|max:255'
|
||||
]);
|
||||
$validator->validate();
|
||||
$this->first_name = $tmp;
|
||||
} catch (ValidationException $e) {
|
||||
$this->error(sprintf(
|
||||
'Please provide a valid first name %s',
|
||||
\implode(',', collect($e->errors())->flatten()->all())
|
||||
));
|
||||
continue;
|
||||
} //end try
|
||||
}; //end while
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a last name to the user.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addLastName(): void
|
||||
{
|
||||
while (is_null($this->last_name)) {
|
||||
try {
|
||||
$tmp = $this->ask('Type the wanted user last name', 'Saïtama');
|
||||
$validator = Validator::make(['last_name' => $tmp], [
|
||||
'last_name' => 'required|min:3|max:255'
|
||||
]);
|
||||
$validator->validate();
|
||||
$this->last_name = $tmp;
|
||||
} catch (ValidationException $e) {
|
||||
$this->error(sprintf(
|
||||
'Please provide a valid last_name %s',
|
||||
\implode(',', collect($e->errors())->flatten()->all())
|
||||
));
|
||||
continue;
|
||||
} //end try
|
||||
}; //end while
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an email to the user.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addEmail(): void
|
||||
{
|
||||
while (is_null($this->email)) {
|
||||
try {
|
||||
$tmp = $this->ask('Type the wanted user email', 'equipe.web@ldc.fr');
|
||||
$validator = Validator::make(['email' => $tmp], [
|
||||
'email' => 'required|unique:users,email|email:rfc,dns'
|
||||
]);
|
||||
$validator->validate();
|
||||
$this->email = $tmp;
|
||||
} catch (ValidationException $e) {
|
||||
$this->error(sprintf(
|
||||
'Please provide a valid email %s',
|
||||
\implode(',', collect($e->errors())->flatten()->all())
|
||||
));
|
||||
continue;
|
||||
} //end try
|
||||
}; //end while
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a role to the user.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addRole(): void
|
||||
{
|
||||
while (is_null($this->role)) {
|
||||
try {
|
||||
$tmp = $this->choice(
|
||||
'Select his role',
|
||||
[
|
||||
Str::ucFirst(RoleEnum::conceptor->label()),
|
||||
Str::ucFirst(RoleEnum::admin->label()),
|
||||
Str::ucFirst(RoleEnum::visitor->label())
|
||||
],
|
||||
Str::ucFirst(RoleEnum::visitor->label()),
|
||||
);
|
||||
if ($tmp === Str::ucFirst(RoleEnum::conceptor->label())) {
|
||||
$tmp = RoleEnum::conceptor;
|
||||
}
|
||||
if ($tmp === Str::ucFirst(RoleEnum::admin->label())) {
|
||||
$tmp = RoleEnum::admin;
|
||||
}
|
||||
if ($tmp === Str::ucFirst(RoleEnum::visitor->label())) {
|
||||
$tmp = RoleEnum::visitor;
|
||||
}
|
||||
$validator = Validator::make(['role' => $tmp], [
|
||||
'role' => 'required'
|
||||
]);
|
||||
$validator->validate();
|
||||
$this->role = $tmp;
|
||||
} catch (ValidationException $e) {
|
||||
$this->error(sprintf(
|
||||
'Please choose from the selection %s',
|
||||
\implode(',', collect($e->errors())->flatten()->all())
|
||||
));
|
||||
continue;
|
||||
} //end try
|
||||
}; //end while
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Jobs\XSCVMepReader as JobsXSCVMepReader;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class XSCVMepReader extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'csv:mep';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Run the XSCVMepReader manually';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info('Running the Job, this could take some time.');
|
||||
$job = new JobsXSCVMepReader();
|
||||
$job->console = $this;
|
||||
$job->handle();
|
||||
$this->info('Job completed');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Jobs\XmlEleveursReader as JobsXmlEleveursReader;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class XmlEleveursReader extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'xml:eleveur';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Run the XmlEleveursReaderJob manually';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info('Running the Job, this could take some time.');
|
||||
$job = new JobsXmlEleveursReader();
|
||||
$job->console = $this;
|
||||
$job->handle();
|
||||
$this->info('Job completed');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Jobs\XmlIncoReader as JobsXmlIncoReader;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class XmlIncoReader extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'xml:inco';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Run the XmlIncoReaderJob manually';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info('Running the Job, this could take some time.');
|
||||
$job = new JobsXmlIncoReader();
|
||||
$job->console = $this;
|
||||
$job->handle();
|
||||
$this->info('Job completed');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Jobs\XmlTracaReader as JobsXmlTracaReader;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class XmlTracaReader extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'xml:traca';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Run the XmlTracaReaderJob manually';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info('Running the Job, this could take some time.');
|
||||
$job = new JobsXmlTracaReader();
|
||||
$job->console = $this;
|
||||
$job->handle();
|
||||
$this->info('Job completed');
|
||||
}
|
||||
}
|
||||
|
|
@ -2,68 +2,36 @@
|
|||
|
||||
namespace App\Console;
|
||||
|
||||
use App\Console\Commands\LdcWebStatusChecker;
|
||||
use App\Console\Commands\PurgeNotifications;
|
||||
use App\Console\Commands\UpdateReductions;
|
||||
use App\Console\Commands\UserChangePassword;
|
||||
use App\Console\Commands\UserCreate;
|
||||
use App\Console\Commands\XmlEleveursReader;
|
||||
use App\Console\Commands\XmlIncoReader;
|
||||
use App\Console\Commands\XmlTracaReader;
|
||||
use App\Console\Commands\XSCVMepReader;
|
||||
use App\Jobs\DeleteOldMessages;
|
||||
use App\Jobs\DeleteOldNotifications;
|
||||
use App\Jobs\DeleteOrders;
|
||||
use App\Jobs\PurgeNotifications as JobsPurgeNotifications;
|
||||
use App\Jobs\PurgeOldResetPasswords;
|
||||
use App\Jobs\UpdateReductions as JobsUpdateReductions;
|
||||
use App\Jobs\XmlEleveursReader as JobsXmlEleveursReader;
|
||||
use App\Jobs\XmlIncoReader as JobsXmlIncoReader;
|
||||
use App\Jobs\XmlTracaReader as JobsXmlTracaReader;
|
||||
use App\Jobs\XSCVMepReader as JobsXSCVMepReader;
|
||||
use App\Jobs\FetchDigitalRecruiterOffers;
|
||||
use App\Jobs\FetchMesBr;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
PurgeNotifications::class,
|
||||
UpdateReductions::class,
|
||||
XmlEleveursReader::class,
|
||||
XmlIncoReader::class,
|
||||
XmlTracaReader::class,
|
||||
UserCreate::class,
|
||||
UserChangePassword::class,
|
||||
XSCVMepReader::class,
|
||||
LdcWebStatusChecker::class
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
protected function schedule(Schedule $schedule): void
|
||||
{
|
||||
// $schedule->job(SendOcbMissingBreederReminder::class)->dailyAt('07:30');
|
||||
$schedule->job(DeleteOrders::class)->dailyAt('14:00');
|
||||
$schedule->job(FetchDigitalRecruiterOffers::class)->everyFourHours(15);
|
||||
$schedule->job(DeleteOldMessages::class)->dailyAt('14:15');
|
||||
$schedule->job(DeleteOldNotifications::class)->dailyAt('14:30');
|
||||
$schedule->job(JobsUpdateReductions::class)->dailyAt('14:45');
|
||||
$schedule->job(JobsXmlIncoReader::class)->name('xml-inco-reader')->dailyAt('15:00');
|
||||
$schedule->job(JobsXmlTracaReader::class)->name('xml-traca-reader')->dailyAt('15:15');
|
||||
$schedule->job(JobsXmlEleveursReader::class)->name('xml-eleveurs-reader')->dailyAt('15:30');
|
||||
$schedule->job(JobsXSCVMepReader::class)->name('csv-mep-reader')->dailyAt('16:00');
|
||||
$schedule->job(JobsPurgeNotifications::class)->dailyAt('00:15');
|
||||
$schedule->job(PurgeOldResetPasswords::class)->dailyAt('00:25');
|
||||
$schedule->job(FetchMesBr::class)->daily();
|
||||
}
|
||||
|
||||
// * Remove Old traca
|
||||
$schedule->command('xml:clean_olds')->dailyAt('06:00');
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function commands(): void
|
||||
{
|
||||
$this->load(__DIR__ . '/Commands');
|
||||
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
47
app/Enums/ActivityLogs/ActivityLogsEventEnum.php
Normal file
47
app/Enums/ActivityLogs/ActivityLogsEventEnum.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\ActivityLogs;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum ActivityLogsEventEnum: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case created = 1;
|
||||
case updated = 2;
|
||||
case duplicated = 3;
|
||||
case deleted = 4;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::created->name => 'Création',
|
||||
self::updated->name => 'Mise à jour',
|
||||
self::duplicated->name => 'Duplication',
|
||||
self::deleted->name => 'Suppression',
|
||||
];
|
||||
|
||||
/**
|
||||
* Custom added classes definition
|
||||
*/
|
||||
private const BOOTSTRAPCLASS = [
|
||||
self::created->name => 'success',
|
||||
self::updated->name => 'warning',
|
||||
self::duplicated->name => 'secondary',
|
||||
self::deleted->name => 'danger',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get Class
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function bootstrapClass(): string
|
||||
{
|
||||
return self::BOOTSTRAPCLASS[$this->name];
|
||||
}
|
||||
}
|
||||
23
app/Enums/Approaches/ApproachTypeEnum.php
Normal file
23
app/Enums/Approaches/ApproachTypeEnum.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Approaches;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum ApproachTypeEnum: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case label = 1;
|
||||
case demarche = 2;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::label->name => 'validation.custom.label',
|
||||
self::demarche->name => 'validation.custom.demarche',
|
||||
];
|
||||
}
|
||||
13
app/Enums/Arcadia/ArcadiaOrderType.php
Normal file
13
app/Enums/Arcadia/ArcadiaOrderType.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Arcadia;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum ArcadiaOrderType: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case cb = 1;
|
||||
case check = 2;
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self actu()
|
||||
* @method static self jeux()
|
||||
* @method static self video()
|
||||
* @method static self sondage()
|
||||
* @method static self astuce()
|
||||
*/
|
||||
final class ArticleCategory extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'actu' => __('Actus'),
|
||||
'jeux' => __('Jeux-Concours'),
|
||||
'video' => __('Vidéo'),
|
||||
'sondage' => __('Sondage'),
|
||||
'astuce' => __('Astuces')
|
||||
];
|
||||
}
|
||||
}
|
||||
23
app/Enums/Breeders/GeoType.php
Normal file
23
app/Enums/Breeders/GeoType.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Breeders;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum GeoType: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case exact = 0;
|
||||
case commune = 1;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::exact->name => 'Exacte',
|
||||
self::commune->name => 'Code commune',
|
||||
];
|
||||
}
|
||||
27
app/Enums/Breeders/OCBStatus.php
Normal file
27
app/Enums/Breeders/OCBStatus.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Breeders;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum OCBStatus: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case none = 0;
|
||||
case pending = 1;
|
||||
case no = 2;
|
||||
case yes = 3;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::none->name => 'Non',
|
||||
self::pending->name => 'En attente',
|
||||
self::no->name => 'Réfusé',
|
||||
self::yes->name => 'Valide',
|
||||
];
|
||||
}
|
||||
25
app/Enums/Breeders/OCBType.php
Normal file
25
app/Enums/Breeders/OCBType.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Breeders;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum OCBType: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case rabbit = 1;
|
||||
case chicken = 2;
|
||||
case turkey = 3;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::rabbit->name => 'Lapin',
|
||||
self::chicken->name => 'Poulet',
|
||||
self::turkey->name => 'Dinde',
|
||||
];
|
||||
}
|
||||
23
app/Enums/Breeders/PresentationType.php
Normal file
23
app/Enums/Breeders/PresentationType.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Breeders;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum PresentationType: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case picture = 0;
|
||||
case video = 1;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::picture->name => 'Photo',
|
||||
self::video->name => 'Video',
|
||||
];
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self bloc1()
|
||||
* Text et dropdowns array
|
||||
*/
|
||||
final class BreedingBlocType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'bloc1' => 0,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'bloc1' => __('Bloc 1, (Text et dropdowns array)')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self breeding()
|
||||
* @method static self job()
|
||||
* @method static self food()
|
||||
* @method static self health()
|
||||
*/
|
||||
final class BreedingPageType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
$labels = self::labels();
|
||||
return [
|
||||
'breeding' => Str::slug($labels['breeding']),
|
||||
'job' => Str::slug($labels['job']),
|
||||
'food' => Str::slug($labels['food']),
|
||||
'health' => Str::slug($labels['health']),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Attention avant de modifier ceci, celà aura
|
||||
* un impact sur l'affichage du site puisque
|
||||
* les labels servent de clé primaire
|
||||
* au modèle BreedingPage
|
||||
*
|
||||
* Les label sont utilisé pour les slug nottament
|
||||
* mais aussi pour identifier le type de page cf values()
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'breeding' => __('L\'élevage des volailles'),
|
||||
'job' => __('Le métier d\'éleveur de volailles'),
|
||||
'food' => __('L\'alimentation des volailles'),
|
||||
'health' => __('La santé des volailles')
|
||||
];
|
||||
}
|
||||
}
|
||||
23
app/Enums/CkEditorConfigName.php
Normal file
23
app/Enums/CkEditorConfigName.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum CkEditorConfigName: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case minimal = 1;
|
||||
case basic = 2;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::minimal->name => 'minimal',
|
||||
self::basic->name => 'basic',
|
||||
];
|
||||
}
|
||||
|
|
@ -2,47 +2,22 @@
|
|||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
/**
|
||||
* @method static self m()
|
||||
* @method static self mme()
|
||||
*/
|
||||
final class ContactFormCivility extends BaseEnumRoutable
|
||||
enum ContactFormCivility: int
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'm' => 1,
|
||||
'mme' => 2
|
||||
];
|
||||
}
|
||||
use BaseEnum;
|
||||
|
||||
case m = 1;
|
||||
case mme = 2;
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @return array
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'mme' => __('Mme'),
|
||||
'm' => __('M')
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
}
|
||||
private const LABELS = [
|
||||
self::m->name => 'M',
|
||||
self::mme->name => 'Mme',
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,61 +2,118 @@
|
|||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
/**
|
||||
* @method static self none()
|
||||
* @method static self abuse()
|
||||
* @method static self complain()
|
||||
* @method static self recipe()
|
||||
* @method static self games()
|
||||
* @method static self onepage()
|
||||
*/
|
||||
final class ContactFormType extends BaseEnumRoutable
|
||||
enum ContactFormType: int
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'none' => 0,
|
||||
'abuse' => 1,
|
||||
// * special case passerelle
|
||||
'complain' => 3,
|
||||
'recipe' => 5,
|
||||
'games' => 9,
|
||||
// * special case page nl
|
||||
'onepage' => 10,
|
||||
];
|
||||
}
|
||||
use BaseEnum;
|
||||
|
||||
case none = 0;
|
||||
case club = 1;
|
||||
case complain = 3;
|
||||
case games = 9;
|
||||
case nl = 10;
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @return array
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'none' => trans('Aucun'),
|
||||
'abuse' => trans('Le Club des Gaulois et Les Départ’aimants'),
|
||||
'complain' => __('Réclamation Produit'),
|
||||
'recipe' => __('Les Recettes'),
|
||||
'games' => __('Les Jeux'),
|
||||
'onepage' => 'Used for one page'
|
||||
];
|
||||
}
|
||||
private const LABELS = [
|
||||
self::none->name => 'enums.contact-form-type.none.label',
|
||||
self::complain->name => 'enums.contact-form-type.complain.label',
|
||||
self::club->name => 'enums.contact-form-type.club.label',
|
||||
self::games->name => 'enums.contact-form-type.games.label',
|
||||
self::nl->name => 'enums.contact-form-type.nl.label',
|
||||
];
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
* Get the description.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
public function description(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
return match ($this) {
|
||||
self::none => trans('enums.contact-form-type.none.description'),
|
||||
self::complain => trans('enums.contact-form-type.complain.description'),
|
||||
self::club => trans('enums.contact-form-type.club.description'),
|
||||
self::games => trans('enums.contact-form-type.games.description'),
|
||||
default => '',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the picto src/alt.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function picto(): array
|
||||
{
|
||||
return match ($this) {
|
||||
self::complain => [
|
||||
'src' => 'resources/assets/images/contact/exclamation.svg',
|
||||
'alt' => 'enums.contact-form-type.misc.picto-exclamation-alt'
|
||||
],
|
||||
self::club,
|
||||
self::games,
|
||||
self::none => [
|
||||
'src' => 'resources/assets/images/contact/question-mark.svg',
|
||||
'alt' => 'enums.contact-form-type.misc.picto-question-mark-alt'
|
||||
],
|
||||
default => [
|
||||
'src' => '',
|
||||
'alt' => '',
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all contact types except 'none'.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getContactTypes(): array
|
||||
{
|
||||
if (request()->routeIs('fo.*.export')) {
|
||||
return [
|
||||
self::complain,
|
||||
self::none,
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
self::complain,
|
||||
self::club,
|
||||
self::games,
|
||||
self::none,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all 'locales' contact types.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getLocalesContactType(): array
|
||||
{
|
||||
return [
|
||||
self::nl,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current subject has a file input.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasFileInput(): bool
|
||||
{
|
||||
return match ($this) {
|
||||
self::complain,
|
||||
self::club,
|
||||
self::games => true,
|
||||
default => false,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
49
app/Enums/Customers/Civility.php
Normal file
49
app/Enums/Customers/Civility.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Customers;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
use Illuminate\Support\Facades\Vite;
|
||||
|
||||
enum Civility: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case m = 1;
|
||||
case mme = 2;
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::m->name => 'Un poulet',
|
||||
self::mme->name => 'Une poule',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get picture
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function picture(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::m => Vite::asset("resources/assets/images/club/game-points/chicken.png"),
|
||||
self::mme => Vite::asset("resources/assets/images/club/game-points/hen.png"),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get autocomplete
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function autoComplete(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::m => 'Monsieur',
|
||||
self::mme => 'Madame',
|
||||
};
|
||||
}
|
||||
}
|
||||
28
app/Enums/Customers/LivingStatus.php
Normal file
28
app/Enums/Customers/LivingStatus.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Customers;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum LivingStatus: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case teenage = 1;
|
||||
case youngAdult = 2;
|
||||
case parent = 3;
|
||||
case parentAlone = 4;
|
||||
case elder = 5;
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::teenage->name => 'Adolescent/Étudiant',
|
||||
self::youngAdult->name => 'Jeune actif sans enfant',
|
||||
self::parent->name => 'Parents',
|
||||
self::parentAlone->name => 'Adulte sans enfant',
|
||||
self::elder->name => 'Grand-parent',
|
||||
];
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self description()
|
||||
* @method static self media()
|
||||
*/
|
||||
final class DansLesPresType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'description' => 0,
|
||||
'media' => 1,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'description' => __('La demarche en description'),
|
||||
'media' => __('La demarche en media'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self none()
|
||||
* @method static self mon()
|
||||
* @method static self tue()
|
||||
* @method static self wed()
|
||||
* @method static self thu()
|
||||
* @method static self fri()
|
||||
* @method static self sat()
|
||||
* @method static self sun()
|
||||
*/
|
||||
final class Days extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'none' => 0,
|
||||
'mon' => 1,
|
||||
'tue' => 1 << 1,
|
||||
'wed' => 1 << 2,
|
||||
'thu' => 1 << 3,
|
||||
'fri' => 1 << 4,
|
||||
'sat' => 1 << 5,
|
||||
'sun' => 1 << 6,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'none' => __('None'),
|
||||
'mon' => __('Monday'),
|
||||
'tue' => __('Tuesday'),
|
||||
'wed' => __('Wednesday'),
|
||||
'thu' => __('Thursday'),
|
||||
'fri' => __('Friday'),
|
||||
'sat' => __('Saturday'),
|
||||
'sun' => __('Sunday')
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if days contain this day
|
||||
*
|
||||
* @param integer $days
|
||||
* @return boolean
|
||||
*/
|
||||
public function has(int $days)
|
||||
{
|
||||
return (bool)($this->value & $days);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
abstract class Departaimant extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get All departaimants
|
||||
*
|
||||
* @return array<Departaimant>
|
||||
*/
|
||||
public static function all(): array
|
||||
{
|
||||
$o = [];
|
||||
foreach (static::toArray() as $value => $label) {
|
||||
$o[] = static::make($value);
|
||||
}
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self vintage()
|
||||
* @method static self current()
|
||||
*/
|
||||
final class DepartaimantCollectionType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'vintage' => 0,
|
||||
'current' => 1,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum label
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'vintage' => __('Collection Vintage'),
|
||||
'current' => __('Collection Actuelle')
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Json serialize implementation.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function jsonSerialize(): array
|
||||
{
|
||||
return [
|
||||
'value' => $this->value,
|
||||
'label' => $this->label
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,333 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
/**
|
||||
* @method static self ain()
|
||||
* @method static self aisne()
|
||||
* @method static self allier()
|
||||
* @method static self alpesdehauteprovence()
|
||||
* @method static self hautesalpes()
|
||||
* @method static self alpesmaritimes()
|
||||
* @method static self ardeche()
|
||||
* @method static self ardennes()
|
||||
* @method static self ariege()
|
||||
* @method static self aube()
|
||||
* @method static self aude()
|
||||
* @method static self aveyron()
|
||||
* @method static self bouchesdurhone()
|
||||
* @method static self calvados()
|
||||
* @method static self cantal()
|
||||
* @method static self charente()
|
||||
* @method static self charentemaritime()
|
||||
* @method static self cher()
|
||||
* @method static self correze()
|
||||
* @method static self corsedusud()
|
||||
* @method static self hautecorse()
|
||||
* @method static self cotedor()
|
||||
* @method static self cotesdarmor()
|
||||
* @method static self creuse()
|
||||
* @method static self dordogne()
|
||||
* @method static self doubs()
|
||||
* @method static self drome()
|
||||
* @method static self eure()
|
||||
* @method static self eureetloir()
|
||||
* @method static self finistere()
|
||||
* @method static self gard()
|
||||
* @method static self hautegaronne()
|
||||
* @method static self gers()
|
||||
* @method static self gironde()
|
||||
* @method static self herault()
|
||||
* @method static self illeetvilaine()
|
||||
* @method static self indre()
|
||||
* @method static self indreetloire()
|
||||
* @method static self isere()
|
||||
* @method static self jura()
|
||||
* @method static self landes()
|
||||
* @method static self loiretcher()
|
||||
* @method static self loire()
|
||||
* @method static self hauteloire()
|
||||
* @method static self loireatlantique()
|
||||
* @method static self loiret()
|
||||
* @method static self lot()
|
||||
* @method static self lotetgaronne()
|
||||
* @method static self lozere()
|
||||
* @method static self maineetloire()
|
||||
* @method static self manche()
|
||||
* @method static self marne()
|
||||
* @method static self hautemarne()
|
||||
* @method static self mayenne()
|
||||
* @method static self meurtheetmoselle()
|
||||
* @method static self meuse()
|
||||
* @method static self morbihan()
|
||||
* @method static self moselle()
|
||||
* @method static self nievre()
|
||||
* @method static self nord()
|
||||
* @method static self oise()
|
||||
* @method static self orne()
|
||||
* @method static self pasdecalais()
|
||||
* @method static self puydedome()
|
||||
* @method static self pyreneesatlantiques()
|
||||
* @method static self hautespyrenees()
|
||||
* @method static self pyreneesorientales()
|
||||
* @method static self basrhin()
|
||||
* @method static self hautrhin()
|
||||
* @method static self rhone()
|
||||
* @method static self hautesaone()
|
||||
* @method static self saoneetloire()
|
||||
* @method static self sarthe()
|
||||
* @method static self savoie()
|
||||
* @method static self hautesavoie()
|
||||
* @method static self paris()
|
||||
* @method static self seinemaritime()
|
||||
* @method static self seineetmarne()
|
||||
* @method static self yvelines()
|
||||
* @method static self deuxsevres()
|
||||
* @method static self somme()
|
||||
* @method static self tarn()
|
||||
* @method static self tarnetgaronne()
|
||||
* @method static self var()
|
||||
* @method static self vaucluse()
|
||||
* @method static self vendee()
|
||||
* @method static self vienne()
|
||||
* @method static self hautevienne()
|
||||
* @method static self vosges()
|
||||
* @method static self yonne()
|
||||
* @method static self territoiredebelfort()
|
||||
* @method static self essonne()
|
||||
* @method static self hautsdeseine()
|
||||
* @method static self seinesaintdenis()
|
||||
* @method static self valdemarne()
|
||||
* @method static self valdoise()
|
||||
* @method static self guadeloupe()
|
||||
* @method static self martinique()
|
||||
* @method static self guyane()
|
||||
* @method static self lareunion()
|
||||
* @method static self mayotte()
|
||||
*/
|
||||
final class DepartaimantCurrent extends Departaimant
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'ain' => '01',
|
||||
'aisne' => '02',
|
||||
'allier' => '03',
|
||||
'alpesdehauteprovence' => '04',
|
||||
'hautesalpes' => '05',
|
||||
'alpesmaritimes' => '06',
|
||||
'ardeche' => '07',
|
||||
'ardennes' => '08',
|
||||
'ariege' => '09',
|
||||
'aube' => '10',
|
||||
'aude' => '11',
|
||||
'aveyron' => '12',
|
||||
'bouchesdurhone' => '13',
|
||||
'calvados' => '14',
|
||||
'cantal' => '15',
|
||||
'charente' => '16',
|
||||
'charentemaritime' => '17',
|
||||
'cher' => '18',
|
||||
'correze' => '19',
|
||||
'corsedusud' => '2A',
|
||||
'hautecorse' => '2B',
|
||||
'cotedor' => '21',
|
||||
'cotesdarmor' => '22',
|
||||
'creuse' => '23',
|
||||
'dordogne' => '24',
|
||||
'doubs' => '25',
|
||||
'drome' => '26',
|
||||
'eure' => '27',
|
||||
'eureetloir' => '28',
|
||||
'finistere' => '29',
|
||||
'gard' => '30',
|
||||
'hautegaronne' => '31',
|
||||
'gers' => '32',
|
||||
'gironde' => '33',
|
||||
'herault' => '34',
|
||||
'illeetvilaine' => '35',
|
||||
'indre' => '36',
|
||||
'indreetloire' => '37',
|
||||
'isere' => '38',
|
||||
'jura' => '39',
|
||||
'landes' => '40',
|
||||
'loiretcher' => '41',
|
||||
'loire' => '42',
|
||||
'hauteloire' => '43',
|
||||
'loireatlantique' => '44',
|
||||
'loiret' => '45',
|
||||
'lot' => '46',
|
||||
'lotetgaronne' => '47',
|
||||
'lozere' => '48',
|
||||
'maineetloire' => '49',
|
||||
'manche' => '50',
|
||||
'marne' => '51',
|
||||
'hautemarne' => '52',
|
||||
'mayenne' => '53',
|
||||
'meurtheetmoselle' => '54',
|
||||
'meuse' => '55',
|
||||
'morbihan' => '56',
|
||||
'moselle' => '57',
|
||||
'nievre' => '58',
|
||||
'nord' => '59',
|
||||
'oise' => '60',
|
||||
'orne' => '61',
|
||||
'pasdecalais' => '62',
|
||||
'puydedome' => '63',
|
||||
'pyreneesatlantiques' => '64',
|
||||
'hautespyrenees' => '65',
|
||||
'pyreneesorientales' => '66',
|
||||
'basrhin' => '67',
|
||||
'hautrhin' => '68',
|
||||
'rhone' => '69',
|
||||
'hautesaone' => '70',
|
||||
'saoneetloire' => '71',
|
||||
'sarthe' => '72',
|
||||
'savoie' => '73',
|
||||
'hautesavoie' => '74',
|
||||
'paris' => '75',
|
||||
'seinemaritime' => '76',
|
||||
'seineetmarne' => '77',
|
||||
'yvelines' => '78',
|
||||
'deuxsevres' => '79',
|
||||
'somme' => '80',
|
||||
'tarn' => '81',
|
||||
'tarnetgaronne' => '82',
|
||||
'var' => '83',
|
||||
'vaucluse' => '84',
|
||||
'vendee' => '85',
|
||||
'vienne' => '86',
|
||||
'hautevienne' => '87',
|
||||
'vosges' => '88',
|
||||
'yonne' => '89',
|
||||
'territoiredebelfort' => '90',
|
||||
'essonne' => '91',
|
||||
'hautsdeseine' => '92',
|
||||
'seinesaintdenis' => '93',
|
||||
'valdemarne' => '94',
|
||||
'valdoise' => '95',
|
||||
'guadeloupe' => '971',
|
||||
'martinique' => '972',
|
||||
'guyane' => '973',
|
||||
'lareunion' => '974',
|
||||
'mayotte' => '976'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum label
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'ain' => 'Ain',
|
||||
'aisne' => 'Aisne',
|
||||
'allier' => 'Allier',
|
||||
'alpesdehauteprovence' => 'Alpes-de-Haute-Provence',
|
||||
'hautesalpes' => 'Hautes-alpes',
|
||||
'alpesmaritimes' => 'Alpes-maritimes',
|
||||
'ardeche' => 'Ardèche',
|
||||
'ardennes' => 'Ardennes',
|
||||
'ariege' => 'Ariège',
|
||||
'aube' => 'Aube',
|
||||
'aude' => 'Aude',
|
||||
'aveyron' => 'Aveyron',
|
||||
'bouchesdurhone' => 'Bouches-du-Rhône',
|
||||
'calvados' => 'Calvados',
|
||||
'cantal' => 'Cantal',
|
||||
'charente' => 'Charente',
|
||||
'charentemaritime' => 'Charente-maritime',
|
||||
'cher' => 'Cher',
|
||||
'correze' => 'Corrèze',
|
||||
'corsedusud' => 'Corse-du-sud',
|
||||
'hautecorse' => 'Haute-Corse',
|
||||
'cotedor' => 'Côte-d\'Or',
|
||||
'cotesdarmor' => 'Côtes-d\'Armor',
|
||||
'creuse' => 'Creuse',
|
||||
'dordogne' => 'Dordogne',
|
||||
'doubs' => 'Doubs',
|
||||
'drome' => 'Drôme',
|
||||
'eure' => 'Eure',
|
||||
'eureetloir' => 'Eure-et-loir',
|
||||
'finistere' => 'Finistère',
|
||||
'gard' => 'Gard',
|
||||
'hautegaronne' => 'Haute-garonne',
|
||||
'gers' => 'Gers',
|
||||
'gironde' => 'Gironde',
|
||||
'herault' => 'Hérault',
|
||||
'illeetvilaine' => 'Ille-et-vilaine',
|
||||
'indre' => 'Indre',
|
||||
'indreetloire' => 'Indre-et-loire',
|
||||
'isere' => 'Isère',
|
||||
'jura' => 'Jura',
|
||||
'landes' => 'Landes',
|
||||
'loiretcher' => 'Loir-et-cher',
|
||||
'loire' => 'Loire',
|
||||
'hauteloire' => 'Haute-loire',
|
||||
'loireatlantique' => 'Loire-atlantique',
|
||||
'loiret' => 'Loiret',
|
||||
'lot' => 'Lot',
|
||||
'lotetgaronne' => 'Lot-et-garonne',
|
||||
'lozere' => 'Lozère',
|
||||
'maineetloire' => 'Maine-et-loire',
|
||||
'manche' => 'Manche',
|
||||
'marne' => 'Marne',
|
||||
'hautemarne' => 'Haute-marne',
|
||||
'mayenne' => 'Mayenne',
|
||||
'meurtheetmoselle' => 'Meurthe-et-moselle',
|
||||
'meuse' => 'Meuse',
|
||||
'morbihan' => 'Morbihan',
|
||||
'moselle' => 'Moselle',
|
||||
'nievre' => 'Nièvre',
|
||||
'nord' => 'Nord',
|
||||
'oise' => 'Oise',
|
||||
'orne' => 'Orne',
|
||||
'pasdecalais' => 'Pas-de-calais',
|
||||
'puydedome' => 'Puy-de-dôme',
|
||||
'pyreneesatlantiques' => 'Pyrénées-atlantiques',
|
||||
'hautespyrenees' => 'Hautes-Pyrénées',
|
||||
'pyreneesorientales' => 'Pyrénées-orientales',
|
||||
'basrhin' => 'Bas-rhin',
|
||||
'hautrhin' => 'Haut-rhin',
|
||||
'rhone' => 'Rhône',
|
||||
'hautesaone' => 'Haute-saône',
|
||||
'saoneetloire' => 'Saône-et-loire',
|
||||
'sarthe' => 'Sarthe',
|
||||
'savoie' => 'Savoie',
|
||||
'hautesavoie' => 'Haute-savoie',
|
||||
'paris' => 'Paris',
|
||||
'seinemaritime' => 'Seine-maritime',
|
||||
'seineetmarne' => 'Seine-et-marne',
|
||||
'yvelines' => 'Yvelines',
|
||||
'deuxsevres' => 'Deux-sèvres',
|
||||
'somme' => 'Somme',
|
||||
'tarn' => 'Tarn',
|
||||
'tarnetgaronne' => 'Tarn-et-Garonne',
|
||||
'var' => 'Var',
|
||||
'vaucluse' => 'Vaucluse',
|
||||
'vendee' => 'Vendée',
|
||||
'vienne' => 'Vienne',
|
||||
'hautevienne' => 'Haute-vienne',
|
||||
'vosges' => 'Vosges',
|
||||
'yonne' => 'Yonne',
|
||||
'territoiredebelfort' => 'Territoire de belfort',
|
||||
'essonne' => 'Essonne',
|
||||
'hautsdeseine' => 'Hauts-de-seine',
|
||||
'seinesaintdenis' => 'Seine-Saint-Denis',
|
||||
'valdemarne' => 'Val-de-marne',
|
||||
'valdoise' => 'Val-d\'Oise',
|
||||
'guadeloupe' => 'Guadeloupe',
|
||||
'martinique' => 'Martinique',
|
||||
'guyane' => 'Guyane',
|
||||
'lareunion' => 'La réunion',
|
||||
'mayotte' => 'Mayotte'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self none()
|
||||
* @method static self has()
|
||||
* @method static self wants()
|
||||
* @method static self gives()
|
||||
*/
|
||||
final class DepartaimantStatus extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'none' => 0,
|
||||
'has' => 1,
|
||||
'gives' => 2,
|
||||
'wants' => 3,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'none' => __('Non possédé'),
|
||||
'has' => __('Je possède'),
|
||||
'gives' => __("J'échange"),
|
||||
'wants' => __('Je cherche'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* To Array
|
||||
*
|
||||
* @return \Kwaadpepper\Enum\BaseEnum[]
|
||||
*/
|
||||
public static function toArray(): array
|
||||
{
|
||||
$array = [];
|
||||
foreach (parent::toArray() as $enum) {
|
||||
$array[$enum->getDefinition()] = [
|
||||
'value' => $enum->value,
|
||||
'label' => $enum->label
|
||||
];
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Json serialize implementation.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function jsonSerialize(): array
|
||||
{
|
||||
return [
|
||||
'value' => $this->value,
|
||||
'label' => \stripslashes($this->label)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,327 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
/**
|
||||
* @method static self ain()
|
||||
* @method static self aisne()
|
||||
* @method static self allier()
|
||||
* @method static self alpesdehauteprovence()
|
||||
* @method static self hautesalpes()
|
||||
* @method static self alpesmaritimes()
|
||||
* @method static self ardeche()
|
||||
* @method static self ardennes()
|
||||
* @method static self ariege()
|
||||
* @method static self aube()
|
||||
* @method static self aude()
|
||||
* @method static self aveyron()
|
||||
* @method static self bouchesdurhone()
|
||||
* @method static self calvados()
|
||||
* @method static self cantal()
|
||||
* @method static self charente()
|
||||
* @method static self charentemaritime()
|
||||
* @method static self cher()
|
||||
* @method static self correze()
|
||||
* @method static self corsedusud()
|
||||
* @method static self hautecorse()
|
||||
* @method static self cotedor()
|
||||
* @method static self cotesdarmor()
|
||||
* @method static self creuse()
|
||||
* @method static self dordogne()
|
||||
* @method static self doubs()
|
||||
* @method static self drome()
|
||||
* @method static self eure()
|
||||
* @method static self eureetloir()
|
||||
* @method static self finistere()
|
||||
* @method static self gard()
|
||||
* @method static self hautegaronne()
|
||||
* @method static self gers()
|
||||
* @method static self gironde()
|
||||
* @method static self herault()
|
||||
* @method static self illeetvilaine()
|
||||
* @method static self indre()
|
||||
* @method static self indreetloire()
|
||||
* @method static self isere()
|
||||
* @method static self jura()
|
||||
* @method static self landes()
|
||||
* @method static self loiretcher()
|
||||
* @method static self loire()
|
||||
* @method static self hauteloire()
|
||||
* @method static self loireatlantique()
|
||||
* @method static self loiret()
|
||||
* @method static self lot()
|
||||
* @method static self lotetgaronne()
|
||||
* @method static self lozere()
|
||||
* @method static self maineetloire()
|
||||
* @method static self manche()
|
||||
* @method static self marne()
|
||||
* @method static self hautemarne()
|
||||
* @method static self mayenne()
|
||||
* @method static self meurtheetmoselle()
|
||||
* @method static self meuse()
|
||||
* @method static self morbihan()
|
||||
* @method static self moselle()
|
||||
* @method static self nievre()
|
||||
* @method static self nord()
|
||||
* @method static self oise()
|
||||
* @method static self orne()
|
||||
* @method static self pasdecalais()
|
||||
* @method static self puydedome()
|
||||
* @method static self pyreneesatlantiques()
|
||||
* @method static self hautespyrenees()
|
||||
* @method static self pyreneesorientales()
|
||||
* @method static self basrhin()
|
||||
* @method static self hautrhin()
|
||||
* @method static self rhone()
|
||||
* @method static self hautesaone()
|
||||
* @method static self saoneetloire()
|
||||
* @method static self sarthe()
|
||||
* @method static self savoie()
|
||||
* @method static self hautesavoie()
|
||||
* @method static self paris()
|
||||
* @method static self seinemaritime()
|
||||
* @method static self seineetmarne()
|
||||
* @method static self yvelines()
|
||||
* @method static self deuxsevres()
|
||||
* @method static self somme()
|
||||
* @method static self tarn()
|
||||
* @method static self tarnetgaronne()
|
||||
* @method static self var()
|
||||
* @method static self vaucluse()
|
||||
* @method static self vendee()
|
||||
* @method static self vienne()
|
||||
* @method static self hautevienne()
|
||||
* @method static self vosges()
|
||||
* @method static self yonne()
|
||||
* @method static self territoiredebelfort()
|
||||
* @method static self essonne()
|
||||
* @method static self hautsdeseine()
|
||||
* @method static self seinesaintdenis()
|
||||
* @method static self valdemarne()
|
||||
* @method static self valdoise()
|
||||
* @method static self guadeloupeMartinique()
|
||||
* @method static self guyane()
|
||||
* @method static self lareunion()
|
||||
*/
|
||||
final class DepartaimantVintage extends Departaimant
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'ain' => '01',
|
||||
'aisne' => '02',
|
||||
'allier' => '03',
|
||||
'alpesdehauteprovence' => '04',
|
||||
'hautesalpes' => '05',
|
||||
'alpesmaritimes' => '06',
|
||||
'ardeche' => '07',
|
||||
'ardennes' => '08',
|
||||
'ariege' => '09',
|
||||
'aube' => '10',
|
||||
'aude' => '11',
|
||||
'aveyron' => '12',
|
||||
'bouchesdurhone' => '13',
|
||||
'calvados' => '14',
|
||||
'cantal' => '15',
|
||||
'charente' => '16',
|
||||
'charentemaritime' => '17',
|
||||
'cher' => '18',
|
||||
'correze' => '19',
|
||||
'corsedusud' => '2A',
|
||||
'hautecorse' => '2B',
|
||||
'cotedor' => '21',
|
||||
'cotesdarmor' => '22',
|
||||
'creuse' => '23',
|
||||
'dordogne' => '24',
|
||||
'doubs' => '25',
|
||||
'drome' => '26',
|
||||
'eure' => '27',
|
||||
'eureetloir' => '28',
|
||||
'finistere' => '29',
|
||||
'gard' => '30',
|
||||
'hautegaronne' => '31',
|
||||
'gers' => '32',
|
||||
'gironde' => '33',
|
||||
'herault' => '34',
|
||||
'illeetvilaine' => '35',
|
||||
'indre' => '36',
|
||||
'indreetloire' => '37',
|
||||
'isere' => '38',
|
||||
'jura' => '39',
|
||||
'landes' => '40',
|
||||
'loiretcher' => '41',
|
||||
'loire' => '42',
|
||||
'hauteloire' => '43',
|
||||
'loireatlantique' => '44',
|
||||
'loiret' => '45',
|
||||
'lot' => '46',
|
||||
'lotetgaronne' => '47',
|
||||
'lozere' => '48',
|
||||
'maineetloire' => '49',
|
||||
'manche' => '50',
|
||||
'marne' => '51',
|
||||
'hautemarne' => '52',
|
||||
'mayenne' => '53',
|
||||
'meurtheetmoselle' => '54',
|
||||
'meuse' => '55',
|
||||
'morbihan' => '56',
|
||||
'moselle' => '57',
|
||||
'nievre' => '58',
|
||||
'nord' => '59',
|
||||
'oise' => '60',
|
||||
'orne' => '61',
|
||||
'pasdecalais' => '62',
|
||||
'puydedome' => '63',
|
||||
'pyreneesatlantiques' => '64',
|
||||
'hautespyrenees' => '65',
|
||||
'pyreneesorientales' => '66',
|
||||
'basrhin' => '67',
|
||||
'hautrhin' => '68',
|
||||
'rhone' => '69',
|
||||
'hautesaone' => '70',
|
||||
'saoneetloire' => '71',
|
||||
'sarthe' => '72',
|
||||
'savoie' => '73',
|
||||
'hautesavoie' => '74',
|
||||
'paris' => '75',
|
||||
'seinemaritime' => '76',
|
||||
'seineetmarne' => '77',
|
||||
'yvelines' => '78',
|
||||
'deuxsevres' => '79',
|
||||
'somme' => '80',
|
||||
'tarn' => '81',
|
||||
'tarnetgaronne' => '82',
|
||||
'var' => '83',
|
||||
'vaucluse' => '84',
|
||||
'vendee' => '85',
|
||||
'vienne' => '86',
|
||||
'hautevienne' => '87',
|
||||
'vosges' => '88',
|
||||
'yonne' => '89',
|
||||
'territoiredebelfort' => '90',
|
||||
'essonne' => '91',
|
||||
'hautsdeseine' => '92',
|
||||
'seinesaintdenis' => '93',
|
||||
'valdemarne' => '94',
|
||||
'valdoise' => '95',
|
||||
'guadeloupeMartinique' => '971/972',
|
||||
'guyane' => '973',
|
||||
'lareunion' => '974',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'ain' => 'Ain',
|
||||
'aisne' => 'Aisne',
|
||||
'allier' => 'Allier',
|
||||
'alpesdehauteprovence' => 'Alpes-de-Haute-Provence',
|
||||
'hautesalpes' => 'Hautes-alpes',
|
||||
'alpesmaritimes' => 'Alpes-maritimes',
|
||||
'ardeche' => 'Ardèche',
|
||||
'ardennes' => 'Ardennes',
|
||||
'ariege' => 'Ariège',
|
||||
'aube' => 'Aube',
|
||||
'aude' => 'Aude',
|
||||
'aveyron' => 'Aveyron',
|
||||
'bouchesdurhone' => 'Bouches-du-Rhône',
|
||||
'calvados' => 'Calvados',
|
||||
'cantal' => 'Cantal',
|
||||
'charente' => 'Charente',
|
||||
'charentemaritime' => 'Charente-maritime',
|
||||
'cher' => 'Cher',
|
||||
'correze' => 'Corrèze',
|
||||
'corsedusud' => 'Corse-du-sud',
|
||||
'hautecorse' => 'Haute-Corse',
|
||||
'cotedor' => 'Côte-d\'Or',
|
||||
'cotesdarmor' => 'Côtes-d\'Armor',
|
||||
'creuse' => 'Creuse',
|
||||
'dordogne' => 'Dordogne',
|
||||
'doubs' => 'Doubs',
|
||||
'drome' => 'Drôme',
|
||||
'eure' => 'Eure',
|
||||
'eureetloir' => 'Eure-et-loir',
|
||||
'finistere' => 'Finistère',
|
||||
'gard' => 'Gard',
|
||||
'hautegaronne' => 'Haute-garonne',
|
||||
'gers' => 'Gers',
|
||||
'gironde' => 'Gironde',
|
||||
'herault' => 'Hérault',
|
||||
'illeetvilaine' => 'Ille-et-vilaine',
|
||||
'indre' => 'Indre',
|
||||
'indreetloire' => 'Indre-et-loire',
|
||||
'isere' => 'Isère',
|
||||
'jura' => 'Jura',
|
||||
'landes' => 'Landes',
|
||||
'loiretcher' => 'Loir-et-cher',
|
||||
'loire' => 'Loire',
|
||||
'hauteloire' => 'Haute-loire',
|
||||
'loireatlantique' => 'Loire-atlantique',
|
||||
'loiret' => 'Loiret',
|
||||
'lot' => 'Lot',
|
||||
'lotetgaronne' => 'Lot-et-garonne',
|
||||
'lozere' => 'Lozère',
|
||||
'maineetloire' => 'Maine-et-loire',
|
||||
'manche' => 'Manche',
|
||||
'marne' => 'Marne',
|
||||
'hautemarne' => 'Haute-marne',
|
||||
'mayenne' => 'Mayenne',
|
||||
'meurtheetmoselle' => 'Meurthe-et-moselle',
|
||||
'meuse' => 'Meuse',
|
||||
'morbihan' => 'Morbihan',
|
||||
'moselle' => 'Moselle',
|
||||
'nievre' => 'Nièvre',
|
||||
'nord' => 'Nord',
|
||||
'oise' => 'Oise',
|
||||
'orne' => 'Orne',
|
||||
'pasdecalais' => 'Pas-de-calais',
|
||||
'puydedome' => 'Puy-de-dôme',
|
||||
'pyreneesatlantiques' => 'Pyrénées-atlantiques',
|
||||
'hautespyrenees' => 'Hautes-Pyrénées',
|
||||
'pyreneesorientales' => 'Pyrénées-orientales',
|
||||
'basrhin' => 'Bas-rhin',
|
||||
'hautrhin' => 'Haut-rhin',
|
||||
'rhone' => 'Rhône',
|
||||
'hautesaone' => 'Haute-saône',
|
||||
'saoneetloire' => 'Saône-et-loire',
|
||||
'sarthe' => 'Sarthe',
|
||||
'savoie' => 'Savoie',
|
||||
'hautesavoie' => 'Haute-savoie',
|
||||
'paris' => 'Paris',
|
||||
'seinemaritime' => 'Seine-maritime',
|
||||
'seineetmarne' => 'Seine-et-marne',
|
||||
'yvelines' => 'Yvelines',
|
||||
'deuxsevres' => 'Deux-sèvres',
|
||||
'somme' => 'Somme',
|
||||
'tarn' => 'Tarn',
|
||||
'tarnetgaronne' => 'Tarn-et-Garonne',
|
||||
'var' => 'Var',
|
||||
'vaucluse' => 'Vaucluse',
|
||||
'vendee' => 'Vendée',
|
||||
'vienne' => 'Vienne',
|
||||
'hautevienne' => 'Haute-vienne',
|
||||
'vosges' => 'Vosges',
|
||||
'yonne' => 'Yonne',
|
||||
'territoiredebelfort' => 'Territoire de belfort',
|
||||
'essonne' => 'Essonne',
|
||||
'hautsdeseine' => 'Hauts-de-seine',
|
||||
'seinesaintdenis' => 'Seine-Saint-Denis',
|
||||
'valdemarne' => 'Val-de-marne',
|
||||
'valdoise' => 'Val-d\'Oise',
|
||||
'guadeloupeMartinique' => 'Guadeloupe et Martinique',
|
||||
'guyane' => 'Guyane',
|
||||
'lareunion' => 'La réunion'
|
||||
];
|
||||
}
|
||||
}
|
||||
23
app/Enums/Departaimants/DepartaimantCollectionType.php
Normal file
23
app/Enums/Departaimants/DepartaimantCollectionType.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Departaimants;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum DepartaimantCollectionType: string
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case vintage = '1';
|
||||
case current = '2';
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::vintage->name => 'Collection Vintage',
|
||||
self::current->name => 'Collection Actuelle',
|
||||
];
|
||||
}
|
||||
207
app/Enums/Departaimants/DepartaimantCurrent.php
Normal file
207
app/Enums/Departaimants/DepartaimantCurrent.php
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Departaimants;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum DepartaimantCurrent: string implements IDepartaimant
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case ain = '01';
|
||||
case aisne = '02';
|
||||
case allier = '03';
|
||||
case alpesdehauteprovence = '04';
|
||||
case hautesalpes = '05';
|
||||
case alpesmaritimes = '06';
|
||||
case ardeche = '07';
|
||||
case ardennes = '08';
|
||||
case ariege = '09';
|
||||
case aube = '10';
|
||||
case aude = '11';
|
||||
case aveyron = '12';
|
||||
case bouchesdurhone = '13';
|
||||
case calvados = '14';
|
||||
case cantal = '15';
|
||||
case charente = '16';
|
||||
case charentemaritime = '17';
|
||||
case cher = '18';
|
||||
case correze = '19';
|
||||
case corsedusud = '2A';
|
||||
case hautecorse = '2B';
|
||||
case cotedor = '21';
|
||||
case cotesdarmor = '22';
|
||||
case creuse = '23';
|
||||
case dordogne = '24';
|
||||
case doubs = '25';
|
||||
case drome = '26';
|
||||
case eure = '27';
|
||||
case eureetloir = '28';
|
||||
case finistere = '29';
|
||||
case gard = '30';
|
||||
case hautegaronne = '31';
|
||||
case gers = '32';
|
||||
case gironde = '33';
|
||||
case herault = '34';
|
||||
case illeetvilaine = '35';
|
||||
case indre = '36';
|
||||
case indreetloire = '37';
|
||||
case isere = '38';
|
||||
case jura = '39';
|
||||
case landes = '40';
|
||||
case loiretcher = '41';
|
||||
case loire = '42';
|
||||
case hauteloire = '43';
|
||||
case loireatlantique = '44';
|
||||
case loiret = '45';
|
||||
case lot = '46';
|
||||
case lotetgaronne = '47';
|
||||
case lozere = '48';
|
||||
case maineetloire = '49';
|
||||
case manche = '50';
|
||||
case marne = '51';
|
||||
case hautemarne = '52';
|
||||
case mayenne = '53';
|
||||
case meurtheetmoselle = '54';
|
||||
case meuse = '55';
|
||||
case morbihan = '56';
|
||||
case moselle = '57';
|
||||
case nievre = '58';
|
||||
case nord = '59';
|
||||
case oise = '60';
|
||||
case orne = '61';
|
||||
case pasdecalais = '62';
|
||||
case puydedome = '63';
|
||||
case pyreneesatlantiques = '64';
|
||||
case hautespyrenees = '65';
|
||||
case pyreneesorientales = '66';
|
||||
case basrhin = '67';
|
||||
case hautrhin = '68';
|
||||
case rhone = '69';
|
||||
case saoneetloire = '71';
|
||||
case sarthe = '72';
|
||||
case savoie = '73';
|
||||
case hautesavoie = '74';
|
||||
case seinemaritime = '76';
|
||||
case seineetmarne = '77';
|
||||
case deuxsevres = '79';
|
||||
case somme = '80';
|
||||
case tarn = '81';
|
||||
case tarnetgaronne = '82';
|
||||
case var = '83';
|
||||
case vaucluse = '84';
|
||||
case vendee = '85';
|
||||
case vienne = '86';
|
||||
case hautevienne = '87';
|
||||
case vosges = '88';
|
||||
case yonne = '89';
|
||||
case territoiredebelfort = '90';
|
||||
case essonne = '91';
|
||||
case guadeloupe = '971';
|
||||
case martinique = '972';
|
||||
case guyane = '973';
|
||||
case lareunion = '974';
|
||||
case mayotte = '976';
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::ain->name => 'Ain',
|
||||
self::aisne->name => 'Aisne',
|
||||
self::allier->name => 'Allier',
|
||||
self::alpesdehauteprovence->name => 'Alpes-de-Haute-Provence',
|
||||
self::hautesalpes->name => 'Hautes-alpes',
|
||||
self::alpesmaritimes->name => 'Alpes-maritimes',
|
||||
self::ardeche->name => 'Ardèche',
|
||||
self::ardennes->name => 'Ardennes',
|
||||
self::ariege->name => 'Ariège',
|
||||
self::aube->name => 'Aube',
|
||||
self::aude->name => 'Aude',
|
||||
self::aveyron->name => 'Aveyron',
|
||||
self::bouchesdurhone->name => 'Bouches-du-Rhône',
|
||||
self::calvados->name => 'Calvados',
|
||||
self::cantal->name => 'Cantal',
|
||||
self::charente->name => 'Charente',
|
||||
self::charentemaritime->name => 'Charente-maritime',
|
||||
self::cher->name => 'Cher',
|
||||
self::correze->name => 'Corrèze',
|
||||
self::corsedusud->name => 'Corse-du-sud',
|
||||
self::hautecorse->name => 'Haute-Corse',
|
||||
self::cotedor->name => 'Côte-d\'Or',
|
||||
self::cotesdarmor->name => 'Côtes-d\'Armor',
|
||||
self::creuse->name => 'Creuse',
|
||||
self::dordogne->name => 'Dordogne',
|
||||
self::doubs->name => 'Doubs',
|
||||
self::drome->name => 'Drôme',
|
||||
self::eure->name => 'Eure',
|
||||
self::eureetloir->name => 'Eure-et-loir',
|
||||
self::finistere->name => 'Finistère',
|
||||
self::gard->name => 'Gard',
|
||||
self::hautegaronne->name => 'Haute-garonne',
|
||||
self::gers->name => 'Gers',
|
||||
self::gironde->name => 'Gironde',
|
||||
self::herault->name => 'Hérault',
|
||||
self::illeetvilaine->name => 'Ille-et-vilaine',
|
||||
self::indre->name => 'Indre',
|
||||
self::indreetloire->name => 'Indre-et-loire',
|
||||
self::isere->name => 'Isère',
|
||||
self::jura->name => 'Jura',
|
||||
self::landes->name => 'Landes',
|
||||
self::loiretcher->name => 'Loir-et-cher',
|
||||
self::loire->name => 'Loire',
|
||||
self::hauteloire->name => 'Haute-loire',
|
||||
self::loireatlantique->name => 'Loire-atlantique',
|
||||
self::loiret->name => 'Loiret',
|
||||
self::lot->name => 'Lot',
|
||||
self::lotetgaronne->name => 'Lot-et-garonne',
|
||||
self::lozere->name => 'Lozère',
|
||||
self::maineetloire->name => 'Maine-et-loire',
|
||||
self::manche->name => 'Manche',
|
||||
self::marne->name => 'Marne',
|
||||
self::hautemarne->name => 'Haute-marne',
|
||||
self::mayenne->name => 'Mayenne',
|
||||
self::meurtheetmoselle->name => 'Meurthe-et-moselle',
|
||||
self::meuse->name => 'Meuse',
|
||||
self::morbihan->name => 'Morbihan',
|
||||
self::moselle->name => 'Moselle',
|
||||
self::nievre->name => 'Nièvre',
|
||||
self::nord->name => 'Nord',
|
||||
self::oise->name => 'Oise',
|
||||
self::orne->name => 'Orne',
|
||||
self::pasdecalais->name => 'Pas-de-calais',
|
||||
self::puydedome->name => 'Puy-de-dôme',
|
||||
self::pyreneesatlantiques->name => 'Pyrénées-atlantiques',
|
||||
self::hautespyrenees->name => 'Hautes-Pyrénées',
|
||||
self::pyreneesorientales->name => 'Pyrénées-orientales',
|
||||
self::basrhin->name => 'Bas-rhin',
|
||||
self::hautrhin->name => 'Haut-rhin',
|
||||
self::rhone->name => 'Rhône',
|
||||
self::saoneetloire->name => 'Saône-et-loire',
|
||||
self::sarthe->name => 'Sarthe',
|
||||
self::savoie->name => 'Savoie',
|
||||
self::hautesavoie->name => 'Haute-savoie',
|
||||
self::seinemaritime->name => 'Seine-maritime',
|
||||
self::seineetmarne->name => 'Seine-et-marne',
|
||||
self::deuxsevres->name => 'Deux-sèvres',
|
||||
self::somme->name => 'Somme',
|
||||
self::tarn->name => 'Tarn',
|
||||
self::tarnetgaronne->name => 'Tarn-et-Garonne',
|
||||
self::var->name => 'Var',
|
||||
self::vaucluse->name => 'Vaucluse',
|
||||
self::vendee->name => 'Vendée',
|
||||
self::vienne->name => 'Vienne',
|
||||
self::hautevienne->name => 'Haute-vienne',
|
||||
self::vosges->name => 'Vosges',
|
||||
self::yonne->name => 'Yonne',
|
||||
self::territoiredebelfort->name => 'Territoire de belfort',
|
||||
self::essonne->name => 'Essonne',
|
||||
self::guadeloupe->name => 'Guadeloupe',
|
||||
self::martinique->name => 'Martinique',
|
||||
self::guyane->name => 'Guyane',
|
||||
self::lareunion->name => 'La réunion',
|
||||
self::mayotte->name => 'Mayotte'
|
||||
];
|
||||
}
|
||||
27
app/Enums/Departaimants/DepartaimantStatus.php
Normal file
27
app/Enums/Departaimants/DepartaimantStatus.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Departaimants;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum DepartaimantStatus: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case none = 0;
|
||||
case has = 1;
|
||||
case gives = 2;
|
||||
case wants = 3;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::none->name => 'Non possédé',
|
||||
self::has->name => 'Mes magnets',
|
||||
self::wants->name => 'Je cherche un magnet',
|
||||
self::gives->name => 'J\'échange un magnet',
|
||||
];
|
||||
}
|
||||
203
app/Enums/Departaimants/DepartaimantVintage.php
Normal file
203
app/Enums/Departaimants/DepartaimantVintage.php
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Departaimants;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum DepartaimantVintage: string implements IDepartaimant
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case ain = '01';
|
||||
case aisne = '02';
|
||||
case allier = '03';
|
||||
case alpesdehauteprovence = '04';
|
||||
case hautesalpes = '05';
|
||||
case alpesmaritimes = '06';
|
||||
case ardeche = '07';
|
||||
case ardennes = '08';
|
||||
case ariege = '09';
|
||||
case aube = '10';
|
||||
case aude = '11';
|
||||
case aveyron = '12';
|
||||
case bouchesdurhone = '13';
|
||||
case calvados = '14';
|
||||
case cantal = '15';
|
||||
case charente = '16';
|
||||
case charentemaritime = '17';
|
||||
case cher = '18';
|
||||
case correze = '19';
|
||||
case corsedusud = '2A';
|
||||
case hautecorse = '2B';
|
||||
case cotedor = '21';
|
||||
case cotesdarmor = '22';
|
||||
case creuse = '23';
|
||||
case dordogne = '24';
|
||||
case doubs = '25';
|
||||
case drome = '26';
|
||||
case eure = '27';
|
||||
case eureetloir = '28';
|
||||
case finistere = '29';
|
||||
case gard = '30';
|
||||
case hautegaronne = '31';
|
||||
case gers = '32';
|
||||
case gironde = '33';
|
||||
case herault = '34';
|
||||
case illeetvilaine = '35';
|
||||
case indre = '36';
|
||||
case indreetloire = '37';
|
||||
case isere = '38';
|
||||
case jura = '39';
|
||||
case landes = '40';
|
||||
case loiretcher = '41';
|
||||
case loire = '42';
|
||||
case hauteloire = '43';
|
||||
case loireatlantique = '44';
|
||||
case loiret = '45';
|
||||
case lot = '46';
|
||||
case lotetgaronne = '47';
|
||||
case lozere = '48';
|
||||
case maineetloire = '49';
|
||||
case manche = '50';
|
||||
case marne = '51';
|
||||
case hautemarne = '52';
|
||||
case mayenne = '53';
|
||||
case meurtheetmoselle = '54';
|
||||
case meuse = '55';
|
||||
case morbihan = '56';
|
||||
case moselle = '57';
|
||||
case nievre = '58';
|
||||
case nord = '59';
|
||||
case oise = '60';
|
||||
case orne = '61';
|
||||
case pasdecalais = '62';
|
||||
case puydedome = '63';
|
||||
case pyreneesatlantiques = '64';
|
||||
case hautespyrenees = '65';
|
||||
case pyreneesorientales = '66';
|
||||
case basrhin = '67';
|
||||
case hautrhin = '68';
|
||||
case rhone = '69';
|
||||
case saoneetloire = '71';
|
||||
case sarthe = '72';
|
||||
case savoie = '73';
|
||||
case hautesavoie = '74';
|
||||
case seinemaritime = '76';
|
||||
case seineetmarne = '77';
|
||||
case deuxsevres = '79';
|
||||
case somme = '80';
|
||||
case tarn = '81';
|
||||
case tarnetgaronne = '82';
|
||||
case var = '83';
|
||||
case vaucluse = '84';
|
||||
case vendee = '85';
|
||||
case vienne = '86';
|
||||
case hautevienne = '87';
|
||||
case vosges = '88';
|
||||
case yonne = '89';
|
||||
case territoiredebelfort = '90';
|
||||
case essonne = '91';
|
||||
case guadeloupeMartinique = '971/972';
|
||||
case guyane = '973';
|
||||
case lareunion = '974';
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::ain->name => 'Ain',
|
||||
self::aisne->name => 'Aisne',
|
||||
self::allier->name => 'Allier',
|
||||
self::alpesdehauteprovence->name => 'Alpes-de-Haute-Provence',
|
||||
self::hautesalpes->name => 'Hautes-alpes',
|
||||
self::alpesmaritimes->name => 'Alpes-maritimes',
|
||||
self::ardeche->name => 'Ardèche',
|
||||
self::ardennes->name => 'Ardennes',
|
||||
self::ariege->name => 'Ariège',
|
||||
self::aube->name => 'Aube',
|
||||
self::aude->name => 'Aude',
|
||||
self::aveyron->name => 'Aveyron',
|
||||
self::bouchesdurhone->name => 'Bouches-du-Rhône',
|
||||
self::calvados->name => 'Calvados',
|
||||
self::cantal->name => 'Cantal',
|
||||
self::charente->name => 'Charente',
|
||||
self::charentemaritime->name => 'Charente-maritime',
|
||||
self::cher->name => 'Cher',
|
||||
self::correze->name => 'Corrèze',
|
||||
self::corsedusud->name => 'Corse-du-sud',
|
||||
self::hautecorse->name => 'Haute-Corse',
|
||||
self::cotedor->name => 'Côte-d\'Or',
|
||||
self::cotesdarmor->name => 'Côtes-d\'Armor',
|
||||
self::creuse->name => 'Creuse',
|
||||
self::dordogne->name => 'Dordogne',
|
||||
self::doubs->name => 'Doubs',
|
||||
self::drome->name => 'Drôme',
|
||||
self::eure->name => 'Eure',
|
||||
self::eureetloir->name => 'Eure-et-loir',
|
||||
self::finistere->name => 'Finistère',
|
||||
self::gard->name => 'Gard',
|
||||
self::hautegaronne->name => 'Haute-garonne',
|
||||
self::gers->name => 'Gers',
|
||||
self::gironde->name => 'Gironde',
|
||||
self::herault->name => 'Hérault',
|
||||
self::illeetvilaine->name => 'Ille-et-vilaine',
|
||||
self::indre->name => 'Indre',
|
||||
self::indreetloire->name => 'Indre-et-loire',
|
||||
self::isere->name => 'Isère',
|
||||
self::jura->name => 'Jura',
|
||||
self::landes->name => 'Landes',
|
||||
self::loiretcher->name => 'Loir-et-cher',
|
||||
self::loire->name => 'Loire',
|
||||
self::hauteloire->name => 'Haute-loire',
|
||||
self::loireatlantique->name => 'Loire-atlantique',
|
||||
self::loiret->name => 'Loiret',
|
||||
self::lot->name => 'Lot',
|
||||
self::lotetgaronne->name => 'Lot-et-garonne',
|
||||
self::lozere->name => 'Lozère',
|
||||
self::maineetloire->name => 'Maine-et-loire',
|
||||
self::manche->name => 'Manche',
|
||||
self::marne->name => 'Marne',
|
||||
self::hautemarne->name => 'Haute-marne',
|
||||
self::mayenne->name => 'Mayenne',
|
||||
self::meurtheetmoselle->name => 'Meurthe-et-moselle',
|
||||
self::meuse->name => 'Meuse',
|
||||
self::morbihan->name => 'Morbihan',
|
||||
self::moselle->name => 'Moselle',
|
||||
self::nievre->name => 'Nièvre',
|
||||
self::nord->name => 'Nord',
|
||||
self::oise->name => 'Oise',
|
||||
self::orne->name => 'Orne',
|
||||
self::pasdecalais->name => 'Pas-de-calais',
|
||||
self::puydedome->name => 'Puy-de-dôme',
|
||||
self::pyreneesatlantiques->name => 'Pyrénées-atlantiques',
|
||||
self::hautespyrenees->name => 'Hautes-Pyrénées',
|
||||
self::pyreneesorientales->name => 'Pyrénées-orientales',
|
||||
self::basrhin->name => 'Bas-rhin',
|
||||
self::hautrhin->name => 'Haut-rhin',
|
||||
self::rhone->name => 'Rhône',
|
||||
self::saoneetloire->name => 'Saône-et-loire',
|
||||
self::sarthe->name => 'Sarthe',
|
||||
self::savoie->name => 'Savoie',
|
||||
self::hautesavoie->name => 'Haute-savoie',
|
||||
self::seinemaritime->name => 'Seine-maritime',
|
||||
self::seineetmarne->name => 'Seine-et-marne',
|
||||
self::deuxsevres->name => 'Deux-sèvres',
|
||||
self::somme->name => 'Somme',
|
||||
self::tarn->name => 'Tarn',
|
||||
self::tarnetgaronne->name => 'Tarn-et-Garonne',
|
||||
self::var->name => 'Var',
|
||||
self::vaucluse->name => 'Vaucluse',
|
||||
self::vendee->name => 'Vendée',
|
||||
self::vienne->name => 'Vienne',
|
||||
self::hautevienne->name => 'Haute-vienne',
|
||||
self::vosges->name => 'Vosges',
|
||||
self::yonne->name => 'Yonne',
|
||||
self::territoiredebelfort->name => 'Territoire de belfort',
|
||||
self::essonne->name => 'Essonne',
|
||||
self::guadeloupeMartinique->name => 'Guadeloupe et Martinique',
|
||||
self::guyane->name => 'Guyane',
|
||||
self::lareunion->name => 'La réunion'
|
||||
];
|
||||
}
|
||||
13
app/Enums/Departaimants/IDepartaimant.php
Normal file
13
app/Enums/Departaimants/IDepartaimant.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Departaimants;
|
||||
|
||||
interface IDepartaimant
|
||||
{
|
||||
/**
|
||||
* Get enum value.
|
||||
*
|
||||
* @return string|integer
|
||||
*/
|
||||
public function value(): string|int;
|
||||
}
|
||||
221
app/Enums/Department.php
Normal file
221
app/Enums/Department.php
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum Department: string
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case ain = '01';
|
||||
case aisne = '02';
|
||||
case allier = '03';
|
||||
case alpesdehauteprovence = '04';
|
||||
case hautesalpes = '05';
|
||||
case alpesmaritimes = '06';
|
||||
case ardeche = '07';
|
||||
case ardennes = '08';
|
||||
case ariege = '09';
|
||||
case aube = '10';
|
||||
case aude = '11';
|
||||
case aveyron = '12';
|
||||
case bouchesdurhone = '13';
|
||||
case calvados = '14';
|
||||
case cantal = '15';
|
||||
case charente = '16';
|
||||
case charentemaritime = '17';
|
||||
case cher = '18';
|
||||
case correze = '19';
|
||||
case corsedusud = '2A';
|
||||
case hautecorse = '2B';
|
||||
case cotedor = '21';
|
||||
case cotesdarmor = '22';
|
||||
case creuse = '23';
|
||||
case dordogne = '24';
|
||||
case doubs = '25';
|
||||
case drome = '26';
|
||||
case eure = '27';
|
||||
case eureetloir = '28';
|
||||
case finistere = '29';
|
||||
case gard = '30';
|
||||
case hautegaronne = '31';
|
||||
case gers = '32';
|
||||
case gironde = '33';
|
||||
case herault = '34';
|
||||
case illeetvilaine = '35';
|
||||
case indre = '36';
|
||||
case indreetloire = '37';
|
||||
case isere = '38';
|
||||
case jura = '39';
|
||||
case landes = '40';
|
||||
case loiretcher = '41';
|
||||
case loire = '42';
|
||||
case hauteloire = '43';
|
||||
case loireatlantique = '44';
|
||||
case loiret = '45';
|
||||
case lot = '46';
|
||||
case lotetgaronne = '47';
|
||||
case lozere = '48';
|
||||
case maineetloire = '49';
|
||||
case manche = '50';
|
||||
case marne = '51';
|
||||
case hautemarne = '52';
|
||||
case mayenne = '53';
|
||||
case meurtheetmoselle = '54';
|
||||
case meuse = '55';
|
||||
case morbihan = '56';
|
||||
case moselle = '57';
|
||||
case nievre = '58';
|
||||
case nord = '59';
|
||||
case oise = '60';
|
||||
case orne = '61';
|
||||
case pasdecalais = '62';
|
||||
case puydedome = '63';
|
||||
case pyreneesatlantiques = '64';
|
||||
case hautespyrenees = '65';
|
||||
case pyreneesorientales = '66';
|
||||
case basrhin = '67';
|
||||
case hautrhin = '68';
|
||||
case rhone = '69';
|
||||
case hautesaone = '70';
|
||||
case saoneetloire = '71';
|
||||
case sarthe = '72';
|
||||
case savoie = '73';
|
||||
case hautesavoie = '74';
|
||||
case paris = '75';
|
||||
case seinemaritime = '76';
|
||||
case seineetmarne = '77';
|
||||
case yvelines = '78';
|
||||
case deuxsevres = '79';
|
||||
case somme = '80';
|
||||
case tarn = '81';
|
||||
case tarnetgaronne = '82';
|
||||
case var = '83';
|
||||
case vaucluse = '84';
|
||||
case vendee = '85';
|
||||
case vienne = '86';
|
||||
case hautevienne = '87';
|
||||
case vosges = '88';
|
||||
case yonne = '89';
|
||||
case territoiredebelfort = '90';
|
||||
case essonne = '91';
|
||||
case hautsdeseine = '92';
|
||||
case seinesaintdenis = '93';
|
||||
case valdemarne = '94';
|
||||
case valdoise = '95';
|
||||
case guadeloupe = '971';
|
||||
case martinique = '972';
|
||||
case guyane = '973';
|
||||
case lareunion = '974';
|
||||
case mayotte = '976';
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::ain->name => 'Ain',
|
||||
self::aisne->name => 'Aisne',
|
||||
self::allier->name => 'Allier',
|
||||
self::alpesdehauteprovence->name => 'Alpes-de-Haute-Provence',
|
||||
self::hautesalpes->name => 'Hautes-alpes',
|
||||
self::alpesmaritimes->name => 'Alpes-maritimes',
|
||||
self::ardeche->name => 'Ardèche',
|
||||
self::ardennes->name => 'Ardennes',
|
||||
self::ariege->name => 'Ariège',
|
||||
self::aube->name => 'Aube',
|
||||
self::aude->name => 'Aude',
|
||||
self::aveyron->name => 'Aveyron',
|
||||
self::bouchesdurhone->name => 'Bouches-du-Rhône',
|
||||
self::calvados->name => 'Calvados',
|
||||
self::cantal->name => 'Cantal',
|
||||
self::charente->name => 'Charente',
|
||||
self::charentemaritime->name => 'Charente-maritime',
|
||||
self::cher->name => 'Cher',
|
||||
self::correze->name => 'Corrèze',
|
||||
self::corsedusud->name => 'Corse-du-sud',
|
||||
self::hautecorse->name => 'Haute-Corse',
|
||||
self::cotedor->name => 'Côte-d\'Or',
|
||||
self::cotesdarmor->name => 'Côtes-d\'Armor',
|
||||
self::creuse->name => 'Creuse',
|
||||
self::dordogne->name => 'Dordogne',
|
||||
self::doubs->name => 'Doubs',
|
||||
self::drome->name => 'Drôme',
|
||||
self::eure->name => 'Eure',
|
||||
self::eureetloir->name => 'Eure-et-loir',
|
||||
self::finistere->name => 'Finistère',
|
||||
self::gard->name => 'Gard',
|
||||
self::hautegaronne->name => 'Haute-garonne',
|
||||
self::gers->name => 'Gers',
|
||||
self::gironde->name => 'Gironde',
|
||||
self::herault->name => 'Hérault',
|
||||
self::illeetvilaine->name => 'Ille-et-vilaine',
|
||||
self::indre->name => 'Indre',
|
||||
self::indreetloire->name => 'Indre-et-loire',
|
||||
self::isere->name => 'Isère',
|
||||
self::jura->name => 'Jura',
|
||||
self::landes->name => 'Landes',
|
||||
self::loiretcher->name => 'Loir-et-cher',
|
||||
self::loire->name => 'Loire',
|
||||
self::hauteloire->name => 'Haute-loire',
|
||||
self::loireatlantique->name => 'Loire-atlantique',
|
||||
self::loiret->name => 'Loiret',
|
||||
self::lot->name => 'Lot',
|
||||
self::lotetgaronne->name => 'Lot-et-garonne',
|
||||
self::lozere->name => 'Lozère',
|
||||
self::maineetloire->name => 'Maine-et-loire',
|
||||
self::manche->name => 'Manche',
|
||||
self::marne->name => 'Marne',
|
||||
self::hautemarne->name => 'Haute-marne',
|
||||
self::mayenne->name => 'Mayenne',
|
||||
self::meurtheetmoselle->name => 'Meurthe-et-moselle',
|
||||
self::meuse->name => 'Meuse',
|
||||
self::morbihan->name => 'Morbihan',
|
||||
self::moselle->name => 'Moselle',
|
||||
self::nievre->name => 'Nièvre',
|
||||
self::nord->name => 'Nord',
|
||||
self::oise->name => 'Oise',
|
||||
self::orne->name => 'Orne',
|
||||
self::pasdecalais->name => 'Pas-de-calais',
|
||||
self::puydedome->name => 'Puy-de-dôme',
|
||||
self::pyreneesatlantiques->name => 'Pyrénées-atlantiques',
|
||||
self::hautespyrenees->name => 'Hautes-Pyrénées',
|
||||
self::pyreneesorientales->name => 'Pyrénées-orientales',
|
||||
self::basrhin->name => 'Bas-rhin',
|
||||
self::hautrhin->name => 'Haut-rhin',
|
||||
self::rhone->name => 'Rhône',
|
||||
self::hautesaone->name => 'Haute-saône',
|
||||
self::saoneetloire->name => 'Saône-et-loire',
|
||||
self::sarthe->name => 'Sarthe',
|
||||
self::savoie->name => 'Savoie',
|
||||
self::hautesavoie->name => 'Haute-savoie',
|
||||
self::paris->name => 'Paris',
|
||||
self::seinemaritime->name => 'Seine-maritime',
|
||||
self::seineetmarne->name => 'Seine-et-marne',
|
||||
self::yvelines->name => 'Yvelines',
|
||||
self::deuxsevres->name => 'Deux-sèvres',
|
||||
self::somme->name => 'Somme',
|
||||
self::tarn->name => 'Tarn',
|
||||
self::tarnetgaronne->name => 'Tarn-et-Garonne',
|
||||
self::var->name => 'Var',
|
||||
self::vaucluse->name => 'Vaucluse',
|
||||
self::vendee->name => 'Vendée',
|
||||
self::vienne->name => 'Vienne',
|
||||
self::hautevienne->name => 'Haute-vienne',
|
||||
self::vosges->name => 'Vosges',
|
||||
self::yonne->name => 'Yonne',
|
||||
self::territoiredebelfort->name => 'Territoire de belfort',
|
||||
self::essonne->name => 'Essonne',
|
||||
self::hautsdeseine->name => 'Hauts-de-seine',
|
||||
self::seinesaintdenis->name => 'Seine-Saint-Denis',
|
||||
self::valdemarne->name => 'Val-de-marne',
|
||||
self::valdoise->name => 'Val-d\'Oise',
|
||||
self::guadeloupe->name => 'Guadeloupe',
|
||||
self::martinique->name => 'Martinique',
|
||||
self::guyane->name => 'Guyane',
|
||||
self::lareunion->name => 'La réunion',
|
||||
self::mayotte->name => 'Mayotte'
|
||||
];
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self none()
|
||||
* @method static self pending()
|
||||
* @method static self no()
|
||||
* @method static self yes()
|
||||
*/
|
||||
final class EleveurOcbStatus extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'none' => 0,
|
||||
'pending' => 1,
|
||||
'no' => 2,
|
||||
'yes' => 3
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'none' => 'Non',
|
||||
'pending' => 'En attente',
|
||||
'no' => 'Réfusé',
|
||||
'yes' => 'Valide'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self bloc1()
|
||||
* @method static self bloc2()
|
||||
* @method static self bloc3()
|
||||
* @method static self bloc4()
|
||||
* @method static self bloc5()
|
||||
*/
|
||||
final class EngagementBlocType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'bloc1' => 0,
|
||||
'bloc2' => 1,
|
||||
'bloc3' => 2,
|
||||
'bloc4' => 3,
|
||||
'bloc5' => 4
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'bloc1' => __('Bloc 1'),
|
||||
'bloc2' => __('Bloc 2 (mise en avant)'),
|
||||
'bloc3' => __('Bloc 3'),
|
||||
'bloc4' => __('Bloc 4 (bloc 3 inversé)'),
|
||||
'bloc5' => __('Bloc 5 (info horizontale)')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self header()
|
||||
* @method static self article()
|
||||
*/
|
||||
final class EngagementType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'header' => 0,
|
||||
'article' => 1
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'header' => __('Entête'),
|
||||
'article' => __('Article')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self portrait()
|
||||
* @method static self ocbbreeder()
|
||||
*/
|
||||
final class GMapDataType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'portrait' => 0,
|
||||
'ocbbreeder' => 1
|
||||
];
|
||||
}
|
||||
}
|
||||
27
app/Enums/Games/GameForAge.php
Normal file
27
app/Enums/Games/GameForAge.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Games;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum GameForAge: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case from3To6 = 3;
|
||||
case from6To9 = 6;
|
||||
case from9To12 = 9;
|
||||
case from12AndMore = 12;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::from3To6->name => '3 à 6 ans',
|
||||
self::from6To9->name => '6 à 9 ans',
|
||||
self::from9To12->name => '9 à 12 ans',
|
||||
self::from12AndMore->name => '12 ans et plus',
|
||||
];
|
||||
}
|
||||
128
app/Enums/Games/GamePointLevel.php
Normal file
128
app/Enums/Games/GamePointLevel.php
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Games;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
use Illuminate\Support\Facades\Vite;
|
||||
|
||||
enum GamePointLevel: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case egg = 1;
|
||||
case hatchedEgg = 2;
|
||||
case chick = 3;
|
||||
case hen = 4;
|
||||
case chicken = 5;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::egg->name => 'oeuf',
|
||||
self::hatchedEgg->name => 'oeuf éclos',
|
||||
self::chick->name => 'poussin',
|
||||
self::hen->name => 'poule',
|
||||
self::chicken->name => 'poulet',
|
||||
];
|
||||
|
||||
/**
|
||||
* Point levels definition.
|
||||
*/
|
||||
private const LEVELS = [
|
||||
self::egg->name => 0,
|
||||
self::hatchedEgg->name => 50,
|
||||
self::chick->name => 130,
|
||||
self::hen->name => 230,
|
||||
self::chicken->name => 1000,
|
||||
];
|
||||
|
||||
/**
|
||||
* Get Level
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function level(): int
|
||||
{
|
||||
return self::LEVELS[$this->name];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get picture
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function picture(): string
|
||||
{
|
||||
return Vite::asset("resources/assets/images/club/game-points/{$this->name()}.png");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get enum Levels
|
||||
*
|
||||
* @return array<integer>
|
||||
*/
|
||||
public static function toLevels(): array
|
||||
{
|
||||
return self::LEVELS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Level from point value
|
||||
*
|
||||
* @param integer $points
|
||||
* @return \App\Enums\Games\GamePointLevel
|
||||
*/
|
||||
public static function fromPoints(int $points): self
|
||||
{
|
||||
$levels = array_reverse(self::all());
|
||||
foreach ($levels as $level) {
|
||||
if ($points >= $level->level()) {
|
||||
return $level;
|
||||
}
|
||||
}
|
||||
// * This should not happen while egg level is 0
|
||||
return self::egg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Next Level
|
||||
*
|
||||
* @param integer $points
|
||||
* @return \App\Enums\Games\GamePointLevel|null
|
||||
*/
|
||||
public static function fromPointsNextLevel(int $points): self|null
|
||||
{
|
||||
$currentLevel = self::fromPoints($points);
|
||||
return collect(self::all())
|
||||
->filter(fn ($level) => $level->level() > $currentLevel->level())
|
||||
->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Percent from points
|
||||
*
|
||||
* @param integer $points
|
||||
* @return float
|
||||
*/
|
||||
public static function percentFromPoints(int $points): float
|
||||
{
|
||||
$levels = collect(self::toValues());
|
||||
$level = self::fromPoints($points);
|
||||
$nextLevel = self::fromPointsNextLevel($points);
|
||||
|
||||
if (!$nextLevel) {
|
||||
return 100;
|
||||
}
|
||||
|
||||
// * Bars between 2 levels
|
||||
$ratio = 4;
|
||||
$percentBetween2Levels = 100 / ($levels->count() - 1);
|
||||
$adjustment = $percentBetween2Levels *
|
||||
($nextLevel->level() - $points) / ($nextLevel->level() - $level->level());
|
||||
|
||||
return round((($level->value() * 100) / $levels->last()) + $percentBetween2Levels - $adjustment);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self actu()
|
||||
* @method static self rsm()
|
||||
* @method static self poultryPage()
|
||||
* @method static self breedingPage()
|
||||
*/
|
||||
final class GeneralConfigType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'actu' => 1,
|
||||
'rsm' => 2,
|
||||
'poultryPage' => 3,
|
||||
'breedingPage' => 4
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'actu' => __('Actualité'),
|
||||
'rsm' => __('RSM Block'),
|
||||
'poultryPage' => __('Pages Volaille'),
|
||||
'breedingPage' => __('Pages Élevage des volailles')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self exact()
|
||||
* @method static self commune()
|
||||
*/
|
||||
final class GeoType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'exact' => 0,
|
||||
'commune' => 1
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'exact' => __('Exacte'),
|
||||
'commune' => __('Code commune')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\HistoricalMilestones;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum HistoricalMilestonePosition: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case topLeft = 1;
|
||||
case topRight = 2;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::topLeft->name => 'Haut gauche',
|
||||
self::topRight->name => "Haut droit",
|
||||
];
|
||||
}
|
||||
|
|
@ -2,43 +2,26 @@
|
|||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
/**
|
||||
* @method static self boolean()
|
||||
* @method static self image()
|
||||
* @method static self string()
|
||||
* @method static self text()
|
||||
* html autorisé
|
||||
* @method static self url()
|
||||
* @method static self imageArray()
|
||||
* @method static self labelArray()
|
||||
* @method static self dropdownArray()
|
||||
* html autorisé
|
||||
* @method static self miniblocArray()
|
||||
* html autorisé
|
||||
* @method static self videoVimeo()
|
||||
*/
|
||||
final class InputType extends BaseEnumRoutable
|
||||
enum InputType: int
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'boolean' => 0,
|
||||
'image' => 1,
|
||||
'string' => 2,
|
||||
'text' => 3,
|
||||
'url' => 4,
|
||||
'imageArray' => 5,
|
||||
'labelArray' => 6,
|
||||
'dropdownArray' => 7,
|
||||
'miniblocArray' => 8,
|
||||
'videoVimeo' => 9
|
||||
];
|
||||
}
|
||||
use BaseEnum;
|
||||
|
||||
case boolean = 1;
|
||||
case dropdownArray = 2;
|
||||
case email = 3;
|
||||
case image = 4;
|
||||
case imageArray = 5;
|
||||
case labelArray = 6;
|
||||
case miniblocArray = 7;
|
||||
case number = 8;
|
||||
case selectEnum = 9;
|
||||
case password = 10;
|
||||
case string = 11;
|
||||
case text = 12;
|
||||
case url = 13;
|
||||
case videoVimeo = 14;
|
||||
case videoYoutube = 15;
|
||||
case video = 16;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self debug()
|
||||
* @method static self log()
|
||||
* @method static self warning()
|
||||
* @method static self info()
|
||||
* @method static self error()
|
||||
* @method static self critical()
|
||||
*/
|
||||
final class LogType extends BaseEnumRoutable
|
||||
{
|
||||
}
|
||||
|
|
@ -2,62 +2,43 @@
|
|||
|
||||
namespace App\Enums\Mercanet;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
/**
|
||||
* @method static self ok()
|
||||
* Situation normale suivie du processus normal d'affichage des pages de paiement.
|
||||
* @method static self invalidIds()
|
||||
* L’identifiant commerçant ou le contrat acquéreur sont invalides.
|
||||
* @method static self invalidParameters()
|
||||
* Les paramètres de la transaction sont invalides. Vérifiez les paramètres de la requête.
|
||||
* @method static self canceled()
|
||||
* Transaction annulée
|
||||
* @method static self invalidRequestFormat()
|
||||
* Le format de la requête est invalide.
|
||||
* @method static self securityIssue()
|
||||
* Problème de sécurité, par ex. le sceau calculé est incorrect.
|
||||
* @method static self transactionAlreadyExists()
|
||||
* La transaction existe déjà.
|
||||
* @method static self expired()
|
||||
* La transaction a expiré
|
||||
* @method static self unreachableService()
|
||||
* Service temporairement indisponible
|
||||
* @method static self internalIssue()
|
||||
* (interne à la classe) = Pb appel cUrl
|
||||
*/
|
||||
final class PaymentResponse extends BaseEnumRoutable
|
||||
enum PaymentResponse: int
|
||||
{
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'ok' => '00',
|
||||
'invalidIds' => '03',
|
||||
'invalidParameters' => '12',
|
||||
'canceled' => '17',
|
||||
'invalidRequestFormat' => '30',
|
||||
'securityIssue' => '34',
|
||||
'transactionAlreadyExists' => '94',
|
||||
'expired' => '97',
|
||||
'unreachableService' => '99',
|
||||
'internalIssue' => '500'
|
||||
];
|
||||
}
|
||||
use BaseEnum;
|
||||
|
||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'ok' => 'Situation normale suivie du processus normal d\'affichage des pages de paiement.',
|
||||
'invalidIds' => 'L’identifiant commerçant ou le contrat acquéreur sont invalides.',
|
||||
'invalidParameters' => 'Les paramètres de la transaction sont invalides. Vérifiez les paramètres de la requête.',
|
||||
'canceled' => 'Transaction annulée',
|
||||
'invalidRequestFormat' => 'Le format de la requête est invalide.',
|
||||
'securityIssue' => 'Problème de sécurité, par ex. le sceau calculé est incorrect.',
|
||||
'transactionAlreadyExists' => 'La transaction existe déjà.',
|
||||
'expired' => 'Délais expiré',
|
||||
'unreachableService' => 'Service temporairement indisponible',
|
||||
'internalIssue' => 'Erreur interne, eg: probleme appel CURL'
|
||||
];
|
||||
}
|
||||
case ok = 00;
|
||||
case invalidIds = 03;
|
||||
case invalidParameters = 12;
|
||||
case canceled = 17;
|
||||
case invalidRequestFormat = 30;
|
||||
case securityIssue = 34;
|
||||
case transactionAlreadyExists = 94;
|
||||
case expired = 97;
|
||||
case unreachableService = 99;
|
||||
case internalIssue = 500;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpcs:disable Generic.Files.LineLength.TooLong
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::ok->name => 'Situation normale suivie du processus normal
|
||||
d\'affichage des pages de paiement.',
|
||||
self::invalidIds->name => 'L’identifiant commerçant ou le contrat acquéreur sont invalides.',
|
||||
self::invalidParameters->name => 'Les paramètres de la transaction sont invalides. Vérifiez les
|
||||
paramètres de la requête.',
|
||||
self::canceled->name => 'Transaction annulée',
|
||||
self::invalidRequestFormat->name => 'Le format de la requête est invalide.',
|
||||
self::securityIssue->name => 'Problème de sécurité, par ex. le sceau calculé est incorrect.',
|
||||
self::transactionAlreadyExists->name => 'La transaction existe déjà.',
|
||||
self::expired->name => 'Délais expiré',
|
||||
self::unreachableService->name => 'Service temporairement indisponible',
|
||||
self::internalIssue->name => 'Erreur interne, eg: probleme appel CURL'
|
||||
];
|
||||
//phpcs:enable
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,57 +2,34 @@
|
|||
|
||||
namespace App\Enums\Mercanet;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
/**
|
||||
* @method static self redirect()
|
||||
* Ce cas doit être suivi de la redirection de l’utilisateur vers la page de paiement.
|
||||
*
|
||||
* @method static self requestError03()
|
||||
* @method static self requestError12()
|
||||
* @method static self requestError30()
|
||||
* @method static self requestError34()
|
||||
* Ces codes d’erreur indiquent que la requête comporte un problème qui doit être résolu.
|
||||
* Le processus de paiement doit alors être interrompu.
|
||||
*
|
||||
* @method static self referenceAlreadyUsed()
|
||||
* La référence de transaction a déjà été utilisée.
|
||||
* Le commerçant doit réessayer avec une autre référence de transaction.
|
||||
*
|
||||
* @method static self serviceDisponibiltyIssue()
|
||||
* Problème de disponibilité du service de paiement. Le commerçant doit essayer de renvoyer la requête.
|
||||
* Il convient d’utiliser une nouvelle référence de transaction pour éviter un code de réponse 94.
|
||||
*
|
||||
* @method static self internalIssue()
|
||||
* (interne à la classe) = Pb appel cUrl
|
||||
*/
|
||||
final class RedirectionStatusCode extends BaseEnumRoutable
|
||||
enum RedirectionStatusCode: int
|
||||
{
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'redirect' => 0,
|
||||
'requestError03' => 3,
|
||||
'requestError12' => 12,
|
||||
'requestError30' => 30,
|
||||
'requestError34' => 34,
|
||||
'referenceAlreadyUsed' => 94,
|
||||
'serviceDisponibiltyIssue' => 99,
|
||||
'internalIssue' => 500
|
||||
];
|
||||
}
|
||||
use BaseEnum;
|
||||
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'redirect' => 'Redirection Acceptée',
|
||||
'requestError03' => 'Problème de request code 03',
|
||||
'requestError12' => 'Problème de request code 12',
|
||||
'requestError30' => 'Problème de request code 30',
|
||||
'requestError34' => 'Problème de request code 34',
|
||||
'referenceAlreadyUsed' => 'La référence de transaction à déja été utilisée',
|
||||
'serviceDisponibiltyIssue' => 'Problème de disponibilité du service de paiement',
|
||||
'internalIssue' => 'Erreur interne, eg: probleme appel CURL'
|
||||
];
|
||||
}
|
||||
case redirect = 0;
|
||||
case requestError03 = 3;
|
||||
case requestError12 = 12;
|
||||
case requestError30 = 30;
|
||||
case requestError34 = 34;
|
||||
case referenceAlreadyUsed = 94;
|
||||
case serviceDisponibiltyIssue = 99;
|
||||
case internalIssue = 500;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::redirect->name => 'Redirection Acceptée',
|
||||
self::requestError03->name => 'Problème de request code 03',
|
||||
self::requestError12->name => 'Problème de request code 12',
|
||||
self::requestError30->name => 'Problème de request code 30',
|
||||
self::requestError34->name => 'Problème de request code 34',
|
||||
self::referenceAlreadyUsed->name => 'La référence de transaction à déja été utilisée',
|
||||
self::serviceDisponibiltyIssue->name => 'Problème de disponibilité du service de paiement',
|
||||
self::internalIssue->name => 'Erreur interne, eg: probleme appel CURL'
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,57 +2,36 @@
|
|||
|
||||
namespace App\Enums\Mercanet;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
/**
|
||||
* @method static self accepted()
|
||||
* Paiement accepté
|
||||
* @method static self refused()
|
||||
* Paiement refusé
|
||||
* @method static self canceled()
|
||||
* Paiement annulée
|
||||
* @method static self fraud()
|
||||
* Paiement refusé pour fraude
|
||||
* @method static self maxReached()
|
||||
* Paiement refusé pour nombre max essais atteint
|
||||
* @method static self technicalIssue()
|
||||
* Paiement refusé pour problème technique
|
||||
* @method static self duplicate()
|
||||
* Transaction dupliquée
|
||||
* @method static self expired()
|
||||
* Paiement expiré
|
||||
* @method static self internalIssue()
|
||||
* (interne à la classe) = Pb appel cUrl
|
||||
*/
|
||||
final class TransactionResponse extends BaseEnumRoutable
|
||||
enum TransactionResponse: int
|
||||
{
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'accepted' => 00,
|
||||
'refused' => 05,
|
||||
'canceled' => 17,
|
||||
'fraud' => 34,
|
||||
'maxReached' => 75,
|
||||
'technicalIssue' => 90,
|
||||
'duplicate' => 94,
|
||||
'expired' => 97,
|
||||
'internalIssue' => 500
|
||||
];
|
||||
}
|
||||
use BaseEnum;
|
||||
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'accepted' => 'Paiement accepté',
|
||||
'refused' => 'Paiement refusé',
|
||||
'canceled' => 'Paiement annulé',
|
||||
'fraud' => 'Paiement refusé pour fraude',
|
||||
'maxReached' => 'Paiement refusé pour nombre max essais atteint',
|
||||
'technicalIssue' => 'Paiement refusé pour problème technique',
|
||||
'duplicate' => 'Transaction dupliquée',
|
||||
'expired' => 'Paiement expiré',
|
||||
'internalIssue' => 'Erreur interne, eg: probleme appel CURL'
|
||||
];
|
||||
}
|
||||
case accepted = 00;
|
||||
case refused = 05;
|
||||
case canceled = 17;
|
||||
case fraud = 34;
|
||||
case maxReached = 75;
|
||||
case technicalIssue = 90;
|
||||
case duplicate = 94;
|
||||
case expired = 97;
|
||||
case internalIssue = 500;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::accepted->name => 'Paiement accepté',
|
||||
self::refused->name => 'Paiement refusé',
|
||||
self::canceled->name => 'Paiement annulé',
|
||||
self::fraud->name => 'Paiement refusé pour fraude',
|
||||
self::maxReached->name => 'Paiement refusé pour nombre max essais atteint',
|
||||
self::technicalIssue->name => 'Paiement refusé pour problème technique',
|
||||
self::duplicate->name => 'Transaction dupliquée',
|
||||
self::expired->name => 'Paiement expiré',
|
||||
self::internalIssue->name => 'Erreur interne, eg: probleme appel CURL'
|
||||
];
|
||||
}
|
||||
|
|
|
|||
49
app/Enums/News/NewsClubTypeEnum.php
Normal file
49
app/Enums/News/NewsClubTypeEnum.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\News;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum NewsClubTypeEnum: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case news = 1;
|
||||
case survey = 2;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::news->name => 'Actualité',
|
||||
self::survey->name => 'Sondage',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the icon.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function icon(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::news => 'fa-newspaper',
|
||||
self::survey => 'fa-chart-simple',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the color.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function color(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::news => 'text-bg-tertiary',
|
||||
self::survey => 'text-bg-warning',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -2,46 +2,28 @@
|
|||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
/**
|
||||
* @method static self all()
|
||||
* @method static self reduction()
|
||||
* @method static self recipe()
|
||||
* @method static self info()
|
||||
* @method static self message()
|
||||
*/
|
||||
final class NotificationType extends BaseEnumRoutable
|
||||
enum NotificationType: int
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'all' => 1,
|
||||
'reduction' => 2,
|
||||
'recipe' => 3,
|
||||
'info' => 4,
|
||||
'message' => 5
|
||||
];
|
||||
}
|
||||
use BaseEnum;
|
||||
|
||||
case all = 1;
|
||||
case reduction = 2;
|
||||
case recipe = 3;
|
||||
case info = 4;
|
||||
case message = 5;
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @return array
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'all' => __("Toutes les notifications"),
|
||||
'reduction' => __("Les réductions"),
|
||||
'recipe' => __("Les recettes"),
|
||||
'info' => __("Les infos du club"),
|
||||
'message' => __("Les message")
|
||||
];
|
||||
}
|
||||
private const LABELS = [
|
||||
self::all->name => 'Toutes les notifications',
|
||||
self::reduction->name => 'Les réductions',
|
||||
self::recipe->name => 'Les recettes',
|
||||
self::info->name => 'Les infos du club',
|
||||
self::message->name => 'Les messages',
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,52 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self bloc1()
|
||||
* Text et dropdowns array
|
||||
* @method static self bloc2()
|
||||
* Text et label array
|
||||
* @method static self bloc3()
|
||||
* Big image et optional button
|
||||
* @method static self bloc4()
|
||||
* Big image et dropdowns array
|
||||
* @method static self bloc5()
|
||||
* Green encart
|
||||
*/
|
||||
final class NutritionBlocType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'bloc1' => 0,
|
||||
'bloc2' => 1,
|
||||
'bloc3' => 2,
|
||||
'bloc4' => 3,
|
||||
'bloc5' => 4
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'bloc1' => __('Bloc 1, (Text et dropdowns array)'),
|
||||
'bloc2' => __('Bloc 2 (Text et label array)'),
|
||||
'bloc3' => __('Bloc 3 (Big image et optional button'),
|
||||
'bloc4' => __('Bloc 4 (Big image et dropdowns array)'),
|
||||
'bloc5' => __('Bloc 5 (Green encart)')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self poultry()
|
||||
* @method static self quality()
|
||||
*/
|
||||
final class NutritionPageType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'poultry' => 0,
|
||||
'quality' => 1
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'poultry' => __('Page volaille'),
|
||||
'quality' => __('Page qualité nutrition')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self rabbit()
|
||||
* @method static self poultry()
|
||||
*/
|
||||
final class OCBType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'rabbit' => 1,
|
||||
'poultry' => 2
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'rabbit' => __('Lapin'),
|
||||
'poultry' => __('Volaille')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self waiting()
|
||||
* @method static self failed()
|
||||
* @method static self waitingCheck()
|
||||
* @method static self sentCheck()
|
||||
* @method static self payed()
|
||||
*/
|
||||
final class OrderStatus extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'waiting' => 0,
|
||||
'failed' => 1,
|
||||
'payed' => 2,
|
||||
'waitingCheck' => 3,
|
||||
'sentCheck' => 4
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'waiting' => __('En attente'),
|
||||
'failed' => __('Échec'),
|
||||
'payed' => __('Réglée'),
|
||||
'sentCheck' => __('Par chèque bancaire')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self cb()
|
||||
* @method static self check()
|
||||
*/
|
||||
final class OrderType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'cb' => 0,
|
||||
'check' => 1
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'cb' => __('Carte Bancaire'),
|
||||
'check' => __('Chèque')
|
||||
];
|
||||
}
|
||||
}
|
||||
16
app/Enums/Pagination/ItemsPerPaginationEnum.php
Normal file
16
app/Enums/Pagination/ItemsPerPaginationEnum.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Pagination;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum ItemsPerPaginationEnum: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case five = 5;
|
||||
case twelve = 12;
|
||||
case twentyfive = 25;
|
||||
case fifty = 50;
|
||||
case onehundred = 100;
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self bloc1()
|
||||
* Text seulement
|
||||
* @method static self bloc2()
|
||||
* Text et video
|
||||
*/
|
||||
final class PoultryBlocType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'bloc1' => 0,
|
||||
'bloc2' => 1
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'bloc1' => __('Bloc 1, (Text seulement)'),
|
||||
'bloc2' => __('Bloc 2 (Text et video)')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self engage()
|
||||
* @method static self tracable()
|
||||
*/
|
||||
final class PoultryPageType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'engage' => 0,
|
||||
'tracable' => 1
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'engage' => __('Page eleveurs 100% engagés'),
|
||||
'tracable' => __('Page production 100% tracable')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self picture()
|
||||
* @method static self video()
|
||||
*/
|
||||
final class PresentationType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'picture' => 0,
|
||||
'video' => 1
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'picture' => __('Photo'),
|
||||
'video' => __('Video'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self color1()
|
||||
* @method static self color2()
|
||||
* @method static self color3()
|
||||
* @method static self color4()
|
||||
* @method static self color5()
|
||||
* @method static self color6()
|
||||
* @method static self color7()
|
||||
* @method static self color8()
|
||||
* @method static self color9()
|
||||
* @method static self color10()
|
||||
* @method static self color11()
|
||||
*/
|
||||
final class RangeColor extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'color1' => 'color-1',
|
||||
'color2' => 'color-2',
|
||||
'color3' => 'color-3',
|
||||
'color4' => 'color-4',
|
||||
'color5' => 'color-5',
|
||||
'color6' => 'color-6',
|
||||
'color7' => 'color-7',
|
||||
'color8' => 'color-8',
|
||||
'color9' => 'color-9',
|
||||
'color10' => 'color-10',
|
||||
'color11' => 'color-11'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'color1' => 'Couleur 1',
|
||||
'color2' => 'Couleur 2',
|
||||
'color3' => 'Couleur 3',
|
||||
'color4' => 'Couleur 4',
|
||||
'color5' => 'Couleur 5',
|
||||
'color6' => 'Couleur 6',
|
||||
'color7' => 'Couleur 7',
|
||||
'color8' => 'Couleur 8',
|
||||
'color9' => 'Couleur 9',
|
||||
'color10' => 'Couleur 10',
|
||||
'color11' => 'Couleur 11'
|
||||
];
|
||||
}
|
||||
}
|
||||
17
app/Enums/RatingEnum.php
Normal file
17
app/Enums/RatingEnum.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum RatingEnum: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case inedible = 0;
|
||||
case bad = 1;
|
||||
case mid = 2;
|
||||
case good = 3;
|
||||
case great = 4;
|
||||
case amazing = 5;
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self veryeasy()
|
||||
* @method static self easy()
|
||||
* @method static self confirmed()
|
||||
* @method static self expert()
|
||||
*/
|
||||
final class RecipeDifficulty extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'veryeasy' => 1,
|
||||
'easy' => 2,
|
||||
'confirmed' => 3,
|
||||
'expert' => 4
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'veryeasy' => __('Très facile'),
|
||||
'easy' => __('Facile'),
|
||||
'confirmed' => __('Confirmé'),
|
||||
'expert' => __('Expert'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->label;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self range()
|
||||
* @method static self consumption()
|
||||
* @method static self cooking()
|
||||
* @method static self preparation()
|
||||
*/
|
||||
final class RecipeFilter extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
$labels = self::labels();
|
||||
return [
|
||||
'range' => Str::slug($labels['range']),
|
||||
'consumption' => Str::slug($labels['consumption']),
|
||||
'cooking' => Str::slug($labels['cooking']),
|
||||
'preparation' => Str::slug($labels['preparation'])
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'range' => __('Gamme'),
|
||||
'consumption' => __('Moment de consommation'),
|
||||
'cooking' => __('Temps de cuisson'),
|
||||
'preparation' => __('Temps de préparation')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self less15()
|
||||
* @method static self between15and30()
|
||||
* @method static self more30()
|
||||
*/
|
||||
final class RecipeFilterTimes extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
$labels = self::labels();
|
||||
return [
|
||||
'less15' => Str::slug($labels['less15']),
|
||||
'between15and30' => Str::slug($labels['between15and30']),
|
||||
'more30' => Str::slug($labels['more30']),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'less15' => __('Moins de 15 minutes'),
|
||||
'between15and30' => __('Entre 15 et 30 minutes'),
|
||||
'more30' => __('Plus de 30 minutes'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use Kwaadpepper\Enum\BaseEnumRoutable;
|
||||
|
||||
/**
|
||||
* @method static self classic()
|
||||
* @method static self video()
|
||||
*/
|
||||
final class RecipeType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
'classic' => 0,
|
||||
'video' => 1
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
'classic' => __('Classic'),
|
||||
'video' => __('Video')
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Enums/Recipes/DifficultyEnum.php
Normal file
30
app/Enums/Recipes/DifficultyEnum.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Recipes;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
/**
|
||||
* Will caracterise the setting row (ID)
|
||||
*/
|
||||
enum DifficultyEnum: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case very_easy = 1;
|
||||
case easy = 2;
|
||||
case confirmed = 3;
|
||||
case expert = 4;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::very_easy->name => 'Très facile',
|
||||
self::easy->name => 'Facile',
|
||||
self::confirmed->name => 'Confirmé',
|
||||
self::expert->name => 'Expert',
|
||||
];
|
||||
}
|
||||
63
app/Enums/Settings/MenuNodeType.php
Normal file
63
app/Enums/Settings/MenuNodeType.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Settings;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum MenuNodeType: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case ourProducts = 1;
|
||||
case ourRecipes = 2;
|
||||
case ourCommitments = 3;
|
||||
case siteLogo = 4;
|
||||
case breedings = 5;
|
||||
case ourBrand = 6;
|
||||
case recruitment = 7;
|
||||
case news = 8;
|
||||
case link = 9;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::ourProducts->name => 'Nos produits',
|
||||
self::ourRecipes->name => 'Nos recettes',
|
||||
self::ourCommitments->name => 'Nos engagments',
|
||||
self::siteLogo->name => 'Logo du site',
|
||||
self::breedings->name => 'Les élevages',
|
||||
self::ourBrand->name => 'Notre marque',
|
||||
self::recruitment->name => 'Recrutement',
|
||||
self::news->name => 'Actus',
|
||||
self::link->name => 'Lien',
|
||||
];
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*/
|
||||
private const ROUTENAMES = [
|
||||
self::ourProducts->name => 'fo.products.index',
|
||||
self::ourRecipes->name => 'fo.recipes.index',
|
||||
self::ourCommitments->name => 'fo.commitments.brand',
|
||||
self::siteLogo->name => 'fo.home.show',
|
||||
self::breedings->name => 'fo.breeding.index',
|
||||
self::ourBrand->name => 'fo.brand.story',
|
||||
self::recruitment->name => 'fo.recruitment.show',
|
||||
self::news->name => 'fo.news.index',
|
||||
self::link->name => '',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get Class
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function routeName(): ?string
|
||||
{
|
||||
return !empty(self::ROUTENAMES[$this->name]) ?
|
||||
self::ROUTENAMES[$this->name] : null;
|
||||
}
|
||||
}
|
||||
30
app/Enums/Settings/SettingsType.php
Normal file
30
app/Enums/Settings/SettingsType.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Settings;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
/**
|
||||
* Will caracterise the setting row (ID)
|
||||
*/
|
||||
enum SettingsType: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case mainMenu = 1;
|
||||
case hotNews = 2;
|
||||
case offersCount = 3;
|
||||
case breederMap = 4;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::mainMenu->name => 'Menu principal',
|
||||
self::hotNews->name => 'Infos chaudes',
|
||||
self::offersCount->name => 'Total des offres de la marque',
|
||||
self::breederMap->name => 'Carte des éleveurs',
|
||||
];
|
||||
}
|
||||
23
app/Enums/Shop/ContactFormCivility.php
Normal file
23
app/Enums/Shop/ContactFormCivility.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Shop;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum ContactFormCivility: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case m = 1;
|
||||
case mme = 2;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::m->name => 'M',
|
||||
self::mme->name => 'Mme',
|
||||
];
|
||||
}
|
||||
29
app/Enums/Shop/OrderStatus.php
Normal file
29
app/Enums/Shop/OrderStatus.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Shop;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum OrderStatus: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case waiting = 1;
|
||||
case failed = 2;
|
||||
case payed = 3;
|
||||
case waitingCheck = 4;
|
||||
case sentCheck = 5;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::waiting->name => 'En attente',
|
||||
self::failed->name => 'Échec',
|
||||
self::payed->name => 'Réglée',
|
||||
self::waitingCheck->name => 'En attente du chèque bancaire',
|
||||
self::sentCheck->name => 'Envoi du chèque bancaire',
|
||||
];
|
||||
}
|
||||
23
app/Enums/Shop/OrderType.php
Normal file
23
app/Enums/Shop/OrderType.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Shop;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum OrderType: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
// case cb = 1;
|
||||
case check = 2;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
// self::cb->name => 'Carte Bancaire',
|
||||
self::check->name => 'Chèque',
|
||||
];
|
||||
}
|
||||
41
app/Enums/Shop/SellItemsType.php
Normal file
41
app/Enums/Shop/SellItemsType.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Shop;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum SellItemsType: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case paper = 1;
|
||||
case magnetic = 2;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::paper->name => 'Papier',
|
||||
self::magnetic->name => 'Magnétique',
|
||||
];
|
||||
|
||||
/**
|
||||
* Custom added color definition.
|
||||
*/
|
||||
private const COLOR = [
|
||||
self::paper->name => 'danger',
|
||||
self::magnetic->name => 'warning',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get color.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function color(): string
|
||||
{
|
||||
return self::COLOR[$this->name];
|
||||
}
|
||||
}
|
||||
78
app/Enums/StaticPageType.php
Normal file
78
app/Enums/StaticPageType.php
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum StaticPageType: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case contact = 1;
|
||||
case legals = 2;
|
||||
case confidentiality = 3;
|
||||
case recruitment = 4;
|
||||
case story = 5;
|
||||
case saga = 6;
|
||||
case recipes = 7;
|
||||
case recipe = 8;
|
||||
case products = 9;
|
||||
case product = 10;
|
||||
case home = 11;
|
||||
case selling = 12;
|
||||
case accessibility = 13;
|
||||
case news = 14;
|
||||
case social = 15;
|
||||
case breedingPoultry = 16;
|
||||
case breedingJob = 17;
|
||||
case breedingFood = 18;
|
||||
case breedingHealth = 19;
|
||||
case search = 20;
|
||||
case sitemap = 21;
|
||||
case rules = 22;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::contact->name => 'Contact',
|
||||
self::legals->name => 'Mentions légales et CGU',
|
||||
self::confidentiality->name => 'Confidentialité',
|
||||
self::recruitment->name => 'Recrutement',
|
||||
self::story->name => 'Qui sommes-nous ?',
|
||||
self::saga->name => 'Saga publicitaire',
|
||||
self::recipes->name => 'Recettes',
|
||||
self::recipe->name => 'Recette',
|
||||
self::products->name => 'Produits',
|
||||
self::product->name => 'Produit',
|
||||
self::home->name => 'Accueil',
|
||||
self::selling->name => 'Conditions générales de vente',
|
||||
self::accessibility->name => 'Accessibilité',
|
||||
self::news->name => 'Actualités',
|
||||
self::social->name => 'Réseaux sociaux',
|
||||
self::breedingPoultry->name => 'L\'élevage des volailles',
|
||||
self::breedingJob->name => 'Le métier d\'éleveur de volailles',
|
||||
self::breedingFood->name => 'L\'alimentation des volailles',
|
||||
self::breedingHealth->name => 'La santé des volailles',
|
||||
self::search->name => 'Recherche',
|
||||
self::sitemap->name => 'Plan du site',
|
||||
self::rules->name => 'Règlement du jeu',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get all breeding pages.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getBreedingPages(): array
|
||||
{
|
||||
return [
|
||||
self::breedingPoultry,
|
||||
self::breedingJob,
|
||||
self::breedingFood,
|
||||
self::breedingHealth,
|
||||
];
|
||||
}
|
||||
}
|
||||
25
app/Enums/Theme/BootstrapThemeEnum.php
Normal file
25
app/Enums/Theme/BootstrapThemeEnum.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Theme;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum BootstrapThemeEnum: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case light = 1;
|
||||
case dark = 2;
|
||||
case beige = 3;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::light->name => 'enums.bootstrap-theme.light',
|
||||
self::dark->name => 'enums.bootstrap-theme.dark',
|
||||
self::beige->name => 'enums.bootstrap-theme.beige',
|
||||
];
|
||||
}
|
||||
25
app/Enums/Users/RoleEnum.php
Normal file
25
app/Enums/Users/RoleEnum.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Users;
|
||||
|
||||
use App\Traits\Enums\BaseEnum;
|
||||
|
||||
enum RoleEnum: int
|
||||
{
|
||||
use BaseEnum;
|
||||
|
||||
case conceptor = 1;
|
||||
case admin = 2;
|
||||
case visitor = 99;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
*
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private const LABELS = [
|
||||
self::conceptor->name => 'enums.user-role.conceptor',
|
||||
self::admin->name => 'enums.user-role.admin',
|
||||
self::visitor->name => 'enums.user-role.visitor',
|
||||
];
|
||||
}
|
||||
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
namespace App\Events;
|
||||
|
||||
use App\Enums\NotificationType;
|
||||
use App\Interfaces\Notifiable;
|
||||
use App\Models\Customer;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
|
@ -12,24 +15,19 @@ class NewNotification
|
|||
use InteractsWithSockets;
|
||||
use SerializesModels;
|
||||
|
||||
public $type;
|
||||
|
||||
public $content;
|
||||
|
||||
public $model;
|
||||
|
||||
public $customer;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @return void
|
||||
* @param \App\Enums\NotificationType $type
|
||||
* @param string $content
|
||||
* @param \App\Interfaces\Notifiable $model
|
||||
* @param \App\Models\Customer|null $customer
|
||||
*/
|
||||
public function __construct($type, $content, $model, $customer = null)
|
||||
{
|
||||
$this->type = $type;
|
||||
$this->content = $content;
|
||||
$this->model = $model;
|
||||
$this->customer = $customer;
|
||||
public function __construct(
|
||||
public NotificationType $type,
|
||||
public string $content,
|
||||
public Notifiable $model,
|
||||
public Customer|null $customer = null
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue