Compare commits

..

2205 Commits

Author SHA1 Message Date
dependabot[bot]
4b850a1ee5 Bump eventsource from 1.0.7 to 1.1.2
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.0.7 to 1.1.2.
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.0.7...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 12:04:56 +00:00
3c94239da7 offset stuff 2021-08-02 02:24:39 -05:00
7e6c8224a5 offset stuff 2021-08-02 02:24:10 -05:00
8bc1289206 offset stuff 2021-08-02 02:23:47 -05:00
75390f10cd offset stuff 2021-08-02 02:21:41 -05:00
7468e63299 offset stuff 2021-08-02 02:19:36 -05:00
4c88de77a7 offset stuff 2021-08-02 02:17:45 -05:00
c7502b853c offset stuff 2021-08-02 02:14:23 -05:00
249ab13004 offset stuff 2021-08-02 02:13:59 -05:00
fce67286fd offset stuff 2021-08-02 02:11:44 -05:00
f841639ec3 offset stuff 2021-08-02 02:10:43 -05:00
c270017111 offset stuff 2021-08-02 02:09:24 -05:00
0ee317b0fc offset stuff 2021-08-02 02:08:53 -05:00
f606b9cdd5 financial outlook update 2021-08-02 02:07:22 -05:00
412b4d6794 adding more cards for more graphs for financial outlook graphing 2021-08-02 01:40:20 -05:00
c045cabcf7 financial outlook display 2021-08-02 01:38:31 -05:00
f5adc203f3 financial outlook display 2021-08-02 01:37:43 -05:00
f3362bab00 financial outlook display 2021-08-02 01:37:09 -05:00
268e2fdbee updated how require permission works 2021-08-02 01:34:33 -05:00
6d38e6fc8c updated how require permission works 2021-08-02 01:31:37 -05:00
99ff081b05 updated how require permission works 2021-08-02 01:31:11 -05:00
5b88887f53 updated how require permission works 2021-08-02 01:30:22 -05:00
669f716112 finances stuff 2021-08-01 23:52:59 -05:00
addd34cb82 finances stuff 2021-08-01 23:48:07 -05:00
c77a6e7af6 invoice changes 2021-08-01 23:44:00 -05:00
28ca917d5d invoice changes 2021-08-01 23:41:57 -05:00
1196abb0a0 invoice changes 2021-08-01 23:40:27 -05:00
68560e4e35 invoice changes 2021-08-01 23:39:30 -05:00
a4eb7b9ad3 invoice changes 2021-08-01 23:38:49 -05:00
35591ab04c invoice changes 2021-08-01 23:37:52 -05:00
339b1063c6 invoice changes 2021-08-01 23:36:03 -05:00
83592117d1 invoice details 2021-08-01 23:14:29 -05:00
ff1e396fbc added sidebar menu items for new controller 2021-07-18 01:45:08 -05:00
5471ccfa17 added new routes for finance pages 2021-07-18 01:37:28 -05:00
c0aa379d37 added financial blade and controller.
need to add routes still
2021-07-18 01:12:07 -05:00
3da0cec4a1 added moon rentals into tax performance metrics 2021-07-18 00:39:02 -05:00
bca5179cc3 added blade for showing rented moons 2021-07-18 00:32:34 -05:00
c075112810 added ability to see own or corp rented moon in the miningtaxescontroller 2021-07-16 23:17:51 -05:00
57d01028cf display rented moons in the controller 2021-07-13 02:22:45 -05:00
bef633434c rental stuff date was wrong 2021-07-12 19:26:58 -05:00
6afba02675 fix structure name 2021-07-10 23:27:10 -05:00
4ac1ef0e73 fix structure name 2021-07-10 23:25:28 -05:00
0b0faf26d2 moon rental form 2021-07-10 22:05:05 -05:00
d49695e7e8 moon rental form 2021-07-10 22:00:06 -05:00
0e96905213 moon rental form 2021-07-10 21:48:36 -05:00
57d9d4b99b moon rental form 2021-07-10 21:48:28 -05:00
f77e6874d0 moon rental form 2021-07-10 21:47:05 -05:00
daa72ff60c moon rental form 2021-07-10 21:21:49 -05:00
8bd44c10b8 moon rental form 2021-07-10 21:17:51 -05:00
f4c77eee00 moon rental form 2021-07-10 20:58:52 -05:00
5b11c5b629 moon rental form 2021-07-10 20:58:39 -05:00
2e1f28c8c5 moon rental form 2021-07-10 20:50:38 -05:00
7bc2b82837 moon rental form 2021-07-10 20:47:01 -05:00
f6f73cbb94 moon rental form 2021-07-09 19:27:22 -05:00
411b005dee moon rental pages 2021-07-09 02:13:51 -05:00
aacf2fc830 moon rental pages 2021-07-09 01:36:12 -05:00
e498a2b202 moon rental pages 2021-07-09 01:31:17 -05:00
3853a81fba moon rental pages 2021-07-09 01:27:31 -05:00
7b26a021e1 moon rental pages 2021-07-09 01:20:34 -05:00
b310799bf0 moon rental pages 2021-07-09 01:06:40 -05:00
1a44be502a working on moon rental worth 2021-07-05 22:01:10 -05:00
103a41c0ff working on moon rental worth 2021-07-05 21:52:31 -05:00
9e5e3720b5 working on moon rental worth 2021-07-05 21:51:57 -05:00
baf7c2130e working on moon rental worth 2021-07-05 21:50:58 -05:00
c889960805 working on moon rental worth 2021-07-05 21:49:55 -05:00
9462aea45f working on moon rental worth 2021-07-05 21:49:23 -05:00
f26ba1d75c working on moon rental worth 2021-07-05 21:42:20 -05:00
2d575dd86b working on moon rental worth 2021-07-05 21:41:33 -05:00
5db70758cb mining op form 2021-06-27 19:41:12 +00:00
8f2036eecc structure helper 2021-06-24 21:26:42 +09:00
083422047c store operations form 2021-06-24 11:42:53 +09:00
dda65951b3 update alliance moon rental worth 2021-06-22 20:59:50 +09:00
dbd30021f9 schedule 2021-06-22 20:53:15 +09:00
c69416ee88 schedule 2021-06-22 20:50:21 +09:00
03b0c71708 fixed send mining taxes invoices 2021-06-22 20:45:54 +09:00
d4214ee4bf command for moon rental worth 2021-06-19 02:31:15 -05:00
c70999100b test command 2021-06-19 07:00:53 +00:00
eceac30f4b modified display invoices to display the whole invoice and not only part of the invoice 2021-06-17 00:25:58 +09:00
736eb6feba mining invoice mail update 2021-06-07 23:46:01 +09:00
cd0710c428 mining operations 2021-06-07 20:06:17 +09:00
bd03a983a2 mining invoices 2021-06-07 20:00:15 +09:00
4c3896cbee invoicing 2021-06-07 19:54:34 +09:00
c362de7589 mining invoices 2021-06-07 19:32:02 +09:00
c17af03ef3 mining invoices 2021-06-07 19:09:10 +09:00
2fbf72df61 job updates and command kernel updates 2021-06-07 03:32:45 +09:00
55b0002688 job updates and command kernel updates 2021-06-07 03:31:51 +09:00
2a3a86f185 job updates and command kernel updates 2021-06-07 03:30:23 +09:00
82072f18dc after action reports 2021-06-06 00:25:07 +09:00
7bfc30e50d fixed delay time on dispatching late invoices job 2021-06-04 20:04:50 +09:00
109d70363d update to some jobs to try to keep them from failing 2021-06-04 20:03:35 +09:00
0ef8dca814 mining operations 2021-06-04 00:34:04 +09:00
9685d7ee8a mining operations 2021-06-04 00:32:52 +09:00
1dd6b73632 mining operations 2021-06-04 00:29:50 +09:00
1a591b202c mining operations 2021-06-04 00:28:12 +09:00
ddda064033 mining operations 2021-06-04 00:27:47 +09:00
48b5955e16 mining operations 2021-06-04 00:26:29 +09:00
a877e28da9 mining operations 2021-06-04 00:24:58 +09:00
f0ec279ea5 mining operations 2021-06-04 00:23:42 +09:00
254931998c mining operations 2021-06-04 00:20:42 +09:00
9ad22c03a8 mining operations 2021-06-04 00:01:23 +09:00
1210c71484 mining operations 2021-06-03 23:59:20 +09:00
bd4b5e8a83 mining operations 2021-06-03 01:28:47 +09:00
3b02745302 mining operations 2021-06-03 01:27:58 +09:00
2349f1031c fixed job issue 2021-06-03 00:52:49 +09:00
8ea29296bd fixed job issue 2021-06-03 00:41:29 +09:00
68ce69ec70 fixed job issue 2021-06-03 00:39:33 +09:00
814db0307a testing new functions 2021-06-03 00:19:22 +09:00
0aaddbe9ad testing new functions 2021-06-03 00:17:58 +09:00
5fcca05d2b testing new functions 2021-06-03 00:16:39 +09:00
8f6be2c87e testing new functions 2021-06-03 00:16:15 +09:00
8749ce8848 testing new functions 2021-06-03 00:15:49 +09:00
ac0ca03845 testing new functions 2021-06-03 00:14:54 +09:00
568928c98f testing new functions 2021-06-03 00:14:10 +09:00
8fb4b979c3 testing new functions 2021-06-03 00:13:05 +09:00
23739baa7c testing new functions 2021-06-03 00:12:13 +09:00
c7ce7a9351 testing new functions 2021-06-03 00:11:42 +09:00
74f4c21244 testing new functions 2021-06-03 00:09:11 +09:00
996ff6e6aa testing new functions 2021-06-03 00:06:50 +09:00
918d9129f4 testing new functions 2021-06-02 23:59:32 +09:00
27f782f659 added a way for mining operations to be recorded.
refactored mining tax invoice jobs with a job chain and new directory structure
added views and forms for mining operations
added navbar button for mining operations
refactored how admin dashboard controller checks for permissions versus roles
2021-06-02 01:49:24 +09:00
17b1db88c1 added yields for extra content in the admin dashboard 2021-06-01 22:12:48 +09:00
27e05fdfde added yields and hasSections 2021-06-01 22:02:38 +09:00
a07151f507 moon displays 2021-06-01 00:05:32 +09:00
94c4cf760a moon displays 2021-06-01 00:04:41 +09:00
20cc7f22dc moon displays 2021-06-01 00:03:31 +09:00
49257e4cf4 moon displays 2021-06-01 00:01:03 +09:00
bc0b3336c5 moon displays 2021-05-31 23:59:32 +09:00
fadf93b425 moon displays 2021-05-31 23:56:32 +09:00
0815b43797 moon displays 2021-05-31 23:55:12 +09:00
55185bae5b moon displays 2021-05-31 23:46:54 +09:00
4030166118 moon displays 2021-05-31 23:42:20 +09:00
f179cbedd7 moon displays 2021-05-31 23:41:30 +09:00
20bb89f388 moon displays 2021-05-31 23:37:30 +09:00
e4ccf5190b moon displays 2021-05-31 23:36:18 +09:00
38b0b8f63f moon displays 2021-05-31 23:34:56 +09:00
dedbcc6c84 moon displays 2021-05-31 23:34:01 +09:00
cef0f7632d moon displays 2021-05-31 23:32:29 +09:00
7af4457c6a moon displays 2021-05-31 23:31:35 +09:00
9e851e1a10 moon displays 2021-05-31 23:29:01 +09:00
b322f9a8a6 moon displays 2021-05-31 23:27:48 +09:00
02722c3146 moon displays 2021-05-31 23:26:25 +09:00
8405913e84 moon displays 2021-05-31 23:24:53 +09:00
5d5b23b25b moon displays 2021-05-31 23:23:54 +09:00
e3e10952a6 moon displays 2021-05-31 23:21:29 +09:00
58e2dcdcc9 moon displays 2021-05-31 23:20:58 +09:00
936fca0667 moon displays 2021-05-31 23:20:00 +09:00
e777d7e816 moon displays 2021-05-31 23:17:57 +09:00
5472c99b15 modification of user invoice detail display 2021-05-31 21:30:38 +09:00
2848102b79 admin invoices for mining tax 2021-05-31 21:29:19 +09:00
d3fae0711f admin invoices for mining tax 2021-05-31 21:28:40 +09:00
0f05abc0ae admin invoices for mining tax 2021-05-31 21:26:27 +09:00
e52071f1f8 admin invoices for mining tax 2021-05-31 21:25:09 +09:00
f65b7380dc admin invoices for mining tax 2021-05-31 21:24:21 +09:00
96f84d69e2 admin invoices for mining tax 2021-05-31 21:20:36 +09:00
8f23d0a1b0 admin invoices for mining tax 2021-05-31 21:19:40 +09:00
1058cf4a9a fixed invoice id controller 2021-05-31 21:16:00 +09:00
dae26c74ee import alliance moons 2021-05-31 21:00:24 +09:00
5a35b3f6a5 import alliance moons 2021-05-31 20:59:57 +09:00
79936f7030 import alliance moons 2021-05-31 20:59:10 +09:00
734b16d8a6 import alliance moons 2021-05-31 20:55:03 +09:00
e0940ac9bc import alliance moons 2021-05-31 20:54:21 +09:00
843e3806fb import alliance moons 2021-05-31 20:47:23 +09:00
13e99bd4a9 find moon ore in importalliancemoons.php 2021-05-31 20:35:31 +09:00
bce8363a53 test stuff 2021-05-31 20:12:23 +09:00
e536c55439 test invoice 2021-05-31 19:57:08 +09:00
d474c71c88 test invoice 2021-05-31 19:51:43 +09:00
0df5bc06fe pi controller 2021-05-31 19:25:08 +09:00
d221f9a49f pi controller 2021-05-31 19:21:45 +09:00
371e4af00f pi controller 2021-05-31 19:19:25 +09:00
27508e468c pi controller 2021-05-31 19:19:17 +09:00
20af2287c4 pi controller 2021-05-31 19:18:14 +09:00
5433bee74d pi controller 2021-05-31 19:17:26 +09:00
291d7bfeaa pi controller 2021-05-31 19:14:20 +09:00
1803ea1343 pi controller 2021-05-31 19:13:17 +09:00
014cdbcf75 pi controller 2021-05-31 19:12:18 +09:00
d91622b6d3 pi controller 2021-05-31 19:10:55 +09:00
2d96396687 added token expiry check in FetchAllianceAssets 2021-05-31 18:26:05 +09:00
27b16d7595 testing invoiceAmount 2021-05-31 18:12:34 +09:00
265923aa84 testing invoiceAmount 2021-05-31 18:11:32 +09:00
e8bbcfcfad testing invoiceAmount 2021-05-31 18:11:16 +09:00
9e963d581e testing invoiceAmount 2021-05-31 18:02:44 +09:00
6843f99a1f testing invoiceAmount 2021-05-31 18:01:12 +09:00
1c0f4392b2 testing invoiceAmount 2021-05-31 17:59:47 +09:00
8d3c122d93 testing invoiceAmount 2021-05-31 17:59:09 +09:00
e57ab1a0fb testing invoiceAmount 2021-05-31 17:58:02 +09:00
a0e6fc6157 testing invoiceAmount 2021-05-31 17:56:14 +09:00
d842e7bc02 fixed issue in ledger 2021-05-31 17:28:47 +09:00
a3dfb2bbe6 changed schedule for observers and ledgers 2021-05-31 17:25:44 +09:00
932911a746 testing moon worth job 2021-05-30 23:55:50 +09:00
3f3c169555 testing moon worth job 2021-05-30 22:47:39 +09:00
6b8123d650 testing moon worth job 2021-05-30 22:47:30 +09:00
ac885c5e3f testing moon worth job 2021-05-30 22:45:12 +09:00
8c44bdac05 testing moon worth job 2021-05-30 22:44:04 +09:00
bb65968afe testing moon worth job 2021-05-30 22:43:34 +09:00
44d3ea2468 testing moon worth job 2021-05-30 22:43:01 +09:00
3f76dd78cb testing moon worth job 2021-05-30 22:42:30 +09:00
9c1d94cdc0 testing moon worth job 2021-05-30 22:42:17 +09:00
e322ceb622 testing moon worth job 2021-05-30 22:38:45 +09:00
1a24d95d31 testing moon worth job 2021-05-30 22:37:16 +09:00
2e159063b5 job updates 2021-05-30 21:59:33 +09:00
1be8be97aa job updates 2021-05-30 21:57:45 +09:00
565693d911 updated jobs with new exception handler for jobs 2021-05-30 21:54:34 +09:00
87cfcf3dd2 foreign keys 2021-05-30 21:32:56 +09:00
45b1be2b9f foreign keys 2021-05-30 21:26:58 +09:00
bb85db9c3b modifying old tables for new formats' 2021-05-30 21:11:06 +09:00
f506f9275d foreign keys 2021-05-30 21:01:56 +09:00
973a8a7ebb foreign keys 2021-05-30 20:53:51 +09:00
86534dea29 migration cleanup and new foreign keys on existing migrations 2021-05-30 20:39:02 +09:00
353d8c5183 foreign keys for alliance moon rental tables 2021-05-30 20:04:24 +09:00
3b02dfb1c7 foreign keys for alliance moon rental tables 2021-05-30 20:03:28 +09:00
f78b9eddb9 foreign keys for alliance moon rental tables 2021-05-30 20:01:38 +09:00
30ea561714 import moons 2021-05-30 19:34:00 +09:00
db557162af import moons 2021-05-30 19:26:40 +09:00
76b19c6ff5 import moons 2021-05-30 19:12:30 +09:00
df5f29566d import moons 2021-05-30 19:07:30 +09:00
82d815adbb import moons 2021-05-30 19:06:58 +09:00
d54b735986 import moons 2021-05-30 19:06:28 +09:00
fbfb43040c import moons 2021-05-30 19:05:48 +09:00
b332ac8acf import moons 2021-05-30 19:05:06 +09:00
61a6836a67 import moons 2021-05-30 19:03:55 +09:00
5a6a1a19c4 import moons 2021-05-30 19:03:09 +09:00
120bb5edc9 import moons 2021-05-30 18:57:38 +09:00
d14bbc1d22 import moons 2021-05-30 18:56:40 +09:00
10c5a8c75c import moons 2021-05-30 18:55:49 +09:00
51da1dbbc3 import moons 2021-05-30 18:54:59 +09:00
89e4110ab0 removed unwanted migrations 2021-05-30 18:45:41 +09:00
c06beae86f alliance moon ores 2021-05-30 18:42:02 +09:00
bc59b580b0 alliance moon ores 2021-05-30 18:39:01 +09:00
e1ea9fe4f4 import moons 2021-05-30 18:11:18 +09:00
5acb0aa92c import moons 2021-05-30 18:10:42 +09:00
7c2952899b import moons 2021-05-30 18:09:41 +09:00
e925c6bed9 import moons 2021-05-30 18:09:20 +09:00
a715a7c022 import moons 2021-05-30 18:08:54 +09:00
b94c39923f import moons 2021-05-30 18:01:27 +09:00
ce5bd50939 import moons 2021-05-30 17:58:03 +09:00
ecbd6e1c6d import moons 2021-05-30 17:56:58 +09:00
debe3f8025 import moons 2021-05-30 17:53:17 +09:00
b1e4edad3b import moons 2021-05-30 17:50:54 +09:00
3ad6ed8bfa upgrade to laravel 8.x 2021-05-30 08:20:41 +00:00
41b78a0599 moon rentals again 2021-05-30 16:47:25 +09:00
f3dc18b8ac moon rentals again 2021-05-30 16:42:08 +09:00
427fc40edb moon rentals again 2021-05-30 16:41:03 +09:00
90218eafe0 moon rentals again 2021-05-30 16:40:19 +09:00
751a412185 moon rentals again 2021-05-30 16:19:12 +09:00
c3becc324b modified the mining tax invoice job 2021-05-28 18:35:54 +09:00
43ad853b60 added modify invoice framework 2021-05-25 20:53:04 +09:00
955a5581a3 new mining tax invoice job 2021-05-25 02:08:05 +09:00
f1be291c1c new mining taxes invoice job 2021-05-25 02:02:27 +09:00
aeee78a888 new mining taxes invoice job 2021-05-25 02:01:42 +09:00
98db7a3ec2 testing new mining tax 2021-05-25 01:57:39 +09:00
c0d65d55d1 testing new mining tax 2021-05-25 01:55:10 +09:00
7c14c15841 testing new mining tax 2021-05-25 01:53:06 +09:00
1c46ef4161 testing new mining tax 2021-05-25 01:52:40 +09:00
39f7fbbb99 testing new mining tax 2021-05-25 01:52:05 +09:00
da95ee481d testing new mining tax 2021-05-25 01:42:48 +09:00
8153235f1f testing new mining tax 2021-05-25 01:38:58 +09:00
00f814152d testing new mining tax 2021-05-25 01:38:11 +09:00
f28fa7d0e2 testing new mining tax 2021-05-25 01:37:24 +09:00
2361f5dc1c testing new mining tax 2021-05-25 01:26:10 +09:00
e75fd81e27 testing new mining tax 2021-05-25 01:24:00 +09:00
265336ef3d testing new mining tax 2021-05-25 01:23:21 +09:00
7c9b0caded testing new mining tax 2021-05-25 01:21:59 +09:00
a59d9bf6a9 testing new mining tax 2021-05-25 01:19:54 +09:00
657b96dadf testing new mining tax 2021-05-25 01:19:17 +09:00
c8ee950fd0 testing new mining tax 2021-05-25 01:18:44 +09:00
da7f69adae testing new mining tax 2021-05-25 01:18:02 +09:00
da4457eba6 testing new mining tax 2021-05-25 01:17:17 +09:00
b149a1f492 updated with new send mining taxes invoice job in the old job space 2021-05-25 01:05:27 +09:00
ee7e149c35 updated with new send mining taxes invoice job in the old job space 2021-05-25 01:04:55 +09:00
adee63564d updated with new send mining taxes invoice job in the old job space 2021-05-25 00:58:07 +09:00
b00a1eb082 created simplified mining tax invoice 2021-05-25 00:55:20 +09:00
56e2c3fa9c created simplified mining tax invoice 2021-05-25 00:54:52 +09:00
6ea56238a8 created simplified mining tax invoice 2021-05-25 00:54:36 +09:00
678f066a97 created simplified mining tax invoice 2021-05-25 00:53:24 +09:00
20d1c5f027 created simplified mining tax invoice 2021-05-25 00:46:29 +09:00
9a797a159d created simplified mining tax invoice 2021-05-25 00:45:07 +09:00
63a06e78e1 created simplified mining tax invoice 2021-05-25 00:42:32 +09:00
96d068307f created simplified mining tax invoice 2021-05-25 00:41:44 +09:00
1f18d21069 created simplified mining tax invoice 2021-05-25 00:40:13 +09:00
cb9fdaeb63 created simplified mining tax invoice 2021-05-25 00:39:13 +09:00
b82fbd3ce3 created simplified mining tax invoice 2021-05-25 00:37:36 +09:00
a3c07b2a84 created simplified mining tax invoice 2021-05-25 00:36:46 +09:00
772f149e81 created simplified mining tax invoice 2021-05-25 00:36:01 +09:00
75a72826fd created simplified mining tax invoice 2021-05-25 00:33:02 +09:00
ec50817657 created simplified mining tax invoice 2021-05-25 00:29:59 +09:00
d9d447bf54 created simplified mining tax invoice 2021-05-25 00:29:42 +09:00
9293564235 created simplified mining tax invoice 2021-05-25 00:29:00 +09:00
211d463288 created simplified mining tax invoice 2021-05-25 00:28:05 +09:00
c3a8393c84 created simplified mining tax invoice 2021-05-25 00:27:33 +09:00
50e69755eb created simplified mining tax invoice 2021-05-25 00:26:18 +09:00
2cf1f7ff72 created simplified mining tax invoice 2021-05-25 00:22:42 +09:00
af7c7344b4 tests 2021-05-24 23:11:29 +09:00
58258a070e tests 2021-05-24 22:23:06 +09:00
75a91c93e8 tests 2021-05-24 22:20:55 +09:00
7a46e8684f tests 2021-05-24 22:20:09 +09:00
1052c6241e tests 2021-05-24 22:13:03 +09:00
0107f24de8 tests 2021-05-24 22:12:37 +09:00
fbcd7dd957 tests 2021-05-24 22:01:00 +09:00
3e8bd39737 tests 2021-05-24 22:00:36 +09:00
e61aed425c tests 2021-05-24 21:51:04 +09:00
0847e03b27 tests 2021-05-24 21:46:57 +09:00
05626aac35 tests 2021-05-24 21:43:03 +09:00
77818e9431 tests 2021-05-24 21:36:25 +09:00
abde239ff7 tests 2021-05-24 21:30:12 +09:00
872afe444f tests 2021-05-24 21:29:37 +09:00
4bd57ccd0b tests 2021-05-24 21:28:54 +09:00
2191dadf47 tests 2021-05-24 21:28:06 +09:00
b48b118032 tests 2021-05-24 21:24:17 +09:00
8d5ba9c42e test mining taxes 2021-05-24 19:53:53 +09:00
565f51e81c process mining taxes ledgers update to disregard updating previously saved ledgers to prevent future errors 2021-05-24 18:52:23 +09:00
0872d2f61a process alliance assets 2021-05-22 00:14:10 +09:00
63a54c78e2 prevented main users from being registered as alts in a strange oddity. 2021-05-21 03:41:41 +09:00
7d31892c57 updated mail queue and invoice id for mining taxes 2021-05-19 19:50:24 +09:00
33df24e1af added Jump Bridge Fuel page to General navigation section 2021-05-19 19:09:40 +09:00
fe9547f78d process assets job fix 2021-05-19 09:10:06 +09:00
e24f431893 assets job 2021-05-19 01:23:11 +09:00
11ac571abb added assets queue 2021-05-19 01:05:17 +09:00
9c9575396b queue default to construct of job 2021-05-19 00:57:22 +09:00
817ae1a452 job kernel 2021-05-19 00:52:06 +09:00
32716cc81c issue with a job 2021-05-19 00:50:36 +09:00
e949b1d717 added queue to horizon schedule in the kernel for console commands and scheduler 2021-05-19 00:46:22 +09:00
c089beae10 horizon rebalance 2021-05-19 00:08:55 +09:00
3332d6a36c horizon rebalance 2021-05-19 00:02:12 +09:00
4f1ae7fad8 memory change for horizon 2021-05-18 23:55:40 +09:00
12970c3830 horizon back to 10 jobs each process 2021-05-18 23:53:06 +09:00
6b5f51eed7 horizon back to 10 jobs each process 2021-05-18 23:50:14 +09:00
88f46d8dec assets 2021-05-18 22:52:23 +09:00
5abbe10cf9 assets 2021-05-18 22:50:26 +09:00
ba92152daa updated composer 2021-05-18 13:47:03 +00:00
e248cd036c setting retries and timeouts for jobs' 2021-05-18 22:08:04 +09:00
f5531ac121 queue 2021-05-18 21:41:13 +09:00
13c4f5ea3a redis 2021-05-18 21:30:17 +09:00
cd96aa8377 redis 2021-05-18 21:20:08 +09:00
13f3e8e8f9 decode date in updating structures 2021-05-18 20:59:22 +09:00
8c580827b4 removed command helper junk 2021-05-18 20:48:12 +09:00
0093b8d841 horizon 2021-05-18 20:37:31 +09:00
2071021cdd FetchAllianceAssets 2021-05-18 20:18:20 +09:00
34cf203c01 migration 2021-05-18 20:06:40 +09:00
9aa8c53b23 job stuff 2021-05-18 19:56:47 +09:00
5973a5deda job stuff 2021-05-18 19:54:39 +09:00
3237e80fb4 assets and structures 2021-05-18 19:52:02 +09:00
da97d9b85c process alliance structures 2021-05-18 18:44:12 +09:00
562093f22c new stuff 2021-05-18 18:40:01 +09:00
65314bad77 more commands for artisan 2021-05-18 18:37:07 +09:00
31fbeee1cf database migrations 2021-05-18 18:35:06 +09:00
5085ef140b database migrations 2021-05-18 18:33:23 +09:00
1c4406a6eb fetchminingtaxesobservers 2021-05-18 18:28:36 +09:00
d815c15176 fetchminingtaxesobservers 2021-05-18 18:23:52 +09:00
a3a3cc1b7c fetchminingtaxesobservers 2021-05-18 18:23:37 +09:00
f266d781ac fetchminingtaxesobservers 2021-05-18 18:21:28 +09:00
f0962b0779 fetchminingtaxesobservers 2021-05-18 18:16:55 +09:00
d9cbd4ef93 fetchminingtaxesobservers 2021-05-18 18:09:42 +09:00
6c90f9f642 fetchminingtaxesobservers 2021-05-18 18:08:46 +09:00
c341d21bbe lookup helper removed from fetch mining taxes observers 2021-05-18 18:02:24 +09:00
91ebc9972c observer name fixed maybe in fetchminingtaxobservers 2021-05-18 06:26:27 +09:00
3fe6be6a57 observer name fixed maybe in fetchminingtaxobservers 2021-05-18 06:25:47 +09:00
de0071734b added backend functions for jump bridge fuel display with the new way we are doing jobs 2021-05-17 06:08:05 +09:00
a0c0186337 jump bridge rework 2021-05-15 07:12:56 +09:00
f3c317b505 invoice update 2021-05-13 04:58:15 +09:00
09d0d57630 invoice update 2021-05-13 04:58:05 +09:00
b44ebfc0b6 invoice update 2021-05-13 04:55:06 +09:00
3d054535db invoice update 2021-05-13 04:49:25 +09:00
c5b8c50923 invoice update 2021-05-13 04:47:44 +09:00
de60682f40 invoice update 2021-05-13 04:46:58 +09:00
3d5b224e20 invoice update 2021-05-13 04:36:38 +09:00
d447f6f34d send mining taxes invoice 2021-05-12 09:51:43 +09:00
44e969d24b minimum 1 job in horizon queue 2021-05-12 01:48:27 +09:00
ec933737cf send mail for mining taxes 2021-05-12 01:41:31 +09:00
97109cfd08 send mail for mining taxes 2021-05-12 01:37:40 +09:00
96507b7d7e config mining tax added to send mining taxes invoice command where necessary 2021-05-12 01:36:05 +09:00
9c5f9e3844 setup min and max processes for horizon 2021-05-12 01:13:16 +09:00
cee7f07d76 update to queues to have less queues 2021-05-12 01:05:48 +09:00
87951b5ca6 update horizon 2021-05-12 00:52:23 +09:00
6a3c69393e mining taxes update 2021-05-12 00:38:00 +09:00
b75d554cd7 update queue stuff 2021-05-12 00:29:45 +09:00
fb029dd813 invoice id number 2021-05-10 02:59:49 +09:00
bb5df086de mining tax stuff 2021-05-09 03:57:01 +09:00
a83131ba5e update alliance wallet journal page fix 2021-04-29 01:25:13 +09:00
655b1a3a94 updated job 2021-04-27 02:58:59 +09:00
976e220859 updated send mining taxes invoices 2021-04-27 02:33:17 +09:00
ae4436d3f1 added tagging to jobs 2021-04-27 00:49:49 +09:00
fdbc7ddf1b changed queue for new functionality to correct queue 2021-04-24 02:06:11 +09:00
266aa3387c alliance update wallet journal 2021-04-24 02:03:54 +09:00
adbf3297c4 modified update wallet journal job to dispatch multiple jobs 2021-04-24 02:03:01 +09:00
9aae7e44ec modified update wallet journal job to dispatch multiple jobs 2021-04-24 02:01:23 +09:00
d3d27cf251 modified update wallet journal job to dispatch multiple jobs 2021-04-24 01:59:46 +09:00
229aa84426 modified update wallet journal job to dispatch multiple jobs 2021-04-24 01:56:04 +09:00
19447c6a11 added new job for updating alliance wallet journal
created new functions in finance helper
2021-04-24 01:41:41 +09:00
bd86e1ab05 miningt axes payemnts command 2021-04-24 01:31:45 +09:00
6f97f0927c miningt axes payemnts command 2021-04-24 01:31:05 +09:00
21d1a566f3 miningt axes payemnts command 2021-04-24 01:28:53 +09:00
ec73828eea miningt axes payemnts command 2021-04-24 01:27:56 +09:00
d62b4b3790 process mining payments 2021-04-24 01:01:48 +09:00
c77b7e3821 mining tax invoices 2021-04-20 18:17:28 +09:00
9cce52b8ba payments namespaces 2021-04-19 20:38:59 +09:00
5f2ba4133d jobs 2021-04-19 19:50:50 +09:00
4539056ec5 ledgers job prefetch 2021-04-19 19:49:42 +09:00
19b837a993 jobs 2021-04-19 19:44:47 +09:00
87891ac059 jobs 2021-04-19 19:43:22 +09:00
e92c9d304d namespace 2021-04-19 19:41:19 +09:00
26c484d30c commands 2021-04-19 19:39:48 +09:00
e21fcd784c commands 2021-04-19 19:37:10 +09:00
75544ef6bb file name error 2021-04-19 19:33:03 +09:00
a084072f98 file name error 2021-04-19 19:32:22 +09:00
70fea18829 file name error 2021-04-19 19:16:29 +09:00
0b65005f9d added commands for jobs 2021-04-19 18:53:32 +09:00
54b25480e2 added missing libraries 2021-04-19 18:13:53 +09:00
86783a0b56 jobs 2021-04-13 01:23:31 +09:00
8a2efb21a0 changed schedule for late invoices to 1, and 15th of the month 2021-04-13 01:20:03 +09:00
cab5a4b2ed mining taxes invoices 2021-04-13 01:16:49 +09:00
9bd0f3a296 new way to do mining tax invoices 2021-04-12 20:06:34 +09:00
febe377eec roles selection 2021-04-11 06:39:27 +09:00
a497a8bb16 roles selection 2021-04-11 06:38:49 +09:00
b667348f5d roles selection 2021-04-11 06:36:58 +09:00
e67e90c96c roles selection 2021-04-11 06:35:09 +09:00
aff5831350 roles selection 2021-04-11 06:33:11 +09:00
dcf214b324 resources updates 2021-04-11 06:23:34 +09:00
701b449517 resources updates 2021-04-11 06:22:19 +09:00
c1782cacfe kernel update 2021-04-11 06:15:44 +09:00
b0aa5e3fec modified searched user blade 2021-04-11 06:02:31 +09:00
f06675dd2b added stuff for late invoices.
updated all jobs to not include the wording Job in the file.
2021-04-07 01:44:31 +09:00
bd8872a785 unpaid search 2021-04-02 21:01:18 +09:00
fbf48ef906 unpaid searches 2021-04-02 20:59:39 +09:00
51f7d3990f routes edits 2021-04-02 20:13:39 +09:00
cd99acb61b search unpaid 2021-04-02 20:07:23 +09:00
1884ada219 unpaid search attempt 2021-04-02 18:53:58 +09:00
3991ce3e9a updated paid payments from the wallet journal 2021-04-01 20:43:29 +09:00
eb8c84b0c5 added date due to unpaid invoices on admin page 2021-04-01 20:22:42 +09:00
c8f85b0ccd journal entries 2021-04-01 18:49:38 +09:00
a1e1ae261a journal entries 2021-04-01 18:32:48 +09:00
f9b4e9a898 moved links on unpaid invoices page 2021-03-30 21:20:21 +09:00
2fd7a805eb moved links on unpaid invoices page 2021-03-30 21:19:52 +09:00
1a443a4ab8 inspire removed from scheduled tasks 2021-03-30 21:11:30 +09:00
c5b8957253 schedule stuff 2021-03-30 20:48:24 +09:00
4b554f97ae schedule stuff 2021-03-30 20:47:48 +09:00
38176274ff connection stuff 2021-03-30 20:44:29 +09:00
3c1278db82 schedule monitor 2021-03-30 20:39:30 +09:00
0e4f9b91e5 schedule monitor 2021-03-30 20:38:28 +09:00
7a658b7bfa schedule monitor config 2021-03-30 11:36:30 +00:00
4667b31dd8 psr-4 2021-03-30 20:35:47 +09:00
39b0a8c372 schedule monitor 2021-03-30 11:31:10 +00:00
40ed5dd5a5 artisan jobs schedule 2021-03-30 19:54:26 +09:00
e6022ded9c modified schedule 2021-03-30 18:08:48 +09:00
6ad975e199 updating kernel for commands 2021-03-30 01:46:02 +09:00
59cda8d129 redis db updates 2021-03-30 01:38:46 +09:00
311aec7847 redis db updates 2021-03-30 01:37:56 +09:00
2d7e1ec7bf redis updates 2021-03-30 01:36:11 +09:00
ecd7b08b27 removed ->connection from jobs 2021-03-30 01:15:19 +09:00
e2b94eea77 vendor publish 2021-03-29 16:03:34 +00:00
04e7a78575 vendor publish 2021-03-29 16:02:41 +00:00
e232e03ef7 redis stuff 2021-03-30 00:38:32 +09:00
7f718555ac changed redis client default to phpredis rather than predis 2021-03-30 00:35:06 +09:00
b74c513271 updated redis default database 2021-03-30 00:32:30 +09:00
794f358353 updated schedule for mining tax invoices
updated process send eve mail job
updated horizon configuration
2021-03-30 00:30:17 +09:00
49aab1b97a removed some overlapping stuff from console command schedule 2021-03-29 01:28:10 +09:00
374181c82c updated config for esi.php to include new environmental variables 2021-03-26 23:18:13 +09:00
6b0f805adc added scopes for sending mails more efficiently on base login and account registration. 2021-03-26 23:14:38 +09:00
4730bea74c modified mail job 2021-03-26 23:08:57 +09:00
49b9093f1b mail update 2021-03-25 00:59:51 +09:00
906fabe23f mail update 2021-03-25 00:00:23 +09:00
d65adb904d test data 2021-03-24 22:31:11 +09:00
5f91bcb221 test data 2021-03-24 22:27:34 +09:00
b37767f30d test data 2021-03-24 22:24:46 +09:00
6613c985cd test data 2021-03-24 22:22:16 +09:00
60d511d3c1 test data 2021-03-24 22:21:53 +09:00
f12e298298 test data 2021-03-24 22:20:17 +09:00
0772488a50 new invoice testing 2021-03-24 22:04:45 +09:00
2ff1897f60 want to use the same data set for new stuff to work on. 2021-03-24 22:00:40 +09:00
bd0170e094 modified .env 2021-03-24 18:49:51 +09:00
8609b55797 modified connection name in middleware for process eve mails RL 2021-03-24 18:16:04 +09:00
31d4267d9f modified connection name in middleware for process eve mails RL 2021-03-24 18:15:44 +09:00
c176c32668 modified new mining taxes invoices to only send mail to myself 2021-03-23 19:56:49 +09:00
d3a9f33769 made a command to deal with late invoices 2021-03-23 00:22:37 +09:00
89ffa516c5 new mining tax invoices command work 2021-03-23 00:21:35 +09:00
82aa1f88b4 removed connection from mail 2021-03-22 19:35:22 +09:00
c51b1a72a9 string length in invoices 2021-03-22 19:33:49 +09:00
fa7889d7d5 testing 2021-03-22 00:43:36 +09:00
3271200312 testing 2021-03-22 00:43:05 +09:00
33719f8456 testing 2021-03-22 00:41:35 +09:00
92ea143a92 testing 2021-03-22 00:41:04 +09:00
8178af420a testing 2021-03-22 00:40:36 +09:00
c964fd1485 process ledgers 2021-03-22 00:31:06 +09:00
039fa1d44e esi update for observers 2021-03-21 22:33:32 +09:00
78c05aadd3 esi update for observers 2021-03-21 22:30:55 +09:00
6fd6db2d1d esi update for observers 2021-03-21 22:30:33 +09:00
b7600757a0 esi update for observers 2021-03-21 22:29:21 +09:00
1527201bdb esi update for observers 2021-03-21 22:28:08 +09:00
cf7848b966 esi update for observers 2021-03-21 22:27:26 +09:00
ea855611e3 esi update for observers 2021-03-21 22:26:51 +09:00
9b1140b8f9 esi update for observers 2021-03-21 22:25:58 +09:00
4298a1f53e esi update for observers 2021-03-21 22:25:29 +09:00
3623fd636b esi update for observers 2021-03-21 22:24:28 +09:00
482b65e026 esi update for observers 2021-03-21 21:56:07 +09:00
ff6fed66ef esi update for observers 2021-03-21 21:55:21 +09:00
40de3073f6 esi update for observers 2021-03-21 21:54:29 +09:00
69892f4a6e esi update for observers 2021-03-21 21:52:40 +09:00
5a68c84430 esi update for observers 2021-03-21 21:41:18 +09:00
24a76fb092 esi update for observers 2021-03-21 21:40:45 +09:00
2cd41593a5 esi update for observers 2021-03-21 21:40:25 +09:00
a2a9b31a25 esi update for observers 2021-03-21 21:39:23 +09:00
45b2269920 esi update for observers 2021-03-21 21:38:18 +09:00
4c99703290 esi update for observers 2021-03-21 21:37:29 +09:00
e39bcab748 esi update for observers 2021-03-21 21:36:43 +09:00
c2d06472e3 observer update and invoices creation 2021-03-21 21:33:34 +09:00
12cd0c7d74 personal ledgers 2021-03-21 02:34:41 +09:00
0a22ba67c5 ledger stuff for users 2021-03-21 01:25:56 +09:00
223a457f93 ledger stuff for users 2021-03-21 01:25:20 +09:00
9c773bc635 ledger stuff for users 2021-03-21 01:24:08 +09:00
d0529330e5 ledger stuff for users 2021-03-21 01:23:30 +09:00
c7bc18c9aa ledger stuff for users 2021-03-21 01:22:41 +09:00
0694940507 ledger stuff for users 2021-03-21 01:11:46 +09:00
c6b5f01c55 ledger stuff for users 2021-03-21 01:09:40 +09:00
0a0d6bc998 ledger stuff for users 2021-03-21 01:08:23 +09:00
c3df293ddf ledger stuff for users 2021-03-21 01:06:58 +09:00
71071d61ce ledger stuff for users 2021-03-21 01:06:14 +09:00
356cee060a ledger stuff for users 2021-03-21 01:04:58 +09:00
f662bb7cb2 ledger stuff for users 2021-03-21 01:03:57 +09:00
431ef40793 ledger stuff for users 2021-03-21 01:03:14 +09:00
690203d818 ledger stuff for users 2021-03-21 01:00:08 +09:00
6372a89d30 users page updated 2021-03-21 00:33:28 +09:00
ddae475a6c users page updated 2021-03-21 00:32:57 +09:00
ac617e8795 users page updated 2021-03-21 00:32:27 +09:00
fc1efa8d61 users page updated 2021-03-21 00:31:07 +09:00
c7fbb2ae0e users page updated 2021-03-21 00:29:52 +09:00
abc34b315a users page updated 2021-03-20 23:36:53 +09:00
e2289f1727 users page updated 2021-03-20 18:22:25 +09:00
1a61f7939b users page updated 2021-03-20 18:21:54 +09:00
aa7e170aaf row counts for mining tax invoices 2021-03-20 18:02:25 +09:00
da619f261e update to user's profile page 2021-03-19 21:43:31 +09:00
ded58ea79a namespace 2021-03-19 21:41:51 +09:00
2da297facd namespace 2021-03-19 21:39:45 +09:00
a253bb1aaf namespace 2021-03-19 21:38:05 +09:00
dcfbfe4801 namespace 2021-03-19 21:37:30 +09:00
cf6c601bcf namespace 2021-03-19 21:36:13 +09:00
3e24f71987 namespace 2021-03-19 21:35:45 +09:00
b68bcfec03 namespace 2021-03-19 21:34:59 +09:00
dd64010236 after action reports 2021-03-19 21:31:14 +09:00
d7d98b5195 taxes page 2021-03-18 23:02:21 +09:00
9798f8296b taxes page 2021-03-18 22:55:35 +09:00
68aafab377 taxes page 2021-03-18 22:54:05 +09:00
e4115b64ff taxes page 2021-03-18 22:51:10 +09:00
3be42738d7 payment testing 2021-03-18 21:02:23 +09:00
da08630a1f payment testing 2021-03-18 21:01:56 +09:00
001ff9e4e3 payment testing 2021-03-18 20:57:25 +09:00
a69e09efeb payment testing 2021-03-18 20:56:35 +09:00
0a4090650d payment testing 2021-03-18 20:56:12 +09:00
671da7e617 payment testing 2021-03-18 20:55:35 +09:00
3f8bcfd588 mining tax payments 2021-03-18 20:51:17 +09:00
f036aa61f7 namespace change 2021-03-18 20:47:42 +09:00
d926a0fd98 namespace change 2021-03-18 20:46:49 +09:00
21c73270fe namespace change 2021-03-18 20:46:18 +09:00
97e4eb46eb number formatting 2021-03-18 20:43:52 +09:00
ad36ee9441 added total unpaid amount to unpaid admin mining tax report 2021-03-18 20:43:00 +09:00
c6557bab38 change of invoice blade 2021-03-18 20:37:47 +09:00
30cd115050 invoices for characters 2021-03-18 20:06:40 +09:00
3dc10f41c8 invoices for characters 2021-03-18 20:05:22 +09:00
466a1750bd tweaked some jobs 2021-03-18 19:31:26 +09:00
7aee591a2c cleanup stale data in mining tax observers 2021-03-18 18:29:27 +09:00
8ee98c06c2 updated mail things 2021-03-18 18:28:13 +09:00
b91925a3f6 added retries back to mail functionality 2021-03-18 18:25:26 +09:00
c27a9c3f85 invoice stuff 2021-03-18 00:15:10 +09:00
ec9a2a2ce0 invoice stuff 2021-03-18 00:14:18 +09:00
42ba7f3036 invoice stuff 2021-03-18 00:12:10 +09:00
db11b6255b invoice stuff 2021-03-18 00:11:40 +09:00
ce99ad9cf9 invoice stuff 2021-03-18 00:08:40 +09:00
36ae8f27bb invoice stuff 2021-03-18 00:08:14 +09:00
3fcceb0649 invoice stuff 2021-03-18 00:07:40 +09:00
d607f403ec correct the invoice mail 2021-03-18 00:04:32 +09:00
4005b0f90c invoice amount for admin controller 2021-03-17 23:45:20 +09:00
87bbc1a8e4 modified catch request to release mail processing job back to the queue to be tried again. 2021-03-17 22:25:00 +09:00
79c3e3382a increased approved cost for mails 2021-03-17 22:23:34 +09:00
2e178c8b16 added reprocessing rate to process mining taxes ledgers job 2021-03-17 22:20:49 +09:00
62e159c1f2 process send eve mail job 2021-03-17 18:40:11 +09:00
2e57663f7c removed observers job from firing currently 2021-03-17 18:20:46 +09:00
403cbfb6bb added some stuff for mail releases 2021-03-16 01:42:54 +09:00
466751c13f data test 2021-03-16 01:35:23 +09:00
2d6e6e4537 data test 2021-03-16 01:33:58 +09:00
7231d54fa2 test data 2021-03-16 01:02:11 +09:00
61224e5611 updated process send eve mail job
updated test command to work on resposne codes
2021-03-16 01:00:02 +09:00
85d39b867b mining taxes invoice 2021-03-15 23:39:50 +09:00
8f30c3a42d process mining taxes ledgers job 2021-03-15 21:57:42 +09:00
011e53054d process mining taxes ledgers job 2021-03-15 21:42:13 +09:00
2972b9a301 process mining taxes ledgers job 2021-03-15 21:01:46 +09:00
e9c78c7e77 process mining taxes ledgers job 2021-03-15 21:00:46 +09:00
341117dfe9 fetch mining taxes ledger job cleanup 2021-03-15 20:56:28 +09:00
3efa2138c5 job issue'
git push
2021-03-15 20:51:47 +09:00
a5c6ad343b added job 2021-03-15 20:49:45 +09:00
f282ade0b3 modified git ignore 2021-03-15 20:48:04 +09:00
252deff4c2 commands 2021-03-15 20:47:25 +09:00
f7312a97b0 command helper 2021-03-15 20:45:19 +09:00
ade9da5be7 item price update issue 2021-03-15 20:44:27 +09:00
0c5b9aeb19 fixed invoice 2021-03-15 19:57:23 +09:00
f306ee161c fixed mining invoices 2021-03-15 19:46:25 +09:00
0ee3699b44 added jobs back in for the fetching and processing the mining ledgers
those jobs were taking extremely long times to complete, and jobs are better suited for them.
2021-03-15 19:38:06 +09:00
4c281934ff added some time functions into the mining ledger fetcher 2021-03-15 18:44:44 +09:00
507f4f8a73 added some time functions into the mining ledger fetcher 2021-03-15 18:43:18 +09:00
a158bad0bf fixed spelling mistake in routes 2021-03-15 18:28:11 +09:00
a3e9bf9aab tax helper correction 2021-03-15 00:58:34 +09:00
b23d7195c5 after action reports 2021-03-15 00:52:39 +09:00
0af6824866 updated taxes helper functions for the new model 2021-03-14 22:18:34 +09:00
d66fa052fb found error in contract checker 2021-03-14 07:22:19 +09:00
adadd7994e added to the after action report controller 2021-03-12 00:28:12 +09:00
aae582344e added after action report models 2021-03-10 23:30:28 +09:00
4db6dac439 added primary keys to all models 2021-03-10 23:29:30 +09:00
91bde37441 redirectTo when not logged in. 2021-03-10 22:48:41 +09:00
044450e448 redirectTo when not logged in. 2021-03-10 22:47:35 +09:00
56ebd398ab redirectTo when not logged in. 2021-03-10 22:46:56 +09:00
6d5eb98614 redirectTo when not logged in. 2021-03-10 22:46:26 +09:00
434179ba18 redirectTo when not logged in. 2021-03-10 22:45:54 +09:00
9e4b8deb78 redirectTo when not logged in. 2021-03-10 22:43:10 +09:00
4688af0cb4 redirectTo when not logged in. 2021-03-10 22:40:05 +09:00
d44edffa1b redirectTo when not logged in. 2021-03-10 22:36:31 +09:00
ceb7ed4949 modified git ignore 2021-03-10 22:30:04 +09:00
4b94ed2a51 modified kernel for commands 2021-03-10 22:24:55 +09:00
9feba2916a modified redirect when not logged in 2021-03-10 22:21:57 +09:00
4f15afb3ce enabled invoices and payment checking for mining taxes 2021-03-10 21:52:39 +09:00
eb54b7ba0a enabled invoices and payment checking for mining taxes 2021-03-10 21:48:48 +09:00
5895f34c39 trying to add sorting to extraction stuff 2021-03-08 22:33:26 +09:00
ad6cfcb41f trying to add sorting to extraction stuff 2021-03-08 22:32:09 +09:00
a95c052ba0 trying to add sorting to extraction stuff 2021-03-08 22:31:45 +09:00
cc5bcbb97d trying to add sorting to extraction stuff 2021-03-08 22:25:42 +09:00
94a30377f5 consolidated upcoming extractions with the mining calendar 2021-03-08 22:03:45 +09:00
46da349088 consolidated upcoming extractions with the mining calendar 2021-03-08 22:02:07 +09:00
667c7bfd49 consolidated upcoming extractions with the mining calendar 2021-03-08 22:00:34 +09:00
ebedcc903e consolidated upcoming extractions with the mining calendar 2021-03-08 21:59:19 +09:00
425e430f8b consolidated upcoming extractions with the mining calendar 2021-03-08 21:58:36 +09:00
8809c49c46 consolidated upcoming extractions with the mining calendar 2021-03-08 21:57:57 +09:00
c68b419964 consolidated upcoming extractions with the mining calendar 2021-03-08 21:56:46 +09:00
2483ca525b consolidated upcoming extractions with the mining calendar 2021-03-08 21:53:54 +09:00
7cccd77c8a added extraction calendar to dashboard 2021-03-08 21:50:58 +09:00
1ccdfdac79 added extraction calendar to main dashboard 2021-03-08 21:50:26 +09:00
fd899b1849 added extraction calendar to main dashboard 2021-03-08 21:46:31 +09:00
c37d9fb949 changed color gradient for calendar chart 2021-03-08 21:41:05 +09:00
85368ee09a modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:40:23 +09:00
2d9a3ce448 modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:39:56 +09:00
30d3a329dc modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:39:31 +09:00
8cff027f67 modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:37:50 +09:00
c42f166eb1 modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:37:19 +09:00
b8bd954b02 modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:36:33 +09:00
8945431457 modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:35:50 +09:00
d799aad4f8 modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:34:08 +09:00
18b14f48bd modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:33:30 +09:00
856bab0a92 modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:32:43 +09:00
90c0accf58 modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:30:54 +09:00
5a640c3595 modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:18:32 +09:00
41a1abc9cb modifed blade for unpaid invoices on admin dashboard 2021-03-08 21:16:42 +09:00
48dd5b81e3 modifed blade for unpaid invoices on admin dashboard 2021-03-08 20:57:25 +09:00
6aa16464f8 modifed blade for unpaid invoices on admin dashboard 2021-03-08 20:56:40 +09:00
a3558fe4ef modifed blade for unpaid invoices on admin dashboard 2021-03-08 20:55:14 +09:00
1d08027c11 modifed blade for unpaid invoices on admin dashboard 2021-03-08 19:02:59 +09:00
9f7397feea modifed blade for unpaid invoices on admin dashboard 2021-03-08 18:47:19 +09:00
d2126bff48 modifed blade for unpaid invoices on admin dashboard 2021-03-08 18:46:45 +09:00
acb66d4a66 added requests and some old commands 2021-03-08 18:43:21 +09:00
8d658aef1f fixed include in paidinvoices.blade.php 2021-03-08 18:28:04 +09:00
62b2cc1003 modified the navbar options for mining taxes on the user side to give unique icons. 2021-03-08 18:15:21 +09:00
f642c759e2 modified the navbar options for mining taxes on the user side to give unique icons. 2021-03-08 18:12:29 +09:00
350fd07efd mining taxes 2021-03-07 22:23:49 +09:00
1fbb438afa mining taxes 2021-03-07 22:23:17 +09:00
b58e9e2820 mining taxes 2021-03-07 22:22:47 +09:00
28ef697b42 mining taxes 2021-03-07 22:20:40 +09:00
7dd625edb9 mining taxes 2021-03-07 22:19:03 +09:00
fdb06996e5 mining taxes 2021-03-07 22:16:18 +09:00
36a33e86ff mining taxes 2021-03-07 22:15:43 +09:00
0c59a6527e mining tax testing 2021-03-07 22:14:42 +09:00
a1c6c4fd25 mining tax testing 2021-03-07 22:14:04 +09:00
67c8d6161a mining tax testing 2021-03-07 22:12:10 +09:00
1e55be001a mining tax testing 2021-03-07 22:11:34 +09:00
7d3bd6d5f2 mining tax testing 2021-03-07 22:11:24 +09:00
aa25ce4be3 mining tax testing 2021-03-07 22:08:46 +09:00
23111d727a mining tax testing 2021-03-07 22:03:53 +09:00
4862deac95 mining tax testing 2021-03-07 21:58:54 +09:00
e185fd7b56 mining tax testing 2021-03-07 21:58:24 +09:00
4855ac34f4 mining tax testing 2021-03-07 21:53:11 +09:00
fcf823663f mining tax testing 2021-03-07 21:41:00 +09:00
27148dae22 mining tax testing 2021-03-07 21:40:17 +09:00
1e40d8e0c9 mining tax testing 2021-03-07 21:39:28 +09:00
4c513b7625 mining tax testing 2021-03-07 21:01:53 +09:00
01f0a49bb4 mining tax testing 2021-03-07 21:00:54 +09:00
1b949fca39 mining tax testing 2021-03-07 20:58:47 +09:00
79de6a93fa mining tax testing 2021-03-07 20:57:38 +09:00
3a18237502 mining tax testing 2021-03-07 20:47:35 +09:00
8371c49e3d mining tax testing 2021-03-07 20:46:25 +09:00
e4a88303bb mining tax testing 2021-03-07 20:45:06 +09:00
c1595845f9 mining tax testing 2021-03-07 20:44:26 +09:00
0b15850c15 mining tax testing 2021-03-07 20:43:40 +09:00
75bfc0daf2 mining tax testing 2021-03-07 20:42:40 +09:00
0f6b965066 mining tax testing 2021-03-07 20:42:08 +09:00
68d04b338a mining tax testing 2021-03-07 20:41:38 +09:00
674d026e51 mining tax testing 2021-03-07 20:33:28 +09:00
137522fd02 mining tax testing 2021-03-07 20:32:53 +09:00
186c79c8d3 mining tax testing 2021-03-07 20:32:12 +09:00
e2939629d5 mining tax testing 2021-03-07 20:31:21 +09:00
25d0b8ae98 mining tax testing 2021-03-07 20:30:18 +09:00
1156107243 mining tax testing 2021-03-07 20:28:56 +09:00
460e7db116 mining taxes testing 2021-03-07 20:22:42 +09:00
b746853520 mining taxes testing 2021-03-07 20:20:10 +09:00
cd474b7e7f mining taxes testing 2021-03-07 20:18:22 +09:00
918107acab mining taxes testing 2021-03-07 20:17:31 +09:00
6dff921d5f mining taxes testing 2021-03-07 20:16:31 +09:00
9f1de2300e mining taxes testing 2021-03-07 20:15:39 +09:00
6d178b1b90 navbar issue 2021-03-07 20:14:57 +09:00
78234a9243 navbar issue 2021-03-07 20:12:44 +09:00
ea60c5561d navbar issue 2021-03-07 19:30:29 +09:00
860863c8d5 navbar issue 2021-03-07 19:29:41 +09:00
0fb6bea722 navbar fix 2021-03-07 19:26:02 +09:00
693c66cf12 updated menu bar blades 2021-03-07 07:05:41 +09:00
59868bb63a mining taxes 2021-03-07 06:20:19 +09:00
e23c97f455 added web routes for mining taxes 2021-03-07 03:35:03 +09:00
a590dc43bb created mining taxes payment command 2021-03-07 03:29:32 +09:00
5c062ebe50 views for mining taxes. next up is routes in the next update 2021-03-06 19:10:59 +09:00
3bd1b2053b mining taxes invoices 2021-02-26 01:05:12 +09:00
d050563fb9 mining taxes invoices 2021-02-26 01:00:33 +09:00
468eba7d2a mining taxes invoices 2021-02-26 01:00:19 +09:00
8ebfc9fc34 mining taxes invoices 2021-02-26 00:59:34 +09:00
77896aae9a mining taxes invoices 2021-02-26 00:58:46 +09:00
e12bfb75e9 mining taxes invoices 2021-02-26 00:58:17 +09:00
22307c120f mining taxes invoices 2021-02-26 00:57:48 +09:00
12b754a752 mining taxes invoices 2021-02-26 00:56:41 +09:00
716a71d680 mining taxes invoices 2021-02-26 00:55:21 +09:00
d98ef78771 mining taxes invoices 2021-02-26 00:52:17 +09:00
e76e7a6298 mining taxes invoices 2021-02-26 00:51:47 +09:00
225e6f74ec mining taxes invoices 2021-02-26 00:49:00 +09:00
17bd69bf7c mining taxes invoices 2021-02-26 00:48:03 +09:00
6d55eeae45 mining taxes invoices 2021-02-26 00:44:37 +09:00
523e345350 mining taxes invoices 2021-02-26 00:44:17 +09:00
ca9612d830 mining taxes invoices 2021-02-25 23:54:19 +09:00
9bfaab8ffc mining taxes invoices 2021-02-25 23:50:09 +09:00
c5cd63114d mining taxes invoices 2021-02-25 23:32:38 +09:00
e3f1e140e0 mining taxes invoices 2021-02-25 23:00:35 +09:00
84d38d3803 mining taxes invoices 2021-02-25 23:00:07 +09:00
2718b575a4 mining taxes invoices 2021-02-25 22:54:37 +09:00
1451e97f31 mining taxes invoices 2021-02-25 22:54:12 +09:00
d031305111 mining taxes invoices 2021-02-25 22:47:25 +09:00
f270cf3134 mining taxes invoices 2021-02-25 22:46:49 +09:00
16bca41d5d mining taxes invoices 2021-02-25 22:44:36 +09:00
5df56e7f4f mining taxes invoices 2021-02-25 22:44:14 +09:00
bd068037cd mining taxes invoices 2021-02-25 22:42:02 +09:00
e794ef7a05 mining taxes invoices 2021-02-25 22:38:58 +09:00
a98c1e764f mining taxes invoices 2021-02-25 21:57:53 +09:00
b4ab55fc89 mining taxes invoices 2021-02-25 21:56:34 +09:00
fdf6c6a54f mining taxes invoices 2021-02-25 21:52:35 +09:00
2d0241c8ad mining taxes invoices 2021-02-25 21:51:16 +09:00
b6853e8f3b mining taxes invoices 2021-02-25 21:49:42 +09:00
14a37e869c mining taxes invoices 2021-02-25 21:39:56 +09:00
9fc70ba03f ledger job 2021-02-23 00:41:23 +09:00
b092522d3a ledger job 2021-02-23 00:38:59 +09:00
d4b5ed3319 ledger job 2021-02-23 00:36:13 +09:00
9cdf9cebfd ledger job 2021-02-23 00:34:41 +09:00
b538a7216c ledger job 2021-02-23 00:33:49 +09:00
7be778ec01 ledger job 2021-02-23 00:31:28 +09:00
dedd050920 ledger job 2021-02-23 00:30:03 +09:00
0b03b4ee4a ledger job 2021-02-23 00:28:45 +09:00
b75a7809de ledger job 2021-02-23 00:27:52 +09:00
fc07e8d968 ledger job 2021-02-22 23:07:14 +09:00
e3c9459017 ledger job 2021-02-22 23:06:45 +09:00
cb3a6b26e9 ledger job 2021-02-22 23:05:17 +09:00
f10196abb7 ledger job 2021-02-22 23:02:08 +09:00
1743ffc14f ledger job 2021-02-22 23:01:22 +09:00
fc7dde27c4 ledger job 2021-02-22 22:56:47 +09:00
7ebc49607d ledger job 2021-02-22 22:55:50 +09:00
f62f6239c0 ledger job 2021-02-22 22:54:22 +09:00
fa9d89ebe9 ledger job 2021-02-22 22:53:08 +09:00
af06c943c7 ledger job 2021-02-22 22:52:40 +09:00
41b64ac646 ledger job 2021-02-22 22:52:09 +09:00
8e72c71071 ledger job 2021-02-22 22:49:57 +09:00
01bff58169 ledger job 2021-02-22 22:48:59 +09:00
23873033bf ledger job 2021-02-22 22:37:59 +09:00
fcb0dbc7a0 ledger job 2021-02-22 22:37:29 +09:00
896f6896e7 ledger job 2021-02-22 21:55:15 +09:00
e7c8b71ea4 ledger job 2021-02-22 21:32:25 +09:00
ed529b49df ledger job 2021-02-22 21:26:32 +09:00
1a0e956d00 ledger job 2021-02-22 21:25:41 +09:00
6bfa5873a8 ledger job 2021-02-22 21:22:23 +09:00
ff879833be mining taxes ledgers 2021-02-22 20:42:33 +09:00
525dddf52b mining taxes ledgers 2021-02-22 20:39:17 +09:00
71a567e923 fetch mining taxes ledgers job 2021-02-22 20:27:40 +09:00
f179c7e671 fetch mining taxes ledgers job 2021-02-22 19:52:59 +09:00
40a4ce6fcc fetch mining taxes ledgers job 2021-02-22 19:48:59 +09:00
c95f6835ca fetch mining taxes ledgers job 2021-02-22 19:47:57 +09:00
27a9715aa4 mining tax stuff 2021-02-22 19:29:26 +09:00
1717b464af mining tax stuff 2021-02-22 19:28:20 +09:00
7103791378 mining tax stuff 2021-02-22 19:20:56 +09:00
bb1cb4a6fc mining tax stuff 2021-02-22 19:19:47 +09:00
65bd6022ac mining tax stuff 2021-02-22 19:19:22 +09:00
7be3bfeebc mining tax stuff 2021-02-22 19:18:20 +09:00
a1e43596c2 added relationships for mining taxes 2021-02-22 19:16:23 +09:00
02db5ce9a1 added relationships for mining taxes 2021-02-22 19:09:11 +09:00
e14f9c0764 mining tax observers 2021-02-16 19:44:41 +09:00
5aafbc9ce0 mining tax observers 2021-02-16 19:30:57 +09:00
aa384fc171 mining tax observers 2021-02-16 19:30:46 +09:00
93d9b2bf98 mining tax observers 2021-02-16 19:30:08 +09:00
4cb79433c1 mining tax observers 2021-02-16 19:15:05 +09:00
3725c40d03 mining tax observers 2021-02-16 19:05:02 +09:00
a4b665f525 mining tax observers 2021-02-16 18:46:55 +09:00
5bbfaf1515 mining tax observers 2021-02-16 18:23:36 +09:00
7aaf2afc5a mining tax observers 2021-02-16 18:20:33 +09:00
8b827fe05b codebase 2021-02-16 06:10:56 +09:00
d3db43de8b codebase 2021-02-16 06:10:01 +09:00
8f64a98e2d codebase 2021-02-16 06:03:33 +09:00
f21d0dbf65 codebase 2021-02-16 05:53:51 +09:00
96c4b03481 codebase 2021-02-16 05:46:18 +09:00
3d04e3e62a codebase 2021-02-16 05:43:22 +09:00
51bb819409 admin dashboard simplification for later 2021-02-15 19:41:53 +09:00
ecb33befdd admin dashboard simplification for later 2021-02-15 19:41:09 +09:00
5844dc5b93 navbar modification for the top navbar 2021-02-15 19:39:10 +09:00
d71e05303d configuration changes 2021-02-15 19:37:05 +09:00
908197ae07 configuration changes 2021-02-15 19:35:42 +09:00
0aade82862 migration 2021-02-15 19:24:13 +09:00
fef8533ae0 migration 2021-02-15 19:22:56 +09:00
376c9f9b91 migration 2021-02-15 19:18:50 +09:00
92e7084cec migration 2021-02-15 19:17:44 +09:00
7e932123d3 migration 2021-02-15 19:16:55 +09:00
5e002d47a5 migration 2021-02-15 19:16:08 +09:00
f8a02c0933 migration 2021-02-15 19:14:13 +09:00
b94e39b53c migration 2021-02-15 19:12:02 +09:00
eaa56c31b6 migration 2021-02-15 19:10:33 +09:00
4a117c6390 migration 2021-02-15 19:09:54 +09:00
05db82f3cb migration 2021-02-15 19:08:43 +09:00
99d5ef9220 . 2021-02-15 19:03:11 +09:00
8a4615b5a8 . 2021-02-15 19:02:40 +09:00
fd20fb8725 test data 2021-02-15 19:01:51 +09:00
d521a0e593 alliance wallet journal 2021-02-15 19:00:38 +09:00
bb90a2ccc2 migration issue 2021-02-15 18:58:58 +09:00
f447bd6666 wallet entries 2021-02-15 18:53:04 +09:00
f66604ba6a wallet entries 2021-02-15 18:52:35 +09:00
ae37aa5856 cleaned up code base thoroughly 2021-02-15 17:58:12 +09:00
4955a1a66a cleaned up code base thoroughly 2021-02-15 17:25:30 +09:00
0da231827e cleaned up code base thoroughly 2021-02-15 17:23:23 +09:00
5bd545efbe cleaned up code base thoroughly 2021-02-15 17:22:43 +09:00
653c80cb87 cleaned up code base thoroughly 2021-02-15 17:21:46 +09:00
bea3cdd1a4 cleaned up code base thoroughly 2021-02-15 17:18:12 +09:00
21aa932bd4 .env issues 2021-02-14 15:20:05 +00:00
0b43349fac .env changes 2021-02-15 00:18:50 +09:00
337cf04334 socialite provider manager 2021-02-15 00:10:29 +09:00
612f0925bf socialite providers 2021-02-14 15:06:09 +00:00
4b72a59e62 invoices for mining taxes 2021-02-14 20:03:21 +09:00
8af676c32a mining taxes commands started 2021-02-14 07:14:22 +09:00
5cf8667c47 modified unused tables 2021-02-14 06:49:04 +09:00
9dd0bbc536 esi stuff 2021-02-14 01:57:27 +09:00
63c7a04998 esi stuff 2021-02-14 01:33:27 +09:00
2026ea2c00 job stuff 2021-02-14 01:01:21 +09:00
917641e469 job stuff 2021-02-14 00:49:36 +09:00
925b9739da job stuff 2021-02-14 00:46:15 +09:00
4da6e98c49 test data 2021-02-14 00:11:50 +09:00
b621e60316 test data 2021-02-14 00:07:29 +09:00
c35645df42 test data 2021-02-14 00:04:20 +09:00
f922289c03 test data 2021-02-13 17:20:51 +09:00
2ab5f7d7bd test data 2021-02-13 17:20:18 +09:00
d4cf2afd1b test data 2021-02-13 17:19:47 +09:00
86bd6cdd3b test data 2021-02-13 17:19:20 +09:00
52af89800e test data 2021-02-13 17:18:15 +09:00
830c360664 test data 2021-02-13 17:17:32 +09:00
3231c4c1aa test data 2021-02-13 17:17:14 +09:00
d1aadb1f2d token refreshment 2021-02-13 17:01:41 +09:00
3c831b6b16 token refreshment 2021-02-13 17:00:23 +09:00
a3d22ab179 token refreshment 2021-02-13 16:58:54 +09:00
5bb8853714 token refreshment 2021-02-13 16:58:11 +09:00
8e42f49d8f token refreshment 2021-02-13 16:57:36 +09:00
a550240f08 refreshing access token functionality 2021-02-13 16:55:25 +09:00
32a19cb9d6 token refreshment 2021-02-13 16:45:17 +09:00
b27dd18951 guzzle 2021-02-13 03:52:22 +09:00
2a25fcf1b3 guzzle 2021-02-13 03:40:43 +09:00
28fbf15706 guzzle 2021-02-13 03:37:45 +09:00
2a5870ce9b guzzle 2021-02-13 03:35:49 +09:00
d5eb1a1bb9 guzzle 2021-02-13 03:35:21 +09:00
9688e80a6b guzzle 2021-02-13 03:34:47 +09:00
2212d34dd1 guzzle 2021-02-13 03:34:05 +09:00
4eaab96848 guzzle 2021-02-13 03:31:37 +09:00
15988c5588 guzzle 2021-02-13 03:29:52 +09:00
81978d524f guzzle 2021-02-13 03:28:59 +09:00
4f5c0e9c81 guzzle 2021-02-13 03:28:30 +09:00
7a63f1370f guzzle 2021-02-13 03:27:59 +09:00
d54bb575ba guzzle 2021-02-13 03:27:18 +09:00
2110cbff32 guzzle 2021-02-13 03:25:31 +09:00
67af1f5b50 guzzle 2021-02-13 03:14:32 +09:00
078d32cc31 guzzle 2021-02-13 03:01:20 +09:00
6fcf9eba4a guzzle 2021-02-13 02:45:29 +09:00
6d7864751f guzzle 2021-02-13 02:44:57 +09:00
153588738d tried adding new thing to get new access token 2021-02-13 02:42:37 +09:00
e951285456 esi authentication with refresh token 2021-02-13 01:49:02 +09:00
344974362c socialite update for tokens 2021-02-12 22:26:42 +09:00
b74e28388a socialite update for tokens 2021-02-12 22:21:55 +09:00
509b0efdcd socialite update 2021-02-12 21:03:26 +09:00
7901708be7 socialite updates 2021-02-12 20:37:10 +09:00
9f7a3500dc socialite 2021-02-12 19:40:13 +09:00
2bd74359ba socialite 2021-02-12 19:21:48 +09:00
84bac3431b socialite 2021-02-12 19:16:06 +09:00
84259f2bf7 socialite 2021-02-12 19:08:51 +09:00
23b3858a89 socialite 2021-02-12 19:04:21 +09:00
9c9f6c61fe socialite 2021-02-12 19:02:46 +09:00
e8cf2810a0 socialite 2021-02-12 19:01:16 +09:00
5be7ef76bd socialite 2021-02-12 18:59:28 +09:00
8aa3d6177e socialite 2021-02-12 18:43:57 +09:00
e7f564054c socialite 2021-02-12 18:41:04 +09:00
6a6151bff8 socialite 2021-02-12 18:25:02 +09:00
0ce7d24f69 socialite 2021-02-12 18:20:57 +09:00
6e7ec0564f socialite 2021-02-12 18:07:39 +09:00
5de85508a3 socialite 2021-02-12 18:06:22 +09:00
7d7ae6ffa9 socialite 2021-02-12 18:03:48 +09:00
cfea3f4b90 socialite 2021-02-12 18:02:14 +09:00
17c31d9968 socialite 2021-02-12 18:01:14 +09:00
3de8c8b47d socialite 2021-02-12 18:00:42 +09:00
078067b6a7 socialite 2021-02-12 17:57:04 +09:00
8453b0c846 socialite 2021-02-12 16:53:04 +09:00
5a65b67245 socialite 2021-02-12 16:27:02 +09:00
6d75548144 socialite 2021-02-12 16:18:59 +09:00
cb6da0c090 socialite 2021-02-12 16:17:52 +09:00
f6c93028cc socialite 2021-02-12 16:13:42 +09:00
3d301f58c2 socialite 2021-02-12 16:09:06 +09:00
492a049797 socialite 2021-02-12 16:06:26 +09:00
3c776bc01e socialite 2021-02-12 16:05:47 +09:00
5cf77c6b18 socialite 2021-02-12 15:56:57 +09:00
e16569b26b socialite 2021-02-12 15:54:20 +09:00
d976d191cb socialite 2021-02-12 15:51:17 +09:00
6e623b5793 socialite stuff 2021-02-12 15:45:53 +09:00
a818452857 cleaned up models which are no longer utilized 2021-02-12 14:35:57 +09:00
dd5c1f4c2d updated EveOnlineOAuthProvider 2021-02-12 14:26:32 +09:00
338bd52f28 updated create new user function to update the access token in the correct table 2021-02-12 14:15:50 +09:00
97e80c0456 cleaned up some duplicate .env variables 2021-02-12 14:04:29 +09:00
f1dca60e54 cleaned up old code from Commands 2021-02-12 14:00:07 +09:00
ab8d501cb8 cleaned up moons controllers 2021-02-12 13:56:56 +09:00
849b60841d modified moons admin controller 2021-02-12 13:55:23 +09:00
1cbd2e7c87 purged wiki module 2021-02-12 13:52:14 +09:00
17239b3a35 removed unnecessary modules from views and routes 2021-02-12 13:48:57 +09:00
e88728125e login controller update 2021-02-12 05:49:33 +09:00
f8426666ee added new composer libraries 2021-02-11 20:21:58 +00:00
0a11a5d23d jwt token stuff 2021-02-12 05:20:00 +09:00
cf1876e43f oauth v2 token 2021-02-12 04:56:52 +09:00
ac5ccadc55 v2 oauth token 2021-02-12 04:39:28 +09:00
75cc0b2355 map user object testing 2021-02-12 04:34:05 +09:00
d8a198809e eve online oauth provider v2 updates 2021-02-12 04:26:04 +09:00
a4b5ba0594 modified dashboard controller 2021-02-12 04:13:02 +09:00
18fe063ef8 modified dashboard controller 2021-02-12 04:11:26 +09:00
a26db2652c adjusted migration 2021-02-12 04:07:39 +09:00
ab1730cfa3 fixed migration 2021-02-12 04:02:18 +09:00
8dbe424ad4 v2 oauth token 2021-02-12 03:54:58 +09:00
bb4736187f finance helper changes 2021-02-12 03:42:11 +09:00
62f661efa5 mining taxes stuff 2021-02-12 03:41:23 +09:00
8178327828 framework for mining taxes admin controller 2021-02-11 12:58:37 +09:00
19730208a6 mining taxes view controller start 2021-02-11 12:41:58 +09:00
90fcabc59b starting to work on the display pages 2021-02-09 21:18:01 +09:00
eabbf5ce58 added controller layouts for display pages 2021-02-07 04:27:51 +09:00
8ab88d29f3 added rate limiting to the eve mail job 2021-02-07 02:32:18 +09:00
0bb5f4cabf modified some psr-4 items 2021-02-07 02:23:08 +09:00
e8649811f2 added spatie/laravel-rate-limited-job-middleware to composer 2021-02-06 17:22:09 +00:00
df510b8680 updated psr-4 stuff 2021-02-07 02:21:10 +09:00
3ff24118a5 created mining taxes invoice job 2021-02-07 01:55:47 +09:00
d4954bc7bf CalculateMiningTaxesJob 2021-02-04 23:34:53 +09:00
416f4abd03 updated some mining ledger functions, and removed duplicate functionality 2021-01-24 21:15:46 +09:00
314dd1c931 warp bucks migration outline 2021-01-22 06:44:06 +09:00
0e6ee620cc wrote fetch mining taxes observers job 2021-01-18 01:04:17 +09:00
997e6a9cde updated several jobs. removed the task for starting and stoppinig jobs. just seems to be unnecessary data 2021-01-17 22:52:35 +09:00
23b78d709f laid out the foundation for the mining tax framework 2021-01-11 01:47:12 +09:00
46f95aa6f2 added jobs for new module, and removed old jobs no longer in use 2021-01-11 01:41:51 +09:00
672d555c78 removed the flex structure stuff from menus and programming 2021-01-11 01:35:07 +09:00
ebbfd1a327 modified kernel middleware to remove code that hasn't been used in ages. 2021-01-11 01:27:24 +09:00
8ac0157cc6 login route 2021-01-11 01:21:57 +09:00
c55a5a1ba4 no comment 2021-01-11 01:20:20 +09:00
ee8ab5c2f3 no comment 2021-01-11 01:16:57 +09:00
451119c743 table cleanup again 2021-01-11 01:12:20 +09:00
20a0aecee1 moons update command added back in as it was accidentally deleted 2021-01-11 01:07:27 +09:00
cc3ebc8af8 moved a command to its new home in the code layout 2021-01-11 00:59:01 +09:00
b6efe4e54c removed bonds stuff for now 2021-01-11 00:56:32 +09:00
b598189626 removed bonds 2021-01-11 00:53:37 +09:00
70b3162964 re-arranged the console kernel 2021-01-11 00:37:39 +09:00
66dbdef629 cleaned up GetStructuresCommand 2021-01-10 23:58:42 +09:00
c00324a03c trying to update broken route 2021-01-10 23:04:41 +09:00
2e8f2923ef changed cleanup data from services: to data: 2021-01-09 19:10:42 +09:00
3a33fa7faa cleanup 2021-01-09 19:06:44 +09:00
38823b96ce removed tracker.php file as it was removed a long time ago. 2021-01-09 18:52:43 +09:00
9efb326b5f cleanup 2021-01-09 18:46:18 +09:00
f327b14fca adding bonds 2021-01-02 20:53:49 +09:00
6d88c9b703 chart for admin dashboard 2020-12-26 20:57:36 +09:00
a5532120e9 income to alliance dashboard 2020-12-26 20:45:11 +09:00
34422925f1 income to alliance dashboard 2020-12-26 20:43:38 +09:00
70b24695f5 income to alliance dashboard 2020-12-26 20:41:46 +09:00
af05210a48 income to alliance dashboard 2020-12-26 20:40:23 +09:00
cfa01428ee income to alliance dashboard 2020-12-26 20:39:37 +09:00
d84326742f income to alliance dashboard 2020-12-26 20:36:51 +09:00
722311eb89 composer update and finished psr-4 stuff 2020-12-25 11:52:17 +00:00
f11360e5e8 psr-4 2020-12-25 20:50:09 +09:00
07b724ec55 psr-4 stuff 2020-12-25 20:48:55 +09:00
5ef8fe188b psr-4 2020-12-25 20:44:25 +09:00
fda7c64c3a psr-4 2020-12-25 20:42:36 +09:00
b7e265088a modified some stuff for psr-4 2020-12-25 20:40:01 +09:00
017f72b42e added predis and eseye back in. 2020-12-25 11:28:41 +00:00
0ddd298350 upgrade to laravel 7 and set branch to v2 2020-12-25 11:22:15 +00:00
516105c492 composer updates 2020-12-21 11:07:01 +00:00
e7b3093986 composer update 2020-12-21 11:01:29 +00:00
064cd2244b laravel rollback 2020-12-21 19:35:33 +09:00
b0bf2a107b composer update 2020-12-21 19:24:33 +09:00
09413522bb composer update 2020-12-06 10:28:55 +00:00
69d92960d9 blacklist updates 2020-12-04 06:57:20 -06:00
3f5ce7dbf4 blacklist modifications and moon admin new stuff 2020-12-04 06:55:48 -06:00
76658b85f1 list updated for flex structures 2020-11-30 11:25:28 -06:00
cbf2c3f9e4 flex structure removal 2020-11-09 04:23:50 -06:00
120c0808bb flex structure removal 2020-11-09 04:22:26 -06:00
e6ac3e9056 modified remove flex structure 2020-11-09 04:20:53 -06:00
52be26a099 modified remove flex structure 2020-11-09 04:17:34 -06:00
c75107e34a flex structure deletion 2020-11-09 04:09:50 -06:00
05c613bf61 flex structure deletion issue 2020-11-09 03:33:18 -06:00
5528a0e024 item prices update 2020-10-03 04:33:07 -05:00
98e69fcc25 item prices update 2020-10-03 04:32:28 -05:00
d3f33979e4 blacklist fix 2020-09-29 00:01:28 -05:00
46ee5cf3b1 moon calc library 2020-09-14 00:18:47 -05:00
7c72944d7d moon stuff 2020-09-13 23:59:59 -05:00
f665050d66 moon update pricing 2020-09-13 23:30:34 -05:00
393a412784 gas moon price stuff 2020-09-13 23:18:41 -05:00
30e859b552 moon calc 2020-09-13 22:47:11 -05:00
a70c0bf4e9 moon calc library 2020-09-13 22:43:00 -05:00
e745502542 update moon rental pricing 2020-09-13 21:48:46 -05:00
55acc5e487 added log info for updating rental prices 2020-09-13 21:38:58 -05:00
c0d2348fc3 added log info for updating rental prices 2020-09-13 21:33:44 -05:00
e5a225a687 moon calc changes 2020-09-13 21:01:07 -05:00
257a6e3eb6 moon price update stuff 2020-09-13 20:54:34 -05:00
7b5268f0a3 pricing for moons where moon goo is priced at half the value 2020-09-12 17:06:56 -05:00
b6fcbd1b4a updated srp form stuff 2020-09-07 05:14:30 -05:00
c19b417a5d rental updates 2020-09-03 01:55:41 -05:00
94307d105d rental admin controller 2020-09-03 01:54:06 -05:00
16e5a9808b rental admin controller 2020-09-03 01:53:06 -05:00
2239ec16a8 rental admin controller 2020-09-03 01:51:51 -05:00
0e6109c09a blacklist update to add removal notes 2020-08-30 07:52:11 -05:00
a242bffb28 moon blade for sidebar to allow others to see rental moons 2020-08-26 22:41:49 -05:00
6717cbad48 updated structure request redirect 2020-08-18 19:32:22 -05:00
b7762cc18d fixed structure request form hopefully. 2020-08-14 22:48:36 -05:00
6ee0d8fef1 structure request controller was missing a namespace it needed. 2020-08-14 22:40:17 -05:00
58ef54e859 created a new job 2020-08-12 03:58:14 -05:00
076079f981 created a new job 2020-08-12 03:50:04 -05:00
22d0171e13 created a new job 2020-08-12 03:48:58 -05:00
12b6f8b98c created a new job 2020-08-12 03:43:50 -05:00
978a028553 adjusted the moon calc database functions 2020-08-12 03:35:12 -05:00
685dabede3 item updates weren't working for whatever reason 2020-08-12 03:33:00 -05:00
b7bfe880f4 item updates weren't working for whatever reason 2020-08-12 03:32:06 -05:00
72502ae53f add form for system rentals 2020-08-12 03:02:04 -05:00
5688f6ebb8 add form for system rentals 2020-08-12 02:57:39 -05:00
b916d0364c add form for system rentals 2020-08-12 02:56:47 -05:00
15ec617fec add form for system rentals 2020-08-12 02:46:32 -05:00
cd7428e3c3 add form for system rentals 2020-08-12 02:44:34 -05:00
6023f9801f add form for system rentals 2020-08-12 02:44:10 -05:00
5dad7a0427 add form for system rentals 2020-08-12 02:29:25 -05:00
d156c69992 add form for system rentals 2020-08-12 02:28:25 -05:00
82c755409d add form for system rentals 2020-08-12 02:27:25 -05:00
2f7aee4aad add form for system rentals 2020-08-12 02:25:48 -05:00
1824deecae add form for system rentals 2020-08-12 02:23:46 -05:00
2d5a1194bf blade fix for system rentals 2020-08-12 02:17:14 -05:00
e936fc721e namespace fix 2020-08-12 02:15:58 -05:00
4ba1dd8a11 namespace fix 2020-08-12 02:15:00 -05:00
716371200b namespace issue 2020-08-12 02:13:46 -05:00
ed7e2c9bb4 system rentals pages 2020-08-12 02:12:49 -05:00
57fbc092c8 rental system web routes 2020-08-12 02:11:21 -05:00
5fd183f95c created form for rental costs similar to flex structures 2020-08-10 02:17:21 -05:00
8dd1377090 changed journal entries to 2 months rather than 1 month. 2020-08-09 23:41:11 -05:00
bb63f9697e supply chain controller 2020-08-07 14:23:48 -05:00
99f63627b2 supply chain controller 2020-08-07 14:21:40 -05:00
a50182b1e5 supply chain controller 2020-08-07 14:19:51 -05:00
d5c57aca1c supply chain controller 2020-08-07 14:18:39 -05:00
273cb2b775 supply chain controller 2020-08-07 14:16:56 -05:00
ec315dc63f supply chain controller 2020-08-07 14:14:58 -05:00
4c0126bf4b supply chain controller 2020-08-07 14:12:45 -05:00
40135f5861 supply chain controller 2020-08-07 14:11:20 -05:00
76cbe6a073 supply chain controller 2020-08-07 13:57:27 -05:00
a08959980a supply chain controller 2020-08-07 13:55:16 -05:00
4e1a454d4e supply chain controller 2020-08-07 13:54:46 -05:00
eef0d65d44 supply chain controller 2020-08-07 13:50:52 -05:00
bb84b15f3b supply chain controller 2020-08-07 13:50:16 -05:00
0f108a709c supply chain controller 2020-08-07 13:40:24 -05:00
eb6c1c7c3b supply chain controller 2020-08-07 13:33:13 -05:00
bb026d2cd9 updated supply chain contract controller 2020-08-07 13:31:00 -05:00
955e494e05 closed supply chain contract labeling on the dashboard 2020-08-07 12:35:37 -05:00
7d07bde52c removed debugging line in blade 2020-08-07 12:34:25 -05:00
8a7e84ebb8 delete supply chain contract 2020-08-07 12:32:52 -05:00
075ec5f6bf redirect after storing bid. 2020-08-07 12:31:21 -05:00
aa0d510b05 open contracts blade file 2020-08-07 12:28:43 -05:00
0962ffb372 open contracts 2020-08-07 12:26:21 -05:00
ea75ac6d25 open contracts 2020-08-07 12:23:36 -05:00
d0c16d60cd open contracts 2020-08-07 12:19:56 -05:00
fdebf19a26 changed form to button only and updated web routes 2020-08-07 12:18:33 -05:00
6367b1593d changed form to button only and updated web routes 2020-08-07 12:18:01 -05:00
7c9e5e8491 troubleshooting supply chain contracts 2020-08-07 12:12:16 -05:00
9e90e785a3 fixed includes for supply chain contract blades 2020-08-07 12:07:58 -05:00
0474936bfc stuff 2020-08-07 12:05:13 -05:00
430432a18b supply chain contract controller 2020-08-07 12:01:22 -05:00
9d45b67c73 new supply chain contract mail 2020-08-07 11:59:58 -05:00
3bd7b9c2fd fixed new contract blade 2020-08-07 11:56:46 -05:00
3b5952cd44 fixed new contract blade 2020-08-07 11:55:22 -05:00
910e32809f added migration to drop wormhole tables 2020-08-07 11:19:37 -05:00
c888741aef removed several things including wormholes which weren't being utilized at all 2020-08-07 10:38:47 -05:00
8f74542371 updated rental moon mail 2020-08-04 02:44:41 -05:00
e86e7f62d3 updated request moon blade to show dy-p 2020-08-02 14:06:16 -05:00
9054c47777 updated request moon blade to show dy-p 2020-08-02 14:05:07 -05:00
735ca514bc adjusted the structure request mail delay 2020-08-02 13:41:36 -05:00
f008087b71 removed contract stuff from admin dashboard 2020-08-02 13:32:16 -05:00
3f510e40e7 moons controller 2020-08-02 13:29:50 -05:00
03f00518c3 issue with modify user page 2020-08-01 06:09:02 -05:00
c512629637 issue with modify user page 2020-08-01 06:06:36 -05:00
c38ffd3643 modified people to be able to see rental moon stuff with a permission 2020-08-01 06:02:21 -05:00
4f8c08011a added mail to be sent to Minerva and Rock about moon requests being entered into the system. 2020-08-01 05:05:42 -05:00
d476978cde create command to replace item compositions from sde file 2020-07-29 02:25:33 -05:00
b32812217b removed wiki from the navbar 2020-07-26 01:16:01 -05:00
8cf4c98633 commands and job 2020-07-26 01:14:22 -05:00
cf98e875ee modified add allowed login. 2020-07-23 22:25:32 -05:00
427759a98e modified open and closed contract blades 2020-07-22 01:45:02 -05:00
b537aa6ea1 modified open and closed contract blades 2020-07-22 01:39:34 -05:00
c079ae3c60 added buttons to dashboard for supply chain contracts 2020-07-22 01:31:27 -05:00
4043037d87 added buttons to dashboard for supply chain contracts 2020-07-22 01:22:37 -05:00
9a9b71f479 added buttons to dashboard for supply chain contracts 2020-07-22 01:21:56 -05:00
77429e2013 added buttons to dashboard for supply chain contracts 2020-07-22 01:13:18 -05:00
7e8ae3ab68 added buttons to dashboard for supply chain contracts 2020-07-22 01:12:25 -05:00
838aa1612a added buttons to dashboard for supply chain contracts 2020-07-22 01:10:09 -05:00
204a6c10dc added buttons to dashboard for supply chain contracts 2020-07-22 01:09:26 -05:00
936a8831fa added buttons to dashboard for supply chain contracts 2020-07-22 01:07:25 -05:00
7c86d0d9df added buttons to dashboard for supply chain contracts 2020-07-22 01:06:01 -05:00
60814f7c1c added buttons to dashboard for supply chain contracts 2020-07-22 01:03:25 -05:00
f4a193ec91 created supply chain contract end command and job 2020-07-21 23:38:16 -05:00
686ff34a11 modified nav bar for supply chain contracts 2020-07-21 23:36:09 -05:00
00ac338981 updated routes and browser links 2020-07-21 01:43:10 -05:00
b9af1cb074 updated routes and browser links 2020-07-21 01:42:28 -05:00
8c885636de updated routes and browser links 2020-07-21 01:23:46 -05:00
b114a16bed updated routes and browser links 2020-07-21 01:23:29 -05:00
a096edb88f updated routes and browser links 2020-07-21 01:21:30 -05:00
890c805f37 updated routes and browser links 2020-07-21 01:20:14 -05:00
9fe794543e fixed typo 2020-07-20 22:50:01 -05:00
bda6d5bdee added ability to add B, M, b, or m for bids text box on the form. 2020-07-20 22:49:11 -05:00
997d29c88a supply chain stuff 2020-07-20 06:46:54 -05:00
2d2395a97d supply chain coding 2020-07-10 03:44:33 -05:00
cc04244df8 supply chain stuff 2020-07-09 02:14:55 -05:00
fd21d72887 supply chain contracts views 2020-07-08 03:19:16 -05:00
52ae227085 past contract stuff 2020-06-29 00:33:36 -05:00
e264f23237 past contract stuff 2020-06-29 00:33:07 -05:00
854438a2ee past contract stuff 2020-06-29 00:32:39 -05:00
9fc304040a past contracts for nav bar on admin dashboard menu 2020-06-29 00:32:04 -05:00
bf5748d58e past contracts for nav bar on admin dashboard menu 2020-06-29 00:27:16 -05:00
e9ed06dbf3 past contracts for nav bar on admin dashboard menu 2020-06-29 00:26:14 -05:00
510fe5257a past contracts for nav bar on admin dashboard menu 2020-06-29 00:25:14 -05:00
9b4e2fabfa past contracts for nav bar on admin dashboard menu 2020-06-29 00:24:51 -05:00
0dae280d9f past contracts for nav bar on admin dashboard menu 2020-06-29 00:24:17 -05:00
75e20fb5d9 past contracts for nav bar on admin dashboard menu 2020-06-29 00:22:51 -05:00
0c1174d113 past contracts for nav bar on admin dashboard menu 2020-06-29 00:22:12 -05:00
50ddedb652 past contracts for nav bar on admin dashboard menu 2020-06-29 00:01:47 -05:00
4a39921355 past contracts 2020-06-29 00:00:29 -05:00
5fb5503d3e past contracts 2020-06-28 23:59:27 -05:00
c50bbe8c25 contract re-work 2020-06-28 15:06:50 -05:00
dd82f8cb8b contract re-work 2020-06-28 15:06:25 -05:00
d2570cec55 mailing list change for contracts 2020-06-28 02:22:35 -05:00
01435c6cea mail formatting issue 2020-06-27 20:02:33 -05:00
ddf7ec0c27 modify user role 2020-06-27 12:17:00 -05:00
400b777484 modify user role 2020-06-27 12:16:30 -05:00
fbbd4409d0 black list update 2020-06-27 11:41:36 -05:00
37865e134c moons admin controller coloring for moon rentals 2020-06-23 22:58:50 -05:00
e010cf1327 new moon stuff 2020-06-23 11:00:09 -05:00
da5d642505 moon testing 2020-06-23 00:13:52 -05:00
1f1c001fde moon testing 2020-06-22 23:51:06 -05:00
fc5261a645 moon testing 2020-06-22 22:43:32 -05:00
4c3da5c4b1 moon testing 2020-06-22 22:28:15 -05:00
163c57c600 moon testing 2020-06-22 22:27:21 -05:00
545a691387 color issues 2020-06-22 21:05:42 -05:00
f8a77b7c29 color issues 2020-06-22 20:48:33 -05:00
f2c3507355 color issues 2020-06-22 20:46:39 -05:00
6cbe808b89 color issues 2020-06-22 20:46:01 -05:00
bed71908ae alliance moon testing 2020-06-22 20:39:27 -05:00
5a48e6af32 alliance moon testing 2020-06-22 20:36:31 -05:00
4c8e9d58fd alliance moon testing 2020-06-22 20:35:35 -05:00
31d79bcc32 alliance moon testing 2020-06-22 20:33:23 -05:00
db91d9410c alliance moon testing 2020-06-22 20:30:53 -05:00
405a785b65 alliance moon testing 2020-06-22 20:25:20 -05:00
6994cb1e94 alliance moon testing 2020-06-22 20:22:50 -05:00
49e1ec3638 update for troubleshooting 2020-06-22 20:18:31 -05:00
60d47747ba navbar fix 2020-06-17 21:58:45 -05:00
375b121eb8 request rental moon page 2020-06-09 23:41:53 -05:00
27939b153f navigation issue 2020-06-07 22:18:15 -05:00
18d1eee592 added market to flex structures to keep track of. 2020-06-07 00:05:53 -05:00
284c81a2e1 rental moon testing 2020-06-06 04:55:02 -05:00
13be193591 rental moon testing 2020-06-06 04:49:22 -05:00
ecaa9f8e86 rental moon testing 2020-06-06 04:47:13 -05:00
2f09747222 rental moon testing 2020-06-06 04:43:16 -05:00
cc0f7427b3 rental moon testing 2020-06-06 04:42:30 -05:00
87a7b255ce rental moon testing 2020-06-06 04:41:11 -05:00
f01e25a9c2 rental moon testing 2020-06-06 04:40:17 -05:00
a36eaee54e rental moon testing 2020-06-06 04:39:55 -05:00
0b06fea8ac rental moon testing 2020-06-06 04:39:16 -05:00
57ee594dd0 rental moon testing 2020-06-06 04:16:49 -05:00
9fb94f1fd4 rental moon testing 2020-06-06 04:12:12 -05:00
3c8ac639f8 rental moon testing 2020-06-06 04:11:29 -05:00
99f12b493b rental moon testing 2020-06-06 04:11:01 -05:00
8008fac0ff rental moon testing 2020-06-06 04:08:34 -05:00
c56dde238d rental moon testing 2020-06-06 04:08:02 -05:00
a5ff733311 rental moon testing 2020-06-06 04:06:16 -05:00
3d6a2a67ad rental moon testing 2020-06-06 04:04:27 -05:00
1717cd9d3b rental moon testing 2020-06-06 04:02:30 -05:00
d9619f17d0 rental moon testing 2020-06-06 04:01:51 -05:00
6f3d9fd7ff rental moon testing 2020-06-06 04:00:40 -05:00
9c53f969e6 rental moon testing 2020-06-06 03:59:39 -05:00
8211de1954 moon testing 2020-06-06 03:34:46 -05:00
cfcebf8b73 created a job for updating rental moon pull. may need to add constraints to it. 2020-06-06 03:23:18 -05:00
99cec351ec rental moon testing 2020-06-05 23:29:42 -05:00
9a56ffb829 moon testing 2020-06-05 04:53:25 -05:00
a54c8ed9a4 rental moon testing 2020-06-05 03:15:26 -05:00
29ef5527a9 rental moon testing 2020-06-05 03:13:31 -05:00
b073e6fac7 rental moon testing 2020-06-05 03:11:33 -05:00
3b64aaca66 rental moon testing 2020-06-05 03:00:59 -05:00
7cc3788f77 rental moon testing 2020-06-05 02:19:30 -05:00
dcaa848b0f rental moon testing 2020-06-05 02:09:44 -05:00
3b29dd2a91 rental moon testing 2020-06-05 01:59:53 -05:00
90d8245ab2 rental moon testing 2020-06-05 01:59:00 -05:00
d1308b6908 rental moon testing 2020-06-05 01:54:53 -05:00
1d875f2ce1 rental moon testing 2020-06-05 01:43:02 -05:00
6e95e7dd06 rental moon testing 2020-06-05 01:42:28 -05:00
4ff5a0b0a8 rental moon testing 2020-06-05 01:41:22 -05:00
b9aab0981e rental moon testing 2020-06-05 01:35:49 -05:00
41c9e22121 rental moon testing 2020-06-05 01:34:12 -05:00
b6f0da41e8 rental moon testing 2020-06-05 01:16:53 -05:00
60604f208c rental moon testing 2020-06-05 01:06:08 -05:00
f0650c2c29 rental moon testing 2020-06-05 01:04:51 -05:00
b82afbbb14 rental moon testing 2020-06-05 01:03:21 -05:00
c729b33852 rental moon testing 2020-06-04 23:43:37 -05:00
26df4f4875 rental moon testing 2020-06-04 23:42:42 -05:00
09ce007f9a rental moon testing 2020-06-04 23:42:19 -05:00
a2d17fcd2a rental moon testing 2020-06-04 23:38:33 -05:00
56762f42af modified migration for alliance rental moons 2020-06-04 23:35:07 -05:00
dbbe8139b7 store update moon function 2020-06-04 03:29:10 -05:00
af9a8e955b store update moon function 2020-06-04 03:28:59 -05:00
9b7eb27e01 removed files and transferred others to the new system. this is going to break so much shit. 2020-06-03 22:33:44 -05:00
cde4f3b6c7 rental moon stuffs 2020-06-03 22:26:48 -05:00
7e248c7055 created rental moons command as a placeholder 2020-06-03 04:33:31 -05:00
d70ec78cae removed moon stuff from console kernel 2020-06-03 04:32:36 -05:00
cb0fcbc582 removed moon stuff from console kernel 2020-06-03 04:32:03 -05:00
3b11dae932 created send moon rental payment reminder job 2020-06-03 04:30:25 -05:00
aec0671b4a created outline for payment reminder 2020-06-01 03:07:17 -05:00
6853ae9881 created outline for payment reminder 2020-06-01 02:50:28 -05:00
14b59ed418 created outline for payment reminder 2020-06-01 02:50:08 -05:00
f83f908cfa wrote job for updating moon rental paid states 2020-06-01 02:42:57 -05:00
3243bb8702 update moon rental paid state job 2020-05-29 22:06:12 -05:00
bff5dbef07 laid out framework for updating moon rental price, and moved some functions around in the moon calculation library 2020-05-29 01:41:52 -05:00
eb88bc7950 rewrite of the rental moon module 2020-05-28 05:06:40 -05:00
ef86ba749d rewrite of the rental moon module 2020-05-28 04:39:07 -05:00
8a21604adb removed old navbar and bootstrap template from the user layouts and the admin layouts 2020-05-28 00:02:10 -05:00
0cde363e96 layout cleanup 2020-05-27 05:09:28 -05:00
246c691ad5 navbar stuff 2020-05-27 05:02:47 -05:00
85b3f74741 fixed navbar stuff 2020-05-27 04:59:52 -05:00
2e356404f9 kernel 2020-05-27 04:51:57 -05:00
d0876e9411 commands data purge corp moon ledgers class 2020-05-27 04:47:35 -05:00
bc29df33b5 kernel 2020-05-27 04:46:13 -05:00
84e600fa52 updates for job connections 2020-05-27 04:33:05 -05:00
685681617c stuff 2020-05-27 03:57:23 -05:00
14acf05c03 stuff 2020-05-27 03:54:54 -05:00
9b74fd45a2 cut short 2020-05-27 03:53:47 -05:00
61f5467c65 model update 2020-05-27 03:50:02 -05:00
15f420ffe8 migrations 2020-05-27 03:48:42 -05:00
e6c6baeb8f migration update 2020-05-27 03:46:40 -05:00
5874e88ee0 fetch moon ledger job 2020-05-27 03:44:16 -05:00
765072e413 fetch moon ledger job 2020-05-27 03:43:00 -05:00
2e3468fe74 fetch moon ledger job 2020-05-27 03:42:40 -05:00
cce69f79c0 fetch moon ledger job 2020-05-27 03:36:14 -05:00
562802ec56 stuff 2020-05-27 03:24:42 -05:00
e052d624f4 stuff 2020-05-27 03:24:00 -05:00
e7424b9272 structure helper stuff 2020-05-27 03:22:43 -05:00
128172b597 update job 2020-05-27 03:04:25 -05:00
911d69044a changed structure helper function from private to public 2020-05-27 03:01:01 -05:00
9696a15e02 rental moon ledgers table 2020-05-27 02:59:14 -05:00
a70f45938a rental moon ledgers table 2020-05-27 02:55:02 -05:00
5f3639e945 fetch moon observer job 2020-05-27 02:49:39 -05:00
7ea6735167 fetch moon observers job 2020-05-27 01:23:35 -05:00
c736d1d4bf fetch moon observers job 2020-05-27 01:22:14 -05:00
580968a4a3 fetch moon observers job 2020-05-27 01:21:31 -05:00
75c3705fb0 fetch moon observers job 2020-05-27 01:21:00 -05:00
9fe4b47349 fetch moon observers job 2020-05-27 01:20:24 -05:00
419f529a29 fetch moon observers job 2020-05-27 01:18:40 -05:00
7438545e29 modified fetch moon observer job 2020-05-27 01:16:35 -05:00
43b3357834 modified fetch moon observer job 2020-05-27 01:15:48 -05:00
4c89da8248 modified the fetch moon observer job to disregard the structure library helper 2020-05-27 01:11:56 -05:00
9175fac141 modified some database table migrations 2020-05-27 01:08:17 -05:00
fde062134d removed a database I don't have plans for yet. 2020-05-27 01:07:18 -05:00
4c72b585c6 removed a database I don't have plans for yet. 2020-05-27 01:04:23 -05:00
b98820b7c9 fixed typo in moonupdatecommand.php 2020-05-27 00:59:24 -05:00
8b4ee2315c fixed typo in moonupdatecommand.php 2020-05-27 00:57:59 -05:00
3a994fdcde fixed typo in moonupdatecommand.php 2020-05-27 00:57:13 -05:00
297304e176 fixed typo in moonupdatecommand.php 2020-05-27 00:56:10 -05:00
01f18e6dfc fixed a task status description for update moon pricing. 2020-05-27 00:52:22 -05:00
48c52f14e3 reconfigured the sidebar menu system to just run include files 2020-05-25 04:29:33 -05:00
817108aaf1 number formatting on dashboard stuff 2020-05-24 23:30:05 -05:00
c3a390c28d modified entrance page to only show srp if the person is in Warped Intentions. 2020-05-24 23:26:02 -05:00
6142eb9ba5 modified admin moon blade to include number formatting back in correctly 2020-05-24 20:39:24 -05:00
66dab8c1b8 fixed an issue with the esi variable for get structure info in StructureHelper 2020-05-23 23:19:29 -05:00
5da41d4d04 removed some market stuff for the time being from the console commands 2020-05-23 23:12:07 -05:00
d25d566790 fixed a number formatting issue for display rental moons 2020-05-23 22:57:31 -05:00
fc01cbc636 fixed a formatting issue 2020-05-23 22:57:11 -05:00
a3a8def860 modified public contracts controller 2020-05-15 04:07:59 -05:00
b2bba1bf5f added new commands to the console kernel 2020-05-15 03:55:54 -05:00
5b959f9d6a modified the get market data command
created the purge market data command
modified the public contracts command
2020-05-15 03:53:22 -05:00
77a6e6b688 created get public contracts command 2020-05-15 03:36:13 -05:00
7abd2dece9 created public contracts command and get market data command 2020-05-15 03:00:39 -05:00
d08e6f5f8f created the command for get eve regions for artisan 2020-05-15 02:57:51 -05:00
32e17c30eb setup the get eve regions command 2020-05-15 02:52:36 -05:00
5b746a3e22 removed market group model
removed market price model
added command for GetEveRegions to be able to get all of the eve regional data into the database from time to time.
2020-05-15 02:51:46 -05:00
a84ea90c79 created get market region order job
created purge market region order job to get rid of old useless data
removed market price and market group from database tables
2020-05-15 02:50:52 -05:00
fbd7c37ccf created job for market groups 2020-05-15 01:31:38 -05:00
7f1fa7c101 created get eve regions job 2020-05-14 23:01:48 -05:00
7f5c40b996 created model for eve regions 2020-05-14 22:25:13 -05:00
5d12167324 modified public contracts to show the region the public contract is in. 2020-05-14 22:15:35 -05:00
2a08fd71a2 created relationships for public contract jobs and models 2020-05-14 22:10:28 -05:00
774d8b866e wrote the get public contract items job 2020-05-14 04:16:26 -05:00
e2db5ea804 create get public contracts job 2020-05-14 04:08:46 -05:00
5e435bdf1a created framework for market orders and public contracts 2020-05-14 03:51:58 -05:00
47b0949290 creating the moon rental invoice verify 2020-05-12 02:04:30 -05:00
50441d6152 added creation of invoice id to create invoice job 2020-05-12 00:49:18 -05:00
3230e2fec0 function was misspelled 2020-05-11 06:54:51 -05:00
39c934cdbe added invoice creation for the database to moon rental invoice 2020-05-11 01:12:10 -05:00
c6ad585d49 added invoice creation for the database to moon rental invoice 2020-05-11 01:11:13 -05:00
a3b712d709 updated commands for kernel for console 2020-05-11 00:22:36 -05:00
1b811aacdd deleted 2 migrations I am not ready to program on yet. 2020-05-11 00:03:37 -05:00
c4c52af1d3 removed eve mail library as it wasn't utilized 2020-05-11 00:02:11 -05:00
11cf735961 removed configuration of null cache from eve mail helper 2020-05-11 00:00:54 -05:00
ab9f6e5b52 removed job models for eve mail as it's no longer needed. updated all functions to the new programming method 2020-05-11 00:00:13 -05:00
da39f990a5 process wallet journal job model removed 2020-05-10 23:35:04 -05:00
806b872465 removed model for process structure job 2020-05-10 23:25:06 -05:00
6f00ffe0e8 removed job model for corp journal as it was never used 2020-05-10 23:17:57 -05:00
7217b5aeec removed model for asset job 2020-05-10 23:17:13 -05:00
307741a0e1 removed model for asset job 2020-05-10 23:17:00 -05:00
ad6a90d623 updated assets in order to not use a model to get rid of extra models that we don't need 2020-05-10 23:13:05 -05:00
7a89b65b15 moons update command written 2020-05-10 23:05:23 -05:00
cea92f1c70 added uses to moonupdatecommand 2020-05-10 22:40:29 -05:00
f9676665de kernel updates for comamnds 2020-05-10 22:37:58 -05:00
acb55a1ecb update 2020-05-10 22:32:03 -05:00
95a4636414 update 2020-05-10 22:29:26 -05:00
67f751f8d5 update 2020-05-10 22:28:24 -05:00
79b43acc40 update 2020-05-10 22:26:12 -05:00
719f54f90a update 2020-05-10 22:25:47 -05:00
1525d1095c removed and unneeded function from moon mailer command 2020-05-10 22:24:30 -05:00
f3e3406e04 updated rental moon command with the correct job calls in the right order
updated the horizon redis configuration to add new processes and a new job queue called moons for the new moon rental coding
2020-05-10 22:22:26 -05:00
08844a50f7 updated delays for jobs 2020-05-10 21:52:04 -05:00
524f2051ea modified namespace for commands being done 2020-05-10 19:29:09 -05:00
cd7f6f4876 modified namespace for commands being done 2020-05-10 19:28:45 -05:00
e855350b7f finished the purge moon ledger job 2020-05-10 19:16:37 -05:00
50b2e91ec6 created new job to purge old moon ledger records 2020-05-10 18:57:24 -05:00
b7291a93b7 created the job for fetch moon ledger 2020-05-10 18:46:58 -05:00
1d19732eeb created new migration for future projects 2020-05-10 17:48:16 -05:00
09f9e39e8b removed some unneeded extra lines for formatting 2020-05-10 17:06:25 -05:00
16f808ae53 updated solar system name functions in structure helper. added new functions to lookup helper. 2020-05-10 17:04:08 -05:00
b01bb72c1d cleaned up unused functions in the srp helper. 2020-05-10 16:38:16 -05:00
b8b01e87d1 cleaned up some functions in the MoonCalc Library. 2020-05-10 16:22:19 -05:00
40e18ccb7a fetch rental moon ledger and observer updates along with starting moon rental invoice job. up next is moon rental payment job. 2020-05-10 05:11:50 -05:00
8e93eececf composer update 2020-05-10 09:29:56 +00:00
c6f807ebad more work on rental moon ledgers 2020-05-10 04:23:49 -05:00
db6876cdca created jobs and command for processing moon rental payments 2020-05-09 12:44:40 -05:00
7df8a0e6ef deleted unnecessary line 2020-05-09 12:42:46 -05:00
cf56300676 cleaned up unnecessary commands as they got switched to working as jobs.
updated the structure library to be able to be passed the esi connection
added new jobs for the fetch stuff that was being previously done as commands.
2020-05-09 12:40:16 -05:00
1f3954cfe0 added new models and migrations for automatic tracking of moon rental payments 2020-05-09 12:26:40 -05:00
9c7dbbf1ba added some stuff into the callback middleware for testing. 2020-05-09 11:06:29 -05:00
15f60534f1 removed names from some routes, as they aren't needed. 2020-05-09 10:53:02 -05:00
6ef087b841 removed trim strings middleware from affecting passwords and password confirmations as those aren't used for login 2020-05-09 10:50:03 -05:00
6506c11ec1 removed callback middleware from taking affect 2020-05-09 10:48:55 -05:00
b56850956b added place holder function for the new moon ledger display function. 2020-05-09 10:45:53 -05:00
96a2fb1c3e created function for registering structures which should only be accessible by those with the correct scope. 2020-05-09 10:37:03 -05:00
f501514aa2 re-added esi scopes back to the navigation bar 2020-05-09 09:24:12 -05:00
5607763fd4 added model for registered corp mining observers 2020-05-09 09:11:59 -05:00
cf00909444 added new namespaces for all of the commands 2020-05-09 08:59:01 -05:00
09e56371e6 rental moon ledger and observer command 2020-05-09 08:07:22 -05:00
cf1d121fb3 fixed some issues on moon total worth 2020-05-08 01:06:36 -05:00
b00fd7d177 fixed some issues on moon total worth 2020-05-08 01:04:26 -05:00
59c29e3a40 fixed some issues on moon total worth 2020-05-08 01:03:20 -05:00
a493043aa4 fixed some issues on moon total worth 2020-05-08 01:02:02 -05:00
9d54cc06a1 fixed some issues on moon total worth 2020-05-08 00:59:31 -05:00
5f23fa3a19 wiki update 2020-05-07 01:58:34 -05:00
ace2648480 some poor fuck in Bolivia 2020-05-07 01:56:57 -05:00
aa3a2811e9 purge wiki button update 2020-05-07 01:49:38 -05:00
5859db3f67 purge wiki button update 2020-05-07 01:48:32 -05:00
d3ee45da2b purge wiki button update 2020-05-07 01:47:54 -05:00
1a277a7881 purge wiki button update 2020-05-07 01:46:54 -05:00
e0f83179fd purge wiki button update 2020-05-07 01:46:04 -05:00
3c50143dd4 wiki user group testing 2020-05-07 01:27:10 -05:00
cc4c01be6d wiki user group testing 2020-05-07 01:25:42 -05:00
125b2aed97 wiki user group testing 2020-05-07 01:22:22 -05:00
dd6c235df8 wiki user group testing 2020-05-07 01:17:20 -05:00
902fde2467 wiki user group testing 2020-05-07 01:16:30 -05:00
9561a076d7 added mining observers table
added corp observers table
added alliance rental moon ledgers
added corp moon ledgers table
modified wiki stuff groups
2020-05-07 01:13:18 -05:00
d796512f6a rental ledger 2020-05-06 22:21:52 -05:00
e3905253b7 included messages 2020-05-04 21:33:38 -05:00
6887b3c135 included messages 2020-05-04 21:31:09 -05:00
7a23437a87 menu options for navigation menu 2020-05-04 21:29:47 -05:00
a19bf7eac1 menu options for navigation menu 2020-05-04 21:28:19 -05:00
c1d7c53d57 menu options for navigation menu 2020-05-04 21:24:23 -05:00
7f81830ae8 flex structure mailer issue 2020-05-03 23:39:19 -05:00
5b64bd910a flex structure mailer issue 2020-05-03 23:37:55 -05:00
c578512188 flex structure mailer 2020-05-03 23:36:06 -05:00
73abaa1f66 updated navigation menu font icons 2020-04-29 22:53:18 -05:00
4bf274196e updated navigation menu font icons 2020-04-29 22:52:27 -05:00
4ea3064a37 updated navigation menu font icons 2020-04-29 22:48:08 -05:00
c1785a4618 updated navigation menu font icons 2020-04-29 22:42:18 -05:00
6528b15449 updated navigation menu font icons 2020-04-29 22:36:01 -05:00
01c3f52d62 updated navigation menu font icons 2020-04-29 22:35:02 -05:00
538f4a9ea6 updated navigation menu font icons 2020-04-29 22:33:19 -05:00
e1e67f47ec updated user side of the site with the new dashboard layout and menu navigation layout. 2020-04-29 21:31:33 -05:00
ec694c23b5 update 2020-04-29 04:04:55 -05:00
e92a1a5647 update 2020-04-29 02:59:36 -05:00
aaefdb2a59 update 2020-04-29 02:59:02 -05:00
398b2f5c4f update 2020-04-29 02:58:08 -05:00
c26a23b36c update 2020-04-29 02:57:37 -05:00
45c2297de7 update 2020-04-29 02:52:14 -05:00
6fdfc4467e update 2020-04-29 02:51:48 -05:00
36368fa260 update 2020-04-29 02:50:22 -05:00
4b875454d8 update 2020-04-29 02:41:50 -05:00
346fcd746f added new functions to the user model for srp
created new admin lte dashboard for regular users
created sub files to break up the admin lte dashboard for regular users if the dashboard is fully utilized.
2020-04-29 02:37:14 -05:00
754fbb9aad updated contract mailer in contractadmincontroller 2020-04-26 06:47:02 -05:00
66896ab73e fixed an issue with the AdminDashboardController construct 2020-04-26 06:01:04 -05:00
5cc9914c38 changed a model around 2020-04-26 05:55:07 -05:00
468cfd8810 changed a model around 2020-04-26 05:44:15 -05:00
b2de6fa5cd changed table of Moons to RentalMoons 2020-04-26 05:40:30 -05:00
8cf41c5c36 corp rental moons 2020-04-26 01:27:23 -05:00
59c0de75c4 corp rental moons 2020-04-26 01:26:11 -05:00
6a26f4bc6e mining ledger testing 2020-04-26 00:37:59 -05:00
d08eaa2da8 mining ledger testing 2020-04-26 00:37:01 -05:00
9140edb031 mining ledger testing 2020-04-26 00:36:27 -05:00
b71e44bd01 mining ledger testing 2020-04-26 00:32:50 -05:00
5a2de99035 moon ledger functionality 2020-04-26 00:07:02 -05:00
cfbccbf443 moon ledger functionality 2020-04-26 00:06:18 -05:00
a5a894e6d6 moon ledger functionality 2020-04-26 00:04:17 -05:00
4fa31759c3 moon ledger 2020-04-26 00:02:09 -05:00
5b92fba23a mining ledgers functionality 2020-04-25 23:41:22 -05:00
932c8e1c58 mining ledger remake 2020-04-25 21:49:18 -05:00
1845ee9d81 mining ledger remake 2020-04-25 21:48:21 -05:00
762af28ae0 mining ledger remake 2020-04-25 21:47:21 -05:00
cea3c47caf moon ledger stuff 2020-04-25 06:53:11 -05:00
e568347ea4 moon ledger stuff 2020-04-25 05:23:45 -05:00
766e6f64f1 moon ledger stuff 2020-04-25 05:19:02 -05:00
472b2b0bc2 moon ledger stuff 2020-04-25 05:04:21 -05:00
2507c5c60e moon ledger stuff 2020-04-25 05:03:09 -05:00
d42d0c9d73 moon ledger stuff 2020-04-25 05:02:04 -05:00
f2771e2bed moon ledger stuff 2020-04-25 05:00:55 -05:00
c56bc9fb9d moon ledger stuff 2020-04-25 04:59:50 -05:00
921632789b moon ledger stuff 2020-04-25 04:58:40 -05:00
7b0da0f96e moon ledger stuff 2020-04-25 04:53:32 -05:00
de09e811c6 moon ledger stuff 2020-04-25 04:53:04 -05:00
48042df9d5 moon ledger update 2020-04-25 04:49:39 -05:00
3ae603a789 dashboard update for SRP stuff 2020-04-10 18:19:38 -05:00
519cca30b5 process form for srp 2020-04-10 17:29:03 -05:00
96e0710d8a allowed login update 2020-04-08 23:15:42 -05:00
f88232fdd3 created layout for fleet helper 2020-04-08 00:21:12 -05:00
861f3654d2 alliance fleet tables and models 2020-04-07 23:47:35 -05:00
2d6989ed1c cleaning stale data weekly 2020-04-04 04:07:24 -05:00
dd0fb8eff0 sov wallet journal 2020-04-04 03:25:41 -05:00
649e9cff13 sov bill journals 2020-04-04 03:16:13 -05:00
f2b11b038e sov bills journal 2020-04-04 03:11:17 -05:00
dbf5115c0c sov bills job work 2020-04-04 02:48:21 -05:00
f349094e10 sov bills job work 2020-04-04 02:47:08 -05:00
e597ec1b69 sov bills job work 2020-04-04 02:46:26 -05:00
8511a6cb41 sov bills job work 2020-04-04 02:45:48 -05:00
3f61ad8f99 sov bills job work 2020-04-04 02:45:11 -05:00
d2fbac3a70 sov bills job work 2020-04-04 02:43:07 -05:00
f13326f7d3 sov bills job work 2020-04-04 02:42:16 -05:00
4bd2d2c3ee sov bill job work 2020-04-04 02:41:25 -05:00
5a45af6d40 sov bills 2020-04-04 02:29:41 -05:00
b53610f6fa holding journal for sov expenses 2020-04-04 02:10:34 -05:00
ee4b67c03c admin dashboard for modifying users 2020-04-04 02:09:51 -05:00
445f8a7660 admin dashboard for modifying users 2020-04-04 01:57:23 -05:00
750652c068 b4 blade for admin dashboard 2020-04-04 01:56:00 -05:00
67115a2dd8 journal pages 2020-04-04 01:50:00 -05:00
f6034240d8 sov bill update for job 2020-04-04 01:18:48 -05:00
5a590f7530 new admin dashboard 2020-04-04 00:43:25 -05:00
e005ab6211 new admin dashboard 2020-04-04 00:40:19 -05:00
6e5a63b3a1 new admin dashboard 2020-04-04 00:39:40 -05:00
01dd27c088 switched over to new admin dashboard layout 2020-04-04 00:15:32 -05:00
2883d2a35b admin lte 2020-04-04 00:14:51 -05:00
be6b13a7ae admin lte 2020-04-04 00:03:31 -05:00
80364a3cbf admin lte 2020-04-04 00:01:57 -05:00
548d37a14d admin lte 2020-04-04 00:01:37 -05:00
1f96c3a175 admin dashboard test 2020-04-04 00:00:08 -05:00
7bdbc95a19 admin lte 2020-04-03 23:51:31 -05:00
6a4bd749a8 admin lte modifications 2020-04-03 23:43:24 -05:00
60a0dcc5a2 admin lte 2020-04-03 23:35:59 -05:00
1b88380e38 admin lte 2020-04-03 23:35:39 -05:00
81b0634e1b admin lte 2020-04-03 23:34:56 -05:00
b8be6a1bc0 admin lte 2020-04-03 23:34:21 -05:00
807a567db4 admin lte 2020-04-03 23:33:40 -05:00
5105246f07 admin lte 2020-04-03 23:33:21 -05:00
51727bc05b admin lte 2020-04-03 23:31:54 -05:00
9ba5d665f1 admin lte 2020-04-03 23:29:09 -05:00
b9f814de1e admin lte 2020-04-03 23:19:12 -05:00
f3912bab13 admin lte 2020-04-03 23:17:21 -05:00
0847be02de admin lte 2020-04-03 22:14:32 -05:00
bb86f32e3a admin lte 2020-04-03 22:01:59 -05:00
12b97490e3 admin lte 2020-04-03 21:59:03 -05:00
59d7072ab4 admin dashboard files 2020-04-03 20:56:55 -05:00
896687f735 removed dashboard css as it was driving me nuts. 2020-04-03 20:40:33 -05:00
8ef67e3087 side nav bar for admin dashboard 2020-04-03 20:23:17 -05:00
652d141608 side nav bar for admin dashboard 2020-04-03 20:22:52 -05:00
8161b11b38 side nav bar for admin dashboard 2020-04-03 20:21:03 -05:00
6890e2580a side nav bar for admin dashboard 2020-04-03 20:20:24 -05:00
216f7ad6de side nav bar for admin dashboard 2020-04-03 20:17:43 -05:00
ae9fbd89c1 side nav bar for admin dashboard 2020-04-03 20:13:36 -05:00
51d34b4208 side nav bar for admin dashboard 2020-04-03 20:13:02 -05:00
abb7e43033 side nav bar for admin dashboard 2020-04-03 20:10:54 -05:00
48c5dc4db7 side nav bar for admin dashboard 2020-04-03 20:09:17 -05:00
a259764743 side nav bar for admin dashboard 2020-04-03 20:08:20 -05:00
d7dafdaeab side nav bar for admin dashboard 2020-04-03 20:05:32 -05:00
7320fe363d side nav bar for admin dashboard 2020-04-03 20:03:46 -05:00
603e39ca54 side nav bar for admin dashboard 2020-04-03 20:02:58 -05:00
0e616fc86f navbar for admin side 2020-04-03 20:00:41 -05:00
7b96be5be8 adjusted column width for srp history 2020-04-03 19:38:37 -05:00
034df21bf4 put srp blade back to the old layout on the original navbar 2020-04-03 19:36:54 -05:00
06dd0669fe sov bill journal 2020-04-03 03:15:46 -05:00
a2673187d3 views modifications 2020-04-03 02:47:51 -05:00
943735a7c7 modified fuel controller for jump gates 2020-04-03 02:46:30 -05:00
73d27ba44f admin dashboard items 2020-04-03 02:40:26 -05:00
c1d2d897a1 admin dashboard 2020-04-03 02:31:43 -05:00
1944f651e5 admin dashboard in the dashboard controller 2020-04-03 02:27:18 -05:00
4b56fb9025 new admin dashboard 2020-04-03 02:21:25 -05:00
e8a077c0df admin test dashboard 2020-04-03 02:18:50 -05:00
a16f72e9ae admin test dashboard 2020-04-03 02:14:53 -05:00
2b5f89b239 admin test dashboard 2020-04-03 02:12:47 -05:00
fa8775e440 admin test dashboard 2020-04-03 02:11:50 -05:00
9ff3c46a07 admin test dashboard 2020-04-03 02:11:26 -05:00
76b4fc559c admin test dashboard 2020-04-03 02:08:00 -05:00
d4032ce27c admin test dashboard 2020-04-03 02:07:33 -05:00
e4171ad06e admin test dashboard 2020-04-03 02:04:39 -05:00
597e2e80e2 admin test dashboard 2020-04-03 02:03:19 -05:00
9050d7b612 admin test dashboard 2020-04-03 02:02:54 -05:00
ea1ed80816 admin test dashboard 2020-04-03 02:02:11 -05:00
2adaf192da admin test dashboard 2020-04-03 02:01:24 -05:00
01715d5791 admin test dashboard 2020-04-03 02:00:51 -05:00
37e2a82e92 admin test dashboard 2020-04-03 02:00:05 -05:00
cc1b82c76f admin test dashboard 2020-04-03 01:58:17 -05:00
ee0ba02610 admin test dashboard 2020-04-03 01:57:23 -05:00
e1ce9227c0 admin test dashboard 2020-04-03 01:56:56 -05:00
c6cb7e3b2c admin test dashboard 2020-04-03 01:56:22 -05:00
fc0f2686e6 admin test dashboard 2020-04-03 01:55:17 -05:00
37b5e6ace4 admin test dashboard 2020-04-03 01:54:30 -05:00
dd6ebb366b admin test dashboard 2020-04-03 01:53:59 -05:00
fd4dcf88a9 admin test dashboard 2020-04-03 01:52:09 -05:00
dab3aa3ca6 admin test dashboard 2020-04-03 01:46:23 -05:00
233c2f46b8 admin test dashboard 2020-04-03 01:45:17 -05:00
583ceb1427 updated dashboard.css 2020-04-03 01:43:44 -05:00
22a4d26b87 updated dashboard.css 2020-04-03 01:43:06 -05:00
68a4caa163 updated dashboard.css 2020-04-03 01:41:00 -05:00
5d2e9755ec updated dashboard.css 2020-04-03 01:40:02 -05:00
7788f468f2 updated dashboard.css 2020-04-03 01:39:17 -05:00
18517dcb6d updated dashboard.css 2020-04-03 01:38:37 -05:00
20427231eb updated dashboard.css 2020-04-03 01:38:13 -05:00
1da477236c updated dashboard.css 2020-04-03 01:36:58 -05:00
2b1f35a36f updated dashboard.css 2020-04-03 01:35:55 -05:00
089944622e updated dashboard.css 2020-04-03 01:35:16 -05:00
09a73adb6a updated dashboard.css 2020-04-03 01:33:50 -05:00
ff7d88bccf updated dashboard.css 2020-04-03 01:33:01 -05:00
b292f3c86c updated dashboard.css 2020-04-03 01:31:59 -05:00
a6bda7887f admin test dashboard 2020-04-03 01:28:38 -05:00
f970aa0c5b admin test dashboard 2020-04-03 01:27:49 -05:00
955662f139 admin test dashboard 2020-04-03 01:27:18 -05:00
7d6e77a879 admin test dashboard 2020-04-03 01:26:50 -05:00
3bfbde740b admin test dashboard 2020-04-03 01:25:49 -05:00
5fb231207f admin test dashboard 2020-04-03 01:25:28 -05:00
fb6c0deff7 admin test dashboard 2020-04-03 01:24:46 -05:00
98a88d8bf5 admin test dashboard 2020-04-03 01:24:17 -05:00
06fe3b1cdc admin test dashboard 2020-04-03 01:22:50 -05:00
e630c22843 admin test dashboard 2020-04-03 01:21:25 -05:00
5a5c10bbee admin test dashboard 2020-04-03 01:20:39 -05:00
b919c9a086 admin test dashboard 2020-04-03 01:19:58 -05:00
a41a025a1a admin test dashboard 2020-04-03 01:18:08 -05:00
b84d6ab58d new admin dashboard 2020-04-03 01:16:19 -05:00
63f1f93ddd new admin dashboard 2020-04-03 01:15:47 -05:00
18a1a8cdc6 new admin dashboard 2020-04-03 01:13:43 -05:00
1c265427a7 new admin dashboard 2020-04-03 01:12:52 -05:00
4aa9154920 test admin dashboard 2020-04-03 01:01:36 -05:00
161ee30130 new admin dashboard layout 2020-04-03 00:54:59 -05:00
a87404a224 test admin dashboard 2020-04-03 00:54:19 -05:00
ac4aea0844 test admin dashboard 2020-04-03 00:53:26 -05:00
1e47a3cbaf test admin dashboard 2020-04-03 00:53:06 -05:00
c825089886 test admin dashboard 2020-04-03 00:52:32 -05:00
83490cc7be test admin dashboard 2020-04-03 00:50:40 -05:00
c95b8787c0 test admin dashboard 2020-04-03 00:49:13 -05:00
62c16e356b test admin dashboard 2020-04-03 00:48:26 -05:00
a5be5a31e6 test admin dashboard 2020-04-03 00:48:03 -05:00
5d2f7686cc test admin dashboard 2020-04-03 00:47:08 -05:00
cffb3c24f1 test navbar for admin dashboard 2020-04-03 00:45:29 -05:00
e80374e618 test navbar for admin dashboard 2020-04-03 00:43:22 -05:00
0ea25686e4 admin test dashboard 2020-04-03 00:33:53 -05:00
73687d7353 admin dashboard test 2020-04-03 00:32:40 -05:00
f6c689dd6c test admin dashboard 2020-04-03 00:30:57 -05:00
2960346805 test navbar for admin dashboard 2020-04-03 00:24:41 -05:00
6fdabd7269 test navbar for admin dashboard 2020-04-03 00:23:50 -05:00
4ada4e7f6e test navbar for admin dashboard 2020-04-03 00:21:34 -05:00
f464080639 working on a new admin dashboard 2020-04-03 00:06:37 -05:00
c2e8b07de0 modified kernel for commands 2020-04-02 23:20:12 -05:00
6f1e2c7ad9 files 2020-04-02 03:11:12 -05:00
05691f0d2d files 2020-04-02 03:06:08 -05:00
e5bf5692c1 moon calc 2020-04-02 02:59:33 -05:00
e07956a276 moons calc library 2020-04-02 02:58:50 -05:00
9313112b5e files 2020-04-02 02:51:20 -05:00
6bbbd388d7 files 2020-04-02 02:49:29 -05:00
700d3ab5f1 files 2020-04-02 02:25:36 -05:00
b4e20bdc8d moon formatter command 2020-04-02 01:40:53 -05:00
0ff2ddbbea moon update seeder 2020-04-02 01:40:38 -05:00
bec56e4219 seeder for moon updater based on a file 2020-04-02 01:39:09 -05:00
d57e40a3db files 2020-04-02 01:33:52 -05:00
27e99bd091 files 2020-04-02 01:20:02 -05:00
1034822f35 files 2020-04-02 01:19:00 -05:00
61c7aa77eb files 2020-04-02 01:17:41 -05:00
12c4640c53 files 2020-04-02 01:13:09 -05:00
24a4bbecff files 2020-04-02 01:04:45 -05:00
f262e02beb files 2020-04-02 01:04:05 -05:00
44c1225b21 files 2020-04-02 00:50:07 -05:00
69b3941776 files 2020-04-02 00:48:08 -05:00
ba4b303554 file 2020-04-02 00:46:53 -05:00
dcbcef9f05 file 2020-04-02 00:46:08 -05:00
57d229148d file 2020-04-02 00:45:04 -05:00
1c6b596ba8 files 2020-04-02 00:43:10 -05:00
6644982444 files 2020-04-02 00:41:01 -05:00
a521fe613c files 2020-04-02 00:40:29 -05:00
e83163ff7c stuff 2020-04-02 00:39:02 -05:00
a1e356beaf stuff 2020-04-02 00:35:31 -05:00
9c3b4ccaf6 stuff 2020-04-02 00:34:16 -05:00
2b2d8f98cd stuff 2020-04-02 00:33:20 -05:00
822469803d stuff 2020-04-02 00:30:12 -05:00
4b169395fb file 2020-04-02 00:28:43 -05:00
b54e718378 files 2020-04-02 00:27:57 -05:00
f0a581eadb files 2020-04-02 00:24:34 -05:00
aabf0ae6c1 moon file 2020-04-02 00:21:35 -05:00
d61245daf3 moon files 2020-04-02 00:18:02 -05:00
b5e1c7d100 moon data 2020-04-02 00:14:51 -05:00
4ba7812b9b moon data 2020-04-02 00:08:27 -05:00
98a6574596 moon data 2020-04-02 00:05:29 -05:00
61e051800b storage 2020-04-02 00:01:55 -05:00
77ed3d8f83 storage 2020-04-02 00:01:14 -05:00
8df497b356 storage linked 2020-04-02 04:59:36 +00:00
2169e0bd1a file storage 2020-04-01 23:58:27 -05:00
825cd9a9f0 moon formatter 2020-04-01 23:52:58 -05:00
ef280382a8 moon formatter 2020-04-01 23:51:20 -05:00
8e090379cc moon formatter 2020-04-01 23:50:16 -05:00
ca06012678 modified moon calc library 2020-03-31 20:47:43 -05:00
11c5414f44 modified moon calc library 2020-03-30 21:59:49 -05:00
f1dc70b963 modified moon calc library 2020-03-30 21:54:56 -05:00
be59d7100b update for all moons 2020-03-25 00:28:06 -05:00
b1786652ae update for all moons 2020-03-25 00:23:30 -05:00
f819b0318a moon blade 2020-03-25 00:18:29 -05:00
70c037d33d added legend to all moon page 2020-03-25 00:11:40 -05:00
7615cb8cf1 updated all moons coloring scheme for the page 2020-03-25 00:03:49 -05:00
6d10755f27 testing and updates 2020-03-24 23:52:20 -05:00
ee2160fa8a jump bridge helper 2020-03-11 00:23:43 -05:00
c5c4b7af5d moons admin controller update for mail for moon request approval or denial. 2020-03-09 20:49:52 -05:00
8b4408e6fd moons admin controller update for mail for moon request approval or denial. 2020-03-09 20:49:35 -05:00
0085f7deaf user search 2020-03-09 20:22:54 -05:00
9eae8bfff9 srp form 2020-03-08 17:10:14 -05:00
f6c1454ed5 srp form 2020-03-08 17:08:56 -05:00
7725c32567 srp paid out request form 2020-03-08 17:07:45 -05:00
3e854da56d srp once again 2020-03-08 16:49:49 -05:00
5ad0f3448f updated srp admin dashboard correctly i hope this time. 2020-03-08 16:46:43 -05:00
288ca42ee1 modifications to srp form 2020-03-07 20:54:12 -06:00
0f2e41a222 role middleware update 2020-03-06 21:02:32 -06:00
0a26a7f3c5 updated role middleware 2020-03-06 21:01:54 -06:00
07ad2d5be7 updated role middleware 2020-03-06 21:00:07 -06:00
a714d2bf21 updated role middleware 2020-03-06 20:59:37 -06:00
0c00eb9b2f updated role middleware 2020-03-06 20:59:04 -06:00
c5b3fb5c86 updated role middleware 2020-03-06 20:58:31 -06:00
feab4dd020 updated role middleware 2020-03-06 20:57:47 -06:00
a461e62bf8 updated role middleware 2020-03-06 20:57:08 -06:00
7368c137cc updated role middleware 2020-03-06 20:56:36 -06:00
5b131567f7 updated role middleware 2020-03-06 20:54:39 -06:00
f437a4128b updated role middleware 2020-03-06 20:52:54 -06:00
8962883e69 updated role middleware 2020-03-06 20:52:12 -06:00
9b465eb45f javascript test for srp admin dashboard 2020-03-06 20:27:46 -06:00
96211eef3a javascript test for srp admin dashboard 2020-03-06 20:27:06 -06:00
ea875b05a7 javascript test for srp admin dashboard 2020-03-06 20:25:40 -06:00
a55a99e5bb javascript test for srp admin dashboard 2020-03-06 20:24:40 -06:00
0df2cea80c javascript test for srp admin dashboard 2020-03-06 20:14:27 -06:00
9588b0ee34 javascript test for srp admin dashboard 2020-03-06 20:13:16 -06:00
4299ec13da javascript test for srp admin dashboard 2020-03-06 20:12:12 -06:00
fb44225163 javascript test for srp admin dashboard 2020-03-06 20:09:56 -06:00
f34da4ff5d javascript test for srp admin dashboard 2020-03-06 20:07:34 -06:00
30595d6c08 javascript test for srp admin dashboard 2020-03-06 19:49:25 -06:00
ae3147cec8 javascript test for srp admin dashboard 2020-03-06 19:48:41 -06:00
3f99f327f6 javascript test for srp admin dashboard 2020-03-06 19:47:38 -06:00
188ef7bff5 javascript test for srp admin dashboard 2020-03-06 19:46:47 -06:00
ff8b19c75b srp admin dashboard stuff 2020-03-06 19:16:23 -06:00
88697d30c5 srp admin dashboad fix 2020-03-06 18:59:03 -06:00
34448d56d2 srp admin dashboad fix 2020-03-06 18:54:51 -06:00
3de3e992f7 srp admin dashboad fix 2020-03-06 18:54:10 -06:00
7f1da17750 srp admin dashboad fix 2020-03-06 18:53:11 -06:00
18500aa23f srp admin dashboad fix 2020-03-06 18:51:14 -06:00
282bffa140 srp admin dashboad fix 2020-03-06 18:49:38 -06:00
517d7aa868 srp admin dashboad fix 2020-03-06 18:48:01 -06:00
e1c63db7a3 srp admin dashboard 2020-03-06 18:34:34 -06:00
b571781578 srp admin dashboard 2020-03-06 18:31:28 -06:00
4ae8a747b4 updated navbar for the admin side of things 2020-03-06 18:20:37 -06:00
91d46fe0a7 esi scope for scope controller 2020-03-04 21:22:58 -06:00
bc3a3e2f03 esi scope for scope controller 2020-03-04 21:21:09 -06:00
38e636c779 esi scope for scope controller 2020-03-04 21:16:50 -06:00
543b5be1c7 modified moons controller for the moons to check if something was reserved previously 2020-03-04 00:39:49 -06:00
3292b369de new command 2020-03-04 00:24:11 -06:00
b9044b077f miscellaneous modifications 2020-03-04 00:01:20 -06:00
cfe58f07a9 miscellaneous modifications 2020-03-03 23:57:34 -06:00
10254bfd6b miscellaneous modifications 2020-03-03 23:53:35 -06:00
842ae29199 miscellaneous modifications 2020-03-03 23:38:38 -06:00
358a99a8fb miscellaneous modifications 2020-03-03 23:35:52 -06:00
6ffcb83e1e cost code display for srp modifications 2020-03-03 22:08:57 -06:00
a2c8c14ef9 cost code display for srp modifications 2020-03-03 22:05:24 -06:00
c2ab369601 ship type update for srp 2020-03-03 22:04:13 -06:00
39caf1417e srp admin controller update 2020-03-03 21:33:02 -06:00
1723fc7258 srp admin controller update 2020-03-03 21:30:14 -06:00
5a03fc639b stuff 2020-03-02 22:03:56 -06:00
9641df10a7 admin moon controller 2020-03-02 22:01:38 -06:00
92e8a12f81 moon admin controller for approving or denying moon has been updated. 2020-03-02 21:56:08 -06:00
b91d477c26 moon admin controller for approving or denying moon has been updated. 2020-03-02 21:52:34 -06:00
39f215bea9 moon admin controller for approving or denying moon has been updated. 2020-03-02 21:39:06 -06:00
7c5ebac3d6 moon admin controller for approving or denying moon has been updated. 2020-03-02 21:38:22 -06:00
a2e8ea4ffd moon admin controller for approving or denying moon has been updated. 2020-03-02 21:37:02 -06:00
efb53579a8 moon reservations 2020-03-02 21:25:44 -06:00
fc57039c00 moon reservations 2020-03-02 21:24:02 -06:00
17eced109d moon reservations 2020-03-02 21:22:54 -06:00
34ca85a72e moon reservations 2020-03-02 21:20:39 -06:00
f0060c8442 moon reservations 2020-03-02 21:18:57 -06:00
6589486eca moon reservations 2020-03-02 21:14:29 -06:00
5a936d8364 moon reservations 2020-03-02 21:10:29 -06:00
602b85fcfd moon reservations 2020-03-02 21:09:26 -06:00
4a0f0d7c99 moon reservations 2020-03-02 21:07:24 -06:00
0a6f1d8f73 moon reservations 2020-03-02 21:07:03 -06:00
8c2008891f moon reservations 2020-03-02 21:06:38 -06:00
98bda601c5 moon reservations 2020-03-02 21:01:16 -06:00
22eadc832c lookup helper added to admin controller 2020-03-02 20:40:03 -06:00
577bb0e299 view update 2020-02-26 21:11:13 -06:00
01f2049399 view update 2020-02-26 21:10:24 -06:00
2981262277 updates to controllers for moon requests: 2020-02-26 21:09:42 -06:00
94adec97b2 updates to controllers for moon requests: 2020-02-26 21:09:09 -06:00
4652e293b1 updates to controllers for moon requests: 2020-02-26 21:04:55 -06:00
9c4d0bc46f controller update 2020-02-26 20:48:29 -06:00
c9dc812ff6 controller update 2020-02-26 20:47:37 -06:00
6b33141962 controller update 2020-02-26 20:46:23 -06:00
b4c5db6b79 controller update 2020-02-26 20:38:21 -06:00
33dec64955 controller update 2020-02-26 20:37:35 -06:00
84627eb0a6 update the routes 2020-02-26 20:26:33 -06:00
ef61dae0f1 moon display 2020-02-24 23:00:24 -06:00
dd5a26b959 moon display 2020-02-24 22:59:30 -06:00
49f513f025 moon display 2020-02-24 22:57:34 -06:00
f183738a62 moon display 2020-02-24 22:56:13 -06:00
7bf659c2f5 moon display 2020-02-24 22:50:25 -06:00
0c18935f20 moon display 2020-02-24 22:48:40 -06:00
66438d574e moon display 2020-02-24 22:45:12 -06:00
5217bb52ad moon requests layouts of functions 2020-02-24 00:50:34 -06:00
bea1b222ae moons controller 2020-02-24 00:46:55 -06:00
0013a92f6f moons controller 2020-02-24 00:46:26 -06:00
4557632b97 moons controller 2020-02-24 00:45:22 -06:00
e7029952c0 moons controller 2020-02-24 00:44:30 -06:00
ca04aa5e12 moons controller 2020-02-24 00:42:12 -06:00
96dbf70e59 moons controller 2020-02-24 00:38:55 -06:00
87a0d82980 moons controller 2020-02-24 00:37:28 -06:00
35f911b6d6 moons controller 2020-02-24 00:36:26 -06:00
d911bc32d0 moons controller 2020-02-24 00:35:13 -06:00
cb39026564 moons controller 2020-02-24 00:33:27 -06:00
e19157a60c moons controller 2020-02-24 00:32:53 -06:00
c2a5858967 moons controller 2020-02-24 00:32:21 -06:00
af6b1d198d moons controller 2020-02-24 00:31:46 -06:00
75dfaa21da moons controller 2020-02-24 00:31:10 -06:00
b8d46e1b26 moons controller 2020-02-24 00:30:37 -06:00
f0df3d577a moons controller 2020-02-24 00:28:45 -06:00
dc1220f443 moons controller 2020-02-24 00:28:00 -06:00
384a875945 moons controller 2020-02-24 00:26:31 -06:00
0f7c290cb6 moons controller 2020-02-24 00:25:04 -06:00
940892b3ab moons controller 2020-02-24 00:22:05 -06:00
a70e5b7e62 moons controller 2020-02-24 00:21:07 -06:00
018d1d73ec moons controller 2020-02-24 00:18:46 -06:00
ba1b9e8b01 moons controller 2020-02-24 00:15:37 -06:00
c41e6f54b8 moons controller 2020-02-24 00:13:08 -06:00
d78661cf02 moons controller 2020-02-24 00:12:15 -06:00
f2f427cce6 moons controller 2020-02-24 00:11:27 -06:00
c5283cfecd moons controller 2020-02-24 00:09:26 -06:00
a3e940fd79 moons controller 2020-02-24 00:07:58 -06:00
203b2085ef moons controller 2020-02-24 00:06:42 -06:00
12b6f0120b moons controller 2020-02-24 00:03:10 -06:00
e2a3794016 moons controller 2020-02-24 00:02:19 -06:00
34d0e062f3 moons controller 2020-02-24 00:00:04 -06:00
c8bca6d0de moons controller 2020-02-23 23:58:50 -06:00
1db723de19 moons controller 2020-02-23 23:55:36 -06:00
ab7e91e06d moons controller 2020-02-23 23:47:41 -06:00
50748ebdc9 moons controller 2020-02-23 23:41:06 -06:00
b3d708de0d moons controller 2020-02-23 23:32:12 -06:00
09cf7b46dd moons controller 2020-02-23 23:30:56 -06:00
52ebcf0041 moons controller 2020-02-23 22:52:42 -06:00
f1c3544fd2 moons controller 2020-02-23 22:51:57 -06:00
bc93af2cae moons controller 2020-02-23 22:51:01 -06:00
d14c097e30 moons controller 2020-02-23 22:49:53 -06:00
2fcbfb3cd3 moons controller 2020-02-23 22:45:38 -06:00
456d05fdcb moons controller 2020-02-23 22:45:04 -06:00
8072046773 moons controller 2020-02-23 22:44:36 -06:00
cb58fb6af5 moons controller 2020-02-23 22:40:05 -06:00
f8d16ddaaa moons controller 2020-02-23 22:37:45 -06:00
b78ce01f57 moons controller 2020-02-23 22:35:08 -06:00
6e7e4cd8f5 moons controller 2020-02-23 22:32:43 -06:00
8c199d8ee8 moons controller 2020-02-23 22:31:35 -06:00
9f3f4030dc moons controller 2020-02-23 22:15:09 -06:00
40b4cc0f63 moons controller 2020-02-23 22:12:26 -06:00
4cdff38675 moons controller 2020-02-23 22:07:22 -06:00
76f54226de moons controller 2020-02-23 20:46:27 -06:00
2c62f3018e moons controller 2020-02-23 20:45:45 -06:00
afe989f0e5 moons controller 2020-02-23 20:42:49 -06:00
cf357d9a5b moons controller 2020-02-23 20:41:27 -06:00
0f3b8652ef moons controller 2020-02-23 20:40:15 -06:00
42edfa8aa8 moons controller 2020-02-23 20:38:17 -06:00
013fa36513 moons controller 2020-02-23 20:36:39 -06:00
154d97c441 moons controller 2020-02-23 20:35:40 -06:00
a345b0a37e moons controller 2020-02-23 20:29:55 -06:00
67c864a357 moons controller 2020-02-23 20:29:11 -06:00
e36348b039 updated moons controller 2020-02-23 03:14:46 -06:00
62eda6a8e5 seeds 2020-02-23 03:13:41 -06:00
a22f5a1349 seeds 2020-02-23 03:13:01 -06:00
149e6472f3 spreadsheets 2020-02-23 02:58:32 -06:00
0da53b41c3 migration modification for alliance moons 2020-02-23 00:29:20 -06:00
1a91302ac8 all moons work 2020-02-23 00:20:04 -06:00
96bbb1afc3 updated blade for display moon mining ledger 2020-02-23 00:12:13 -06:00
b329e3a089 moon spreadsheet csv 2020-02-09 01:05:38 -06:00
e2e15a6877 moon spreadsheet csv 2020-02-09 01:05:10 -06:00
088812a7eb update moon removal 2020-02-09 00:14:11 -06:00
4ebb9a7a3f update moon removal 2020-02-09 00:12:38 -06:00
6db126e1f5 wormhole testing 2020-02-08 21:58:59 -06:00
8ced378e34 update on wormhole controller 2020-02-08 21:49:31 -06:00
adb52cd062 update on wormhole controller 2020-02-08 21:46:52 -06:00
942adcc721 black list update 2020-02-06 23:06:20 -06:00
d8fce0c18f updated comments for moon calc library 2020-02-04 23:48:38 -06:00
727bd30f84 moon calc update 2020-02-04 23:39:45 -06:00
aac90b4be8 renamed table from Prices to mineral_prices to be more descriptive 2020-02-04 23:17:36 -06:00
f9e69bfd24 moon calc 2020-02-04 23:14:26 -06:00
c96991739f moon calc 2020-02-04 23:11:38 -06:00
5c17e25e47 moon calc 2020-02-04 23:10:34 -06:00
8944219804 moon calc 2020-02-04 23:09:56 -06:00
4ec22e1917 moon calc 2020-02-04 23:09:14 -06:00
a3762a90ed moon calc 2020-02-04 23:06:59 -06:00
e827571eeb moon calc 2020-02-04 23:06:28 -06:00
d4f2834b75 dump autoload 2020-02-05 05:05:12 +00:00
a2c47b87b9 update database migration 2020-02-04 23:02:22 -06:00
f199d633b1 moon avg update 2020-02-04 23:00:03 -06:00
cd53f8515a removed tracker tables which are no longer wanted. 2020-02-04 21:32:14 -06:00
86a519eeaa removed unused console command 2020-02-04 21:25:42 -06:00
37f9b2a6e7 flex structure form 2020-02-04 00:57:54 -06:00
d7fdfab9f1 flex structure form 2020-02-04 00:46:57 -06:00
caaaa85354 flex structure form 2020-02-04 00:42:53 -06:00
52c93c9616 flex structure form 2020-02-04 00:40:25 -06:00
ed81bc72ef flex structure form 2020-02-04 00:25:34 -06:00
e72b06249e flex structure form 2020-02-04 00:21:41 -06:00
5e397c06c6 flex structure form 2020-02-04 00:05:45 -06:00
4f4cb8ee39 flex structure form 2020-02-04 00:04:58 -06:00
5ae722b6a4 flex structure form 2020-02-04 00:03:13 -06:00
84991d26a5 flex structure form 2020-02-04 00:02:28 -06:00
6f1bd0538a flex structure form 2020-02-03 23:59:04 -06:00
14880a54bb flex structure form 2020-02-03 23:57:08 -06:00
fac1da9a06 flex structure form 2020-02-03 23:55:49 -06:00
24f3751ab0 flex structure form 2020-02-03 23:53:58 -06:00
d76b8c965a moons and flex structures 2020-02-03 23:47:48 -06:00
1f2686ed28 moon update and flex structure update 2020-02-03 23:35:38 -06:00
4215dea758 dd issue 2020-02-03 22:36:44 -06:00
ccf89919f1 update moon issue 2020-02-02 12:53:20 -06:00
0184eebcd2 update moon issue 2020-02-02 12:51:12 -06:00
fa839e6046 update moon issue 2020-02-02 12:50:18 -06:00
bcafa912f0 update moon issue 2020-02-02 12:49:44 -06:00
cfc18d8ee2 update moon issue 2020-02-02 12:48:40 -06:00
7bf0c61066 preliminary spreadsheet for csv moons 2020-01-31 22:19:20 -06:00
ed4daeda4f modified moon mailer slightly 2020-01-31 21:30:28 -06:00
7a503e642a corrected a model 2020-01-31 21:29:37 -06:00
acbe6b6868 created mail helper and modified moon mailer 2020-01-31 21:29:06 -06:00
413388e7b4 eve mailer again 2020-01-31 21:03:30 -06:00
50c9e85b01 eve mailer again 2020-01-31 21:02:34 -06:00
06256f223c eve mailer again 2020-01-31 21:00:43 -06:00
ad421a809a fixed issue with assets call to reduce logs 2020-01-31 20:55:17 -06:00
7dbaa41389 added primary character default config setting 2020-01-31 20:52:54 -06:00
c1e0eb1b36 updated moon mailer to record mail sent when it's sent to eve api 2020-01-31 20:26:30 -06:00
8ea488209c updated moon mailer to record mail sent when it's sent to eve api 2020-01-31 20:21:43 -06:00
026f9b6a1d updated moon mailer to record mail sent when it's sent to eve api 2020-01-31 20:20:43 -06:00
606348f5db alliance moons spreadsheet conversion to services 2020-01-31 00:09:04 -06:00
a52d0453bb alliance moons spreadsheet conversion to services 2020-01-31 00:07:31 -06:00
2e396f4ec7 profile page update 2020-01-30 21:26:07 -06:00
3418cc6c90 profile page update 2020-01-30 21:25:42 -06:00
9b76f90725 profile page update 2020-01-30 21:25:12 -06:00
393a3c5842 removed unused file 2020-01-30 21:19:22 -06:00
9d75415ebd formatting for main page 2020-01-30 21:18:35 -06:00
60c0cf82d9 image for main page 2020-01-30 21:17:32 -06:00
d9dc35b543 image for main page 2020-01-30 21:17:08 -06:00
b9255b90ba image for main page 2020-01-30 21:15:46 -06:00
875b3ca090 image for main page 2020-01-30 21:13:00 -06:00
6474d7b9c2 image for main page 2020-01-30 21:12:20 -06:00
7a9f7c4c44 image for main page 2020-01-30 21:08:01 -06:00
19d000d3d0 image for main page 2020-01-30 21:04:25 -06:00
9fc4751e8b image for main page 2020-01-30 21:01:42 -06:00
61be896b08 image for main page 2020-01-30 21:00:23 -06:00
3f782dfc36 image for main page 2020-01-30 20:59:20 -06:00
d6e0b6715c image for main page 2020-01-30 20:56:46 -06:00
d09edd0e49 image for main page 2020-01-30 20:52:35 -06:00
464a32bf2a update moon modification 2020-01-03 18:27:04 -06:00
a6df57f087 update moon modification 2020-01-03 18:26:28 -06:00
f9960cc15e update moon modification 2020-01-03 18:25:39 -06:00
a31a7383a4 update moon modification 2020-01-03 18:25:05 -06:00
c90a352dee update moon modification 2020-01-03 18:24:16 -06:00
6a270146b7 update moon modification 2020-01-03 18:23:28 -06:00
d8a7ae1748 update moon modification 2020-01-03 18:21:36 -06:00
4d54225434 update moon modification 2020-01-03 18:14:35 -06:00
3c59ac6708 moon admin storing moon updated info modification and re-ordered functionality 2020-01-03 17:53:17 -06:00
c166eac472 updated updatemoon blade 2020-01-03 17:39:33 -06:00
f70e8ded6f moon mailer modification 2020-01-03 17:17:24 -06:00
bee4b637b9 moon mailer modification needs testing 2020-01-03 01:27:18 -06:00
7e7c3dc217 moon rental end 2019-12-29 20:47:24 -06:00
74d1c96ca6 moon rental end 2019-12-29 20:42:30 -06:00
a2d7747ed8 entity stuff for blacklist' 2019-12-28 23:56:14 -06:00
2d6108d7a8 entity stuff for blacklist' 2019-12-28 23:55:31 -06:00
cf3b444a87 entity stuff for blacklist' 2019-12-28 23:53:41 -06:00
7f54d992ea entity stuff for blacklist' 2019-12-28 23:51:41 -06:00
85da1351d1 entity stuff for blacklist' 2019-12-28 23:51:07 -06:00
16f94aac77 entity stuff for blacklist' 2019-12-28 23:46:58 -06:00
5fbea70f92 entity stuff for blacklist' 2019-12-28 23:45:28 -06:00
efe499456a entity stuff for blacklist' 2019-12-28 23:44:13 -06:00
0721850bd7 entity stuff for blacklist' 2019-12-28 23:43:39 -06:00
466febeb13 entity stuff for blacklist' 2019-12-28 23:40:04 -06:00
1f2d68600b entity stuff for blacklist' 2019-12-28 23:34:08 -06:00
e54a2c1c5f entity stuff for blacklist' 2019-12-28 23:27:54 -06:00
d38bd692af entity stuff for blacklist' 2019-12-28 23:23:15 -06:00
eaa7281374 black list entity stuff 2019-12-28 23:19:30 -06:00
38947493a1 moons admin controller 2019-12-28 15:54:05 -06:00
f27e24e746 structure request form 2019-12-28 15:05:07 -06:00
dc042d982c structure request form 2019-12-28 15:03:04 -06:00
c0b1db3ea1 structure request form 2019-12-28 15:02:03 -06:00
ee631b5e5e structure requeust form 2019-12-28 14:59:37 -06:00
8fecd0ab7c flex structure command 2019-12-25 23:53:37 -06:00
e332d4e55d flex structure issue 2019-12-25 23:52:07 -06:00
2367438d2e flex structure issue 2019-12-25 23:51:13 -06:00
1fd0103a43 flex structure issue 2019-12-25 23:49:49 -06:00
55cba30f17 flex structure issue 2019-12-25 23:48:57 -06:00
3af4db41ac flex structure issue 2019-12-25 23:47:53 -06:00
dee4e0d751 removed some stuff 2019-12-26 05:34:24 +00:00
0b587aaec6 didn't like tracker will create own middleware 2019-12-25 23:31:01 -06:00
5261645c40 tracker junk 2019-12-25 23:26:56 -06:00
e6a15c04c8 tracker stuff 2019-12-25 23:21:33 -06:00
3b04fff2c8 removing unused classes 2019-12-25 23:10:22 -06:00
fcfff0be06 tracking stuff 2019-12-26 05:03:41 +00:00
add7f637ee git ignore 2019-12-25 01:27:23 -06:00
d4b64055d0 file cleanup 2019-12-25 06:39:54 +00:00
dbfdc41029 file cleanup 2019-12-25 00:39:00 -06:00
22d5d4692d contract controller lookup updated 2019-12-24 23:36:02 -06:00
896b3bb13a lookup fix 2019-12-24 23:31:15 -06:00
120e9b6304 added some sorting time to the mining ledger 2019-12-24 23:28:58 -06:00
7d31230870 added some sorting time to the mining ledger 2019-12-24 23:28:26 -06:00
332c093820 added some sorting time to the mining ledger 2019-12-24 23:27:56 -06:00
eabf2373fb added some sorting time to the mining ledger 2019-12-24 23:27:07 -06:00
35de697cde added some sorting time to the mining ledger 2019-12-24 23:26:30 -06:00
24fc7cf3e2 added some sorting time to the mining ledger 2019-12-24 23:24:43 -06:00
cdd9bd53ae added some sorting time to the mining ledger 2019-12-24 23:23:47 -06:00
4dd667bcb2 added some sorting time to the mining ledger 2019-12-24 23:22:48 -06:00
7056d40449 added some sorting time to the mining ledger 2019-12-24 23:20:02 -06:00
6bf2a1d733 added some sorting time to the mining ledger 2019-12-24 23:17:05 -06:00
de8da1ab15 added some sorting time to the mining ledger 2019-12-24 23:15:12 -06:00
685e38818b item lookup 2019-12-24 22:37:29 -06:00
9fb6ce40ba wiki dashboard testing 2019-12-21 20:33:45 -06:00
b2fb22a890 wiki dashboard testing 2019-12-21 19:46:13 -06:00
4be9e32e8a wiki dashboard testing 2019-12-21 19:38:34 -06:00
567e303394 wiki dashboard testing 2019-12-21 19:37:11 -06:00
db5b4085ca wiki dashboard testing 2019-12-21 19:34:35 -06:00
25c77a8ee0 asort for wiki dashboard 2019-12-21 19:33:54 -06:00
30333873ca wiki blade 2019-12-21 04:17:27 -06:00
523bbf013f admin controller for the wiki dashboard 2019-12-21 04:07:26 -06:00
0cedb506c9 display wiki dashboard 2019-12-21 03:23:42 -06:00
9aeaa0231a admin controller 2019-12-21 02:58:06 -06:00
d4b2d3f05b wiki blade 2019-12-21 02:49:49 -06:00
2de8d78094 wiki blade 2019-12-21 02:48:52 -06:00
af3da4d5a0 web routes 2019-12-21 02:47:14 -06:00
5686665255 added library to admin controller 2019-12-21 02:38:50 -06:00
a257bd79b5 admin controller for the wiki testing 2019-12-21 02:37:22 -06:00
fff53c312b admin controller 2019-12-21 02:36:33 -06:00
770994cf22 modifying wiki blade 2019-12-21 02:27:00 -06:00
88964a36dc wiki blade 2019-12-21 02:25:41 -06:00
dbb6d57d7c web routes 2019-12-21 02:24:21 -06:00
7ac12d3278 wiki dashboard 2019-12-21 02:16:10 -06:00
65ef5695d5 navbar 2019-12-20 23:41:43 -06:00
00513e1eef Admin Wiki Dashboard 2019-12-20 23:20:42 -06:00
472fd7f49f creating new wiki section for admin dashboard 2019-12-20 01:54:20 -06:00
0162ee44ef wiki helper stuff 2019-12-20 01:47:11 -06:00
0721e41d5a wiki helper 2019-12-19 01:31:22 -06:00
499a0dfbd8 login controller 2019-12-14 22:17:25 -06:00
cb39cda33e wormhole form modification 2019-12-12 19:36:59 -06:00
e0f1aefa73 re-ordered routes page 2019-12-12 19:26:12 -06:00
6a6100f11f dump autoload 2019-12-13 01:24:46 +00:00
1a40c9038b routes update 2019-12-12 19:20:09 -06:00
18ca40fac7 modified navbar 2019-12-12 18:33:52 -06:00
c630cd0e59 moved journal for wallet to admin dashboard 2019-12-12 18:31:54 -06:00
297f041a0e upddated variable to be correct in wormhole controller 2019-12-12 18:09:15 -06:00
308164f7f4 cleaned up AvailableUserPermissions seeder 2019-12-12 18:05:27 -06:00
29c1986204 removing a bunch of unused tables in the database 2019-12-12 18:04:33 -06:00
95e58ab6d1 removed process corp journal job as it was no longer being utilized 2019-12-12 17:36:51 -06:00
42c70759d0 set caching to null for finance helper 2019-12-12 01:04:54 -06:00
8055e5ee60 added no caching to journal 2019-12-12 01:04:18 -06:00
4462e13533 esi lookup helper 2019-12-12 00:42:28 -06:00
a210eb5e81 esi lookup helper 2019-12-12 00:39:28 -06:00
dd8f85a356 esi lookup helper 2019-12-12 00:37:03 -06:00
b3db5ab69f esi lookup helper 2019-12-12 00:32:44 -06:00
e7a7bd32ef esi lookup helper 2019-12-12 00:31:40 -06:00
9c36a10864 esi lookup helper 2019-12-12 00:29:22 -06:00
766236a78c esi lookup helper 2019-12-12 00:26:20 -06:00
98669eae02 esi lookup helper 2019-12-12 00:25:48 -06:00
de9c20ac58 esi issue 2019-12-12 00:23:03 -06:00
1ae5a6fcec esi issue 2019-12-12 00:21:39 -06:00
f852eb5631 esi issue 2019-12-12 00:20:37 -06:00
1956a1db11 esi issue 2019-12-12 00:20:03 -06:00
4ceff1c046 stupid shit 2019-12-12 00:17:15 -06:00
91f9b318ad stupid shit 2019-12-12 00:16:26 -06:00
5205184d6e damn lookup helper 2019-12-12 00:15:09 -06:00
15139add20 damn lookup helper 2019-12-12 00:10:54 -06:00
d20f59313d test controller 2019-12-12 00:09:04 -06:00
5307758ebe test controller 2019-12-12 00:08:33 -06:00
5ded4dc3a3 test controller 2019-12-12 00:07:42 -06:00
87f405d57e test controller 2019-12-12 00:07:08 -06:00
3bb922955e test controller 2019-12-12 00:06:34 -06:00
04b58ece21 test controller 2019-12-12 00:06:04 -06:00
afb145aac1 test controller 2019-12-12 00:04:39 -06:00
ed419ada89 test controller 2019-12-12 00:03:43 -06:00
fff6bdd624 test controller 2019-12-12 00:02:50 -06:00
c56264b130 test controller 2019-12-12 00:02:28 -06:00
92f1de9155 test controller 2019-12-12 00:01:20 -06:00
826294b438 made a test 2019-12-11 23:59:59 -06:00
198c338892 modified the way characters are looked up in the database versus esi 2019-12-11 23:52:22 -06:00
36cbac5070 modified the way characters are looked up in the database versus esi 2019-12-11 23:49:04 -06:00
733841cfc1 modified the way characters are looked up in the database versus esi 2019-12-11 23:47:24 -06:00
3484ebf04e modified the way characters are looked up in the database versus esi 2019-12-11 23:46:53 -06:00
b50a9b5406 modified the way characters are looked up in the database versus esi 2019-12-11 23:45:50 -06:00
21a85add82 modified the way characters are looked up in the database versus esi 2019-12-11 23:44:24 -06:00
e6173a7f17 removed corp market structures as it's no longer used 2019-12-11 23:25:50 -06:00
89f614fe77 Merge branch 'master' of https://github.com/drkthunder02/w4rpservices 2019-12-11 23:13:41 -06:00
ac65d8423b removed var directory which hasn't been used for more than 10 months 2019-12-11 23:13:27 -06:00
c8fe6053cf Update .env 2019-12-11 23:12:05 -06:00
86993f455c Update .env 2019-12-11 23:11:01 -06:00
502aa59192 git ignore 2019-12-11 23:09:36 -06:00
e209a2bdc5 git ignore 2019-12-11 23:08:07 -06:00
a3d3a2649d modified something 2019-12-11 23:07:47 -06:00
336077d24d modified git ignore 2019-12-11 23:05:09 -06:00
487187cbb5 removed cache stuff 2019-12-11 23:04:46 -06:00
8c1061f34d git ignore change 2019-12-11 22:42:05 -06:00
2fecc22822 dump-autoload 2019-12-12 04:40:40 +00:00
b45b11f927 removed unused functions 2019-12-11 22:40:00 -06:00
32cfb6b93c removed some unused classes 2019-12-11 22:37:06 -06:00
4848ef379a empty jump bridges tables 2019-12-11 22:27:31 -06:00
a52b17985e empty jump bridges tables 2019-12-11 22:26:58 -06:00
8c87e1433c empty jump bridges tables 2019-12-11 22:26:29 -06:00
1a6577539f empty jump bridges tables 2019-12-11 22:25:37 -06:00
7a5da1e4c2 added new command to artisan 2019-12-11 22:17:38 -06:00
9b71df8ee4 empty jump bridges service command 2019-12-11 22:16:24 -06:00
c201578191 lookup helper 2019-12-11 21:57:38 -06:00
a1ced2ace6 failed exception stuff 2019-12-11 21:49:54 -06:00
9e47568e67 converting all lookup functions to the new lookup helper 2019-12-11 21:23:13 -06:00
55225fdea3 cleaning stale data console command modified 2019-12-11 20:36:19 -06:00
8447319514 mining ledger troubleshooting 2019-12-10 00:45:17 -06:00
a2b54aee0f mining ledger troubleshooting 2019-12-10 00:43:48 -06:00
99c736660d mining ledger troubleshooting 2019-12-10 00:34:10 -06:00
4e97b0964f mining ledger troubleshooting 2019-12-10 00:25:29 -06:00
2f404bee72 mining ledger troubleshooting 2019-12-10 00:22:12 -06:00
581fb45795 mining ledger troubleshooting 2019-12-10 00:21:18 -06:00
afa2a45fe9 mining ledger troubleshooting 2019-12-10 00:20:19 -06:00
dae302f6e3 mining ledger troubleshooting 2019-12-10 00:19:34 -06:00
583769ff5f mining ledger troubleshooting 2019-12-10 00:16:57 -06:00
2d1c6e5ed4 mining ledger troubleshooting 2019-12-10 00:15:12 -06:00
90ae3117ab mining ledger troubleshooting 2019-12-10 00:14:07 -06:00
e7d98028a3 mining ledger troubleshooting 2019-12-10 00:12:07 -06:00
2e785222e9 mining ledger troubleshooting 2019-12-10 00:09:44 -06:00
4c9bc24ac7 mining ledger troubleshooting 2019-12-10 00:08:04 -06:00
7498657419 mining ledger troubleshooting 2019-12-10 00:06:55 -06:00
b24b0e553d mining ledger troubleshooting 2019-12-10 00:05:21 -06:00
3ccee32232 mining ledger troubleshooting 2019-12-10 00:04:27 -06:00
cdabb5772d mining ledger troubleshooting 2019-12-10 00:03:35 -06:00
5ca78942d1 mining ledger troubleshooting 2019-12-10 00:02:58 -06:00
485d2b01e3 mining ledger troubleshooting 2019-12-09 23:58:55 -06:00
1748dad9ea mining ledger troubleshooting 2019-12-09 23:57:43 -06:00
6d38990fd3 mining ledger troubleshooting 2019-12-09 23:55:49 -06:00
f0255af222 mining ledger troubleshooting 2019-12-09 23:55:02 -06:00
0a2e94d3d7 mining ledger troubleshooting 2019-12-09 23:54:34 -06:00
241a73c2d0 mining ledger troubleshooting 2019-12-09 23:53:52 -06:00
738b916ab5 mining ledger troubleshooting 2019-12-09 23:53:14 -06:00
7189773694 mining ledger troubleshooting 2019-12-09 23:52:21 -06:00
7e626a2ad1 mining ledger troubleshooting 2019-12-09 23:51:11 -06:00
93a1f568c8 mining ledger troubleshooting 2019-12-09 23:50:41 -06:00
34da40dc59 mining ledger troubleshooting 2019-12-09 23:49:43 -06:00
f0395fa6a9 mining ledger troubleshooting 2019-12-09 23:48:36 -06:00
3ca9dcbb88 mining ledger troubleshooting 2019-12-09 23:46:23 -06:00
0204f19541 mining ledger troubleshooting 2019-12-09 23:43:56 -06:00
eea884e11a mining ledger troubleshooting 2019-12-09 23:43:25 -06:00
cf55c4809c mining ledger troubleshooting 2019-12-09 23:42:52 -06:00
ea9a2776b7 mining ledger troubleshooting 2019-12-09 23:41:36 -06:00
ec95c84d87 mining ledger troubleshooting 2019-12-09 23:41:06 -06:00
677469e112 mining ledger troubleshooting 2019-12-09 23:39:51 -06:00
c0237ab13c mining ledger troubleshooting 2019-12-09 23:39:00 -06:00
90c6c629d3 updated dependencies 2019-12-10 05:37:33 +00:00
525b34d28c troubleshooting moon mining ledger 2019-12-09 23:32:04 -06:00
b137c41d7a troubleshooting moon mining ledger 2019-12-09 23:31:23 -06:00
8e72fbdc0e troubleshooting moon mining ledger 2019-12-09 23:29:04 -06:00
b14301711b troubleshooting moon mining ledger 2019-12-09 23:27:07 -06:00
3d4dd88c07 troubleshooting moon mining ledger 2019-12-09 23:26:22 -06:00
2b2db423a0 troubleshooting moon mining ledger 2019-12-09 22:37:14 -06:00
8087102482 troubleshooting moon mining ledger 2019-12-09 22:36:33 -06:00
5ccd44de5d troubleshooting moon mining ledger 2019-12-09 22:36:00 -06:00
389c0bcd9a troubleshooting moon mining ledger 2019-12-09 22:35:14 -06:00
c9a99eecc1 troubleshooting moon mining ledger 2019-12-09 22:32:03 -06:00
8c4851b831 scopes 2019-12-09 22:24:51 -06:00
ce75c5ee47 mining ledger routes 2019-12-09 22:16:50 -06:00
f4be75e116 mining ledger 2019-12-09 22:16:07 -06:00
a3dc388abb item lookup 2019-12-09 01:55:47 -06:00
d700910cfd Merge branch 'master' of https://github.com/drkthunder02/w4rpservices 2019-12-08 22:58:42 -06:00
e9adf4fa4b remove moon logistics 2019-12-08 22:58:25 -06:00
0f4cd267f2 contracts update 2019-12-07 13:41:20 -06:00
4fc5b437ae contracts update 2019-12-07 13:39:25 -06:00
5635fbf57b blacklist search 2019-12-06 22:34:24 -06:00
a2b6a9198f blacklist search 2019-12-06 22:32:55 -06:00
b064f73b12 results for blacklist search 2019-12-06 22:25:56 -06:00
82580edb8c results for blacklist search 2019-12-06 22:23:50 -06:00
3cbb3bd26f results for blacklist search 2019-12-06 22:23:02 -06:00
31104d7f62 results for blacklist search 2019-12-06 22:19:19 -06:00
bea6cac46b results for blacklist search 2019-12-06 22:18:28 -06:00
479492726a results for blacklist search 2019-12-06 22:17:34 -06:00
957c947929 results for blacklist search 2019-12-06 22:16:23 -06:00
b042286edb results for blacklist search 2019-12-06 22:15:59 -06:00
8459660d90 results for blacklist search 2019-12-06 22:14:51 -06:00
45763a4223 results for blacklist search 2019-12-06 22:13:54 -06:00
8b1093d552 results for blacklist search 2019-12-06 22:12:12 -06:00
b341801e16 navbar 2019-12-06 22:06:09 -06:00
153e17ee4a flex list blade 2019-12-06 21:57:22 -06:00
b642ab0379 flex list blade 2019-12-06 21:56:27 -06:00
69121d25f3 flex list blade 2019-12-06 21:54:46 -06:00
b317fce919 seeder 2019-12-06 21:49:10 -06:00
a538c3cf9b migration 2019-12-06 21:48:31 -06:00
d95b3ba9f7 seeder 2019-12-06 21:46:48 -06:00
fde6190226 lookup helper correction 2019-12-06 21:41:33 -06:00
bb1d986113 lookup helper correction 2019-12-06 21:40:45 -06:00
ebb3789d51 controller error correction 2019-12-06 21:39:35 -06:00
43b5f579c3 controller error correction 2019-12-06 21:38:02 -06:00
9ef5ff1dac controller error correction 2019-12-06 21:37:21 -06:00
d41d678df3 controller error correction 2019-12-06 21:34:48 -06:00
3c43289e98 solar system seeder and flex structure views 2019-12-06 21:33:16 -06:00
b78675718d flex structures before testing 2019-12-06 21:19:17 -06:00
5038eed34e flex structure registry framework 2019-12-04 23:18:04 -06:00
fbfb79c328 updated default reason for blacklist. 2019-12-04 20:36:30 -06:00
de14043c5c update for default value for reason for blacklist. 2019-12-04 20:34:22 -06:00
eb0d1364b8 message 2019-12-01 04:19:49 -06:00
ddcd082fee message 2019-12-01 04:13:42 -06:00
eef64b414e message 2019-12-01 04:07:50 -06:00
410f28a4c3 message 2019-12-01 04:04:28 -06:00
4918e49b3f message 2019-12-01 04:03:32 -06:00
f2212f5e9d message 2019-12-01 03:59:23 -06:00
52937d4d51 message 2019-12-01 03:58:38 -06:00
67b9f10156 message 2019-12-01 03:57:54 -06:00
11c9bd6a32 message 2019-12-01 03:54:16 -06:00
0ab18c9ebe message 2019-12-01 03:53:49 -06:00
6e12870182 message 2019-12-01 03:52:20 -06:00
aaab8310b8 message 2019-12-01 03:51:04 -06:00
829eb8428d modified blacklist redirect after adding 2019-12-01 03:49:32 -06:00
9c927e025d added alts box to blacklist 2019-12-01 03:35:48 -06:00
43e5ca50a6 stuff 2019-12-01 03:12:26 -06:00
b5da5dbde6 stuff 2019-12-01 03:11:47 -06:00
75c3f2a522 stuff 2019-12-01 03:10:24 -06:00
4932d4d8e7 stuff 2019-12-01 03:08:53 -06:00
c5d7c2b05a database 2019-12-01 03:05:07 -06:00
54cd34d0b9 database 2019-12-01 03:03:46 -06:00
cd5d844d25 stuff 2019-12-01 03:02:26 -06:00
790fc6a042 stuff 2019-12-01 02:59:18 -06:00
d16e028276 blacklist 2019-12-01 02:55:48 -06:00
6b3df0e5bd blacklist 2019-12-01 02:51:26 -06:00
321991b4b8 blacklist 2019-12-01 02:45:55 -06:00
f33d1b5407 user redirect 2019-12-01 02:35:56 -06:00
eab7ac809d user redirect 2019-12-01 02:33:53 -06:00
61bd162177 pagination testing 2019-12-01 02:30:22 -06:00
2677bc6eb7 blacklist modification 2019-12-01 02:16:34 -06:00
4b3f4e84a7 blacklist modification 2019-12-01 02:13:40 -06:00
18239d4b79 blacklist modification 2019-12-01 02:11:40 -06:00
5f6c8f4085 blacklist modification 2019-12-01 02:10:33 -06:00
0f59440ce4 autoload 2019-12-01 02:04:23 -06:00
c11b774c63 blacklist features 2019-12-01 02:02:52 -06:00
cd86a66b0e removed logistics contracts and extra models as they weren't utilized. 2019-12-01 01:36:49 -06:00
c400f78398 removed an unused controller 2019-12-01 01:35:06 -06:00
d3d06806a3 updated php and composer for 7.3 in apache 2019-12-01 07:25:02 +00:00
8c8ff49513 fixed ambiguous resolution 2019-12-01 01:01:37 -06:00
b7bdd265c6 composer update 2019-12-01 00:58:57 -06:00
a5fdc49548 composer dump-autoload 2019-12-01 00:47:50 -06:00
9c8e38e469 removed pi transaction job 2019-12-01 00:42:17 -06:00
3115ab75a5 composer update 2019-12-01 06:37:45 +00:00
fa199eef05 removed pi transactions from admin dashboard taxes display 2019-12-01 00:28:01 -06:00
c65653ef1e modified schedule to remove PI transacitons. 2019-12-01 00:26:06 -06:00
0fb0cca948 changed removed user stuff 2019-11-19 22:58:20 -06:00
10acc10a16 testing 2019-11-07 00:36:21 -06:00
3a40a92573 testing 2019-11-07 00:34:56 -06:00
17e4ee9603 testing 2019-11-07 00:30:38 -06:00
2c8bc106fb testing 2019-11-07 00:24:52 -06:00
0cb3698fe6 testing 2019-11-07 00:21:39 -06:00
9928727bd7 testing 2019-11-07 00:21:10 -06:00
2455899373 testing 2019-11-07 00:19:35 -06:00
8d0736e54c testing 2019-11-07 00:19:19 -06:00
096378bdd3 testing 2019-11-07 00:17:15 -06:00
863c7080d3 testing 2019-11-07 00:16:00 -06:00
09ea2a5511 testing 2019-11-07 00:15:30 -06:00
77dd47c435 testing 2019-11-07 00:07:49 -06:00
a7dd4f3c20 testing 2019-11-07 00:06:54 -06:00
6ea342d983 testing 2019-11-07 00:05:52 -06:00
d59b35df11 testing 2019-11-07 00:05:16 -06:00
5bb4068dbc testing 2019-11-07 00:04:36 -06:00
4dba3fa998 testing 2019-11-07 00:03:59 -06:00
ca69b278c2 testing 2019-11-06 23:57:10 -06:00
245a73b5b0 testing 2019-11-06 23:42:10 -06:00
66e52c52bd testing 2019-11-06 23:41:13 -06:00
b18b68d124 testing 2019-11-06 23:37:51 -06:00
04faa42987 testing 2019-11-06 23:21:54 -06:00
93db789a0f testing 2019-11-06 23:21:12 -06:00
f48f75ab79 testing 2019-11-06 23:19:08 -06:00
088488bb3a testing 2019-11-06 23:18:13 -06:00
8cacabf1c9 rearranged navbar 2019-11-06 23:16:44 -06:00
e3e9d39858 moon calc display total worth 2019-11-06 23:12:44 -06:00
c980326a4e Merge branch 'master' of https://github.com/drkthunder02/w4rpservices 2019-11-06 23:01:47 -06:00
e203f6e0d5 srp history 2019-11-06 23:01:31 -06:00
1922c88306 moons controller 2019-10-29 15:22:05 -05:00
dc8179a23a web update 2019-10-29 13:20:18 -05:00
28b9f0734a adding compositions to display total worth page 2019-10-29 13:19:33 -05:00
12688 changed files with 1253236 additions and 411088 deletions

33
.env
View File

@@ -2,7 +2,7 @@ APP_NAME='W4RP Services'
APP_ENV=local
APP_KEY=base64:PBOxrGFJAtwj9SDF4F0DZ1J+6MjrJmRiPZJQwRdy3XQ=
APP_DEBUG=true
APP_URL=http://localhost
APP_URL=https://services.w4rp.space
LOG_CHANNEL=daily
@@ -10,14 +10,16 @@ DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=w4rpservices2
DB_USERNAME=username
DB_PASSWORD=password
DB_USERNAME=minerva
DB_PASSWORD=FuckingShit12
BROADCAST_DRIVER=log
CACHE_DRIVER=file
CACHE_DRIVER=redis
CACHE_PREFIX=w4rpservices_cache
QUEUE_DRIVER=redis
QUEUE_CONNECTION=sync
QUEUE_CONNECTION=redis
QUEUE_PREFIX=w4rpservices_queue
SESSION_DRIVER=file
SESSION_LIFETIME=120
@@ -25,6 +27,8 @@ SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
REDIS_DATABASE=0
REDIS_CACHE_DB=1
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
@@ -33,20 +37,11 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
ESI_CLIENT_ID=e5848fea3618427a8ee0dccb6a04fc62
ESI_SECRET_KEY=TdnNGRM8RTNSifZdaIc9yHTTkYPgYEEXHRIbT6oY
ESI_CLIENT_ID=91a051aea72742068b51801042397c38
ESI_SECRET_KEY=1co6qRMoXyx1dG2iBbAZ1z6NUOoaJWyQnqEnsqoj
ESI_USERAGENT='W4RP Services'
ESI_CALLBACK_URI='http://services.w4rp.space/callback'
ESI_CALLBACK_URI=https://services.w4rp.space/callback/
ESI_PRIMARY_CHAR=93738489
ESI_ALLIANCE=99004116
EVEONLINE_CLIENT_ID=e5848fea3618427a8ee0dccb6a04fc62
EVEONLINE_CLIENT_SECRET=TdnNGRM8RTNSifZdaIc9yHTTkYPgYEEXHRIbT6oY
EVEONLINE_REDIRECT='https://services.w4rp.space/callback'
HORIZON_PREFIX=w4rpservices_horizon

9
.gitignore vendored
View File

@@ -1,6 +1,11 @@
/node_modules
/logs
.editorconfig
/.editorconfig
/cache
/public/logs
/public/logs/*
worker.log
/public/cache/*
.env
.vscode
/storage/logs
worker.log

View File

@@ -1,21 +0,0 @@
<?php
namespace App\Charts;
//Internal Library
use ConsoleTVs\Charts\Classes\ChartJs\Chart;
class StructureFuelGauge extends Chart
{
/**
* Initializes the chart.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
}

View File

@@ -1,120 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use DB;
use Log;
//Job
use App\Jobs\ProcessAssetsJob;
//Library
use App\Library\Esi\Esi;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
use Commands\Library\CommandHelper;
use App\Library\Assets\AssetHelper;
//Models
use App\Models\Jobs\JobProcessAsset;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
class GetAssetsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:GetAssets';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Gets all of the assets of the holding corporation.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$assets = null;
$pages = 0;
//Create the command helper container
$task = new CommandHelper('GetAssets');
//Add the entry into the jobs table saying the job is starting
$task->SetStartStatus();
//Setup the esi authentication container
$config = config('esi');
//Declare some variables
$charId = $config['primary'];
$corpId = 98287666;
//ESI Scope Check
$esiHelper = new Esi();
$assetScope = $esiHelper->HaveEsiScope($config['primary'], 'esi-assets.read_corporation_assets.v1');
if($assetScope == false) {
Log::critical("Scope check for esi-assets.read_corporation_assets.v1 failed.");
return null;
}
// Disable all caching by setting the NullCache as the
// preferred cache handler. By default, Eseye will use the
// FileCache.
$configuration = Configuration::getInstance();
$configuration->cache = NullCache::class;
//Get the refresh token from the database
$token = $esiHelper->GetRefreshToken($charId);
//Create the authentication container
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token,
]);
$esi = new Eseye($authentication);
try {
$assets = $esi->page(1)
->invoke('get', '/corporations/{corporation_id}/assets/', [
'corporation_id' => $corpId,
]);
} catch (RequestFailedException $e) {
Log::critical("Failed to get asset list.");
return null;
}
$pages = $assets->pages;
for($i = 1; $i <= $pages; $i++) {
$job = new JobProcessAsset;
$job->charId = $charId;
$job->corpId = $corpId;
$job->page = $i;
ProcessAssetsJob::dispatch($job)->onQueue('assets');
}
}
}

View File

@@ -1,84 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use DB;
use Commands\Library\CommandHelper;
use App\Models\Corporation\AllianceCorp;
use App\Models\ScheduledTask\ScheduleJob;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
class GetCorpsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:GetCorps';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get corporations in alliance and store in db.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Create the command helper container
$task = new CommandHelper('CorpJournal');
//Add the entry into the jobs table saying the job is starting
$task->SetStartStatus();
//Create the ESI container
$esi = new Eseye();
//try the esi call to get all of the corporations in the alliance
try {
$corporations = $esi->invoke('get', '/alliances/{alliance_id}/corporations/', [
'alliance_id' => 99004116,
]);
} catch(\Seat\Eseye\Exceptions\RequestFailedException $e){
dd($e->getEsiResponse());
}
//Delete all of the entries in the AllianceCorps table
DB::table('AllianceCorps')->delete();
foreach($corporations as $corp) {
try {
$corpInfo = $esi->invoke('get', '/corporations/{corporation_id}/', [
'corporation_id' => $corp,
]);
} catch(\Seat\Eseye\Exceptions\RequestFailedException $e) {
return $e->getEsiResponse();
}
$entry = new AllianceCorp;
$entry->corporation_id = $corp;
$entry->name = $corpInfo->name;
$entry->save();
}
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -1,9 +1,25 @@
<?php
namespace App\Console\Commands;
namespace App\Console\Commands\Data;
//Internal Library
use Illuminate\Console\Command;
use Commands\Library\CommandHelper;
use Carbon\Carbon;
use Log;
//Models
use App\Models\Lookups\AllianceLookup;
use App\Models\Lookups\CharacterLookup;
use App\Models\Lookups\CorporationLookup;
use App\Models\Lookups\ItemLookup;
use App\Models\Finances\AllianceMarketJournal;
use App\Models\Finances\JumpBridgeJournal;
use App\Models\Finances\OfficeFeesJournal;
use App\Models\Finances\PISaleJournal;
use App\Models\Finances\PlanetProductionTaxJournal;
use App\Models\Finances\ReprocessingTaxJournal;
use App\Models\Finances\SovBillJournal;
use App\Models\Finances\StructureIndustryTaxJournal;
class CleanStaleDataCommand extends Command
{
@@ -12,7 +28,7 @@ class CleanStaleDataCommand extends Command
*
* @var string
*/
protected $signature = 'services:CleanData';
protected $signature = 'data:CleanData';
/**
* The console command description.
@@ -38,7 +54,119 @@ class CleanStaleDataCommand extends Command
*/
public function handle()
{
$command = new CommandHelper;
$command->CleanJobStatusTable();
//Empty the item lookup table
ItemLookup::truncate();
//Empty the character lookup table
CharacterLookup::truncate();
//Empty the corporation lookup table
CorporationLookup::truncate();
//Empty the alliance lookup table
AllianceLookup::truncate();
//Setup today's carbon date
$today = Carbon::now();
$ago = $today->subMonths(6);
//Clean old data from the Alliance Market Tax Journal
$markets = AllianceMarketJournal::all();
foreach($markets as $market) {
$date = new Carbon($market->created_at);
if($date->lessThan($ago)) {
AllianceMarketJournal::where([
'id' => $market->id,
])->delete();
}
}
//Clean old data from Jump Bridge Journal
$jumps = JumpBridgeJournal::all();
foreach($jumps as $jump) {
$date = new Carbon($jump->created_at);
if($date->lessThan($ago)) {
JumpBridgeJournal::where([
'id' => $jump->id,
])->delete();
}
}
//Clean old data from office fees journal
$offices = OfficeFeesJournal::all();
foreach($offices as $office) {
$date = new Carbon($office->created_at);
if($date->lessThan($ago)) {
OfficeFeesJournal::where([
'id' => $office->id,
])->delete();
}
}
//Clean old data from pi sale journal
$pisales = PISaleJournal::all();
foreach($pisales as $sale) {
$date = new Carbon($sale->created_at);
if($date->lessThan($ago)) {
PISaleJournal::where([
'id' => $sale->id,
])->delete();
}
}
//Clean old data from planet production tax journal
$pis = PlanetProductionTaxJournal::all();
foreach($pis as $pi) {
$date = new Carbon($pi->created_at);
if($date->lessThan($ago)) {
PlanetProductionTaxJournal::where([
'id' => $pi->id,
])->delete();
}
}
//Clean old data from player donation journal
$donations = PlayerDonationJournal::all();
foreach($donations as $donation) {
$date = new Carbon($donation->created_at);
if($date->lessThan($ago)) {
PlayerDonationJournal::where([
'id' => $donation->id,
])->delete();
}
}
//Clean old data from Reprocessing Tax Journal
$reps = ReprocessingTaxJournal::all();
foreach($reps as $rep) {
$date = new Carbon($rep->created_at);
if($date->lessThan($ago)) {
ReprocessingTaxJournal::where([
'id' => $rep->id,
])->delete();
}
}
//Clean old sov bill journal data
$sovs = SovBillJournal::all();
foreach($sovs as $sov) {
$date = new Carbon($sov->created_at);
if($date->lessThan($ago)) {
SovBillJournal::where([
'id' => $sov->id,
])->delete();
}
}
//Clean old structure industry tax journal data
$industrys = StructureIndustryTaxJournal::all();
foreach($industrys as $indy) {
$date = new Carbon($indy->created_at);
if($date->lessThan($ago)) {
StructureIndustryTaxJournal::where([
'id' => $indy->id,
])->delete();
}
}
}
}

View File

@@ -0,0 +1,50 @@
<?php
namespace App\Console\Commands\Data;
//Internal Library
use Illuminate\Console\Command;
//Models
use App\Models\Structure\Structure;
use App\Models\Structure\Service;
use App\Models\Structure\Asset;
class EmptyJumpBridges extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'data:EmptyJumpBridges';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Reset the jump bridge fuel related tables.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
Structure::truncate();
Service::truncate();
Asset::truncate();
}
}

View File

@@ -0,0 +1,80 @@
<?php
namespace App\Console\Commands\Data;
//Internal Library
use Illuminate\Console\Command;
//Models
use App\Models\Corporation\AllianceCorp;
use App\Models\ScheduledTask\ScheduleJob;
//Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
class GetCorpsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'data:GetCorps';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get corporations in alliance and store in db.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Declare some variables
$esiHelper = new Esi;
$esi = $esiHelper->SetupEsiAuthentication();
//try the esi call to get all of the corporations in the alliance
try {
$corporations = $esi->invoke('get', '/alliances/{alliance_id}/corporations/', [
'alliance_id' => 99004116,
]);
} catch(RequestFailedException $e){
dd($e->getEsiResponse());
}
//Delete all of the entries in the AllianceCorps table
AllianceCorp::truncate();
//Foreach corporation, make entries into the database.
foreach($corporations as $corp) {
try {
$corpInfo = $esi->invoke('get', '/corporations/{corporation_id}/', [
'corporation_id' => $corp,
]);
} catch(RequestFailedException $e) {
return $e->getEsiResponse();
}
$entry = new AllianceCorp;
$entry->corporation_id = $corp;
$entry->name = $corpInfo->name;
$entry->save();
}
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands\Data;
//Internal Library
use Illuminate\Console\Command;
//Jobs
use App\Jobs\Commands\Moons\PurgeMoonLedgerJob;
class PurgeCorpMoonLedgers extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'data:PurgeCorpLedgers';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Purge old corp ledgers data';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
PurgeMoonLedgerJob::dispatch();
}
}

View File

@@ -0,0 +1,192 @@
<?php
namespace App\Console\Commands\Data;
//Internal Library
use Illuminate\Console\Command;
use Log;
//Libraries
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
//Models
use App\Models\User\User;
use App\Models\User\UserAlt;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
use App\Models\User\UserPermission;
use App\Models\User\UserRole;
use App\Models\Admin\AllowedLogin;
/**
* The PurgeUsers command takes care of updating any user changes in terms of login role, as well as purging any users without at least
* the 'User' role. This command heavily relies on ESI being available. If no ESI is available, then the function does nothing, in order to prevent
* unwanted changes.
*/
class PurgeUsers extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'data:PurgeUsers';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Update and purge users from the database.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Declare some variables
$esiHelper = new Esi;
//Setup the esi variable
$esi = $esiHelper->SetupEsiAuthentication();
//Get all of the users from the database
$users = User::all();
//Get the allowed logins
$legacy = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_id')->toArray();
$renter = AllowedLogin::where(['login_type' => 'Renter'])->pluck('entity_id')->toArray();
//Cycle through all of the users, and either update their role, or delete them.
foreach($users as $user) {
//Set the fail bit to false for the next user to check
$failed = false;
//Note a screen entry for when doing cli stuff
printf("Processing character with id of " . $user->character_id . "\r\n");
//Get the character information
try {
$character_info = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => $user->character_id,
]);
$corp_info = $esi->invoke('get', '/corporations/{corporation_id}/', [
'corporation_id' => $character_info->corporation_id,
]);
} catch(RequestFailedException $e) {
Log::warning('Failed to get character information in purge user command for user ' . $user->character_id);
$failed = true;
}
//If the fail bit is still false, then continue
if($failed === false) {
//Get the user's role
$role = UserRole::where(['character_id' => $user->character_id])->first();
//We don't want to modify Admin and SuperUsers. Admins and SuperUsers are removed via a different process.
if($role->role != 'Admin') {
//Check if the user is allowed to login
if(isset($corp_info->alliance_id)) {
//Warped Intentions is allowed to login
if($corp_info->alliance_id == '99004116') {
//If the alliance is Warped Intentions, then modify the role if we need to
if($role->role != 'User') {
//Upate the role of the user
UserRole::where([
'character_id' => $user->character_id,
])->update([
'role' => 'User',
]);
//Update the user type
User::where([
'character_id' => $user->character_id,
])->update([
'user_type' => 'W4RP',
]);
}
} else if(in_array($corp_info->alliance_id, $legacy)) { //Legacy Users
if($role->role != 'User') {
//Update the role of the user
UserRole::where([
'character_id' => $user->character_id,
])->update([
'role' => 'User',
]);
//Update the user type
User::where([
'character_id' => $user->character_id,
])->update([
'user_type' => 'Legacy',
]);
}
} else if(in_array($corp_info->alliance_id, $renter)) { //Renter Users
if($role->role != 'Renter') {
//Update the role of the user
UserRole::where([
'character_id' => $user->character_id,
])->update([
'role' => 'Renter',
]);
//Update the user type
User::where([
'character_id' => $user->character_id,
])->update([
'user_type' => 'Renter',
]);
}
} else {
//If the user is part of no valid login group, then delete the user.
//Delete all of the permissions first
UserPermission::where([
'character_id' => $user->character_id,
])->delete();
//Delete the user's role
UserRole::where([
'character_id' => $user->character_id,
])->delete();
//Delete any alts the user might have registered.
$altCount = UserAlt::where(['main_id' => $user->character_id])->count();
if($altCount > 0) {
UserAlt::where([
'main_id' => $user->character_id,
])->delete();
}
//Delete the user from the user table
User::where([
'character_id' => $user->character_id,
])->delete();
EsiScope::where([
'character_id' => $user->character_id,
])->delete();
EsiToken::where([
'character_id' => $user->character_id,
])->delete();
}
}
}
}
}
}
}

View File

@@ -0,0 +1,70 @@
<?php
namespace App\Console\Commands\Data;
use Illuminate\Console\Command;
use Log;
use Carbon\Carbon;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use App\Library\Helpers\LookupHelper;
use App\Library\Esi\Esi;
use App\Library\Moons\MoonCalc;
use App\Models\MoonRental\AllianceMoon;
use App\Models\MoonRental\AllianceMoonOre;
class Test extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'data:test';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Test ESI stuff.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
//Declare variables
$lookup = new LookupHelper;
$mHelper = new MoonCalc;
$months = 3;
$rentalTax = 0.25;
$worth1;
$worth2;
$moons = AllianceMoon::all();
foreach($moons as $moon) {
//Declare the arrays needed
$ores = array();
$ores = AllianceMoonOre::where([
'moon_id' => $moon->moon_id,
])->get(['ore_type_id', 'quantity'])->toArray();
dd($ores);
}
}
}

View File

@@ -0,0 +1,54 @@
<?php
namespace App\Console\Commands\Eve;
use Illuminate\Console\Command;
//Library
use App\Library\Moons\MoonCalc;
//Job
use App\Jobs\Commands\Eve\ItemPricesUpdateJob;
class ItemPricesUpdateCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:ItemPriceUpdate';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Update mineral and ore prices';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Declare variables
$moonHelper = new MoonCalc;
//Fetch new prices from fuzzwork.co.uk for the item pricing schemes
$moonHelper->FetchNewPrices();
return 0;
}
}

View File

@@ -0,0 +1,152 @@
<?php
//Namespace
namespace App\Console\Commands\Files;
//Internal Library
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
use Illuminate\Http\File;
use Carbon\Carbon;
use Log;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use DB;
//Application Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Helpers\LookupHelper;
use App\Library\Moons\MoonCalc;
//Models
use App\Models\MoonRental\AllianceMoonOre;
use App\Models\MoonRental\AllianceMoon;
class ImportAllianceMoons extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'files:import:moons';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Import moons from tab-delimited text.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
///universe/moons/{moon_id}/
//Declare variables
$lookup = new LookupHelper;
$mHelper = new MoonCalc;
//Create the collection of lines for the input file.
$moons = new Collection;
//Create the file handler
$data = Storage::get('public/alliance_moons.txt');
//Split the string into separate arrays based on the line
$lines = preg_split("/\n/", $data);
//Take each line and split it again by tabs
foreach($lines as $temp) {
//Split the lines into separate arrays by tabs
$separated = preg_split("/\t/", $temp);
//Push the tabbed array into the collection
$moons->push($separated);
}
/**
* The first pass through the collection of data is to get all of the ore data
* and store it in the database. From the database moon ore, we will create a list
* of moons and store those in the database. After the list of moons are created in the
* database, the function will then update the value of all the moons.
*/
//Start working our way through all of the moons
//and saving the data to the database
foreach($moons as $moon) {
//If the first array is null then we are dealing with an ore
if($moon[0] == null) {
$moonInfo = $lookup->GetMoonInfo($moon[6]);
$solarName = $lookup->SystemIdToName($moonInfo->system_id);
$moonType = $mHelper->IsRMoonGoo($moon[1]);
if(AllianceMoon::where(['moon_id' => $moonInfo->moon_id])->count() == 0) {
//Save the moon into the database
$newMoon = new AllianceMoon;
$newMoon->moon_id = $moonInfo->moon_id;
$newMoon->name = $moonInfo->name;
$newMoon->system_id = $moonInfo->system_id;
$newMoon->system_name = $solarName;
$newMoon->moon_type = $moonType;
$newMoon->worth_amount = 0.00;
$newMoon->rented = 'No';
$newMoon->rental_amount = 0.00;
$newMoon->save();
} else {
$current = AllianceMoon::where([
'moon_id' => $moonInfo->moon_id,
])->first();
if($current->moon_type == 'R4' && ($moonType == 'R8' || $moonType == 'R16' || $moonType == 'R32' || $moonType == 'R64')) {
AllianceMoon::where([
'moon_id' => $moonInfo->moon_id,
])->update([
'moon_type' => $moonType,
]);
} else if($current->moon_type == 'R8' && ($moonType == 'R16' || $moonType == 'R32' || $moonType == 'R64')) {
AllianceMoon::where([
'moon_id' => $moonInfo->moon_id,
])->update([
'moon_type' => $moonType,
]);
} else if($current->moon_type == 'R16' && ($moonType == 'R32' || $moonType == 'R64')) {
AllianceMoon::where([
'moon_id' => $moonInfo->moon_id,
])->update([
'moon_type' => $moonType,
]);
} else if($current->moon_type == 'R32' && $moonType == 'R64') {
AllianceMoon::where([
'moon_id' => $moonInfo->moon_id,
])->update([
'moon_type' => $moonType,
]);
}
}
//Save a new entry into the database
$ore = new AllianceMoonOre;
$ore->moon_id = $moon[6];
$ore->moon_name = $moonInfo->name;
$ore->ore_type_id = $moon[3];
$ore->ore_name = $moon[1];
$ore->quantity = $moon[2];
$ore->solar_system_id = $moon[4];
$ore->planet_id = $moon[5];
$ore->save();
}
}
}
}

View File

@@ -0,0 +1,81 @@
<?php
namespace App\Console\Commands\Files;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
use Illuminate\Http\File;
class MoonFormatter extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'file:moons';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Create a text file to put into sql to update the moons';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$lines = array();
//Create the file handler
$data = Storage::get('public/moon_data.txt');
//Split the string into separate arrays based on the line
$data = preg_split("/\n/", $data);
//For each array of data, let's separate the data into more arrays built in arrays
for($i = 0; $i < sizeof($data); $i++) {
//Strip the beginning [ from the line
$temp = str_replace('[', '', $data[$i]);
//Strip the ending ] from the line
$temp = str_replace(']', '', $temp);
//Remove the spacees from the line
$temp = str_replace(' ', '', $temp);
//Remove the quotes from the line
$temp = str_replace("'", '', $temp);
//Split up the line into separate arrays after each comma
$lines[$i] = preg_split("/,/", $temp);
}
/**
* The output within the lines array
* 0 => System
* 1 => Planet
* 2 => Moon
* 3 => FirstOre
* 4 => FirstQuan
* 5 => SecondOre
* 6 => SecondQuan
* 7 => ThirdOre
* 8 => ThirdQuan
* 9 => FourthOre
* 10 => FourthQuan
*/
var_dump($lines);
dd();
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace App\Console\Commands\Files;
//Internal Stuff
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
class UpdateItemCompositionFromSDECommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'sde:update:ItemCompositions';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Updates item compositions from sql file.';
/**
* The SDE storage path
*
* @var
*/
protected $storage_path;
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Query the sql file for the related database information
*
* @return mixed
*/
public function handle()
{
//Start by warning the user about the command which will be run
$this->comment('Warning! This Laravel command uses exec() to execute a ');
$this->comment('mysql shell command to import an extracted dump. Due');
$this->comment('to the way the command is constructed, should someone ');
$this->comment('view the current running processes of your server, they ');
$this->comment('will be able to see your SeAT database users password.');
$this->line('');
$this->line('Ensure that you understand this before continuing.');
//Test we have valid database parameters
DB::connection()->getDatabaseName();
//Warn the user about the operation to begin
if (! $this->confirm('Are you sure you want to update to the latest EVE SDE?', true)) {
$this->warn('Exiting');
return;
}
$fileName = $this->getSde();
$this->importSde($fileName);
}
/**
* Download the EVE Sde from Fuzzwork and save it
* in the storage_path/sde folder
*/
public function getSde() {
return $fileName;
}
/**
* Extract the SDE file downloaded and run the MySQL command to import the table into the database
*/
public function importSde($fileName) {
$import_command = 'mysql -u username -p password database < ' . $file;
//run the command
exec($import_command, $output, $exit_code);
if($exit_code !== 0) {
$this->error('Warning: Import failed with exit code ' .
$exit_code . ' and command outut: ' . implode('\n', $output));
}
}
}

View File

@@ -1,81 +0,0 @@
<?php
namespace App\Console\Commands;
//Internal Library
use Illuminate\Console\Command;
use Log;
//User Library
use Commands\Library\CommandHelper;
use App\Library\Finances\Helper\FinanceHelper;
//Models
use App\Models\Finances\CorpMarketJournal;
use App\Models\Finances\CorpMarketStructure;
class CorpFinances extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:CorpFinances';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get the corporation finances journal to get the market fees from the master wallet';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Create the command helper container
$task = new CommandHelper('CorpFinances');
//Add entry into the table saying the jobs is starting
$task->SetStartStatus();
//Setup the Finances container
$finance = new FinanceHelper();
//Get the esi configuration
$config = config('esi');
//Get the corporations who have registered for structure markets
$structures = CorpMarketStructure::all();
foreach($structures as $structure) {
$pages = $finance->GetJournalPageCount(1, $structure->character_id);
for($i = 1; $i <= $pages; $i++) {
$job = new JobProcessCorpJournal;
$job->division = 1;
$job->charId = $structure->character_id;
$job->corpId = $structure->corporation_id;
$job->page = $i;
ProcessCorpJournalJob::dispatch($job)->onQueue('journal');
}
}
//mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -1,49 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class CorpMarketMail extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:MarketMail';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send a mail about a market.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Create the command helper container
$task = new CommandHelper('CorpMarketMail');
//Add entry into the table saying the job is starting
$task->SetStartStatus();
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -1,77 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Log;
use Commands\Library\CommandHelper;
use App\Library\Finances\Helper\FinanceHelper;
//Jobs
use App\Jobs\ProcessWalletJournalJob;
//Models
use App\Models\Jobs\JobProcessWalletJournal;
class HoldingFinancesCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:HoldingJournal';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get the holding corps finances.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Create the command helper container
$task = new CommandHelper('HoldingFinances');
//Add the entry into the jobs table saying the job is starting
$task->SetStartStatus();
//Setup the Finances container
$finance = new FinanceHelper();
//Get the esi configuration
$config = config('esi');
//Get the total pages for the journal for the holding corporation
$pages = $finance->GetJournalPageCount(1, $config['primary']);
//Dispatch a single job for each page to process
for($i = 1; $i <= $pages; $i++) {
$job = new JobProcessWalletJournal;
$job->division = 1;
$job->charId = $config['primary'];
$job->page = $i;
ProcessWalletJournalJob::dispatch($job)->onQueue('journal');
}
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -1,67 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
//Library
use Commands\Library\CommandHelper;
use App\Library\Finances\Helper\FinanceHelper;
//Jobs
use App\Jobs\ProcessWalletTransactionJob;
//Models
use App\Models\Jobs\JobProcessWalletTransaction;
class PiTransactionsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:PiTransactions';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get the transactions from the market alt for the alliance';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Create the command helper container
$task = new CommandHelper('PiTransactions');
//Add the entry into the jobs table saying the job is starting
$task->SetStartStatus();
//Setup the Finances container
$finance = new FinanceHelper();
$job = new JobProcessWalletTransaction;
$job->division = 3;
$job->charId = 94415555;
ProcessWalletTransactionJob::dispatch($job)->onQueue('journal');
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,54 @@
<?php
namespace App\Console\Commands\Finances;
//Internal Library
use Illuminate\Console\Command;
use Log;
use Carbon\Carbon;
//Application Library
use App\Library\Helpers\FinanceHelper;
//Jobs
use App\Jobs\Commands\Finances\UpdateAllianceWalletJournalJob;
//Models
use App\Models\Finances\AllianceWalletJournal;
class UpdateAllianceWalletJournal extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'finances:UpdateJournals';
/**
* The console command description.
*
* @var string
*/
protected $description = "Update the holding corporation's finance journal.";
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
UpdateAllianceWalletJournalJob::dispatch()->onQueue('finances');
}
}

View File

@@ -1,48 +0,0 @@
<?php
namespace Commands\Library;
//Internal Libraries
use DB;
use Carbon\Carbon;
//Models
use App\Models\ScheduledTask\ScheduleJob;
class CommandHelper {
private $job_name;
private $job_state;
private $system_time;
public function __construct($name) {
$this->job_name = $name;
$this->job_state = 'Starting';
$this->system_time = Carbon::now();
}
public function SetStartStatus() {
//Add an entry into the jobs table
$job = new ScheduleJob;
$job->job_name = $this->job_name;
$job->job_state = $this->job_state;
$job->system_time = $this->system_time;
$job->save();
}
public function SetStopStatus() {
//Mark the job as finished
DB::table('schedule_jobs')->where([
'system_time' => $this->system_time,
'job_name' => $this->job_name,
])->update([
'job_state' => 'Finished',
]);
}
public function CleanJobStatusTable() {
DB::table('schedule_jobs')->where('system_time', '<', Carbon::now()->subMonths(3))->delete();
}
}
?>

View File

@@ -1,122 +0,0 @@
<?php
namespace App\Console\Commands;
//Internal Library
use Illuminate\Console\Command;
use DB;
use Log;
//Job
use App\Jobs\ProcessContractsJob;
//Library
use App\Library\Esi\Esi;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
use Commands\Library\CommandHelper;
use App\Library\Logistics\ContractsHelper;
//Models
use App\Models\Jobs\JobProcessContracts;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
class GetEveContractsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:GetContracts';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get contracts from a certain corporation';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Create the command helper container
$task = new CommandHelper('GetContracts');
//Add the entry into the jobs table saying the job is starting
$task->SetStartStatus();
//Setup the esi authentication container
$config = config('esi');
//Declare some variables
$charId = 2115439862;
$corpId = 98606886;
//Esi Scope Check
$esiHelper = new Esi();
$contractScope = $esiHelper->HaveEsiScope($charId, 'esi-contracts.read_corporation_contracts.v1');
if($contractScope == false) {
Log::critical('Scope check for esi-contracts.read_corporation_contracts.v1 failed.');
return null;
}
// Disable all caching by setting the NullCache as the
// preferred cache handler. By default, Eseye will use the
// FileCache.
$configuration = Configuration::getInstance();
$configuration->cache = NullCache::class;
//Get the refresh token from the database
$token = EsiToken::where(['character_id' => $charId])->get(['refresh_token']);
//Create the authentication container
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token[0]->refresh_token,
]);
$esi = new Eseye($authentication);
try {
$contracts = $esi->page(1)
->invoke('get', '/corporations/{corporation_id}/contracts/', [
'corporation_id' => $corpId,
]);
} catch (RequestFailedException $e) {
Log::critical("Failed to get the contracts list.");
return null;
}
$pages = $contracts->pages;
for($i = 1; $i <= $pages; $i++) {
$job = new JobProcessEveContracts;
$job->charId = $charId;
$job->corpId = $corpId;
$job->page = $i;
ProcessEveContractsJob::dispatch($job)->onQueue('default');
}
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands\MiningTaxes;
use Illuminate\Console\Command;
use App\Jobs\Commands\MiningTaxes\PreFetchMiningTaxesLedgers as PreFetch;
class ExecuteMiningTaxesLedgersCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mt:ledgers';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Execute mining taxes ledgers jobs.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
PreFetch::dispatch();
return 0;
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands\MiningTaxes;
use Illuminate\Console\Command;
use App\Jobs\Commands\MiningTaxes\FetchMiningTaxesObservers as FetchObservers;
class ExecuteMiningTaxesObserversCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mt:observer';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Dispatch a mining tax observer job.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
FetchObservers::dispatch();
return 0;
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands\MiningTaxes;
use Illuminate\Console\Command;
use App\Jobs\Commands\MiningTaxes\ProcessMiningTaxesPayments as PMTP;
class ExecuteProcesssMiningTaxesPaymentsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mt:payments';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process Mining Taxes payments from the console.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
PMTP::dispatch();
return 0;
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands\MiningTaxes;
use Illuminate\Console\Command;
use App\Jobs\Commands\MiningTaxes\MiningTaxesWeeklyInvoicing as SendInvoice;
class ExecuteSendMiningTaxesInvoiceCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mt:send';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Execute send mining tax invoices.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
SendInvoice::dispatch();
return 0;
}
}

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class ExecuteSendMoonRentalInvoices extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mr:invoice';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Execute command to send moon rental invoices job';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
return 0;
}
}

View File

@@ -0,0 +1,110 @@
<?php
namespace App\Console\Commands\MoonRental;
//Application Library
use Illuminate\Console\Command;
use Log;
use Carbon\Carbon;
//Internal Library
use App\Library\Moons\MoonCalc;
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\MoonRental\AllianceMoon;
use App\Models\MoonRental\AllianceMoonOre;
//Jobs
use App\Jobs\Commands\MoonRental\UpdateAllianceMoonRentalWorth;
class ExecuteUpdateAllianceMoonRentalWorth extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mr:worth';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Update alliance moon rental worth.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
UpdateAllianceMoonRentalWorth::dispatch();
/*
//Declare variables
$lookup = new LookupHelper;
$mHelper = new MoonCalc;
$months = 3;
$rentalTax = 0.25;
$moons = AllianceMoon::all();
foreach($moons as $moon) {
//Declare the arrays needed
$ores = array();
$worth = 0.00;
$ores = AllianceMoonOre::where([
'moon_id' => $moon->moon_id,
])->get(['ore_name', 'quantity'])->toArray();
if(sizeof($ores) == 1) {
$ores[1]["ore_name"] = null;
$ores[1]["quantity"] = 0.00;
$ores[2]["ore_name"] = null;
$ores[2]["quantity"] = 0.00;
$ores[3]["ore_name"] = null;
$ores[3]["quantity"] = 0.00;
} else if(sizeof($ores) == 2) {
$ores[2]["ore_name"] = null;
$ores[2]["quantity"] = 0.00;
$ores[3]["ore_name"] = null;
$ores[3]["quantity"] = 0.00;
} else if(sizeof($ores) == 3) {
$ores[3]["ore_name"] = null;
$ores[3]["quantity"] = 0.00;
}
//one of these two ways will work
$worth = $mHelper->MoonTotalWorth($ores[0]["ore_name"], $ores[0]["quantity"],
$ores[1]["ore_name"], $ores[1]["quantity"],
$ores[2]["ore_name"], $ores[2]["quantity"],
$ores[3]["ore_name"], $ores[3]["quantity"]);
$rentalAmount = $worth * $rentalTax * $months;
AllianceMoon::where([
'moon_id' => $moon->moon_id,
])->update([
'worth_amount' => $worth,
'rental_amount' => $rentalAmount,
]);
}
*/
return 0;
}
}

View File

@@ -1,223 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Carbon\Carbon;
use DB;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
//Library
use Commands\Library\CommandHelper;
use App\Library\Moons\MoonCalc;
//Models
use App\Models\Moon\Moon;
use App\Models\MoonRent\MoonRental;
use App\Models\Jobs\JobSendEveMail;
use App\Models\Mail\SentMail;
use App\Models\Mail\EveMail;
class MoonMailerCommand extends Command
{
/**
* Next update will include checking for if the moon has been paid in advance.
*/
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:MoonMailer';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Mail out the moon rental bills automatically';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Create the new command helper container
$task = new CommandHelper('MoonMailer');
//Add the entry into the jobs table saying the job has started
$task->SetStartStatus();
//Create other variables
$body = null;
$delay = 5;
//Get today's date.
$today = Carbon::now();
$today->second = 2;
$today->minute = 0;
$today->hour = 0;
//Get the esi configuration
$config = config('esi');
//Get all contacts from the rentals group
$contacts = MoonRental::select('Contact')->groupBy('Contact')->get();
//For each of the contacts totalize the moon rental, and create the mail to send to them,
//then update parameters of the moon
foreach($contacts as $contact) {
//Get the moons the renter is renting
$rentals = MoonRental::where(['Contact' => $contact->Contact])->get();
//Totalize the cost of the moons
$cost = $this->TotalizeMoonCost($rentals);
//Get the list of moons in a list format
$listItems = $this->GetMoonList($rentals);
//Build the mail body
$body = "Moon Rent is due for the following moons:<br>";
foreach($listItems as $item) {
$body .= $item . "<br>";
}
$body .= "The price for the next month's rent is " . number_format($cost, 2, ".", ",") . "<br>";
$body .= "Please remit payment to Spatial Forces on the 1st should you continue to wish to rent the moon.<br>";
$body .= "Sincerely,<br>";
$body .= "Warped Intentions Leadership<br>";
//Dispatch the mail job
$mail = new EveMail;
$mail->sender = $config['primary'];
$mail->subject = "Warped Intentions Moon Rental Payment Due for " . $today->englishMonth;
$mail->body = $body;
$mail->recipient = (int)$contact->Contact;
$mail->recipient_type = 'character';
ProcessSendEveMailJob::dispatch($mail)->onQueue('mail')->delay($delay);
//Increment the delay for the mail to not hit rate limits
$delay += 30;
//After the mail is dispatched, saved the sent mail record
$this->SaveSentRecord($mail->sender, $mail->subject, $mail->body, $mail->recipient, $mail->recipient_type);
//Update the moon as not being paid for the next month?
foreach($rentals as $rental) {
$previous = new Carbon($rental->Paid_Until);
if($today->greaterThan($previous)) {
$this->UpdateNotPaid($rental);
}
}
}
//Mark the job as finished
$task->SetStopStatus();
}
private function UpdateNotPaid(MoonRental $rental) {
MoonRental::where([
'System' => $rental->System,
'Planet'=> $rental->Planet,
'Moon'=> $rental->Moon,
])->update([
'Paid' => 'No',
]);
}
private function SaveSentRecord($sender, $subject, $body, $recipient, $recipientType) {
$sentmail = new SentMail;
$sentmail->sender = $sender;
$sentmail->subject = $subject;
$sentmail->body = $body;
$sentmail->recipient = $recipient;
$sentmail->recipient_type = $recipientType;
$sentmail->save();
}
private function GetMoonList($moons) {
//Declare the variable to be used as a global part of the function
$list = array();
//For each of the moons, build the System Planet and Moon.
foreach($moons as $moon) {
$temp = 'Moon: ' . $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon;
array_push($list, $temp);
}
//Return the list
return $list;
}
private function GetRentalMoons($contact) {
$rentals = MoonRental::where([
'Contact' => $contact,
])->get();
dd($rentals);
return $rentals;
}
private function TotalizeMoonCost($rentals) {
//Delcare variables and classes
$moonCalc = new MoonCalc;
$totalCost = 0.00;
$price = null;
foreach($rentals as $rental) {
$moon = Moon::where([
'System' => $rental->System,
'Planet' => $rental->Planet,
'Moon' => $rental->Moon,
])->first();
//Get the updated price for the moon
$price = $moonCalc->SpatialMoonsOnlyGooMailer($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity,
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
//Check the type and figure out which price to add in
if($rental->Type == 'alliance') {
$totalCost += $price['alliance'];
} else{
$totalCost += $price['outofalliance'];
}
}
//Return the total cost back to the calling function
return $totalCost;
}
private function GetRentalType($rentals) {
$alliance = 0;
$outofalliance = 0;
//Go through the data and log whether the renter is in the alliance,
//or the renter is out of the alliance
foreach($rentals as $rental) {
if($rental->Type == 'alliance') {
$alliance++;
} else {
$outofalliance++;
}
}
//Return the rental type
if($alliance > $outofalliance) {
return 'alliance';
} else {
return 'outofalliance';
}
}
}

View File

@@ -1,56 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use DB;
use Carbon\Carbon;
use Commands\Library\CommandHelper;
use App\Library\Moons\MoonCalc;
class UpdateMoonPriceCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:UpdateMoonPrice';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Update moon pricing on a scheduled basis';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Create the command helper container
$task = new CommandHelper('CorpJournal');
//Add the entry into the jobs table saying the job is starting
$task->SetStartStatus();
$moonCalc = new MoonCalc();
$moonCalc->FetchNewPrices();
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -1,42 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class UpdateMoonRental extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:UpdateMoonRental';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands\Structures;
use Illuminate\Console\Command;
use App\Jobs\Commands\Assets\FetchAllianceAssets as FAA;
class ExecuteFetchAllianceAssetsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'structure:assets';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Execute fetch alliance command.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
FAA::dispatch();
return 0;
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands\Structures;
use Illuminate\Console\Command;
use App\Jobs\Commands\Structures\FetchAllianceStructures as FAS;
class ExecuteFetchAllianceStructuresCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'structure:structure';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Fetch alliance structures command.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
FAS::dispatch();
return 0;
}
}

View File

@@ -1,127 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Log;
//Library
use App\Library\Structures\StructureHelper;
use App\Library\Esi\Esi;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
use Commands\Library\CommandHelper;
//Job
use App\Jobs\ProcessStructureJob;
//Models
use App\Models\Jobs\JobProcessStructure;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
class GetStructuresCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:GetStructures';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get the list of structures ';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Create the command helper container
$task = new CommandHelper('GetStructures');
//Add the entry into the jobs table saying the job is starting
$task->SetStartStatus();
//Get the esi config
$config = config('esi');
//Declare some variables
$charId = $config['primary'];
$corpId = 98287666;
$sHelper = new StructureHelper($charId, $corpId);
$structures = null;
//ESI Scope Check
$esiHelper = new Esi();
$structureScope = $esiHelper->HaveEsiScope($charId, 'esi-universe.read_structures.v1');
$corpStructureScope = $esiHelper->HaveEsiScope($charId, 'esi-corporations.read_structures.v1');
//Check scopes
if($structureScope == false || $corpStructureScope == false) {
if($structureScope == false) {
Log::critical("Scope check for esi-universe.read_structures.v1 has failed.");
}
if($corpStructureScope == false) {
Log::critical("Scope check for esi-corporations.read_structures.v1 has failed.");
}
return null;
}
//Get the refresh token from the database
$token = EsiToken::where(['character_id' => $charId])->get(['refresh_token']);
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token[0]->refresh_token,
]);
//Setup the ESI variable
$esi = new Eseye($authentication);
//Set the current page
$currentPage = 1;
//Set our default total pages, and we will refresh this later
$totalPages = 1;
//Try to get the ESI data
try {
$structures = $esi->page($currentPage)
->invoke('get', '/corporations/{corporation_id}/structures/', [
'corporation_id' => $corpId,
]);
} catch (RequestFailedException $e) {
Log::critical("Failed to get structure list.");
return null;
}
$totalPages = $structures->pages;
for($i = 1; $i <= $totalPages; $i++) {
$job = new JobProcessStructure;
$job->charId = $charId;
$job->corpId = $corpId;
$job->page = $currentPage;
ProcessStructureJob::dispatch($job)->onQueue('structures');
}
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,61 @@
<?php
namespace App\Console\Commands\SupplyChain;
//Internal Library
use Illuminate\Console\Command;
use Log;
use Carbon\Carbon;
//Models
use App\Models\Contracts\SupplyChainContract;
//Job
use App\Jobs\Commands\SupplyChain\EndSupplyChainContractJob;
class EndSupplyChainContractCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:supplychain';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Checks and ends any supply chain contracts needs to be closed.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$today = Carbon::now();
//Get the supply chain contracts which are open, but need to be closed.
$contracts = SupplyChainContract::where([
'state' => 'open',
])->where('end_date', '>', $today)->get();
//Create jobs to complete each contract
foreach($contracts as $contract) {
EndSupplyChainContractJob::dispatch($contract)->onQueue('default');
}
}
}

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class TestCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'command:name';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
return 0;
}
}

View File

@@ -1,184 +0,0 @@
<?php
namespace App\Console\Commands;
//Internal Library
use Illuminate\Console\Command;
use Log;
//Libraries
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
//Models
use App\Models\User\User;
use App\Models\User\UserAlt;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
use App\Models\User\UserPermission;
use App\Models\User\UserRole;
use App\Models\Admin\AllowedLogin;
/**
* The PurgeUsers command takes care of updating any user changes in terms of login role, as well as purging any users without at least
* the 'User' role. This command heavily relies on ESI being available. If no ESI is available, then the function does nothing, in order to prevent
* unwanted changes.
*/
class PurgeUsers extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:PurgeUsers';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Update and purge users from the database.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Setup the esi variable
$esi = new Eseye();
//Get all of the users from the database
$users = User::all();
//Get the allowed logins
$legacy = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_id')->toArray();
$renter = AllowedLogin::where(['login_type' => 'Renter'])->pluck('entity_id')->toArray();
//Cycle through all of the users, and either update their role, or delete them.
foreach($users as $user) {
//Set the fail bit to false for the next user to check
$failed = false;
//Note a screen entry for when doing cli stuff
printf("Processing character with id of " . $user->character_id . "\r\n");
//Get the character information
try {
$character_info = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => $user->character_id,
]);
$corp_info = $esi->invoke('get', '/corporations/{corporation_id}/', [
'corporation_id' => $character_info->corporation_id,
]);
} catch(RequestFailedException $e) {
Log::warning('Failed to get character information in purge user command for user ' . $user->character_id);
$failed = true;
}
//If the fail bit is still false, then continue
if($failed === false) {
//Get the user's role
$role = UserRole::where(['character_id' => $user->character_id])->first();
//We don't want to modify Admin and SuperUsers. Admins and SuperUsers are removed via a different process.
if($role->role != 'Admin') {
//Check if the user is allowed to login
if(isset($corp_info->alliance_id)) {
//Warped Intentions is allowed to login
if($corp_info->alliance_id == '99004116') {
//If the alliance is Warped Intentions, then modify the role if we need to
if($role->role != 'User') {
//Upate the role of the user
UserRole::where([
'character_id' => $user->character_id,
])->update([
'role' => 'User',
]);
//Update the user type
User::where([
'character_id' => $user->character_id,
])->update([
'user_type' => 'W4RP',
]);
}
} else if(in_array($corp_info->alliance_id, $legacy)) { //Legacy Users
if($role->role != 'User') {
//Update the role of the user
UserRole::where([
'character_id' => $user->character_id,
])->update([
'role' => 'User',
]);
//Update the user type
User::where([
'character_id' => $user->character_id,
])->update([
'user_type' => 'Legacy',
]);
}
} else if(in_array($corp_info->alliance_id, $renter)) { //Renter Users
if($role->role != 'Renter') {
//Update the role of the user
UserRole::where([
'character_id' => $user->character_id,
])->update([
'role' => 'Renter',
]);
//Update the user type
User::where([
'character_id' => $user->character_id,
])->update([
'user_type' => 'Renter',
]);
}
} else {
//If the user is part of no valid login group, then delete the user.
//Delete all of the permissions first
UserPermission::where([
'character_id' => $user->character_id,
])->delete();
//Delete the user's role
UserRole::where([
'character_id' => $user->character_id,
])->delete();
//Delete any alts the user might have registered.
$altCount = UserAlt::where(['main_id' => $user->character_id])->count();
if($altCount > 0) {
UserAlt::where([
'main_id' => $user->character_id,
])->delete();
}
//Delete the user from the user table
User::where([
'character_id' => $user->character_id,
])->delete();
}
}
}
}
}
}
}

View File

@@ -6,8 +6,21 @@ namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
//Library
use Commands\Library\CommandHelper;
//Jobs
use App\Jobs\Commands\MiningTaxes\PreFetchMiningTaxesLedgers;
use App\Jobs\Commands\MiningTaxes\FetchMiningTaxesObservers;
use App\Jobs\Commands\MiningTaxes\ProcessMiningTaxesPayments;
use App\Jobs\Commands\MiningTaxes\Invoices\UpdateMiningTaxesLateInvoices1st;
use App\Jobs\Commands\MiningTaxes\Invoices\UpdateMiningTaxesLateInvoices15th;
use App\Jobs\Commands\MiningTaxes\MiningTaxesWeeklyInvoicing;
use App\Jobs\Commands\Finances\UpdateAllianceWalletJournalJob;
use App\Jobs\Commands\Finances\UpdateItemPrices as UpdateItemPricesJob;
use App\Jobs\Commands\Data\PurgeUsers as PurgeUsersJob;
use App\Jobs\Commands\Structures\FetchAllianceStructures;
use App\Jobs\Commands\Structures\PurgeAllianceStructures;
use App\Jobs\Commands\Assets\FetchAllianceAssets;
use App\Jobs\Commands\Assets\PurgeAllianceAssets;
use App\Jobs\Commands\MoonRental\UpdateAllianceMoonRentalWorth as UpdateAMRW;
class Kernel extends ConsoleKernel
{
@@ -17,15 +30,18 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected $commands = [
Commands\GetCorpsCommand::class,
Commands\UpdateMoonPriceCommand::class,
Commands\HoldingFinancesCommand::class,
Commands\MoonMailerCommand::class,
Commands\PiTransactionsCommand::class,
Commands\GetStructuresCommand::class,
Commands\GetAssetsCommand::class,
Commands\GetEveContractsCommand::class,
Commands\PurgeUsers::class,
Commands\Data\PurgeUsers::class,
Commands\Data\Test::class,
Commands\Eve\ItemPricesUpdateCommand::class,
Commands\Finances\UpdateAllianceWalletJournal::class,
Commands\MiningTaxes\ExecuteMiningTaxesObserversCommand::class,
Commands\MiningTaxes\ExecuteMiningTaxesLedgersCommand::class,
Commands\MiningTaxes\ExecuteSendMiningTaxesInvoiceCommand::class,
Commands\MiningTaxes\ExecuteProcesssMiningTaxesPaymentsCommand::class,
Commands\Structures\ExecuteFetchAllianceStructuresCommand::class,
Commands\Structures\ExecuteFetchAllianceAssetsCommand::class,
Commands\Files\ImportAllianceMoons::class,
Commands\MoonRental\ExecuteUpdateAllianceMoonRentalWorth::class,
];
/**
@@ -36,35 +52,74 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('services:HoldingJournal')
->hourly()
->withoutOverlapping();
$schedule->command('services:UpdateMoonPrice')
->hourly()
->withoutOverlapping();
$schedule->command('services:GetCorps')
->monthlyOn(1, '09:00')
->withoutOverlapping();
$schedule->command('services:MoonMailer')
->monthlyOn(1, '00:01')
->withoutOverlapping();
$schedule->command('services:PiTransactions')
->hourly()
->withoutOverlapping();
$schedule->command('services:GetStructures')
->dailyAt('09:00')
->withoutOverlapping();
$schedule->command('services:GetAssets')
->hourlyAt('22')
->withoutOverlapping();
$schedule->command('services:CleanData')
->monthlyOn(1, '18:00');
$schedule->command('services:PurgeUsers')
->dailyAt('23:00')
->withoutOverlapping();
//Schedule Monitor Jobs
$schedule->command('schedule-monitor:sync')->dailyAt('04:56');
$schedule->command('schedule-monitor:clean')->daily();
//Horizon Graph Schedule
$schedule->command('horizon:snapshot')->everyFiveMinutes();
/**
* Purge Data Schedule
*/
$schedule->job(new PurgeUsersJob)
->weekly();
/**
* Finances Update Schedule
*/
$schedule->job(new UpdateAllianceWalletJournalJob)
->hourlyAt('45')
->withoutOverlapping();
/**
* Item Update Schedule
*/
$schedule->job(new UpdateItemPricesJob)
->hourlyAT('30')
->withoutOverlapping();
/**
* Mining Tax Schedule
*/
$schedule->job(new FetchMiningTaxesObservers)
->dailyAt('20:00')
->withoutOverlapping();
$schedule->job(new PreFetchMiningTaxesLedgers)
->dailyAt('22:00')
->withoutOverlapping();
$schedule->job(new MiningTaxesWeeklyInvoicing)
->weeklyOn(1, '06:00')
->withoutOverlapping();
$schedule->job(new ProcessMiningTaxesPayments)
->hourlyAt('15')
->withoutOverlapping();
$schedule->job(new UpdateMiningTaxesLateInvoices1st)
->monthlyOn(1, '16:00')
->withoutOverlapping();
$schedule->job(new UpdateMiningTaxesLateInvoices15th)
->monthlyOn(15, '16:00')
->withoutOverlapping();
$schedule->job(new UpdateAMRW)
->dailyAt('13:00')
->withoutOverlapping();
/**
* Alliance Structure and Assets Schedule
*/
$schedule->job(new FetchAllianceStructures)
->dailyAt('21:00')
->withoutOverlapping();
$schedule->job(new FetchAllianceAssets)
->hourlyAt('15')
->withoutOverlapping();
$schedule->job(new PurgeAllianceStructures)
->monthlyOn(2, '14:00')
->withoutOverlapping();
$schedule->job(new PurgeAllianceAssets)
->monthlyOn(2, '15:00')
->withoutOverlapping();
}
/**
@@ -78,4 +133,14 @@ class Kernel extends ConsoleKernel
require base_path('routes/console.php');
}
/**
* Get the timezone that should be used by default for scheduled events.
*
* @return \DateTimeZone|string|null
*/
protected function scheduleTimezone()
{
return 'UTC';
}
}

View File

@@ -2,7 +2,8 @@
namespace App\Exceptions;
use Exception;
//use Exception;
use Throwable;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
@@ -32,7 +33,7 @@ class Handler extends ExceptionHandler
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
public function report(Throwable $exception)
{
parent::report($exception);
}
@@ -44,7 +45,7 @@ class Handler extends ExceptionHandler
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
public function render($request, Throwable $exception)
{
return parent::render($request, $exception);
}

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Controllers\AfterActionReports;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class AfterActionReportsAdminController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('permission:fc.lead');
}
public function DeleteReport() {
}
public function DeleteComment() {
}
public function PruneReports() {
}
public function DisplayStastics() {
}
}

View File

@@ -0,0 +1,87 @@
<?php
namespace App\Http\Controllers\AfterActionReports;
//Internal Library
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Carbon\Carbon;
//Models
use App\Models\AfterActionReports\AfterActionReport;
use App\Models\AfterActionReports\AfterActionReportComment;
class AfterActionReportsController extends Controller
{
public function __contstruct() {
$this->middleware('auth');
$this->middleware('permission:fc.team');
}
public function DisplayReportForm() {
return view('reports.user.form.report');
}
public function StoreReport(Request $request) {
$this->validate($request, [
'location' => 'required',
'time' => 'required',
'comms' => 'required',
'doctrine' => 'required',
'objective' => 'required',
'result' => 'required',
'summary' => 'required',
'improvements' => 'required',
'well' => 'required',
'comments' => 'required',
]);
$report = new AfterActionReport;
$report->fc_id = auth()->user()->getId();
$report->fc_name = auth()->user()->getName();
$report->formup_time = $request->time;
$report->formup_location = $request->location;
$report->comms = $request->comms;
$report->doctrine = $request->doctrine;
$report->objective = $request->objective;
$report->objective_result = $request->result;
$report->summary = $request->summary;
$report->improvements = $request->improvements;
$report->worked_well = $request->well;
$report->additonal_comments = $request->comments;
$report->save();
return redirect('/reports/display/all')->with('success', 'Added report to the database.');
}
public function DisplayCommentForm($id) {
return view('reports.user.form.comment')->with('id', $id);
}
public function StoreComment(Request $request) {
$this->validate($request, [
'reportId' => 'required',
'comments' => 'required',
]);
$comment = new AfterActionReportComment;
$comment->report_id = $request->reportId;
$comment->character_id = auth()->user()->getId();
$comment->character_name = auth()->user()->getName();
$comment->comments = $required->comments;
$comment->save();
return redirect('/reports/display/all')->with('success', 'Added comemnt to the report.');
}
public function DisplayAllReports() {
//Grab all the reports
$reports = AfterActionReport::where('created_at', '>=', Carbon::now()->subDays(30));
$comments = AfterActionReportComment::where('created_at', '>=', Carbon::now()->subDays(30));
$reportCount = AfterActionReport::where('created_at', '>=', Carbon::now()->subDays(30))->count();
return view('reports.user.displayreports')->with('reports', $reports)
->with('comments', $comments)
->with('reportCount', $reportCount);
}
}

View File

@@ -1,43 +0,0 @@
<?php
namespace App\Http\Controllers\Ajax;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
use App\Models\User\User;
class LiveSearch extends Controller
{
public function index() {
return view('ajax.live_search');
}
public function action(Request $request) {
if($request->ajax()) {
$output = '';
$query = $request->get('query');
if($query != null) {
$data = User::where('name', 'like', '%'.$query.'%')->get();
} else {
$data = User::all();
}
$total_row = $data->count();
if($total_row > 0 ) {
foreach($data as $row) {
$output .= '
<tr>
<td>'.$row->name.'</td>
<td>'.$row->character_id.'</td>
</tr>';
}
} else {
$output = '<tr><td align="center" colspan="5">No Data Found</td></tr>';
}
$data = array('table_data' => $output, 'total_data' => $total_row);
echo json_encode($data);
}
}
}

View File

@@ -2,14 +2,15 @@
namespace App\Http\Controllers\Auth;
//Internal Library
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use DB;
use Socialite;
use Auth;
//Models
use App\Models\User\User;
use App\Models\Esi\EsiScope;
class EsiScopeController extends Controller
{
@@ -20,7 +21,10 @@ class EsiScopeController extends Controller
public function displayScopes() {
//Get the ESI Scopes for the user
$scopes = DB::table('EsiScopes')->where('character_id', Auth::user()->character_id)->get();
$scopes = EsiScope::where([
'character_id' => Auth::user()->character_id,
])->get();
return view('scopes.select')->with('scopes', $scopes);
}

View File

@@ -2,12 +2,21 @@
namespace App\Http\Controllers\Auth;
//Internal Library
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Socialite;
use Auth;
use Laravel\Socialite\Contracts\Factory as Socialite;
use Laravel\Socialite\Two\User as SocialiteUser;
//Library
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use App\Library\Esi\Esi;
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\User\User;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
@@ -16,10 +25,6 @@ use App\Models\User\UserRole;
use App\Models\Admin\AllowedLogin;
use App\Models\User\UserAlt;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
class LoginController extends Controller
{
@@ -70,50 +75,80 @@ class LoginController extends Controller
*
* @return Socialite
*/
public function redirectToProvider() {
return Socialite::driver('eveonline')->redirect();
public function redirectToProvider($profile = null, Socialite $social) {
//The default scope is public data for everyone due to OAuth2 Tokens
//We also add the send mail scope in order to be able to send mails more efficiently through jobs when other scopes are required.
$scopes = ['publicData', 'esi-mail.send_mail.v1'];
//Collect any other scopes we need if we are logged in.
//If we are logged in we are linking another character to this one.
//Attempt to use the same scopes for this character as the original one
if(Auth::check()) {
$extraScopes = EsiScope::where([
'character_id' => auth()->user()->getId(),
])->get(['scope']);
//Pop each scope onto the array of scopes
foreach($extraScopes as $extra) {
array_push($scopes, $extra->scope);
}
/**
* Place the scopes in the session.
* Place the original character id in the session.
*/
session()->put('scopes', $scopes);
session()->put('orgCharacter', auth()->user()->getId());
}
return $social->driver('eveonline')
->scopes($scopes)
->redirect();
}
/**
* Get token from callback
* Redirect to the dashboard if logging in successfully.
*/
public function handleProviderCallback() {
public function handleProviderCallback(Socialite $social) {
//Get the sso user from the socialite driver
$ssoUser = Socialite::driver('eveonline')->user();
$ssoUser = $social->driver('eveonline')->user();
$scpSession = session()->pull('scopes');
//If the user was already logged in, let's do some checks to see if we are adding
//additional scopes to the user's account
if(Auth::check()) {
//If a refresh token is present, then we are doing a scope callback
//to update scopes for an access token
//If we are logged in already and the session contains the original characters, then we are creating an alt
//for the original character
if(session()->has('orgCharacter')) {
$orgCharacter = session()->pull('orgCharacter');
if(isset($ssoUser->refreshToken)) {
//See if an access token is present already
$tokenCount = EsiToken::where('character_id', $ssoUser->id)->count();
if($tokenCount > 0) {
//Update the esi token
$this->UpdateEsiToken($ssoUser);
} else {
//Save the ESI token
$this->SaveEsiToken($ssoUser);
}
//After creating the token, we need to update the table for scopes
$this->SetScopes($ssoUser->user['Scopes'], $ssoUser->id);
return redirect()->to('/dashboard')->with('success', 'Successfully updated ESI Scopes.');
} else {
$created = $this->createAlt($ssoUser);
if($created == 1) {
if($this->createAlt($ssoUser, $orgCharacter)) {
return redirect()->to('/profile')->with('success', 'Alt registered.');
} else {
return redirect()->to('/profile')->with('error', 'Alt was previously registered.');
} else {
return redirect()->to('/profile')->with('error', 'Unable to register alt or it was previously registered.');
}
} else {
if(sizeof($ssoUser->scopes) > 1) {
$tokenCount = EsiToken::where([
'character_id' => $ssoUser->id,
])->count();
if($tokenCount > 0) {
$this->UpdateEsiToken($ssoUser);
} else {
$this->SaveEsiToken($ssoUser);
}
$this->SetScopes($ssoUser->scopes, $ssoUser->id);
return redirect()->to('/dashboard')->with('success', 'Successfully updated ESI scopes.');
}
}
} else {
//If the user wasn't logged in, then create a new user
$user = $this->createOrGetUser($ssoUser);
//Login in the new user
auth()->login($user, true);
//Redirect back to the dashboard
return redirect()->to('/dashboard')->with('success', 'Successfully Logged In.');
}
}
@@ -124,12 +159,19 @@ class LoginController extends Controller
*
* @param \Laravel\Socialite\Two\User $user
*/
private function createAlt($user) {
$altCount = UserAlt::where('character_id', $user->id)->count();
if($altCount == 0) {
private function createAlt($user, $orgCharacter) {
//Check to see if the alt is already in the database
$altCount = UserAlt::where(['character_id' => $user->id])->count();
//Check to see if the new character being added is already a main character
$mainCount = User::where(['character_id' => $user->id])->count();
//If not already in the database, then add the new character
if($altCount == 0 && $mainCount == 0) {
//Create the new alt in the table
$newAlt = new UserAlt;
$newAlt->name = $user->getName();
$newAlt->main_id = auth()->user()->getId();
$newAlt->main_id = $orgCharacter;
$newAlt->character_id = $user->id;
$newAlt->avatar = $user->avatar;
$newAlt->access_token = $user->token;
@@ -137,8 +179,22 @@ class LoginController extends Controller
$newAlt->inserted_at = time();
$newAlt->expires_in = $user->expiresIn;
$newAlt->save();
//Create the entry into the EsiToken table
if(EsiToken::where(['character_id' => $user->id])->count() == 0) {
$this->SaveEsiToken($user);
} else {
$this->UpdateEsiToken($user);
}
//Create the entry into the EsiScopes table
if(sizeof($user->scopes) > 1) {
$this->SetScopes($user->scopes, $user->id);
}
//Return the successfull conclusion of the function
return 1;
} else {
//Return the unsuccessfull conclusion of the function
return 0;
}
}
@@ -149,44 +205,48 @@ class LoginController extends Controller
*
* @param \Laravel\Socialite\Two\User $user
*/
private function createOrGetUser($eve_user) {
private function createOrGetUser($eveUser) {
$authUser = null;
//Search to see if we have a matching user in the database.
//At this point we don't care about the information
$userCount = User::where('character_id', $eve_user->id)->count();
$userCount = User::where([
'character_id' => $eveUser->id,
])->count();
//If the user is found, do more checks to see what type of login we are doing
if($userCount > 0) {
//Search for user in the database
$authUser = User::where('character_id', $eve_user->id)->first();
$authUser = User::where([
'character_id' => $eveUser->id,
])->first();
//Check to see if the owner has changed
//If the owner has changed, then update their roles and permissions
if($this->OwnerHasChanged($authUser->owner_hash, $eve_user->owner_hash)) {
if($this->OwnerHasChanged($authUser->owner_hash, $eveUser->owner_hash)) {
//Get the right role for the user
$role = $this->GetRole(null, $eve_user->id);
$role = $this->GetRole(null, $eveUser->id);
//Set the role for the user
$this->SetRole($role, $eve_user->id);
$this->SetRole($role, $eveUser->id);
//Update the user information never the less.
$this->UpdateUser($eve_user, $role);
$this->UpdateUser($eveUser, $role);
//Update the user's roles and permission
$this->UpdatePermission($eve_user, $role);
$this->UpdatePermission($eveUser, $role);
}
//Return the user to the calling auth function
return $authUser;
} else {
//Get the role for the character to be stored in the database
$role = $this->GetRole(null, $eve_user->id);
$role = $this->GetRole(null, $eveUser->id);
//Create the user account
$user = $this->CreateNewUser($eve_user);
$user = $this->CreateNewUser($eveUser);
//Set the role for the user
$this->SetRole($role, $eve_user->id);
$this->SetRole($role, $eveUser->id);
//Create a user account
return $user;
@@ -196,45 +256,45 @@ class LoginController extends Controller
/**
* Update the ESI Token
*/
private function UpdateEsiToken($eve_user) {
EsiToken::where('character_id', $eve_user->id)->update([
'character_id' => $eve_user->getId(),
'access_token' => $eve_user->token,
'refresh_token' => $eve_user->refreshToken,
private function UpdateEsiToken($eveUser) {
EsiToken::where('character_id', $eveUser->id)->update([
'character_id' => $eveUser->getId(),
'access_token' => $eveUser->token,
'refresh_token' => $eveUser->refreshToken,
'inserted_at' => time(),
'expires_in' => $eve_user->expiresIn,
'expires_in' => $eveUser->expiresIn,
]);
}
/**
* Create a new ESI Token in the database
*/
private function SaveEsiToken($eve_user) {
private function SaveEsiToken($eveUser) {
$token = new EsiToken;
$token->character_id = $eve_user->id;
$token->access_token = $eve_user->token;
$token->refresh_token = $eve_user->refreshToken;
$token->character_id = $eveUser->id;
$token->access_token = $eveUser->token;
$token->refresh_token = $eveUser->refreshToken;
$token->inserted_at = time();
$token->expires_in = $eve_user->expiresIn;
$token->expires_in = $eveUser->expiresIn;
$token->save();
}
/**
* Update avatar
*/
private function UpdateAvatar($eve_user) {
User::where('character_id', $eve_user->id)->update([
'avatar' => $eve_user->avatar,
private function UpdateAvatar($eveUser) {
User::where('character_id', $eveUser->id)->update([
'avatar' => $eveUser->avatar,
]);
}
/**
* Update user permission
*/
private function UpdatePermission($eve_user, $role) {
UserPermission::where(['character_id' => $eve_user->id])->delete();
private function UpdatePermission($eveUser, $role) {
UserPermission::where(['character_id' => $eveUser->id])->delete();
$perm = new UserPermission();
$perm->character_id = $eve_user->id;
$perm->character_id = $eveUser->id;
$perm->permission = $role;
$perm->save();
}
@@ -242,10 +302,10 @@ class LoginController extends Controller
/**
* Update the user
*/
private function UpdateUser($eve_user, $role) {
User::where('character_id', $eve_user->id)->update([
'avatar' => $eve_user->avatar,
'owner_hash' => $eve_user->owner_hash,
private function UpdateUser($eveUser, $role) {
User::where('character_id', $eveUser->id)->update([
'avatar' => $eveUser->avatar,
'owner_hash' => $eveUser->owner_hash,
'role' => $role,
]);
}
@@ -253,17 +313,41 @@ class LoginController extends Controller
/**
* Create a new user account
*/
private function CreateNewUser($eve_user) {
private function CreateNewUser($eveUser) {
$user = User::create([
'name' => $eve_user->getName(),
'avatar' => $eve_user->avatar,
'owner_hash' => $eve_user->owner_hash,
'character_id' => $eve_user->getId(),
'name' => $eveUser->getName(),
'avatar' => $eveUser->avatar,
'owner_hash' => $eveUser->owner_hash,
'character_id' => $eveUser->getId(),
'inserted_at' => time(),
'expires_in' => $eve_user->expiresIn,
'access_token' => $eve_user->token,
'user_type' => $this->GetAccountType(null, $eve_user->id),
'expires_in' => $eveUser->expiresIn,
'user_type' => $this->GetAccountType(null, $eveUser->id),
]);
//Look for an existing token for the characters
$tokenFound = EsiToken::where([
'character_id' => $eveUser->id,
])->count();
if($tokenFound == 0) {
$token = new EsiToken;
$token->character_id = $eveUser->id;
$token->access_token = $eveUser->token;
$token->refresh_token = $eveUser->refreshToken;
$token->inserted_at = time();
$token->expires_in = $eveUser->expiresIn;
$token->save();
} else {
EsiToken::where([
'character_id' => $eveUser->id,
])->update([
'character_id' => $eveUser->id,
'access_token' => $eveUser->token,
'refresh_token' => $eveUser->refreshToken,
'inserted_at' => time(),
'expires_in' => $eveUser->expiresIn,
]);
}
return $user;
}
@@ -290,7 +374,6 @@ class LoginController extends Controller
private function SetScopes($scopes, $charId) {
//Delete the current scopes, so we can add new scopes into the database
EsiScope::where('character_id', $charId)->delete();
$scopes = explode(' ', $scopes);
foreach($scopes as $scope) {
$data = new EsiScope;
$data->character_id = $charId;
@@ -345,22 +428,26 @@ class LoginController extends Controller
* @return text
*/
private function GetAccountType($refreshToken, $charId) {
//Declare some variables
$esiHelper = new Esi;
$lookup = new LookupHelper;
//Instantiate a new ESI isntance
$esi = $esiHelper->SetupEsiAuthentication();
//Set caching to null
$configuration = Configuration::getInstance();
$configuration->cache = NullCache::class;
// Instantiate a new ESI instance
$esi = new Eseye();
//Get the character information
$character_info = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => $charId,
]);
$character_info = $lookup->GetCharacterInfo($charId);
//Get the corporation information
$corp_info = $esi->invoke('get', '/corporations/{corporation_id}/', [
'corporation_id' => $character_info->corporation_id,
]);
$corp_info = $lookup->GetCorporationInfo($character_info->corporation_id);
if($character_info == null || $corp_info == null) {
return redirect('/')->with('error', 'Could not create user at this time.');
}
$legacy = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_id')->toArray();
$renter = AllowedLogin::where(['login_type' => 'Renter'])->pluck('entity_id')->toArray();

View File

@@ -0,0 +1,174 @@
<?php
namespace App\Http\Controllers\Blacklist;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Log;
use DB;
//Library
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\Blacklist\BlacklistEntity;
use App\Models\User\User;
use App\Models\User\UserRole;
use App\Models\User\UserPermission;
class BlacklistController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
}
public function DisplayAddToBlacklist() {
return view('blacklist.add');
}
public function DisplayRemoveFromBlacklist() {
return view('blacklist.remove');
}
public function DisplaySearch() {
return view('blacklist.search');
}
public function AddToBlacklist(Request $request) {
//Middleware needed for the function
$this->middleware('permission:blacklist.admin');
//Validate the user input
$this->validate($request, [
'name' => 'required',
'type' => 'required',
'reason' => 'required',
]);
//Create the library variable
$lookup = new LookupHelper;
//Declare other necessary variables
$charId = null;
$corporationId = null;
$allianceId = null;
$entityId = null;
$entityType = null;
//See if the entity is already on the list
$count = BlacklistEntity::where([
'entity_name' => $request->name,
])->count();
//If the count is 0, then add the character to the blacklist
if($count === 0) {
if($request->type == 'Character') {
//Get the character id from the universe end point
$entityId = $lookup->CharacterNameToId($request->name);
} else if($request->type == 'Corporation') {
//Get the corporation id from the universe end point
$entityId = $lookup->CorporationNameToId($request->name);
} else if($request->type == 'Alliance') {
//Get the alliance id from the universe end point
$entityId = $lookup->AllianceNameToId($request->name);
} else {
//Redirect back to the view
return redirect('/blacklist/display/add')->with('error', 'Entity Type not allowed.');
}
//If all id's are null, then we couldn't find the entity
if($entityId == null) {
//Redirect back to the view
return redirect('/blacklist/display/add')->with('error', 'Entity Id was not found.');
}
//Store the entity in the table
$blacklist = new BlacklistEntity;
$blacklist->entity_id = $entityId;
$blacklist->entity_name = $request->name;
$blacklist->entity_type = $request->type;
$blacklist->reason = $request->reason;
$blacklist->alts = $request->alts;
$blacklist->lister_id = auth()->user()->getId();
$blacklist->lister_name = auth()->user()->getName();
$blacklist->validity = 'Valid';
$blacklist->save();
//Return to the view
return redirect('/blacklist/display/add')->with('success', $request->name . ' added to the blacklist.');
} else {
//Return the view
return view('blacklist.add')->with('error', 'Entity of type '. $request->entity_type . ' is already on the black list.');
}
//If we get back to this point redirect to the blacklist with a general error.
return redirect('/blacklist/display/add')->with('error', 'General Error. Contact Support.');
}
public function RemoveFromBlacklist(Request $request) {
//Middleware needed
$this->middleware('permission:blacklist.admin');
//Validate the input request
$this->validate($request, [
'name' => 'required',
]);
//Set the character on the blacklist to removed
BlacklistEntity::where([
'entity_name' => $request->name,
])->update([
'validity' => 'Invalid',
'removed_by_id' => auth()->user()->getId(),
'removed_by_name' => auth()->user()->getName(),
'removed_notes' => $request->notes,
]);
//Return the view
return redirect('/blacklist/display')->with('success', 'Character removed from the blacklist.');
}
public function DisplayBlacklist() {
//Get the entire blacklist
$blacklist = BlacklistEntity::where([
'validity' => 'Valid',
])->orderBy('entity_name', 'asc')->paginate(50);
//Return the view with the data
return view('blacklist.list')->with('blacklist', $blacklist);
}
public function SearchInBlacklist(Request $request) {
//Validate the input from the form
$this->validate($request, [
'parameter' => 'required',
]);
$blacklist = DB::table('alliance_blacklist')->where('entity_name', 'like', $request->parameter . "%")
->orWhere('entity_type', 'like', "%" . $request->parameter . "%")
->orWhere('alts', 'like', "%" . $request->parameter . "%")
->orWhere('reason', 'like', "%" . $request->parameter . "%")
->orderBy('entity_name', 'asc')
->paginate(50);
$blacklistCount = sizeof($blacklist);
//If the count for the blacklist is greater than 0, then get the details, and send it to the view
if($blacklistCount > 0) {
//Send the data to the view
return view('blacklist.list')->with('blacklist', $blacklist)
->with('success', 'Results were found on the blacklist');
} else {
//If they aren't found, then null out the blacklist variable, and send to the view
$blacklist = null;
return view('blacklist.list')->with('blacklist', $blacklist)
->with('error', 'Results were not found on the blacklist.');
}
}
}

View File

@@ -1,207 +0,0 @@
<?php
namespace App\Http\Controllers\Contracts;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use DB;
use Carbon\Carbon;
//Libraries
use App\Library\Esi\Mail;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
//Models
use App\Models\User\User;
use App\Models\User\UserPermission;
use App\Models\Contracts\Contract;
use App\Models\Contracts\Bid;
use App\Models\Contracts\AcceptedBid;
use App\Models\Mail\EveMail;
use App\Models\Jobs\JobSendEveMail;
class ContractAdminController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
$this->middleware('permission:contract.admin');
}
/**
* Contract display functions
*/
public function displayContractDashboard() {
$contracts = Contract::where(['finished' => false])->get();
return view('contracts.admin.contractpanel')->with('contracts', $contracts);
}
public function displayPastContracts() {
$contracts = Contract::where(['finished' => true])->get();
return view('contracs.admin.past')->with('contracts', $contracts);
}
/**
* New contract functionality
*/
public function displayNewContract() {
return view('contracts.admin.newcontract');
}
public function storeNewContract(Request $request) {
$this->validate($request, [
'name' => 'required',
'date' => 'required',
'body' => 'required',
'type' => 'required',
]);
$date = new Carbon($request->date);
$body = nl2br($request->body);
//Store the contract in the database
$contract = new Contract;
$contract->title = $request->name;
$contract->end_date = $request->date;
$contract->body = $body;
$contract->type = $request->type;
$contract->save();
//Send a mail out to all of the people who can bid on a contract
$this->NewContractMail();
return redirect('/contracts/admin/display')->with('success', 'Contract written.');
}
/**
* Used to store a finished contract in the database
*/
public function storeAcceptContract(Request $request) {
$this->validate($request, [
'contract_id' => 'required',
'bid_id' => 'required',
'character_id' => 'required',
'bid_amount' => 'required',
]);
//Update the contract
Contract::where([
'contract_id' => $request->contract_id,
])->update([
'finished' => true,
'final_cost' => $request->bid_amount,
]);
//Save the accepted bid in the database
$accepted = new AcceptedBid;
$accepted->contract_id = $request->contract_id;
$accepted->bid_id = $request->bid_id;
$accepted->bid_amount = $request->bid_amount;
$accepted->save();
return redirect('/contracts/admin/display')->with('success', 'Contract accepted and closed.');
}
/**
* Delete a contract from every user
*/
public function deleteContract($id) {
Contract::where(['contract_id' => $id])->delete();
Bid::where(['contract_id' => $id])->delete();
return redirect('/contracts/admin/display')->with('success', 'Contract has been deleted.');
}
/**
* End Contract Functionality
*/
public function displayEndContract($id) {
//Gather the information for the contract, and all bids on the contract
$contract = Contract::where(['contract_id' => $id])->first()->toArray();
$bids = Bid::where(['contract_id' => $id])->get()->toArray();
return view('contracts.admin.displayend')->with('contract', $contract)
->with('bids', $bids);
}
public function storeEndContract(Request $request) {
$this->validate($request, [
'contract_id' => 'required',
'accept' => 'required',
]);
//Declare class variables
$mail = new Mail;
$tries = 1;
//Get the esi config
$config = config('esi');
$contract = Contract::where(['contract_id' => $request->contract_id])->first()->toArray();
$bid = Bid::where(['id' => $request->accept, 'contract_id' => $request->contract_id])->first()->toArray();
//Send mail out to winner of the contract
$subject = 'Contract Won';
$body = 'You have been accepted to perform the following contract:<br>';
$body .= $contract['contract_id'] . ' : ' . $contract['title'] . '<br>';
$body .= 'Notes:<br>';
$body .= $contract['body'] . '<br>';
$body .= 'Please remit contract when the items are ready to Spatial Forces. Description should be the contract identification number. Request ISK should be the bid amount.';
$body .= 'Sincerely,<br>Spatial Forces Contracting Department';
//Setup the mail job
$mail = new EveMail;
$mail->subject = $subject;
$mail->recipient_type = 'character';
$mail->recipient = $bid['character_id'];
$mail->body = $body;
$mail->sender = $config['primary'];
//Dispatch the mail job
ProcessSendEveMailJob::dispatch($mail)->onQueue('mail');
//Tidy up the contract by doing a few things.
$this->TidyContract($contract, $bid);
//Redirect back to the contract admin dashboard.
return redirect('/contracts/admin/display')->with('success', 'Contract finalized. Mail has been sent to the queue for processing.');
}
private function TidyContract($contract, $bid) {
Contract::where(['contract_id' => $contract['contract_id']])->update([
'finished' => true,
]);
//Create the accepted contract entry into the table
$accepted = new AcceptedBid;
$accepted->contract_id = $contract['contract_id'];
$accepted->bid_id = $bid['id'];
$accepted->bid_amount = $bid['bid_amount'];
$accepted->notes = $bid['notes'];
$accepted->save();
}
private function NewContractMail() {
//Get all the users with a specific permission set
$users = UserPermission::where(['permission' => 'contract.canbid'])->get()->toArray();
//Get the esi config
$config = config('esi');
//Cycle through the users with the correct permission and send a mail to go out with the queue system.
foreach($users as $user) {
$mail = new EveMail;
$mail->sender = $config['primary'];
$mail->subject = 'New Alliance Contract Available';
$mail->recipient = $user['character_id'];
$mail->recipient_type = 'character';
$mail->body = "A new contract is available for the alliance contracting system. Please check out <a href='https://services.w4rp.space'>Services Site</a>.";
ProcessSendEveMailJob::dispatch($mail)->onQueue('mail');
}
}
}

View File

@@ -1,322 +0,0 @@
<?php
namespace App\Http\Controllers\Contracts;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use DB;
use Carbon\Carbon;
//Libraries
use App\Library\Lookups\LookupHelper;
//use App\Library\Contracts\ContractHelper;
//Models
use App\Models\User\User;
use App\Models\User\UserPermission;
use App\Models\Contracts\Contract;
use App\Models\Contracts\Bid;
class ContractController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
$this->middleware('permission:contract.canbid');
}
/**
* Controller function to display the bids placed on contracts
*/
public function displayBids($id) {
$bids = Bids::where(['contract_id' => $id, 'character_name' => auth()->user()->getName()])->get();
return view('contracts.bids')->with('bids', $bids);
}
/**
*
* Controller function to display all current open contracts
*
*/
public function displayContracts() {
//Calculate today's date to know which contracts to display
$today = Carbon::now();
//Declare our array variables
$bids = array();
$contracts = array();
$i = 0;
//Fetch all of the current contracts from the database
$contractsTemp = Contract::where('end_date', '>=', $today)
->where(['finished' => false])->get()->toArray();
//Count the number of bids, and add them to the arrays
for($i = 0; $i < sizeof($contractsTemp); $i++) {
$tempCount = Bid::where(['contract_id' => $contractsTemp[$i]['contract_id']])->count('contract_id');
$bids = Bid::where(['contract_id' => $contractsTemp[$i]['contract_id']])->get()->toArray();
//Assemble the finaly array
$contracts[$i] = $contractsTemp[$i];
$contracts[$i]['bid_count'] = $tempCount;
$contracts[$i]['bids'] = $bids;
}
//Call for the view to be displayed
return view('contracts.allcontracts')->with('contracts', $contracts);
}
/**
* Controller function to display all current public contracts
*/
public function displayPublicContracts() {
//Calculate today's date to know which contracts to display
$today = Carbon::now();
//Declare our array variables
$bids = array();
$contracts = array();
$i = 0;
$lowestBid = null;
$lowestCorp = null;
$lowestChar = null;
//Fetch all of the current contracts from the database
$contractsTemp = Contract::where('end_date', '>=', $today)
->where(['type' => 'Public', 'finished' => false])->get()->toArray();
//Count the number of bids, and add them to the arrays
for($i = 0; $i < sizeof($contractsTemp); $i++) {
$tempCount = Bid::where(['contract_id' => $contractsTemp[$i]['contract_id']])->count('contract_id');
$bids = Bid::where(['contract_id' => $contractsTemp[$i]['contract_id']])->get()->toArray();
foreach($bids as $bid) {
if($lowestBid == null) {
$lowestBid = $bid['bid_amount'];
$lowestCorp = $bid['corporation_name'];
$lowestChar = $bid['character_name'];
} else {
if($bid['bid_amount'] < $lowestBid) {
$lowestBid = $bid['bid_amount'];
$lowestCorp = $bid['corporation_name'];
$lowestChar = $bid['character_name'];
}
}
}
if($lowestBid == null) {
$lowestBid = 'No Bids Placed.';
$lowestCorp = 'No Corporation has placed a bid.';
}
//Assemble the finaly array
$contracts[$i] = $contractsTemp[$i];
$contracts[$i]['bid_count'] = $tempCount;
$contracts[$i]['bids'] = $bids;
$contracts[$i]['lowestbid'] = $lowestBid;
$contracts[$i]['lowestcorp'] = $lowestCorp;
$contracts[$i]['lowestchar'] = $lowestChar;
//Reset the lowestBid back to null
$lowestBid = null;
}
//Call for the view to be displayed
return view('contracts.publiccontracts')->with('contracts', $contracts);
}
/**
* Controller function to display current private contracts
*/
public function displayPrivateContracts() {
//Declare our array variables
$bids = array();
$contracts = array();
$lowestBid = null;
//Calucate today's date to know which contracts to display
$today = Carbon::now();
//Fetch all of the current contracts from the database
$contractsTemp = Contract::where('end_date', '>=', $today)
->where(['type' => 'Private', 'finished' => false])->get();
//Count the number of bids, and add them to the arrays
for($i = 0; $i < sizeof($contractsTemp); $i++) {
$tempCount = Bid::where(['contract_id' => $contractsTemp[$i]['contract_id']])->count('contract_id');
$bids = Bid::where(['contract_id' => $contractsTemp[$i]['contract_id']])->get()->toArray();
foreach($bids as $bid) {
if($lowestBid == null) {
$lowestBid = $bid['bid_amount'];
} else {
if($bid['bid_amount'] < $lowestBid) {
$lowestBid = $bid['bid_amount'];
}
}
}
if($lowestBid == null) {
$lowestBid = 'No Bids Placed.';
}
//Assemble the finaly array
$contracts[$i] = $contractsTemp[$i];
$contracts[$i]['bid_count'] = $tempCount;
$contracts[$i]['bids'] = $bids;
$contracts[$i]['lowestbid'] = $lowestBid;
}
return view ('contracts.privatecontracts')->with('contracts', $contracts);
}
/**
* Controller function to display expired contracts
*
*/
public function displayExpiredContracts() {
//Calculate today's date to know which contracts to display
$today = Carbon::now();
//Retrieve the contracts from the database
$contracts = Contract::where('end_date', '<', $today)->get();
return view('contracts.expiredcontracts')->with('contracts', $contracts);
}
/**
* Controller function to display a page to allow a bid
*
*/
public function displayNewBid($id) {
$contractId = $id;
return view('contracts.enterbid')->with('contractId', $contractId);
}
/**
* Controller function to store a new bid
*/
public function storeBid(Request $request) {
//Valid the request from the enter bid page
$this->validate($request, [
'contract_id' => 'required',
'bid' => 'required',
]);
//Delcare some class variables we will need
$lookup = new LookupHelper;
$amount = 0.00;
//Convert the amount to a whole number from abbreviations
if($request->suffix == 'B') {
$amount = $request->bid * 1000000000.00;
} else if($request->suffix == 'M') {
$amount = $request->bid * 1000000.00;
} else {
$amount = $request->bid * 1.00;
}
if(isset($request->notes)) {
$notes = nl2br($request->notes);
} else {
$notes = null;
}
//Get the character id and character name from the auth of the user calling
//this function
$characterId = auth()->user()->getId();
$characterName = auth()->user()->getName();
//Use the lookup helper in order to find the user's corporation id and name
$corporationId = $lookup->LookupCharacter($characterId);
$corporationName = $lookup->LookupCorporationName($corporationId);
//Before saving a bid let's check to see if the user already placed a bid on the contract
$found = Bid::where([
'contract_id' => $request->contract_id,
'character_id' => $characterId,
])->first();
if(isset($found->contract_id)) {
return redirect('/contracts/display/all')->with('error', 'You have already placed a bid for this contract. Please modify the existing bid.');
} else {
//Create the model object to save data to
$bid = new Bid;
$bid->contract_id = $request->contract_id;
$bid->bid_amount = $amount;
$bid->character_id = $characterId;
$bid->character_name = $characterName;
$bid->corporation_id = $corporationId;
$bid->corporation_name = $corporationName;
$bid->notes = $notes;
$bid->save();
//Redirect to the correct page
return redirect('/contracts/display/all')->with('success', 'Bid accepted.');
}
}
/**
* Controller function to delete a bid
*/
public function deleteBid($id) {
//Delete the bid entry from the database
Bid::where([
'id' => $id,
])->delete();
return redirect('/contracts/display/public')->with('success', 'Bid deleted.');
}
/**
* Controller function to display modify bid page
*/
public function displayModifyBid($id) {
//With the bid id number, look up the bid in the database to get the contract information
$bid = Bid::where(['id' => $id])->first();
//Retrieve the contract from the database
$contract = Contract::where(['contract_id' => $bid->contract_id])->first()->toArray();
return view('contracts.modifybid')->with('contract', $contract)
->with('bid', $bid);
}
/**
* Controller function to modify a bid
*/
public function modifyBid(Request $request) {
$this->validate($request, [
'bid' => 'required',
]);
$amount = $request->bid;
$type = $request->type;
$contractId = $request->contract_id;
if($request->suffix == 'B') {
$amount = $amount * 1000000000.00;
} else if($request->suffix == 'M') {
$amount = $amount * 1000000.00;
} else {
$amount = $amount * 1.00;
}
Bid::where([
'character_id' => auth()->user()->getId(),
'contract_id' => $contractId,
])->update([
'bid_amount' => $amount,
]);
if($type == 'public') {
return redirect('/contracts/display/public')->with('success', 'Bid modified.');
} else {
return redirect('/contracts/display/private')->with('success', 'Bid modified');
}
}
}

View File

@@ -0,0 +1,501 @@
<?php
namespace App\Http\Controllers\Contracts;
//Internal Libraries
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Carbon\Carbon;
//Libraries
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\User\User;
use App\Models\Contracts\SupplyChainBid;
use App\Models\Contracts\SupplyChainContract;
//Jobs
use App\Jobs\Commands\Eve\SendEveMail;
class SupplyChainController extends Controller
{
/**
* Constructor
*/
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
}
/**
* Display the supply chain dashboard
* Should contain a section for open contracts, closed contracts, and expired contracts.
*/
public function displaySupplyChainDashboard() {
$openContracts = SupplyChainContract::where([
'state' => 'open',
])->get();
$closedContracts = SupplyChainContract::where([
'state' => 'closed',
])->get();
$completedContracts = SupplyChainContract::where([
'state' => 'completed',
])->get();
return view('supplychain.dashboard.main')->with('openContracts', $openContracts)
->with('closedContracts', $closedContracts)
->with('completedContracts', $completedContracts);
}
/**
* Display my supply chain contracts dashboard
* Should contain a section for open contracts, closed contracts, and expired contracts
*/
public function displayMySupplyChainDashboard() {
$openContracts = SupplyChainContract::where([
'issuer_id' => auth()->user()->getId(),
'state' => 'open',
])->get();
$closedContracts = SupplyChainContract::where([
'issuer_id' => auth()->user()->getId(),
'state' => 'closed',
])->get();
$completedContracts = SupplyChainContract::where([
'issuer_id' => auth()->user()->getId(),
'state' => 'completed',
])->get();
return view('supplychain.dashboard.main')->with('openContracts', $openContracts)
->with('closedContracts', $closedContracts)
->with('completedContracts', $completedContracts);
}
/**
* Display new contract page
*/
public function displayNewSupplyChainContract() {
return view('supplychain.forms.newcontract');
}
/**
* Store new contract page
*/
public function storeNewSupplyChainContract(Request $request) {
$this->validate($request, [
'name' => 'required',
'date' => 'required',
'delivery' => 'required',
'body' => 'required',
]);
$contract = new SupplyChainContract;
$contract->issuer_id = auth()->user()->getId();
$contract->issuer_name = auth()->user()->getName();
$contract->title = $request->name;
$contract->end_date = $request->date;
$contract->delivery_by = $request->delivery;
$contract->body = $request->body;
$contract->state = 'open';
$contract->bids = 0;
$contract->save();
$this->NewSupplyChainContractMail($contract);
return redirect('/supplychain/dashboard')->with('success', 'New Contract created.');
}
/**
* Display the delete contract page
*/
public function displayDeleteSupplyChainContract() {
$contracts = SupplyChainContract::where([
'issuer_id' => auth()->user()->getId(),
'state' => 'open',
])->get();
return view('supplychain.forms.delete')->with('contracts', $contracts);
}
/**
* Delete a supply chain contract
*/
public function deleteSupplyChainContract(Request $request) {
$this->validate($request, [
'contractId' => 'required',
]);
$contractId = $request->contractId;
/**
* Remove the supply chain contract if it's yours.
*/
$count = SupplyChainContract::where([
'issuer_id' => auth()->user()->getId(),
'contract_id' => $contractId,
])->count();
if($count > 0) {
//Remove the supply chain contract
SupplyChainContract::where([
'issuer_id' => auth()->user()->getId(),
'contract_id' => $contractId,
])->delete();
//Remove all bids associated with the supply chain contract
SupplyChainBid::where([
'contract_id' => $contractId,
])->delete();
return redirect('/supplychain/dashboard')->with('success', 'Supply Chain Contract deleted successfully.');
} else {
return redirect('/supplychain/dashboard')->with('error', 'Unable to delete supply chain contract.');
}
}
/**
* Display the end supply chain contrage page
*/
public function displayEndSupplyChainContract() {
return view('supplychain.forms.end');
}
/**
* Process the end supply chain contract page
*/
public function storeEndSupplyChainContract(Request $request) {
$this->validate($request, [
'accept' => 'required',
'contractId' => 'required',
]);
//Check to make sure the user owns the contract
$count = SupplyChainContract::where([
'issuer_name' => auth()->user()->getName(),
'contract_id' => $request->contractId,
])->count();
//If the count is greater than 0, the user owns the contract.
//Proceed with ending the contract
if($count > 0) {
SupplyChainContract::where([
])->update([
]);
SupplyChainBid::where([
])->update([
]);
return redirect('/supplychain/dashboard')->with('success', 'Contract ended, and mails sent to the winning bidder.');
} else {
//If the count is zero, then redirect with error messsage
return redirect('/supplychain/dashboard')->with('error', 'Contract was not yours to end.');
}
}
/**
* Display supply chain contract bids page
*/
public function displaySupplyChainBids() {
//Display bids for the user on a page
$bids = array();
$bidsCount = SupplyChainBid::where([
'entity_id' => auth()->user()->getId(),
'bid_type' => 'pending',
])->count();
$myBids = SupplyChainBid::where([
'entity_id' => auth()->user()->getId(),
'bid_type' => 'pending',
])->get();
foreach($myBids as $bid) {
//Declare the temporary array
$temp = array();
//Get the contract information for the bid
$contract = SupplyChainContract::where([
'contract_id' => $bid->contract_id,
])->first();
$temp['bid_id'] = $bid->bid_id;
$temp['contract_id'] = $bid->contract_id;
$temp['issuer_name'] = $contract->issuer_name;
$temp['title'] = $contract->title;
$temp['end_date'] = $contract->end_date;
$temp['body'] = $contract->body;
$temp['bid_amount'] = $bid->bid_amount;
array_push($bids, $temp);
}
return view('supplychain.dashboard.bids')->with('bids', $bids)
->with('bidsCount', $bidsCount);
}
/**
* Display expired supply chain contracts page
*/
public function displayExpiredSupplyChainContracts() {
return view('supplychain.dashboard.expired');
}
/**
* Display the new bid on a supply chain contract page
*/
public function displaySupplyChainContractBid($contract) {
$contractId = $contract;
return view('supplychain.forms.enterbid')->with('contractId', $contractId);
}
/**
* Enter a new bid on a supply chain contract
*/
public function storeSupplyChainContractBid(Request $request) {
$this->validate($request, [
'bid' => 'required',
'contract_id' => 'required',
]);
//Declare some needed variables
$bidAmount = 0.00;
//See if a bid has been placed by the user for this contract
$count = SupplyChainBid::where([
'entity_id' => auth()->user()->getId(),
'entity_name' => auth()->user()->getName(),
'contract_id' => $request->contract_id,
])->count();
//If the person already has a bid in, then deny them the option to place another bid on the same contract.
//Otherwise, enter the bid into the database
if($count > 0) {
return redirect('/supplychain/dashboard')->with('error', 'Unable to insert bid as one is already present for the supply chain contract.');
} else {
//Sanitize the bid amount
if(preg_match('(m|M|b|B)', $request->bid) === 1) {
if(preg_match('(m|M)', $request->bid) === 1) {
$cStringSize = strlen($request->bid);
$tempCol = str_split($request->bid, $cStringSize - 1);
$bidAmount = $tempCol[0];
$bidAmount = $bidAmount * 1000000.00;
} else if(preg_match('(b|B)', $request->bid) === 1) {
$cStringSize = strlen($request->bid);
$tempCol = str_split($request->bid, $cStringSize - 1);
$bidAmount = $tempCol[0];
$bidAmount = $bidAmount * 1000000000.00;
}
} else {
$bidAmount = $request->bid;
}
//Create the database entry
$bid = new SupplyChainBid;
$bid->contract_id = $request->contract_id;
$bid->bid_amount = $bidAmount;
$bid->entity_id = auth()->user()->getId();
$bid->entity_name = auth()->user()->getName();
$bid->entity_type = 'character';
if(isset($request->notes)) {
$bid->bid_note = $request->notes;
}
$bid->bid_type = 'pending';
$bid->save();
//Update the database entry for the supply chain contract bid number
$num = SupplyChainContract::where([
'contract_id' => $request->contract_id,
])->select('bids')->first();
//Increment the number of bids
$numBids = $num->bids + 1;
//Update the database
SupplyChainContract::where([
'contract_id' => $request->contract_id,
])->update([
'bids' => $numBids,
]);
return redirect('/supplychain/dashboard')->with('success', 'Bid succesfully entered into the contract.');
}
}
/**
* Delete a bid on a supply chain contract
*
* @var contractId
* @var bidId
*/
public function deleteSupplyChainContractBid($contractId, $bidId) {
//See if the user has put in a bid. If not, then redirect to failure.
$count = SupplyChainBid::where([
'contract_id' => $contractId,
'entity_id' => auth()->user()->getId(),
'bid_id' => $bidId,
])->count();
if($count > 0) {
SupplyChainBid::where([
'contract_id' => $contractId,
'entity_id' => auth()->user()->getId(),
'bid_id' => $bidId,
])->delete();
//Update the database entry for the supply chain contract bid number
$num = SupplyChainContract::where([
'contract_id' => $contractId,
])->select('bids')->first();
//Decrement the number of bids
$numBids = $num->bids - 1;
//Update the database
SupplyChainContract::where([
'contract_id' => $contractId,
])->update([
'bids' => $numBids,
]);
return redirect('/supplychain/dashboard')->with('success', 'Deleted supply chain contract bid.');
} else {
return redirect('/supplychain/dashboard')->with('error', 'No bid found to delete.');
}
}
/**
* Display the modify a bid on supply chain contract page
*/
public function displayModifySupplyChainContractBid(Request $request) {
$this->validate($request, [
'contract_id' => 'required',
]);
//Get the contract id
$contractId = $request->contract_id;
//Get the bid id to be modified later
$bid = SupplyChainBid::where([
'contract_id' => $contractId,
'entity_id' => auth()->user()->getId(),
])->first();
$bidId = $bid->id;
return view('supplychain.forms.modifybid')->with('contractId', $contractId)
->with('bidId', $bidId);
}
/**
* Modify a bid on a supply chain contract
*/
public function modifySupplyChainContractBid(Request $request) {
$this->validate($request, [
'bid_id' => 'required',
'contract_id' => 'required',
'bid_amount' => 'required',
]);
//Check for the owner of the bid
$count = SupplyChainBid::where([
'bid_id' => $request->bid_id,
'contract_id' => $request->contract_id,
'entity_id' => auth()->user()->getId(),
])->count();
if($count > 0) {
if(isset($request->bid_note)) {
SupplyChainBid::where([
'bid_id' => $request->bid_id,
'contract_id' => $request->contract_id,
'entity_id' => auth()->user()->getId(),
])->update([
'bid_amount' => $request->bid_amount,
'bid_note' => $request->bid_note,
]);
} else {
SupplyChainBid::where([
'bid_id' => $request->bid_id,
'contract_id' => $request->contract_id,
'entity_id' => auth()->user()->getId(),
])->update([
'bid_amount' => $request->bid_amount,
]);
}
return redirect('/supplychain/dashboard')->with('success', 'Modified supply chain contract bid.');
} else {
return redirect('/supplychain/dashboard')->with('error', 'Not able to modify supply chain contract bid.');
}
}
/**
* Send out a new supply chain contract mail
*/
private function NewSupplyChainContractMail(SupplyChainContract $contract) {
//Get the config for the esi
$config = config('esi');
$todayDate = Carbon::now()->toFormattedDateString();
$subject = 'New Supply Chain Contract ' . $todayDate;
$body = "A supply chain contract is available.<br>";
$body .= "Contract: " . $contract->title . "<br>";
$body .= "Notes: " . $contract->body . "<br>";
$body .= "Delivery Date: " . $contract->delivery_date . "<br>";
$body .= "<br>Sincerely on behalf of,<br>" . $contract->issuer_name . "<br>";
SendEveMail::dispatch($body, 145223267, 'mailing_list', $subject, $config['primary'])->delay(Carbon::now()->addSeconds(30));
}
/**
* Send out a mail when the supply chain contract has been deleted
*/
private function DeleteSupplyChainContractMail($contract) {
//Get the esi config
$config = config('esi');
$subject = 'Production Contract Removal';
$body = "A production contract has been deleted.<br>";
$body .= "Contract: " . $contract->title . "<br>";
$body .= "Notes: " . $contract->note . "<br>";
$body .= "<br>Sincerely on behalf of,<br>" . $contract->issuer_name;
SendEveMail::dispatch($body, 145223267, 'mailing_list', $subject, $config['primary'])->delay(Carbon::now()->addSeconds(30));
}
/**
* Tidy up datatables from a completed supply chain contract
*/
private function TidySupplyChainContract($contract, $bid) {
//Set the contract as finished
SupplyChainContract::where([
'contract_id' => $contract->contract_id,
])->update([
'state' => 'finished',
]);
//Set all of the bids as not_accepted as default
SupplyChainBid::where([
'contract_id' => $contract->contract_id,
])->update([
'bid_type' => 'not_accepted',
]);
//Set the correct bid as accepted
SupplyChainBid::where([
'contract_id' => $contract->contract_id,
'bid_id' => $bid->bid_id,
])->update([
'bid_type' => 'accepted',
]);
}
}

View File

@@ -1,122 +0,0 @@
<?php
namespace App\Http\Controllers\Corps;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Log;
//Library
use App\Library\Lookups\NewLookupHelper;
//Models
use App\Models\Character\BlacklistUser;
class BlacklistController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
}
public function AddToBlacklist(Request $request) {
//Middleware needed for the function
$this->middleware('permission:alliance.recruiter');
//Validate the user input
$this->validate($request, [
'name' => 'required',
'reason' => 'required',
]);
//Create the library variable
$lookup = new NewLookupHelper;
//See if the character is already on the list
$count = BlacklistUser::where([
'name' => $request->name,
])->count();
//If the count is 0, then add the character to the blacklist
if($count === 0) {
//Get the character id from the universe end point
$charId = $lookup->CharacterNameToId($request->name);
//Insert the character into the blacklist table
BlacklistUser::insert([
'character_id' => $charId,
'name' => $request->name,
'reason' => $request->reason,
]);
} else {
//Return the view
return view('blacklist.add')->with('error', 'Character is already on the black list.');
}
//Return the view
return view('blacklist.list')->with('success', 'Character added to the blacklist');
}
public function RemoveFromBlacklist(Request $request) {
//Middleware needed
$this->middleware('permission:alliance.recruiter');
//Validate the input request
$this->validate($request, [
'name' => 'required',
]);
//Delete the blacklist character
BlacklistUser::where([
'name' => $request->name,
])->delete();
//Return the view
return view('blacklist.list')->with('success', 'Character removed from the blacklist.');
}
public function DisplayBlacklist() {
//Middleware needed
$this->middleware('permission:corp.recruiter');
//Get the entire blacklist
$blacklist = BlacklistUser::all();
//Return the view with the data
return view('blacklist.list')->with('blacklist', $blacklist);
}
public function SearchInBlacklist(Request $request) {
//Middleware needed
$this->middleware('permission:corp.recruiter');
//Validate the input from the form
$this->validate($request, [
'name' => 'required',
]);
//Get the data being requested
$blacklistCount = BlacklistUser::where([
'name' => $request->name,
])->count();
//If the count for the blacklist is greater than 0, then get the details, and send it to the view
if($blacklistCount > 0) {
//Try to find the user in the blacklist
$blacklist = BlacklistUser::where([
'name' => $request->name,
])->first();
//Send the data to the view
return view('blacklist.list')->with('blacklist', $blacklist)
->with('success', 'Name was found on the blacklist');
} else {
//If they aren't found, then null out the blacklist variable, and send to the view
$blacklist = null;
return view('blacklist.list')->with('blacklist', $blacklist)
->with('error', 'Name was not found on the blacklist.');
}
}
}

View File

@@ -1,320 +0,0 @@
<?php
namespace App\Http\Controllers\Dashboard;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use DB;
//Libraries
use App\Library\Taxes\TaxesHelper;
//Models
use App\Models\User\User;
use App\Models\User\UserRole;
use App\Models\User\UserPermission;
use App\Models\User\AvailableUserPermission;
use App\Models\Admin\AllowedLogin;
class AdminController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:Admin');
}
public function displayUsersPaginated() {
//Declare array variables
$user = array();
$permission = array();
$userArr = array();
$permString = null;
$usersArr = User::orderBy('name', 'asc')->paginate(50);
foreach($usersArr as $user) {
$user->role = $user->getRole();
$permCount = UserPermission::where([
'character_id' => $user->character_id,
])->count();
if($permCount > 0) {
$perms = UserPermission::where([
'character_id' => $user->character_id,
])->get('permission')->toArray();
foreach($perms as $perm) {
$permString .= $perm['permission'] . ', ';
}
$user->permission = $permString;
} else {
$user->permission = 'No Permissions';
}
}
return view('admin.dashboards.userspaged')->with('usersArr', $usersArr);
}
public function displayUsers($page) {
//Declare array variables
$user = array();
$permission = array();
$userArr = array();
/**
* For each user we want to build their name and permission set into one array
* Having all of the data in one array will allow us to build the table for the admin page more fluently.
* Example: userArr[0]['name'] = Minerva Arbosa
* userArr[0]['role'] = W4RP
* userArr[0]['permissions'] = ['admin', 'contract.admin', superuser]
*/
$usersTable = User::orderBy('name', 'asc')->get()->toArray();
foreach($usersTable as $user) {
$perms = UserPermission::where([
'character_id' => $user['character_id'],
])->get('permission')->toArray();
$tempUser['name'] = $user['name'];
$tempUser['role'] = $user['user_type'];
$tempUser['permissions'] = $perms;
array_push($userArr, $tempUser);
}
//Get a user count for the view so we can do pagination
$userCount = User::orderBy('name', 'asc')->count();
//Set the amount of pages for the data
$userPages = ceil($userCount / 50);
$users = User::pluck('name')->all();
return view('admin.dashboards.users')->with('users', $users)
->with('userArr', $userArr)
->with('userCount', $userCount)
->with('userPages', $userPages);
}
public function displayAllowedLogins() {
//Declare array variables
$entities = array();
/** Entities for allowed logins */
$legacys = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_name')->toArray();
$renters = AllowedLogin::where(['login_type' => 'Renter'])->pluck('entity_name')->toArray();
//Compile a list of entities by their entity_id
foreach($legacys as $legacy) {
$entities[] = $legacy;
}
foreach($renters as $renter) {
$entities[] = $renter;
}
return view('admin.dashboards.allowed_logins')->with('entities', $entities);
}
public function displayPurgeWiki() {
return view('admin.dashboards.purge_wiki');
}
public function displayTaxes() {
//Declare variables needed for displaying items on the page
$months = 3;
$pi = array();
$industry = array();
$reprocessing = array();
$office = array();
$corpId = 98287666;
$srpActual = array();
$srpLoss = array();
/** Taxes Pane */
//Declare classes needed for displaying items on the page
$tHelper = new TaxesHelper();
//Get the dates for the tab panes
$dates = $tHelper->GetTimeFrameInMonths($months);
//Get the data for the Taxes Pane
foreach($dates as $date) {
//Get the srp actual pay out for the date range
$srpActual[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetAllianceSRPActual($date['start'], $date['end']), 2, ".", ","),
];
//Get the srp loss value for the date range
$srpLoss[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetAllianceSRPLoss($date['start'], $date['end']), 2, ".", ","),
];
//Get the pi taxes for the date range
$pis[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetPIGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the industry taxes for the date range
$industrys[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetIndustryGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the reprocessing taxes for the date range
$reprocessings[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetReprocessingGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the office taxes for the date range
$offices[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetOfficeGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the market taxes for the date range
$markets[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetAllianceMarketGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the jump gate taxes for the date range
$jumpgates[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetJumpGateGross($date['start'], $date['end']), 2, ".", ","),
];
$pigross[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetPiSalesGross($date['start'], $date['end']), 2, ".", ","),
];
}
return view('admin.dashboards.taxes')->with('pis', $pis)
->with('industrys', $industrys)
->with('offices', $offices)
->with('markets', $markets)
->with('jumpgates', $jumpgates)
->with('reprocessings', $reprocessings)
->with('pigross', $pigross)
->with('srpActual', $srpActual)
->with('srpLoss', $srpLoss);
}
public function displayModifyUser(Request $request) {
$permissions = array();
$name = $request->user;
//Get the user information from the name
$user = User::where(['name' => $name])->first();
$perms = AvailableUserPermission::all();
foreach($perms as $p) {
$permissions[$p->permission] = $p->permission;
}
//Pass the user information to the page for hidden text entries
return view('admin.user.modify')->with('user', $user)
->with('permissions', $permissions);
}
public function modifyUser(Request $request) {
$type = $request->type;
if(isset($request->permission)) {
$permission = $request->permission;
}
if(isset($request->user)) {
$user = $request->user;
}
return redirect('/admin/dashboard')->with('error', 'Not implemented yet.');
}
public function addPermission(Request $request) {
//Get the user and permission from the form
$user = $request->user;
$permission = $request->permission;
//Get the character id from the username using the user table
$character = User::where(['name' => $user])->get(['character_id']);
//Check to see if the character already has the permission
$check = UserPermission::where(['character_id' => $character[0]->character_id, 'permission' => $permission])->get(['permission']);
if(!isset($check[0]->permission)) {
$perm = new UserPermission;
$perm->character_id = $character[0]->character_id;
$perm->permission = $permission;
$perm->save();
return redirect('/admin/dashboard')->with('success', 'User udpated!');
} else {
return redirect('/admin/dashboard')->with('error', 'User not updated or already has the permission.');
}
}
public function removeUser(Request $request) {
//Get the user from the form to delete
$user = $request->user;
//Get the user data from the table
$data = User::where(['name' => $user])->get();
//Delete the user's ESI Scopes
DB::table('EsiScopes')->where(['character_id' => $data[0]->character_id])->delete();
//Delete the user's ESI Token
DB::table('EsiTokens')->where(['character_id' => $data[0]->character_id])->delete();
//Delete the user's role from the roles table
DB::table('user_roles')->where(['character_id' => $data[0]->character_id])->delete();
//Delete the user from the user table
DB::table('users')->where(['character_id' => $data[0]->character_id])->delete();
return redirect('/admin/dashboard')->with('success', 'User deleted from the site.');
}
public function addAllowedLogin(Request $request) {
//Set the parameters to validate the form
$this->validate($request, [
'allowedEntityId' => 'required',
'allowedEntityType' => 'required',
'allowedEntityName' => 'required',
'allowedLoginType' => 'required',
]);
//Check to see if the entity exists in the database already
$found = AllowedLogin::where([
'entity_type' => $request->allowedentityType,
'entity_name' => $request->allowedEntityName,
])->count();
if($found != 0) {
AllowedLogin::where([
'entity_type' => $request->allowedEntityType,
'entity_name' => $request->allowedEntityName,
])->update([
'entity_id' => $request->allowedEntityId,
'entity_type' => $request->allowedEntityType,
'entity_name' => $request->allowedEntityName,
'login_type' => $request->allowedLoginType,
]);
} else {
$login = new AllowedLogin;
$login->entity_id = $request->allowedEntityId;
$login->entity_name = $request->allowedEntityName;
$login->entity_type = $request->allowedEntityType;
$login->login_type = $request->allowedLoginType;
}
return redirect('/admin/dashboard')->with('success', 'Entity added to allowed login list.');
}
public function removeAllowedLogin(Request $request) {
//Set the parameters to validate the form
$this->validate($request, [
'removeAllowedLogin' => 'required',
]);
AllowedLogin::where([
'entity_name' => $request->removeAllowedLogin,
])->delete();
return redirect('/admin/dashboard')->with('success', 'Entity removed from allowed login list.');
}
}

View File

@@ -0,0 +1,440 @@
<?php
namespace App\Http\Controllers\Dashboard;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Carbon\Carbon;
use Khill\Lavacharts\Lavacharts;
use Illuminate\Support\Facades\Auth;
//Libraries
use App\Library\Helpers\TaxesHelper;
use App\Library\Helpers\LookupHelper;
use App\Library\Helpers\SRPHelper;
//Models
use App\Models\User\User;
use App\Models\User\UserRole;
use App\Models\User\UserPermission;
use App\Models\User\AvailableUserPermission;
use App\Models\User\AvailableUserRole;
use App\Models\Admin\AllowedLogin;
use App\Models\Finances\AllianceWalletJournal;
class AdminDashboardController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
$this->middleware('role:User');
}
/**
* Show the administration dashboard.
*/
public function displayAdminDashboard() {
if(auth()->user()->hasRole('Admin') ||
auth()->user()->hasPermission('srp.admin') ||
auth()->user()->hasPermission('contract.admin' ||
auth()->user()->hasPermission('mining.officer'))) {
//Do nothing and continue on
} else {
redirect('/dashboard');
}
return view('admin.dashboards.dashboard');
}
/**
* Display users in a paginated format
*/
public function displayUsersPaginated() {
$this->middleware('role:Admin');
//Declare array variables
$user = array();
$permission = array();
$userArr = array();
$permString = null;
$usersArr = User::orderBy('name', 'asc')->paginate(50);
foreach($usersArr as $user) {
$user->role = $user->getRole();
$permCount = UserPermission::where([
'character_id' => $user->character_id,
])->count();
if($permCount > 0) {
$perms = UserPermission::where([
'character_id' => $user->character_id,
])->get('permission')->toArray();
foreach($perms as $perm) {
$permString .= $perm['permission'] . ', ';
}
$user->permission = $permString;
} else {
$user->permission = 'No Permissions';
}
}
return view('admin.dashboards.userspaged')->with('usersArr', $usersArr);
}
/**
* Search users for a specific user
*/
public function searchUsers(Request $request) {
$this->middleware('role:Admin');
//Declare array variables
$user = array();
$permission = array();
$userArr = array();
$permString = null;
//Validate the input from the form
$this->validate($request, [
'parameter' => 'required',
]);
$usersArr = User::where('name', 'like', $request->parameter . "%")->paginate(50);
foreach($usersArr as $user) {
$user->role = $user->getRole();
$permCount = UserPermission::where([
'character_id' => $user->character_id,
])->count();
if($permCount > 0) {
$perms = UserPermission::where([
'character_id' => $user->character_id,
])->get('permission')->toArray();
foreach($perms as $perm) {
$permString .= $perm['permission'] . ', ';
}
$user->permission = $permString;
} else {
$user->permission = 'No Permissions';
}
}
return view('admin.dashboards.users.searched')->with('usersArr', $usersArr);
}
/**
* Display the allowed logins
*/
public function displayAllowedLogins() {
$this->middleware('role:Admin');
//Declare array variables
$entities = array();
/** Entities for allowed logins */
$legacys = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_name')->toArray();
$renters = AllowedLogin::where(['login_type' => 'Renter'])->pluck('entity_name')->toArray();
//Compile a list of entities by their entity_id
foreach($legacys as $legacy) {
$entities[] = $legacy;
}
foreach($renters as $renter) {
$entities[] = $renter;
}
return view('admin.dashboards.allowed_logins')->with('entities', $entities);
}
/**
* Display the taxes for the alliance
*
*/
public function displayTaxes() {
$this->middleware('role:Admin');
//Declare variables needed for displaying items on the page
$months = 6;
$pi = array();
$industry = array();
$reprocessing = array();
$office = array();
$corpId = 98287666;
$srpActual = array();
$srpLoss = array();
$miningTaxes = array();
$miningTaxesLate = array();
/** Taxes Pane */
//Declare classes needed for displaying items on the page
$tHelper = new TaxesHelper();
$srpHelper = new SRPHelper();
//Get the dates for the tab panes
$dates = $tHelper->GetTimeFrameInMonths($months);
//Get the data for the Taxes Pane
foreach($dates as $date) {
//Get the srp actual pay out for the date range
$srpActual[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($srpHelper->GetAllianceSRPActual($date['start'], $date['end']), 2, ".", ","),
];
//Get the srp loss value for the date range
$srpLoss[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($srpHelper->GetAllianceSRPLoss($date['start'], $date['end']), 2, ".", ","),
];
//Get the pi taxes for the date range
$pis[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetPIGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the industry taxes for the date range
$industrys[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetIndustryGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the reprocessing taxes for the date range
$reprocessings[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetReprocessingGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the office taxes for the date range
$offices[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetOfficeGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the market taxes for the date range
$markets[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetAllianceMarketGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the jump gate taxes for the date range
$jumpgates[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetJumpGateGross($date['start'], $date['end']), 2, ".", ","),
];
$miningTaxes[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetMoonMiningTaxesGross($date['start'], $date['end']), 2, ".", ","),
];
$miningTaxesLate[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetMoonMiningTaxesLateGross($date['start'], $date['end']), 2, ".", ","),
];
$moonRentalTaxes[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetMoonRentalTaxesGross($date['start'], $date['end']), 2, ".", ","),
];
}
return view('admin.dashboards.taxes')->with('pis', $pis)
->with('industrys', $industrys)
->with('offices', $offices)
->with('markets', $markets)
->with('jumpgates', $jumpgates)
->with('reprocessings', $reprocessings)
->with('srpActual', $srpActual)
->with('srpLoss', $srpLoss)
->with('miningTaxes', $miningTaxes)
->with('miningTaxesLate', $miningTaxesLate)
->with('moonRentalTaxes', $moonRentalTaxes);
}
/**
* Display the modify user form
*/
public function displayModifyUser(Request $request) {
$this->middleware('role:Admin');
$permissions = array();
$roles = array();
$name = $request->user;
//Get the user information from the name
$user = User::where(['name' => $name])->first();
$perms = AvailableUserPermission::all();
foreach($perms as $p) {
$permissions[$p->permission] = $p->permission;
}
$tempRoles = AvailableUserRole::all();
foreach($tempRoles as $tempRole) {
array_push($roles, [
$tempRole['role'] => $tempRole['role']
]);
}
$role = $user->getRole();
//Pass the user information to the page for hidden text entries
return view('admin.user.modify')->with('user', $user)
->with('permissions', $permissions)
->with('role', $role)
->with('roles', $roles);
}
/**
* Modify a user's role
*/
public function modifyRole(Request $request) {
$this->middleware('role:Admin');
$this->validate($request, [
'user' => 'required',
'role' => 'required',
]);
UserRole::where(['character_id' => $request->user])->update([
'role' => $request->role,
]);
return redirect('/admin/dashboard/users')->with('success', "User: " . $request->user . " has been modified to a new role: " . $request->role . ".");
}
public function addPermission(Request $request) {
$this->middleware('role:Admin');
//Get the user and permission from the form
$character = $request->user;
$permission = $request->permission;
//Check to see if the character already has the permission
$check = UserPermission::where(['character_id' => $character, 'permission' => $permission])->get(['permission']);
if(!isset($check[0]->permission)) {
$perm = new UserPermission;
$perm->character_id = $character;
$perm->permission = $permission;
$perm->save();
return redirect('/admin/dashboard/users')->with('success', 'User udpated!');
} else {
return redirect('/admin/dashboard/users')->with('error', 'User not updated or already has the permission.');
}
}
/**
* Delete a user to reset their permissions
*/
public function removeUser(Request $request) {
$this->middleware('role:Admin');
//Get the user from the form to delete
$user = $request->user;
//Get the user data from the table
$data = User::where(['name' => $user])->get();
//Delete the user's ESI Scopes
DB::table('EsiScopes')->where(['character_id' => $data[0]->character_id])->delete();
//Delete the user's ESI Token
DB::table('EsiTokens')->where(['character_id' => $data[0]->character_id])->delete();
//Delete the user's role from the roles table
DB::table('user_roles')->where(['character_id' => $data[0]->character_id])->delete();
//Delete the user from the user table
DB::table('users')->where(['character_id' => $data[0]->character_id])->delete();
return redirect('/admin/dashboard/users')->with('success', 'User deleted from the site.');
}
/**
* Add an entity to the allowed login table
*/
public function addAllowedLogin(Request $request) {
$this->middleware('role:Admin');
//Set the parameters to validate the form
$this->validate($request, [
'allowedEntityId' => 'required',
'allowedEntityType' => 'required',
'allowedEntityName' => 'required',
'allowedLoginType' => 'required',
]);
//Check to see if the entity exists in the database already
$found = AllowedLogin::where([
'entity_type' => $request->allowedentityType,
'entity_name' => $request->allowedEntityName,
])->count();
if($found != 0) {
AllowedLogin::where([
'entity_type' => $request->allowedEntityType,
'entity_name' => $request->allowedEntityName,
])->update([
'entity_id' => $request->allowedEntityId,
'entity_type' => $request->allowedEntityType,
'entity_name' => $request->allowedEntityName,
'login_type' => $request->allowedLoginType,
]);
} else {
$login = new AllowedLogin;
$login->entity_id = $request->allowedEntityId;
$login->entity_name = $request->allowedEntityName;
$login->entity_type = $request->allowedEntityType;
$login->login_type = $request->allowedLoginType;
$login->save();
}
return redirect('/admin/dashboard')->with('success', 'Entity added to allowed login list.');
}
/**
* Remove an entity from the allowed login table
*/
public function removeAllowedLogin(Request $request) {
$this->middleware('role:Admin');
//Set the parameters to validate the form
$this->validate($request, [
'removeAllowedLogin' => 'required',
]);
AllowedLogin::where([
'entity_name' => $request->removeAllowedLogin,
])->delete();
return redirect('/admin/dashboard')->with('success', 'Entity removed from allowed login list.');
}
/**
* Show journal entries in a table for admins from alliance wallets
*/
public function displayJournalEntries() {
$this->middleware('role:Admin');
$date = Carbon::now()->subDays(60);
$journal = AllianceWalletJournal::where('date', '>=', $date)
->where([
'corporation_id' => 98287666,
'ref_type' => 'player_donation',
])->orderByDesc('date',)->get(['amount', 'reason', 'description', 'date']);
return view('admin.dashboards.walletjournal')->with('journal', $journal);
}
}

View File

@@ -8,6 +8,11 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Khill\Lavacharts\Lavacharts;
use Carbon\Carbon;
//Application Library
use App\Library\Esi\Esi;
use App\Library\Helpers\StructureHelper;
//Models
use App\Models\Esi\EsiScope;
@@ -16,6 +21,8 @@ use App\Models\User\UserPermission;
use App\Models\User\UserRole;
use App\Models\SRP\SRPShip;
use App\Models\User\UserAlt;
use App\Models\MiningTax\Invoice;
use App\Models\MiningTax\Ledger;
class DashboardController extends Controller
{
@@ -27,7 +34,7 @@ class DashboardController extends Controller
public function __construct()
{
$this->middleware('auth');
$this->middleware('role:Guest');
$this->middleware('role:User');
}
/**
@@ -41,17 +48,24 @@ class DashboardController extends Controller
$open = array();
$approved = array();
$denied = array();
$ores = array();
$altCount = null;
$alts = null;
$structures = array();
$esiHelper = new Esi;
$config = config('esi');
$sHelper = new StructureHelper($config['primary'], $config['corporation']);
$lava = new Lavacharts;
/**
* Alt Counts
*/
//Get the number of the user's alt which are registered so we can process the alt's on the main dashboard page
$altCount = UserAlt::where([
'main_id' => auth()->user()->character_id,
])->count();
//Temporary Measure to keep the page working properly
//$altCount = 0;
//If the alt count is greater than 0 get all of the alt accounts
if($altCount > 0) {
$alts = UserAlt::where([
@@ -59,6 +73,9 @@ class DashboardController extends Controller
])->get();
}
/**
* SRP Items
*/
//See if we can get all of the open SRP requests
$openCount = SRPShip::where([
'character_id' => auth()->user()->character_id,
@@ -162,8 +179,6 @@ class DashboardController extends Controller
}
//Create a chart of number of approved, denied, and open requests via a fuel gauge chart
$lava = new Lavacharts;
$adur = $lava->DataTable();
$adur->addStringColumn('Type')
@@ -186,13 +201,93 @@ class DashboardController extends Controller
],
]);
/**
* Mining Tax Items
*/
//Check for the correct scopes
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-industry.read_corporation_mining.v1')) {
return redirect('/dashboard')->with('error', 'Tell the nub Minerva to register the correct scopes for the services site.');
}
$refreshToken = $esiHelper->GetRefreshToken($config['primary']);
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Get the esi data for extractions
try {
$extractions = $esi->invoke('get', '/corporation/{corporation_id}/mining/extractions', [
'corporation_id' => $config['corporation'],
]);
} catch(RequestFailedException $e) {
Log::critical('Could not retrieve the extractions from ESI in DisplayExtractionCalendar in MiningTaxesController');
return redirect('/dashboard')->with('error', 'Failed to get extraction data from ESI');
}
/**
* Create a 3 month calendar for the past, current, and future extractions
*/
//Create the data tables
$calendar = $lava->DataTable();
$calendar->addDateTimeColumn('Date')
->addNumberColumn('Total');
foreach($extractions as $extraction) {
$sInfo = $sHelper->GetStructureInfo($extraction->structure_id);
array_push($structures, [
'date' => $esiHelper->DecodeDate($extraction->chunk_arrival_time),
'total' => 0,
]);
}
foreach($extractions as $extraction) {
for($i = 0; $i < sizeof($structures); $i++) {
//Create the dates in a carbon object, then only get the Y-m-d to compare.
$tempStructureDate = Carbon::createFromFormat('Y-m-d H:i:s', $structures[$i]['date'])->toDateString();
$extractionDate = Carbon::createFromFormat('Y-m-d H:i:s', $esiHelper->DecodeDate($extraction->chunk_arrival_time))->toDateString();
//check if the dates are equal then increase the total by 1
if($tempStructureDate == $extractionDate) {
$structures[$i]['total'] += 1;
}
}
}
foreach($structures as $structure) {
$calendar->addRow([
$structure['date'],
$structure['total'],
]);
}
$lava->CalendarChart('Extractions', $calendar, [
'title' => 'Upcoming Extractions',
'unusedMonthOutlineColor' => [
'stroke' => '#ECECEC',
'strokeOpacity' => 0.75,
'strokeWidth' => 1,
],
'dayOfWeekLabel' => [
'color' => '#4f5b0d',
'fontSize' => 16,
'italic' => true,
],
'noDataPattern' => [
'color' => '#DDD',
'backgroundColor' => '#11FFFF',
],
'colorAxis' => [
'values' => [0, 5],
'colors' => ['green', 'red'],
],
]);
return view('dashboard')->with('openCount', $openCount)
->with('approvedCount', $approvedCount)
->with('deniedCount', $deniedCount)
->with('open', $open)
->with('approved', $approved)
->with('denied', $denied)
->with('lava', $lava);
->with('lava', $lava)
->with('calendar', $calendar);
}
/**

View File

@@ -0,0 +1,322 @@
<?php
namespace App\Http\Controllers\Finances;
//Internal Libraries
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Carbon\Carbon;
use Log;
use Khill\Lavacharts\Lavacharts;
//Application Library
use App\Library\Helpers\TaxesHelper;
use App\Library\Helpers\LookupHelper;
use App\Library\Helpers\SRPHelper;
//Models
use App\Models\User\User;
class FinanceController extends Controller
{
//Construct
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
$this->middleware('permission:ceo');
}
/**
* Display the finances of the alliance with cards like the admin dashboard
*/
public function displayCards() {
$months = 3;
$pi = array();
$industry = array();
$reprocessing = array();
$office = array();
$corpId = 98287666;
$srpActual = array();
$srpLoss = array();
$miningTaxes = array();
$miningTaxesLate = array();
/** Taxes Pane */
//Declare classes needed for displaying items on the page
$tHelper = new TaxesHelper();
$srpHelper = new SRPHelper();
//Get the dates for the tab panes
$dates = $tHelper->GetTimeFrameInMonths($months);
//Get the data for the Taxes Pane
foreach($dates as $date) {
//Get the srp actual pay out for the date range
$srpActual[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($srpHelper->GetAllianceSRPActual($date['start'], $date['end']), 2, ".", ","),
];
//Get the srp loss value for the date range
$srpLoss[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($srpHelper->GetAllianceSRPLoss($date['start'], $date['end']), 2, ".", ","),
];
//Get the pi taxes for the date range
$pis[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetPIGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the industry taxes for the date range
$industrys[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetIndustryGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the reprocessing taxes for the date range
$reprocessings[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetReprocessingGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the office taxes for the date range
$offices[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetOfficeGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the market taxes for the date range
$markets[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetAllianceMarketGross($date['start'], $date['end']), 2, ".", ","),
];
//Get the jump gate taxes for the date range
$jumpgates[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetJumpGateGross($date['start'], $date['end']), 2, ".", ","),
];
$miningTaxes[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetMoonMiningTaxesGross($date['start'], $date['end']), 2, ".", ","),
];
$miningTaxesLate[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetMoonMiningTaxesLateGross($date['start'], $date['end']), 2, ".", ","),
];
$moonRentalTaxes[] = [
'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetMoonRentalTaxesGross($date['start'], $date['end']), 2, ".", ","),
];
}
return view('finances.display.card')->with('pis', $pis)
->with('industrys', $industrys)
->with('offices', $offices)
->with('markets', $markets)
->with('jumpgates', $jumpgates)
->with('reprocessings', $reprocessings)
->with('srpActual', $srpActual)
->with('srpLoss', $srpLoss)
->with('miningTaxes', $miningTaxes)
->with('miningTaxesLate', $miningTaxesLate)
->with('moonRentalTaxes', $moonRentalTaxes);
}
/**
* Display a graph of the financial outlook of the alliance
*/
public function displayOutlook() {
$months = 12;
$income = array();
$expenses = array();
$totalPi = 0.00;
$totalIndustry = 0.00;
$totalReprocessing = 0.00;
$totalOffices = 0.00;
$totalMarket = 0.00;
$totalJumpGate = 0.00;
$totalMiningTaxes = 0.00;
$totalMoonRentals = 0.00;
$totalSrp = 0.00;
$totalCapEx = 0.00;
$totalSovExpenses = 0.00;
/**
* Declare classes needed for displaying items on the page
*/
$tHelper = new TaxesHelper();
$srpHelper = new SRPHelper();
//Get the dates to process
$dates = $tHelper->GetTimeFrameInMonths($months);
/**
* Setup the chart variables
*/
$lava = new Lavacharts;
$finances = $lava->DataTable();
$incomeStreams = $lava->DataTable();
$expenseStreams = $lava->DataTable();
$finances->addDateColumn('Month')
->addNumberColumn('Income')
->addNumberColumn('Expenses')
->addNumberColumn('Difference')
->setDateTimeFormat('Y');
/**
* Get the income and expenses data for date range
*/
foreach($dates as $date) {
/**
* Get the individual expenses.
* Will totalize later in the foreach loop
*/
$srpActual = $srpHelper->GetAllianceSRPActual($date['start'], $date['end']);
$capEx = 0.00;
$sovExpenses = 3000000000.00;
/**
* Get the individual incomes.
* Will totalize later in the foreach loop
*/
$pi = $tHelper->GetPIGross($date['start'], $date['end']);
$industry = $tHelper->GetIndustryGross($date['start'], $date['end']);
$reprocessing = $tHelper->GetReprocessingGross($date['start'], $date['end']);
$offices = $tHelper->GetOfficeGross($date['start'], $date['end']);
$market = $tHelper->GetAllianceMarketGross($date['start'], $date['end']);
$jumpgate = $tHelper->GetJumpGateGross($date['start'], $date['end']);
$miningTaxes = $tHelper->GetMoonMiningTaxesGross($date['start'], $date['end']) + $tHelper->GetMoonMiningTaxesLateGross($date['start'], $date['end']);
$moonRentals = $tHelper->GetMoonRentalTaxesGross($date['start'], $date['end']);
/**
* Totalize the expenses
*/
$expenses = (($srpActual + $capEx + $sovExpenses) / 1000000.00);
/**
* Totalize the incomes
*/
$incomes = (($pi +
$industry +
$reprocessing +
$offices +
$market +
$jumpgate +
$miningTaxes +
$moonRentals) / 1000000.00);
/**
* Get the difference between income and expenses
*/
$difference = $incomes - $expenses;
//Add the rows for the combo column chart
$finances->addRow([$date['start'], $incomes, $expenses, $difference]);
//Add up each of the income streams, then the expenses
$totalPi += $pi;
$totalIndustry += $industry;
$totalReprocessing += $reprocessing;
$totalOffices += $offices;
$totalMarket += $market;
$totalJumpGate += $jumpgate;
$totalMiningTaxes += $miningTaxes;
$totalMoonRentals += $moonRentals;
$totalSrp += $srpActual;
$totalCapEx = $capEx;
$totalSovExpenses += $sovExpenses;
}
/**
* Finish setting up the lava chart before passing it to the blade template
*/
$lava->ComboChart('Finances', $finances, [
'title' => 'Alliance Finances',
'titleTextStyle' => [
'color' => 'rgb(123, 65, 80)',
'fontSize' => 16,
],
'legend' => [
'position' => 'in',
],
'seriesType' => 'bars',
'series' => [
2 => [
'type' => 'line',
],
],
'height' => 360,
]);
/**
* Setup the 3d pie chart for income streams
*/
$incomeStreams->addStringColumn('Incomes')
->addNumberColumn('ISK')
->addRow(['PI', $totalPi])
->addRow(['Industry', $totalIndustry])
->addRow(['Reprocessing', $totalReprocessing])
->addRow(['Offices', $totalOffices])
->addRow(['Market', $totalMarket])
->addRow(['Jump Gate', $totalJumpGate])
->addRow(['Mining Taxes', $totalMiningTaxes])
->addRow(['Moon Rentals', $totalMoonRentals]);
/**
* Setup the 3d pie chart for expense streams
*/
$expenseStreams->addStringColumn('Expenses')
->addNumberColumn('ISK')
->addRow(['SRP', $totalSrp])
->addRow(['Cap Ex', $totalCapEx])
->addRow(['Sov Expenses', $totalSovExpenses]);
/**
* Setup the pie chart data for income streams
*/
$lava->PieChart('Incomes', $incomeStreams, [
'title' => 'Alliance Income Streams',
'is3D' => true,
'height' => 360,
]);
/**
* Setup the pie chart data for expenses
*/
$lava->PieChart('Expenses', $expenseStreams, [
'title' => 'Alliance Expenses',
'is3D' => true,
'height' => 360,
'slices' => [
['offset' => 0.15],
['offset' => 0.25],
],
]);
return view('finances.display.outlook')->with('lava', $lava);
}
/**
* Request an amount of ISK to fund a capital project
*/
public function requestFundingDisplay() {
}
/**
* Store the request for the capital project
*/
public function storeFundingRequest() {
}
/**
* Delete a request for the capital project
*/
public function deleteFundingRequest() {
}
}

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Fuel;
namespace App\Http\Controllers\Logistics;
//Internal Library
use Illuminate\Http\Request;
@@ -13,17 +13,19 @@ use Auth;
use Charts;
//Library Helpers
use App\Library\Assets\AssetHelper;
use App\Library\Structures\StructureHelper;
use App\Library\Helpers\AssetHelper;
use App\Library\Helpers\StructureHelper;
//Models
use App\Models\Structure\Structure;
use App\Models\Structure\Asset;
use App\Models\Structure\Service;
class FuelController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('permission:logistics.manager');
$this->middleware('role:User');
}
public function displayStructures() {
@@ -80,8 +82,7 @@ class FuelController extends Controller
],
]);
return view('logistics.display.fuel')->with('jumpGates', $jumpGates)
->with('lava', $lava);
return view('logistics.fuel')->with('jumpGates', $jumpGates)
->with('lava', $lava);
}
}

View File

@@ -1,154 +0,0 @@
<?php
namespace App\Http\Controllers\Logistics;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
use DB;
use Carbon\Carbon;
use Khill\Lavacharts\Lavacharts;
//Models
use App\Models\Contracts\EveContract;
//Library
use App\Library\Esi\Esi;
use App\Library\Lookups\LookupHelper;
class LogisticsController extends Controller
{
public function __construct() {
$this->middleware('auth');
}
/**
* Function to display available contracts
*/
public function displayLogisticsContracts() {
$this->middelware('permissions:logistics.courier');
//Get the non-accepted contracts
$openCount == EveContract::where(['status' => 'outstanding'])->count();
$open = EveContract::where([
'status' => 'outstanding',
])->get();
$inProgressCount = EveContract::where(['status' => 'in_progress'])->count();
$inProgress = EveContract::where([
'status' => 'in_progress',
])->get();
$finishedCount = EveContract::where(['status' => 'finished'])->count();
$finished = EveContract::where([
'status' => 'finished',
])->get();
$totalCount = $openCount + $inProgressCount + $finishedCount;
//Fuel Gauge Chart Declarations
$lava = new Lavacharts;
$openChart = $lava->DataTable();
$openChart->addStringColumn('Contracts')
->addNumberColumn('Number')
->addRow(['Open Contracts', $openCount]);
$lava->GaugeChart('Open Contracts', $openChart, [
'width' => 300,
'greenFrom' => 0,
'greenTo' => 10,
'yellowFrom' => 10,
'yellowTo', 30,
'redFrom' => 30,
'redTo' => 100,
'majorTicks' => [
'Normal',
'Delayed',
'Backed Up',
],
]);
return view('logistics.display.contracts')->with('open', $open)
->with('inProgress', $inProgress)
->with('finished', $finished)
->with('openCount', $openCount)
->with('inProgressCount', $inProgressCount)
->with('finishedCount', $finishedCount)
->with('totalCount', $totalCount)
->with('lava', $lava);
}
/**
* Function to calculate details needing to be set for contracts
*/
public function displayContractForm() {
//Declare some variables
$route = LogisticsRoute::pluck('name');
return view('logistics.display.courierform')->with('route', $route);
}
/**
* Function to calculate details needing to be set for contracts
*/
public function displayContractDetails(Request $request) {
$startSystem = null;
$endSystem = null;
$reward = null;
$okVolume = null;
$corporation = null;
$this->validate($request, [
'route' => 'required',
'volume' => 'required',
'collateral' => 'required',
]);
//Sanitize the collateral string as we want
$collateral = str_replace(' ISK', '', $request->collateral);
$collateral = str_replace(',', '', $collateral);
$collateral = floatval($collateral);
$volume = $request->volume;
$route = LogisticsRoute::where([
'name'=> $request->route,
])->get();
if($routeCount == 0) {
$startSystem = 'N/A';
$endSystem = 'N/A';
} else {
//Check the volume of the contract
if($volume > $route->max_size) {
$okVolume = false;
} else {
$okVolume = true;
}
//Compose the route to be displayed
$tempSystem = explode(' -> ', $request->route);
$startSystem = $tempSystem[0];
$endSystem = $tempSystem[1];
if($startSystem == 'Jita' || $endSystem == 'Jita') {
$corporation = 'Infernal Armada';
} else {
$corporation = 'Inmate Logistics';
}
//Calculate the route parameters
$reward = ($route->price_per_m3 * $volume) + ( $collateral * 1.02);
}
return view('logistics.display.courier')->with('okVolume', $okVolume)
->with('collateral', $collateral)
->with('reward', $reward)
->with('startSystem', $startSystem)
->with('endSystem', $endSystem)
->with('corporation', $corporation);
}
}

View File

@@ -1,74 +0,0 @@
<?php
namespace App\Http\Controllers\Logistics;
//Internal Libraries
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
use Log;
//Library Helpers
use App\Library\Lookups\NewLookupHelper;
//Models
use App\Models\Logistics\AnchorStructure;
class StructureRequestController extends Controller
{
public function __construct() {
$this->middleware('auth');
}
public function displayForm() {
return view('structurerequest.requeststructure');
}
public function storeForm() {
$this->validate($request, [
'corporation_name' => 'required',
'system' => 'required',
'structure_size' => 'required',
'structure_type' => 'required',
'requested_drop_time' => 'required',
'requester' => 'required',
]);
$lookup = new NewLookupHelper;
$requesterId = $lookup->CharacterNameToId($request->requester);
$corporationId = $lookup->CorporationNameToId($request->corporation_name);
AnchorStructure::insert([
'corporation_id' => $corporationId,
'corporation_name' => $request->corporation_name,
'system' => $request->system,
'structure_size' => $request->structure_size,
'structure_type' => $request->structure_type,
'requested_drop_time' => $request->requested_drop_time,
'requester_id' => $requesterId,
'requester' => $request->requester,
]);
return redirect('/structures/display/requests');
}
public function displayRequests() {
$reqs = AnchorStructure::all();
return view('structurerequest.display.structurerequests')->with('reqs', $reqs);
}
public function deleteRequest($request) {
$this->validate($request, [
'id' => 'required',
]);
AnchorStructure::where([
'id' => $request->id,
])->delete();
return redirect('/structures/display/requests');
}
}

View File

@@ -1,85 +0,0 @@
<?php
namespace App\Http\Controllers\Market;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
use DB;
use Carbon\Carbon;
//Library
use App\Library\Esi\Esi;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Taxes\TaxesHelper;
//Models
use App\Models\Esi\EsiToken;
use App\Models\Esi\EsiScope;
use App\Models\Finances\CorpMarketJournal;
use App\Models\Finances\CorpMarketStructure;
class MarketController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
$this->middleware('permission:structure.market');
}
public function displayAddMarketTax() {
return view('market.add.display');
}
public function storeAddMarketTax(Request $request) {
$this->validate($request, [
'tax' => 'required',
]);
$charId = auth()->user()->getId();
//Declare the esi helper
$esiHelper = new Esi;
//Create the esi container to get the character's public information
$esi = new Eseye();
try {
$charInfo = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => $charId,
]);
} catch(RequestExceptionFailed $e) {
return redirect('/market/add')->with('erorr', 'Failed to get character info.');
}
$ratio = $request->tax / 2.5;
$corpMarket = new CorpMarketStructure;
$corpMarket->character_id = $charId;
$corpMarket->corporation_id = $charInfo->corporation_id;
$corpMarket->tax = $request->tax;
$corpMarket->ratio = $ratio;
$corpMarket->save();
return redirect('/dahsboard')->with('success', 'Market structure recorded.');
}
public function displayTaxes() {
$charId = auth()->user()->getId();
$esi = new Eseye();
try {
$charInfo = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => $charId,
]);
} catch(RequestExceptionFailed $e) {
return redirect('/market/add')->with('erorr', 'Failed to get character info.');
}
//Get the total taxes from the database for each of the 3 months in the past
}
}

View File

@@ -0,0 +1,308 @@
<?php
namespace App\Http\Controllers\MiningTaxes;
//Internal Library
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Log;
use Carbon\Carbon;
use Khill\Lavacharts\Lavacharts;
use Auth;
use Illuminate\Support\Str;
use Illuminate\Support\Collection;
//Application Library
use App\Library\Helpers\LookupHelper;
use App\Library\Helpers\StructureHelper;
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
//Models
use App\Models\MiningTax\Invoice;
use App\Models\MiningTax\Observer;
use App\Models\MiningTax\Ledger;
use App\Models\MiningTax\Payment;
use App\Models\Moon\ItemComposition;
use App\Models\Moon\MineralPrice;
use App\Models\Esi\EsiToken;
use App\Models\Esi\EsiScope;
use App\Models\Structure\Structure;
use App\Models\MiningTax\MiningOperation;
class MiningTaxesAdminController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
$this->middleware('permission:mining.officer');
}
/**
* Display the form for mining operations held by the alliance
*/
public function displayMiningOperationForm() {
//Declare variables
$config = config('esi');
$lookup = new LookupHelper;
$sHelper = new StructureHelper($config['primary'], $config['corporation']);
$coll = new Collection;
$structures = new Collection;
//Get all of the structures
$athanors = $sHelper->GetStructuresByType('Athanor');
$tataras = $sHelper->GetStructuresByType('Tatara');
//Cycle through each athanor and add it to the stack
foreach($athanors as $athanor) {
$structures->push([
$athanor->structure_id => $athanor->structure_name,
]);
}
//Cycle through each tatara and add it to the stack
foreach($tataras as $tatara) {
$structures->push([
$tatara->structure_id => $tatara->structure_name,
]);
}
//Sort all of the structures
$structures->sort();
//Get the current mining operations.
$operations = MiningOperation::where([
'processed' => 'No',
])->get();
return view('miningtax.admin.display.miningops.form')->with('structures', $structures)
->with('operations', $operations);
}
/**
* Store the results from the mining operations form
*/
public function storeMiningOperationForm(Request $request) {
//Validate the data
$this->validate($request, [
'name' => 'required',
'date' => 'required',
'structure' => 'required',
]);
$config = config('esi');
$sHelper = new StructureHelper($config['primary'], $config['corporation']);
//Get the name of the structure from the database
$m = $sHelper->GetStructureInfo($request->structure);
//Save the mining operation into the database
$operation = new MiningOperation;
$operation->structure_id = $request->structure;
$operation->structure_name = $m->structure_name;
$operation->authorized_by_id = auth()->user()->getId();
$operation->authorized_by_name = auth()->user()->getName();
$operation->operation_name = $request->name;
$operation->operation_date = $request->date;
$operation->processed = 'No';
$operation->processed_on = null;
$operation->save();
return redirect('/admin/dashboard')->with('success', 'Operation added successfully.');
}
/**
* Display the page to approve corporation moon rentals
*/
public function DisplayMoonRentalRequests() {
}
/**
* Approve a moon rental from the form
*/
public function storeApproveMoonRentalRequest() {
}
/**
* Display the page to setup the form for corporations to rent a moon
*/
public function DisplayMoonRentalForm() {
}
/**
* Store the details for the form for corporations renting a specific moon
*/
public function StoreMoonRentalForm() {
}
/**
* Remove a moon from being rented from a specific corporation
*/
public function DeleteMoonRental(Request $request) {
}
/**
* Display an invoice based on it's id
*
* @var $invoiceId
*/
public function displayInvoice($invoiceId) {
$ores = array();
$moons = array();
$totalPrice = 0.00;
$config = config('esi');
$structure = new StructureHelper($config['primary'], $config['corporation']);
//Get the invoice from the database
$invoice = Invoice::where([
'invoice_id' => $invoiceId,
])->first();
//Get the line items for the ledger for the invoice
$items = Ledger::where([
'invoice_id' => $invoiceId,
])->get();
//Build the total ores table for the display page
foreach($items as $item) {
if(!isset($ores[$item['ore_name']])) {
$ores[$item['ore_name']] = 0;
}
$ores[$item['ore_name']] = $ores[$item['ore_name']] + $item['quantity'];
$totalPrice += $item['amount'];
}
//Print out the lines of the ledger line by line for another table
foreach($items as $item) {
//Get the structure info from the database or esi
$tempObserverInfo = $structure->GetStructureInfo($item['observer_id']);
if(isset($tempObserverInfo->name)) {
array_push($moons, [
'character_name' => $item['character_name'],
'observer_name' => $tempObserverInfo->name,
'type_id' => $item['type_id'],
'ore_name' => $item['ore_name'],
'quantity' => $item['quantity'],
'amount' => $item['amount'],
'tax_amount' => $item['amount'] * $config['public_mining_tax'],
]);
} else {
array_push($moons, [
'character_name' => $item['character_name'],
'observer_name' => $tempObserverInfo->structure_name,
'type_id' => $item['type_id'],
'ore_name' => $item['ore_name'],
'quantity' => $item['quantity'],
'amount' => $item['amount'],
'tax_amount' => $item['amount'] * $config['public_mining_tax'],
]);
}
}
return view('miningtax.admin.display.details.invoice')->with('ores', $ores)
->with('moons', $moons)
->with('invoice', $invoice)
->with('totalPrice', $totalPrice);
}
/**
* Display current unpaid invoices
*/
public function DisplayUnpaidInvoice() {
$invoices = Invoice::where([
'status' => 'Pending',
])->orWhere([
'status' => 'Late',
])->orWhere([
'status' => 'Deferred',
])->orderByDesc('invoice_id')->paginate(50);
$totalAmount = Invoice::where([
'status' => 'Pending',
])->orWhere([
'status' => 'Late',
])->orWhere([
'status' => 'Deferred',
])->sum('invoice_amount');
return view('miningtax.admin.display.unpaid')->with('invoices', $invoices);
}
/**
* Search unpaid invoices
*/
public function SearchUnpaidInvoice(Request $request) {
$invoices = Invoice::where('invoice_id', 'LIKE', '%' . $request->q . '%')
->where(['status' => 'Pending'])
->orWhere(['status' => 'Late'])
->orWhere(['status' => 'Deferred'])
->orderByDesc('invoice_id')
->paginate(25);
if(count($invoices) > 0) {
return view('miningtax.admin.display.unpaid')->with('invoices', $invoices);
}
return view('miningtax.admin.display.unpaid')->with('error', 'No invoices found');
}
/**
* Display page to modify an unpaid invoice
*/
public function DisplayModifyInvoice() {
}
/**
* Modify an unpaid invoice
*/
public function ProcessModifyInvoice() {
}
/**
* Mark an invoice paid
*/
public function UpdateInvoice(Request $request) {
$this->validate($request, [
'invoiceId' => 'required',
'status' => 'required',
]);
Invoice::where([
'invoice_id' => $request->invoiceId,
])->update([
'status' => $request->status,
'modified_by_id' => auth()->user()->getId(),
'modified_by_name' => auth()->user()->getName(),
]);
return redirect('/miningtax/admin/display/unpaid')->with('success', 'Invoice successfully updated.');
}
/**
* Display past paid invoices
*/
public function DisplayPaidInvoices() {
$invoices = Invoice::where([
'status' => 'Paid',
])->orWhere([
'status' => 'Paid Late',
])->paginate(50);
$totalAmount = Invoice::where([
'status' => 'Paid',
])->orWhere([
'status' => 'Paid Late',
])->sum('invoice_amount');
return view('miningtax.admin.display.paidinvoices')->with('invoices', $invoices)
->with('totalAmount', $totalAmount);
}
}

View File

@@ -0,0 +1,635 @@
<?php
namespace App\Http\Controllers\MiningTaxes;
//Internal Library
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use DB;
use Log;
use Carbon\Carbon;
use Khill\Lavacharts\Lavacharts;
use Auth;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
//Library Helpers
use App\Library\Helpers\LookupHelper;
use App\Library\Helpers\StructureHelper;
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Moons\MoonCalc;
//Models
use App\Models\Moon\ItemComposition;
use App\Models\Moon\MineralPrice;
use App\Models\MiningTax\Ledger;
use App\Models\MiningTax\Observer;
use App\Models\MiningTax\Invoice;
use App\Models\Esi\EsiToken;
use App\Models\Esi\EsiScope;
use App\Models\User\User;
use App\Models\MoonRental\AllianceMoon;
use App\Models\MoonRental\AllianceMoonOre;
use App\Models\MoonRental\AllianceMoonRental;
class MiningTaxesController extends Controller
{
/**
* Construct to deal with middleware and other items
*/
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
}
/**
* Display the moons either the person is renting, or their corp are renting
*/
public function DisplayRentedMoons() {
$moons = array();
$lookup = new LookupHelper;
$userId = auth()->user()->getId();
$charInfo = $lookup->GetCharacterInfo(auth()->user()->getId());
$corpId = $charInfo->corporation_id;
$tempMoons = AllianceMoonRental::where([
'entity_id' => $userId,
])->orWhere([
'entity_id' => $corpId,
])->get();
//Foreach of the moons we got let's build the moon info and the ore data
foreach($tempMoons as $tempMoon) {
//Get the ores for the moon
$ores = AllianceMoonOre::where([
'moon_id' => $tempMoon->moon_id,
])->get()->toArray();
$moons->push([
'moon_id' => $tempMoon->moon_id,
'system' => $tempMoon->system_name,
'moon_name' => $tempMoon->name,
'ores' => $ores,
'worth_amount' => $tempMoon->worth_amount,
'rental_amount' => $tempMoon->rental_amount,
]);
}
return view('miningtax.user.display.rentedmoons')->with('moons', $moons)
->with('ores', $ores);
}
/**
* Display the page with the moon rental form
*/
public function DisplayMoonRentalForm(Request $request) {
$this->validate($request, [
'moon_id' => 'required',
'moon_name' => 'required',
'worth_amount' => 'required',
'rental_amount' => 'required',
]);
$moon = AllianceMoon::where([
'moon_id' => $request->moon_id,
])->first();
$ores = AllianceMoonOre::where([
'moon_id' => $request->moon_id,
])->get();
return view('miningtax.user.display.moonrentals.form')->with('moon', $moon)
->with('ores', $ores);
}
/**
* Store the information from the moon rental form
*/
public function storeMoonRentalForm(Request $request) {
$this->validate($request, [
'moon_id' => 'required',
'rental_start' => 'required',
'rental_end' => 'required',
'entity_name' => 'required',
'entity_type' => 'required',
]);
$lookup = new LookupHelper;
$entityId = null;
//From the name and type of the entity get the entity id.
if($request->entity_type == 'Character') {
$entityId = $lookup->CharacterNameToId($request->entity_name);
} else if($request->entity_type == 'Corporation') {
$entityId = $lookup->CorporationNameToId($request->entity_name);
} else if($request->entity_type == 'Alliance') {
$entityId = $lookup->AllianceNameToId($request->entity_name);
} else {
return redirect('/dashboard')->with('error', 'Moon Rental error. Please contact the site admin.');
}
//Create the next billing date from a Carbon date 3 months from the rental start
$nextBillingDate = Carbon::create($request->rental_start)->addMonths(3);
//Create the uniqid for the billing cycle.
$invoiceId = "MR" . uniqid();
//Get the moon's information from the database so we know how much to make the bill for
$moon = AllianceMoon::where([
'moon_id' => $request->moon_id,
])->first();
//Update the data on the Alliance Moon
AllianceMoon::where([
'moon_id' => $request->moon_id,
])->update([
'rented' => 'Yes',
]);
//Insert a new moon rental into the database
AllianceMoonRental::insert([
'moon_id' => $moon->moon_id,
'moon_name' => $moon->name,
'rental_amount' => $moon->rental_amount,
'rental_start' => $request->rental_start,
'rental_end' => $request->rental_end,
'next_billing_date' => $nextBillingDate,
'entity_id' => $entityId,
'entity_name' => $request->entity_name,
'entity_type' => $request->entity_type,
]);
return redirect('/dashboard')->with('success', 'Before placing a structure please send the ISK to the holding corp with the description of ' . $invoiceId);
}
public function displayAvailableMoons() {
//Declare variables
$moons = new Collection;
$mHelper = new MoonCalc;
$lookup = new LookupHelper;
$system = array();
/**
* Declare our different flavors of moon goo for the blade
*/
$r4Goo = [
'Zeolites',
'Sylvite',
'Bitumens',
'Coesite',
];
$r8Goo = [
'Cobaltite',
'Euxenite',
'Titanite',
'Scheelite',
];
$r16Goo = [
'Otavite',
'Sperrylite',
'Vanadinite',
'Chromite',
];
$r32Goo = [
'Carnotite',
'Zircon',
'Pollucite',
'Cinnabar',
];
$r64Goo = [
'Xenotime',
'Monazite',
'Loparite',
'Ytterbite',
];
//Get all of the system names from the database by plucking all the non-rented moon system names
$systems = AllianceMoon::where([
'rented' => 'No',
])->pluck('system_name')->unique()->toArray();
//Get all of the moons which are not rented
$allyMoons = AllianceMoon::where([
'rented' => 'No',
])->get();
//Cycle through all of the moons to create arrays of data
foreach($allyMoons as $moon) {
$ores = AllianceMoonOre::where([
'moon_id' => $moon->moon_id,
])->get(['ore_name', 'quantity'])->toArray();
if($moon->moon_type != 'R32' && $moon->moon_type != 'R64') {
$moons->push([
'system' => $moon->system_name,
'moon_name' => $moon->name,
'ores' => $ores,
'worth_amount' => $moon->worth_amount,
'rental_amount' => $moon->rental_amount,
'moon_id' => $moon->moon_id,
]);
}
}
return view('miningtax.user.display.moons.availablemoons')->with('moons', $moons)
->with('systems', $systems)
->with('r4Goo', $r4Goo)
->with('r8Goo', $r8Goo)
->with('r16Goo', $r16Goo)
->with('r32Goo', $r32Goo)
->with('r64Goo', $r64Goo);
}
/**
* Display all the moons in Warped Intentions Sovreignty
*/
public function displayAllMoons() {
//Declare variables
$moons = new Collection;
$mHelper = new MoonCalc;
$lookup = new LookupHelper;
$system = array();
/**
* Declare our different flavors of moon goo for the blade
*/
$r4Goo = [
'Zeolites',
'Sylvite',
'Bitumens',
'Coesite',
];
$r8Goo = [
'Cobaltite',
'Euxenite',
'Titanite',
'Scheelite',
];
$r16Goo = [
'Otavite',
'Sperrylite',
'Vanadinite',
'Chromite',
];
$r32Goo = [
'Carnotite',
'Zircon',
'Pollucite',
'Cinnabar',
];
$r64Goo = [
'Xenotime',
'Monazite',
'Loparite',
'Ytterbite',
];
$systems = [
'0-NTIS',
'1-NJLK',
'35-JWD',
'8KR9-5',
'EIMJ-M',
'F-M1FU',
'G-C8QO',
'I6M-9U',
'L5D-ZL',
'L-YMYU',
'VQE-CN',
'VR-YIQ',
'XZ-SKZ',
'Y-CWQY',
];
//Get all of the moons which are not rented
$allyMoons = AllianceMoon::all();
foreach($allyMoons as $moon) {
$ores = AllianceMoonOre::where([
'moon_id' => $moon->moon_id,
])->get(['ore_name', 'quantity'])->toArray();
$moons->push([
'system' => $moon->system_name,
'moon_name' => $moon->name,
'ores' => $ores,
]);
}
return view('miningtax.user.display.moons.allmoons')->with('moons', $moons)
->with('systems', $systems)
->with('r4Goo', $r4Goo)
->with('r8Goo', $r8Goo)
->with('r16Goo', $r16Goo)
->with('r32Goo', $r32Goo)
->with('r64Goo', $r64Goo);
}
/**
* Display an invoice based on it's id
*
* @var $invoiceId
*/
public function displayInvoice($invoiceId) {
$ores = array();
$moons = array();
$totalPrice = 0.00;
$config = config('esi');
$structure = new StructureHelper($config['primary'], $config['corporation']);
$systems = AllianceMoon::where([
'rented' => 'No',
])->pluck('system_name')->unique()->toArray();
//Get the invoice from the database
$invoice = Invoice::where([
'invoice_id' => $invoiceId,
])->first();
//Get the line items for the ledger for the invoice
$items = Ledger::where([
'invoice_id' => $invoiceId,
])->get();
//Build the total ores table for the display page
foreach($items as $item) {
if(!isset($ores[$item['ore_name']])) {
$ores[$item['ore_name']] = 0;
}
$ores[$item['ore_name']] = $ores[$item['ore_name']] + $item['quantity'];
$totalPrice += $item['amount'];
}
//Print out the lines of the ledger line by line for another table
foreach($items as $item) {
//Get the structure info from the database or esi
$tempObserverInfo = $structure->GetStructureInfo($item['observer_id']);
//Create the array for the line by line
array_push($moons, [
'character_name' => $item['character_name'],
'observer_name' => $tempObserverInfo->structure_name,
'type_id' => $item['type_id'],
'ore_name' => $item['ore_name'],
'quantity' => $item['quantity'],
'amount' => $item['amount'],
'tax_amount' => $item['amount'] * $config['public_mining_tax'],
]);
}
return view('miningtax.user.display.details.invoice')->with('ores', $ores)
->with('moons', $moons)
->with('invoice', $invoice)
->with('totalPrice', $totalPrice);
}
/**
* Display the users invoices
*/
public function DisplayInvoices() {
//Declare variables
$paidAmount = 0.00;
$unpaidAmount = 0.00;
//Get the unpaid invoices
$unpaid = Invoice::where([
'status' => 'Pending',
'character_id' => auth()->user()->getId(),
])->paginate(15);
//Get the late invoices
$late = Invoice::where([
'status' => 'Late',
'character_id' => auth()->user()->getId(),
])->paginate(10);
//Get the deferred invoices
$deferred = Invoice::where([
'status' => 'Deferred',
'character_id' => auth()->user()->getId(),
])->paginate(10);
//Get the paid invoices
$paid = Invoice::where([
'status' => 'Paid',
'character_id' => auth()->user()->getId(),
])->paginate(15);
//Total up the unpaid invoices
foreach($unpaid as $un) {
$unpaidAmount += $un->invoice_amount;
}
//Total up the paid invoices
foreach($paid as $p) {
$paidAmount += $p->invoice_amount;
}
return view('miningtax.user.display.invoices.invoices')->with('unpaid', $unpaid)
->with('late', $late)
->with('deferred', $deferred)
->with('paid', $paid)
->with('unpaidAmount', $unpaidAmount)
->with('paidAmount', $paidAmount);
}
/**
* Display all of the upcoming extractions
*/
public function DisplayUpcomingExtractions() {
//Declare variables
$structures = array();
$esiHelper = new Esi;
$config = config('esi');
$sHelper = new StructureHelper($config['primary'], $config['corporation']);
$structures = array();
$structuresCalendar = array();
$lava = new Lavacharts;
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-industry.read_corporation_mining.v1')) {
return redirect('/dashboard')->with('error', 'Tell the nub Minerva to register the correct scopes for the services site.');
}
$refreshToken = $esiHelper->GetRefreshToken($config['primary']);
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Get the esi data for extractions
try {
$extractions = $esi->invoke('get', '/corporation/{corporation_id}/mining/extractions/', [
'corporation_id' => $config['corporation'],
]);
} catch(RequestFailedException $e) {
Log::warning('Could not retrieve extractions from ESI in MiningTaxesController.php');
return redirect('/dashboard')->with('error', "Could not pull extractions from ESI data.");
}
//Basically get the structure info and attach it to the variable set
foreach($extractions as $ex) {
$sName = $sHelper->GetStructureInfo($ex->structure_id);
//Add the information into the structures array to go to the page to be displayed
array_push($structures, [
'structure_name' => $sName->structure_name,
'start_time' => $esiHelper->DecodeDate($ex->extraction_start_time),
'arrival_time' => $esiHelper->DecodeDate($ex->chunk_arrival_time),
'decay_time' => $esiHelper->DecodeDate($ex->natural_decay_time),
]);
}
//Sort extractions by arrival time
$structuresCollection = collect($structures);
$sorted = $structuresCollection->sortBy('arrival_time');
//Store the sorted collection back into the variable before being used again.
$structures = $sorted->all();
/**
* Create a 3 month calendar for the past, current, and future extractions
*/
//Create the data tables
$calendar = $lava->DataTable();
$calendar->addDateTimeColumn('Date')
->addNumberColumn('Total');
foreach($extractions as $extraction) {
array_push($structuresCalendar, [
'date' => $esiHelper->DecodeDate($extraction->chunk_arrival_time),
'total' => 0,
]);
}
foreach($extractions as $extraction) {
for($i = 0; $i < sizeof($structuresCalendar); $i++) {
//Create the dates in a carbon object, then only get the Y-m-d to compare.
$tempStructureDate = Carbon::createFromFormat('Y-m-d H:i:s', $structuresCalendar[$i]['date'])->toDateString();
$extractionDate = Carbon::createFromFormat('Y-m-d H:i:s', $esiHelper->DecodeDate($extraction->chunk_arrival_time))->toDateString();
//check if the dates are equal then increase the total by 1
if($tempStructureDate == $extractionDate) {
$structuresCalendar[$i]['total'] += 1;
}
}
}
foreach($structuresCalendar as $structureC) {
$calendar->addRow([
$structureC['date'],
$structureC['total'],
]);
}
$lava->CalendarChart('Extractions', $calendar, [
'title' => 'Upcoming Extractions',
'unusedMonthOutlineColor' => [
'stroke' => '#ECECEC',
'strokeOpacity' => 0.75,
'strokeWidth' => 1,
],
'dayOfWeekLabel' => [
'color' => '#4f5b0d',
'fontSize' => 16,
'italic' => true,
],
'noDataPattern' => [
'color' => '#DDD',
'backgroundColor' => '#11FFFF',
],
'colorAxis' => [
'values' => [0, 5],
'colors' => ['green', 'red'],
],
]);
//Return the view with the extractions variable for html processing
return view('miningtax.user.display.pulls.upcoming')->with('structures', $structures)
->with('lava', $lava)
->with('calendar', $calendar);
}
/**
* Display the ledger for the moons.
*/
public function DisplayMoonLedgers() {
//Declare variables
$structures = array();
$tempLedgers = array();
$miningLedgers = array();
$ledgers = array();
$esiHelper = new Esi;
$lookup = new LookupHelper;
$config = config('esi');
//Check for the esi scope
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-industry.read_corporation_mining.v1')) {
return redirect('/dashboard')->with('error', 'Tell the nub Minerva to register the ESI for the holding corp for corp mining.');
} else {
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-universe.read_structures.v1')) {
return redirect('/dashboard')->with('error', 'Tell the nub Minerva to register the ESI for the holding corp for structures.');
}
}
//Get the refresh token if scope checks have passed
$refreshToken = $esiHelper->GetRefreshToken($config['primary']);
//Setup the esi container
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Declare the structure helper after the esi container has been created
$sHelper = new StructureHelper($config['primary'], $config['corporation'], $esi);
//Get the character data from the lookup table if possible or esi
$character = $lookup->GetCharacterInfo($config['primary']);
//Get the corporation information from the character id
$corpInfo = $lookup->GetCorporationInfo($character->corporation_id);
//Get the observers from the database
$observers = Observer::all();
//Get the ledgers for each structure one at a time
foreach($observers as $obs) {
//Get the structure information
$structureInfo = $sHelper->GetStructureInfo($obs->observer_id);
//Add the name to the structures array
array_push($structures, $structureInfo->name);
/**
* Get the ledger from each observer.
* We don't care about observer type as it can only be an Athanor or Tatara
*/
$ledgers = Ledger::where([
'observer_id' => $obs->observer_id,
'character_id' => auth()->user()->getId(),
])->where('last_updated', '>=', Carbon::now()->subDays(30))->get();
if($ledgers->count() > 0) {
foreach($ledgers as $ledger) {
//Foreach ledger add it to the array
array_push($miningLedgers, [
'structure' => $structureInfo->name,
'character' => auth()->user()->getName(),
'corpTicker' => $corpInfo->ticker,
'ore' => $ledger->ore_name,
'quantity' => $ledger->quantity,
'updated' => $ledger->last_updated,
]);
}
}
}
//Return the view
return view('miningtax.user.display.details.ledger')->with('miningLedgers', $miningLedgers)
->with('structures', $structures);
}
}

View File

@@ -1,55 +0,0 @@
<?php
namespace App\Http\Controllers\Moons;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Log;
use DB;
//App Library
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Structures\StructureHelper;
//App Models
use App\Models\Esi\EsiToken;
use App\Models\Esi\EsiScope;
use App\Models\Structure\Structure;
use App\Models\Structure\Service;
class MoonLedgerController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
$this->middleware('permission:corp.lead');
}
public function displaySelection() {
//Declare variables
$structures = array();
return view('moons.ledger.displayselect')->with('structures', $structures);
}
public function displayLedger(Request $request) {
//Validate the request
$this->validate($request, [
'id' => 'required',
]);
//Declare variables
$esiHelper = new Esi;
//Create the authentication container for ESI, and check for the correct scopes
$config = config('esi');
}
}

View File

@@ -1,453 +0,0 @@
<?php
namespace App\Http\Controllers\Moons;
//Internal Library
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Auth;
use DB;
use Carbon\Carbon;
//Models
use App\Models\Moon\Config;
use App\Models\Moon\ItemComposition;
use App\Models\Moon\Moon;
use App\Models\Moon\OrePrice;
use App\Models\Moon\Price;
use App\Models\MoonRent\MoonRental;
//Library
use App\Library\Moons\MoonCalc;
use App\Library\Esi\Esi;
use App\Library\Lookups\LookupHelper;
use App\Library\Lookups\NewLookupHelper;
class MoonsAdminController extends Controller
{
public function __construct() {
$this->middleware('auth');
}
/**
* Function to display the moons to logistics personnel
*/
public function displayMoonsLogistics() {
$this->middleware('permissions:logistics.manager');
$lookup = new LookupHelper;
$rentalEnd = '';
$ticker = '';
//Setup calls to the MoonCalc class
$moonCalc = new MoonCalc();
//Get all of the moons from the database
$moons = Moon::orderBy('System', 'asc')->get();
//Declare the html variable and set it to null
$table = array();
//Set carbon dates as needed
$lastMonth = Carbon::now()->subMonth();
$today = Carbon::now();
foreach($moons as $moon) {
//Get the rental data for the moon
$count = MoonRental::where([
'System' => $moon->System,
'Planet' => $moon->Planet,
'Moon' => $moon->Moon,
])->count();
//Check if their is a current rental for a moon going on
if($count == 0) {
//If we don't find a rental record, mark the moon as not paid
$paid = 'No';
//If we don't find a rental record, set the rental date as last month
$rentalTemp = $lastMonth;
$rentalEnd = $rentalTemp->format('m-d');
//Set the ticker info
$ticker = 'N/A';
} else {
//Get the rental data for the moon
$rental = MoonRental::where([
'System' => $moon->System,
'Planet' => $moon->Planet,
'Moon' => $moon->Moon,
])->first();
//If we find a rental record, mark the moon as whether it's paid or not
$paid = $rental->Paid;
//Set the rental date up
$rentalTemp = new Carbon($rental->RentalEnd);
$rentalEnd = $rentalTemp->format('m-d');
}
//Set the color for the table
if($rentalTemp->diffInDays($today) < 3 ) {
$color = 'table-warning';
} else if( $today > $rentalTemp) {
$color = 'table-success';
} else {
$color = 'table-danger';
}
//Add the data to the html string to be passed to the view
array_push($table, [
'SPM' => $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon,
'StructureName' => $moon->StructureName,
'RentalEnd' => $rentalEnd,
'RowColor' => $color,
]);
}
return view('moons.logistics.adminmoon')->with('table', $table);
}
/**
* Function to display the moons to admins
*/
public function displayMoonsAdmin() {
$this->middleware('role:Admin');
$lookup = new LookupHelper;
$lookupHelper = new NewLookupHelper;
$contact = '';
$paid = '';
$rentalEnd = '';
$renter = '';
$ticker = '';
//Setup calls to the MoonCalc class
$moonCalc = new MoonCalc();
//Get all of the moons from the database
$moons = Moon::orderBy('System', 'asc')->get();
//Declare the html variable and set it to null
$table = array();
//Set carbon dates as needed
$lastMonth = Carbon::now()->subMonth();
$today = Carbon::now();
foreach($moons as $moon) {
//Get the rental data for the moon
$count = MoonRental::where([
'System' => $moon->System,
'Planet' => $moon->Planet,
'Moon' => $moon->Moon,
])->count();
//Check if their is a current rental for a moon going on
if($count == 0) {
//If we don't find a rental record, mark the moon as not paid
$paid = 'No';
//If we don't find a rental record, set the rental date as last month
$rentalTemp = $lastMonth;
$rentalEnd = $rentalTemp->format('m-d');
//Set the contact info
$contact = 'None';
//Set the renter info
$renter = 'None';
//Set the ticker info
$ticker = 'N/A';
//Set the type info as it's needed
$type = 'N/A';
} else {
//Get the rental data for the moon
$rental = MoonRental::where([
'System' => $moon->System,
'Planet' => $moon->Planet,
'Moon' => $moon->Moon,
])->first();
//If we find a rental record, mark the moon as whether it's paid or not
$paid = $rental->Paid;
//Set the rental date up
$rentalTemp = new Carbon($rental->RentalEnd);
$rentalEnd = $rentalTemp->format('m-d');
//Set the contact name
//$contact = $lookup->CharacterName($rental->Contact);
$contact = $lookupHelper->CharacterIdToName($rental->Contact);
//Set up the renter whether it's W4RP or another corporation
$ticker = $rental->RentalCorp;
$type = $rental->Type;
}
//Set the color for the table
if($rentalTemp->diffInDays($today) < 3 ) {
$color = 'table-warning';
} else if( $today > $rentalTemp) {
$color = 'table-success';
} else {
$color = 'table-danger';
}
//Calculate hte price of the moon based on what is in the moon
$price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity, $moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
//Add the data to the html string to be passed to the view
array_push($table, [
'SPM' => $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon,
'StructureName' => $moon->StructureName,
'AlliancePrice' => $price['alliance'],
'OutOfAlliancePrice' => $price['outofalliance'],
'RentalEnd' => $rentalEnd,
'RowColor' => $color,
'Paid' => $paid,
'Contact' => $contact,
'Type' => $type,
'Renter' => $ticker,
]);
}
return view('moons.admin.adminmoon')->with('table', $table);
}
/**
* Function to remove a renter from a moon
*/
public function storeMoonRemoval(Request $request) {
$this->middleware('role:Admin');
$this->validate($request, [
'remove' => 'required',
]);
$str_array = explode(" - ", $request->remove);
//Decode the value for the SPM into a system, planet, and moon for the database to update
$system = $str_array[0];
$planet = $str_array[1];
$moon = $str_array[2];
$found = MoonRental::where([
'System' => $system,
'Planet' => $planet,
'Moon' => $moon,
])->count();
if($found != 0) {
MoonRental::where([
'System' => $system,
'Planet' => $planet,
'Moon' => $moon,
])->delete();
return redirect('/moons/admin/display')->with('success', 'Renter removed.');
}
//Redirect back to the moon page, which should call the page to be displayed correctly
return redirect('/moons/admin/display')->with('error', 'Something went wrong.');
}
/**
* Function displays the ability for admins to update moons with who is renting, and when it ends.
*/
public function updateMoon() {
$this->middleware('role:Admin');
//Declare some variables
$system = null;
$planet = null;
$moon = null;
$name = null;
$spmnTemp = array();
$spmn = array();
//Get the moons and put in order by System, Planet, then Moon number
$moons = Moon::orderBy('System', 'ASC')
->orderBy('Planet', 'ASC')
->orderBy('Moon', 'ASC')
->get();
//Push our default value onto the stack
array_push($spmn, 'N/A');
//Form our array of strings for each system, planet, and moon combination.
foreach($moons as $m) {
$temp = $m->System . " - " . $m->Planet . " - " . $m->Moon . " - " . $m->StructureName;
array_push($spmnTemp, $temp);
}
//From our temporary array with all the values in a numbered key, create the real array with the value being the key
foreach($spmnTemp as $key => $value) {
$spmn[$value] = $value;
}
//Return the view and the form from the blade display
//Pass the data to the view as well
return view('moons.admin.updatemoon')->with('spmn', $spmn);
}
public function storeUpdateMoon(Request $request) {
$this->middleware('role:Admin');
//Declare some static variables as needed
$moonCalc = new MoonCalc;
$lookup = new LookupHelper;
$paid = false;
$system = null;
$planet = null;
$mn = null;
$name = null;
//Validate our request from the html form
$this->validate($request, [
'spmn' => 'required',
'renter' => 'required',
'date' => 'required',
'contact' => 'required',
]);
//Decode the System, Planet, Moon, Name combinatio sent from the controller
$str_array = explode(" - ", $request->spmn);
$system = $str_array[0];
$planet = $str_array[1];
$mn = $str_array[2];
$name = $str_array[3];
//Take the contact name and create a character_id from it
if($request->contact == 'None') {
$contact = 'None';
} else {
$contact = $lookup->CharacterNameToId($request->contact);
}
//Update the paid value for database entry
if($request->paid == 'Yes') {
$paid = 'Yes';
} else {
$paid = 'No';
}
//Update the paid unti value for the database entry
if(isset($request->Paid_Until)) {
$paidUntil = $request->Paid_Until;
} else {
$paidUntil = null;
}
//Let's find the corporation and alliance information to ascertain whethery they are in Warped Intentions or another Legacy Alliance
$allianceId = $lookup->LookupCorporation($lookup->LookupCharacter($contact));
//Create the date
$date = new Carbon($request->date . '00:00:01');
//Count how many rentals we find for later database processing
$count = MoonRental::where([
'System' => $system,
'Planet' => $planet,
'Moon' => $mn,
'Contact' => $contact,
])->count();
//Calculate the price of the moon for when it's updated
$moon = Moon::where([
'System' => $system,
'Planet' => $planet,
'Moon' => $mn,
])->first();
//Calculate the price of the rental and store it in the database
$price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity,
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
//If the database entry isn't found, then insert it into the database,
//otherwise, account for it being in the system already.
if($count != 0) {
if($allianceId = 99004116) {
MoonRental::where([
'System' => $system,
'Planet' => $planet,
'Moon' => $mn,
'Contact' => $contact,
])->update([
'System' => $system,
'Planet' => $planet,
'Moon' => $mn,
'RentalCorp' => $request->renter,
'RentalEnd' => $date,
'Contact' => $contact,
'Price' => $price['alliance'],
'Type' => 'alliance',
'Paid' => $paid,
'Paid_Until' => $request->paid_until,
]);
} else {
MoonRental::where([
'System' => $system,
'Planet' => $planet,
'Moon' => $mn,
'Contact' => $contact,
])->update([
'System' => $system,
'Planet' => $planet,
'Moon' => $mn,
'RentalCorp' => $request->renter,
'RentalEnd' => $date,
'Contact' => $contact,
'Price' => $price['outofalliance'],
'Type' => 'outofalliance',
'Paid' => $paid,
'Paid_Until' => $request->paid_until,
]);
}
} else {
//If the entry is not found, then attempt to delete whatever existing data is there, then
//insert the new data
MoonRental::where([
'System' => $system,
'Planet' => $planet,
'Moon' => $moon,
])->delete();
if($allianceId == 99004116) {
$store = new MoonRental;
$store->System = $system;
$store->Planet = $planet;
$store->Moon = $mn;
$store->RentalCorp = $request->renter;
$store->RentalEnd = $date;
$store->Contact = $contact;
$store->Price = $price['alliance'];
$store->Type = 'alliance';
$store->Paid = $paid;
$store->save();
} else {
$store = new MoonRental;
$store->System = $system;
$store->Planet = $planet;
$store->Moon = $mn;
$store->RentalCorp = $request->renter;
$store->RentalEnd = $date;
$store->Contact = $contact;
$store->Price = $price['outofalliance'];
$store->Type = 'outofalliance';
$store->Paid = $paid;
$store->save();
}
}
//Redirect to the update moon page
return redirect('/moons/admin/updatemoon')->with('success', 'Moon Updated');
}
public function showJournalEntries() {
$this->middleware('role:Admin');
$dateInit = Carbon::now();
$date = $dateInit->subDays(30);
$journal = DB::select('SELECT amount,reason,description,date FROM `player_donation_journal` WHERE corporation_id=98287666 AND date >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) ORDER BY date DESC');
return view('moons.admin.moonjournal')->with('journal', $journal);
}
}

View File

@@ -1,138 +0,0 @@
<?php
namespace App\Http\Controllers\Moons;
//Internal Library
use App\Http\Controllers\Controller;
use Auth;
use DB;
use Illuminate\Http\Request;
use Carbon\Carbon;
//Models
use App\Models\Moon\Config;
use App\Models\Moon\ItemComposition;
use App\Models\Moon\Moon;
use App\Models\Moon\OrePrice;
use App\Models\Moon\Price;
use App\Models\MoonRent\MoonRental;
//Library
use App\Library\Moons\MoonCalc;
class MoonsController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:Renter');
}
/**
* Function to display the moons and pass data to the blade template
*/
public function displayMoons() {
$rentalEnd = '';
//Get the user type from the user Auth class
$type = Auth::user()->user_type;
//Setup calls to the MoonCalc class
$moonCalc = new MoonCalc();
//get all of the moons from the database
$moons = DB::table('Moons')->orderBy('System', 'asc')->get();
//Set the rental date as last month for moons not rented
$lastMonth = Carbon::now()->subMonth();
//Set a variable for today's date
$today = Carbon::now();
//declare the html variable and set it to null
$table = array();
$moonprice = null;
foreach($moons as $moon) {
//get the rental data for the moon
$rental = MoonRental::where([
'System' => $moon->System,
'Planet' => $moon->Planet,
'Moon' => $moon->Moon,
])->first();
if($rental == false) {
//If we don't find a rental record, set the rental date as last month
$rentalTemp = $lastMonth;
$rentalEnd = $rentalTemp->format('m-d');
} else {
//Set the rental date up
$rentalTemp = new Carbon($rental->RentalEnd);
$rentalEnd = $rentalTemp->format('m-d');
}
$price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity,
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
$worth = $moonCalc->SpatialMoonsTotalWorth($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity,
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
if($type == 'W4RP') {
$moonprice = $price['alliance'];
} else {
$moonprice = $price['outofalliance'];
}
if($rentalTemp->diffInDays($today) < 3 ) {
$color = 'table-warning';
} else if( $today > $rentalTemp) {
$color = 'table-primary';
} else {
$color = 'table-danger';
}
//Add the data to the html string to be passed to the view
array_push($table, [
'SPM' => $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon,
'StructureName' => $moon->StructureName,
'FirstOre' => $moon->FirstOre,
'FirstQuantity' => $moon->FirstQuantity,
'SecondOre' => $moon->SecondOre,
'SecondQuantity' => $moon->SecondQuantity,
'ThirdOre' => $moon->ThirdOre,
'ThirdQuantity' => $moon->ThirdQuantity,
'FourthOre' => $moon->FourthOre,
'FourthQuantity' => $moon->FourthQuantity,
'Price' => $moonprice,
'Worth' => number_format($worth, "2", ".", ","),
'RentalEnd' => $rentalEnd,
'RowColor' => $color,
]);
}
return view('moons.user.moon')->with('table', $table);
}
public function displayTotalWorthForm() {
return view('moons.user.formTotalWorth');
}
public function displayTotalWorth(Request $request) {
$firstOre = $request->firstOre;
$firstQuantity = $request->firstQuantity;
$secondOre = $request->secondOre;
$secondQuantity = $request->secondQuantity;
$thirdOre = $request->thirdOre;
$thirdQuantity = $request->thirdQuantity;
$fourthOre = $request->fourthOre;
$fourthQuantity = $request->fourthQuantity;
//Setup calls to the MoonCalc class
$moonCalc = new MoonCalc();
$totalGoo = $moonCalc->SpatialMoonsOnlyGooTotalWorth($firstOre, $firstQuantity, $secondOre, $secondQuantity,
$thirdOre, $thirdQuantity, $fourthOre, $fourthQuantity);
$totalGoo = number_format($totalGoo, 2, ".", ",");
$totalWorth = $moonCalc->SpatialMoonsTotalWorth($firstOre, $firstQuantity, $secondOre, $secondQuantity,
$thirdOre, $thirdQuantity, $fourthOre, $fourthQuantity);
$totalWorth = number_format($totalWorth, 2, ".", ",");
return view('moons.user.displayTotalWorth')->with(['totalWorth' => $totalWorth, 'totalGoo' => $totalGoo]);
}
}

View File

@@ -5,13 +5,12 @@ namespace App\Http\Controllers\SRP;
//Laravel Libraries
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
use Auth;
use Khill\Lavacharts\Lavacharts;
use Carbon\Carbon;
//User Libraries
use App\Library\SRP\SRPHelper;
use App\Library\Helpers\SRPHelper;
//Models
use App\Models\SRP\SRPShip;
@@ -34,6 +33,7 @@ class SRPAdminController extends Controller
//Create the array
$requests = array();
$viewShipTypes = array();
//Declare variables for use later.
$sum_actual = 0.00;
@@ -42,6 +42,12 @@ class SRPAdminController extends Controller
//Get the ship types from the database
$shipTypes = SrpShipType::all();
//Setup the viewShipTypes variable
$tempShipTypes = SrpShipType::groupBy('code')->pluck('code');
foreach($tempShipTypes as $key => $value) {
$viewShipTypes[$value] = $value;
}
//Get the fleet types from the database
$fleetTypes = SrpFleetType::all();
@@ -67,6 +73,7 @@ class SRPAdminController extends Controller
foreach($shipTypes as $s) {
if($r['ship_type'] == $s->code) {
$temp['ship_type'] = $s->description;
$temp['cost_code'] = $s->code;
}
}
//Get the fleet type
@@ -78,8 +85,13 @@ class SRPAdminController extends Controller
//Calculate the recommended srp amount
foreach($payouts as $p) {
if($r['ship_type'] == $p->code) {
$temp['actual_srp'] = $r['loss_value'] * ($p->payout / 100.00 );
$temp['cost_code'] = $p->payout;
$payout = $p->payout;
if($temp['character_name'] == $temp['fleet_commander_name']) {
$payout = 100.00;
}
$temp['actual_srp'] = $r['loss_value'] * ($payout / 100.00 );
$temp['payout_percentage'] = $payout;
$sum_actual += $temp['actual_srp'];
}
}
@@ -95,7 +107,28 @@ class SRPAdminController extends Controller
//Return the view with the variables
return view('srp.admin.process')->with('requests', $requests)
->with('sum_actual', $sum_actual)
->with('sum_loss', $sum_loss);
->with('sum_loss', $sum_loss)
->with('viewShipTypes', $viewShipTypes);
}
public function updateLossValue($id, $value) {
//Convert the string into a decimal style number to be stored correctly
$lossValue = str_replace(',', '', $value);
$lossValue = floatval($lossValue);
SRPShip::where(['id' => $id])->update([
'loss_value' => $lossValue,
]);
return redirect('/srp/admin/display');
}
public function updateShipType($id, $value) {
SRPShip::where(['id' => $id])->update([
'ship_type' => $value,
]);
return redirect('/srp/admin/display');
}
public function processSRPRequest(Request $request) {
@@ -105,23 +138,26 @@ class SRPAdminController extends Controller
'approved' => 'required',
'paid_value' => 'required',
]);
//Get the paid value from the form
$paidValue = str_replace(',', '', $request->paid_value);
//Get the total loss value from the form and convert it to the right format
$paidLoss = str_replace(',', '', $request->paid_value);
$paidLoss = floatval($paidLoss);
//If the notes are not null update like this.
if($request->notes != null) {
$srp = SRPShip::where(['id' => $request->id])->update([
'approved' => $request->approved,
'paid_value' => $paidValue,
'paid_by_id' => auth()->user()->character_id,
'paid_by_name' => auth()->user()->name,
'notes' => $request->notes,
'paid_value' => $paidLoss,
]);
} else {
$srp = SRPShip::where(['id' => $request->id])->update([
'approved' => $request->approved,
'paid_value' => $paidValue,
'paid_by_id' => auth()->user()->character_id,
'paid_by_name' => auth()->user()->name,
'paid_value' => $paidLoss,
]);
}
@@ -132,6 +168,20 @@ class SRPAdminController extends Controller
}
}
public function displayHistory() {
$srpApproved = SRPShip::where([
'approved' => 'Approved',
])->orderBy('created_at', 'desc')->paginate(25);
$srpDenied = SRPShip::where([
'approved' => 'Denied',
])->orderBy('created_at', 'desc')->paginate(25);
return view('srp.admin.history')->with('srpApproved', $srpApproved)
->with('srpDenied', $srpDenied);
}
public function displayStatistics() {
$months = 3;
$barChartData = array();

View File

@@ -5,10 +5,10 @@ namespace App\Http\Controllers\SRP;
//Laravel Libraries
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
use Auth;
//User Libraries
//Application Libraries
use App\Library\Helpers\SRPHelper;
//Models
use App\Models\SRP\SRPShip;
@@ -25,6 +25,10 @@ class SRPController extends Controller
$this->middleware('role:User');
}
public function displaySrpHistory() {
}
public function displayPayoutAmounts() {
$payouts = array();
$count = 0;
@@ -112,6 +116,7 @@ class SRPController extends Controller
$fcId = User::where(['name' => $request->FC])->get(['character_id']);
//Take the loss value and remove ' ISK' from it. Convert the string to a number
//May need to work on some locale stuff here but will think about it first.
$lossValue = str_replace(' ISK', '', $request->LossValue);
$lossValue = str_replace(',', '', $lossValue);
$lossValue = floatval($lossValue);

View File

@@ -0,0 +1,366 @@
<?php
namespace App\Http\Controllers\Test;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Log;
use Carbon\Carbon;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
//Application Library
use App\Library\Helpers\LookupHelper;
use App\Library\Esi\Esi;
use App\Library\Moons\MoonCalc;
//Models
use App\Models\MoonRental\AllianceMoon;
use App\Models\MoonRental\AllianceMoonOre;
use App\Models\MiningTax\Invoice;
use App\Models\MiningTax\Ledger;
use App\Models\MiningTax\Observer;
use App\Models\User\UserAlt;
use App\Models\User\User;
class TestController extends Controller
{
public function displayCharTest() {
$lookup = new LookupHelper;
$config = config('esi');
$char = $lookup->GetCharacterInfo($config['primary']);
return view('test.char.display')->with('char', $char);
}
public function DebugMiningTaxesInvoices() {
//Declare variables
$mailDelay = 15;
$mains = new Collection;
$perms = null;
$config = config('esi');
$bodies = new Collection;
/**
* This section will determine if users are mains or alts of a main.
* If they are mains, we keep the key. If they are alts of a main, then we delete
* the key from the collection.
*/
//Pluck all the users from the database of ledgers to determine if they are mains or alts.
$tempMains = Ledger::where([
'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subDays(7))->pluck('character_id');
//Get the unique character ids from the ledgers in the previous statement
$tempMains = $tempMains->unique()->values()->all();
//Cycle through the array of mains, and remove any characters which are in the User Alt table,
//as those characters will be grouped with their correct main later.
for($i = 0; $i < sizeof($tempMains); $i++) {
if(UserAlt::where(['character_id' => $tempMains[$i]])->count() == 0) {
$mains->push($tempMains[$i]);
}
}
/**
* For each of the users, let's determine if there are any ledgers,
* then determine if there are any alts and ledgers associated with the alts.
*/
foreach($mains as $main) {
//Declare some variables for each run through the for loop
$ledgers = new Collection;
//Count the ledgers for the main
$mainLedgerCount = Ledger::where([
'character_id' => $main,
'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subDays(7))->count();
//If there are ledgers for the main, then let's grab them
if($mainLedgerCount > 0) {
$mainLedgers = Ledger::where([
'character_id' => $main,
'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subDays(7))->get();
//Cycle through the entries, and add them to the ledger to send with the invoice
foreach($mainLedgers as $row) {
$ledgers->push([
'character_id' => $row->character_id,
'character_name' => $row->character_name,
'observer_id' => $row->observer_id,
'type_id' => $row->type_id,
'ore_name' => $row->ore_name,
'quantity' => (int)$row->quantity,
'amount' => (float)$row->amount,
'last_updated' => $row->last_updated,
]);
}
}
//Get the alt count for the main character
$altCount = UserAlt::where(['main_id' => $main])->count();
//If more than 0 alts, grab all the alts.
if($altCount > 0) {
$alts = UserAlt::where([
'main_id' => $main,
])->get();
//Cycle through the alts, and get the ledgers, and push onto the stack
foreach($alts as $alt) {
$altLedgerCount = Ledger::where([
'character_id' => $alt->character_id,
'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subDays(7))->count();
if($altLedgerCount > 0) {
$altLedgers = Ledger::where([
'character_id' => $alt->character_id,
'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subDays(7))->get();
foreach($altLedgers as $row) {
$ledgers->push([
'character_id' => $row->character_id,
'character_name' => $row->character_name,
'observer_id' => $row->observer_id,
'type_id' => $row->type_id,
'ore_name' => $row->ore_name,
'quantity' => (int)$row->quantity,
'amount' => (float)$row->amount,
'last_updated' => $row->last_updated,
]);
}
}
}
}
/**
* Send the collected information over to the function to send the actual mail
*/
if($ledgers->count() > 0) {
$body = $this->CreateInvoice($main, $ledgers, $mailDelay);
$bodies->push($body);
}
}
return view('test.miningtax.invoice')->with('bodies', $bodies);
}
/**
* Create the invoice to the mail out
*
* @var charId
* @var ledgers
* @var mailDelay
*/
private function CreateInvoice($charId, Collection $ledgers, int &$mailDelay) {
$ores = array();
$characters = array();
$characterIds = array();
$totalPrice = 0.00;
$body = null;
$lookup = new LookupHelper;
$config = config('esi');
//Create an invoice id
$invoiceId = "M" . uniqid();
//Collect the total price of all of the ledgers
$totalPrice = round((float)$ledgers->sum('amount'), 2);
//Get the sum of all the ledgers
$invoiceAmount = round(((float)$ledgers->sum('amount') * (float)$config['mining_tax']), 2);
//Get the character name from the lookup table
$charName = $lookup->CharacterIdToName($charId);
//Create the date due and the invoice date
$dateDue = Carbon::now()->addDays(7);
$invoiceDate = Carbon::now();
//Set the mining tax from the config file
$numberMiningTax = number_format(((float)$config['mining_tax'] * (float)100.00), 2, ".", ",");
//Create the list of ores to put in the mail
$temp = $ledgers->toArray();
foreach($temp as $t) {
//If the key isn't set, set it to the default of 0
if(!isset($ores[$t['type_id']])) {
$ores[$t['type_id']] = (int)0;
}
//Add the quantity into the ores array
$ores[$t['type_id']] += (int)$t['quantity'];
//Create a list of character names
if(!isset($characters[$t['character_name']])) {
$characters[$t['character_name']] = $t['character_name'];
}
//Create a list of character ids
if(!isset($characterIds[$t['character_id']])) {
$characterIds[$t['character_id']] = $t['character_id'];
}
}
/**
* Create the mail body to send to the main character
*/
$body .= "Dear " . $charName . ",<br><br>";
$body .= "Mining Taxes are due for the following ores mined from alliance moons: <br>";
foreach($ores as $ore => $quantity) {
$oreName = $lookup->ItemIdToName($ore);
$body .= $oreName . ": " . number_format($quantity, 0, ".", ",") . "<br>";
}
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces by " . $dateDue . "<br>";
$body .= "Set the reason for transfer as " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br><br>";
$body .= "You can also send a contract with the following ores in the contract with the reason set as: " . $invoiceId . "<br>";
foreach($ores as $ore => $quantity) {
$oreName = $lookup->ItemIdToName($ore);
$body .= $oreName . ": " . number_format(round($quantity * $config['mining_tax']), 0, ".", ",") . "<br>";
}
$body .= "<br>";
$body .= "Characters Processed: <br>";
foreach($characters as $character) {
$body .= $character . "<br>";
}
$body .= "<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";
//Check if the mail body is greater than 2000 characters. If greater than 2,000 characters, then
if(strlen($body) > 2000) {
$body = "Dear " . $charName . "<br><br>";
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces by " . $dateDue . "<br>";
$body .= "Set the reason for transfer as: " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";
}
/**
* Increment the mail delay for the next cycle
*/
$mailDelay += 20;
return $body;
}
public function DebugMiningObservers() {
//Declare variables
$mailDelay = 15;
$config = config('esi');
$mains = new Collection;
/**
* This section will determine if users are mains or alts of a main.
* If they are mains, we keep the key. If they are alts of a main, then we delete
* the key from the collection.
*/
//Pluck all the users from the database of ledgers to determine if they are mains or alts.
$tempMains = Ledger::where([
'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subMonths(3))->pluck('character_id');
//Get the unique character ids from the ledgers in the previous statement
$tempMains = $tempMains->unique()->values()->all();
for($i = 0; $i < sizeof($tempMains); $i++) {
if(UserAlt::where(['character_id' => $tempMains[$i]])->count() == 0) {
$mains->push($tempMains[$i]);
}
}
/**
* For each of the users, let's determine if there are any ledgers,
* then determine if there are any alts and ledgers associated with the alts.
*/
foreach($mains as $main) {
//Declare some variables for each run through the for loop
$mainLedgerCount = 0;
$ledgers = new Collection;
//Count the ledgers for the main
$mainLedgerCount = Ledger::where([
'character_id' => $main,
'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subMonths(3))->count();
//If there are ledgers for the main, then let's grab them
if($mainLedgerCount > 0) {
$mainLedgers = Ledger::where([
'character_id' => $main,
'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subMonths(3))->get();
//Cycle through the entries, and add them to the ledger to send with the invoice
foreach($mainLedgers as $row) {
$ledgers->push([
'character_id' => $row->character_id,
'character_name' => $row->character_name,
'observer_id' => $row->observer_id,
'type_id' => $row->type_id,
'ore_name' => $row->ore_name,
'quantity' => $row->quantity,
'amount' => (float)$row->amount,
'last_updated' => $row->last_updated,
]);
}
}
//Get the alt count for the main character
$altCount = UserAlt::where(['main_id' => $main])->count();
//If more than 0 alts, grab all the alts.
if($altCount > 0) {
$alts = UserAlt::where([
'main_id' => $main,
])->get();
//Cycle through the alts, and get the ledgers, and push onto the stack
foreach($alts as $alt) {
$altLedgerCount = Ledger::where([
'character_id' => $alt->character_id,
'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subMonths(3))->count();
if($altLedgerCount > 0) {
$altLedgers = Ledger::where([
'character_id' => $alt->character_id,
'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subMonths(3))->get();
foreach($altLedgers as $row) {
$ledgers->push([
'character_id' => $row->character_id,
'character_name' => $row->character_name,
'observer_id' => $row->observer_id,
'type_id' => $row->type_id,
'ore_name' => $row->ore_name,
'quantity' => $row->quantity,
'amount' => (float)$row->amount,
'last_updated' => $row->last_updated,
]);
}
}
}
}
if($ledgers->count() > 0) {
var_dump($ledgers);
var_dump(round(((float)$ledgers->sum('amount') * (float)$config['mining_tax']), 2));
}
}
}
}

View File

@@ -1,196 +0,0 @@
<?php
namespace App\Http\Controllers\Wiki;
//Laravel libraries
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use DB;
use Auth;
//User Libraries
use App\Library\Lookups\LookupHelper;
//Models
use App\Models\Doku\DokuGroupNames;
use App\Models\Doku\DokuMember;
use App\Models\Doku\DokuUser;
use App\Models\Admin\AllowedLogin;
use App\Models\User\User;
class WikiController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:Renter');
}
public function purgeUsers() {
//Declare helper classes
$helper = new LookupHelper;
//Get all the users from the database
$users = DokuUser::pluck('name')->all();
$legacy = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_id')->toArray();
$renter = AllowedLogin::where(['login_type' => 'Renter'])->pluck('entity_id')->toArray();
//Search the names and verify against the lookup table
//to find the corporation and / or alliance they belong to.
foreach($users as $user) {
//Let's look up the character in the user table by their name.
//If no name is found, then delete the user and have them start over with the wiki permissions
$count = User::where(['name' => $user])->count();
if($count > 0) {
$charIdTemp = User::where(['name' => $user])->get(['character_id']);
$charId = $charIdTemp[0]->character_id;
$corpId = $helper->LookupCharacter($charId);
$allianceId = $helper->LookupCorporation($corpId);
if(in_array($allianceId, $legacy) || in_array($allianceId, $renter) || $allianceId == 99004116) {
//Do nothing
} else {
$this->DeleteWikiUser($user);
}
} else {
$this->DeleteWikiUser($user);
}
}
return redirect('/admin/dashboard')->with('success', 'Wiki has been purged.');
}
public function displayRegister() {
//make user name syntax like we want it.
$name = Auth::user()->name;
$name = strtolower($name);
$name = str_replace(' ', '_', $name);
//Check to see if the user is already registered in the database
$check = DB::select('SELECT login FROM wiki_user WHERE login = ?', [$name]);
if(isset($check[0]) && ($check[0]->login === $name)) {
return redirect('/dashboard')->with('error', 'Already registered for the wiki!');
}
return view('wiki.user.register')->with('name', $name);
}
public function storeRegister(Request $request) {
$this->validate($request, [
'password' => 'required',
'password2' => 'required',
]);
$password = '';
//Check to make sure the password matches
if($request->password !== $request->password2) {
return view('/dashboard')->with('error');
} else {
$password = md5($request->password);
}
if(Auth::user()->hasRole('User')) {
$role = 1; //User role id from wiki_groupname table
} else if(Auth::user()->hasRole('Renter')) {
$role = 8; //Renter role id from wiki_groupname table
}
//Load the model
$user = new DokuUser;
$member = new DokuMember;
//make user name syntax like we want it.
$name = Auth::user()->name;
$name = strtolower($name);
$name = str_replace(' ', '_', $name);
//Add the new user to the wiki
$user->login = $name;
$user->pass = $password;
$user->name = Auth::user()->name;
$user->save();
//Get the user from the table to get the uid
$uid = DB::select('SELECT id FROM wiki_user WHERE login = ?', [$name]);
$member->uid = $uid[0]->id;
$member->gid = $role;
$member->save();
//Return to the dashboard view
return redirect('/dashboard')->with('success', 'Registration successful. Your username is: ' . $name);
}
public function displayChangePassword() {
$name = Auth::user()->name;
$name = strtolower($name);
$name = str_replace(' ', '_', $name);
$check = DB::select('SELECT login FROM wiki_user WHERE login = ?', [$name]);
if(!isset($check[0])) {
return redirect('/dashboard')->with('error', 'Login Not Found!');
}
return view('wiki.user.changepassword')->with('name', $name);
}
public function changePassword(Request $request) {
$this->validate($request, [
'password' => 'required',
'password2' => 'required',
]);
//Check for a valid password
$password = '';
if($request->password !== $request->password2) {
return redirect('/wiki/changepassword')->with('error', 'Passwords did not match');
} else {
$password = md5($request->password);
}
//Get a model ready for the database
$user = new DokuUser;
//Find the username for the database through the character name in auth
$name = Auth::user()->name;
$name = strtolower($name);
$name = str_replace(' ', '_', $name);
//Update the password for the login name
DB::table('wiki_user')
->where('login', $name)
->update(['pass' => $password]);
return redirect('/dashboard')->with('success', 'Password changed successfully. Your username is: ' . $name);
}
/**
* Displays the page to add a user to a certain group
*/
public function displayAddUserToGroup() {
return view('wiki.displayaddug');
}
/**
* Stores the modifications to the user to add to a group to give permissions
*
* @param uid
* @param gid
* @param gname
*/
public function storeAddUserToGroup($uid, $gid, $gname) {
return redirect('/dashboard')->with('success', 'User added to the group: ' . $gid . ' with name of ' . $gname);
}
private function DeleteWikiUser($user) {
//Get the uid of the user as we will need to purge them from the member table as well.
//the member table holds their permissions.
$uid = DokuUser::where([
'name' => $user,
])->value('id');
//Delete the permissions of the user first.
DokuMember::where([
'uid' => $uid,
])->delete();
//Delete the user from the user table
DokuUser::where(['name' => $user])->delete();
}
}

View File

@@ -1,148 +0,0 @@
<?php
namespace App\Http\Controllers\Wormholes;
//Laravel Libraries
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
//User Libraries
//Models
use App\Models\Wormholes\AllianceWormhole;
use App\Models\Wormholes\WormholeType;
class WormholeController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
}
public function displayWormholeForm() {
//Declare a few array variables
$duration = array();
$class = array();
$stability = array();
$size = array();
//Get the duration from the table
$duration = [
'This wormhole has not yet begun its natural cycle of decay and should last at least another day.',
'This wormhole is beginning to decay, but will not last another day.',
'This wormhole is reaching the end of its natural lifetime',
];
//Get the wh classes from the table
$class = [
'C1',
'C2',
'C3',
'C4',
'C5',
'C6',
'C7',
'C8',
'C9',
'C13',
'Drifter',
'Thera',
'Exit WH',
];
//Get the wh types from the table
$type = WormholeType::pluck('type');
//Get the wh sizes from the table
$size = [
'XS',
'S',
'M',
'L',
'XL',
];
//Get the wh stabilities from the table
$stability = [
'Stable',
'Non-Critical',
'Critical',
];
//Return all the variables to the view
return view('wormholes.form')->with('class', $class)
->with('type', $type)
->with('size', $size)
->with('stability', $stability)
->with('duration', $duration);
}
public function storeWormhole() {
$this->validate($request, [
'sig' => 'required',
'duration' => 'required',
'dateTiume' => 'required',
'class' => 'required',
'size' => 'required',
'stability' => 'required',
'type' => 'required',
'system' => 'required',
]);
//Declare some variables
$duration = null;
//Create the stable time for the database
if($request->duraiton == 'This wormhole has not yet begun its natural cycle of decay and should last at least another day.') {
$duration = '>24 hours';
} else if ($request->duration == 'This wormhole is beginning to decay, but will not last another day.') {
$duration = '>4 hours <24 hours';
} else if($request->duration == 'This wormhole is reaching the end of its natural lifetime') {
'<4 hours';
}
//Get the wormhole type from the database so we can enter other details
$wormholeType = WormholeType::where([
'type' => $request->type,
])->first();
$found = AllianceWormhole::where([
'system' => $request->system,
'sig_ig' => $request->sig,
])->count();
if($found == 0) {
AllianceWormhole::insert([
'system' => $request->system,
'sig_id' => $request->sig_id,
'duration_left' => $duration,
'dateTime' => $request->dateTime,
'class' => $request->class,
'type' => $request->type,
'hole_size' => $request->size,
'stability' => $request->stability,
'details' => $request->details,
'link' => $request->link,
'mass_allowed' => $wormholeType->mass_allowed,
'individual_mass' => $wormholeType->individual_mass,
'regeneration' => $wormholeType->regeneration,
'max_stable_time' => $wormholeType->max_stable_time,
]);
return redirect('/wormholes/display')->with('success', 'Wormhole Info Added.');
} else {
return redirect('/wormholes/display')->with('error', 'Wormhole already in database.');
}
}
public function displayWormholes() {
//Create the date and time
$dateTime = Carbon::now()->subDays(2);
//Get all of the wormholes from the last 48 hours from the database to display
$wormholes = AllianceWormholes::where('created_at', '>=', $dateTime)->get();
return view('wormholes.display')->with('wormholes', $wormholes);
}
}

View File

@@ -60,7 +60,6 @@ class Kernel extends HttpKernel
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'callback' => \App\Http\Middleware\Callback::class,
'role' => \App\Http\Middleware\RequireRole::class,
'permission' => \App\Http\Middleware\RequirePermission::class,
];

View File

@@ -15,7 +15,7 @@ class Authenticate extends Middleware
protected function redirectTo($request)
{
if(!$this->auth->check()){
return route('/');
return '/';
}
}
}

View File

@@ -1,30 +0,0 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
use Socialite;
use DB;
use App\Models\User\User;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
class Callback
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
{
return $next($request);
}
}

View File

@@ -6,6 +6,7 @@ use Closure;
use DB;
use App\Models\User\UserPermission;
use App\Models\User\UserRole;
class RequirePermission
{
@@ -18,9 +19,15 @@ class RequirePermission
*/
public function handle($request, Closure $next, $permission)
{
$perms = UserPermission::where(['character_id' => auth()->user()->character_id, 'permission'=> $permission])->get(['permission']);
$role = UserRole::where([
'character_id' => auth()->user()->character_id,
])->get(['role']);
abort_unless(auth()->check() && isset($perms[0]->permission), 403, "You don't have the correct permission to be in this area.");
if($role[0]->role != "Admin") {
$perms = UserPermission::where(['character_id' => auth()->user()->character_id, 'permission'=> $permission])->get(['permission']);
abort_unless(auth()->check() && isset($perms[0]->permission), 403, "You don't have the correct permission to be in this area.");
}
return $next($request);
}

View File

@@ -5,6 +5,7 @@ namespace App\Http\Middleware;
use Closure;
use App\Models\User\UserRole;
use App\Models\User\AvailableUserRole;
class RequireRole
{
@@ -17,21 +18,17 @@ class RequireRole
*/
public function handle($request, Closure $next, $role)
{
$confirmed = false;
$ranking = array();
$roles = AvailableUserRole::all();
$ranking = [
'None' => 0,
'Guest' => 1,
'Renter' => 2,
'User' => 3,
'Admin' => 4,
'SuperUser' => 5,
];
foreach($roles as $r) {
$ranking[$r->role] = $r->rank;
}
$check = UserRole::where('character_id', auth()->user()->character_id)->get(['role']);
if(!isset($check[0]->role)) {
abort(403, "You don't any roles. You don't belong here.");
abort(403, "You don't have any roles. You don't belong here.");
}
if($ranking[$check[0]->role] < $ranking[$role]) {

View File

@@ -12,7 +12,6 @@ class TrimStrings extends Middleware
* @var array
*/
protected $except = [
'password',
'password_confirmation',
//
];
}

View File

@@ -0,0 +1,10 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
abstract class Request extends FormRequest
{
//
}

View File

@@ -0,0 +1,176 @@
<?php
namespace App\Jobs\Commands\Assets;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
//Application Library
use App\Library\Esi\Esi;
use App\Library\Helpers\LookupHelper;
use Seat\Eseye\Exceptions\RequestFailedException;
//Models
use App\Models\Structure\Asset;
class FetchAllianceAssets implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set the connection for the job
$this->connection = 'redis';
$this->onQueue('assets');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$config = config('esi');
$corpId = 98287666;
$esiHelper = new Esi;
//Get the refresh token from the database
$token = $esiHelper->GetRefreshToken($config['primary']);
//Create the esi authentication container
$esi = $esiHelper->SetupEsiAuthentication($token);
//Check the esi scope
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-assets.read_corporation_assets.v1')) {
Log::critical("Scope check failed in FetchAllianceAssets for esi-assets.read_corporation_assets.v1");
}
//Set the current page
$currentPage = 1;
//Set our default pages
$totalPages = 1;
do {
if($esiHelper->TokenExpired($token)) {
$token = $esiHelper->GetRefreshToken($config['primary']);
$esi = $esiHelper->SetupAuthenticationToken($token);
}
//Attempt to get the assets
$assets = $esi->page($currentPage)
->invoke('get', '/corporations/{corporation_id}/assets/', [
'corporation_id' => $corpId,
]);
//If on the first page, then update the total number of pages
if($currentPage == 1) {
$totalPages = $assets->pages;
}
//For each asset retrieved, let's process it.
foreach($assets as $a) {
ProcessAllianceAssets::dispatch($a);
}
//Increment the current page
$currentPage++;
} while($currentPage <= $totalPages);
}
/**
* The job failed to process
* @param Exception $exception
* @return void
*/
public function failed($exception) {
if(!exception instanceof RequestFailedException) {
//If not a failure due to ESI, then log it. Otherwise,
//deduce why the exception occurred.
Log::critical($exception);
}
if ((is_object($exception->getEsiResponse()) && (stristr($exception->getEsiResponse()->error, 'Too many errors') || stristr($exception->getEsiResponse()->error, 'This software has exceeded the error limit for ESI'))) ||
(is_string($exception->getEsiResponse()) && (stristr($exception->getEsiResponse(), 'Too many errors') || stristr($exception->getEsiResponse(), 'This software has exceeded the error limit for ESI')))) {
//We have hit the error rate limiter, wait 120 seconds before releasing the job back into the queue.
Log::info('FetchAllianceAssets has hit the error rate limiter. Releasing the job back into the wild in 2 minutes.');
$this->release(120);
} else {
$errorCode = $exception->getEsiResponse()->getErrorCode();
switch($errorCode) {
case 400: //Bad Request
Log::critical("Bad request has occurred in FetchAllianceAssets. Job has been discarded");
break;
case 401: //Unauthorized Request
Log::critical("Unauthorized request has occurred in FetchAllianceAssets at " . Carbon::now()->toDateTimeString() . ".\r\nCancelling the job.");
$this->delete();
break;
case 403: //Forbidden
Log::critical("FetchAllianceAssets has incurred a forbidden error. Cancelling the job.");
$this->delete();
break;
case 420: //Error Limited
Log::warning("Error rate limit occurred in FetchAllianceAssets. Restarting job in 120 seconds.");
$this->release(120);
break;
case 500: //Internal Server Error
Log::critical("Internal Server Error for ESI in FetchAllianceAssets. Attempting a restart in 120 seconds.");
$this->release(120);
break;
case 503: //Service Unavailable
Log::critical("Service Unavailabe for ESI in FetchAllianceAssets. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 504: //Gateway Timeout
Log::critical("Gateway timeout in FetchAllianceAssets. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 201:
//Good response code
$this->delete();
break;
//If no code is given, then log and break out of switch.
default:
Log::warning("No response code received from esi call in FetchAllianceAssets.\r\n");
$this->delete();
break;
}
}
}
/**
* Tags for jobs
*
* @var array
*/
public function tags() {
return ['FetchAllianceAssets', 'AllianceStructures', 'Assets'];
}
}

View File

@@ -0,0 +1,109 @@
<?php
namespace App\Jobs\Commands\Assets;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
//Models
use App\Models\Structure\Asset;
class ProcessAllianceAssets implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
//Private variable
private $asset;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($a)
{
//Set the connection for the job
$this->connection = 'redis';
$this->onQueue('assets');
$this->asset = $a;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
/**
* If the asset is not in the database, then let's save it to the database,
* otherwise, we just update the old asset
*/
$count = Asset::where([
'item_id' => $this->asset->item_id,
])->count();
if($count == 0) {
$as = new Asset;
if(isset($this->asset->is_blueprint_copy)) {
$as->is_blueprint_copy = $this->asset->is_blueprint_copy;
}
$as->is_singleton = $this->asset->is_singleton;
$as->item_id = $this->asset->item_id;
$as->location_flag = $this->asset->location_flag;
$as->location_id = $this->asset->location_id;
$as->location_type = $this->asset->location_type;
$as->quantity = $this->asset->quantity;
$as->type_id = $this->asset->type_id;
$as->save();
} else {
//Update the previously found asset
Asset::where([
'item_id' => $this->asset->item_id,
])->update([
'is_singleton' => $this->asset->is_singleton,
'location_flag' => $this->asset->location_flag,
'location_id' => $this->asset->location_id,
'location_type' => $this->asset->location_type,
'quantity' => $this->asset->quantity,
'type_id' => $this->asset->type_id,
]);
if(isset($this->asset->is_blueprint_copy)) {
Asset::where([
'item_id' => $this->asset->item_id,
])->update([
'is_blueprint_copy' => $this->asset->is_blueprint_copy,
]);
}
}
}
/**
* Tags for jobs
*
* @var array
*/
public function tags() {
return ['FetchAllianceAssets', 'AllianceStructures', 'Assets'];
}
}

View File

@@ -0,0 +1,59 @@
<?php
namespace App\Jobs\Commands\Assets;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
//Jobs
use App\Jobs\Commands\Assets\FetchAllianceAssets;
//Models
use App\Models\Structure\Asset;
class PurgeAllianceAssets implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set the connection for the job
$this->connection = 'redis';
$this->onQueue('assets');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Asset::truncate();
FetchAllianceAssets::dispatch()->delay(Carbon::now()->addSeconds(30));
}
}

View File

@@ -0,0 +1,205 @@
<?php
namespace App\Jobs\Commands\Data;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
//Libraries
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
//Models
use App\Models\User\User;
use App\Models\User\UserAlt;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
use App\Models\User\UserPermission;
use App\Models\User\UserRole;
use App\Models\Admin\AllowedLogin;
class PurgeUsers implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Retries
*
* @var int
*/
public $retries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('default');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare some variables
$esiHelper = new Esi;
//Setup the esi variable
$esi = $esiHelper->SetupEsiAuthentication();
//Get all of the users from the database
$users = User::all();
//Get the allowed logins
$legacy = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_id')->toArray();
$renter = AllowedLogin::where(['login_type' => 'Renter'])->pluck('entity_id')->toArray();
//Cycle through all of the users, and either update their role, or delete them.
foreach($users as $user) {
//Set the fail bit to false for the next user to check
$failed = false;
//Note a screen entry for when doing cli stuff
printf("Processing character with id of " . $user->character_id . "\r\n");
//Get the character information
try {
$character_info = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => $user->character_id,
]);
$corp_info = $esi->invoke('get', '/corporations/{corporation_id}/', [
'corporation_id' => $character_info->corporation_id,
]);
} catch(RequestFailedException $e) {
Log::warning('Failed to get character information in purge user command for user ' . $user->character_id);
$failed = true;
}
//If the fail bit is still false, then continue
if($failed === false) {
//Get the user's role
$role = UserRole::where(['character_id' => $user->character_id])->first();
//We don't want to modify Admin and SuperUsers. Admins and SuperUsers are removed via a different process.
if($role->role != 'Admin') {
//Check if the user is allowed to login
if(isset($corp_info->alliance_id)) {
//Warped Intentions is allowed to login
if($corp_info->alliance_id == '99004116') {
//If the alliance is Warped Intentions, then modify the role if we need to
if($role->role != 'User') {
//Upate the role of the user
UserRole::where([
'character_id' => $user->character_id,
])->update([
'role' => 'User',
]);
//Update the user type
User::where([
'character_id' => $user->character_id,
])->update([
'user_type' => 'W4RP',
]);
}
} else if(in_array($corp_info->alliance_id, $legacy)) { //Legacy Users
if($role->role != 'User') {
//Update the role of the user
UserRole::where([
'character_id' => $user->character_id,
])->update([
'role' => 'User',
]);
//Update the user type
User::where([
'character_id' => $user->character_id,
])->update([
'user_type' => 'Legacy',
]);
}
} else if(in_array($corp_info->alliance_id, $renter)) { //Renter Users
if($role->role != 'Renter') {
//Update the role of the user
UserRole::where([
'character_id' => $user->character_id,
])->update([
'role' => 'Renter',
]);
//Update the user type
User::where([
'character_id' => $user->character_id,
])->update([
'user_type' => 'Renter',
]);
}
} else {
//If the user is part of no valid login group, then delete the user.
//Delete all of the permissions first
UserPermission::where([
'character_id' => $user->character_id,
])->delete();
//Delete the user's role
UserRole::where([
'character_id' => $user->character_id,
])->delete();
//Delete any alts the user might have registered.
$altCount = UserAlt::where(['main_id' => $user->character_id])->count();
if($altCount > 0) {
UserAlt::where([
'main_id' => $user->character_id,
])->delete();
}
//Delete the user's esi scopes
EsiScope::where([
'character_id' => $user->character_id,
])->delete();
//Delete the user's esi token
EsiToken::where([
'character_id' => $user->character_id,
])->delete();
//Delete the user from the user table
User::where([
'character_id' => $user->character_id,
])->delete();
}
}
}
}
}
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['Data', 'PurgeUsers'];
}
}

View File

@@ -0,0 +1,64 @@
<?php
namespace App\Jobs\Commands\Eve;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Log;
//Library
use App\Library\Moons\MoonCalc;
class ItemPricesUpdate implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('default');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$moonHelper = new MoonCalc;
$moonHelper->FetchNewPrices();
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['Eve', 'ItemPricesUpdate'];
}
}

View File

@@ -0,0 +1,216 @@
<?php
namespace App\Jobs\Commands\Eve;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Spatie\RateLimitedMiddleware\RateLimited;
use Log;
use Carbon\Carbon;
//Library
use App\Library\Esi\Esi;
use Seat\Eseye\Exceptions\RequestFailedException;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
//Models
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
use App\Models\Jobs\JobStatus;
use App\Models\Mail\SentMail;
use Seat\Eseye\Containers\EsiResponse;
class SendEveMail implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Retries
* With new rate limiting, we need a retry basis versus timeout basis
* @var int
*/
public $retries = 1;
private $sender;
private $body;
private $recipient;
private $recipient_type;
private $subject;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($body, $recipient, $recipient_type, $subject, $sender) {
//Set the connection
$this->connection = 'redis';
$this->onQueue('mail');
//Set the middleware for the job
$this->middleware = $this->middleware();
//Private variables
$this->body = $body;
$this->recipient = $recipient;
$this->recipient_type = $recipient_type;
$this->subject = $subject;
$this->sender = $sender;
}
/**
* Execute the job.
* Utilized by using SendEveMail::dispatch($mail);
* The model is passed into the dispatch function, then added to the queue
* for processing.
*
* @return void
*/
public function handle()
{
//Declare some variables
$esiHelper = new Esi;
$errorCode = null;
//Get the esi configuration
$config = config('esi');
//Retrieve the token for main character to send mails from
$refreshToken = $esiHelper->GetRefreshToken($config['primary']);
//Create the ESI authentication container
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Check to see if the token is valid or not
if($esiHelper->TokenExpired($refreshToken)) {
$refreshToken = $esiHelper->GetRefreshToken($config['primary']);
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
}
$esi->setBody([
'approved_cost' => 10000,
'body' => $this->body,
'recipients' => [[
'recipient_id' => $this->recipient,
'recipient_type' => $this->recipient_type,
]],
'subject' => $this->subject,
])->invoke('post', '/characters/{character_id}/mail/', [
'character_id'=> $this->sender,
]);
}
/**
* Middleware to only allow 4 jobs to be run per minute
* After a failed job, the job is released back into the queue for at least 1 minute x the number of times attempted
*
*/
public function middleware() {
//Allow 4 jobs per minute, and implement a rate limited backoff on failed jobs
$rateLimitedMiddleware = (new RateLimited())
->enabled()
->key('psemj')
->connectionName('default')
->allow(4)
->everySeconds(60)
->releaseAfterOneMinute()
->releaseAfterBackoff($this->attempts());
return [$rateLimitedMiddleware];
}
/*
* Determine the time at which the job should timeout.
*
*/
public function retryUntil() : \DateTime
{
return Carbon::now()->addDay();
}
/**
* The job failed to process.
*
* @param Exception $exception
* @return void
*/
public function failed($exception)
{
if(!exception instanceof RequestFailedException) {
//If not a failure due to ESI, then log it. Otherwise,
//deduce why the exception occurred.
Log::critical($exception);
}
if ((is_object($exception->getEsiResponse()) && (stristr($exception->getEsiResponse()->error, 'Too many errors') || stristr($exception->getEsiResponse()->error, 'This software has exceeded the error limit for ESI'))) ||
(is_string($exception->getEsiResponse()) && (stristr($exception->getEsiResponse(), 'Too many errors') || stristr($exception->getEsiResponse(), 'This software has exceeded the error limit for ESI')))) {
//We have hit the error rate limiter, wait 120 seconds before releasing the job back into the queue.
Log::info('SendEveMail has hit the error rate limiter. Releasing the job back into the wild in 2 minutes.');
$this->release(120);
} else {
$errorCode = $exception->getEsiResponse()->getErrorCode();
switch($errorCode) {
case 400: //Bad Request
Log::critical("Bad request has occurred in SendEveMail. Job has been discarded");
break;
case 401: //Unauthorized Request
Log::critical("Unauthorized request has occurred in SendEveMail at " . Carbon::now()->toDateTimeString() . ".\r\nCancelling the job.");
break;
case 403: //Forbidden
Log::critical("SendEveMail has incurred a forbidden error. Cancelling the job.");
break;
case 420: //Error Limited
Log::warning("Error rate limit occurred in SendEveMail. Restarting job in 120 seconds.");
$this->release(120);
break;
case 500: //Internal Server Error
Log::critical("Internal Server Error for ESI in SendEveMail. Attempting a restart in 120 seconds.");
$this->release(120);
break;
case 503: //Service Unavailable
Log::critical("Service Unavailabe for ESI in SendEveMail. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 504: //Gateway Timeout
Log::critical("Gateway timeout in SendEveMail. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 520: //Internal Error -- Mostly comes when rate limited hit
Log::warning("Rate limit hit for SendEveMail. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 201: //Good response code
$this->SaveSentRecord($this->sender, $this->subject, $this->body, $this->recipient, $this->recipient_type);
$this->delete();
break;
//If no code is given, then log and break out of switch.
default:
Log::warning("No response code received from esi call in SendEveMail.\r\n");
$this->delete();
break;
}
}
}
public function tags() {
return ['ProcessEveMails'];
}
private function SaveSentRecord($sender, $subject, $body, $recipient, $recipientType) {
$sentmail = new SentMail;
$sentmail->sender = $sender;
$sentmail->subject = $subject;
$sentmail->body = $body;
$sentmail->recipient = $recipient;
$sentmail->recipient_type = $recipientType;
$sentmail->save();
}
}

View File

@@ -0,0 +1,80 @@
<?php
namespace App\Jobs\Commands\Finances;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
//Application Library
use App\Library\Helpers\FinanceHelper;
//Models
use App\Models\Finances\AllianceWalletJournal;
class UpdateAllianceWalletJournalJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 1800;
/**
* Retries
*
* @var int
*/
public $retries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('finances');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$fHelper = new FinanceHelper;
$config = config('esi');
$pages = $fHelper->GetAllianceWalletJournalPages(1, $config['primary']);
//If the number of pages received is zero there is an error in the job.
if($pages == 0) {
Log::critical('Failed to get the number of pages in the job.');
$this->delete();
}
for($i = 1; $i <= $pages; $i++) {
UpdateAllianceWalletJournalPage::dispatch(1, $config['primary'], $i)->onQueue('journal');
}
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['UpdateAllianceWalletJournal', 'Finances'];
}
}

View File

@@ -0,0 +1,226 @@
<?php
namespace App\Jobs\Commands\Finances;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Carbon\Carbon;
use Log;
//Application Library
use Seat\Eseye\Exceptions\RequestFailedException;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use App\Library\Esi\Esi;
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\Finances\AllianceWalletJournal;
class UpdateAllianceWalletJournalPage implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
private $division;
private $charId;
private $page;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($division, $charId, $page)
{
$this->connection = 'redis';
$this->onQueue('finances');
$this->division = $division;
$this->charId = $charId;
$this->page = $page;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables in the handler
$lookup = new LookupHelper;
$esiHelper = new Esi;
//Setup the esi container.
$token = $esiHelper->GetRefreshToken($this->charId);
$esi = $esiHelper->SetupEsiAuthentication($token);
//Check the scope
if(!$esiHelper->HaveEsiScope($this->charId, 'esi-wallet.read_corporation_wallets.v1')) {
Log::critical('Scope check failed for esi-wallet.read_corporation_wallets.v1 for character id: ' . $charId);
return null;
}
if($esiHelper->TokenExpired($token)) {
$token = $esiHelper->GetRefreshToken($this->charId);
$esi = $esiHelper->SetupEsiAuthentication($token);
}
//Reference the character id to the corporation id
$char = $lookup->GetCharacterInfo($this->charId);
$corpId = $char->corporation_id;
/**
* Attempt to get the data from the esi api. If it fails, we skip the page, and go onto the next page, unless
* the failed page is the first page.
*/
$journals = $esi->page($this->page)
->invoke('get', '/corporations/{corporation_id}/wallets/{division}/journal/', [
'corporation_id' => $corpId,
'division' => $this->division,
]);
//Decode the json data, and return it as an array
$wallet = json_decode($journals->raw, true);
//Foreach journal entry, add the journal entry to the table
foreach($wallet as $entry) {
//See if we find the entry id in the database already
$found = AllianceWalletJournal::where([
'id' => $entry['id'],
])->count();
if($found == 0) {
$awj = new AllianceWalletJournal;
$awj->id = $entry['id'];
$awj->corporation_id = $corpId;
$awj->division = $this->division;
if(isset($entry['amount'])) {
$awj->amount = $entry['amount'];
}
if(isset($entry['balance'])) {
$awj->balance = $entry['balance'];
}
if(isset($entry['context_id'])) {
$awj->context_id = $entry['context_id'];
}
if(isset($entry['date'])) {
$awj->date = $esiHelper->DecodeDate($entry['date']);
}
if(isset($entry['description'])) {
$awj->description = $entry['description'];
}
if(isset($entry['first_party_id'])) {
$awj->first_party_id = $entry['first_party_id'];
}
if(isset($entry['reason'])) {
$awj->reason = $entry['reason'];
}
if(isset($entry['ref_type'])) {
$awj->ref_type = $entry['ref_type'];
}
if(isset($entry['tax'])) {
$awj->tax = $entry['tax'];
}
if(isset($entry['tax_receiver_id'])) {
$awj->tax_receiver_id = $entry['tax_receiver_id'];
}
$awj->save();
}
}
//Return as completed
return 0;
}
/**
* The job failed to process
* @param Exception $exception
* @return void
*/
public function failed($exception) {
if(!exception instanceof RequestFailedException) {
//If not a failure due to ESI, then log it. Otherwise,
//deduce why the exception occurred.
Log::critical($exception);
}
if ((is_object($exception->getEsiResponse()) && (stristr($exception->getEsiResponse()->error, 'Too many errors') || stristr($exception->getEsiResponse()->error, 'This software has exceeded the error limit for ESI'))) ||
(is_string($exception->getEsiResponse()) && (stristr($exception->getEsiResponse(), 'Too many errors') || stristr($exception->getEsiResponse(), 'This software has exceeded the error limit for ESI')))) {
//We have hit the error rate limiter, wait 120 seconds before releasing the job back into the queue.
Log::info('UpdateAllianceWalletJournalPage has hit the error rate limiter. Releasing the job back into the wild in 2 minutes.');
$this->release(120);
} else {
$errorCode = $exception->getEsiResponse()->getErrorCode();
switch($errorCode) {
case 400: //Bad Request
Log::critical("Bad request has occurred in UpdateAllianceWalletJournalPage. Job has been discarded");
break;
case 401: //Unauthorized Request
Log::critical("Unauthorized request has occurred in UpdateAllianceWalletJournalPage at " . Carbon::now()->toDateTimeString() . ".\r\nCancelling the job.");
$this->delete();
break;
case 403: //Forbidden
Log::critical("UpdateAllianceWalletJournalPage has incurred a forbidden error. Cancelling the job.");
$this->delete();
break;
case 420: //Error Limited
Log::warning("Error rate limit occurred in UpdateAllianceWalletJournalPage. Restarting job in 120 seconds.");
$this->release(120);
break;
case 500: //Internal Server Error
Log::critical("Internal Server Error for ESI in UpdateAllianceWalletJournalPage. Attempting a restart in 120 seconds.");
$this->release(120);
break;
case 503: //Service Unavailable
Log::critical("Service Unavailabe for ESI in UpdateAllianceWalletJournalPage. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 504: //Gateway Timeout
Log::critical("Gateway timeout in UpdateAllianceWalletJournalPage. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 201:
//Good response code
$this->delete();
break;
//If no code is given, then log and break out of switch.
default:
Log::warning("No response code received from esi call in UpdateAllianceWalletJournalPage.\r\n");
$this->delete();
break;
}
}
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['UpdateAllianceWalletJournalPage', 'Finances'];
}
}

View File

@@ -0,0 +1,66 @@
<?php
namespace App\Jobs\Commands\Finances;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
//Library Functions
use App\Library\Moons\MoonCalc;
class UpdateItemPrices implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 1800;
/**
* Retries
*
* @var int
*/
public $retries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('default');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$moonHelper = new MoonCalc;
//Fetch new prices from fuzzwork.co.uk for the item pricing schemes
$moonHelper->FetchNewPrices();
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['UpdateItemPrices', 'Finances'];
}
}

View File

@@ -0,0 +1,200 @@
<?php
namespace App\Jobs\Commands\MiningTaxes;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
//Application Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Helpers\LookupHelper;
use App\Library\Helpers\StructureHelper;
//Models
use App\Models\MiningTax\Observer;
class FetchMiningTaxesObservers implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('miningtaxes');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$config = config('esi');
$lookup = new LookupHelper;
$sHelper = new StructureHelper($config['primary'], $config['corporation']);
$esiHelper = new Esi;
//Check for the ESI scope needed.
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-industry.read_corporation_mining.v1')) {
Log::critical('Esi scopes were not found for FetchMiningTaxesObserversJob.');
print("Esi scopes not found.");
return;
}
//Check for the other ESI scope needed.
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-universe.read_structures.v1')) {
Log::critical('Esi scope esi-universe.read_structures.v1 was not found for FetchMiningTaxesObserversJob.');
print("Esi scopes not found 2");
return;
}
//Get the refresh token for the character
$refreshToken = $esiHelper->GetRefreshToken($config['primary']);
//Get the esi variable
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Invoke the call to ESI API.
$response = $esi->invoke('get', '/corporation/{corporation_id}/mining/observers/', [
'corporation_id' => $config['corporation'],
]);
//Decode the json response, but leave it as objects rather than an array
$resp = json_decode($response->raw, false);
//Run through the mining observers, and add them to the database
foreach($resp as $observer) {
//See if the observer is found in the database
$found = Observer::where([
'observer_id' => $observer->observer_id,
])->count();
//Get the observer name from esi
$structureInfo = $sHelper->GetStructureInfo($observer->observer_id);
//If found, then update the structure
if($found > 0) {
//Update the existing structure in the database
Observer::where([
'observer_id' => $observer->observer_id,
])->update([
'observer_id' => $observer->observer_id,
'observer_name' => $structureInfo->name,
'last_updated' => $observer->last_updated,
]);
} else {
//Add a new observer into the observer table
$newObs = new Observer;
$newObs->observer_id = $observer->observer_id;
$newObs->observer_type = $observer->observer_type;
$newObs->observer_name = $structureInfo->name;
$newObs->last_updated = $observer->last_updated;
$newObs->solar_system_id = $structureInfo->solar_system_id;
$newObs->solar_system_name = $lookup->SystemIdToName($structureInfo->solar_system_id);
$newObs->save();
}
}
/**
* Cleanup stale data that hasn't been updated in at least 1 week.
*/
$date = Carbon::now()->subDays(7);
Observer::where('last_updated', '<', $date)->delete();
//Return 0 saying everything is fine
return 0;
}
/**
* The job failed to process
* @param Exception $exception
* @return void
*/
public function failed($exception) {
if(!exception instanceof RequestFailedException) {
//If not a failure due to ESI, then log it. Otherwise,
//deduce why the exception occurred.
Log::critical($exception);
}
if ((is_object($exception->getEsiResponse()) && (stristr($exception->getEsiResponse()->error, 'Too many errors') || stristr($exception->getEsiResponse()->error, 'This software has exceeded the error limit for ESI'))) ||
(is_string($exception->getEsiResponse()) && (stristr($exception->getEsiResponse(), 'Too many errors') || stristr($exception->getEsiResponse(), 'This software has exceeded the error limit for ESI')))) {
//We have hit the error rate limiter, wait 120 seconds before releasing the job back into the queue.
Log::info('FetchMiningTaxesObservers has hit the error rate limiter. Releasing the job back into the wild in 2 minutes.');
$this->release(120);
} else {
$errorCode = $exception->getEsiResponse()->getErrorCode();
switch($errorCode) {
case 400: //Bad Request
Log::critical("Bad request has occurred in FetchMiningTaxesObservers. Job has been discarded");
break;
case 401: //Unauthorized Request
Log::critical("Unauthorized request has occurred in FetchMiningTaxesObservers at " . Carbon::now()->toDateTimeString() . ".\r\nCancelling the job.");
break;
case 403: //Forbidden
Log::critical("FetchMiningTaxesObservers has incurred a forbidden error. Cancelling the job.");
break;
case 420: //Error Limited
Log::warning("Error rate limit occurred in FetchMiningTaxesObservers. Restarting job in 120 seconds.");
$this->release(120);
break;
case 500: //Internal Server Error
Log::critical("Internal Server Error for ESI in FetchMiningTaxesObservers. Attempting a restart in 120 seconds.");
$this->release(120);
break;
case 503: //Service Unavailable
Log::critical("Service Unavailabe for ESI in FetchMiningTaxesObservers. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 504: //Gateway Timeout
Log::critical("Gateway timeout in FetchMiningTaxesObservers. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 201: //Good response code
$this->delete();
break;
//If no code is given, then log and break out of switch.
default:
Log::warning("No response code received from esi call in FetchMiningTaxesObservers.\r\n");
$this->delete();
break;
}
}
}
/**
* Set the tags for Horizon
*
* @var array
*/
public function tags() {
return ['FetchMiningObservers', 'MiningTaxes'];
}
}

View File

@@ -0,0 +1,103 @@
<?php
namespace App\Jobs\Commands\MiningTaxes\Invoices;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Bus;
use Carbon\Carbon;
use Log;
//Models
use App\Models\MiningTax\MiningOperation;
use App\Models\MiningTax\Ledger;
class ProcessAllianceMiningOperations implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set job parameters
$this->connection = 'redis';
$this->onQueue('miningtaxes');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$count = MiningOperation::where([
'processed' => 'No',
])->where('operation_date', '<=', Carbon::now())
->count();
if($count > 0) {
$operations = MiningOperation::where([
'processed' => 'No',
])->where('operation_date', '<=', Carbon::now())
->get();
foreach($operations as $operation) {
$ledgers = Ledger::where([
'observer_id' => $operation->structure_id,
'invoiced' => 'No',
'last_updated' => $operation->operation_date,
])->get();
foreach($ledgers as $ledger) {
Ledger::where([
'observer_id' => $operation->structure_id,
'invoiced' => 'No',
'last_updated' => $operation->operation_date,
])->update([
'invoiced' => 'Yes',
'invoice_id' => 'MiningOp' . $operation->id,
]);
}
MiningOperation::where([
'id' => $operation->id,
])->update([
'processed' => 'Yes',
'processed_on' => Carbon::now(),
]);
}
}
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['ProcessAllianceMiningOperations', 'MiningTaxes', 'MiningOperations'];
}
}

View File

@@ -0,0 +1,320 @@
<?php
namespace App\Jobs\Commands\MiningTaxes\Invoices;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
//Application Library
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\MiningTax\Invoice;
use App\Models\MiningTax\Ledger;
use App\Models\User\UserAlt;
use App\Models\User\User;
//Jobs
use App\Jobs\Commands\Eve\SendEveMail;
class SendMiningTaxesInvoices implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('miningtaxes');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$mailDelay = 15;
$mains = new Collection;
/**
* This section will determine if users are mains or alts of a main.
* If they are mains, we keep the key. If they are alts of a main, then we delete
* the key from the collection.
*/
//Pluck all the users from the database of ledgers to determine if they are mains or alts.
$tempMains = Ledger::where([
'invoiced' => 'No',
])->where('last_updated', '>', Carbon::now()->subDays(7))->pluck('character_id');
//Get the unique character ids from the ledgers in the previous statement
$tempMains = $tempMains->unique()->values()->all();
//Cycle through the array of mains, and remove any characters which are in the User Alt table,
//as those characters will be grouped with their correct main later.
for($i = 0; $i < sizeof($tempMains); $i++) {
if(UserAlt::where(['character_id' => $tempMains[$i]])->count() == 0) {
$mains->push($tempMains[$i]);
}
}
/**
* For each of the users, let's determine if there are any ledgers,
* then determine if there are any alts and ledgers associated with the alts.
*/
foreach($mains as $main) {
//Declare some variables for each run through the for loop
$ledgers = new Collection;
//Count the ledgers for the main
$mainLedgerCount = Ledger::where([
'character_id' => $main,
'invoiced' => 'No',
])->where('last_updated', '>', Carbon::now()->subDays(7))->count();
//If there are ledgers for the main, then let's grab them
if($mainLedgerCount > 0) {
$mainLedgers = Ledger::where([
'character_id' => $main,
'invoiced' => 'No',
])->where('last_updated', '>', Carbon::now()->subDays(7))->get();
//Cycle through the entries, and add them to the ledger to send with the invoice
foreach($mainLedgers as $row) {
$ledgers->push([
'character_id' => $row->character_id,
'character_name' => $row->character_name,
'observer_id' => $row->observer_id,
'type_id' => $row->type_id,
'ore_name' => $row->ore_name,
'quantity' => (int)$row->quantity,
'amount' => (float)$row->amount,
'last_updated' => $row->last_updated,
]);
}
}
//Get the alt count for the main character
$altCount = UserAlt::where(['main_id' => $main])->count();
//If more than 0 alts, grab all the alts.
if($altCount > 0) {
$alts = UserAlt::where([
'main_id' => $main,
])->get();
//Cycle through the alts, and get the ledgers, and push onto the stack
foreach($alts as $alt) {
$altLedgerCount = Ledger::where([
'character_id' => $alt->character_id,
'invoiced' => 'No',
])->where('last_updated', '>', Carbon::now()->subDays(7))->count();
if($altLedgerCount > 0) {
$altLedgers = Ledger::where([
'character_id' => $alt->character_id,
'invoiced' => 'No',
])->where('last_updated', '>', Carbon::now()->subDays(7))->get();
foreach($altLedgers as $row) {
$ledgers->push([
'character_id' => $row->character_id,
'character_name' => $row->character_name,
'observer_id' => $row->observer_id,
'type_id' => $row->type_id,
'ore_name' => $row->ore_name,
'quantity' => (int)$row->quantity,
'amount' => (float)$row->amount,
'last_updated' => $row->last_updated,
]);
}
}
}
}
/**
* Send the collected information over to the function to send the actual mail
*/
if($ledgers->count() > 0) {
$this->CreateInvoice($main, $ledgers, $mailDelay);
}
}
}
/**
* Create the invoice to the mail out
*
* @var charId
* @var ledgers
* @var mailDelay
*/
private function CreateInvoice($charId, Collection $ledgers, int &$mailDelay) {
$ores = array();
$characters = array();
$characterIds = array();
$totalPrice = 0.00;
$body = null;
$lookup = new LookupHelper;
$config = config('esi');
//Create an invoice id
$invoiceId = "M" . uniqid();
//Collect the total price of all of the ledgers
$totalPrice = round((float)$ledgers->sum('amount'), 2);
//Get the sum of all the ledgers
$invoiceAmount = round(((float)$ledgers->sum('amount') * (float)$config['mining_tax']), 2);
//Get the character name from the lookup table
$charName = $lookup->CharacterIdToName($charId);
//Create the date due and the invoice date
$dateDue = Carbon::now()->addDays(7);
$invoiceDate = Carbon::now();
//Set the mining tax from the config file
$numberMiningTax = number_format(((float)$config['mining_tax'] * (float)100.00), 2, ".", ",");
//Create the list of ores to put in the mail
$temp = $ledgers->toArray();
foreach($temp as $t) {
//If the key isn't set, set it to the default of 0
if(!isset($ores[$t['type_id']])) {
$ores[$t['type_id']] = (int)0;
}
//Add the quantity into the ores array
$ores[$t['type_id']] += (int)$t['quantity'];
//Create a list of character names
if(!isset($characters[$t['character_name']])) {
$characters[$t['character_name']] = $t['character_name'];
}
//Create a list of character ids
if(!isset($characterIds[$t['character_id']])) {
$characterIds[$t['character_id']] = $t['character_id'];
}
}
/**
* Create the mail body to send to the main character
*/
$body .= "Dear " . $charName . ",<br><br>";
$body .= "Mining Taxes are due for the following ores mined from alliance moons: <br>";
foreach($ores as $ore => $quantity) {
$oreName = $lookup->ItemIdToName($ore);
$body .= $oreName . ": " . number_format($quantity, 0, ".", ",") . "<br>";
}
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces or contract Spatial Forces the following ores:<br>";
foreach($ores as $ore => $quantity) {
$oreName = $lookup->ItemIdToName($ore);
$body .= $oreName . ": " . number_format(round($quantity * $config['mining_tax']), 0, ".", ",") . "<br>";
}
$body .= "<br>";
$body .= "The due date is " . $dateDue . "<br>";
$body .= "Set the reason for transfer as " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br>";
$body .= "Characters Processed: <br>";
foreach($characters as $character) {
$body .= $character . "<br>";
}
$body .= "<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";
//Check if the mail body is greater than 2000 characters. If greater than 2,000 characters, then
if(strlen($body) > 2000) {
$body = "Dear " . $charName . "<br><br>";
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces or contract 15% of the ores mined to Spatial Forces.<br>";
$body .= "The due date is " . $dateDue . "<br>";
$body .= "Set the reason for transfer as: " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";
}
//Mail the invoice to the character if the character is in
//Warped Intentions or Legacy
$subject = 'Warped Intentions Mining Taxes';
$sender = $config['primary'];
$recipientType = 'character';
$recipient = $charId;
//Send the Eve Mail Job to the queue to be dispatched
SendEveMail::dispatch($body, $recipient, $recipientType, $subject, $sender)->delay(Carbon::now()->addSeconds($mailDelay));
/**
* Create a new invoice model, and save it to the database
*/
$invoice = new Invoice;
$invoice->character_id = $charId;
$invoice->character_name = $charName;
$invoice->invoice_id = $invoiceId;
$invoice->invoice_amount = $invoiceAmount;
$invoice->date_issued = $invoiceDate;
$invoice->date_due = $dateDue;
$invoice->status = 'Pending';
$invoice->mail_body = $body;
$invoice->save();
/**
* Mark the invoices as paid
*/
foreach($characterIds as $char) {
Ledger::where([
'character_id' => $char,
'invoiced' => 'No',
])->update([
'invoice_id' => $invoiceId,
'invoiced' => 'Yes',
]);
}
/**
* Increment the mail delay for the next cycle
*/
$mailDelay += 20;
}
/**
* Set the tags for Horizon
*
* @var array
*/
public function tags() {
return ['MiningTaxes', 'SendMiningTaxesInvoics', 'Invoices'];
}
}

View File

@@ -0,0 +1,110 @@
<?php
namespace App\Jobs\Commands\MiningTaxes\Invoices;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
//Application Library
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\MiningTax\Invoice;
use App\Models\User\User;
use App\Models\User\UserAlt;
//Jobs
use App\Jobs\Commands\Eve\SendEveMail;
class UpdateMiningTaxesLateInvoices15th implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('miningtaxes');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$lookup = new LookupHelper;
$config = config('esi');
$mailDelay = 15;
$today = Carbon::now();
//Get all of the invoices that are still pending.
$invoices = Invoice::where([
'status' => 'Pending',
])->get();
//Cycle through the invoices, and see if they are late or not.
foreach($invoices as $invoice) {
$dueDate = Carbon::create($invoice->date_due);
if($dueDate->greaterThan($today->subDays(7))) {
//Update the invoice in the database
Invoice::where([
'invoice_id' => $invoice->invoice_id,
])->update([
'status' => 'Late',
]);
//Build the mail
$subject = 'Warped Intentions Mining Taxes - Invoice Late';
$sender = $config['primary'];
$recipientType = 'character';
$recipient = $invoice->character_id;
$body = "Dear " . $invoice->character_name . ",<br><br>";
$body .= "The Mining Invoice: " . $invoice->invoice_id . " is late.<br>";
$body .= "Please remite " . number_format($invoice->invoice_amount, 2, ".", ",") . "to Spatial Forces.<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";
//Send a reminder to the user through eve mail about the late invoice
SendEveMail::dispatch($body, $recipient, $recipientType, $subject, $sender)->delay(Carbon::now()->addSeconds($mailDelay));
$mailDelay += 20;
}
}
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['UpdateMiningTaxesLateInvoices', 'MiningTaxes', 'Invoices'];
}
}

View File

@@ -0,0 +1,110 @@
<?php
namespace App\Jobs\Commands\MiningTaxes\Invoices;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
//Application Library
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\MiningTax\Invoice;
use App\Models\User\User;
use App\Models\User\UserAlt;
//Jobs
use App\Jobs\Commands\Eve\SendEveMail;
class UpdateMiningTaxesLateInvoices1st implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('miningtaxes');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$lookup = new LookupHelper;
$config = config('esi');
$mailDelay = 15;
$today = Carbon::now();
//Get all of the invoices that are still pending.
$invoices = Invoice::where([
'status' => 'Pending',
])->get();
//Cycle through the invoices, and see if they are late or not.
foreach($invoices as $invoice) {
$dueDate = Carbon::create($invoice->date_due);
if($dueDate->greaterThan($today->subDays(7))) {
//Update the invoice in the database
Invoice::where([
'invoice_id' => $invoice->invoice_id,
])->update([
'status' => 'Late',
]);
//Build the mail
$subject = 'Warped Intentions Mining Taxes - Invoice Late';
$sender = $config['primary'];
$recipientType = 'character';
$recipient = $invoice->character_id;
$body = "Dear " . $invoice->character_name . ",<br><br>";
$body .= "The Mining Invoice: " . $invoice->invoice_id . " is late.<br>";
$body .= "Please remite " . number_format($invoice->invoice_amount, 2, ".", ",") . "to Spatial Forces.<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";
//Send a reminder to the user through eve mail about the late invoice
SendEveMail::dispatch($body, $recipient, $recipientType, $subject, $sender)->delay(Carbon::now()->addSeconds($mailDelay));
$mailDelay += 20;
}
}
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['UpdateMiningTaxesLateInvoices', 'MiningTaxes', 'Invoices'];
}
}

View File

@@ -0,0 +1,164 @@
<?php
namespace App\Jobs\Commands\MiningTaxes\Ledgers;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Carbon\Carbon;
//App Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Helpers\LookupHelper;
use App\Library\Moons\MoonCalc;
//Jobs
use App\Jobs\Commands\MiningTaxes\Ledgers\ProcessMiningTaxesLedgers;
//App Models
use App\Models\MiningTax\Observer;
use App\Models\MiningTax\Ledger;
use App\Models\Moon\MineralPrice;
use App\Models\Moon\ItemComposition;
use App\Models\Esi\EsiToken;
use App\Models\Esi\EsiScope;
class FetchMiningTaxesLedgers implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Job Variables
*/
private $charId;
private $corpId;
private $observerId;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($charId, $corpId, $observerId)
{
//Set the connection for the job
$this->connection = 'redis';
$this->onQueue('miningtaxes');
//Import the variables from the calling function
$this->charId = $charId;
$this->corpId = $corpId;
$this->observerId = $observerId;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$lookup = new LookupHelper;
$mHelper = new MoonCalc;
$esiHelper = new Esi;
$pageFailed = false;
$config = config('esi');
//Check for the correct scope
if(!$esiHelper->haveEsiScope($this->charId, 'esi-industry.read_corporation_mining.v1')) {
Log::critical('Character: ' . $this->charId . ' did not have the correct esi scope in FetchMiningTaxesLedgersJob.');
return null;
}
//Get the esi token in order to pull data from esi
$refreshToken = $esiHelper->GetRefreshToken($this->charId);
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Set the current page
$currentPage = 1;
$totalPages = 1;
//Setup a do-while loop to sort through the ledgers by pages
do {
/**
* During the course of the operation, we want to ensure our token stays valid.
* If the token, expires, then we want to refresh the token through the esi helper
* library functionality.
*/
if($esiHelper->TokenExpired($refreshToken)) {
$refreshToken = $esiHelper->GetRefreshToken($this->charId);
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
}
/**
* Attempt to get the data from the esi api. If it fails, we skip the page
*/
try {
$response = $esi->page($currentPage)
->invoke('get', '/corporation/{corporation_id}/mining/observers/{observer_id}/', [
'corporation_id' => $config['corporation'],
'observer_id' => $this->observerId,
]);
} catch(RequestFailedException $e) {
Log::warning('Failed to get the mining ledger in FetchMiningTaxesLedgersCommand for observer id: ' . $this->observerId);
$pageFailed = true;
}
/**
* If the current page is the first one and the page didn't fail, then update the total pages.
* If the first page failed, just return as we aren't going to be able to get the total amount of data needed.
*/
if($currentPage == 1 && $pageFailed == false) {
$totalPages = $response->pages;
} else if($currentPage == 1 && $pageFailed == true) {
return null;
}
if($pageFailed == true) {
//If the page failed, then reset the variable, and skip the current iteration
//of creating the jobs.
$pageFailed = false;
} else {
//Decode the json response from the ledgers
$ledgers = json_decode($response->raw);
//Dispatch jobs to process each of the mining ledger entries
foreach($ledgers as $ledger) {
ProcessMiningTaxesLedgers::dispatch($ledger, $this->observerId);
}
}
//Increment the current pages
$currentPage++;
} while($currentPage <= $totalPages);
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['FetchMiningTaxesLedgers', 'MiningTaxes', 'MiningTaxesLedgers'];
}
}

View File

@@ -0,0 +1,121 @@
<?php
namespace App\Jobs\Commands\MiningTaxes\Ledgers;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Carbon\Carbon;
use Log;
//App Library
use App\Library\Helpers\LookupHelper;
use App\Library\Moons\MoonCalc;
//Models
use App\Models\MiningTax\Ledger;
use App\Models\Moon\MineralPrice;
use App\Models\Moon\ItemComposition;
class ProcessMiningTaxesLedgers implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Job Variables
*/
private $ledger;
private $observerId;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($ledger, $observerId)
{
//Set the connection for the job
$this->connection = 'redis';
$this->onQueue('miningtaxes');
//Import variables from the calling function
$this->ledger = $ledger;
$this->observerId = $observerId;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$lookup = new LookupHelper;
$mHelper = new MoonCalc;
$config = config('esi');
//Create a starting date for the ledger
$ledgerDate = Carbon::createFromFormat('Y-m-d', $this->ledger->last_updated);
//If the ledger is more than one day old, then process it, otherwise, we don't process it
//or add it to the database as it may still be updating.
if($ledgerDate->lessThan(Carbon::now()->subDay())) {
//Get some of the basic information we need to work with
$charName = $lookup->CharacterIdToName($this->ledger->character_id);
//Get the type name from the ledger ore
$typeName = $lookup->ItemIdToName($this->ledger->type_id);
//Get the price from the helper function
$price = $mHelper->CalculateOrePrice($this->ledger->type_id);
//Calculate the total price based on the amount
$amount = (($price * $this->ledger->quantity) * $config['refine_rate']);
$found = Ledger::where([
'character_id' => $this->ledger->character_id,
'observer_id' => $this->observerId,
'type_id' => $this->ledger->type_id,
'last_updated' => $this->ledger->last_updated,
])->count();
if($found == 0) {
$ledg = new Ledger;
$ledg->character_id = $this->ledger->character_id;
$ledg->character_name = $charName;
$ledg->observer_id = $this->observerId;
$ledg->last_updated = $this->ledger->last_updated;
$ledg->type_id = $this->ledger->type_id;
$ledg->ore_name = $typeName;
$ledg->quantity = $this->ledger->quantity;
$ledg->amount = $amount;
$ledg->save();
}
}
return 0;
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['ProcessMiningTaxesLedgers', 'MiningTaxes', 'MiningTaxesLedgers'];
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Jobs\Commands\MiningTaxes;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Bus;
use App\Jobs\Commands\MiningTaxes\Invoices\SendMiningTaxesInvoices;
use App\Jobs\Commands\MiningTaxes\Invoices\ProcessAllianceMiningOperations;
class MiningTaxesWeeklyInvoicing implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 1;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set job parameters
$this->connection = 'redis';
$this->onQueue('miningtaxes');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Bus::chain([
new ProcessAllianceMiningOperations,
new SendMiningTaxesInvoices,
])->dispatch();
}
}

View File

@@ -0,0 +1,75 @@
<?php
namespace App\Jobs\Commands\MiningTaxes;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
//Models
use App\Models\MiningTax\Observer;
//Jobs
use App\Jobs\Commands\MiningTaxes\Ledgers\FetchMiningTaxesLedgers;
class PreFetchMiningTaxesLedgers implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('miningtaxes');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Get the site configuration which holds some data we need
$config = config('esi');
//Get the observers from the database
$observers = Observer::all();
//For each of the observers, send a job to fetch the mining ledger
foreach($observers as $obs) {
//Dispatch the mining taxes ledger jobs
FetchMiningTaxesLedgers::dispatch($config['primary'], $config['corporation'], $obs->observer_id);
}
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['PreFetchMiningTaxesLedgers', 'MiningTaxes', 'MiningTaxesLedgers'];
}
}

View File

@@ -0,0 +1,143 @@
<?php
namespace App\Jobs\Commands\MiningTaxes;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Carbon\Carbon;
use Log;
//Library
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\MiningTax\Invoice;
use App\Models\MiningTax\Payment;
use App\Models\Finances\AllianceWalletJournal;
class ProcessMiningTaxesPayments implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('miningtaxes');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare the variables we will need
$looup = new LookupHelper;
$currentTime = Carbon::now();
//Get the outstanding invoices
$outstanding = Invoice::where([
'status' => 'Pending',
])->get();
//Use the player donation journal from finances to see if the invoice_id is present
//as a reason
foreach($outstanding as $invoice) {
//See if we have a reason with the correct uniqid from the player donation journal
$found = AllianceWalletJournal::where([
'reason' => $invoice->invoice_id,
])->count();
//If we have received the invoice, then mark the invoice as paid
if($found > 0) {
//If we have the count, then grab the journal entry in order to do some things with it
$journal = AllianceWalletJournal::where([
'reason' => $invoice->invoice_id,
])->first();
//If the bill is paid on time, then update the invoice as such
if($currentTime->lessThanOrEqualTo($journal->inserted_at)) {
Invoice::where([
'invoice_id' => $invoice->invoice_id,
])->update([
'status' => 'Paid',
]);
}
if($currentTime->greaterThan($journal->inserted_at)) {
Invoice::where([
'invoice_id' => $invoice->invoice_id,
])->update([
'status' => 'Paid Late',
]);
}
} else {
$count = AllianceWalletJournal::where([
'reason' => $invoice->invoice_id,
])->count();
if($count > 0) {
//If we have the count, then grab the journal entry in order to do some things with it
$journal = AllianceWalletJournal::where([
'reason' => $invoice->invoice_id,
])->first();
//If the bill is paid on time, then update the invoice as such
if($currentTime->lessThanOrEqualTo($journal->inserted_at)) {
Invoice::where([
'invoice_id' => $invoice->invoice_id,
])->update([
'status' => 'Paid',
]);
}
if($currentTime->greaterThan($journal->inserted_at)) {
Invoice::where([
'invoice_id' => $invoice->invoice_id,
])->update([
'status' => 'Paid Late',
]);
}
}
}
}
//Use the contract descriptions from the esi to see if the invoice_id is present.
//If the invoice is present, then mark it off as sent in correctly
}
/**
* Set the tags for Horzion
*
* @var array
*/
public function tags() {
return ['ProcessMiningTaxesPayments', 'MiningTaxes', 'Payments'];
}
}

View File

@@ -0,0 +1,316 @@
<?php
namespace App\Jobs\Commands\MiningTaxes;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
//Application Library
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\MiningTax\Invoice;
use App\Models\MiningTax\Ledger;
use App\Models\User\UserAlt;
use App\Models\User\User;
//Jobs
use App\Jobs\Commands\Eve\SendEveMail;
class SendMiningTaxesInvoicesOld implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('miningtaxes');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$mailDelay = 15;
$mains = new Collection;
/**
* This section will determine if users are mains or alts of a main.
* If they are mains, we keep the key. If they are alts of a main, then we delete
* the key from the collection.
*/
//Pluck all the users from the database of ledgers to determine if they are mains or alts.
$tempMains = Ledger::where([
'invoiced' => 'No',
])->where('last_updated', '>', Carbon::now()->subDays(7))->pluck('character_id');
//Get the unique character ids from the ledgers in the previous statement
$tempMains = $tempMains->unique()->values()->all();
//Cycle through the array of mains, and remove any characters which are in the User Alt table,
//as those characters will be grouped with their correct main later.
for($i = 0; $i < sizeof($tempMains); $i++) {
if(UserAlt::where(['character_id' => $tempMains[$i]])->count() == 0) {
$mains->push($tempMains[$i]);
}
}
/**
* For each of the users, let's determine if there are any ledgers,
* then determine if there are any alts and ledgers associated with the alts.
*/
foreach($mains as $main) {
//Declare some variables for each run through the for loop
$ledgers = new Collection;
//Count the ledgers for the main
$mainLedgerCount = Ledger::where([
'character_id' => $main,
'invoiced' => 'No',
])->where('last_updated', '>', Carbon::now()->subDays(7))->count();
//If there are ledgers for the main, then let's grab them
if($mainLedgerCount > 0) {
$mainLedgers = Ledger::where([
'character_id' => $main,
'invoiced' => 'No',
])->where('last_updated', '>', Carbon::now()->subDays(7))->get();
//Cycle through the entries, and add them to the ledger to send with the invoice
foreach($mainLedgers as $row) {
$ledgers->push([
'character_id' => $row->character_id,
'character_name' => $row->character_name,
'observer_id' => $row->observer_id,
'type_id' => $row->type_id,
'ore_name' => $row->ore_name,
'quantity' => (int)$row->quantity,
'amount' => (float)$row->amount,
'last_updated' => $row->last_updated,
]);
}
}
//Get the alt count for the main character
$altCount = UserAlt::where(['main_id' => $main])->count();
//If more than 0 alts, grab all the alts.
if($altCount > 0) {
$alts = UserAlt::where([
'main_id' => $main,
])->get();
//Cycle through the alts, and get the ledgers, and push onto the stack
foreach($alts as $alt) {
$altLedgerCount = Ledger::where([
'character_id' => $alt->character_id,
'invoiced' => 'No',
])->where('last_updated', '>', Carbon::now()->subDays(7))->count();
if($altLedgerCount > 0) {
$altLedgers = Ledger::where([
'character_id' => $alt->character_id,
'invoiced' => 'No',
])->where('last_updated', '>', Carbon::now()->subDays(7))->get();
foreach($altLedgers as $row) {
$ledgers->push([
'character_id' => $row->character_id,
'character_name' => $row->character_name,
'observer_id' => $row->observer_id,
'type_id' => $row->type_id,
'ore_name' => $row->ore_name,
'quantity' => (int)$row->quantity,
'amount' => (float)$row->amount,
'last_updated' => $row->last_updated,
]);
}
}
}
}
/**
* Send the collected information over to the function to send the actual mail
*/
if($ledgers->count() > 0) {
$this->CreateInvoice($main, $ledgers, $mailDelay);
}
}
}
/**
* Create the invoice to the mail out
*
* @var charId
* @var ledgers
* @var mailDelay
*/
private function CreateInvoice($charId, Collection $ledgers, int &$mailDelay) {
$ores = array();
$characters = array();
$characterIds = array();
$totalPrice = 0.00;
$body = null;
$lookup = new LookupHelper;
$config = config('esi');
//Create an invoice id
$invoiceId = "M" . uniqid();
//Get the sum of all the ledgers
$invoiceAmount = round(((float)$ledgers->sum('amount') * (float)$config['mining_tax']), 2);
//Get the character name from the lookup table
$charName = $lookup->CharacterIdToName($charId);
//Create the date due and the invoice date
$dateDue = Carbon::now()->addDays(7);
$invoiceDate = Carbon::now();
//Set the mining tax from the config file
$numberMiningTax = number_format(((float)$config['mining_tax'] * (float)100.00), 2, ".", ",");
//Create the list of ores to put in the mail
$temp = $ledgers->toArray();
foreach($temp as $t) {
//If the key isn't set, set it to the default of 0
if(!isset($ores[$t['type_id']])) {
$ores[$t['type_id']] = (int)0;
}
//Add the quantity into the ores array
$ores[$t['type_id']] += (int)$t['quantity'];
//Create a list of character names
if(!isset($characters[$t['character_name']])) {
$characters[$t['character_name']] = $t['character_name'];
}
//Create a list of character ids
if(!isset($characterIds[$t['character_id']])) {
$characterIds[$t['character_id']] = $t['character_id'];
}
}
/**
* Create the mail body to send to the main character
*/
$body .= "Dear " . $charName . ",<br><br>";
$body .= "Mining Taxes are due for the following ores mined from alliance moons: <br>";
foreach($ores as $ore => $quantity) {
$oreName = $lookup->ItemIdToName($ore);
$body .= $oreName . ": " . number_format($quantity, 0, ".", ",") . "<br>";
}
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces by " . $dateDue . "<br>";
$body .= "Set the reason for transfer as " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br><br>";
$body .= "You can also send a contract with the following ores in the contract with the reason set as: " . $invoiceId . "<br>";
foreach($ores as $ore => $quantity) {
$oreName = $lookup->ItemIdToName($ore);
$body .= $oreName . ": " . number_format(round($quantity * $config['mining_tax']), 0, ".", ",") . "<br>";
}
$body .= "<br>";
$body .= "Characters Processed: <br>";
foreach($characters as $character) {
$body .= $character . "<br>";
}
$body .= "<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";
//Check if the mail body is greater than 2000 characters. If greater than 2,000 characters, then
if(strlen($body) > 2000) {
$body = "Dear " . $charName . "<br><br>";
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces by " . $dateDue . "<br>";
$body .= "Set the reason for transfer as: " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";
}
//Mail the invoice to the character if the character is in
//Warped Intentions or Legacy
$subject = 'Warped Intentions Mining Taxes';
$sender = $config['primary'];
$recipientType = 'character';
$recipient = $charId;
//Send the Eve Mail Job to the queue to be dispatched
SendEveMail::dispatch($body, $recipient, $recipientType, $subject, $sender)->delay(Carbon::now()->addSeconds($mailDelay));
/**
* Create a new invoice model, and save it to the database
*/
$invoice = new Invoice;
$invoice->character_id = $charId;
$invoice->character_name = $charName;
$invoice->invoice_id = $invoiceId;
$invoice->invoice_amount = $invoiceAmount;
$invoice->date_issued = $invoiceDate;
$invoice->date_due = $dateDue;
$invoice->status = 'Pending';
$invoice->mail_body = $body;
$invoice->save();
/**
* Mark the invoices as paid
*/
foreach($characterIds as $char) {
Ledger::where([
'character_id' => $char,
'invoiced' => 'No',
])->update([
'invoice' => $invoiceId,
'invoiced' => 'Yes',
]);
}
/**
* Increment the mail delay for the next cycle
*/
$mailDelay += 20;
}
/**
* Set the tags for Horizon
*
* @var array
*/
public function tags() {
return ['MiningTaxes', 'SendMiningTaxesInvoics', 'Invoices'];
}
}

View File

@@ -0,0 +1,51 @@
<?php
namespace App\Jobs\Commands\MoonRental\Invoices;
//Application Library
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
//Internal Library
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\MoonRental\AllianceMoon;
use App\Models\MoonRental\AllianceMoonOre;
use App\Models\MoonRental\AllianceMoonRental;
class SendMoonRentalInvoices implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('miningtaxes');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$lookup = new LookupHelper;
$months = 3;
$today = Carbon::now();
$future = Carbon::now()->addMonths(3);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace App\Jobs\Commands\MoonRental;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Log;
use Carbon\Carbon;
//Internal Library
use App\Library\Moons\MoonCalc;
use App\Library\Helpers\LookupHelper;
//Models
use App\Models\MoonRental\AllianceMoon;
use App\Models\MoonRental\AllianceMoonOre;
class UpdateAllianceMoonRentalWorth implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$this->connection = 'redis';
$this->onQueue('default');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$lookup = new LookupHelper;
$mHelper = new MoonCalc;
$months = 3;
$rentalTax = 0.25;
$moons = AllianceMoon::all();
foreach($moons as $moon) {
//Declare the arrays needed
$ores = array();
$worth = 0.00;
$ores = AllianceMoonOre::where([
'moon_id' => $moon->moon_id,
])->get(['ore_name', 'quantity'])->toArray();
if(sizeof($ores) == 1) {
$ores[1]["ore_name"] = null;
$ores[1]["quantity"] = 0.00;
$ores[2]["ore_name"] = null;
$ores[2]["quantity"] = 0.00;
$ores[3]["ore_name"] = null;
$ores[3]["quantity"] = 0.00;
} else if(sizeof($ores) == 2) {
$ores[2]["ore_name"] = null;
$ores[2]["quantity"] = 0.00;
$ores[3]["ore_name"] = null;
$ores[3]["quantity"] = 0.00;
} else if(sizeof($ores) == 3) {
$ores[3]["ore_name"] = null;
$ores[3]["quantity"] = 0.00;
}
//one of these two ways will work
$worth = $mHelper->MoonTotalWorth($ores[0]["ore_name"], $ores[0]["quantity"],
$ores[1]["ore_name"], $ores[1]["quantity"],
$ores[2]["ore_name"], $ores[2]["quantity"],
$ores[3]["ore_name"], $ores[3]["quantity"]);
$rentalAmount = $worth * $rentalTax * $months;
AllianceMoon::where([
'moon_id' => $moon->moon_id,
])->update([
'worth_amount' => $worth,
'rental_amount' => $rentalAmount,
]);
}
}
}

View File

@@ -0,0 +1,174 @@
<?php
namespace App\Jobs\Commands\Structures;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
//Application Library
use App\Library\Esi\Esi;
use Seat\Eseye\Exception\RequestFailedException;
use App\Library\Structures\StructureHelper;
//Models
use App\Models\Structure\Structure;
use App\Models\Structure\Service;
class FetchAllianceStructures implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set the connection for the job
$this->connection = 'redis';
$this->onQueue('structures');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$config = config('esi');
$corpId = 98287666;
$esiHelper = new Esi;
$structureScope = $esiHelper->HaveEsiScope($config['primary'], 'esi-universe.read_structures.v1');
$corpStructureScope = $esiHelper->HaveEsiScope($config['primary'], 'esi-corporations.read_structures.v1');
//Check scopes
if($structureScope == false || $corpStructureScope == false) {
if($structureScope == false) {
Log::critical("Scope check for esi-universe.read_structures.v1 has failed.");
}
if($corpStructureScope == false) {
Log::critical("Scope check for esi-corporations.read_structures.v1 has failed.");
}
return -1;
}
//Get the refresh token from the database
$token = $esiHelper->GetRefreshToken($config['primary']);
//Create the esi authentication container
$esi = $esiHelper->SetupEsiAuthentication($token);
//Set the current page
$currentPage = 1;
//Set our default pages
$totalPages = 1;
do {
//Attempt to get the entire page worth of structures
$structures = $esi->page($currentPage)
->invoke('get', '/corporations/{corporation_id}/structures/', [
'corporation_id' => $corpId,
]);
//If on the first page, then update the total number of pages
if($currentPage == 1) {
$totalPages = $structures->pages;
}
//For each asset retrieved, let's process it.
foreach($structures as $s) {
ProcessAllianceStructures::dispatch($s)->onQueue('structures');
}
//Increment the current page
$currentPage++;
} while($currentPage <= $totalPages);
}
/**
* The job failed to process
* @param Exception $exception
* @return void
*/
public function failed($exception) {
if(!exception instanceof RequestFailedException) {
//If not a failure due to ESI, then log it. Otherwise,
//deduce why the exception occurred.
Log::critical($exception);
}
if ((is_object($exception->getEsiResponse()) && (stristr($exception->getEsiResponse()->error, 'Too many errors') || stristr($exception->getEsiResponse()->error, 'This software has exceeded the error limit for ESI'))) ||
(is_string($exception->getEsiResponse()) && (stristr($exception->getEsiResponse(), 'Too many errors') || stristr($exception->getEsiResponse(), 'This software has exceeded the error limit for ESI')))) {
//We have hit the error rate limiter, wait 120 seconds before releasing the job back into the queue.
Log::info('FetchAllianceStructures has hit the error rate limiter. Releasing the job back into the wild in 2 minutes.');
$this->release(120);
} else {
$errorCode = $exception->getEsiResponse()->getErrorCode();
switch($errorCode) {
case 400: //Bad Request
Log::critical("Bad request has occurred in FetchAllianceStructures. Job has been discarded");
break;
case 401: //Unauthorized Request
Log::critical("Unauthorized request has occurred in FetchAllianceStructures at " . Carbon::now()->toDateTimeString() . ".\r\nCancelling the job.");
break;
case 403: //Forbidden
Log::critical("FetchAllianceStructures has incurred a forbidden error. Cancelling the job.");
break;
case 420: //Error Limited
Log::warning("Error rate limit occurred in FetchAllianceStructures. Restarting job in 120 seconds.");
$this->release(120);
break;
case 500: //Internal Server Error
Log::critical("Internal Server Error for ESI in FetchAllianceStructures. Attempting a restart in 120 seconds.");
$this->release(120);
break;
case 503: //Service Unavailable
Log::critical("Service Unavailabe for ESI in FetchAllianceStructures. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 504: //Gateway Timeout
Log::critical("Gateway timeout in FetchAllianceStructures. Releasing the job back to the queue in 30 seconds.");
$this->release(30);
break;
case 201: //Good response code
$this->delete();
break;
//If no code is given, then log and break out of switch.
default:
Log::warning("No response code received from esi call in FetchAllianceStructures.\r\n");
$this->delete();
break;
}
}
}
public function tags() {
return ['FetchAllianceStructures', 'AllianceStructures', 'Structures'];
}
}

View File

@@ -0,0 +1,216 @@
<?php
namespace App\Jobs\Commands\Structures;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
//Application Library
use App\Library\Helpers\LookupHelper;
use App\Library\Esi\Esi;
//Models
use App\Models\Structure\Structure;
use App\Models\Structure\Service;
class ProcessAllianceStructures implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
private $structure;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($s)
{
//Set the connection for the job
$this->connection = 'redis';
$this->onQueue('structures');
//Set variables
$this->structure = $s;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
/**
* Update the structure if it already exists, or add the structure if it doesn't exist in the database
*/
if(Structure::where(['structure_id' => $this->structure->structure_id])->count() > 0) {
$this->UpdateStructure($this->structure);
} else {
$this->SaveNewStructure($this->structure);
}
}
/**
* Set the tags for the job
*
* @var array
*/
public function tags() {
return ['ProcessAllianceStructures', 'AllianceStructures', 'Structures'];
}
private function SaveNewStructure($structure) {
//Declare variables
$lookup = new LookupHelper;
$esiHelper = new Esi;
//Get the solar system name
$solarName = $lookup->SystemIdToName($structure->system_id);
$s = new Structure;
$s->structure_id = $structure->structure_id;
$s->structure_name = $structure->name;
$s->solar_system_id = $structure->system_id;
$s->solar_system_name = $solarName;
$s->type_id = $structure->type_id;
$s->type_name = $lookup->StructureTypeIdToName($structure->type_id);
$s->corporation_id = $structure->corporation_id;
if(isset($structure->services)) {
$s->services = true;
foreach($structure->services as $service) {
$serv = new Service;
$serv->structure_id = $structure->structure_id;
$serv->name = $service->name;
$serv->state = $service->state;
}
} else {
$s->services = false;
}
$s->state = $structure->state;
if(isset($structre->state_timer_start)) {
$s->state_timer_start = $esiHelper->DecodeDate($structure->state_timer_start);
}
if(isset($structure->state_timer_end)) {
$s->state_timer_end = $esiHelper->DecodeDate($structure->state_timer_end);
}
if(isset($structure->fuel_expires)) {
$s->fuel_expires = $esiHelper->DecodeDate($structure->fuel_expires);
}
$s->profile_id = $structure->profile_id;
if(isset($structure->next_reinforce_apply)) {
$s->next_reinforce_apply = $structure->next_reinforce_apply;
}
if(isset($structure->next_reinforce_hour)) {
$s->next_reinforce_hour = $structure->next_reinforce_hour;
}
$s->reinforce_hour = $structure->reinforce_hour;
if(isset($structure->unanchors_at)) {
$s->unanchors_at = $esiHelper->DecodeDate($s->unanchors_at);
}
$s->save();
}
private function UpdateStructure($structure) {
$esiHelper = new Esi;
if(isset($structure->corporation_id)) {
Structure::where([
'structure_id' => $structure->structure_id,
])->update([
'corporation_id' => $structure->corporation_id,
]);
}
if(isset($structure->state)) {
Structure::where([
'structure_id' => $structure->structure_id,
])->update([
'state' => $structure->state,
]);
}
if(isset($structure->state_timer_start)) {
Structure::where([
'structure_id' => $structure->structure_id,
])->update([
'state_timer_start' => $esiHelper->DecodeDate($structure->state_timer_start),
]);
}
if(isset($structure->state_timer_end)) {
Structure::where([
'structure_id' => $structure->structure_id,
])->update([
'state_timer_end' => $esiHelper->DecodeDate($structure->state_timer_end),
]);
}
if(isset($structure->fuel_expires)) {
Structure::where([
'structure_id' => $structure->structure_id,
])->update([
'fuel_expires' => $esiHelper->DecodeDate($structure->fuel_expires),
]);
}
if(isset($structure->profile_id)) {
Structure::where([
'structure_id' => $structure->structure_id,
])->update([
'profile_id' => $structure->profile_id,
]);
}
if(isset($structure->next_reinforce_apply)) {
Structure::where([
'structure_id' => $structure->structure_id,
])->update([
'next_reinforce_apply' => $structure->next_reinforce_apply,
]);
}
if(isset($structure->next_reinforce_hour)) {
Structure::where([
'structure_id' => $structure->structure_id,
])->update([
'next_reinforce_hour' => $structure->next_reinforce_hour,
]);
}
if(isset($structure->reinforce_hour)) {
Structure::where([
'structure_id' => $structure->structure_id,
])->update([
'reinforce_hour' => $structure->reinforce_hour,
]);
}
if(isset($structure->unanchors_at)) {
Structure::where([
'structure_id' => $structure->structure_id,
])->update([
'unanchors_at' => $esiHelper->DecodeDate($structure->unanchors_at),
]);
}
if(Service::where(['structure_id' => $structure->structure_id])->count() > 0) {
foreach($structure->services as $service) {
Service::where([
'structure_id' => $structure->structure_id,
])->update([
'state' => $service->state,
]);
}
}
}
}

View File

@@ -0,0 +1,70 @@
<?php
namespace App\Jobs\Commands\Structures;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
//Jobs
use App\Jobs\Commands\Structures\FetchAllianceStructures;
//Models
use App\Models\Structure\Structure;
use App\Models\Structure\Service;
class PurgeAllianceStructures implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*
* @var int
*/
public $tries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set the connection for the job
$this->connection = 'redis';
$this->onQueue('structures');
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Structure::truncate();
Service::truncate();
FetchAllianceStructures::dispatch()->delay(Carbon::now()->addSeconds(30));
}
/**
* Set the tags for the job
*
* @var array
*/
public function tags() {
return ['PurgeAllianceStructures', 'AllianceStructures', 'Structures'];
}
}

View File

@@ -0,0 +1,113 @@
<?php
namespace App\Jobs\Commands\SupplyChain;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Carbon\Carbon;
use Log;
//Library
use App\Library\Lookups\LookupHelper;
//Models
use App\Models\Contracts\SupplyChainBid;
use App\Models\Contracts\SupplyChainContract;
//Jobs
use App\Jobs\Commands\Eve\SendEveMail;
class EndSupplyChainContractJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 1200;
/**
* Retries
*
* @var int
*/
public $retries = 3;
/**
* Private Variables
*/
private $contractId;
private $issuerId;
private $issuerName;
private $title;
private $endDate;
private $deliveryBy;
private $body;
private $state;
private $finalCost;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(SupplyChainContract $contract)
{
//Set the queue connection up
$this->connection = 'redis';
//Set the variables
$contractId = $contract->contract_id;
$issuerId = $contract->issuer_id;
$issuerName = $contract->issuer_name;
$title = $contract->title;
$endDate = $contract->end_date;
$deliveryBy = $contract->delivery_by;
$body = $contract->body;
$state = $contract->state;
$finalCost = $contract->final_cost;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$bidId = null;
$bidAmount = null;
//Get all of the bids from the contract
$bids = SupplyChainBids::where([
'contract_id' => $contractId,
])->get();
//Loop through the bids and find the lowest bid
foreach($bids as $bid) {
if($bidId == null) {
$bidId = $bid->id;
$bidAmount = $bid->bid_amount;
} else {
if($bid->bid_amount < $bidAmount) {
$bidId = $bid->id;
$bidAmount = $bid->bid_amount;
}
}
}
//Clean up the bids and update the contract with the winning bid
SupplyChainContract::where([
'contract_id' => $this->contractId,
])->update([
'final_cost' => $bidAmount,
'winning_bid_id' => $bidId,
]);
}
}

Some files were not shown because too many files have changed in this diff Show More