mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-20 11:19:16 +00:00
Compare commits
892 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4d7909e23d | ||
|
6f13600fb5 | ||
|
c9fefcd8f4 | ||
|
fa31483b02 | ||
|
e7be0eae8a | ||
|
86c70cf232 | ||
|
a3490e97c0 | ||
|
85b1768908 | ||
|
6ab462a795 | ||
|
70f46338db | ||
|
461b5ad859 | ||
|
6af62c6be0 | ||
|
78153c2aa4 | ||
|
62458885ce | ||
|
83d64262c8 | ||
|
0133a7c5db | ||
|
fa920fed4e | ||
|
1d138eed8d | ||
|
9e94b9e57e | ||
|
c4c690f44f | ||
|
902cc21ff0 | ||
|
106471877f | ||
|
ccaace707e | ||
|
cc14a4ac57 | ||
|
3ca1e6d197 | ||
|
531a6c17de | ||
|
4b7e1fcdb0 | ||
|
5f35bc5ee6 | ||
|
8100f68020 | ||
|
32a36bbb12 | ||
|
64b9234207 | ||
|
a9d490263b | ||
|
8c5a3c9b3e | ||
|
dd2f8d4404 | ||
|
ea82cff0ce | ||
|
66ef9a919a | ||
|
73b912ee8b | ||
|
5960258a89 | ||
|
ea7d1f481a | ||
|
d81a0ebba4 | ||
|
e90fb98613 | ||
|
2c34bd36a5 | ||
|
a86a582d0f | ||
|
c7778ce8cb | ||
|
5eaf1f4438 | ||
|
691682bc0c | ||
|
8627ee391a | ||
|
41089a0a0a | ||
|
2072a3dd94 | ||
|
8eec325e0a | ||
|
7ae88b42cf | ||
|
24e0839c34 | ||
|
c3398d4d51 | ||
|
80237d8bc3 | ||
|
4cec0a9f97 | ||
|
a810eb2cb5 | ||
|
7feb4b4aaf | ||
|
840fd61b04 | ||
|
5425dac180 | ||
|
0d65e396d4 | ||
|
704fc24d20 | ||
|
9b22c16f14 | ||
|
2923d1b449 | ||
|
9d5b028a5f | ||
|
97dfdd5c5d | ||
|
eb5ee4d147 | ||
|
d97581325d | ||
|
2a1e53f32a | ||
|
b5e4ac0038 | ||
|
b032210a33 | ||
|
24a1d61560 | ||
|
d632c1c7fc | ||
|
9c5b3fc030 | ||
|
90e407b9d0 | ||
|
dc0a2a2a10 | ||
|
b6aa76477e | ||
|
068191e08c | ||
|
533cd1dbed | ||
|
028ef63f6e | ||
|
127b6ea515 | ||
|
ab546865a8 | ||
|
d6a2f2959d | ||
|
58848caf30 | ||
|
c1107fe854 | ||
|
c3debb1a17 | ||
|
0c841a12d2 | ||
|
64ed9376fe | ||
|
1966e12703 | ||
|
289ccc7d89 | ||
|
590c33c0af | ||
|
4e7236a338 | ||
|
63b7626aab | ||
|
78b88949d8 | ||
|
40a7abf9e8 | ||
|
cd62dfd8f4 | ||
|
4445ad8fe5 | ||
|
ed29721677 | ||
|
e587f6ec37 | ||
|
f98f4b00ba | ||
|
78bbcb324b | ||
|
d646ab0232 | ||
|
1fe36044f1 | ||
|
2ea9369f99 | ||
|
802e1dbf2d | ||
|
b6aca26d8c | ||
|
ef653f7b00 | ||
|
8e183d8cad | ||
|
0ce34048cd | ||
|
d46041f22e | ||
|
94cf424bbd | ||
|
778d700ba8 | ||
|
8c1cbd77dd | ||
|
954bf779eb | ||
|
7fbed452bb | ||
|
e32023bb97 | ||
|
664a08d42f | ||
|
854c7f090b | ||
|
a29d056a9b | ||
|
7d3ee9f0c4 | ||
|
e26d39ab63 | ||
|
ecf465958f | ||
|
8fa6030341 | ||
|
1f6f6dadfa | ||
|
ed81eb4edf | ||
|
06ff4b808a | ||
|
fe5999d5b8 | ||
|
9331796dc3 | ||
|
0a18c948bc | ||
|
595a1fbe34 | ||
|
f12db3b8d9 | ||
|
2c1da7af31 | ||
|
0f9535bfd5 | ||
|
961d3c26fc | ||
|
bd8e003db8 | ||
|
619eb60dd1 | ||
|
15948303ec | ||
|
ccec203910 | ||
|
78122a7d4b | ||
|
272c73054e | ||
|
aa629523a0 | ||
|
3e6aca4cd1 | ||
|
891883c8c2 | ||
|
98ba392016 | ||
|
d49ee83748 | ||
|
88cdb1811f | ||
|
94c190668c | ||
|
eef0f4bd4e | ||
|
dad58fa362 | ||
|
40585469f2 | ||
|
d06035071a | ||
|
e81565d36a | ||
|
f66dd259f0 | ||
|
e003dcd596 | ||
|
d4ecf44b08 | ||
|
f4426eb830 | ||
|
7c86ce3977 | ||
|
1665335525 | ||
|
14bce014a3 | ||
|
75e5115aa3 | ||
|
de7638c502 | ||
|
126e378399 | ||
|
45e9c999b8 | ||
|
62bba0d33b | ||
|
0b220f3288 | ||
|
7dbdf0c4ff | ||
|
417b7c3f86 | ||
|
724a16944a | ||
|
c3bc1af7b5 | ||
|
38b7daf3b6 | ||
|
7bf7bb529e | ||
|
6b5774a66d | ||
|
0e3ebb9f1a | ||
|
1c41b6753d | ||
|
549f3c038a | ||
|
edbac66576 | ||
|
c788395508 | ||
|
35b0c20f88 | ||
|
518712d9e8 | ||
|
241ad25e2f | ||
|
7cf7c5fcef | ||
|
fbb9de64c3 | ||
|
88c145ac3e | ||
|
4aba842624 | ||
|
936c2b8888 | ||
|
c3e971c419 | ||
|
19fee6a8fb | ||
|
477eebdbe7 | ||
|
093bff750c | ||
|
92e679a9ea | ||
|
43232ae45c | ||
|
1fb13d8697 | ||
|
9ac28b93ca | ||
|
067c01ca06 | ||
|
82040c2a5d | ||
|
62502c746c | ||
|
6ab79a87fe | ||
|
04ee3b4dc1 | ||
|
9c9af79ad5 | ||
|
dd794e409f | ||
|
67d29b8416 | ||
|
5ee80dd046 | ||
|
f62e93b487 | ||
|
a7cc70b975 | ||
|
60f0d8074a | ||
|
ed1fdf9382 | ||
|
9ea3c4224e | ||
|
71325de44e | ||
|
cdb041e647 | ||
|
b9d750bf59 | ||
|
461249737e | ||
|
1aeaa8b77d | ||
|
a59d7ccdc2 | ||
|
2c1ca428db | ||
|
224970f3bd | ||
|
742d934ddb | ||
|
1699513023 | ||
|
488a8a7e86 | ||
|
dd571d6221 | ||
|
4cc5128b4c | ||
|
2636a6557a | ||
|
0bf97ccf22 | ||
|
592fc71b4e | ||
|
0e7712d3b8 | ||
|
80f21d2a4f | ||
|
5513ec068e | ||
|
14a46a6197 | ||
|
b93ee5efd8 | ||
|
cdd4dc6065 | ||
|
0d8b2ae799 | ||
|
77dc79b638 | ||
|
f48723db40 | ||
|
ebf91078c5 | ||
|
90d0d85dd6 | ||
|
0c5b4f7f64 | ||
|
9c4bb08ed1 | ||
|
1d3bbde4b0 | ||
|
b6faee033d | ||
|
05e0f88d11 | ||
|
ae9a151140 | ||
|
da633e3c62 | ||
|
8cb384d3cf | ||
|
de2a34c3ec | ||
|
b7c65446a8 | ||
|
bc648b187c | ||
|
4de0828b5d | ||
|
b2364d26ec | ||
|
83d94cb792 | ||
|
66cc3f48bc | ||
|
63297c43b7 | ||
|
5b0637558f | ||
|
e9a8e104be | ||
|
0f524e7800 | ||
|
969e0bccc9 | ||
|
ba3e026927 | ||
|
0c6868d477 | ||
|
7f70cf47ec | ||
|
fa4492287d | ||
|
60809c688e | ||
|
2404f5299c | ||
|
21a394eaf5 | ||
|
419d7846c9 | ||
|
0827accc39 | ||
|
2e53f7d0b7 | ||
|
bdfcf8ec95 | ||
|
6a20170e00 | ||
|
0c974f1ff7 | ||
|
9c098d45c5 | ||
|
cfdf9aa8dc | ||
|
2ea74542e6 | ||
|
7fcaa2b5fb | ||
|
e9e905e495 | ||
|
f67ff98d78 | ||
|
e3c4dde4ff | ||
|
9787561000 | ||
|
cd041b4c75 | ||
|
60ee70c926 | ||
|
00de78b6f1 | ||
|
33a841b831 | ||
|
df66dcf102 | ||
|
086a7a0b1e | ||
|
ec0ba3d212 | ||
|
b0ab06b7eb | ||
|
965acd6d45 | ||
|
4d156870ef | ||
|
499720df46 | ||
|
610bc108e7 | ||
|
53f1b0218c | ||
|
0a7a099796 | ||
|
ed90ebc896 | ||
|
87fe518d45 | ||
|
5cb0891a27 | ||
|
b4bd66bd58 | ||
|
64d95fe845 | ||
|
a2d6d7a92c | ||
|
1d8a784586 | ||
|
3c8bfae8ff | ||
|
f65eccfe4c | ||
|
7ce6dc9f16 | ||
|
4a73caf4c3 | ||
|
1b9d8dd3c3 | ||
|
b11bfb0aae | ||
|
024e16bf4b | ||
|
daf753d76e | ||
|
4c90f66578 | ||
|
db94f18d46 | ||
|
a9bd0f551d | ||
|
e1ba2d9ad9 | ||
|
939c636a74 | ||
|
2b829cb645 | ||
|
4bbc898639 | ||
|
27d07d5807 | ||
|
f010ffefc1 | ||
|
fc0fee161e | ||
|
72c99d3834 | ||
|
a2984f299b | ||
|
3925077223 | ||
|
deb51bd8de | ||
|
03f39f53d8 | ||
|
e72314778c | ||
|
ced3e9387a | ||
|
02c906afe6 | ||
|
7a2d4c9bd2 | ||
|
dffddfda18 | ||
|
9bb62c865a | ||
|
a97ebf2b97 | ||
|
9a62a6c514 | ||
|
04dc162270 | ||
|
75d5a50328 | ||
|
eadb7d5dcb | ||
|
8dc07f1148 | ||
|
217ce85a9b | ||
|
ef88b25dbd | ||
|
4c2e2a3a5a | ||
|
1e8e1c6e51 | ||
|
a92944786c | ||
|
8ce760a0bf | ||
|
8d8e047d2c | ||
|
06a923db94 | ||
|
551408b801 | ||
|
e1915e365a | ||
|
e8c4eec536 | ||
|
e3f4e75561 | ||
|
fd640f9698 | ||
|
ffd8aef35f | ||
|
46412bdc66 | ||
|
d73c3476c8 | ||
|
ff737ae05e | ||
|
171ec0c630 | ||
|
b4a6c6fcbe | ||
|
4886084296 | ||
|
1a3dfbdef6 | ||
|
0c087f33c2 | ||
|
5f9f621fa6 | ||
|
cd3de7b545 | ||
|
8aeb513d54 | ||
|
bfc5c5d154 | ||
|
7c9f7f04b7 | ||
|
3352c2cf3c | ||
|
e61a433999 | ||
|
3517452ea1 | ||
|
8a1190b9ee | ||
|
fc78c9a1d6 | ||
|
8d55f7f2e5 | ||
|
8162b22d43 | ||
|
8504d55f17 | ||
|
75ae1bbde1 | ||
|
a20668e91b | ||
|
eb559bbb03 | ||
|
2eae96a895 | ||
|
4bbf35bca4 | ||
|
f1b5e45488 | ||
|
57ed1581ec | ||
|
c668381ab0 | ||
|
44f99991fc | ||
|
696c76102b | ||
|
fe4e00dc5c | ||
|
1a1b0ee27d | ||
|
298c4ec654 | ||
|
c6e3fa2cc6 | ||
|
61484dcfee | ||
|
99009cff88 | ||
|
673f68b07c | ||
|
d1232192ce | ||
|
b2084a94e5 | ||
|
ddcb246955 | ||
|
8796168580 | ||
|
dde7bcfc4c | ||
|
a6503fda39 | ||
|
455e311661 | ||
|
a4a919d7b7 | ||
|
a90ce3c944 | ||
|
a6d179b883 | ||
|
1b29e5e628 | ||
|
e8fd496bca | ||
|
3d61e27a47 | ||
|
f9a55ce3d8 | ||
|
c432757942 | ||
|
da740ccbef | ||
|
f1173263b6 | ||
|
68da1a7039 | ||
|
64414edf58 | ||
|
6b136d2c8c | ||
|
752a877b91 | ||
|
d11c36e476 | ||
|
b13232f06b | ||
|
cf6ed5af32 | ||
|
be531d777e | ||
|
190508fa54 | ||
|
2c2dddc071 | ||
|
c60858de5c | ||
|
6ab332e4fb | ||
|
9df43cc710 | ||
|
79d1b15d86 | ||
|
923debb299 | ||
|
f5fef8c036 | ||
|
982134c077 | ||
|
07aeb6cd20 | ||
|
30cca355ba | ||
|
d17cc15037 | ||
|
efade857bb | ||
|
15ac6a1195 | ||
|
a45a050e7d | ||
|
e435ff8b1c | ||
|
788dae1477 | ||
|
2bb4cc7954 | ||
|
ecead8a27b | ||
|
4a2681df14 | ||
|
5761d82635 | ||
|
36fce9db4e | ||
|
1227574bc1 | ||
|
47c2a66e1d | ||
|
c59e52bbbf | ||
|
81961fd632 | ||
|
b557805eeb | ||
|
e58da3c41d | ||
|
f43b539470 | ||
|
ab3dbf9218 | ||
|
d943a5ae9b | ||
|
449058dad7 | ||
|
b9cf8b3ef2 | ||
|
27037c2fbb | ||
|
10646099a0 | ||
|
43ad63fac6 | ||
|
221c59437c | ||
|
1a94ec5bbe | ||
|
f57c554c56 | ||
|
334aec58a4 | ||
|
7035da4d75 | ||
|
29a40ce8dd | ||
|
c6c98c4df5 | ||
|
277d7e6650 | ||
|
130c539006 | ||
|
2bdb2e12f0 | ||
|
25779206a1 | ||
|
92f72a5ad7 | ||
|
4e041248ac | ||
|
8cc5aa8aba | ||
|
4ba712b24e | ||
|
7af9169763 | ||
|
775504acb6 | ||
|
7840e37e1a | ||
|
720fff4595 | ||
|
551c1f4cda | ||
|
7f0db0de04 | ||
|
6ac3cc384b | ||
|
563879c218 | ||
|
dbb7ed3d5d | ||
|
4e3c2ba72c | ||
|
8e911491f6 | ||
|
03c5f3cc2d | ||
|
484565d600 | ||
|
163a979227 | ||
|
ed105fee1d | ||
|
3b82cfa486 | ||
|
834e52eb2e | ||
|
7eb938fe23 | ||
|
8db7a4c47d | ||
|
b055a5d6af | ||
|
ad0a1b9a24 | ||
|
05d190659a | ||
|
9c6eaffba6 | ||
|
3ee5e9aa04 | ||
|
93a544fe53 | ||
|
3bc98bee20 | ||
|
f6302bc29b | ||
|
43aa1704a9 | ||
|
14fe82e361 | ||
|
33317c15a2 | ||
|
ff1b56c5ef | ||
|
25e2063d70 | ||
|
1d36c74934 | ||
|
aebe7908f0 | ||
|
3e2b881296 | ||
|
c670a6991d | ||
|
f76a7d59e0 | ||
|
3d8bf3ec9b | ||
|
55e4479454 | ||
|
436fe9fea4 | ||
|
63a7a4b03b | ||
|
0cab974048 | ||
|
5fdcf37d06 | ||
|
4663fb2f12 | ||
|
e844ab592d | ||
|
3dcb35710b | ||
|
8d87abde64 | ||
|
2b78485a61 | ||
|
9d057b853f | ||
|
bd269eaadf | ||
|
7096c65f50 | ||
|
1462b0de69 | ||
|
86a1f170c4 | ||
|
40389fb6d5 | ||
|
36021d84cf | ||
|
1278f92355 | ||
|
573f9adb49 | ||
|
431c99c27b | ||
|
77cc558931 | ||
|
42043de34f | ||
|
f2b2c2109f | ||
|
7fe29ad983 | ||
|
07d9bcfb9d | ||
|
fdd235e4cb | ||
|
2646acadb8 | ||
|
5ef646b810 | ||
|
e8bdb5ef38 | ||
|
7a851c2cc6 | ||
|
624784e54e | ||
|
20eb2ebe58 | ||
|
25f8acb417 | ||
|
f75e6430b1 | ||
|
e72a483c49 | ||
|
68934858ce | ||
|
c08b5177d9 | ||
|
fe8635f1ce | ||
|
e96d28b981 | ||
|
784cc3d52d | ||
|
2ab3fb3a71 | ||
|
ff765d4687 | ||
|
f6e778e1d4 | ||
|
ed36604050 | ||
|
cbf8c6e80d | ||
|
f11db0de61 | ||
|
34f16dcdd5 | ||
|
f18aae39b8 | ||
|
924171e7b9 | ||
|
6b580212bf | ||
|
208ae1cae7 | ||
|
3aa7fe47de | ||
|
5318082467 | ||
|
941ec095e5 | ||
|
d5ebd8e57c | ||
|
ebe087984d | ||
|
fa993e02dd | ||
|
44df77f45a | ||
|
0f8f95de9a | ||
|
f32283d2f1 | ||
|
14f8695599 | ||
|
f8b48f7455 | ||
|
70e2aab073 | ||
|
12db745f17 | ||
|
8a48cc690f | ||
|
eb313c65a5 | ||
|
07d6cbc194 | ||
|
8975a462c4 | ||
|
2e4f07d058 | ||
|
74a2935fea | ||
|
3d02468828 | ||
|
0438fb5a2e | ||
|
a4f9a6fd42 | ||
|
a0be4c9daa | ||
|
2dc003bd85 | ||
|
78aa8bd838 | ||
|
f55fde2b52 | ||
|
232572549e | ||
|
d07705c329 | ||
|
688ca8e374 | ||
|
160c364d2a | ||
|
2b3e6bfbb9 | ||
|
5a55d1db24 | ||
|
bd252dbc16 | ||
|
30124855e3 | ||
|
463ebd296f | ||
|
2e7a17560d | ||
|
374d5a074d | ||
|
88b294d873 | ||
|
0aa6d5b322 | ||
|
1357074dcd | ||
|
4a03847c14 | ||
|
346289fdb2 | ||
|
673c7d98f6 | ||
|
9473fb849a | ||
|
f60e244739 | ||
|
a571106f0f | ||
|
244d9be46e | ||
|
dcf71c6fdf | ||
|
1e1497ff4e | ||
|
b72aa92e55 | ||
|
527f18c1e3 | ||
|
788003dcdc | ||
|
c764ddd3be | ||
|
057ac0691c | ||
|
4334e9bed7 | ||
|
a9bb87b0c6 | ||
|
43f668dc65 | ||
|
6ed5892cf9 | ||
|
023a3fdade | ||
|
1b52147a05 | ||
|
7f7644c92f | ||
|
70b756baaf | ||
|
0f008b9b1e | ||
|
4d956858de | ||
|
959370a204 | ||
|
336829cd24 | ||
|
5975ab5170 | ||
|
eba0e942e8 | ||
|
f45c20db1e | ||
|
79afe09d8d | ||
|
334d010a24 | ||
|
91947daa5b | ||
|
aad2ca4488 | ||
|
7c68a96f7b | ||
|
2e1e8b5d39 | ||
|
178df1ed4a | ||
|
28749e2513 | ||
|
6cbe57ef40 | ||
|
13d3b86309 | ||
|
cf8f43cdf2 | ||
|
cc83268b2c | ||
|
8f23b47a78 | ||
|
529611170c | ||
|
c1114e889e | ||
|
d20e03a7b6 | ||
|
6303233bdf | ||
|
baa8c00144 | ||
|
e6daaa5b6d | ||
|
f711fcfd52 | ||
|
74992e95f2 | ||
|
20c8c1043f | ||
|
f00898afba | ||
|
95b431535e | ||
|
cafd8a9674 | ||
|
e1e7f914f9 | ||
|
19c2f7d2bf | ||
|
7daacd9b66 | ||
|
af715de566 | ||
|
93e3c89f20 | ||
|
b0456c5252 | ||
|
f7fa03ddd8 | ||
|
4c78e23a9c | ||
|
79c2065471 | ||
|
c19b89ac93 | ||
|
62a1837d61 | ||
|
56b34aa624 | ||
|
e8392155f9 | ||
|
6d532470e6 | ||
|
15f683ef7e | ||
|
18ba2e563e | ||
|
63984f1c37 | ||
|
3c082dcf0e | ||
|
090eb55226 | ||
|
4706cd44de | ||
|
cf7c01e5d0 | ||
|
0b5e0a268a | ||
|
9eea4497e5 | ||
|
63fdc2487f | ||
|
cf59da7e0c | ||
|
e0621affb6 | ||
|
6d0906c37b | ||
|
a3ede0c6f6 | ||
|
72eab3c0eb | ||
|
c530961546 | ||
|
dd7aba0b51 | ||
|
7c54e17a30 | ||
|
342d72b0a6 | ||
|
22ee504e52 | ||
|
4880ee850e | ||
|
b45ce27817 | ||
|
dfad93d9ec | ||
|
52712c8cb2 | ||
|
740874e654 | ||
|
0f1f37a5df | ||
|
d609cbfb16 | ||
|
2375857c92 | ||
|
10275eb832 | ||
|
108867b2ef | ||
|
e5a77a86f9 | ||
|
309d3e8e95 | ||
|
1ef9b83180 | ||
|
85757e1a20 | ||
|
e2a18e0e7c | ||
|
056af8fd8a | ||
|
c72a63f218 | ||
|
fb823ed422 | ||
|
3fae6c0cac | ||
|
55b1e22d37 | ||
|
e6b95c7894 | ||
|
ea2f9e4919 | ||
|
08bd405e29 | ||
|
8294b2d526 | ||
|
b521fb8fae | ||
|
3e9789d5e6 | ||
|
13b029d7f0 | ||
|
59427ba5c2 | ||
|
46bba9d799 | ||
|
0ef1d1834f | ||
|
e39b2f5355 | ||
|
03dae53714 | ||
|
6be6187532 | ||
|
4c26f613ee | ||
|
765de2eeba | ||
|
49b1fef7ff | ||
|
36157afc6a | ||
|
c5c3638dbc | ||
|
926665a8f5 | ||
|
e35743ff42 | ||
|
321743dbf6 | ||
|
c2e1e25489 | ||
|
222387adba | ||
|
335414f25a | ||
|
ea903c105d | ||
|
aab29852b4 | ||
|
aa17ea0b68 | ||
|
deeb5bf118 | ||
|
47d5e8d169 | ||
|
033d61abbb | ||
|
28efc15820 | ||
|
1c7988fad2 | ||
|
c8077762ba | ||
|
ea53b34cbb | ||
|
270ac87e65 | ||
|
0a60f63bf8 | ||
|
38ed70243e | ||
|
0f2a9a9b37 | ||
|
ec525849fc | ||
|
dee1e1a79d | ||
|
98b5ed9e5b | ||
|
d8eb084240 | ||
|
c2f5fbe7d3 | ||
|
60f6542a1b | ||
|
93c2edf76c | ||
|
f74f4c5719 | ||
|
8c67c347e1 | ||
|
fcbc341f03 | ||
|
2dbce10483 | ||
|
8504b3e3a9 | ||
|
d4ab5dcefd | ||
|
5d11e285bc | ||
|
259e1350d5 | ||
|
dd54ec6122 | ||
|
c2b3791336 | ||
|
fc1f15cc14 | ||
|
5d74979f50 | ||
|
5dea7e5b41 | ||
|
a53a8a8529 | ||
|
aac7a2691d | ||
|
10e7be1729 | ||
|
9b1319f970 | ||
|
a38f909919 | ||
|
d8c0192f54 | ||
|
1e8d294b8d | ||
|
d3be64114b | ||
|
1bddd4da8e | ||
|
6b5ff2680b | ||
|
efe17f638a | ||
|
3c1f4b7377 | ||
|
acfc214eb1 | ||
|
fe1c605c11 | ||
|
891cd94031 | ||
|
c620d57f42 | ||
|
b076c92eb0 | ||
|
9e35216e98 | ||
|
3fa4734ba7 | ||
|
0144d09325 | ||
|
f28274aded | ||
|
d5f5df82b6 | ||
|
49c27aff2d | ||
|
7b1b0cfef9 | ||
|
f728bdeb5a | ||
|
4712a826d1 | ||
|
d7335d71ea | ||
|
e6a84ab387 | ||
|
fd5269490d | ||
|
05e307136c | ||
|
2c41215e84 | ||
|
d9dc394e7f | ||
|
a63daf6166 | ||
|
f878af0d3b | ||
|
def0578421 | ||
|
a2e07b1518 | ||
|
dc26ce308d | ||
|
0189b91d3b | ||
|
fb6706648e | ||
|
3c20fd7533 | ||
|
82f89ef614 | ||
|
4d10ae91b7 | ||
|
aebb677c21 | ||
|
abf9c65b21 | ||
|
524dcc7d97 | ||
|
0a4f6fd6b8 | ||
|
9c4beab0a7 | ||
|
b91e019416 | ||
|
ad97e33ec0 | ||
|
b1479b5dae | ||
|
f1445b0132 | ||
|
456dbfd29d | ||
|
0eea776b8b | ||
|
853a97307b | ||
|
3b28b5d07a | ||
|
a7bfa503d9 | ||
|
a7c3d32370 | ||
|
c64ddbec1f | ||
|
6535f86001 | ||
|
531abc9f3d | ||
|
f7a02bdc2a | ||
|
af38f31147 | ||
|
4b4b5ef319 | ||
|
88fd76f0f1 | ||
|
3d1d064720 | ||
|
9ca8161588 | ||
|
5eb2b2fc5e | ||
|
d991df89c8 | ||
|
49339ea9b0 | ||
|
561359b14f | ||
|
79a4eec96e | ||
|
dd11f98be7 | ||
|
40e2bf7cac | ||
|
73e3a11be9 | ||
|
a180c37c58 | ||
|
aff802713e | ||
|
ebc7fad1fa | ||
|
5068fc76c1 | ||
|
70b6e39cd7 | ||
|
31fc915b51 | ||
|
dfed56ed1b | ||
|
7f6d2877fb | ||
|
d9315dcbfe | ||
|
6fbf4ec6f1 | ||
|
2e32acc3c9 | ||
|
328216534b | ||
|
dea6e2c83f | ||
|
31f4f08e54 | ||
|
c4f2519b6f | ||
|
0359a98681 | ||
|
c69b24c1d2 | ||
|
d50c560ed2 | ||
|
21ffd70523 | ||
|
664e9fe8da | ||
|
c948490eb6 | ||
|
5b3bcc7611 | ||
|
c7d9ca9a61 | ||
|
259bad4487 | ||
|
73d3a82519 | ||
|
6f4ca53907 | ||
|
5111aaa123 | ||
|
c903b82b7b | ||
|
ed00d97ff9 | ||
|
9939ed0aaf | ||
|
8ea32714f6 | ||
|
f9fb77690b | ||
|
98b28c75b7 | ||
|
405be07ba8 | ||
|
5a84e222fd | ||
|
36b0cf04ba | ||
|
70c11d6634 | ||
|
eebfb0cb40 | ||
|
2500cc55e2 | ||
|
c3b99c322d | ||
|
976128a435 | ||
|
3be55adaeb | ||
|
141a828947 | ||
|
0386d5e09f | ||
|
17d308cfde | ||
|
c540e3ff71 | ||
|
8641cbd619 | ||
|
70f76cd538 | ||
|
420a765295 | ||
|
c926d85c8b | ||
|
7668a854f7 | ||
|
c30e1c1973 | ||
|
bd556f1934 | ||
|
9530e928d5 | ||
|
ae367aa736 | ||
|
3ccff2969b | ||
|
530abb1da6 | ||
|
9fe70fb8d8 | ||
|
b0215a23fb | ||
|
48735b1a5b | ||
|
3c0b802667 | ||
|
9bfad07f8c | ||
|
5c91da80e1 | ||
|
e465c93ffc | ||
|
8e56fa4ef8 |
@@ -301,7 +301,6 @@ PUSHER_ID=
|
|||||||
DEMO_USERNAME=
|
DEMO_USERNAME=
|
||||||
DEMO_PASSWORD=
|
DEMO_PASSWORD=
|
||||||
USE_ENCRYPTION=false
|
USE_ENCRYPTION=false
|
||||||
IS_HEROKU=false
|
|
||||||
FIREFLY_III_LAYOUT=v1
|
FIREFLY_III_LAYOUT=v1
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -51,8 +51,8 @@ services:
|
|||||||
# Looks for unused imports from other namespaces.
|
# Looks for unused imports from other namespaces.
|
||||||
Nette\CodingStandard\Sniffs\Namespaces\UnusedUsesSniff:
|
Nette\CodingStandard\Sniffs\Namespaces\UnusedUsesSniff:
|
||||||
searchAnnotations: yes
|
searchAnnotations: yes
|
||||||
ignoredAnnotationNames: ['@testCase']
|
ignoredAnnotationNames: [ '@testCase' ]
|
||||||
ignoredAnnotations: ['@internal']
|
ignoredAnnotations: [ '@internal' ]
|
||||||
|
|
||||||
# Language Construct (should be placed before some other fixers)
|
# Language Construct (should be placed before some other fixers)
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ services:
|
|||||||
|
|
||||||
# There MUST NOT be more than one property declared per statement.
|
# There MUST NOT be more than one property declared per statement.
|
||||||
PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer:
|
PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer:
|
||||||
elements: ['property']
|
elements: [ 'property' ]
|
||||||
|
|
||||||
# Methods - https://nette.org/en/coding-standard#toc-methods
|
# Methods - https://nette.org/en/coding-standard#toc-methods
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@ services:
|
|||||||
PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer: ~
|
PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer: ~
|
||||||
# Single-line comments comments with only one line of actual content should use the `//` syntax.
|
# Single-line comments comments with only one line of actual content should use the `//` syntax.
|
||||||
PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer:
|
PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer:
|
||||||
comment_types: ['hash']
|
comment_types: [ 'hash' ]
|
||||||
# Require comments with single-line content to be written as one-liners
|
# Require comments with single-line content to be written as one-liners
|
||||||
SlevomatCodingStandard\Sniffs\Commenting\RequireOneLinePropertyDocCommentSniff: ~
|
SlevomatCodingStandard\Sniffs\Commenting\RequireOneLinePropertyDocCommentSniff: ~
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ services:
|
|||||||
PhpCsFixer\Fixer\Operator\TernaryToNullCoalescingFixer: ~
|
PhpCsFixer\Fixer\Operator\TernaryToNullCoalescingFixer: ~
|
||||||
|
|
||||||
Nette\CodingStandard\Fixer\ClassNotation\ClassAndTraitVisibilityRequiredFixer:
|
Nette\CodingStandard\Fixer\ClassNotation\ClassAndTraitVisibilityRequiredFixer:
|
||||||
elements: ['const', 'property', 'method']
|
elements: [ 'const', 'property', 'method' ]
|
||||||
|
|
||||||
# short list() syntax []
|
# short list() syntax []
|
||||||
PhpCsFixer\Fixer\ListNotation\ListSyntaxFixer:
|
PhpCsFixer\Fixer\ListNotation\ListSyntaxFixer:
|
||||||
|
1
.ci/php-cs-fixer/.gitignore
vendored
1
.ci/php-cs-fixer/.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
vendor
|
vendor
|
||||||
|
.php-cs-fixer.cache
|
||||||
|
@@ -37,8 +37,8 @@ $finder = PhpCsFixer\Finder::create()
|
|||||||
$config = new PhpCsFixer\Config();
|
$config = new PhpCsFixer\Config();
|
||||||
return $config->setRules([
|
return $config->setRules([
|
||||||
'@PSR12' => true,
|
'@PSR12' => true,
|
||||||
|
'declare_strict_types' => true,
|
||||||
'strict_param' => true,
|
'strict_param' => true,
|
||||||
'array_syntax' => ['syntax' => 'short'],
|
'array_syntax' => ['syntax' => 'short'],
|
||||||
])
|
])
|
||||||
->setFinder($finder)
|
->setFinder($finder);
|
||||||
;
|
|
||||||
|
523
.ci/php-cs-fixer/composer.lock
generated
523
.ci/php-cs-fixer/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,8 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|||||||
|
|
||||||
# clean up php code
|
# clean up php code
|
||||||
cd $SCRIPT_DIR/php-cs-fixer
|
cd $SCRIPT_DIR/php-cs-fixer
|
||||||
composer update
|
composer update --quiet
|
||||||
|
rm -f .php-cs-fixer.cache
|
||||||
PHP_CS_FIXER_IGNORE_ENV=true ./vendor/bin/php-cs-fixer fix --config $SCRIPT_DIR/php-cs-fixer/.php-cs-fixer.php --allow-risky=yes
|
PHP_CS_FIXER_IGNORE_ENV=true ./vendor/bin/php-cs-fixer fix --config $SCRIPT_DIR/php-cs-fixer/.php-cs-fixer.php --allow-risky=yes
|
||||||
cd $SCRIPT_DIR/..
|
cd $SCRIPT_DIR/..
|
||||||
|
|
||||||
|
37
.ci/phpmd.sh
Normal file
37
.ci/phpmd.sh
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# phpmd.sh
|
||||||
|
# Copyright (c) 2023 james@firefly-iii.org
|
||||||
|
#
|
||||||
|
# This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
|
||||||
|
cd $SCRIPT_DIR/phpmd
|
||||||
|
composer update --quiet
|
||||||
|
./vendor/bin/phpmd \
|
||||||
|
$SCRIPT_DIR/../app text phpmd.xml \
|
||||||
|
--exclude $SCRIPT_DIR/../app/resources/** \
|
||||||
|
--exclude $SCRIPT_DIR/../app/frontend/** \
|
||||||
|
--exclude $SCRIPT_DIR/../app/public/** \
|
||||||
|
--exclude $SCRIPT_DIR/../app/vendor/** \
|
||||||
|
|
||||||
|
cd $SCRIPT_DIR/..
|
||||||
|
|
||||||
|
exit 0
|
1
.ci/phpmd/.gitignore
vendored
Normal file
1
.ci/phpmd/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
vendor
|
5
.ci/phpmd/composer.json
Normal file
5
.ci/phpmd/composer.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"require-dev": {
|
||||||
|
"phpmd/phpmd": "^2.13"
|
||||||
|
}
|
||||||
|
}
|
1012
.ci/phpmd/composer.lock
generated
Normal file
1012
.ci/phpmd/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
72
.ci/phpmd/phpmd.xml
Normal file
72
.ci/phpmd/phpmd.xml
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ phpmd.xml
|
||||||
|
~ Copyright (c) 2023 james@firefly-iii.org
|
||||||
|
~
|
||||||
|
~ This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
|
~
|
||||||
|
~ This program is free software: you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU Affero General Public License as
|
||||||
|
~ published by the Free Software Foundation, either version 3 of the
|
||||||
|
~ License, or (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This program is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
~ GNU Affero General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU Affero General Public License
|
||||||
|
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<ruleset name="pcsg-generated-ruleset"
|
||||||
|
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
|
||||||
|
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
|
||||||
|
<description>Bla bla</description>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Commando vanuit firefly directory:
|
||||||
|
phpmd database,app,tests html /gdrive-all/development/phpmd/phpmd.xml > public/report.html
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Import the entire controversial code rule set -->
|
||||||
|
<rule ref="rulesets/controversial.xml">
|
||||||
|
<exclude name="CamelCasePropertyName" />
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- clean code -->
|
||||||
|
<rule ref="rulesets/codesize.xml" />
|
||||||
|
<rule ref="rulesets/design.xml" />
|
||||||
|
<rule ref="rulesets/naming.xml" />
|
||||||
|
<rule ref="rulesets/unusedcode.xml" />
|
||||||
|
|
||||||
|
<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
|
||||||
|
<properties>
|
||||||
|
<property name="reportLevel" value="5"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
<rule ref="rulesets/codesize.xml/NPathComplexity">
|
||||||
|
<properties>
|
||||||
|
<property name="minimum" value="128"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength">
|
||||||
|
<properties>
|
||||||
|
<property name="minimum" value="40"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
<rule ref="rulesets/codesize.xml/ExcessiveParameterList">
|
||||||
|
<properties>
|
||||||
|
<property name="minimum" value="5"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<!-- include clean code manually -->
|
||||||
|
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" />
|
||||||
|
<rule ref="rulesets/cleancode.xml/ElseExpression" />
|
||||||
|
|
||||||
|
<!-- no this one -->
|
||||||
|
<!--<rule ref="rulesets/cleancode.xml/StaticAccess" />-->
|
||||||
|
</ruleset>
|
@@ -59,3 +59,5 @@ fi
|
|||||||
|
|
||||||
# restore .env file
|
# restore .env file
|
||||||
mv $SCRIPT_DIR/../.env.backup $SCRIPT_DIR/../.env
|
mv $SCRIPT_DIR/../.env.backup $SCRIPT_DIR/../.env
|
||||||
|
|
||||||
|
cd $SCRIPT_DIR/..
|
||||||
|
@@ -1,321 +0,0 @@
|
|||||||
# You can leave this on "local". If you change it to production most console commands will ask for extra confirmation.
|
|
||||||
# Never set it to "testing".
|
|
||||||
APP_ENV=heroku
|
|
||||||
|
|
||||||
# Set to true if you want to see debug information in error screens.
|
|
||||||
APP_DEBUG=false
|
|
||||||
|
|
||||||
# This should be your email address.
|
|
||||||
# If you use Docker or similar, you can set this variable from a file by using SITE_OWNER_FILE
|
|
||||||
SITE_OWNER=heroku@example.com
|
|
||||||
|
|
||||||
# The encryption key for your sessions. Keep this very secure.
|
|
||||||
# If you generate a new one all existing attachments must be considered LOST.
|
|
||||||
# Change it to a string of exactly 32 chars or use something like `php artisan key:generate` to generate it.
|
|
||||||
# If you use Docker or similar, you can set this variable from a file by using APP_KEY_FILE
|
|
||||||
APP_KEY=7ahyYVPVsmxjdhsweWCauGeJfwc92NP2
|
|
||||||
|
|
||||||
#
|
|
||||||
# Firefly III will launch using this language (for new users and unauthenticated visitors)
|
|
||||||
# For a list of available languages: https://github.com/firefly-iii/firefly-iii/tree/main/resources/lang
|
|
||||||
#
|
|
||||||
# If text is still in English, remember that not everything may have been translated.
|
|
||||||
DEFAULT_LANGUAGE=en_US
|
|
||||||
|
|
||||||
# The locale defines how numbers are formatted.
|
|
||||||
# by default this value is the same as whatever the language is.
|
|
||||||
DEFAULT_LOCALE=equal
|
|
||||||
|
|
||||||
# Change this value to your preferred time zone.
|
|
||||||
# Example: Europe/Amsterdam
|
|
||||||
# For a list of supported time zones, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
||||||
TZ=UTC
|
|
||||||
|
|
||||||
# TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy.
|
|
||||||
# Set it to ** and reverse proxies work just fine.
|
|
||||||
TRUSTED_PROXIES=**
|
|
||||||
|
|
||||||
# The log channel defines where your log entries go to.
|
|
||||||
# Several other options exist. You can use 'single' for one big fat error log (not recommended).
|
|
||||||
# Also available are 'syslog', 'errorlog' and 'stdout' which will log to the system itself.
|
|
||||||
# A rotating log option is 'daily', creates 5 files that (surprise) rotate.
|
|
||||||
# Default setting 'stack' will log to 'daily' and to 'stdout' at the same time.
|
|
||||||
|
|
||||||
# - Docker + versions <= 4.8.1.8 and before: use "stdout"
|
|
||||||
# - Docker + versions > 4.8.1.8 : use "docker_out"
|
|
||||||
# - Docker + versions >= 5.1.1 : use "stack"
|
|
||||||
# - For everything else (als not Docker) : use 'stack'
|
|
||||||
|
|
||||||
LOG_CHANNEL=stdout
|
|
||||||
|
|
||||||
# Log level. You can set this from least severe to most severe:
|
|
||||||
# debug, info, notice, warning, error, critical, alert, emergency
|
|
||||||
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
|
|
||||||
# nothing will get logged, ever.
|
|
||||||
APP_LOG_LEVEL=notice
|
|
||||||
|
|
||||||
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
|
||||||
# For other database types, please see the FAQ: https://docs.firefly-iii.org/support/faq
|
|
||||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
|
||||||
# Use "pgsql" for PostgreSQL
|
|
||||||
# Use "mysql" for MySQL and MariaDB.
|
|
||||||
# Use "sqlite" for SQLite.
|
|
||||||
DB_CONNECTION=pgsql
|
|
||||||
|
|
||||||
|
|
||||||
# MySQL supports SSL. You can configure it here.
|
|
||||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
|
||||||
MYSQL_USE_SSL=false
|
|
||||||
MYSQL_SSL_VERIFY_SERVER_CERT=true
|
|
||||||
# You need to set at least of these options
|
|
||||||
MYSQL_SSL_CAPATH=/etc/ssl/certs/
|
|
||||||
MYSQL_SSL_CA=
|
|
||||||
MYSQL_SSL_CERT=
|
|
||||||
MYSQL_SSL_KEY=
|
|
||||||
MYSQL_SSL_CIPHER=
|
|
||||||
|
|
||||||
# PostgreSQL supports SSL. You can configure it here.
|
|
||||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
|
||||||
PGSQL_SSL_MODE=prefer
|
|
||||||
PGSQL_SSL_ROOT_CERT=null
|
|
||||||
PGSQL_SSL_CERT=null
|
|
||||||
PGSQL_SSL_KEY=null
|
|
||||||
PGSQL_SSL_CRL_FILE=null
|
|
||||||
|
|
||||||
# If you're looking for performance improvements, you could install memcached.
|
|
||||||
CACHE_DRIVER=file
|
|
||||||
SESSION_DRIVER=file
|
|
||||||
|
|
||||||
# If you set either of these to 'redis', you might want to update these settings too
|
|
||||||
# If you use Docker or similar, you can set REDIS_HOST_FILE, REDIS_PASSWORD_FILE or
|
|
||||||
# REDIS_PORT_FILE to set the value from a file instead of from an environment variable
|
|
||||||
|
|
||||||
# can be tcp, unix or http
|
|
||||||
REDIS_SCHEME=tcp
|
|
||||||
|
|
||||||
# use only when using 'unix' for REDIS_SCHEME. Leave empty otherwise.
|
|
||||||
REDIS_PATH=
|
|
||||||
|
|
||||||
# use only when using 'tcp' or 'http' for REDIS_SCHEME. Leave empty otherwise.
|
|
||||||
REDIS_HOST=127.0.0.1
|
|
||||||
REDIS_PORT=6379
|
|
||||||
|
|
||||||
REDIS_PASSWORD=null
|
|
||||||
# always use quotes and make sure redis db "0" and "1" exists. Otherwise change accordingly.
|
|
||||||
REDIS_DB="0"
|
|
||||||
REDIS_CACHE_DB="1"
|
|
||||||
|
|
||||||
# Cookie settings. Should not be necessary to change these.
|
|
||||||
# If you use Docker or similar, you can set COOKIE_DOMAIN_FILE to set
|
|
||||||
# the value from a file instead of from an environment variable
|
|
||||||
COOKIE_PATH="/"
|
|
||||||
COOKIE_DOMAIN=
|
|
||||||
COOKIE_SECURE=false
|
|
||||||
|
|
||||||
# If you want Firefly III to mail you, update these settings
|
|
||||||
# For instructions, see: https://docs.firefly-iii.org/advanced-installation/email
|
|
||||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
|
||||||
MAIL_MAILER=log
|
|
||||||
MAIL_HOST=null
|
|
||||||
MAIL_PORT=2525
|
|
||||||
MAIL_FROM=changeme@example.com
|
|
||||||
MAIL_USERNAME=null
|
|
||||||
MAIL_PASSWORD=null
|
|
||||||
MAIL_ENCRYPTION=null
|
|
||||||
|
|
||||||
# Other mail drivers:
|
|
||||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
|
||||||
MAILGUN_DOMAIN=
|
|
||||||
MAILGUN_SECRET=
|
|
||||||
|
|
||||||
|
|
||||||
# If you are on EU region in mailgun, use api.eu.mailgun.net, otherwise use api.mailgun.net
|
|
||||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
|
||||||
MAILGUN_ENDPOINT=api.mailgun.net
|
|
||||||
|
|
||||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
|
||||||
MANDRILL_SECRET=
|
|
||||||
SPARKPOST_SECRET=
|
|
||||||
|
|
||||||
|
|
||||||
# Firefly III can send you the following messages
|
|
||||||
SEND_REGISTRATION_MAIL=true
|
|
||||||
SEND_ERROR_MESSAGE=true
|
|
||||||
|
|
||||||
# These messages contain (sensitive) transaction information:
|
|
||||||
SEND_REPORT_JOURNALS=true
|
|
||||||
|
|
||||||
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
|
|
||||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
|
||||||
MAPBOX_API_KEY=
|
|
||||||
|
|
||||||
# The map will default to this location:
|
|
||||||
MAP_DEFAULT_LAT=51.983333
|
|
||||||
MAP_DEFAULT_LONG=5.916667
|
|
||||||
MAP_DEFAULT_ZOOM=6
|
|
||||||
|
|
||||||
# Firefly III currently supports two provider for live Currency Exchange Rates:
|
|
||||||
# "fixer", and "ratesapi".
|
|
||||||
# RatesApi.IO (see https://ratesapi.io) is a FREE and OPEN SOURCE live currency exchange rates,
|
|
||||||
# built compatible with Fixer.IO, based on data published by European Central Bank, and doesn't require API key.
|
|
||||||
CER_PROVIDER=ratesapi
|
|
||||||
|
|
||||||
# If you have select "fixer" as default currency exchange rates,
|
|
||||||
# set a Fixer IO API key here (see https://fixer.io) to enable live currency exchange rates.
|
|
||||||
# Please note that this WILL ONLY WORK FOR PAID fixer.io accounts because they severely limited
|
|
||||||
# the free API up to the point where you might as well offer nothing.
|
|
||||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
|
||||||
FIXER_API_KEY=
|
|
||||||
|
|
||||||
# Firefly III has two options for user authentication. "eloquent" is the default,
|
|
||||||
# and "ldap" for LDAP servers.
|
|
||||||
# For full instructions on these settings please visit:
|
|
||||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
|
||||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
|
||||||
LOGIN_PROVIDER=eloquent
|
|
||||||
|
|
||||||
#
|
|
||||||
# It's also possible to change the way users are authenticated. You could use Authelia for example.
|
|
||||||
# Authentication via the REMOTE_USER header is supported. Change the value below to "remote_user_guard".
|
|
||||||
#
|
|
||||||
# If you do this please read the documentation for instructions and warnings:
|
|
||||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
|
||||||
#
|
|
||||||
# This function is available in Firefly III v5.3.0 and higher.
|
|
||||||
AUTHENTICATION_GUARD=web
|
|
||||||
|
|
||||||
#
|
|
||||||
# Likewise, it's impossible to log out users who's authentication is handled by an external system.
|
|
||||||
# Enter a custom URL here that will force a logout (your authentication provider can tell you).
|
|
||||||
# Setting this variable only works when AUTHENTICATION_GUARD != web
|
|
||||||
#
|
|
||||||
CUSTOM_LOGOUT_URL=
|
|
||||||
|
|
||||||
# LDAP connection configuration
|
|
||||||
# OpenLDAP, FreeIPA or ActiveDirectory
|
|
||||||
# # If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
|
||||||
ADLDAP_CONNECTION_SCHEME=OpenLDAP
|
|
||||||
ADLDAP_AUTO_CONNECT=true
|
|
||||||
|
|
||||||
# LDAP connection settings
|
|
||||||
# You can set the following variables from a file by appending them with _FILE:
|
|
||||||
# ADLDAP_CONTROLLERS, ADLDAP_PORT, ADLDAP_BASEDN
|
|
||||||
ADLDAP_CONTROLLERS=
|
|
||||||
ADLDAP_PORT=389
|
|
||||||
ADLDAP_TIMEOUT=5
|
|
||||||
ADLDAP_BASEDN=""
|
|
||||||
ADLDAP_FOLLOW_REFFERALS=false
|
|
||||||
|
|
||||||
# SSL/TLS settings
|
|
||||||
ADLDAP_USE_SSL=false
|
|
||||||
ADLDAP_USE_TLS=false
|
|
||||||
ADLDAP_SSL_CACERTDIR=
|
|
||||||
ADLDAP_SSL_CACERTFILE=
|
|
||||||
ADLDAP_SSL_CERTFILE=
|
|
||||||
ADLDAP_SSL_KEYFILE=
|
|
||||||
ADLDAP_SSL_CIPHER_SUITE=
|
|
||||||
ADLDAP_SSL_REQUIRE_CERT=
|
|
||||||
|
|
||||||
# You can set the following variables from a file by appending them with _FILE:
|
|
||||||
ADLDAP_ADMIN_USERNAME=
|
|
||||||
ADLDAP_ADMIN_PASSWORD=
|
|
||||||
|
|
||||||
# You can set the following variables from a file by appending them with _FILE:
|
|
||||||
ADLDAP_ACCOUNT_PREFIX=
|
|
||||||
ADLDAP_ACCOUNT_SUFFIX=
|
|
||||||
|
|
||||||
|
|
||||||
# LDAP authentication settings.
|
|
||||||
ADLDAP_PASSWORD_SYNC=false
|
|
||||||
ADLDAP_LOGIN_FALLBACK=false
|
|
||||||
|
|
||||||
ADLDAP_DISCOVER_FIELD=distinguishedname
|
|
||||||
ADLDAP_AUTH_FIELD=distinguishedname
|
|
||||||
|
|
||||||
# Will allow SSO if your server provides an AUTH_USER field.
|
|
||||||
# You can set the following variables from a file by appending them with _FILE:
|
|
||||||
WINDOWS_SSO_ENABLED=false
|
|
||||||
WINDOWS_SSO_DISCOVER=samaccountname
|
|
||||||
WINDOWS_SSO_KEY=AUTH_USER
|
|
||||||
|
|
||||||
# field to sync as local username.
|
|
||||||
# You can set the following variable from a file by appending it with _FILE:
|
|
||||||
ADLDAP_SYNC_FIELD=userprincipalname
|
|
||||||
|
|
||||||
# You can disable the X-Frame-Options header if it interferes with tools like
|
|
||||||
# Organizr. This is at your own risk. Applications running in frames run the risk
|
|
||||||
# of leaking information to their parent frame.
|
|
||||||
DISABLE_FRAME_HEADER=false
|
|
||||||
|
|
||||||
# You can disable the Content Security Policy header when you're using an ancient browser
|
|
||||||
# or any version of Microsoft Edge / Internet Explorer (which amounts to the same thing really)
|
|
||||||
# This leaves you with the risk of not being able to stop XSS bugs should they ever surface.
|
|
||||||
# This is at your own risk.
|
|
||||||
DISABLE_CSP_HEADER=false
|
|
||||||
|
|
||||||
# If you wish to track your own behavior over Firefly III, set valid analytics tracker information here.
|
|
||||||
# Nobody uses this except for me on the demo site. But hey, feel free to use this if you want to.
|
|
||||||
# Do not prepend the TRACKER_URL with http:// or https://
|
|
||||||
# The only tracker supported is Matomo.
|
|
||||||
# You can set the following variables from a file by appending them with _FILE:
|
|
||||||
TRACKER_SITE_ID=
|
|
||||||
TRACKER_URL=
|
|
||||||
|
|
||||||
# You can fine tune the start-up of a Docker container by editing these environment variables.
|
|
||||||
# Use this at your own risk. Disabling certain checks and features may result in lost of inconsistent data.
|
|
||||||
# However if you know what you're doing you can significantly speed up container start times.
|
|
||||||
# Set each value to true to enable, or false to disable.
|
|
||||||
|
|
||||||
# Check if the SQLite database exists. Can be skipped if you're not using SQLite.
|
|
||||||
# Won't significantly speed up things.
|
|
||||||
DKR_CHECK_SQLITE=true
|
|
||||||
|
|
||||||
# Run database creation and migration commands. Disable this only if you're 100% sure the DB exists
|
|
||||||
# and is up to date.
|
|
||||||
DKR_RUN_MIGRATION=true
|
|
||||||
|
|
||||||
# Run database upgrade commands. Disable this only when you're 100% sure your DB is up-to-date
|
|
||||||
# with the latest fixes (outside of migrations!)
|
|
||||||
DKR_RUN_UPGRADE=true
|
|
||||||
|
|
||||||
# Verify database integrity. Includes all data checks and verifications.
|
|
||||||
# Disabling this makes Firefly III assume your DB is intact.
|
|
||||||
DKR_RUN_VERIFY=true
|
|
||||||
|
|
||||||
# Run database reporting commands. When disabled, Firefly III won't go over your data to report current state.
|
|
||||||
# Disabling this should have no impact on data integrity or safety but it won't warn you of possible issues.
|
|
||||||
DKR_RUN_REPORT=true
|
|
||||||
|
|
||||||
# Generate OAuth2 keys.
|
|
||||||
# When disabled, Firefly III won't attempt to generate OAuth2 Passport keys. This won't be an issue, IFF (if and only if)
|
|
||||||
# you had previously generated keys already and they're stored in your database for restoration.
|
|
||||||
DKR_RUN_PASSPORT_INSTALL=true
|
|
||||||
|
|
||||||
# Leave the following configuration vars as is.
|
|
||||||
# Unless you like to tinker and know what you're doing.
|
|
||||||
APP_NAME=FireflyIII
|
|
||||||
ADLDAP_CONNECTION=default
|
|
||||||
BROADCAST_DRIVER=log
|
|
||||||
QUEUE_DRIVER=sync
|
|
||||||
CACHE_PREFIX=firefly
|
|
||||||
SEARCH_RESULT_LIMIT=50
|
|
||||||
PUSHER_KEY=
|
|
||||||
PUSHER_SECRET=
|
|
||||||
PUSHER_ID=
|
|
||||||
DEMO_USERNAME=
|
|
||||||
DEMO_PASSWORD=
|
|
||||||
USE_ENCRYPTION=false
|
|
||||||
IS_HEROKU=false
|
|
||||||
FIREFLY_III_LAYOUT=v1
|
|
||||||
|
|
||||||
#
|
|
||||||
# If you have trouble configuring your Firefly III installation, DON'T BOTHER setting this variable.
|
|
||||||
# It won't work. It doesn't do ANYTHING. Don't believe the lies you read online. I'm not joking.
|
|
||||||
# This configuration value WILL NOT HELP.
|
|
||||||
#
|
|
||||||
# This variable is ONLY used in some of the emails Firefly III sends around. Nowhere else.
|
|
||||||
# So when configuring anything WEB related this variable doesn't do anything. Nothing
|
|
||||||
#
|
|
||||||
# If you're stuck I understand you get desperate but look SOMEWHERE ELSE.
|
|
||||||
#
|
|
||||||
APP_URL=http://localhost
|
|
@@ -1,30 +0,0 @@
|
|||||||
bg_BG
|
|
||||||
ca_ES
|
|
||||||
cs_CZ
|
|
||||||
da_DK
|
|
||||||
de_DE
|
|
||||||
el_GR
|
|
||||||
en_GB
|
|
||||||
en_US
|
|
||||||
es_ES
|
|
||||||
fi_FI
|
|
||||||
fr_FR
|
|
||||||
hu_HU
|
|
||||||
id_ID
|
|
||||||
it_IT
|
|
||||||
ja_JP
|
|
||||||
nb_NO
|
|
||||||
nl_NL
|
|
||||||
pl_PL
|
|
||||||
pt_BR
|
|
||||||
pt_PT
|
|
||||||
ro_RO
|
|
||||||
ru_RU
|
|
||||||
sk_SK
|
|
||||||
sl_SI
|
|
||||||
sv_SE
|
|
||||||
tr_TR
|
|
||||||
uk_UA
|
|
||||||
vi_VN
|
|
||||||
zh-hans_CN
|
|
||||||
zh-hant_CN
|
|
@@ -2,8 +2,17 @@ root = true
|
|||||||
|
|
||||||
[*]
|
[*]
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.{yml,yaml}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[docker-compose.yml]
|
||||||
|
indent_size = 4
|
57
.env.example
57
.env.example
@@ -45,12 +45,6 @@ TRUSTED_PROXIES=
|
|||||||
# Default setting 'stack' will log to 'daily' and to 'stdout' at the same time.
|
# Default setting 'stack' will log to 'daily' and to 'stdout' at the same time.
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
#
|
|
||||||
# Used when logging to papertrail:
|
|
||||||
#
|
|
||||||
PAPERTRAIL_HOST=
|
|
||||||
PAPERTRAIL_PORT=
|
|
||||||
|
|
||||||
# Log level. You can set this from least severe to most severe:
|
# Log level. You can set this from least severe to most severe:
|
||||||
# debug, info, notice, warning, error, critical, alert, emergency
|
# debug, info, notice, warning, error, critical, alert, emergency
|
||||||
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
|
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
|
||||||
@@ -58,11 +52,33 @@ PAPERTRAIL_PORT=
|
|||||||
APP_LOG_LEVEL=notice
|
APP_LOG_LEVEL=notice
|
||||||
|
|
||||||
# Audit log level.
|
# Audit log level.
|
||||||
# Set this to "emergency" if you dont want to store audit logs, leave on info otherwise.
|
# The audit log is used to log notable Firefly III events on a separate channel.
|
||||||
AUDIT_LOG_LEVEL=info
|
# These log entries may contain sensitive financial information.
|
||||||
|
# The audit log is disabled by default.
|
||||||
|
#
|
||||||
|
# To enable it, set AUDIT_LOG_LEVEL to "info"
|
||||||
|
# To disable it, set AUDIT_LOG_LEVEL to "emergency"
|
||||||
|
AUDIT_LOG_LEVEL=emergency
|
||||||
|
|
||||||
|
#
|
||||||
|
# If you want, you can redirect the audit logs to another channel.
|
||||||
|
# Set 'audit_stdout', 'audit_syslog', 'audit_errorlog' to log to the system itself.
|
||||||
|
# Use audit_daily to log to a rotating file.
|
||||||
|
# Use audit_papertrail to log to papertrail.
|
||||||
|
#
|
||||||
|
# If you do this, the audit logs may be mixed with normal logs because the settings for these channels
|
||||||
|
# are often the same as the settings for the normal logs.
|
||||||
|
AUDIT_LOG_CHANNEL=
|
||||||
|
|
||||||
|
#
|
||||||
|
# Used when logging to papertrail:
|
||||||
|
# Also used when audit logs log to papertrail:
|
||||||
|
#
|
||||||
|
PAPERTRAIL_HOST=
|
||||||
|
PAPERTRAIL_PORT=
|
||||||
|
|
||||||
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
||||||
# For other database types, please see the FAQ: https://docs.firefly-iii.org/support/faq
|
# For other database types, please see the FAQ: https://docs.firefly-iii.org/firefly-iii/faq/self-hosted/#i-want-to-use-sqlite
|
||||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||||
# Use "pgsql" for PostgreSQL
|
# Use "pgsql" for PostgreSQL
|
||||||
# Use "mysql" for MySQL and MariaDB.
|
# Use "mysql" for MySQL and MariaDB.
|
||||||
@@ -134,7 +150,7 @@ COOKIE_SECURE=false
|
|||||||
COOKIE_SAMESITE=lax
|
COOKIE_SAMESITE=lax
|
||||||
|
|
||||||
# If you want Firefly III to email you, update these settings
|
# If you want Firefly III to email you, update these settings
|
||||||
# For instructions, see: https://docs.firefly-iii.org/advanced-installation/email
|
# For instructions, see: https://docs.firefly-iii.org/firefly-iii/advanced-installation/email/#email
|
||||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||||
MAIL_MAILER=log
|
MAIL_MAILER=log
|
||||||
MAIL_HOST=null
|
MAIL_HOST=null
|
||||||
@@ -143,6 +159,7 @@ MAIL_FROM=changeme@example.com
|
|||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_SENDMAIL_COMMAND=
|
||||||
|
|
||||||
# Other mail drivers:
|
# Other mail drivers:
|
||||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||||
@@ -163,9 +180,8 @@ SEND_ERROR_MESSAGE=true
|
|||||||
# These messages contain (sensitive) transaction information:
|
# These messages contain (sensitive) transaction information:
|
||||||
SEND_REPORT_JOURNALS=true
|
SEND_REPORT_JOURNALS=true
|
||||||
|
|
||||||
# Set this value to true if you want to set the location
|
# Set this value to true if you want to set the location of certain things, like transactions.
|
||||||
# of certain things, like transactions. Since this involves an external service, it's optional
|
# Since this involves an external service, it's optional and disabled by default.
|
||||||
# and disabled by default.
|
|
||||||
ENABLE_EXTERNAL_MAP=false
|
ENABLE_EXTERNAL_MAP=false
|
||||||
|
|
||||||
# Set this value to true if you want Firefly III to download currency exchange rates
|
# Set this value to true if you want Firefly III to download currency exchange rates
|
||||||
@@ -179,6 +195,16 @@ MAP_DEFAULT_LAT=51.983333
|
|||||||
MAP_DEFAULT_LONG=5.916667
|
MAP_DEFAULT_LONG=5.916667
|
||||||
MAP_DEFAULT_ZOOM=6
|
MAP_DEFAULT_ZOOM=6
|
||||||
|
|
||||||
|
#
|
||||||
|
# Some objects have room for an URL, like transactions and webhooks.
|
||||||
|
# By default, the following protocols are allowed:
|
||||||
|
# http, https, ftp, ftps, mailto
|
||||||
|
#
|
||||||
|
# To change this, set your preferred comma separated set below.
|
||||||
|
# Be sure to include http, https and other default ones if you need to.
|
||||||
|
#
|
||||||
|
VALID_URL_PROTOCOLS=
|
||||||
|
|
||||||
#
|
#
|
||||||
# Firefly III authentication settings
|
# Firefly III authentication settings
|
||||||
#
|
#
|
||||||
@@ -188,7 +214,7 @@ MAP_DEFAULT_ZOOM=6
|
|||||||
# - 'web' (default, uses built in DB)
|
# - 'web' (default, uses built in DB)
|
||||||
# - 'remote_user_guard' for Authelia etc
|
# - 'remote_user_guard' for Authelia etc
|
||||||
# Read more about these settings in the documentation.
|
# Read more about these settings in the documentation.
|
||||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
# https://docs.firefly-iii.org/firefly-iii/advanced-installation/authentication
|
||||||
#
|
#
|
||||||
# LDAP is no longer supported :(
|
# LDAP is no longer supported :(
|
||||||
#
|
#
|
||||||
@@ -241,7 +267,7 @@ ALLOW_WEBHOOKS=false
|
|||||||
#
|
#
|
||||||
# The static cron job token can be useful when you use Docker and wish to manage cron jobs.
|
# The static cron job token can be useful when you use Docker and wish to manage cron jobs.
|
||||||
# 1. Set this token to any 32-character value (this is important!).
|
# 1. Set this token to any 32-character value (this is important!).
|
||||||
# 2. Use this token in the cron URL instead of a user's command line token.
|
# 2. Use this token in the cron URL instead of a user's command line token that you can find in /profile
|
||||||
#
|
#
|
||||||
# For more info: https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/
|
# For more info: https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/
|
||||||
#
|
#
|
||||||
@@ -298,7 +324,6 @@ PUSHER_SECRET=
|
|||||||
PUSHER_ID=
|
PUSHER_ID=
|
||||||
DEMO_USERNAME=
|
DEMO_USERNAME=
|
||||||
DEMO_PASSWORD=
|
DEMO_PASSWORD=
|
||||||
IS_HEROKU=false
|
|
||||||
FIREFLY_III_LAYOUT=v1
|
FIREFLY_III_LAYOUT=v1
|
||||||
|
|
||||||
#
|
#
|
||||||
|
17
.gitattributes
vendored
17
.gitattributes
vendored
@@ -1,8 +1,11 @@
|
|||||||
* text=auto
|
* text=auto eol=lf
|
||||||
*.css linguist-vendored
|
|
||||||
*.scss linguist-vendored
|
*.blade.php diff=html
|
||||||
*.js linguist-vendored
|
*.css diff=css
|
||||||
|
*.html diff=html
|
||||||
|
*.md diff=markdown
|
||||||
|
*.php diff=php
|
||||||
|
|
||||||
|
/.github export-ignore
|
||||||
CHANGELOG.md export-ignore
|
CHANGELOG.md export-ignore
|
||||||
/tests export-ignore
|
.styleci.yml export-ignore
|
||||||
/phpunit.xml export-ignore
|
|
||||||
/.ci export-ignore
|
|
||||||
|
29
.github/code_of_conduct.md
vendored
29
.github/code_of_conduct.md
vendored
@@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
## Our Pledge
|
## Our Pledge
|
||||||
|
|
||||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
|
||||||
|
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
|
||||||
|
disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race,
|
||||||
|
religion, or sexual identity and orientation.
|
||||||
|
|
||||||
## Our Standards
|
## Our Standards
|
||||||
|
|
||||||
@@ -24,23 +27,35 @@ Examples of unacceptable behavior by participants include:
|
|||||||
|
|
||||||
## Our Responsibilities
|
## Our Responsibilities
|
||||||
|
|
||||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
|
||||||
|
appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
|
||||||
|
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
|
||||||
|
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||||
|
|
||||||
## Scope
|
## Scope
|
||||||
|
|
||||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
|
||||||
|
project or its community. Examples of representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed representative at an online or offline
|
||||||
|
event. Representation of a project may be further defined and clarified by project maintainers.
|
||||||
|
|
||||||
## Enforcement
|
## Enforcement
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at james@firefly-iii.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
|
||||||
|
james@firefly-iii.org. The project team will review and investigate all complaints, and will respond in a way that it
|
||||||
|
deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the
|
||||||
|
reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
|
||||||
|
repercussions as determined by other members of the project's leadership.
|
||||||
|
|
||||||
## Attribution
|
## Attribution
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available
|
||||||
|
at [http://contributor-covenant.org/version/1/4][version]
|
||||||
|
|
||||||
[homepage]: http://contributor-covenant.org
|
[homepage]: http://contributor-covenant.org
|
||||||
|
|
||||||
[version]: http://contributor-covenant.org/version/1/4/
|
[version]: http://contributor-covenant.org/version/1/4/
|
||||||
|
4
.github/contributing.md
vendored
4
.github/contributing.md
vendored
@@ -1,3 +1,3 @@
|
|||||||
# [Contributing guidelines](https://docs.firefly-iii.org/other-pages/contributing)
|
# [Contributing guidelines](https://docs.firefly-iii.org/firefly-iii/support/#contributing-code)
|
||||||
|
|
||||||
[Contributing guidelines](https://docs.firefly-iii.org/other-pages/contributing)
|
[Contributing guidelines](https://docs.firefly-iii.org/firefly-iii/support/#contributing-code)
|
||||||
|
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -5,7 +5,7 @@ updates:
|
|||||||
- package-ecosystem: "composer"
|
- package-ecosystem: "composer"
|
||||||
directory: "/" # Location of package manifests
|
directory: "/" # Location of package manifests
|
||||||
target-branch: develop
|
target-branch: develop
|
||||||
labels: ["bug"]
|
labels: [ "bug" ]
|
||||||
versioning-strategy: increase
|
versioning-strategy: increase
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
@@ -14,7 +14,7 @@ updates:
|
|||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
target-branch: develop
|
target-branch: develop
|
||||||
labels: ["bug"]
|
labels: [ "bug" ]
|
||||||
versioning-strategy: increase
|
versioning-strategy: increase
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
@@ -22,7 +22,7 @@ updates:
|
|||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
target-branch: develop
|
target-branch: develop
|
||||||
labels: ["bug"]
|
labels: [ "bug" ]
|
||||||
versioning-strategy: increase
|
versioning-strategy: increase
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
|
10
.github/its_you_not_me.md
vendored
10
.github/its_you_not_me.md
vendored
@@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
Sometimes bugs reported to Firefly III are configuration and system problems on the user's side.
|
Sometimes bugs reported to Firefly III are configuration and system problems on the user's side.
|
||||||
|
|
||||||
If you run into any of the following problems, there's a good chance it's not a Firefly III issue, but a configuration issue.
|
If you run into any of the following problems, there's a good chance it's not a Firefly III issue, but a configuration
|
||||||
|
issue.
|
||||||
|
|
||||||
- ⚠️ Firefly III can't connect to the database when starting or the password is wrong, even though you're sure it's correct.
|
- ⚠️ Firefly III can't connect to the database when starting or the password is wrong, even though you're sure it's
|
||||||
|
correct.
|
||||||
- ⚠️ Errors about a missing `APP_KEY` or other encryption/hash problems
|
- ⚠️ Errors about a missing `APP_KEY` or other encryption/hash problems
|
||||||
- ⚠️ You can't login due to `419` errors (page expired)
|
- ⚠️ You can't login due to `419` errors (page expired)
|
||||||
- ⚠️ Any `500` error when starting Firefly III
|
- ⚠️ Any `500` error when starting Firefly III
|
||||||
@@ -13,4 +15,6 @@ If you run into any of the following problems, there's a good chance it's not a
|
|||||||
- ⚠️ Firefly III does not work behind your reverse proxy
|
- ⚠️ Firefly III does not work behind your reverse proxy
|
||||||
- ⚠️ You can't connect to the Data Importer due to 404's or authentication issues.
|
- ⚠️ You can't connect to the Data Importer due to 404's or authentication issues.
|
||||||
|
|
||||||
If you run into an issue like this, please start a [discussion](https://github.com/firefly-iii/firefly-iii/discussions) or chat on [Gitter.im](https://gitter.im/firefly-iii/firefly-iii). There's a good chance it's not a bug but something we can fix rather quickly :+1:
|
If you run into an issue like this, please start a [discussion](https://github.com/firefly-iii/firefly-iii/discussions)
|
||||||
|
or chat on [Gitter.im](https://gitter.im/firefly-iii/firefly-iii). There's a good chance it's not a bug but something we
|
||||||
|
can fix rather quickly :+1:
|
||||||
|
37
.github/label-actions.yml
vendored
Normal file
37
.github/label-actions.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Configuration for Label Actions - https://github.com/dessant/label-actions
|
||||||
|
|
||||||
|
# The `feature` label is added to issues
|
||||||
|
feature:
|
||||||
|
issues:
|
||||||
|
# Post a comment, `{issue-author}` is an optional placeholder
|
||||||
|
comment: |
|
||||||
|
Hi there! This is an automatic reply. `Share and enjoy`
|
||||||
|
|
||||||
|
This issue has been marked as a feature request. The requested (new) feature will become a part of Firefly III or the data importer in due course.
|
||||||
|
|
||||||
|
If you come across this issue, please be aware there is NO need to reply with "+1" or "me too" or "I need this too" or whatever. Such comments are not helpful, and do not influence [the roadmap](https://roadmap.firefly-iii.org/). Your comment may be :skull: deleted. You can subscribe to this issue to get updates.
|
||||||
|
|
||||||
|
Thank you for your contributions.
|
||||||
|
|
||||||
|
enhancement:
|
||||||
|
issues:
|
||||||
|
# Post a comment, `{issue-author}` is an optional placeholder
|
||||||
|
comment: |
|
||||||
|
Hi there! This is an automatic reply. `Share and enjoy`
|
||||||
|
|
||||||
|
This issue has been marked as an enhancement. The requested enhancement to an existing feature will become a part of Firefly III or the data importer in due course.
|
||||||
|
|
||||||
|
If you come across this issue, please be aware there is NO need to reply with "+1" or "me too" or "I need this too" or whatever. Such comments are not helpful, and do not influence [the roadmap](https://roadmap.firefly-iii.org/). Your comment may be :skull: deleted. You can subscribe to this issue to get updates.
|
||||||
|
|
||||||
|
Thank you for your contributions.
|
||||||
|
|
||||||
|
# The `solved` label is added to discussions
|
||||||
|
triage:
|
||||||
|
issues:
|
||||||
|
# Post a comment, `{issue-author}` is an optional placeholder
|
||||||
|
comment: |
|
||||||
|
Hi there! This is an automatic reply. `Share and enjoy`
|
||||||
|
|
||||||
|
This issue has been marked as being in triage. The root cause is not known yet, or the issue needs more investigation. You can help by sharing debug information (from `/debug`) if you also have this issue or when you haven't already done so.
|
||||||
|
|
||||||
|
Thank you for your contributions.
|
6
.github/support.md
vendored
6
.github/support.md
vendored
@@ -9,7 +9,8 @@ First of all: thank you for reporting a bug instead of ditching the tool altoget
|
|||||||
1. Open bugs will have open issues, so search for one first.
|
1. Open bugs will have open issues, so search for one first.
|
||||||
2. If your feature request is already there, vote on it with :+1: or :-1: reactions.
|
2. If your feature request is already there, vote on it with :+1: or :-1: reactions.
|
||||||
3. Do NOT hijack old issues with the bug you found, open your own issue.
|
3. Do NOT hijack old issues with the bug you found, open your own issue.
|
||||||
4. If relevant, take the time and see if the [demo site](https://demo.firefly-iii.org/) is also suffering from your issue.
|
4. If relevant, take the time and see if the [demo site](https://demo.firefly-iii.org/) is also suffering from your
|
||||||
|
issue.
|
||||||
5. If relevant, read the [documentation](https://docs.firefly-iii.org/).
|
5. If relevant, read the [documentation](https://docs.firefly-iii.org/).
|
||||||
|
|
||||||
Please follow these guidelines when opening new issues:
|
Please follow these guidelines when opening new issues:
|
||||||
@@ -25,7 +26,8 @@ Only then [create a new issue](https://github.com/firefly-iii/firefly-iii/issues
|
|||||||
## Issue closure and abandonment policy
|
## Issue closure and abandonment policy
|
||||||
|
|
||||||
- Issues can be converted into discussions if it's not a bug or feature request.
|
- Issues can be converted into discussions if it's not a bug or feature request.
|
||||||
- Features that won't be implemented will be labelled "wontfix". [This isn't personal](https://docs.firefly-iii.org/firefly-iii/about-firefly-iii/what-its-not/).
|
- Features that won't be implemented will be labelled "
|
||||||
|
wontfix". [This isn't personal](https://docs.firefly-iii.org/firefly-iii/about-firefly-iii/what-its-not/).
|
||||||
- Issues can be closed if they're duplicates of other issues.
|
- Issues can be closed if they're duplicates of other issues.
|
||||||
- Issues can be closed if the answer is in the FAQ.
|
- Issues can be closed if the answer is in the FAQ.
|
||||||
- Issues will be closed automatically after 14 days.
|
- Issues will be closed automatically after 14 days.
|
||||||
|
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@@ -1,16 +0,0 @@
|
|||||||
name: Sonarcloud CI
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
jobs:
|
|
||||||
sonarcloud:
|
|
||||||
name: SonarCloud
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
|
||||||
- name: SonarCloud Scan
|
|
||||||
uses: SonarSource/sonarcloud-github-action@master
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
6
.github/workflows/cleanup.yml
vendored
6
.github/workflows/cleanup.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
# This workflow prunes old workflow runs for an entire repository.
|
# This workflow prunes old workflow runs for an entire repository.
|
||||||
|
|
||||||
name: Prune old builds
|
name: "Chore - prune old builds"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
@@ -55,11 +55,13 @@ jobs:
|
|||||||
// because we track the duration of runs over time
|
// because we track the duration of runs over time
|
||||||
|
|
||||||
const workflows = [
|
const workflows = [
|
||||||
'build.yml',
|
|
||||||
'cleanup.yml',
|
'cleanup.yml',
|
||||||
|
'closed-issues.yml',
|
||||||
'depsreview.yaml',
|
'depsreview.yaml',
|
||||||
'laravel.yml',
|
'laravel.yml',
|
||||||
'lock.yml',
|
'lock.yml',
|
||||||
|
'qodana.yml',
|
||||||
|
'sonarcloud.yml',
|
||||||
'stale.yml'
|
'stale.yml'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
16
.github/workflows/closed-issues.yml
vendored
16
.github/workflows/closed-issues.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: "Reply to closed issue"
|
name: "Issues - reply to closed issue"
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types:
|
types:
|
||||||
@@ -7,16 +7,18 @@ jobs:
|
|||||||
auto_comment:
|
auto_comment:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- uses: aws-actions/closed-issue-message@v1
|
||||||
uses: aws-actions/closed-issue-message@v1
|
|
||||||
with:
|
with:
|
||||||
message: |
|
message: |
|
||||||
Hi there! This is an automatic reply. `Share and enjoy`
|
Hi there! This is an automatic reply. `Share and enjoy`
|
||||||
|
|
||||||
This issue is now closed. Please be aware that closed issues are not actively monitored. If you reply, you may get no response.
|
This issue is now 🔒 closed. Please be aware that closed issues are not monitored by the developer of Firefly III.
|
||||||
|
|
||||||
- If the original bug is not actually fixed, please feel free to open a new issue. Please refer to this issue for clarity.
|
- If the original bug is not actually fixed, please open [a new issue](https://github.com/firefly-iii/firefly-iii/issues/new/choose). Refer to this issue for clarity.
|
||||||
- Follow-up questions can also be posted in a new [discussion](https://github.com/firefly-iii/firefly-iii/discussions/)
|
- Follow-up questions must be posted in a new [discussion](https://github.com/firefly-iii/firefly-iii/discussions/)
|
||||||
|
- Further replies to this issue may get no response.
|
||||||
|
|
||||||
Thank you for your consideration.
|
If there is more to discuss, please open [a new issue](https://github.com/firefly-iii/firefly-iii/issues/new/choose) or [discussion](https://github.com/firefly-iii/firefly-iii/discussions/).
|
||||||
|
|
||||||
|
Thank you for your contributions.
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
4
.github/workflows/depsreview.yaml
vendored
4
.github/workflows/depsreview.yaml
vendored
@@ -1,5 +1,5 @@
|
|||||||
name: 'Dependency Review'
|
name: 'Code - dependency review'
|
||||||
on: [pull_request]
|
on: [ pull_request ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
21
.github/workflows/label-actions.yml
vendored
Normal file
21
.github/workflows/label-actions.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
name: 'Issues - reply to specific labels'
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [labeled, unlabeled]
|
||||||
|
pull_request_target:
|
||||||
|
types: [labeled, unlabeled]
|
||||||
|
discussion:
|
||||||
|
types: [labeled, unlabeled]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
discussions: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
action:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: dessant/label-actions@v3
|
146
.github/workflows/laravel.yml
vendored
146
.github/workflows/laravel.yml
vendored
@@ -1,146 +0,0 @@
|
|||||||
name: Firefly III
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- '**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prepare:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Copy .env
|
|
||||||
run: test -f .env || cp .ci/.env.ci .env
|
|
||||||
- name: Prepare dependencies
|
|
||||||
run: |
|
|
||||||
set -euxo pipefail
|
|
||||||
export PATH=$PATH:$HOME/.composer/vendor/bin/
|
|
||||||
composer global require hirak/prestissimo --no-plugins --no-scripts
|
|
||||||
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest
|
|
||||||
|
|
||||||
touch ./storage/database/database.sqlite
|
|
||||||
- name: Prepare Firefly III
|
|
||||||
run: |
|
|
||||||
chmod -R 777 storage bootstrap/cache
|
|
||||||
php artisan migrate --seed
|
|
||||||
php artisan firefly-iii:upgrade-database
|
|
||||||
- name: Upload database
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: database
|
|
||||||
path: storage/database/database.sqlite
|
|
||||||
- name: Upload cache
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: cache
|
|
||||||
path: bootstrap/cache/
|
|
||||||
- name: Upload composer cache
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: composer
|
|
||||||
path: ~/.composer
|
|
||||||
|
|
||||||
laravel-tests:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Copy .env
|
|
||||||
run: test -f .env || cp .ci/.env.ci .env
|
|
||||||
- name: Download database
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: database
|
|
||||||
path: storage/database/database.sqlite
|
|
||||||
- name: Download cache
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: cache
|
|
||||||
path: bootstrap/cache/
|
|
||||||
- name: Download vendor
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: composer
|
|
||||||
path: ~/.composer
|
|
||||||
- name: Install composer
|
|
||||||
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest
|
|
||||||
|
|
||||||
- name: PHPUnit tests
|
|
||||||
uses: php-actions/phpunit@v1
|
|
||||||
with:
|
|
||||||
config: phpunit.xml
|
|
||||||
memory: 512M
|
|
||||||
|
|
||||||
coding-standards:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Copy .env
|
|
||||||
run: test -f .env || cp .ci/.env.ci .env
|
|
||||||
- name: Download database
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: database
|
|
||||||
path: storage/database/database.sqlite
|
|
||||||
- name: Download cache
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: cache
|
|
||||||
path: bootstrap/cache/
|
|
||||||
- name: Download vendor
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: composer
|
|
||||||
path: ~/.composer
|
|
||||||
- name: install depenencies
|
|
||||||
run: |
|
|
||||||
composer global require nette/coding-standard
|
|
||||||
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest
|
|
||||||
|
|
||||||
- name: Execute code standard
|
|
||||||
run: /home/runner/.composer/vendor/bin/ecs check app tests --config ./.ci/firefly-iii-standard.yml
|
|
||||||
|
|
||||||
phpstan:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Copy .env
|
|
||||||
run: test -f .env || cp .ci/.env.ci .env
|
|
||||||
- name: Download database
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: database
|
|
||||||
path: storage/database/database.sqlite
|
|
||||||
- name: Download cache
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: cache
|
|
||||||
path: bootstrap/cache/
|
|
||||||
- name: Download vendor
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: composer
|
|
||||||
path: ~/.composer
|
|
||||||
- name: Install depenencies
|
|
||||||
run: |
|
|
||||||
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest
|
|
||||||
|
|
||||||
- name: Execute PHPStan
|
|
||||||
run: vendor/bin/phpstan analyse -c .ci/phpstan.neon
|
|
23
.github/workflows/lock.yml
vendored
23
.github/workflows/lock.yml
vendored
@@ -1,30 +1,19 @@
|
|||||||
name: Lock old issues
|
name: 'Issues - Lock old issues'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lock:
|
lock:
|
||||||
permissions:
|
permissions:
|
||||||
issues: write # for dessant/lock-threads to lock issues
|
issues: write
|
||||||
pull-requests: write # for dessant/lock-threads to lock PRs
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@v4
|
- uses: JC5/lock-threads@main
|
||||||
with:
|
with:
|
||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
issue-lock-inactive-days: '90'
|
issue-inactive-days: 90
|
||||||
issue-comment: >
|
pr-inactive-days: 90
|
||||||
Hi there! This is an automatic reply. `Share and enjoy`
|
|
||||||
|
|
||||||
This issue is now `locked` :lock:.
|
|
||||||
|
|
||||||
- If you feel there is more to be said about this specific issue, please feel free to open a new issue. Please refer to this issue for clarity.
|
|
||||||
- Follow-up questions and comments can also be posted in a new [discussion](https://github.com/firefly-iii/firefly-iii/discussions/)
|
|
||||||
|
|
||||||
Thank you for your consideration.
|
|
||||||
|
37
.github/workflows/qodana.yml
vendored
37
.github/workflows/qodana.yml
vendored
@@ -1,37 +0,0 @@
|
|||||||
name: Qodana
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- develop
|
|
||||||
pull_request:
|
|
||||||
types: [ opened, synchronize, reopened ]
|
|
||||||
jobs:
|
|
||||||
qodana:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: 'Qodana Scan'
|
|
||||||
steps:
|
|
||||||
- name: Setup PHP with no coverage driver
|
|
||||||
uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
|
||||||
php-version: '8.2'
|
|
||||||
coverage: none
|
|
||||||
extensions: bcmath, intl
|
|
||||||
env:
|
|
||||||
update: true
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
composer install --no-scripts
|
|
||||||
cp .env.example .env
|
|
||||||
php artisan key:generate
|
|
||||||
php artisan clear-compiled
|
|
||||||
php artisan ide-helper:generate;
|
|
||||||
|
|
||||||
- name: 'Qodana Scan'
|
|
||||||
uses: JetBrains/qodana-action@main
|
|
||||||
env:
|
|
||||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
|
104
.github/workflows/sonarcloud.yml
vendored
Normal file
104
.github/workflows/sonarcloud.yml
vendored
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
name: 'Code - Run Sonarcloud'
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- develop
|
||||||
|
env:
|
||||||
|
DB_CONNECTION: mysql
|
||||||
|
DB_HOST: "127.0.0.1"
|
||||||
|
DB_DATABASE: firefly
|
||||||
|
DB_USER: firefly
|
||||||
|
DB_PASSWORD: secret_firefly_password
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sonarcloud:
|
||||||
|
name: SonarCloud
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
mariadb:
|
||||||
|
image: mariadb:latest
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
|
env:
|
||||||
|
MYSQL_ROOT_PASSWORD: yes
|
||||||
|
MYSQL_USER: ${{ env.DB_USER }}
|
||||||
|
MYSQL_PASSWORD: ${{ env.DB_PASSWORD }}
|
||||||
|
MYSQL_DATABASE: ${{ env.DB_DATABASE }}
|
||||||
|
options: >-
|
||||||
|
--health-cmd="healthcheck.sh --connect --innodb_initialized"
|
||||||
|
--health-interval=10s
|
||||||
|
--health-timeout=5s
|
||||||
|
--health-retries=3
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup PHP with Xdebug
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.2'
|
||||||
|
coverage: xdebug
|
||||||
|
extensions: >-
|
||||||
|
bcmath
|
||||||
|
curl
|
||||||
|
fileinfo
|
||||||
|
iconv
|
||||||
|
intl
|
||||||
|
json
|
||||||
|
mbstring
|
||||||
|
openssl
|
||||||
|
pdo
|
||||||
|
session
|
||||||
|
simplexml
|
||||||
|
sodium
|
||||||
|
tokenizer
|
||||||
|
xml
|
||||||
|
xmlwriter
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --prefer-dist --no-interaction --no-progress --no-scripts
|
||||||
|
|
||||||
|
- name: Verify Database connection
|
||||||
|
env:
|
||||||
|
PORT: ${{ job.services.mariadb.ports[3306] }}
|
||||||
|
run: |
|
||||||
|
while ! mysqladmin ping -h"${{env.DB_HOST}}" -P"${PORT}" --silent; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Copy environment file
|
||||||
|
run: sed 's@DB_HOST=.*@DB_HOST=${{env.DB_HOST}}@g' .env.example > .env
|
||||||
|
|
||||||
|
- name: Generate app key
|
||||||
|
run: php artisan key:generate
|
||||||
|
|
||||||
|
- name: "Create the database"
|
||||||
|
run: php artisan firefly-iii:create-database
|
||||||
|
|
||||||
|
- name: "Upgrades the database to the latest version"
|
||||||
|
run: php artisan firefly-iii:upgrade-database
|
||||||
|
|
||||||
|
- name: "Integrity Database Report"
|
||||||
|
run: php artisan firefly-iii:report-integrity
|
||||||
|
|
||||||
|
- name: "Run tests with coverage"
|
||||||
|
run: composer coverage
|
||||||
|
|
||||||
|
- name: Fix code coverage paths
|
||||||
|
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
|
||||||
|
|
||||||
|
- name: SonarCloud Scan
|
||||||
|
uses: SonarSource/sonarcloud-github-action@master
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
4
.github/workflows/stale.yml
vendored
4
.github/workflows/stale.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: "Close stale issues"
|
name: "Issues - close stale issues"
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "30 1 * * *"
|
- cron: "30 1 * * *"
|
||||||
@@ -31,4 +31,4 @@ jobs:
|
|||||||
Thank you for your contributions.
|
Thank you for your contributions.
|
||||||
days-before-stale: 14
|
days-before-stale: 14
|
||||||
days-before-close: 7
|
days-before-close: 7
|
||||||
exempt-issue-labels: 'enhancement,feature,bug,announcement,layout-v3'
|
exempt-issue-labels: 'enhancement,feature,bug,announcement,epic'
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,10 +1,8 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
/frontend/node_modules
|
|
||||||
/storage/*.key
|
/storage/*.key
|
||||||
/vendor
|
/vendor
|
||||||
/.vagrant
|
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
.env
|
.env
|
||||||
/.ci/php-cs-fixer/vendor
|
/.ci/php-cs-fixer/vendor
|
||||||
/.ci/coverage
|
coverage.xml
|
||||||
|
@@ -8,7 +8,5 @@
|
|||||||
# To hide directory listing
|
# To hide directory listing
|
||||||
Options All -Indexes
|
Options All -Indexes
|
||||||
|
|
||||||
# To prevent access to .env and other files
|
# To prevent access any file
|
||||||
<Files .*>
|
Deny from all
|
||||||
Deny from all
|
|
||||||
</Files>
|
|
||||||
|
65
app.json
65
app.json
@@ -1,65 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Firefly III",
|
|
||||||
"description": "A free and open source personal finances manager",
|
|
||||||
"repository": "https://github.com/firefly-iii/firefly-iii",
|
|
||||||
"website": "https://firefly-iii.org/",
|
|
||||||
"logo": "https://raw.githubusercontent.com/firefly-iii/firefly-iii/main/public/mstile-150x150.png",
|
|
||||||
"keywords": [
|
|
||||||
"finance",
|
|
||||||
"finances",
|
|
||||||
"manager",
|
|
||||||
"management",
|
|
||||||
"euro",
|
|
||||||
"dollar",
|
|
||||||
"laravel",
|
|
||||||
"money",
|
|
||||||
"currency",
|
|
||||||
"financials",
|
|
||||||
"financial",
|
|
||||||
"budgets",
|
|
||||||
"administration",
|
|
||||||
"tool",
|
|
||||||
"tooling",
|
|
||||||
"help",
|
|
||||||
"helper",
|
|
||||||
"assistant",
|
|
||||||
"planning",
|
|
||||||
"organizing",
|
|
||||||
"bills",
|
|
||||||
"personal finance",
|
|
||||||
"budgets",
|
|
||||||
"budgeting",
|
|
||||||
"budgeting tool",
|
|
||||||
"budgeting application",
|
|
||||||
"transactions",
|
|
||||||
"self hosted",
|
|
||||||
"self-hosted",
|
|
||||||
"transfers",
|
|
||||||
"management"
|
|
||||||
],
|
|
||||||
"addons": [
|
|
||||||
{
|
|
||||||
"plan": "heroku-postgresql",
|
|
||||||
"options": {
|
|
||||||
"version": "12"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"postdeploy": "php artisan migrate:refresh --seed;php artisan firefly:instructions install"
|
|
||||||
},
|
|
||||||
"buildpacks": [
|
|
||||||
{
|
|
||||||
"url": "heroku/php"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://github.com/heroku/heroku-buildpack-locale"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"APP_KEY": {
|
|
||||||
"description": "This key is used to create app cookies en secure attachments.",
|
|
||||||
"value": "base64:If1gJN4pyycXTq+WS5TjneDympKuu+8SKvTl6RZnhJg="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -82,7 +82,9 @@ class AccountController extends Controller
|
|||||||
$date = $data['date'] ?? today(config('app.timezone'));
|
$date = $data['date'] ?? today(config('app.timezone'));
|
||||||
|
|
||||||
$return = [];
|
$return = [];
|
||||||
$result = $this->repository->searchAccount((string)$query, $types, $data['limit']);
|
|
||||||
|
$result = $this->repository->searchAccount((string)$query, $types, $this->parameters->get('limit'));
|
||||||
|
// TODO this code is duplicated in the V2 Autocomplete controller, which means this code is due to be deprecated.
|
||||||
$defaultCurrency = app('amount')->getDefaultCurrency();
|
$defaultCurrency = app('amount')->getDefaultCurrency();
|
||||||
|
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
@@ -92,7 +94,11 @@ class AccountController extends Controller
|
|||||||
|
|
||||||
if (in_array($account->accountType->type, $this->balanceTypes, true)) {
|
if (in_array($account->accountType->type, $this->balanceTypes, true)) {
|
||||||
$balance = app('steam')->balance($account, $date);
|
$balance = app('steam')->balance($account, $date);
|
||||||
$nameWithBalance = sprintf('%s (%s)', $account->name, app('amount')->formatAnything($currency, $balance, false));
|
$nameWithBalance = sprintf(
|
||||||
|
'%s (%s)',
|
||||||
|
$account->name,
|
||||||
|
app('amount')->formatAnything($currency, $balance, false)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$return[] = [
|
$return[] = [
|
||||||
@@ -100,7 +106,7 @@ class AccountController extends Controller
|
|||||||
'name' => $account->name,
|
'name' => $account->name,
|
||||||
'name_with_balance' => $nameWithBalance,
|
'name_with_balance' => $nameWithBalance,
|
||||||
'type' => $account->accountType->type,
|
'type' => $account->accountType->type,
|
||||||
'currency_id' => $currency->id,
|
'currency_id' => (string)$currency->id,
|
||||||
'currency_name' => $currency->name,
|
'currency_name' => $currency->name,
|
||||||
'currency_code' => $currency->code,
|
'currency_code' => $currency->code,
|
||||||
'currency_symbol' => $currency->symbol,
|
'currency_symbol' => $currency->symbol,
|
||||||
@@ -109,14 +115,14 @@ class AccountController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// custom order.
|
// custom order.
|
||||||
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
|
|
||||||
usort(
|
usort(
|
||||||
$return,
|
$return,
|
||||||
function ($a, $b) use ($order) {
|
function ($a, $b) {
|
||||||
$pos_a = array_search($a['type'], $order, true);
|
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
|
||||||
$pos_b = array_search($b['type'], $order, true);
|
$posA = array_search($a['type'], $order, true);
|
||||||
|
$posB = array_search($b['type'], $order, true);
|
||||||
|
|
||||||
return $pos_a - $pos_b;
|
return $posA - $posB;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -58,7 +58,6 @@ class BillController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Documentation for this endpoint is at:
|
* Documentation for this endpoint is at:
|
||||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getBillsAC
|
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getBillsAC
|
||||||
* TODO expand API to add active field.
|
|
||||||
*
|
*
|
||||||
* @param AutocompleteRequest $request
|
* @param AutocompleteRequest $request
|
||||||
*
|
*
|
||||||
@@ -67,7 +66,7 @@ class BillController extends Controller
|
|||||||
public function bills(AutocompleteRequest $request): JsonResponse
|
public function bills(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$result = $this->repository->searchBill($data['query'], $data['limit']);
|
$result = $this->repository->searchBill($data['query'], $this->parameters->get('limit'));
|
||||||
$filtered = $result->map(
|
$filtered = $result->map(
|
||||||
static function (Bill $item) {
|
static function (Bill $item) {
|
||||||
return [
|
return [
|
||||||
|
@@ -66,7 +66,7 @@ class BudgetController extends Controller
|
|||||||
public function budgets(AutocompleteRequest $request): JsonResponse
|
public function budgets(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$result = $this->repository->searchBudget($data['query'], $data['limit']);
|
$result = $this->repository->searchBudget($data['query'], $this->parameters->get('limit'));
|
||||||
$filtered = $result->map(
|
$filtered = $result->map(
|
||||||
static function (Budget $item) {
|
static function (Budget $item) {
|
||||||
return [
|
return [
|
||||||
|
@@ -66,7 +66,7 @@ class CategoryController extends Controller
|
|||||||
public function categories(AutocompleteRequest $request): JsonResponse
|
public function categories(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$result = $this->repository->searchCategory($data['query'], $data['limit']);
|
$result = $this->repository->searchCategory($data['query'], $this->parameters->get('limit'));
|
||||||
$filtered = $result->map(
|
$filtered = $result->map(
|
||||||
static function (Category $item) {
|
static function (Category $item) {
|
||||||
return [
|
return [
|
||||||
|
@@ -26,7 +26,7 @@ namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
|||||||
use FireflyIII\Api\V1\Controllers\Controller;
|
use FireflyIII\Api\V1\Controllers\Controller;
|
||||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ class CurrencyController extends Controller
|
|||||||
public function currencies(AutocompleteRequest $request): JsonResponse
|
public function currencies(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$collection = $this->repository->searchCurrency($data['query'], $data['limit']);
|
$collection = $this->repository->searchCurrency($data['query'], $this->parameters->get('limit'));
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
/** @var TransactionCurrency $currency */
|
/** @var TransactionCurrency $currency */
|
||||||
@@ -95,7 +95,7 @@ class CurrencyController extends Controller
|
|||||||
public function currenciesWithCode(AutocompleteRequest $request): JsonResponse
|
public function currenciesWithCode(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$collection = $this->repository->searchCurrency($data['query'], $data['limit']);
|
$collection = $this->repository->searchCurrency($data['query'], $this->parameters->get('limit'));
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
/** @var TransactionCurrency $currency */
|
/** @var TransactionCurrency $currency */
|
||||||
|
@@ -67,7 +67,7 @@ class ObjectGroupController extends Controller
|
|||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$return = [];
|
$return = [];
|
||||||
$result = $this->repository->search($data['query'], $data['limit']);
|
$result = $this->repository->search($data['query'], $this->parameters->get('limit'));
|
||||||
|
|
||||||
/** @var ObjectGroup $objectGroup */
|
/** @var ObjectGroup $objectGroup */
|
||||||
foreach ($result as $objectGroup) {
|
foreach ($result as $objectGroup) {
|
||||||
|
@@ -70,7 +70,7 @@ class PiggyBankController extends Controller
|
|||||||
public function piggyBanks(AutocompleteRequest $request): JsonResponse
|
public function piggyBanks(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$piggies = $this->piggyRepository->searchPiggyBank($data['query'], $data['limit']);
|
$piggies = $this->piggyRepository->searchPiggyBank($data['query'], $this->parameters->get('limit'));
|
||||||
$defaultCurrency = app('amount')->getDefaultCurrency();
|
$defaultCurrency = app('amount')->getDefaultCurrency();
|
||||||
$response = [];
|
$response = [];
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ class PiggyBankController extends Controller
|
|||||||
public function piggyBanksWithBalance(AutocompleteRequest $request): JsonResponse
|
public function piggyBanksWithBalance(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$piggies = $this->piggyRepository->searchPiggyBank($data['query'], $data['limit']);
|
$piggies = $this->piggyRepository->searchPiggyBank($data['query'], $this->parameters->get('limit'));
|
||||||
$defaultCurrency = app('amount')->getDefaultCurrency();
|
$defaultCurrency = app('amount')->getDefaultCurrency();
|
||||||
$response = [];
|
$response = [];
|
||||||
/** @var PiggyBank $piggy */
|
/** @var PiggyBank $piggy */
|
||||||
|
@@ -64,7 +64,7 @@ class RecurrenceController extends Controller
|
|||||||
public function recurring(AutocompleteRequest $request): JsonResponse
|
public function recurring(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$recurrences = $this->repository->searchRecurrence($data['query'], $data['limit']);
|
$recurrences = $this->repository->searchRecurrence($data['query'], $this->parameters->get('limit'));
|
||||||
$response = [];
|
$response = [];
|
||||||
|
|
||||||
/** @var Recurrence $recurrence */
|
/** @var Recurrence $recurrence */
|
||||||
|
@@ -63,7 +63,7 @@ class RuleController extends Controller
|
|||||||
public function rules(AutocompleteRequest $request): JsonResponse
|
public function rules(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$rules = $this->repository->searchRule($data['query'], $data['limit']);
|
$rules = $this->repository->searchRule($data['query'], $this->parameters->get('limit'));
|
||||||
$response = [];
|
$response = [];
|
||||||
|
|
||||||
/** @var Rule $rule */
|
/** @var Rule $rule */
|
||||||
|
@@ -63,7 +63,7 @@ class RuleGroupController extends Controller
|
|||||||
public function ruleGroups(AutocompleteRequest $request): JsonResponse
|
public function ruleGroups(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$groups = $this->repository->searchRuleGroup($data['query'], $data['limit']);
|
$groups = $this->repository->searchRuleGroup($data['query'], $this->parameters->get('limit'));
|
||||||
$response = [];
|
$response = [];
|
||||||
|
|
||||||
/** @var RuleGroup $group */
|
/** @var RuleGroup $group */
|
||||||
|
@@ -67,7 +67,7 @@ class TagController extends Controller
|
|||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
|
|
||||||
$result = $this->repository->searchTags($data['query'], $data['limit']);
|
$result = $this->repository->searchTags($data['query'], $this->parameters->get('limit'));
|
||||||
$array = [];
|
$array = [];
|
||||||
/** @var Tag $tag */
|
/** @var Tag $tag */
|
||||||
foreach ($result as $tag) {
|
foreach ($result as $tag) {
|
||||||
|
@@ -71,7 +71,7 @@ class TransactionController extends Controller
|
|||||||
public function transactions(AutocompleteRequest $request): JsonResponse
|
public function transactions(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$result = $this->repository->searchJournalDescriptions($data['query'], $data['limit']);
|
$result = $this->repository->searchJournalDescriptions($data['query'], $this->parameters->get('limit'));
|
||||||
|
|
||||||
// limit and unique
|
// limit and unique
|
||||||
$filtered = $result->unique('description');
|
$filtered = $result->unique('description');
|
||||||
@@ -113,7 +113,7 @@ class TransactionController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!is_numeric($data['query'])) {
|
if (!is_numeric($data['query'])) {
|
||||||
$result = $this->repository->searchJournalDescriptions($data['query'], $data['limit']);
|
$result = $this->repository->searchJournalDescriptions($data['query'], $this->parameters->get('limit'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// limit and unique
|
// limit and unique
|
||||||
|
@@ -62,7 +62,7 @@ class TransactionTypeController extends Controller
|
|||||||
public function transactionTypes(AutocompleteRequest $request): JsonResponse
|
public function transactionTypes(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getData();
|
$data = $request->getData();
|
||||||
$types = $this->repository->searchTypes($data['query'], $data['limit']);
|
$types = $this->repository->searchTypes($data['query'], $this->parameters->get('limit'));
|
||||||
$array = [];
|
$array = [];
|
||||||
|
|
||||||
/** @var TransactionType $type */
|
/** @var TransactionType $type */
|
||||||
|
@@ -31,7 +31,6 @@ use FireflyIII\Exceptions\FireflyException;
|
|||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
|
||||||
use FireflyIII\Support\Http\Api\ApiSupport;
|
use FireflyIII\Support\Http\Api\ApiSupport;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
@@ -46,7 +45,6 @@ class AccountController extends Controller
|
|||||||
{
|
{
|
||||||
use ApiSupport;
|
use ApiSupport;
|
||||||
|
|
||||||
private CurrencyRepositoryInterface $currencyRepository;
|
|
||||||
private AccountRepositoryInterface $repository;
|
private AccountRepositoryInterface $repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,9 +62,6 @@ class AccountController extends Controller
|
|||||||
$this->repository = app(AccountRepositoryInterface::class);
|
$this->repository = app(AccountRepositoryInterface::class);
|
||||||
$this->repository->setUser($user);
|
$this->repository->setUser($user);
|
||||||
|
|
||||||
$this->currencyRepository = app(CurrencyRepositoryInterface::class);
|
|
||||||
$this->currencyRepository->setUser($user);
|
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -125,6 +120,7 @@ class AccountController extends Controller
|
|||||||
'yAxisID' => 0, // 0, 1, 2
|
'yAxisID' => 0, // 0, 1, 2
|
||||||
'entries' => [],
|
'entries' => [],
|
||||||
];
|
];
|
||||||
|
// TODO this code is also present in the V2 chart account controller so this method is due to be deprecated.
|
||||||
$currentStart = clone $start;
|
$currentStart = clone $start;
|
||||||
$range = app('steam')->balanceInRange($account, $start, clone $end);
|
$range = app('steam')->balanceInRange($account, $start, clone $end);
|
||||||
// 2022-10-11 this method no longer converts to float.
|
// 2022-10-11 this method no longer converts to float.
|
||||||
|
@@ -61,9 +61,9 @@ abstract class Controller extends BaseController
|
|||||||
{
|
{
|
||||||
// get global parameters
|
// get global parameters
|
||||||
$this->allowedSort = config('firefly.allowed_sort_parameters');
|
$this->allowedSort = config('firefly.allowed_sort_parameters');
|
||||||
$this->parameters = $this->getParameters();
|
|
||||||
$this->middleware(
|
$this->middleware(
|
||||||
function ($request, $next) {
|
function ($request, $next) {
|
||||||
|
$this->parameters = $this->getParameters();
|
||||||
if (auth()->check()) {
|
if (auth()->check()) {
|
||||||
$language = app('steam')->getLanguage();
|
$language = app('steam')->getLanguage();
|
||||||
app()->setLocale($language);
|
app()->setLocale($language);
|
||||||
@@ -85,12 +85,11 @@ abstract class Controller extends BaseController
|
|||||||
{
|
{
|
||||||
$bag = new ParameterBag();
|
$bag = new ParameterBag();
|
||||||
$page = (int)request()->get('page');
|
$page = (int)request()->get('page');
|
||||||
|
|
||||||
if ($page < 1) {
|
if ($page < 1) {
|
||||||
$page = 1;
|
$page = 1;
|
||||||
}
|
}
|
||||||
if ($page > (2 ^ 16)) {
|
if ($page > pow(2, 16)) {
|
||||||
$page = (2 ^ 16);
|
$page = pow(2, 16);
|
||||||
}
|
}
|
||||||
$bag->set('page', $page);
|
$bag->set('page', $page);
|
||||||
|
|
||||||
@@ -103,15 +102,22 @@ abstract class Controller extends BaseController
|
|||||||
} catch (BadRequestException $e) {
|
} catch (BadRequestException $e) {
|
||||||
Log::error(sprintf('Request field "%s" contains a non-scalar value. Value set to NULL.', $field));
|
Log::error(sprintf('Request field "%s" contains a non-scalar value. Value set to NULL.', $field));
|
||||||
Log::error($e->getMessage());
|
Log::error($e->getMessage());
|
||||||
|
Log::error($e->getTraceAsString());
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$obj = null;
|
$obj = null;
|
||||||
if (null !== $date) {
|
if (null !== $date) {
|
||||||
try {
|
try {
|
||||||
$obj = Carbon::parse($date);
|
$obj = Carbon::parse($date);
|
||||||
} catch (InvalidDateException|InvalidFormatException $e) {
|
} catch (InvalidDateException | InvalidFormatException $e) {
|
||||||
// don't care
|
// don't care
|
||||||
app('log')->warning(sprintf('Ignored invalid date "%s" in API controller parameter check: %s', substr($date, 0, 20), $e->getMessage()));
|
app('log')->warning(
|
||||||
|
sprintf(
|
||||||
|
'Ignored invalid date "%s" in API controller parameter check: %s',
|
||||||
|
substr($date, 0, 20),
|
||||||
|
$e->getMessage()
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$bag->set($field, $obj);
|
$bag->set($field, $obj);
|
||||||
@@ -125,11 +131,17 @@ abstract class Controller extends BaseController
|
|||||||
} catch (BadRequestException $e) {
|
} catch (BadRequestException $e) {
|
||||||
Log::error(sprintf('Request field "%s" contains a non-scalar value. Value set to NULL.', $integer));
|
Log::error(sprintf('Request field "%s" contains a non-scalar value. Value set to NULL.', $integer));
|
||||||
Log::error($e->getMessage());
|
Log::error($e->getMessage());
|
||||||
|
Log::error($e->getTraceAsString());
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
if (null !== $value) {
|
if (null !== $value) {
|
||||||
$bag->set($integer, (int)$value);
|
$bag->set($integer, (int)$value);
|
||||||
}
|
}
|
||||||
|
if (null === $value && 'limit' === $integer && auth()->check()) {
|
||||||
|
// set default for user:
|
||||||
|
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
||||||
|
$bag->set($integer, $pageSize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// sort fields:
|
// sort fields:
|
||||||
@@ -149,6 +161,7 @@ abstract class Controller extends BaseController
|
|||||||
} catch (BadRequestException $e) {
|
} catch (BadRequestException $e) {
|
||||||
Log::error('Request field "sort" contains a non-scalar value. Value set to NULL.');
|
Log::error('Request field "sort" contains a non-scalar value. Value set to NULL.');
|
||||||
Log::error($e->getMessage());
|
Log::error($e->getMessage());
|
||||||
|
Log::error($e->getTraceAsString());
|
||||||
$param = '';
|
$param = '';
|
||||||
}
|
}
|
||||||
if ('' === $param) {
|
if ('' === $param) {
|
||||||
@@ -171,7 +184,6 @@ abstract class Controller extends BaseController
|
|||||||
return $bag;
|
return $bag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to help build URL's.
|
* Method to help build URL's.
|
||||||
*
|
*
|
||||||
@@ -192,7 +204,7 @@ abstract class Controller extends BaseController
|
|||||||
$params[$key] = $value;
|
$params[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return.http_build_query($params);
|
return $return . http_build_query($params);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -202,7 +214,7 @@ abstract class Controller extends BaseController
|
|||||||
{
|
{
|
||||||
// create some objects:
|
// create some objects:
|
||||||
$manager = new Manager();
|
$manager = new Manager();
|
||||||
$baseUrl = request()->getSchemeAndHttpHost().'/api/v1';
|
$baseUrl = request()->getSchemeAndHttpHost() . '/api/v1';
|
||||||
$manager->setSerializer(new JsonApiSerializer($baseUrl));
|
$manager->setSerializer(new JsonApiSerializer($baseUrl));
|
||||||
|
|
||||||
return $manager;
|
return $manager;
|
||||||
|
@@ -279,6 +279,9 @@ class DestroyController extends Controller
|
|||||||
$tagRepository->destroyAll();
|
$tagRepository->destroyAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
private function destroyObjectGroups(): void
|
private function destroyObjectGroups(): void
|
||||||
{
|
{
|
||||||
/** @var ObjectGroupRepositoryInterface $repository */
|
/** @var ObjectGroupRepositoryInterface $repository */
|
||||||
|
@@ -29,6 +29,8 @@ use FireflyIII\Api\V1\Requests\Data\Export\ExportRequest;
|
|||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Support\Export\ExportDataGenerator;
|
use FireflyIII\Support\Export\ExportDataGenerator;
|
||||||
use Illuminate\Http\Response as LaravelResponse;
|
use Illuminate\Http\Response as LaravelResponse;
|
||||||
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ExportController
|
* Class ExportController
|
||||||
@@ -74,6 +76,8 @@ class ExportController extends Controller
|
|||||||
*
|
*
|
||||||
* @return LaravelResponse
|
* @return LaravelResponse
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws ContainerExceptionInterface
|
||||||
|
* @throws NotFoundExceptionInterface
|
||||||
*/
|
*/
|
||||||
private function returnExport(string $key): LaravelResponse
|
private function returnExport(string $key): LaravelResponse
|
||||||
{
|
{
|
||||||
@@ -86,7 +90,7 @@ class ExportController extends Controller
|
|||||||
$response
|
$response
|
||||||
->header('Content-Description', 'File Transfer')
|
->header('Content-Description', 'File Transfer')
|
||||||
->header('Content-Type', 'application/octet-stream')
|
->header('Content-Type', 'application/octet-stream')
|
||||||
->header('Content-Disposition', 'attachment; filename='.$fileName)
|
->header('Content-Disposition', 'attachment; filename=' . $fileName)
|
||||||
->header('Content-Transfer-Encoding', 'binary')
|
->header('Content-Transfer-Encoding', 'binary')
|
||||||
->header('Connection', 'Keep-Alive')
|
->header('Connection', 'Keep-Alive')
|
||||||
->header('Expires', '0')
|
->header('Expires', '0')
|
||||||
|
@@ -37,12 +37,16 @@ use FireflyIII\Models\TransactionGroup;
|
|||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class PurgeController
|
||||||
|
*/
|
||||||
class PurgeController extends Controller
|
class PurgeController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* TODO cleanup and use repositories.
|
* TODO cleanup and use repositories.
|
||||||
* This endpoint is documented at:
|
* This endpoint is documented at:
|
||||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/purgeData
|
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/purgeData
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*/
|
*/
|
||||||
public function purge(): JsonResponse
|
public function purge(): JsonResponse
|
||||||
|
@@ -28,7 +28,6 @@ use FireflyIII\Api\V1\Controllers\Controller;
|
|||||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Account\OperationsRepositoryInterface;
|
use FireflyIII\Repositories\Account\OperationsRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
|
||||||
use FireflyIII\Support\Http\Api\ApiSupport;
|
use FireflyIII\Support\Http\Api\ApiSupport;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
|
||||||
@@ -43,7 +42,6 @@ class AccountController extends Controller
|
|||||||
{
|
{
|
||||||
use ApiSupport;
|
use ApiSupport;
|
||||||
|
|
||||||
private CurrencyRepositoryInterface $currencyRepository;
|
|
||||||
private OperationsRepositoryInterface $opsRepository;
|
private OperationsRepositoryInterface $opsRepository;
|
||||||
private AccountRepositoryInterface $repository;
|
private AccountRepositoryInterface $repository;
|
||||||
|
|
||||||
@@ -61,9 +59,6 @@ class AccountController extends Controller
|
|||||||
$this->repository = app(AccountRepositoryInterface::class);
|
$this->repository = app(AccountRepositoryInterface::class);
|
||||||
$this->repository->setUser($user);
|
$this->repository->setUser($user);
|
||||||
|
|
||||||
$this->currencyRepository = app(CurrencyRepositoryInterface::class);
|
|
||||||
$this->currencyRepository->setUser($user);
|
|
||||||
|
|
||||||
$this->opsRepository = app(OperationsRepositoryInterface::class);
|
$this->opsRepository = app(OperationsRepositoryInterface::class);
|
||||||
$this->opsRepository->setUser($user);
|
$this->opsRepository->setUser($user);
|
||||||
|
|
||||||
|
@@ -28,7 +28,6 @@ use FireflyIII\Api\V1\Controllers\Controller;
|
|||||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Account\OperationsRepositoryInterface;
|
use FireflyIII\Repositories\Account\OperationsRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
|
||||||
use FireflyIII\Support\Http\Api\ApiSupport;
|
use FireflyIII\Support\Http\Api\ApiSupport;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
|
||||||
@@ -43,7 +42,6 @@ class AccountController extends Controller
|
|||||||
{
|
{
|
||||||
use ApiSupport;
|
use ApiSupport;
|
||||||
|
|
||||||
private CurrencyRepositoryInterface $currencyRepository;
|
|
||||||
private OperationsRepositoryInterface $opsRepository;
|
private OperationsRepositoryInterface $opsRepository;
|
||||||
private AccountRepositoryInterface $repository;
|
private AccountRepositoryInterface $repository;
|
||||||
|
|
||||||
@@ -61,9 +59,6 @@ class AccountController extends Controller
|
|||||||
$this->repository = app(AccountRepositoryInterface::class);
|
$this->repository = app(AccountRepositoryInterface::class);
|
||||||
$this->repository->setUser($user);
|
$this->repository->setUser($user);
|
||||||
|
|
||||||
$this->currencyRepository = app(CurrencyRepositoryInterface::class);
|
|
||||||
$this->currencyRepository->setUser($user);
|
|
||||||
|
|
||||||
$this->opsRepository = app(OperationsRepositoryInterface::class);
|
$this->opsRepository = app(OperationsRepositoryInterface::class);
|
||||||
$this->opsRepository->setUser($user);
|
$this->opsRepository->setUser($user);
|
||||||
|
|
||||||
|
@@ -81,7 +81,7 @@ class ListController extends Controller
|
|||||||
public function attachments(Account $account): JsonResponse
|
public function attachments(Account $account): JsonResponse
|
||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = $this->repository->getAttachments($account);
|
$collection = $this->repository->getAttachments($account);
|
||||||
|
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
@@ -89,7 +89,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.accounts.attachments', [$account->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.accounts.attachments', [$account->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var AttachmentTransformer $transformer */
|
/** @var AttachmentTransformer $transformer */
|
||||||
$transformer = app(AttachmentTransformer::class);
|
$transformer = app(AttachmentTransformer::class);
|
||||||
@@ -116,7 +116,7 @@ class ListController extends Controller
|
|||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
$collection = $this->repository->getPiggyBanks($account);
|
$collection = $this->repository->getPiggyBanks($account);
|
||||||
@@ -125,7 +125,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.accounts.piggy-banks', [$account->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.accounts.piggy-banks', [$account->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var PiggyBankTransformer $transformer */
|
/** @var PiggyBankTransformer $transformer */
|
||||||
$transformer = app(PiggyBankTransformer::class);
|
$transformer = app(PiggyBankTransformer::class);
|
||||||
@@ -152,15 +152,9 @@ class ListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function transactions(Request $request, Account $account): JsonResponse
|
public function transactions(Request $request, Account $account): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
|
|
||||||
// user can overrule page size with limit parameter.
|
|
||||||
$limit = $this->parameters->get('limit');
|
|
||||||
if (null !== $limit && $limit > 0) {
|
|
||||||
$pageSize = $limit;
|
|
||||||
}
|
|
||||||
$types = $this->mapTransactionTypes($this->parameters->get('type'));
|
$types = $this->mapTransactionTypes($this->parameters->get('type'));
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
/** @var User $admin */
|
/** @var User $admin */
|
||||||
@@ -172,12 +166,15 @@ class ListController extends Controller
|
|||||||
$collector->setUser($admin)->setAccounts(new Collection([$account]))
|
$collector->setUser($admin)->setAccounts(new Collection([$account]))
|
||||||
->withAPIInformation()->setLimit($pageSize)->setPage($this->parameters->get('page'))->setTypes($types);
|
->withAPIInformation()->setLimit($pageSize)->setPage($this->parameters->get('page'))->setTypes($types);
|
||||||
|
|
||||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
if (null !== $this->parameters->get('start')) {
|
||||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
$collector->setStart($this->parameters->get('start'));
|
||||||
|
}
|
||||||
|
if (null !== $this->parameters->get('end')) {
|
||||||
|
$collector->setEnd($this->parameters->get('end'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.accounts.transactions', [$account->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.accounts.transactions', [$account->id]) . $this->buildParams());
|
||||||
$groups = $paginator->getCollection();
|
$groups = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
|
@@ -84,7 +84,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$types = $this->mapAccountTypes($this->parameters->get('type'));
|
$types = $this->mapAccountTypes($this->parameters->get('type'));
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of accounts. Count it and split it.
|
// get list of accounts. Count it and split it.
|
||||||
$this->repository->resetAccountOrder();
|
$this->repository->resetAccountOrder();
|
||||||
@@ -98,7 +98,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($accounts, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($accounts, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.accounts.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.accounts.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var AccountTransformer $transformer */
|
/** @var AccountTransformer $transformer */
|
||||||
$transformer = app(AccountTransformer::class);
|
$transformer = app(AccountTransformer::class);
|
||||||
|
@@ -29,8 +29,8 @@ use FireflyIII\Models\Account;
|
|||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Transformers\AccountTransformer;
|
use FireflyIII\Transformers\AccountTransformer;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
use Log;
|
|
||||||
use Preferences;
|
use Preferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,7 +75,7 @@ class UpdateController extends Controller
|
|||||||
{
|
{
|
||||||
Log::debug(sprintf('Now in %s', __METHOD__));
|
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||||
$data = $request->getUpdateData();
|
$data = $request->getUpdateData();
|
||||||
$data['type'] = config('firefly.shortNamesByFullName.'.$account->accountType->type);
|
$data['type'] = config('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||||
$account = $this->repository->update($account, $data);
|
$account = $this->repository->update($account, $data);
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$account->refresh();
|
$account->refresh();
|
||||||
|
@@ -96,7 +96,7 @@ class ShowController extends Controller
|
|||||||
$response
|
$response
|
||||||
->header('Content-Description', 'File Transfer')
|
->header('Content-Description', 'File Transfer')
|
||||||
->header('Content-Type', 'application/octet-stream')
|
->header('Content-Type', 'application/octet-stream')
|
||||||
->header('Content-Disposition', 'attachment; filename='.$quoted)
|
->header('Content-Disposition', 'attachment; filename=' . $quoted)
|
||||||
->header('Content-Transfer-Encoding', 'binary')
|
->header('Content-Transfer-Encoding', 'binary')
|
||||||
->header('Connection', 'Keep-Alive')
|
->header('Connection', 'Keep-Alive')
|
||||||
->header('Expires', '0')
|
->header('Expires', '0')
|
||||||
@@ -123,7 +123,7 @@ class ShowController extends Controller
|
|||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of attachments. Count it and split it.
|
// get list of attachments. Count it and split it.
|
||||||
$collection = $this->repository->get();
|
$collection = $this->repository->get();
|
||||||
@@ -132,7 +132,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.attachments.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.attachments.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var AttachmentTransformer $transformer */
|
/** @var AttachmentTransformer $transformer */
|
||||||
$transformer = app(AttachmentTransformer::class);
|
$transformer = app(AttachmentTransformer::class);
|
||||||
|
@@ -34,8 +34,8 @@ use FireflyIII\Transformers\AttachmentTransformer;
|
|||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
use Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class StoreController
|
* Class StoreController
|
||||||
|
@@ -76,7 +76,7 @@ class ShowController extends Controller
|
|||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
$start = $this->parameters->get('start');
|
$start = $this->parameters->get('start');
|
||||||
$end = $this->parameters->get('end');
|
$end = $this->parameters->get('end');
|
||||||
@@ -88,7 +88,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($availableBudgets, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($availableBudgets, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.available-budgets.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.available-budgets.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var AvailableBudgetTransformer $transformer */
|
/** @var AvailableBudgetTransformer $transformer */
|
||||||
$transformer = app(AvailableBudgetTransformer::class);
|
$transformer = app(AvailableBudgetTransformer::class);
|
||||||
|
@@ -80,7 +80,7 @@ class ListController extends Controller
|
|||||||
public function attachments(Bill $bill): JsonResponse
|
public function attachments(Bill $bill): JsonResponse
|
||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = $this->repository->getAttachments($bill);
|
$collection = $this->repository->getAttachments($bill);
|
||||||
|
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
@@ -88,7 +88,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.bills.attachments', [$bill->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.bills.attachments', [$bill->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var AttachmentTransformer $transformer */
|
/** @var AttachmentTransformer $transformer */
|
||||||
$transformer = app(AttachmentTransformer::class);
|
$transformer = app(AttachmentTransformer::class);
|
||||||
@@ -116,7 +116,7 @@ class ListController extends Controller
|
|||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
$collection = $this->repository->getRulesForBill($bill);
|
$collection = $this->repository->getRulesForBill($bill);
|
||||||
@@ -125,7 +125,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.bills.rules', [$bill->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.bills.rules', [$bill->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var RuleTransformer $transformer */
|
/** @var RuleTransformer $transformer */
|
||||||
$transformer = app(RuleTransformer::class);
|
$transformer = app(RuleTransformer::class);
|
||||||
@@ -151,7 +151,7 @@ class ListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function transactions(Request $request, Bill $bill): JsonResponse
|
public function transactions(Request $request, Bill $bill): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
|
|
||||||
@@ -177,14 +177,16 @@ class ListController extends Controller
|
|||||||
// set types of transactions to return.
|
// set types of transactions to return.
|
||||||
->setTypes($types);
|
->setTypes($types);
|
||||||
|
|
||||||
// do parameter stuff on new group collector.
|
if (null !== $this->parameters->get('start')) {
|
||||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
$collector->setStart($this->parameters->get('start'));
|
||||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
}
|
||||||
|
if (null !== $this->parameters->get('end')) {
|
||||||
|
$collector->setEnd($this->parameters->get('end'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// get paginator.
|
// get paginator.
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.bills.transactions', [$bill->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.bills.transactions', [$bill->id]) . $this->buildParams());
|
||||||
$transactions = $paginator->getCollection();
|
$transactions = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
|
@@ -73,7 +73,7 @@ class ShowController extends Controller
|
|||||||
$this->repository->correctOrder();
|
$this->repository->correctOrder();
|
||||||
$bills = $this->repository->getBills();
|
$bills = $this->repository->getBills();
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$count = $bills->count();
|
$count = $bills->count();
|
||||||
$bills = $bills->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
$bills = $bills->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||||
$paginator = new LengthAwarePaginator($bills, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($bills, $count, $pageSize, $this->parameters->get('page'));
|
||||||
|
@@ -82,7 +82,7 @@ class ListController extends Controller
|
|||||||
public function attachments(Budget $budget): JsonResponse
|
public function attachments(Budget $budget): JsonResponse
|
||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = $this->repository->getAttachments($budget);
|
$collection = $this->repository->getAttachments($budget);
|
||||||
|
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
@@ -90,7 +90,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.budgets.attachments', [$budget->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.budgets.attachments', [$budget->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var AttachmentTransformer $transformer */
|
/** @var AttachmentTransformer $transformer */
|
||||||
$transformer = app(AttachmentTransformer::class);
|
$transformer = app(AttachmentTransformer::class);
|
||||||
@@ -116,13 +116,13 @@ class ListController extends Controller
|
|||||||
public function budgetLimits(Budget $budget): JsonResponse
|
public function budgetLimits(Budget $budget): JsonResponse
|
||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$this->parameters->set('budget_id', $budget->id);
|
$this->parameters->set('budget_id', $budget->id);
|
||||||
$collection = $this->blRepository->getBudgetLimits($budget, $this->parameters->get('start'), $this->parameters->get('end'));
|
$collection = $this->blRepository->getBudgetLimits($budget, $this->parameters->get('start'), $this->parameters->get('end'));
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||||
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.budgets.budget-limits', [$budget->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.budgets.budget-limits', [$budget->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var BudgetLimitTransformer $transformer */
|
/** @var BudgetLimitTransformer $transformer */
|
||||||
$transformer = app(BudgetLimitTransformer::class);
|
$transformer = app(BudgetLimitTransformer::class);
|
||||||
@@ -148,13 +148,7 @@ class ListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function transactions(Request $request, Budget $budget): JsonResponse
|
public function transactions(Request $request, Budget $budget): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// user can overrule page size with limit parameter.
|
|
||||||
$limit = $this->parameters->get('limit');
|
|
||||||
if (null !== $limit && $limit > 0) {
|
|
||||||
$pageSize = $limit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
@@ -181,12 +175,15 @@ class ListController extends Controller
|
|||||||
// set types of transactions to return.
|
// set types of transactions to return.
|
||||||
->setTypes($types);
|
->setTypes($types);
|
||||||
|
|
||||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
if (null !== $this->parameters->get('start')) {
|
||||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
$collector->setStart($this->parameters->get('start'));
|
||||||
|
}
|
||||||
|
if (null !== $this->parameters->get('end')) {
|
||||||
|
$collector->setEnd($this->parameters->get('end'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.budgets.transactions', [$budget->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.budgets.transactions', [$budget->id]) . $this->buildParams());
|
||||||
$transactions = $paginator->getCollection();
|
$transactions = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
@@ -211,13 +208,7 @@ class ListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function withoutBudget(Request $request): JsonResponse
|
public function withoutBudget(Request $request): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// user can overrule page size with limit parameter.
|
|
||||||
$limit = $this->parameters->get('limit');
|
|
||||||
if (null !== $limit && $limit > 0) {
|
|
||||||
$pageSize = $limit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
@@ -244,12 +235,15 @@ class ListController extends Controller
|
|||||||
// set types of transactions to return.
|
// set types of transactions to return.
|
||||||
->setTypes($types);
|
->setTypes($types);
|
||||||
|
|
||||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
if (null !== $this->parameters->get('start')) {
|
||||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
$collector->setStart($this->parameters->get('start'));
|
||||||
|
}
|
||||||
|
if (null !== $this->parameters->get('end')) {
|
||||||
|
$collector->setEnd($this->parameters->get('end'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.budgets.without-budget').$this->buildParams());
|
$paginator->setPath(route('api.v1.budgets.without-budget') . $this->buildParams());
|
||||||
$transactions = $paginator->getCollection();
|
$transactions = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
|
@@ -77,7 +77,7 @@ class ShowController extends Controller
|
|||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
$collection = $this->repository->getBudgets();
|
$collection = $this->repository->getBudgets();
|
||||||
@@ -86,7 +86,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($budgets, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($budgets, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.budgets.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.budgets.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var BudgetTransformer $transformer */
|
/** @var BudgetTransformer $transformer */
|
||||||
$transformer = app(BudgetTransformer::class);
|
$transformer = app(BudgetTransformer::class);
|
||||||
|
@@ -80,7 +80,7 @@ class ListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function transactions(Request $request, Budget $budget, BudgetLimit $budgetLimit): JsonResponse
|
public function transactions(Request $request, Budget $budget, BudgetLimit $budgetLimit): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ class ListController extends Controller
|
|||||||
$collector->setRange($budgetLimit->start_date, $budgetLimit->end_date);
|
$collector->setRange($budgetLimit->start_date, $budgetLimit->end_date);
|
||||||
$collector->setTypes($types);
|
$collector->setTypes($types);
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.budgets.limits.transactions', [$budget->id, $budgetLimit->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.budgets.limits.transactions', [$budget->id, $budgetLimit->id]) . $this->buildParams());
|
||||||
$transactions = $paginator->getCollection();
|
$transactions = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
|
@@ -24,7 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
|
namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
|
||||||
|
|
||||||
use FireflyIII\Api\V1\Controllers\Controller;
|
use FireflyIII\Api\V1\Controllers\Controller;
|
||||||
use FireflyIII\Api\V1\Requests\Data\DateRequest;
|
use FireflyIII\Api\V1\Requests\Data\SameDateRequest;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Models\Budget;
|
use FireflyIII\Models\Budget;
|
||||||
use FireflyIII\Models\BudgetLimit;
|
use FireflyIII\Models\BudgetLimit;
|
||||||
@@ -85,12 +85,12 @@ class ShowController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$manager->parseIncludes('budget');
|
$manager->parseIncludes('budget');
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = $this->blRepository->getBudgetLimits($budget, $this->parameters->get('start'), $this->parameters->get('end'));
|
$collection = $this->blRepository->getBudgetLimits($budget, $this->parameters->get('start'), $this->parameters->get('end'));
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||||
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.budgets.limits.index', [$budget->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.budgets.limits.index', [$budget->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var BudgetLimitTransformer $transformer */
|
/** @var BudgetLimitTransformer $transformer */
|
||||||
$transformer = app(BudgetLimitTransformer::class);
|
$transformer = app(BudgetLimitTransformer::class);
|
||||||
@@ -108,21 +108,21 @@ class ShowController extends Controller
|
|||||||
*
|
*
|
||||||
* Display a listing of the budget limits for this budget.
|
* Display a listing of the budget limits for this budget.
|
||||||
*
|
*
|
||||||
* @param DateRequest $request
|
* @param SameDateRequest $request
|
||||||
*
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function indexAll(DateRequest $request): JsonResponse
|
public function indexAll(SameDateRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$manager->parseIncludes('budget');
|
$manager->parseIncludes('budget');
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = $this->blRepository->getAllBudgetLimits($this->parameters->get('start'), $this->parameters->get('end'));
|
$collection = $this->blRepository->getAllBudgetLimits($this->parameters->get('start'), $this->parameters->get('end'));
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||||
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.budget-limits.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.budget-limits.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var BudgetLimitTransformer $transformer */
|
/** @var BudgetLimitTransformer $transformer */
|
||||||
$transformer = app(BudgetLimitTransformer::class);
|
$transformer = app(BudgetLimitTransformer::class);
|
||||||
|
@@ -77,7 +77,7 @@ class ListController extends Controller
|
|||||||
public function attachments(Category $category): JsonResponse
|
public function attachments(Category $category): JsonResponse
|
||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = $this->repository->getAttachments($category);
|
$collection = $this->repository->getAttachments($category);
|
||||||
|
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
@@ -85,7 +85,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.categories.attachments', [$category->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.categories.attachments', [$category->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var AttachmentTransformer $transformer */
|
/** @var AttachmentTransformer $transformer */
|
||||||
$transformer = app(AttachmentTransformer::class);
|
$transformer = app(AttachmentTransformer::class);
|
||||||
@@ -112,7 +112,7 @@ class ListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function transactions(Request $request, Category $category): JsonResponse
|
public function transactions(Request $request, Category $category): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
|
|
||||||
@@ -138,12 +138,15 @@ class ListController extends Controller
|
|||||||
// set types of transactions to return.
|
// set types of transactions to return.
|
||||||
->setTypes($types);
|
->setTypes($types);
|
||||||
|
|
||||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
if (null !== $this->parameters->get('start')) {
|
||||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
$collector->setStart($this->parameters->get('start'));
|
||||||
|
}
|
||||||
|
if (null !== $this->parameters->get('end')) {
|
||||||
|
$collector->setEnd($this->parameters->get('end'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.categories.transactions', [$category->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.categories.transactions', [$category->id]) . $this->buildParams());
|
||||||
$transactions = $paginator->getCollection();
|
$transactions = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
|
@@ -73,7 +73,7 @@ class ShowController extends Controller
|
|||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
$collection = $this->repository->getCategories();
|
$collection = $this->repository->getCategories();
|
||||||
@@ -82,7 +82,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($categories, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($categories, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.categories.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.categories.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var CategoryTransformer $transformer */
|
/** @var CategoryTransformer $transformer */
|
||||||
$transformer = app(CategoryTransformer::class);
|
$transformer = app(CategoryTransformer::class);
|
||||||
|
@@ -77,7 +77,7 @@ class ListController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
// get list of piggy banks. Count it and split it.
|
// get list of piggy banks. Count it and split it.
|
||||||
$collection = $this->repository->getBills($objectGroup);
|
$collection = $this->repository->getBills($objectGroup);
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
@@ -85,7 +85,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($bills, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($bills, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.currencies.bills', [$objectGroup->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.currencies.bills', [$objectGroup->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var BillTransformer $transformer */
|
/** @var BillTransformer $transformer */
|
||||||
$transformer = app(BillTransformer::class);
|
$transformer = app(BillTransformer::class);
|
||||||
@@ -114,7 +114,7 @@ class ListController extends Controller
|
|||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of piggy banks. Count it and split it.
|
// get list of piggy banks. Count it and split it.
|
||||||
$collection = $this->repository->getPiggyBanks($objectGroup);
|
$collection = $this->repository->getPiggyBanks($objectGroup);
|
||||||
@@ -123,7 +123,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.object-groups.piggy-banks', [$objectGroup->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.object-groups.piggy-banks', [$objectGroup->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var PiggyBankTransformer $transformer */
|
/** @var PiggyBankTransformer $transformer */
|
||||||
$transformer = app(PiggyBankTransformer::class);
|
$transformer = app(PiggyBankTransformer::class);
|
||||||
|
@@ -79,7 +79,7 @@ class ShowController extends Controller
|
|||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
$this->repository->resetOrder();
|
$this->repository->resetOrder();
|
||||||
$collection = $this->repository->get();
|
$collection = $this->repository->get();
|
||||||
@@ -88,7 +88,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($objectGroups, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($objectGroups, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.object-groups.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.object-groups.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var ObjectGroupTransformer $transformer */
|
/** @var ObjectGroupTransformer $transformer */
|
||||||
$transformer = app(ObjectGroupTransformer::class);
|
$transformer = app(ObjectGroupTransformer::class);
|
||||||
|
@@ -71,7 +71,7 @@ class ListController extends Controller
|
|||||||
public function attachments(PiggyBank $piggyBank): JsonResponse
|
public function attachments(PiggyBank $piggyBank): JsonResponse
|
||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = $this->repository->getAttachments($piggyBank);
|
$collection = $this->repository->getAttachments($piggyBank);
|
||||||
|
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
@@ -79,7 +79,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.piggy-banks.attachments', [$piggyBank->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.piggy-banks.attachments', [$piggyBank->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var AttachmentTransformer $transformer */
|
/** @var AttachmentTransformer $transformer */
|
||||||
$transformer = app(AttachmentTransformer::class);
|
$transformer = app(AttachmentTransformer::class);
|
||||||
@@ -105,7 +105,7 @@ class ListController extends Controller
|
|||||||
public function piggyBankEvents(PiggyBank $piggyBank): JsonResponse
|
public function piggyBankEvents(PiggyBank $piggyBank): JsonResponse
|
||||||
{
|
{
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
$collection = $this->repository->getEvents($piggyBank);
|
$collection = $this->repository->getEvents($piggyBank);
|
||||||
@@ -114,7 +114,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($events, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($events, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.piggy-banks.events', [$piggyBank->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.piggy-banks.events', [$piggyBank->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var PiggyBankEventTransformer $transformer */
|
/** @var PiggyBankEventTransformer $transformer */
|
||||||
$transformer = app(PiggyBankEventTransformer::class);
|
$transformer = app(PiggyBankEventTransformer::class);
|
||||||
|
@@ -72,7 +72,7 @@ class ShowController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
$collection = $this->repository->getPiggyBanks();
|
$collection = $this->repository->getPiggyBanks();
|
||||||
@@ -81,7 +81,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.piggy-banks.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.piggy-banks.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var PiggyBankTransformer $transformer */
|
/** @var PiggyBankTransformer $transformer */
|
||||||
$transformer = app(PiggyBankTransformer::class);
|
$transformer = app(PiggyBankTransformer::class);
|
||||||
|
@@ -77,7 +77,7 @@ class ListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function transactions(Request $request, Recurrence $recurrence): JsonResponse
|
public function transactions(Request $request, Recurrence $recurrence): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
|
|
||||||
@@ -105,11 +105,15 @@ class ListController extends Controller
|
|||||||
// set types of transactions to return.
|
// set types of transactions to return.
|
||||||
->setTypes($types);
|
->setTypes($types);
|
||||||
|
|
||||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
if (null !== $this->parameters->get('start')) {
|
||||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
$collector->setStart($this->parameters->get('start'));
|
||||||
}
|
}
|
||||||
|
if (null !== $this->parameters->get('end')) {
|
||||||
|
$collector->setEnd($this->parameters->get('end'));
|
||||||
|
}
|
||||||
|
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.transactions.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.transactions.index') . $this->buildParams());
|
||||||
$transactions = $paginator->getCollection();
|
$transactions = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
|
@@ -73,7 +73,7 @@ class ShowController extends Controller
|
|||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
$collection = $this->repository->get();
|
$collection = $this->repository->get();
|
||||||
@@ -82,7 +82,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.recurrences.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.recurrences.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var RecurrenceTransformer $transformer */
|
/** @var RecurrenceTransformer $transformer */
|
||||||
$transformer = app(RecurrenceTransformer::class);
|
$transformer = app(RecurrenceTransformer::class);
|
||||||
|
@@ -77,7 +77,7 @@ class ShowController extends Controller
|
|||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
$collection = $this->ruleRepository->getAll();
|
$collection = $this->ruleRepository->getAll();
|
||||||
@@ -86,7 +86,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.rules.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.rules.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var RuleTransformer $transformer */
|
/** @var RuleTransformer $transformer */
|
||||||
$transformer = app(RuleTransformer::class);
|
$transformer = app(RuleTransformer::class);
|
||||||
|
@@ -96,12 +96,13 @@ class TriggerController extends Controller
|
|||||||
$ruleEngine->addOperator(['type' => 'account_id', 'value' => implode(',', $parameters['accounts'])]);
|
$ruleEngine->addOperator(['type' => 'account_id', 'value' => implode(',', $parameters['accounts'])]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// file the rule(s)
|
// file the rule(s)
|
||||||
$transactions = $ruleEngine->find();
|
$transactions = $ruleEngine->find();
|
||||||
$count = $transactions->count();
|
$count = $transactions->count();
|
||||||
|
|
||||||
$paginator = new LengthAwarePaginator($transactions, $count, 31337, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($transactions, $count, 31337, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.rules.test', [$rule->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.rules.test', [$rule->id]) . $this->buildParams());
|
||||||
|
|
||||||
// resulting list is presented as JSON thing.
|
// resulting list is presented as JSON thing.
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
@@ -149,6 +150,7 @@ class TriggerController extends Controller
|
|||||||
$ruleEngine->addOperator(['type' => 'account_id', 'value' => implode(',', $parameters['accounts'])]);
|
$ruleEngine->addOperator(['type' => 'account_id', 'value' => implode(',', $parameters['accounts'])]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// fire the rule(s)
|
// fire the rule(s)
|
||||||
$ruleEngine->fire();
|
$ruleEngine->fire();
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ class ListController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
$collection = $this->ruleGroupRepository->getRules($group);
|
$collection = $this->ruleGroupRepository->getRules($group);
|
||||||
@@ -84,7 +84,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.rule-groups.rules', [$group->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.rule-groups.rules', [$group->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var RuleTransformer $transformer */
|
/** @var RuleTransformer $transformer */
|
||||||
$transformer = app(RuleTransformer::class);
|
$transformer = app(RuleTransformer::class);
|
||||||
|
@@ -75,7 +75,7 @@ class ShowController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of rule groups. Count it and split it.
|
// get list of rule groups. Count it and split it.
|
||||||
$collection = $this->ruleGroupRepository->get();
|
$collection = $this->ruleGroupRepository->get();
|
||||||
@@ -84,7 +84,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($ruleGroups, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($ruleGroups, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.rule-groups.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.rule-groups.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var RuleGroupTransformer $transformer */
|
/** @var RuleGroupTransformer $transformer */
|
||||||
$transformer = app(RuleGroupTransformer::class);
|
$transformer = app(RuleGroupTransformer::class);
|
||||||
|
@@ -108,7 +108,7 @@ class TriggerController extends Controller
|
|||||||
$count = $transactions->count();
|
$count = $transactions->count();
|
||||||
|
|
||||||
$paginator = new LengthAwarePaginator($transactions, $count, 31337, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($transactions, $count, 31337, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.rule-groups.test', [$group->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.rule-groups.test', [$group->id]) . $this->buildParams());
|
||||||
|
|
||||||
// resulting list is presented as JSON thing.
|
// resulting list is presented as JSON thing.
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
@@ -80,7 +80,7 @@ class ListController extends Controller
|
|||||||
public function attachments(Tag $tag): JsonResponse
|
public function attachments(Tag $tag): JsonResponse
|
||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = $this->repository->getAttachments($tag);
|
$collection = $this->repository->getAttachments($tag);
|
||||||
|
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
@@ -88,7 +88,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.tags.attachments', [$tag->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.tags.attachments', [$tag->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var AttachmentTransformer $transformer */
|
/** @var AttachmentTransformer $transformer */
|
||||||
$transformer = app(AttachmentTransformer::class);
|
$transformer = app(AttachmentTransformer::class);
|
||||||
@@ -114,7 +114,7 @@ class ListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function transactions(Request $request, Tag $tag): JsonResponse
|
public function transactions(Request $request, Tag $tag): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
|
|
||||||
@@ -139,11 +139,14 @@ class ListController extends Controller
|
|||||||
// set types of transactions to return.
|
// set types of transactions to return.
|
||||||
->setTypes($types);
|
->setTypes($types);
|
||||||
|
|
||||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
if (null !== $this->parameters->get('start')) {
|
||||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
$collector->setStart($this->parameters->get('start'));
|
||||||
|
}
|
||||||
|
if (null !== $this->parameters->get('end')) {
|
||||||
|
$collector->setEnd($this->parameters->get('end'));
|
||||||
}
|
}
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.tags.transactions', [$tag->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.tags.transactions', [$tag->id]) . $this->buildParams());
|
||||||
$transactions = $paginator->getCollection();
|
$transactions = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
|
@@ -76,7 +76,7 @@ class ShowController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
$collection = $this->repository->get();
|
$collection = $this->repository->get();
|
||||||
@@ -85,7 +85,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.tags.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.tags.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var TagTransformer $transformer */
|
/** @var TagTransformer $transformer */
|
||||||
$transformer = app(TagTransformer::class);
|
$transformer = app(TagTransformer::class);
|
||||||
|
@@ -33,7 +33,7 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
|||||||
use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepository;
|
use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepository;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class DestroyController
|
* Class DestroyController
|
||||||
|
@@ -78,7 +78,7 @@ class ListController extends Controller
|
|||||||
public function attachments(TransactionGroup $transactionGroup): JsonResponse
|
public function attachments(TransactionGroup $transactionGroup): JsonResponse
|
||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = new Collection();
|
$collection = new Collection();
|
||||||
foreach ($transactionGroup->transactionJournals as $transactionJournal) {
|
foreach ($transactionGroup->transactionJournals as $transactionJournal) {
|
||||||
$collection = $this->journalAPIRepository->getAttachments($transactionJournal)->merge($collection);
|
$collection = $this->journalAPIRepository->getAttachments($transactionJournal)->merge($collection);
|
||||||
@@ -89,7 +89,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.transactions.attachments', [$transactionGroup->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.transactions.attachments', [$transactionGroup->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var AttachmentTransformer $transformer */
|
/** @var AttachmentTransformer $transformer */
|
||||||
$transformer = app(AttachmentTransformer::class);
|
$transformer = app(AttachmentTransformer::class);
|
||||||
@@ -114,7 +114,7 @@ class ListController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$collection = new Collection();
|
$collection = new Collection();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
foreach ($transactionGroup->transactionJournals as $transactionJournal) {
|
foreach ($transactionGroup->transactionJournals as $transactionJournal) {
|
||||||
$collection = $this->journalAPIRepository->getPiggyBankEvents($transactionJournal)->merge($collection);
|
$collection = $this->journalAPIRepository->getPiggyBankEvents($transactionJournal)->merge($collection);
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ class ListController extends Controller
|
|||||||
$events = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
$events = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($events, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($events, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.transactions.piggy-bank-events', [$transactionGroup->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.transactions.piggy-bank-events', [$transactionGroup->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var PiggyBankEventTransformer $transformer */
|
/** @var PiggyBankEventTransformer $transformer */
|
||||||
$transformer = app(PiggyBankEventTransformer::class);
|
$transformer = app(PiggyBankEventTransformer::class);
|
||||||
@@ -152,13 +152,13 @@ class ListController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$collection = $this->journalAPIRepository->getJournalLinks($transactionJournal);
|
$collection = $this->journalAPIRepository->getJournalLinks($transactionJournal);
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
$journalLinks = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
$journalLinks = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($journalLinks, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($journalLinks, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.transaction-journals.transaction-links', [$transactionJournal->id]).$this->buildParams());
|
$paginator->setPath(route('api.v1.transaction-journals.transaction-links', [$transactionJournal->id]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var TransactionLinkTransformer $transformer */
|
/** @var TransactionLinkTransformer $transformer */
|
||||||
$transformer = app(TransactionLinkTransformer::class);
|
$transformer = app(TransactionLinkTransformer::class);
|
||||||
|
@@ -58,7 +58,7 @@ class ShowController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index(Request $request): JsonResponse
|
public function index(Request $request): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
|
|
||||||
@@ -80,11 +80,11 @@ class ShowController extends Controller
|
|||||||
->setPage($this->parameters->get('page'))
|
->setPage($this->parameters->get('page'))
|
||||||
// set types of transactions to return.
|
// set types of transactions to return.
|
||||||
->setTypes($types);
|
->setTypes($types);
|
||||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
if (null !== $this->parameters->get('start') || null !== $this->parameters->get('end')) {
|
||||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
||||||
}
|
}
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.transactions.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.transactions.index') . $this->buildParams());
|
||||||
$transactions = $paginator->getCollection();
|
$transactions = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
|
@@ -35,9 +35,9 @@ use FireflyIII\Support\Http\Api\TransactionFilter;
|
|||||||
use FireflyIII\Transformers\TransactionGroupTransformer;
|
use FireflyIII\Transformers\TransactionGroupTransformer;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
use Log;
|
|
||||||
use Validator;
|
use Validator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -32,8 +32,8 @@ use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepositoryInterface
|
|||||||
use FireflyIII\Transformers\TransactionGroupTransformer;
|
use FireflyIII\Transformers\TransactionGroupTransformer;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
use Log;
|
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,6 +79,7 @@ class UpdateController extends Controller
|
|||||||
{
|
{
|
||||||
Log::debug('Now in update routine for transaction group!');
|
Log::debug('Now in update routine for transaction group!');
|
||||||
$data = $request->getAll();
|
$data = $request->getAll();
|
||||||
|
|
||||||
$transactionGroup = $this->groupRepository->update($transactionGroup, $data);
|
$transactionGroup = $this->groupRepository->update($transactionGroup, $data);
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
|
@@ -27,8 +27,8 @@ namespace FireflyIII\Api\V1\Controllers\Models\TransactionCurrency;
|
|||||||
use FireflyIII\Api\V1\Controllers\Controller;
|
use FireflyIII\Api\V1\Controllers\Controller;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
|
||||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Validator;
|
use Validator;
|
||||||
|
@@ -38,7 +38,6 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
|||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Budget\AvailableBudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\AvailableBudgetRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
|
||||||
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
|
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
|
||||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||||
@@ -65,26 +64,6 @@ class ListController extends Controller
|
|||||||
use AccountFilter;
|
use AccountFilter;
|
||||||
use TransactionFilter;
|
use TransactionFilter;
|
||||||
|
|
||||||
private CurrencyRepositoryInterface $repository;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CurrencyRepository constructor.
|
|
||||||
*
|
|
||||||
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
$this->middleware(
|
|
||||||
function ($request, $next) {
|
|
||||||
$this->repository = app(CurrencyRepositoryInterface::class);
|
|
||||||
$this->repository->setUser(auth()->user());
|
|
||||||
|
|
||||||
return $next($request);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint is documented at:
|
* This endpoint is documented at:
|
||||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/currencies/listAccountByCurrency
|
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/currencies/listAccountByCurrency
|
||||||
@@ -106,7 +85,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$types = $this->mapAccountTypes($this->parameters->get('type'));
|
$types = $this->mapAccountTypes($this->parameters->get('type'));
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of accounts. Count it and split it.
|
// get list of accounts. Count it and split it.
|
||||||
/** @var AccountRepositoryInterface $accountRepository */
|
/** @var AccountRepositoryInterface $accountRepository */
|
||||||
@@ -127,7 +106,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($accounts, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($accounts, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.currencies.accounts', [$currency->code]).$this->buildParams());
|
$paginator->setPath(route('api.v1.currencies.accounts', [$currency->code]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var AccountTransformer $transformer */
|
/** @var AccountTransformer $transformer */
|
||||||
$transformer = app(AccountTransformer::class);
|
$transformer = app(AccountTransformer::class);
|
||||||
@@ -153,7 +132,7 @@ class ListController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of available budgets. Count it and split it.
|
// get list of available budgets. Count it and split it.
|
||||||
/** @var AvailableBudgetRepositoryInterface $abRepository */
|
/** @var AvailableBudgetRepositoryInterface $abRepository */
|
||||||
@@ -164,7 +143,7 @@ class ListController extends Controller
|
|||||||
$availableBudgets = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
$availableBudgets = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($availableBudgets, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($availableBudgets, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.currencies.available-budgets', [$currency->code]).$this->buildParams());
|
$paginator->setPath(route('api.v1.currencies.available-budgets', [$currency->code]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var AvailableBudgetTransformer $transformer */
|
/** @var AvailableBudgetTransformer $transformer */
|
||||||
$transformer = app(AvailableBudgetTransformer::class);
|
$transformer = app(AvailableBudgetTransformer::class);
|
||||||
@@ -193,7 +172,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
/** @var BillRepositoryInterface $billRepos */
|
/** @var BillRepositoryInterface $billRepos */
|
||||||
$billRepos = app(BillRepositoryInterface::class);
|
$billRepos = app(BillRepositoryInterface::class);
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$unfiltered = $billRepos->getBills();
|
$unfiltered = $billRepos->getBills();
|
||||||
|
|
||||||
// filter and paginate list:
|
// filter and paginate list:
|
||||||
@@ -207,7 +186,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($bills, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($bills, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.currencies.bills', [$currency->code]).$this->buildParams());
|
$paginator->setPath(route('api.v1.currencies.bills', [$currency->code]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var BillTransformer $transformer */
|
/** @var BillTransformer $transformer */
|
||||||
$transformer = app(BillTransformer::class);
|
$transformer = app(BillTransformer::class);
|
||||||
@@ -236,12 +215,12 @@ class ListController extends Controller
|
|||||||
$blRepository = app(BudgetLimitRepositoryInterface::class);
|
$blRepository = app(BudgetLimitRepositoryInterface::class);
|
||||||
|
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = $blRepository->getAllBudgetLimitsByCurrency($currency, $this->parameters->get('start'), $this->parameters->get('end'));
|
$collection = $blRepository->getAllBudgetLimitsByCurrency($currency, $this->parameters->get('start'), $this->parameters->get('end'));
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||||
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.currencies.budget-limits', [$currency->code]).$this->buildParams());
|
$paginator->setPath(route('api.v1.currencies.budget-limits', [$currency->code]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var BudgetLimitTransformer $transformer */
|
/** @var BudgetLimitTransformer $transformer */
|
||||||
$transformer = app(BudgetLimitTransformer::class);
|
$transformer = app(BudgetLimitTransformer::class);
|
||||||
@@ -268,7 +247,7 @@ class ListController extends Controller
|
|||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
/** @var RecurringRepositoryInterface $recurringRepos */
|
/** @var RecurringRepositoryInterface $recurringRepos */
|
||||||
@@ -293,7 +272,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.currencies.recurrences', [$currency->code]).$this->buildParams());
|
$paginator->setPath(route('api.v1.currencies.recurrences', [$currency->code]) . $this->buildParams());
|
||||||
|
|
||||||
/** @var RecurrenceTransformer $transformer */
|
/** @var RecurrenceTransformer $transformer */
|
||||||
$transformer = app(RecurrenceTransformer::class);
|
$transformer = app(RecurrenceTransformer::class);
|
||||||
@@ -319,7 +298,7 @@ class ListController extends Controller
|
|||||||
public function rules(TransactionCurrency $currency): JsonResponse
|
public function rules(TransactionCurrency $currency): JsonResponse
|
||||||
{
|
{
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of budgets. Count it and split it.
|
// get list of budgets. Count it and split it.
|
||||||
/** @var RuleRepositoryInterface $ruleRepos */
|
/** @var RuleRepositoryInterface $ruleRepos */
|
||||||
@@ -344,7 +323,7 @@ class ListController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.rules.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.rules.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var RuleTransformer $transformer */
|
/** @var RuleTransformer $transformer */
|
||||||
$transformer = app(RuleTransformer::class);
|
$transformer = app(RuleTransformer::class);
|
||||||
@@ -371,7 +350,7 @@ class ListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function transactions(Request $request, TransactionCurrency $currency): JsonResponse
|
public function transactions(Request $request, TransactionCurrency $currency): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
|
|
||||||
@@ -396,11 +375,14 @@ class ListController extends Controller
|
|||||||
->setPage($this->parameters->get('page'))
|
->setPage($this->parameters->get('page'))
|
||||||
// set types of transactions to return.
|
// set types of transactions to return.
|
||||||
->setTypes($types);
|
->setTypes($types);
|
||||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
if (null !== $this->parameters->get('start')) {
|
||||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
$collector->setStart($this->parameters->get('start'));
|
||||||
|
}
|
||||||
|
if (null !== $this->parameters->get('end')) {
|
||||||
|
$collector->setEnd($this->parameters->get('end'));
|
||||||
}
|
}
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.currencies.transactions', [$currency->code]).$this->buildParams());
|
$paginator->setPath(route('api.v1.currencies.transactions', [$currency->code]) . $this->buildParams());
|
||||||
$transactions = $paginator->getCollection();
|
$transactions = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
|
@@ -27,10 +27,11 @@ namespace FireflyIII\Api\V1\Controllers\Models\TransactionCurrency;
|
|||||||
use FireflyIII\Api\V1\Controllers\Controller;
|
use FireflyIII\Api\V1\Controllers\Controller;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||||
use FireflyIII\Support\Http\Api\TransactionFilter;
|
use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||||
use FireflyIII\Transformers\CurrencyTransformer;
|
use FireflyIII\Transformers\CurrencyTransformer;
|
||||||
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use JsonException;
|
use JsonException;
|
||||||
@@ -78,16 +79,15 @@ class ShowController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index(): JsonResponse
|
public function index(): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$collection = $this->repository->getAll();
|
$collection = $this->repository->getAll();
|
||||||
$count = $collection->count();
|
$count = $collection->count();
|
||||||
|
|
||||||
// slice them:
|
// slice them:
|
||||||
$currencies = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
$currencies = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||||
$paginator = new LengthAwarePaginator($currencies, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($currencies, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.currencies.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.currencies.index') . $this->buildParams());
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
|
||||||
$this->parameters->set('defaultCurrency', $defaultCurrency);
|
|
||||||
|
|
||||||
/** @var CurrencyTransformer $transformer */
|
/** @var CurrencyTransformer $transformer */
|
||||||
$transformer = app(CurrencyTransformer::class);
|
$transformer = app(CurrencyTransformer::class);
|
||||||
@@ -113,10 +113,15 @@ class ShowController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function show(TransactionCurrency $currency): JsonResponse
|
public function show(TransactionCurrency $currency): JsonResponse
|
||||||
{
|
{
|
||||||
|
/** @var User $user */
|
||||||
|
$user = auth()->user();
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
$defaultCurrency = app('amount')->getDefaultCurrencyByUserGroup($user->userGroup);
|
||||||
$this->parameters->set('defaultCurrency', $defaultCurrency);
|
$this->parameters->set('defaultCurrency', $defaultCurrency);
|
||||||
|
|
||||||
|
// update fields with user info.
|
||||||
|
$currency->refreshForUser($user);
|
||||||
|
|
||||||
/** @var CurrencyTransformer $transformer */
|
/** @var CurrencyTransformer $transformer */
|
||||||
$transformer = app(CurrencyTransformer::class);
|
$transformer = app(CurrencyTransformer::class);
|
||||||
$transformer->setParameters($this->parameters);
|
$transformer->setParameters($this->parameters);
|
||||||
@@ -138,9 +143,13 @@ class ShowController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function showDefault(): JsonResponse
|
public function showDefault(): JsonResponse
|
||||||
{
|
{
|
||||||
|
/** @var User $user */
|
||||||
|
$user = auth()->user();
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$currency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
$currency = app('amount')->getDefaultCurrencyByUserGroup($user->userGroup);
|
||||||
$this->parameters->set('defaultCurrency', $currency);
|
|
||||||
|
// update fields with user info.
|
||||||
|
$currency->refreshForUser($user);
|
||||||
|
|
||||||
/** @var CurrencyTransformer $transformer */
|
/** @var CurrencyTransformer $transformer */
|
||||||
$transformer = app(CurrencyTransformer::class);
|
$transformer = app(CurrencyTransformer::class);
|
||||||
|
@@ -27,10 +27,11 @@ namespace FireflyIII\Api\V1\Controllers\Models\TransactionCurrency;
|
|||||||
use FireflyIII\Api\V1\Controllers\Controller;
|
use FireflyIII\Api\V1\Controllers\Controller;
|
||||||
use FireflyIII\Api\V1\Requests\Models\TransactionCurrency\StoreRequest;
|
use FireflyIII\Api\V1\Requests\Models\TransactionCurrency\StoreRequest;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||||
use FireflyIII\Support\Http\Api\TransactionFilter;
|
use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||||
use FireflyIII\Transformers\CurrencyTransformer;
|
use FireflyIII\Transformers\CurrencyTransformer;
|
||||||
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use JsonException;
|
use JsonException;
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
@@ -79,12 +80,14 @@ class StoreController extends Controller
|
|||||||
{
|
{
|
||||||
$currency = $this->repository->store($request->getAll());
|
$currency = $this->repository->store($request->getAll());
|
||||||
if (true === $request->boolean('default')) {
|
if (true === $request->boolean('default')) {
|
||||||
app('preferences')->set('currencyPreference', $currency->code);
|
$this->repository->makeDefault($currency);
|
||||||
app('preferences')->mark();
|
app('preferences')->mark();
|
||||||
}
|
}
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
|
||||||
$this->parameters->set('defaultCurrency', $defaultCurrency);
|
/** @var User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
$currency->refreshForUser($user);
|
||||||
|
|
||||||
/** @var CurrencyTransformer $transformer */
|
/** @var CurrencyTransformer $transformer */
|
||||||
$transformer = app(CurrencyTransformer::class);
|
$transformer = app(CurrencyTransformer::class);
|
||||||
|
@@ -28,10 +28,11 @@ use FireflyIII\Api\V1\Controllers\Controller;
|
|||||||
use FireflyIII\Api\V1\Requests\Models\TransactionCurrency\UpdateRequest;
|
use FireflyIII\Api\V1\Requests\Models\TransactionCurrency\UpdateRequest;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
use FireflyIII\Repositories\UserGroups\Currency\CurrencyRepositoryInterface;
|
||||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||||
use FireflyIII\Support\Http\Api\TransactionFilter;
|
use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||||
use FireflyIII\Transformers\CurrencyTransformer;
|
use FireflyIII\Transformers\CurrencyTransformer;
|
||||||
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use JsonException;
|
use JsonException;
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
@@ -82,11 +83,16 @@ class UpdateController extends Controller
|
|||||||
if ($this->repository->currencyInUse($currency)) {
|
if ($this->repository->currencyInUse($currency)) {
|
||||||
return response()->json([], 409);
|
return response()->json([], 409);
|
||||||
}
|
}
|
||||||
|
// must not be the only one in use:
|
||||||
|
if (1 === $this->repository->get()->count()) {
|
||||||
|
return response()->json([], 409);
|
||||||
|
}
|
||||||
|
/** @var User $user */
|
||||||
|
$user = auth()->user();
|
||||||
$this->repository->disable($currency);
|
$this->repository->disable($currency);
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
|
||||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
$currency->refreshForUser($user);
|
||||||
$this->parameters->set('defaultCurrency', $defaultCurrency);
|
|
||||||
|
|
||||||
/** @var CurrencyTransformer $transformer */
|
/** @var CurrencyTransformer $transformer */
|
||||||
$transformer = app(CurrencyTransformer::class);
|
$transformer = app(CurrencyTransformer::class);
|
||||||
@@ -110,14 +116,15 @@ class UpdateController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function makeDefault(TransactionCurrency $currency): JsonResponse
|
public function makeDefault(TransactionCurrency $currency): JsonResponse
|
||||||
{
|
{
|
||||||
|
/** @var User $user */
|
||||||
|
$user = auth()->user();
|
||||||
$this->repository->enable($currency);
|
$this->repository->enable($currency);
|
||||||
|
$this->repository->makeDefault($currency);
|
||||||
|
|
||||||
app('preferences')->set('currencyPreference', $currency->code);
|
|
||||||
app('preferences')->mark();
|
app('preferences')->mark();
|
||||||
|
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
$currency->refreshForUser($user);
|
||||||
$this->parameters->set('defaultCurrency', $currency);
|
|
||||||
|
|
||||||
/** @var CurrencyTransformer $transformer */
|
/** @var CurrencyTransformer $transformer */
|
||||||
$transformer = app(CurrencyTransformer::class);
|
$transformer = app(CurrencyTransformer::class);
|
||||||
@@ -144,9 +151,10 @@ class UpdateController extends Controller
|
|||||||
{
|
{
|
||||||
$this->repository->enable($currency);
|
$this->repository->enable($currency);
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
/** @var User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
$currency->refreshForUser($user);
|
||||||
$this->parameters->set('defaultCurrency', $defaultCurrency);
|
|
||||||
|
|
||||||
/** @var CurrencyTransformer $transformer */
|
/** @var CurrencyTransformer $transformer */
|
||||||
$transformer = app(CurrencyTransformer::class);
|
$transformer = app(CurrencyTransformer::class);
|
||||||
@@ -173,17 +181,22 @@ class UpdateController extends Controller
|
|||||||
public function update(UpdateRequest $request, TransactionCurrency $currency): JsonResponse
|
public function update(UpdateRequest $request, TransactionCurrency $currency): JsonResponse
|
||||||
{
|
{
|
||||||
$data = $request->getAll();
|
$data = $request->getAll();
|
||||||
|
|
||||||
|
/** @var User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
|
// safety catch on currency disablement.
|
||||||
|
$set = $this->repository->get();
|
||||||
|
if (array_key_exists('enabled', $data) && false === $data['enabled'] && 1 === count($set) && $set->first()->id === $currency->id) {
|
||||||
|
return response()->json([], 409);
|
||||||
|
|
||||||
|
}
|
||||||
$currency = $this->repository->update($currency, $data);
|
$currency = $this->repository->update($currency, $data);
|
||||||
|
|
||||||
if (true === $request->boolean('default')) {
|
|
||||||
app('preferences')->set('currencyPreference', $currency->code);
|
|
||||||
app('preferences')->mark();
|
app('preferences')->mark();
|
||||||
}
|
|
||||||
|
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
$currency->refreshForUser($user);
|
||||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
|
||||||
$this->parameters->set('defaultCurrency', $defaultCurrency);
|
|
||||||
|
|
||||||
/** @var CurrencyTransformer $transformer */
|
/** @var CurrencyTransformer $transformer */
|
||||||
$transformer = app(CurrencyTransformer::class);
|
$transformer = app(CurrencyTransformer::class);
|
||||||
|
@@ -30,6 +30,9 @@ use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
|
|||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class DestroyController
|
||||||
|
*/
|
||||||
class DestroyController extends Controller
|
class DestroyController extends Controller
|
||||||
{
|
{
|
||||||
private LinkTypeRepositoryInterface $repository;
|
private LinkTypeRepositoryInterface $repository;
|
||||||
|
@@ -37,6 +37,9 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
|||||||
use League\Fractal\Resource\Collection as FractalCollection;
|
use League\Fractal\Resource\Collection as FractalCollection;
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ShowController
|
||||||
|
*/
|
||||||
class ShowController extends Controller
|
class ShowController extends Controller
|
||||||
{
|
{
|
||||||
private LinkTypeRepositoryInterface $repository;
|
private LinkTypeRepositoryInterface $repository;
|
||||||
@@ -82,7 +85,7 @@ class ShowController extends Controller
|
|||||||
$name = $request->get('name');
|
$name = $request->get('name');
|
||||||
|
|
||||||
// types to get, page size:
|
// types to get, page size:
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$linkType = $this->repository->findByName($name);
|
$linkType = $this->repository->findByName($name);
|
||||||
|
|
||||||
// get list of transaction links. Count it and split it.
|
// get list of transaction links. Count it and split it.
|
||||||
@@ -92,7 +95,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($journalLinks, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($journalLinks, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.transaction-links.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.transaction-links.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var TransactionLinkTransformer $transformer */
|
/** @var TransactionLinkTransformer $transformer */
|
||||||
$transformer = app(TransactionLinkTransformer::class);
|
$transformer = app(TransactionLinkTransformer::class);
|
||||||
|
@@ -35,6 +35,9 @@ use FireflyIII\User;
|
|||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class StoreController
|
||||||
|
*/
|
||||||
class StoreController extends Controller
|
class StoreController extends Controller
|
||||||
{
|
{
|
||||||
use TransactionFilter;
|
use TransactionFilter;
|
||||||
|
@@ -34,6 +34,9 @@ use FireflyIII\User;
|
|||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use League\Fractal\Resource\Item;
|
use League\Fractal\Resource\Item;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class UpdateController
|
||||||
|
*/
|
||||||
class UpdateController extends Controller
|
class UpdateController extends Controller
|
||||||
{
|
{
|
||||||
private JournalRepositoryInterface $journalRepository;
|
private JournalRepositoryInterface $journalRepository;
|
||||||
|
@@ -78,7 +78,7 @@ class ListController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function transactions(Request $request, LinkType $linkType): JsonResponse
|
public function transactions(Request $request, LinkType $linkType): JsonResponse
|
||||||
{
|
{
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
$type = $request->get('type') ?? 'default';
|
$type = $request->get('type') ?? 'default';
|
||||||
$this->parameters->set('type', $type);
|
$this->parameters->set('type', $type);
|
||||||
|
|
||||||
@@ -106,11 +106,14 @@ class ListController extends Controller
|
|||||||
->setPage($this->parameters->get('page'))
|
->setPage($this->parameters->get('page'))
|
||||||
// set types of transactions to return.
|
// set types of transactions to return.
|
||||||
->setTypes($types);
|
->setTypes($types);
|
||||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
if (null !== $this->parameters->get('start')) {
|
||||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
$collector->setStart($this->parameters->get('start'));
|
||||||
|
}
|
||||||
|
if (null !== $this->parameters->get('end')) {
|
||||||
|
$collector->setEnd($this->parameters->get('end'));
|
||||||
}
|
}
|
||||||
$paginator = $collector->getPaginatedGroups();
|
$paginator = $collector->getPaginatedGroups();
|
||||||
$paginator->setPath(route('api.v1.transactions.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.transactions.index') . $this->buildParams());
|
||||||
$transactions = $paginator->getCollection();
|
$transactions = $paginator->getCollection();
|
||||||
|
|
||||||
/** @var TransactionGroupTransformer $transformer */
|
/** @var TransactionGroupTransformer $transformer */
|
||||||
|
@@ -78,7 +78,7 @@ class ShowController extends Controller
|
|||||||
{
|
{
|
||||||
// create some objects:
|
// create some objects:
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
$pageSize = $this->parameters->get('limit');
|
||||||
|
|
||||||
// get list of accounts. Count it and split it.
|
// get list of accounts. Count it and split it.
|
||||||
$collection = $this->repository->get();
|
$collection = $this->repository->get();
|
||||||
@@ -87,7 +87,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
// make paginator:
|
// make paginator:
|
||||||
$paginator = new LengthAwarePaginator($linkTypes, $count, $pageSize, $this->parameters->get('page'));
|
$paginator = new LengthAwarePaginator($linkTypes, $count, $pageSize, $this->parameters->get('page'));
|
||||||
$paginator->setPath(route('api.v1.link-types.index').$this->buildParams());
|
$paginator->setPath(route('api.v1.link-types.index') . $this->buildParams());
|
||||||
|
|
||||||
/** @var LinkTypeTransformer $transformer */
|
/** @var LinkTypeTransformer $transformer */
|
||||||
$transformer = app(LinkTypeTransformer::class);
|
$transformer = app(LinkTypeTransformer::class);
|
||||||
|
@@ -32,10 +32,9 @@ use Illuminate\Http\JsonResponse;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use JsonException;
|
use Illuminate\Support\Facades\Log;
|
||||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||||
use League\Fractal\Resource\Collection as FractalCollection;
|
use League\Fractal\Resource\Collection as FractalCollection;
|
||||||
use Log;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AccountController
|
* Class AccountController
|
||||||
@@ -61,12 +60,12 @@ class AccountController extends Controller
|
|||||||
/**
|
/**
|
||||||
* This endpoint is documented at:
|
* This endpoint is documented at:
|
||||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/search/searchAccounts
|
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/search/searchAccounts
|
||||||
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return JsonResponse|Response
|
* @return JsonResponse|Response
|
||||||
* @throws JsonException
|
|
||||||
*/
|
*/
|
||||||
public function search(Request $request)
|
public function search(Request $request): JsonResponse | Response
|
||||||
{
|
{
|
||||||
Log::debug('Now in account search()');
|
Log::debug('Now in account search()');
|
||||||
$manager = $this->getManager();
|
$manager = $this->getManager();
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user