Compare commits

...

2096 Commits

Author SHA1 Message Date
dependabot[bot]
6146a3b01e Bump ini from 1.3.5 to 1.3.7
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-11 02:42:19 +00: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
6a38286d45 pagination testing 2019-10-29 00:52:20 -05:00
6afd6f4f4f pagination testing 2019-10-29 00:51:33 -05:00
0c3e22e17d pagination testing 2019-10-29 00:50:39 -05:00
ea4a58095d pagination testing 2019-10-29 00:49:59 -05:00
9ad3a2ea33 pagination testing 2019-10-29 00:49:19 -05:00
d59e35ac86 pagination testing 2019-10-29 00:48:52 -05:00
e2ba9d29ee pagination testing 2019-10-29 00:46:50 -05:00
b037372619 pagination testing 2019-10-29 00:46:22 -05:00
22637f9d34 pagination testing 2019-10-29 00:45:28 -05:00
e0128f2e6b pagination testing 2019-10-29 00:44:57 -05:00
1b0c301452 pagination testing 2019-10-29 00:44:28 -05:00
86ad4be8d0 pagination testing 2019-10-29 00:43:22 -05:00
8159810613 pagination testing 2019-10-29 00:42:42 -05:00
efc4c4e5bd pagination testing 2019-10-29 00:42:05 -05:00
390208ecd4 pagination testing 2019-10-29 00:41:18 -05:00
054935a95d pagination testing 2019-10-29 00:38:17 -05:00
c0c8b6fb32 pagination testing 2019-10-29 00:37:26 -05:00
da8834fe96 pagination testing 2019-10-29 00:35:38 -05:00
ae93aeb070 pagination testing 2019-10-29 00:29:54 -05:00
c369c3487f pagination testing 2019-10-29 00:16:42 -05:00
3531140a13 pagination testing 2019-10-29 00:16:09 -05:00
0dc04a4901 pagination testing 2019-10-29 00:15:13 -05:00
5a7176c493 pagination testing 2019-10-29 00:14:09 -05:00
87a160fb58 pagination testing 2019-10-29 00:13:36 -05:00
4d86c77ced pagination testing 2019-10-29 00:04:38 -05:00
8c972a140b pagination testing 2019-10-29 00:03:21 -05:00
a19a756750 pagination testing 2019-10-28 23:57:27 -05:00
5542c6ea11 pagination testing 2019-10-28 23:56:58 -05:00
b8b1dad2de pagination testing 2019-10-28 23:56:27 -05:00
cfaebed0fe pagination testing 2019-10-28 23:54:33 -05:00
9619fde4ed pagination testing 2019-10-28 23:48:22 -05:00
d47b7c9f1c pagination test 2019-10-28 23:37:42 -05:00
7eee0b66c6 pagination test 2019-10-28 23:36:40 -05:00
92109f91fd file renamed 2019-10-28 23:35:45 -05:00
c0ba6415e2 file renamed 2019-10-28 23:34:15 -05:00
32e2a40592 file renamed 2019-10-28 23:32:26 -05:00
9d40ca26e0 pagination test 2019-10-28 23:22:57 -05:00
632457ff3a structure request form layout 2019-10-28 19:34:42 -05:00
550a6a5d7b navbar link 2019-10-28 19:33:26 -05:00
9fa08f77bd taxes for admin dashboard rework 2019-10-28 19:32:13 -05:00
52705775ce user dashboard for admin 2019-10-28 19:31:16 -05:00
ac14c6fa13 users blade 2019-10-28 19:30:37 -05:00
1ec7760d12 admin dashboard rework 2019-10-28 19:28:01 -05:00
2dabefa2e1 purge user 2019-10-28 16:52:54 -05:00
43fb5573f4 user 2019-10-28 16:38:57 -05:00
c410c05c82 purge users 2019-10-28 16:38:39 -05:00
37b99b8146 purge user 2019-10-28 16:37:28 -05:00
41228bc857 user role for purge user 2019-10-28 16:33:53 -05:00
5566409ffa user alt 2019-10-28 16:32:05 -05:00
813cb7de13 role 2019-10-28 16:31:18 -05:00
490e215971 modified purge users command 2019-10-28 16:01:57 -05:00
f9e6b84fd9 added image to login link 2019-10-28 05:47:12 -05:00
36b977a53e reordered web routes file 2019-10-28 05:44:59 -05:00
087fe8e50f ajax tutorial 2019-10-28 05:42:02 -05:00
2d683bfcd2 web routes for blacklist 2019-10-28 05:25:18 -05:00
113a446cd6 Merge branch 'master' of https://github.com/drkthunder02/w4rpservices 2019-10-28 05:20:57 -05:00
4e2ff481f5 blacklist added to services site 2019-10-28 05:20:05 -05:00
70e2c022bb db stuff 2019-10-23 14:44:52 -05:00
a9105b05eb purge users 2019-10-23 12:06:05 -05:00
02b57d226a structure helper 2019-10-23 00:41:07 -05:00
062901dbe8 structure helper 2019-10-23 00:12:23 -05:00
4b280e3a91 structure helper 2019-10-23 00:09:45 -05:00
cc5b8576f6 structures 2019-10-22 23:56:12 -05:00
a87786d223 update structures 2019-10-22 23:42:56 -05:00
562826f0e1 update structures 2019-10-22 23:40:35 -05:00
3e1eace056 structure name was off for update function 2019-10-22 23:32:22 -05:00
cc4f921fd6 login controller for inserted at token attribute 2019-10-22 23:18:40 -05:00
e76794172d purge users 2019-10-22 22:54:01 -05:00
d3f8389cfb purge users 2019-10-22 22:52:46 -05:00
31420ed236 purge users 2019-10-22 22:52:07 -05:00
17c0ca97ae purge useres 2019-10-22 22:40:34 -05:00
3257389188 purge users 2019-10-22 22:30:54 -05:00
0862183467 purge users 2019-10-22 22:26:01 -05:00
4ef0f1ce91 purge users 2019-10-22 22:24:46 -05:00
79caad0d54 purge users 2019-10-22 22:23:34 -05:00
dc2522ab7c console commands 2019-10-22 22:12:04 -05:00
324a3ca7da console command 2019-10-22 22:10:59 -05:00
a7d3bbb858 added purge user command 2019-10-22 02:40:39 -05:00
b153607e32 updated admin dashboard to say No Permissions instead of None as it lead to horrible search capability on the page. 2019-10-22 01:43:02 -05:00
6ac2db146e fix bugs on contract page 2019-09-15 16:58:27 -05:00
fddf85e7a6 removed sendevemailjob class in favor of the newer class. 2019-09-11 21:10:48 -05:00
2ea19ad84d updated process send eve mail job 2019-09-11 21:02:22 -05:00
1cfb33ce42 mining ledger 2019-09-10 00:03:15 -05:00
83377eda4a mining ledger helper 2019-09-09 22:19:00 -05:00
ae87e5b01b mining ledger helper 2019-09-09 20:23:59 -05:00
fa4f642498 moon admin 2019-09-08 05:10:16 -05:00
4220d1c5e3 structure requests 2019-09-08 05:04:34 -05:00
f50e1ddaa2 structure requests 2019-09-08 05:02:31 -05:00
9f6af14b76 structure requests 2019-09-08 05:01:46 -05:00
742189907c wormholes 2019-09-08 05:00:37 -05:00
94041e307d wormholes 2019-09-08 04:58:39 -05:00
8a8b5cef7a wormhole database migration 2019-09-08 04:55:05 -05:00
c25850ec3a wormhole database migration 2019-09-08 04:53:57 -05:00
414eca717c wormhole database migration 2019-09-08 04:53:18 -05:00
3e30c3ae92 wormhole database migration 2019-09-08 04:51:34 -05:00
80052803cc structure form typo 2019-09-08 04:49:28 -05:00
fba2459052 structure form typo 2019-09-08 04:48:27 -05:00
966e8f94d8 navbar update for structure request form 2019-09-08 04:43:28 -05:00
aeb7bfc2e4 structure request form 2019-09-08 04:33:47 -05:00
8fed630c0b structure requests routes 2019-09-08 04:03:19 -05:00
403c05d061 structure request form and mail update 2019-09-08 03:42:33 -05:00
cdd70ee3fa structure request form 2019-09-08 03:09:17 -05:00
289b6859b6 structure form 2019-09-08 03:00:04 -05:00
b9f4678d70 anchoring structure form 2019-09-02 02:08:25 -05:00
960435f874 new lookup helper 2019-08-27 21:16:37 -05:00
48d5304f0b new lookup functionality 2019-08-27 00:19:34 -05:00
918645b05e lookup helper 2019-08-26 20:05:11 -05:00
e781554059 character name to id issue 2019-08-26 19:54:21 -05:00
9cb42d38cb character name to id issue 2019-08-26 19:52:58 -05:00
324311b767 character name to id issue 2019-08-26 19:52:05 -05:00
6356de7cf2 character name to id issue 2019-08-26 19:51:31 -05:00
76b1fa3775 character name to id issue 2019-08-26 19:51:06 -05:00
6980865015 character name to id issue 2019-08-26 19:44:15 -05:00
d7696e83d6 character name to id issue 2019-08-26 19:42:58 -05:00
b9984b7236 character name to id issue 2019-08-26 19:41:37 -05:00
ad43ecbc84 character name to id issue 2019-08-26 19:39:11 -05:00
fbc6df6f87 character name to id issue 2019-08-26 19:38:33 -05:00
87ecbb9407 character name to id issue 2019-08-26 19:33:24 -05:00
3712ae9395 character name to id issue 2019-08-26 19:31:23 -05:00
a6e1b4cccc character name to id issue 2019-08-26 19:30:07 -05:00
64d323570c character name to id issue 2019-08-26 19:29:02 -05:00
9e98025f24 changed job duration to 1 hour 2019-08-26 19:21:27 -05:00
6c040538f5 updated some backend logic 2019-08-26 19:19:23 -05:00
0d4ae999d2 updated some backend logic 2019-08-26 18:40:48 -05:00
4be3f9b33d HaveEsiScope had issues 2019-08-25 20:17:32 -05:00
0c768874ae job timeouts 2019-08-25 19:32:51 -05:00
337ee3ec2c structure model 2019-08-25 19:30:01 -05:00
b9fa079eb7 structure helper 2019-08-25 19:19:07 -05:00
85295cb03f update structure helper 2019-08-25 18:47:36 -05:00
3ee138d81d wormhole display view 2019-08-25 18:16:12 -05:00
4218731441 refresh token login 2019-08-25 17:29:08 -05:00
ba3419d692 refresh token login 2019-08-25 17:27:01 -05:00
a6d3e7855b refresh token login 2019-08-25 17:25:48 -05:00
e047cfbbf4 testing 2019-08-06 12:49:05 -05:00
aaa721447a testing 2019-08-06 12:47:53 -05:00
004eb146bf testing 2019-08-06 12:47:07 -05:00
cf300efdaa testing 2019-08-06 12:44:42 -05:00
750333990d testing 2019-08-06 12:41:37 -05:00
036d98a169 testing 2019-08-06 12:38:27 -05:00
02e7f738fc testing 2019-08-06 12:37:56 -05:00
26f5f854be testing 2019-08-06 12:35:59 -05:00
41f9ebf886 testing 2019-08-06 12:30:38 -05:00
53945b0846 testing 2019-08-06 12:29:21 -05:00
fd9fda9f47 testing 2019-08-06 12:28:55 -05:00
0328f969dc testing 2019-08-06 12:23:58 -05:00
a6cfc6b011 testing 2019-08-06 12:23:20 -05:00
4997560046 testing 2019-08-06 12:22:18 -05:00
d770a4866a dashboard 2019-08-06 02:16:21 -05:00
16e7244065 dashboard 2019-08-06 02:13:50 -05:00
c45766f2d9 dashboard 2019-08-06 02:13:07 -05:00
4f5c2ef090 dashboard 2019-08-06 02:12:17 -05:00
7c99a9c67c dashboard 2019-08-06 02:11:43 -05:00
5b1e580a4f dashboard 2019-08-06 02:10:52 -05:00
6d312ba589 dashboard 2019-08-06 02:07:28 -05:00
ac22a31427 dashboard 2019-08-06 02:06:45 -05:00
368906787c dashboard 2019-08-06 02:06:10 -05:00
7ace3b7d91 dashboard 2019-08-06 02:05:39 -05:00
6bf3149bea wormholes and srp dashboard modification 2019-08-06 02:02:45 -05:00
a275c608a4 wormholes and srp dashboard modification 2019-08-06 02:02:05 -05:00
41d433b7c8 wormhole stuff 2019-08-05 02:09:51 -05:00
7950d7d5ea wormhole stuff 2019-08-04 02:58:24 -05:00
97801653fe srp stuff 2019-08-04 02:21:52 -05:00
9099997b2c srp stuff 2019-08-04 02:19:52 -05:00
7f02874923 taxes helper 2019-08-04 02:16:18 -05:00
84d02f8ec4 admin dashboard taxes for srp addition 2019-08-04 02:09:04 -05:00
a897d095cf admin dashboard taxes for srp addition 2019-08-04 02:08:02 -05:00
2d9a6ab24e admin dashboard taxes for srp addition 2019-08-04 02:07:23 -05:00
f671c5a958 finance helper 2019-08-04 01:50:39 -05:00
8fcf31a349 alliance market tax fix 2019-08-04 01:48:27 -05:00
ddb99a311f modified charts for srp statistics 2019-08-04 01:37:54 -05:00
eef6bde7fe number format for srp admin dashboard 2019-08-04 01:32:06 -05:00
8ceea4b491 taxes helper 2019-08-04 01:30:40 -05:00
dfc5337b06 taxes helper 2019-08-04 01:30:03 -05:00
396d02e7a3 alliance journal stuff 2019-08-04 01:22:49 -05:00
4701abc691 .env 2019-08-03 17:31:06 -05:00
7d78c0532b modified update moon blade 2019-08-03 15:51:01 -05:00
b65d00c8b4 column for admin page 2019-08-03 15:45:21 -05:00
70f1f5d2a8 column for admin page 2019-08-03 15:44:48 -05:00
abe870ece1 command helper file rename 2019-08-01 23:13:31 -05:00
7a2701d72d jobs 2019-08-01 22:30:12 -05:00
b09f48ccdc moon mailer stuff 2019-08-01 22:20:48 -05:00
9192ffa63f moon mailer 2019-08-01 21:57:20 -05:00
e6b05806f0 update not paid for moon mailer 2019-08-01 21:51:33 -05:00
7698a02a31 added month name to moon mailer 2019-08-01 20:57:22 -05:00
6e3c51cd97 added month name to moon mailer 2019-08-01 20:47:59 -05:00
27ff27a057 esi helper declarations 2019-08-01 20:01:16 -05:00
00094f8850 esi helper 2019-08-01 19:43:40 -05:00
6c6321aa03 esi helper 2019-08-01 19:41:35 -05:00
8cd1f1bcc7 helper 2019-08-01 17:57:13 -05:00
c9e1d090ff helper 2019-08-01 17:56:15 -05:00
c47917efc4 market taxes 2019-07-29 02:11:32 -05:00
84824d1ada updated srp statistics 2019-07-29 02:04:30 -05:00
15e8d7fb6c structure market tax 2019-07-24 01:51:32 -05:00
00424b2384 redirect issue 2019-07-23 17:55:30 -05:00
09ea177d89 new cost code with secret url 2019-07-23 17:53:35 -05:00
d58aebf7f6 srp admin controller comments 2019-07-22 21:57:22 -05:00
c0506f87f7 srp admin controller comments 2019-07-22 21:56:40 -05:00
ec4fc33137 cleanup 2019-07-22 21:19:35 -05:00
73613d901f admin payout modification 2019-07-22 21:10:29 -05:00
1c579bd6e7 admin payout modification 2019-07-22 21:09:35 -05:00
937300fad3 payout testing 2019-07-22 21:07:01 -05:00
f9b16e7671 payout testing 2019-07-22 21:04:56 -05:00
d7d865a6c9 payout testing 2019-07-22 21:04:24 -05:00
489f3603de payout testing 2019-07-22 20:59:12 -05:00
6f355d2859 payout testing 2019-07-22 20:58:26 -05:00
ad1b690fe1 payout testing 2019-07-22 20:56:23 -05:00
b5920bfc6e payout testing 2019-07-22 20:55:45 -05:00
ca9ae4ca6b navbar link 2019-07-22 20:53:56 -05:00
e5b6ff8301 navbar link 2019-07-22 20:53:03 -05:00
90db71b2e3 display cost code 2019-07-22 20:49:54 -05:00
59808c1374 payout codes display 2019-07-22 20:46:22 -05:00
ad22fea86d srp form update 2019-07-16 23:06:26 -05:00
d13ab10d4d srp form update 2019-07-16 23:05:23 -05:00
4b7feb9b5b srp form update 2019-07-16 23:04:35 -05:00
e899dad637 srp form update 2019-07-16 23:03:40 -05:00
8502a22ffa srp form update 2019-07-16 23:02:56 -05:00
742735ea39 srp form update 2019-07-16 23:00:54 -05:00
ac56b3e432 srp form update 2019-07-16 22:59:43 -05:00
b7666c1dc8 srp form update 2019-07-16 22:57:19 -05:00
90020f8152 srp form update 2019-07-16 22:51:46 -05:00
45615e8f75 srp form update 2019-07-16 22:49:45 -05:00
f61e4d1964 srp form update 2019-07-16 22:48:29 -05:00
a16f225746 srp form update 2019-07-16 22:47:43 -05:00
7fe19b8c26 srp form update 2019-07-16 22:45:51 -05:00
5c4aecab55 srp form update 2019-07-16 22:45:01 -05:00
f366bd56b9 stuff 2019-07-16 22:33:12 -05:00
171c35d23c stuff 2019-07-16 22:32:04 -05:00
53d9453e8b stuff 2019-07-16 22:30:14 -05:00
522e75cea6 stuff 2019-07-16 22:29:31 -05:00
3164b1a879 stuff 2019-07-16 22:24:58 -05:00
2c13fbaca4 stuff 2019-07-16 22:22:59 -05:00
9a4abe0da2 stuff 2019-07-16 22:21:50 -05:00
cc28e24e02 stuff 2019-07-16 22:21:33 -05:00
943fd3d174 stuff 2019-07-16 22:20:20 -05:00
edeb09ffc6 stuff 2019-07-16 22:19:03 -05:00
1dc0b4e2af stuff 2019-07-16 22:18:31 -05:00
f698ba4e38 stuff 2019-07-16 22:17:42 -05:00
9401f80108 stuff 2019-07-16 22:17:14 -05:00
5dcd19c681 stuff 2019-07-16 22:16:11 -05:00
0a41760a24 stuff 2019-07-16 22:15:00 -05:00
0069b7639b stuff 2019-07-16 22:14:23 -05:00
85191ed0b2 stuff 2019-07-16 22:11:56 -05:00
f8f8a50418 stuff 2019-07-16 22:11:06 -05:00
a6a9ddfa02 dashboard link 2019-07-16 21:55:56 -05:00
1558e78b2b dashboard and login controller for alts 2019-07-16 21:52:07 -05:00
bcf16ad669 login controller 2019-07-16 19:18:37 -05:00
6f13d9c0ae login controller update 2019-07-15 23:45:01 -05:00
935b7b3ef1 login controller update 2019-07-15 23:42:34 -05:00
66d6928e4d process blade for srp 2019-07-15 22:18:12 -05:00
78cd3abe15 process blade for srp 2019-07-15 22:17:10 -05:00
cb793fee58 ajax test 2 2019-07-13 03:38:10 -05:00
d677d52274 ajax test 2 2019-07-13 03:27:20 -05:00
551cbf0049 ajax attempt 2019-07-13 03:21:48 -05:00
ed1355bb4f ajax attempt 2019-07-13 03:03:03 -05:00
92d3810a2b ajax attempt 2019-07-13 03:01:07 -05:00
49c6c3767f ajax attempt 2019-07-13 02:57:37 -05:00
e5131bf9f7 ajax attempt 2019-07-13 02:54:11 -05:00
e6d8a7cb87 ajax attempt 2019-07-13 02:50:07 -05:00
772d091425 SRP Controller statistics 2019-07-11 00:38:29 -05:00
9d524b07ec SRP Controller statistics 2019-07-11 00:37:58 -05:00
37cb24c46e SRP Controller statistics 2019-07-11 00:37:20 -05:00
c9fc3113a2 SRP Controller statistics 2019-07-11 00:36:51 -05:00
7159e3d336 SRP Controller statistics 2019-07-11 00:35:16 -05:00
b2e9301cc6 SRP Admin Controller 2019-07-11 00:29:37 -05:00
460b2c947e SRP Admin Controller 2019-07-11 00:26:14 -05:00
92369f9165 SRP Admin Controller 2019-07-11 00:19:25 -05:00
119a6eaa17 needle and haystack confusion 2019-07-08 23:33:00 -05:00
7f49fbc107 updated asset in asset helper 2019-07-08 23:30:58 -05:00
9e198c3102 modified job process for assets 2019-07-08 23:28:26 -05:00
9ac70f9dfd modified asset helper to not store extra assests 2019-07-08 23:27:30 -05:00
7ab25c0207 cleanup of fuel gauge for structures 2019-07-08 23:18:05 -05:00
60e0bc52e6 cleanup of fuel gauge for structures 2019-07-08 23:16:33 -05:00
71c3b530cb cleanup of fuel gauge for structures 2019-07-08 23:16:00 -05:00
e5771980ba cleanup of fuel gauge for structures 2019-07-08 23:14:13 -05:00
d7d30d30f5 srp testing 2019-07-08 23:12:12 -05:00
6a67df768a srp testing 2019-07-08 23:10:54 -05:00
9c8cd51b18 srp testing 2019-07-08 23:10:19 -05:00
cb9447ed5b srp testing 2019-07-08 23:09:41 -05:00
be2c8efbf6 srp testing 2019-07-08 23:08:48 -05:00
79a89c22b9 srp testing 2019-07-08 23:06:12 -05:00
f48171b11a srp testing 2019-07-08 22:57:17 -05:00
9b8b2fcba7 srp testing 2019-07-08 22:52:16 -05:00
51c9d85aef srp testing 2019-07-08 22:50:52 -05:00
db45c71636 srp testing 2019-07-08 22:49:58 -05:00
73034f2f74 srp testing 2019-07-08 22:48:48 -05:00
0deae9e495 srp testing 2019-07-08 22:47:58 -05:00
30be401b30 srp testing 2019-07-08 22:46:49 -05:00
0bb0ae7888 srp testing 2019-07-08 22:45:57 -05:00
d81ca33b0a srp testing 2019-07-08 22:44:42 -05:00
f194d91d90 changed some job timeout times 2019-07-08 22:34:37 -05:00
aa86effe5d test over and it didn't work 2019-07-08 22:27:05 -05:00
d5b47d1beb chart test 2019-07-08 22:26:08 -05:00
16df3e3238 chart test 2019-07-08 22:25:41 -05:00
84303b93d2 chart test 2019-07-08 22:23:24 -05:00
5521abbf95 chart test 2019-07-08 22:22:12 -05:00
77d490c9c3 directory structure 2019-07-08 22:14:10 -05:00
d9de481c39 directory structure 2019-07-08 22:13:12 -05:00
ccd12b57ed directory structure 2019-07-08 22:12:29 -05:00
2d9a9ab046 directory structure 2019-07-08 22:11:29 -05:00
f5b59a7a22 structure fuel gauage 2019-07-08 22:10:48 -05:00
a212b15068 fuel gauage modification 2019-07-08 22:09:33 -05:00
24d578d392 composer update 2019-07-09 02:33:41 +00:00
669b599707 fuel gauge 2019-07-08 21:27:13 -05:00
f0cb91a21f fuel gauge 2019-07-08 21:26:24 -05:00
5645ca17e8 fuel gauge 2019-07-08 21:25:08 -05:00
12cffcc75d fuel gauge 2019-07-08 21:24:49 -05:00
2b5451d3ce fuel gauage 2019-07-08 21:23:20 -05:00
1d209c5be9 fuel gauage 2019-07-08 21:22:54 -05:00
48d38ff110 chart 2019-07-08 21:16:48 -05:00
06bcaac67d navbar 2019-07-08 21:16:12 -05:00
86c8adc3d9 navbar 2019-07-08 21:15:18 -05:00
1c67419483 navbar 2019-07-08 21:14:42 -05:00
1516e27c5a structure fuel 2019-07-08 21:13:57 -05:00
f71a835d1b fuel gauge 2019-07-08 21:08:13 -05:00
42b283e956 navbar 2019-07-08 21:00:39 -05:00
b30a5eeed6 navbar 2019-07-08 20:59:19 -05:00
9f9a190cc9 structure fuel 2019-07-08 20:58:37 -05:00
b2bd070c9c fuel 2019-07-08 19:56:36 -05:00
c029cd8cc6 fuel 2019-07-08 19:56:00 -05:00
860cea2369 assets 2019-07-08 19:55:09 -05:00
d1b132d267 assets 2019-07-08 19:53:27 -05:00
a3892b183e assets 2019-07-08 19:52:45 -05:00
94cce31f47 assets 2019-07-08 19:51:01 -05:00
92b79b124f structures 2019-07-08 19:49:44 -05:00
b76e0aae32 structure fuel 2019-07-08 19:47:14 -05:00
ce18606949 structure fuel 2019-07-08 19:45:43 -05:00
e8ec110ecd structure fuel 2019-07-08 19:41:24 -05:00
1594536d01 structure fuel 2019-07-08 19:38:26 -05:00
37d05afd24 structure fuel 2019-07-08 19:37:04 -05:00
746257b831 structure fuel 2019-07-08 02:00:47 -05:00
cadef48cb5 carbon to asset helper 2019-07-08 01:26:43 -05:00
c26dbba312 count in asset helper 2019-07-08 01:20:40 -05:00
3b6eab2b46 command for contracts 2019-07-08 00:37:39 -05:00
0bb0e9d037 logistics contracts 2019-07-07 20:12:15 -05:00
dc36be558c logistics contracts 2019-07-07 20:04:11 -05:00
699af576e3 logistics 2019-07-07 19:21:54 -05:00
207b32e600 logistics controller 2019-07-07 19:13:16 -05:00
5b2c692d95 logistics routes migrations 2019-07-07 16:08:57 -05:00
6e9a13b44e contract tables and such 2019-07-07 06:24:44 -05:00
22a62ab082 scopes and contracts 2019-07-07 05:10:53 -05:00
01d3e44d95 contracts 2019-07-07 05:01:28 -05:00
3e83a041e9 courier contracts 2019-07-07 03:52:38 -05:00
a00332328b form 2019-07-07 02:11:40 -05:00
4a38bc2fee logistics module 2019-07-06 04:04:30 -05:00
7eceef4818 Merge branch 'master' of https://github.com/drkthunder02/w4rpservices 2019-07-06 05:31:11 +00:00
88daa2b01a dump-autoload 2019-07-06 05:30:50 +00:00
dbd92a9df9 added another location to location array for asset jobs 2019-07-05 03:57:43 -05:00
366e293e9f assets 2019-07-05 02:04:12 -05:00
5222413c57 assets 2019-07-05 01:59:28 -05:00
ead25a3533 asset 2019-07-05 01:50:46 -05:00
dac296f8b9 asset job 2019-07-05 01:40:46 -05:00
098c1585a1 asset job 2019-07-05 01:39:38 -05:00
27c1e0f1c1 asset testing 2019-07-05 01:34:10 -05:00
ec8d5d774f asset testing 2019-07-05 01:32:52 -05:00
e9d0a8a9df asset testing 2019-07-05 01:31:47 -05:00
d19202de9b stuff 2019-07-05 01:28:37 -05:00
c27a157ebb stuff 2019-07-05 01:28:03 -05:00
ec7c02db77 stuff 2019-07-05 01:27:35 -05:00
0b752a7886 stuff 2019-07-05 01:23:49 -05:00
7742b7ba1a stuff 2019-07-05 01:23:25 -05:00
ff545f4dbc assets 2019-07-05 01:19:46 -05:00
2e7369ee51 assets 2019-07-05 01:09:39 -05:00
2f68ef43da assets 2019-07-05 00:55:52 -05:00
fd747d49fb assets job 2019-07-05 00:13:48 -05:00
5b80258418 assets job 2019-07-05 00:07:44 -05:00
5b1110a3ed assets 2019-07-05 00:06:30 -05:00
9664cb239e assets 2019-07-05 00:02:07 -05:00
24cf162f9b assets 2019-07-04 23:42:43 -05:00
af08d5c239 assets 2019-07-04 23:41:52 -05:00
dc3d536f0b assetes 2019-07-04 23:18:22 -05:00
dafebfadc5 assetes 2019-07-04 23:08:38 -05:00
cb10515c13 assets 2019-07-04 23:06:48 -05:00
156783af7c assets 2019-07-04 22:35:35 -05:00
46c526a515 assets 2019-07-04 22:33:20 -05:00
8724d60d60 structures and assets jobs 2019-07-04 22:32:09 -05:00
2c4e25be59 structures and assets jobs 2019-07-04 22:12:27 -05:00
952d6e83e3 structures and assets jobs 2019-07-04 22:04:11 -05:00
6334865d3f structures and assets jobs 2019-07-04 22:03:27 -05:00
d894216c54 structures and assets jobs 2019-07-04 22:00:34 -05:00
b9e89e3ffb structures and assets jobs 2019-07-04 21:52:12 -05:00
c385228d73 structures and assets jobs 2019-07-04 21:47:42 -05:00
5fcb71dfd1 structures and assets jobs 2019-07-04 21:24:52 -05:00
8322858e20 admin moons 2019-07-04 01:42:39 -05:00
4e9a289692 added logistics manager moons to help with issues 2019-07-04 01:32:59 -05:00
a097138299 lava charts 2019-07-04 01:20:18 -05:00
8a53f53d99 updated user dashboard lava chart 2019-07-04 01:17:55 -05:00
f0543da790 updated some lava code 2019-07-04 01:17:03 -05:00
472c22fcfb composer update 2019-07-04 06:15:03 +00:00
eb2f2f86f0 updated composer and deleted other chart libraries other than lavacharts 2019-07-04 01:13:39 -05:00
72147c7edf srp admin stats 2019-07-03 21:16:51 -05:00
2a360d32a6 srp admin stats 2019-07-03 21:15:57 -05:00
2eaea8ee26 srp admin stats 2019-07-03 21:15:16 -05:00
254562f940 srp admin stats 2019-07-03 21:14:29 -05:00
fa4367e8d9 stuff 2019-07-03 21:03:53 -05:00
0820aa5675 stuff 2019-07-03 21:01:49 -05:00
7f13150557 stuff 2019-07-03 20:55:12 -05:00
a0a4fd136f srp admin controller stats 2019-07-03 20:52:49 -05:00
6c3402fa8d srp admin controller stats 2019-07-03 20:46:03 -05:00
eb1ca9d7b1 srp admin controller stats 2019-07-03 20:45:25 -05:00
f7d2a5f23b srp admin controller 2019-07-03 20:38:01 -05:00
abc9364afb srp admin controller 2019-07-03 20:08:33 -05:00
e027147c99 srp admin controller 2019-07-03 20:08:05 -05:00
ce2fc54e66 srp admin controller 2019-07-03 19:37:41 -05:00
a8e39e3125 srp admin controller 2019-07-03 19:34:22 -05:00
821e4d7a87 srp admin controller 2019-07-03 19:32:54 -05:00
6404c2d99f charts 2019-07-03 18:48:51 -05:00
a6be5844e6 charts 2019-07-03 18:45:18 -05:00
e40fedb812 charts 2019-07-03 18:42:38 -05:00
09c5091d1c srp admin controller 2019-07-03 18:40:17 -05:00
727100f942 srp admin controller 2019-07-03 18:39:37 -05:00
574a95fd14 srp admin controller 2019-07-03 18:38:20 -05:00
10a00750d7 srp admin controller 2019-07-03 18:36:34 -05:00
0b40903ae3 statistics for srp admin page 2019-07-03 00:11:45 -05:00
556b62065a payout code forms 2019-07-02 23:55:35 -05:00
51c926c20b user dashboard 2019-07-02 00:30:01 -05:00
96e5c0120e user dashboard 2019-07-02 00:28:57 -05:00
4bebbc204e user dashboard 2019-07-02 00:26:13 -05:00
51912bf3a8 dashboard srp stuff 2019-07-02 00:24:04 -05:00
9c4b23905d dashboard srp stuff 2019-07-02 00:23:31 -05:00
8d1c597131 sample charts 2019-07-01 23:05:43 -05:00
8a2bb2e993 sample charts 2019-07-01 23:04:17 -05:00
0586488d90 sample charts 2019-07-01 23:02:24 -05:00
176de41288 sample charts 2019-07-01 22:58:36 -05:00
92f4b78801 sample charts 2019-07-01 22:56:54 -05:00
a9d4c6399f sample chart 2019-07-01 22:55:44 -05:00
d31e1e4bfd sample chart 2019-07-01 22:51:00 -05:00
a39dce4cf8 sample chart 2019-07-01 22:50:23 -05:00
044d0253ca sample chart 2019-07-01 22:49:53 -05:00
036de5de95 sample chart 2019-07-01 22:48:50 -05:00
c3c07e2ccb sample chart 2019-07-01 22:46:50 -05:00
4fe7155f0c test chart 2019-07-01 22:45:24 -05:00
83fbe8d881 charts stuff 2019-07-01 22:31:36 -05:00
c610352868 statistics 2019-07-01 22:24:07 -05:00
217ec34a70 statistics 2019-07-01 22:22:51 -05:00
4ddd5dbf03 statistics 2019-07-01 22:21:04 -05:00
217f0f47ac statistics 2019-07-01 22:20:37 -05:00
8d37376fb1 statistics 2019-07-01 22:20:07 -05:00
bfebdd2632 statistics 2019-07-01 22:19:04 -05:00
ee2068eda5 srp helper 2019-07-01 22:03:57 -05:00
5a6c7da549 srp helper 2019-07-01 22:02:14 -05:00
a29be94d08 srp helper 2019-07-01 22:01:25 -05:00
20ec956b77 srp helper 2019-07-01 21:56:13 -05:00
8335e4de96 srp helper 2019-07-01 21:55:48 -05:00
d53e0fbdd7 srp helper 2019-07-01 21:46:02 -05:00
d39be76f0f srp helper 2019-07-01 21:33:46 -05:00
ee1dd570d0 srp helper 2019-07-01 21:16:42 -05:00
78a51b6817 srp helper 2019-07-01 21:15:54 -05:00
b089ccc39c srp helper 2019-07-01 21:09:23 -05:00
c8a1ccef30 srp helper 2019-07-01 21:04:12 -05:00
3d93013f75 srp helper 2019-07-01 21:02:45 -05:00
77c19504be srp statistics 2019-07-01 20:59:56 -05:00
5f7c942354 update to navbar 2019-07-01 20:57:00 -05:00
ebb41422f3 composer update 2019-07-02 01:51:56 +00:00
b4a728213d lava charts 2019-07-01 02:37:17 -05:00
fde47de5ed statistics and lava charts 2019-07-01 02:32:06 -05:00
78d2f447eb srp form 2019-06-30 23:24:17 -05:00
702d4f62bb paid value issue 2019-06-30 23:23:14 -05:00
a4eb4d58ae srp form 2019-06-30 23:16:20 -05:00
80fd882815 srp form 2019-06-30 23:14:37 -05:00
3c993c576e srp form 2019-06-30 23:13:39 -05:00
c3eeadece5 srp stuff 2019-06-30 22:57:49 -05:00
95dad78a7f srp form migration update 2019-06-30 22:47:51 -05:00
0498009a42 srp payout 2019-06-30 03:24:02 -05:00
f068a2a9ee srp payout 2019-06-30 03:23:16 -05:00
3cb2432d14 srp payout 2019-06-30 03:22:10 -05:00
fa3b1d014f srp payout 2019-06-30 03:21:32 -05:00
8438fa568d srp payout 2019-06-30 03:21:01 -05:00
f1f74019b4 srp payout 2019-06-30 03:18:17 -05:00
c68a5320a3 srp payout 2019-06-30 03:16:09 -05:00
2581b09ae5 srp payout 2019-06-30 03:15:25 -05:00
5794c541b0 srp payout 2019-06-30 03:13:04 -05:00
4ceb989884 srp payout 2019-06-30 03:12:11 -05:00
7e22e3548e srp payout 2019-06-30 03:10:36 -05:00
13714677d3 srp payout 2019-06-30 03:09:53 -05:00
f3e730b131 srp payout 2019-06-30 03:08:56 -05:00
216553f526 srp payout 2019-06-30 03:05:02 -05:00
2c9ac0c7c2 srp payout 2019-06-30 03:04:20 -05:00
47dc48555e srp payout 2019-06-30 03:01:17 -05:00
892f748610 srp payout 2019-06-30 03:00:30 -05:00
7a221e0cb3 srp payout 2019-06-30 02:59:44 -05:00
741a707994 srp payout 2019-06-30 02:58:43 -05:00
a9734c90d9 srp payout 2019-06-30 02:56:24 -05:00
9c36c7be4e srp payout 2019-06-30 02:55:26 -05:00
72e604bd43 srp payout 2019-06-30 02:54:42 -05:00
9326f2c4d0 srp admin controller 2019-06-30 02:53:08 -05:00
489161437a admin srp dashboard 2019-06-30 02:29:55 -05:00
8fb69b7e9c admin srp dashboard 2019-06-30 02:28:17 -05:00
b73149ad67 admin srp dashboard 2019-06-30 02:26:06 -05:00
71f99e68e6 admin srp dashboard 2019-06-30 02:25:36 -05:00
eab0548b44 admin srp dashboard 2019-06-30 02:25:02 -05:00
87d27b22f9 admin srp dashboard 2019-06-30 02:24:36 -05:00
928eb4f32c admin srp dashboard 2019-06-30 02:24:05 -05:00
506201f037 admin srp dashboard 2019-06-30 02:23:11 -05:00
6009314efd admin srp dashboard 2019-06-30 02:22:06 -05:00
20ceef0889 admin srp dashboard 2019-06-30 02:19:57 -05:00
ebad574330 admin srp dashboard 2019-06-30 02:19:00 -05:00
853e34b12b srp process blade 2019-06-30 02:17:59 -05:00
3a9b16512a srp process blade 2019-06-30 02:13:29 -05:00
25ade94314 blade modifications for processing srp 2019-06-30 02:12:22 -05:00
d5790c5c15 srp admin dashboard 2019-06-30 02:11:10 -05:00
d49e9ef89b srp admin dashboard 2019-06-30 02:10:28 -05:00
84e3712e22 srp admin dashboard 2019-06-30 02:09:17 -05:00
3b3a5faad4 admin dashboard 2019-06-30 02:07:27 -05:00
b55d6a2c24 admin dashboard 2019-06-30 02:07:05 -05:00
701c633cc5 srp ships 2019-06-30 02:01:34 -05:00
3eac154ab6 srp ships 2019-06-30 02:00:53 -05:00
34bd7e66ec srp ships 2019-06-30 02:00:12 -05:00
f965acaf27 srp ships 2019-06-30 01:59:12 -05:00
9338532c8c srp ships 2019-06-30 01:58:08 -05:00
89ebf6e9b5 srp ships 2019-06-30 01:56:49 -05:00
d519f4c04c srp ships 2019-06-30 01:55:52 -05:00
4cb79807c6 srp form 2019-06-30 01:54:35 -05:00
e765a5e9c8 srp form 2019-06-30 01:53:48 -05:00
100f952a92 srp form 2019-06-30 01:38:10 -05:00
6c220b5de5 srp form 2019-06-30 01:37:16 -05:00
21d14a0ecd srp form 2019-06-30 01:36:31 -05:00
74c69a42c9 srp form testing 2019-06-30 01:33:07 -05:00
677cf8e3d1 srp form testing 2019-06-30 01:32:31 -05:00
7c73bf17b9 srp form testing 2019-06-30 01:31:52 -05:00
afa2a653d4 srp form testing 2019-06-30 01:29:38 -05:00
6374b1a81c srp form 2019-06-30 00:47:44 -05:00
66e64e3af3 srp form 2019-06-30 00:45:19 -05:00
b82f20302a srp form 2019-06-30 00:44:15 -05:00
b4c4ac6c03 srp form 2019-06-30 00:43:33 -05:00
19d681b08b srp form 2019-06-30 00:38:31 -05:00
475c7d6dc9 srp form 2019-06-30 00:38:01 -05:00
4abb6526f3 srp form 2019-06-30 00:37:11 -05:00
a6a14a3457 srp form 2019-06-30 00:34:56 -05:00
1d524a1e5b srp form 2019-06-30 00:31:03 -05:00
56c6aaaef0 srp form 2019-06-30 00:22:29 -05:00
74102312d0 srp form 2019-06-30 00:01:18 -05:00
e0db4dac3e srp module 2019-06-28 23:58:10 -05:00
05de378cdd srp module 2019-06-28 22:55:53 -05:00
cd62300547 search endpoint 2019-06-28 21:03:33 -05:00
9302b1c8a5 search endpoint 2019-06-28 21:01:03 -05:00
7de3eb1153 search endpoint 2019-06-28 20:57:05 -05:00
60d2f5da1c search endpoint 2019-06-28 20:56:00 -05:00
0fcf6638c4 search endpoint 2019-06-28 20:43:04 -05:00
005b504422 search endpoint 2019-06-28 20:42:09 -05:00
bb7c3bd337 search endpoint 2019-06-28 20:41:26 -05:00
d12ac42513 updated lookup helpers 2019-06-28 20:38:57 -05:00
d0adc9ea4f updated lookup helpers 2019-06-28 20:29:18 -05:00
e09000480c updated lookup helpers 2019-06-28 20:27:00 -05:00
7be6317e5e updated lookup helpers 2019-06-28 20:25:44 -05:00
ec2f7f0451 updated lookup helpers 2019-06-28 20:16:27 -05:00
3546c0f1f1 updated lookup helpers 2019-06-28 20:16:05 -05:00
fe23b239db updated lookup helpers 2019-06-28 20:14:03 -05:00
46694f67da updated lookup helpers 2019-06-28 20:13:30 -05:00
c68ee2d74e updated lookup helpers 2019-06-28 20:11:42 -05:00
4f77a335e8 updated lookup helpers 2019-06-28 20:10:57 -05:00
691a930893 updated lookup helpers 2019-06-28 20:09:48 -05:00
b0da66f2e8 updated lookup helpers 2019-06-28 20:06:48 -05:00
74479dc5b9 purge wiki 2019-06-28 20:00:56 -05:00
7369f01d26 purge wiki 2019-06-28 19:59:27 -05:00
c675bed506 created modify user functionality on admin dashboard 2019-06-25 01:36:10 -05:00
3e78565e1d created modify user functionality on admin dashboard 2019-06-25 01:33:09 -05:00
04cd7a74fa created modify user functionality on admin dashboard 2019-06-25 01:30:29 -05:00
2d53f3c70f created modify user functionality on admin dashboard 2019-06-25 01:29:07 -05:00
7745643c97 created modify user functionality on admin dashboard 2019-06-25 01:28:48 -05:00
956a4ff911 created modify user functionality on admin dashboard 2019-06-25 01:27:34 -05:00
59693bec9c created modify user functionality on admin dashboard 2019-06-25 01:26:37 -05:00
4e2b937740 created modify user functionality on admin dashboard 2019-06-25 01:24:46 -05:00
4d45778805 created modify user functionality on admin dashboard 2019-06-25 01:21:54 -05:00
c3d0a41918 created modify user functionality on admin dashboard 2019-06-25 01:21:15 -05:00
c0dd6ef480 created modify user functionality on admin dashboard 2019-06-25 01:18:17 -05:00
cd2123e555 created modify user functionality on admin dashboard 2019-06-25 01:14:55 -05:00
76831f65ce updated hardcoded character with env variable 2019-06-25 00:15:07 -05:00
0f7e2d5bad updated hardcoded character with env variable 2019-06-25 00:01:28 -05:00
079169d8aa app.php update 2019-06-23 06:58:28 -05:00
e9efe70112 composeer update 2019-06-23 11:49:01 +00:00
fc2380d68c added provider for oauth for eve online 2019-06-23 06:47:21 -05:00
6b8a289908 oauth provider 2019-06-23 06:42:07 -05:00
2f8f286788 oauth eveonline 2019-06-23 06:40:17 -05:00
fd10a41ec5 take 2 2019-06-23 06:33:55 -05:00
510f1cc570 take 2 2019-06-23 06:32:22 -05:00
3558205135 take 2 2019-06-23 06:28:55 -05:00
2b148a1982 socialite provider 2019-06-23 06:18:49 -05:00
a3f894359e socialite provider 2019-06-23 06:09:13 -05:00
6cb9ccddfa socialite provider 2019-06-23 06:08:29 -05:00
9ff565927e service provider 2019-06-23 06:07:14 -05:00
cca05eb926 testing for socialite provider 2019-06-23 06:04:33 -05:00
90fbcb18ba added a Trait for EveAuth2
eve online service provider 2
eve online socialite provider 2
2019-06-23 06:03:23 -05:00
d5032e4fee consoletvs\chartjs service provider published 2019-06-23 05:19:08 -05:00
ec4506ebf4 composer update 2019-06-23 10:14:30 +00:00
a56db5ea2b srp blades 2019-06-23 05:09:27 -05:00
520e443712 authUser 2019-06-22 00:52:14 -05:00
ca4f94ee57 user declaration of model 2019-06-22 00:49:26 -05:00
a722a18482 user class updates 2019-06-21 03:11:27 -05:00
56e8c3b4a9 updated login controller and user model 2019-06-21 02:46:13 -05:00
08312733eb moon rental update 2019-06-05 02:59:19 -05:00
b55ae5f4c4 moon rental update 2019-06-05 02:58:38 -05:00
6604204b51 moon rental update 2019-06-05 02:58:08 -05:00
74f0305960 moon rental update 2019-06-05 02:55:39 -05:00
1778b61018 moon rental update 2019-06-05 02:55:04 -05:00
78271d7ffa removed removal box from update moons 2019-06-04 21:10:24 -05:00
88cc80db16 spmn for moon updates 2019-06-04 21:05:41 -05:00
90d765d224 spmn for moon updates 2019-06-04 21:05:18 -05:00
15db4490ce spmn for moon updates 2019-06-04 21:01:46 -05:00
35357b8dc7 spmn for moon updates 2019-06-04 21:00:45 -05:00
dbece52cc3 spmn for moon updates 2019-06-04 20:59:24 -05:00
5d981328db spmn for moon updates 2019-06-04 20:58:41 -05:00
8498cf7b8d order by stuff 2019-06-04 20:56:40 -05:00
f360a72e75 order by stuff 2019-06-04 20:55:51 -05:00
7ad40daeb9 order by stuff 2019-06-04 20:54:22 -05:00
676117c053 Modified folders for commands.
Added job for retrieving assets from esi.
Modified moon rental data to flow better with views.
2019-06-04 03:47:00 -05:00
fe837da592 tidy contract issue 2019-06-01 02:04:06 -05:00
0ce34f4135 modified how items are found in the database and how this is processed. 2019-05-31 23:55:23 -05:00
2f333dac32 moons admin controller 2019-05-31 23:50:56 -05:00
c55c333bec moons admin controller 2019-05-31 23:49:55 -05:00
2065553f97 moons admin controller 2019-05-31 23:47:27 -05:00
b6bbd1532c moons admin controller 2019-05-31 23:45:38 -05:00
a8143e235d moons admin controller 2019-05-31 23:20:29 -05:00
9fac05d49e moon mailer 2019-05-31 22:30:51 -05:00
e0b1d7c49c moon mailer 2019-05-31 22:22:45 -05:00
0b1ed7343f moon mailer 2019-05-31 22:20:19 -05:00
d734872dfa moon mailer 2019-05-31 22:14:26 -05:00
50840eaa90 moon mailer 2019-05-31 22:08:38 -05:00
e71ce2b338 moon mailer 2019-05-31 22:07:28 -05:00
f8addc663b moon mailer 2019-05-31 22:03:52 -05:00
eed78f7639 moon mailer 2019-05-31 22:01:00 -05:00
1cd41d9bec moon mailer 2019-05-31 22:00:23 -05:00
2c8b4cafe6 moon mailer 2019-05-31 21:57:47 -05:00
3a6a8afb41 moon mailer 2019-05-31 21:56:20 -05:00
5ab72d9d7a moon mailer 2019-05-31 21:55:50 -05:00
ba289865ac moon mailer 2019-05-31 21:55:15 -05:00
b8e6e71da6 moon mailer 2019-05-31 21:53:16 -05:00
cff50a10fa moon mailer 2019-05-31 21:52:19 -05:00
cb5b8f9a93 moon mailer 2019-05-31 21:51:33 -05:00
606325439f moon mailer 2019-05-31 21:50:37 -05:00
e9ed64608f moon mailer 2019-05-31 21:50:00 -05:00
36330f6d46 moon mailer 2019-05-31 21:48:07 -05:00
eb40b899e0 moon mailer 2019-05-31 21:46:55 -05:00
23640cd8bd moon mailer 2019-05-31 21:45:51 -05:00
21e8761d48 moon mailer 2019-05-31 21:45:19 -05:00
d1249b4e4b moon mailer 2019-05-31 21:44:12 -05:00
34334fd160 moon mailer 2019-05-31 21:42:37 -05:00
82f91861f4 moon mailer 2019-05-31 21:37:35 -05:00
4b4e013212 moon mailer 2019-05-31 21:36:01 -05:00
177942648d moon mailer 2019-05-31 21:31:31 -05:00
57fa3b4912 moon mailer 2019-05-31 21:30:32 -05:00
f1ec6785f6 moon mailer 2019-05-31 21:29:46 -05:00
4abcf45ff4 moon mailer 2019-05-31 21:27:13 -05:00
899866e595 moon mailer 2019-05-31 21:20:54 -05:00
722aa7d601 testing 2019-05-31 00:15:41 -05:00
6f84148434 testing 2019-05-31 00:14:15 -05:00
0dca9f0088 testing 2019-05-31 00:11:11 -05:00
25c7ded898 testing 2019-05-31 00:08:37 -05:00
722f034830 testing 2019-05-31 00:02:53 -05:00
87f3e767e4 testing 2019-05-30 23:55:56 -05:00
a914dbc469 testing 2019-05-30 23:53:18 -05:00
545480056a testing 2019-05-30 23:42:01 -05:00
3ef3b12197 testing 2019-05-30 23:39:33 -05:00
1a2c0419d8 testing 2019-05-30 23:38:47 -05:00
7e90cfd4fd testing 2019-05-30 23:35:26 -05:00
6e0e906369 testing 2019-05-30 23:34:22 -05:00
492d007314 get structure kernel 2019-05-30 23:32:06 -05:00
586f2795e3 dumbo 2019-05-30 23:30:46 -05:00
e5247170aa dumbo 2019-05-30 23:29:49 -05:00
565c84ba71 dumbo 2019-05-30 23:28:12 -05:00
c07869e928 modified processes for queues 2019-05-30 23:25:56 -05:00
ae18c8ddac rewrite of job structure processing v2 2019-05-30 23:21:36 -05:00
1a43114f27 testing 2019-05-30 19:55:22 -05:00
6e2c5a0ec7 stuff 2019-05-30 19:50:47 -05:00
4f272fc3a1 moving structure works back to jobs 2019-05-30 19:47:40 -05:00
57dc1f2c4d testing 2019-05-30 03:34:47 -05:00
e225dd622c testing 2019-05-30 03:34:15 -05:00
1efc8519e0 testing 2019-05-30 03:33:19 -05:00
142797926d testing 2019-05-30 03:31:27 -05:00
d2520ade06 testing 2019-05-30 03:30:08 -05:00
415ae401fd testing 2019-05-30 03:28:17 -05:00
894fec8ab5 testing 2019-05-30 03:27:56 -05:00
d01980515b testing 2019-05-30 03:26:56 -05:00
7fffa955ae testing 2019-05-30 03:25:52 -05:00
b3ec73fc75 testing 2019-05-30 03:25:25 -05:00
4b23781a75 testing 2019-05-30 03:21:49 -05:00
7cdce584eb testing 2019-05-30 03:17:29 -05:00
710c894c5d testing 2019-05-30 03:16:47 -05:00
8fd6fa14ca testing 2019-05-30 03:06:27 -05:00
6ec855e93c testing 2019-05-30 02:59:52 -05:00
41457c4c43 testing 2019-05-30 02:54:42 -05:00
d4804a5d83 testing 2019-05-30 02:54:06 -05:00
39919f5045 testing 2019-05-30 02:51:08 -05:00
82c9f6d762 re-arranged function 2019-05-30 02:46:53 -05:00
2ae0b3f97d testing 2019-05-30 02:27:12 -05:00
857f088da4 testing 2019-05-30 02:21:49 -05:00
1ac9181942 testing 2019-05-30 02:20:50 -05:00
0cdb77f2ad testing 2019-05-30 02:19:22 -05:00
d34d5040fb testing 2019-05-30 02:16:09 -05:00
765fc00aa2 testing 2019-05-30 02:07:01 -05:00
3d61ab45ec testing 2019-05-30 02:01:50 -05:00
443d4d1e9b testing 2019-05-30 01:58:18 -05:00
45cfdcdbd6 testing 2019-05-30 01:47:28 -05:00
acf591faca testing 2019-05-30 01:44:13 -05:00
abcc07c7ba testing 2019-05-30 01:42:38 -05:00
220e473224 testing 2019-05-30 01:41:28 -05:00
3b87ab5bcd testing 2019-05-30 01:35:55 -05:00
fce1b4c584 removing nullcache 2019-05-30 01:34:29 -05:00
86719ec3d2 testing 2019-05-30 01:29:32 -05:00
3a23e7ecd6 testing 2019-05-30 01:26:41 -05:00
ff5f6cd37c testing 2019-05-30 01:23:47 -05:00
378e00147e testing 2019-05-30 01:20:33 -05:00
482c96f0f3 testing 2019-05-30 01:12:14 -05:00
497f0a2233 testing 2019-05-30 01:11:34 -05:00
f1c0261cea testing 2019-05-30 01:08:08 -05:00
e59d49af03 helper function added 2019-05-30 00:55:48 -05:00
2d800082b2 timestamps to migration 2019-05-30 00:49:36 -05:00
352c081f03 keys 2019-05-30 00:45:15 -05:00
a786730ca6 added primary keys to the new db tables 2019-05-30 00:43:06 -05:00
df21c42353 stuff 2019-05-30 00:24:11 -05:00
155f9326b5 stopped overwriting the data 2019-05-30 00:21:24 -05:00
5405dbfe39 logging 2019-05-30 00:14:29 -05:00
d7fd89c993 logging 2019-05-30 00:12:22 -05:00
6f85366c9c structure stuff 2019-05-30 00:11:42 -05:00
943eee0b9d structure info not working. 2019-05-29 23:56:16 -05:00
427769f56c raw, response code, and error message logging. 2019-05-29 23:53:14 -05:00
6de678649c removed a line of code 2019-05-29 23:50:20 -05:00
cb63745b5a more logging info to try 2019-05-29 23:48:45 -05:00
1ceb8dacb6 more logging info for structure info not working right 2019-05-29 23:46:21 -05:00
8b2055b352 more logging info for structure info not working right 2019-05-29 23:45:29 -05:00
a2e67b71e3 added nullcache to the structures job 2019-05-29 23:43:04 -05:00
81272c4fe8 added some more logging 2019-05-29 23:18:21 -05:00
6527b66c24 horizon queue config 2019-05-29 22:49:16 -05:00
6baa4b94aa structure warning stuff 2019-05-29 22:47:33 -05:00
eca04d4a81 solar system name 2019-05-29 22:42:04 -05:00
7622801c40 modified database table 2019-05-29 22:36:30 -05:00
954ddc8f6f more library issues 2019-05-29 22:33:57 -05:00
94e3fa058f forgot model structures 2019-05-29 22:27:28 -05:00
3cc393816e issue with foreach statement syntax 2019-05-29 22:24:06 -05:00
acc7da2c07 stdClass error 2019-05-29 22:13:48 -05:00
ea1b802f77 asset job 2019-05-29 21:58:29 -05:00
d354b2ac07 asset job 2019-05-29 21:57:50 -05:00
e5292a1504 structure job 2019-05-29 21:57:27 -05:00
d1e7ed388f model 2019-05-29 21:55:16 -05:00
e02cc37a63 tried de-serializing esi function 2019-05-29 21:36:32 -05:00
d285b22161 namespace issue 2019-05-29 21:31:09 -05:00
b633518630 structure scope 2019-05-29 21:30:15 -05:00
1923f3d2e1 replaced actual character with characterId 2019-05-29 21:29:16 -05:00
5a245f9f36 made an error with charId 2019-05-29 21:28:31 -05:00
9d1bb9e670 more debugging info in critical logs 2019-05-29 21:26:55 -05:00
ce0a94dd90 database migrations for structures and assets 2019-05-29 21:16:57 -05:00
40348ffd22 database migrations for structures and assets 2019-05-29 21:16:34 -05:00
4d8936f989 database migrations for structures and assets 2019-05-29 21:14:44 -05:00
82e55421d6 database migrations for structures and assets 2019-05-29 21:14:04 -05:00
e95a89c86a database migrations for structures and assets 2019-05-29 21:12:54 -05:00
f39ef910aa database migrations for structures and assets 2019-05-29 21:03:05 -05:00
93aa8d5d00 database migrations for structures and assets 2019-05-29 18:30:52 -05:00
723b18abb9 assets job model 2019-05-29 02:07:56 -05:00
07a3edf5b4 process assets job 2019-05-29 02:06:05 -05:00
576ff0b407 re-added planet production tax 2019-05-29 00:56:27 -05:00
73e9341ee7 working on the process assets job 2019-05-29 00:46:00 -05:00
34aaa563b2 moons admin controller 2019-05-29 00:10:53 -05:00
ea8ef913b4 moons admin controller 2019-05-29 00:10:05 -05:00
fd00d9ee6b moons admin controller 2019-05-29 00:09:27 -05:00
92d7bc2fa2 moons admin controller 2019-05-29 00:06:31 -05:00
765b534ba8 moons admin controller 2019-05-29 00:05:16 -05:00
ca6829a3ba modified moons and adminmoons controllers 2019-05-28 23:54:04 -05:00
35555e3d7c asset job 2019-05-28 22:59:47 -05:00
38a30553b4 job for assets and structures modifications for how pages are called. 2019-05-28 22:55:45 -05:00
f479a7066c assets and structure job modifications 2019-05-28 22:50:43 -05:00
1e43122c3d framework for processing assets 2019-05-28 03:26:33 -05:00
414f35e353 process structure job is complete. just need to make migrations 2019-05-28 03:17:26 -05:00
c5039c3152 process structure job 2019-05-28 02:07:23 -05:00
b2d60b70f0 helper function layout 2019-05-27 23:55:31 -05:00
c6d7c66a8c baseline for getting structures to table 2019-05-27 23:54:42 -05:00
ab4d13fa14 structure jobs 2019-05-27 23:45:21 -05:00
29d5595ec8 stocks 2019-05-27 00:11:36 -05:00
852f6610f8 laid out the views for the new item list functionality 2019-05-26 23:26:35 -05:00
4fddb75f05 contract modification 2019-05-26 19:39:08 -05:00
4650ca57fb added models for stock assets from structures 2019-05-26 19:08:43 -05:00
9526c6f9cc number format for all contract display 2019-05-26 16:31:24 -05:00
8d095ea2f3 blade template modification for contracts 2019-05-26 16:28:24 -05:00
47d9efd1ec mailing for contracts 2019-05-25 01:03:41 -05:00
514f4be140 mailing for contracts 2019-05-25 00:57:13 -05:00
7eaf2531de testing new contract mail items 2019-05-25 00:55:01 -05:00
293d768f8b testing new contract mail items 2019-05-25 00:52:08 -05:00
8f3e9eefb0 job fail in finance helper 2019-05-25 00:14:45 -05:00
610256f839 updated pi transaction corp 2019-05-25 00:05:33 -05:00
8077f8731f stuff 2019-05-24 03:53:16 -05:00
ec6954733d adsense 2019-05-24 03:39:35 -05:00
ab9a19d4f1 added transaction to the correct queue 2019-05-23 23:27:52 -05:00
5e43913915 removed logging for a bit of troubleshooting 2019-05-23 23:22:52 -05:00
3ac8912cd5 wallet transactions fail in library function 2019-05-23 23:18:41 -05:00
4994c2a17b wiki controller 2019-05-23 10:55:35 -05:00
c708d35b7a lookup helper 2019-05-23 10:54:57 -05:00
41d7b861e0 wiki controller 2019-05-23 10:53:10 -05:00
b1fcd54fe0 lookup controller modification 2019-05-23 10:52:22 -05:00
060d921cbc wiki controller 2019-05-23 10:50:15 -05:00
885f1fe08b wiki controller 2019-05-23 10:48:56 -05:00
1c3c0ea9d4 wiki purge testing 2019-05-23 10:22:11 -05:00
69d27e1049 transactions in finance helper 2019-05-23 10:13:59 -05:00
ee4b64febe added Log library to finances helper 2019-05-23 10:06:44 -05:00
65ad6b5085 form total worth moon 2019-05-22 20:47:53 -05:00
273d32f2ec columns for total worth moon page 2019-05-22 20:29:10 -05:00
fdd9aba29a navbar for moon worth 2019-05-22 20:22:38 -05:00
28cd165561 fix navlink on the navbar 2019-05-22 20:21:11 -05:00
0e7183062e moons form 2019-05-22 20:16:04 -05:00
11c11884e7 google analytics 2019-05-22 16:38:37 -05:00
e65c238d37 added google analytics to site 2019-05-22 16:37:22 -05:00
d29069256d updated moon admin controller 2019-05-22 01:13:50 -05:00
bc7ae51ce8 update moon rental functionality 2019-05-22 01:01:01 -05:00
a0fbc55607 modifying admin dashboard 2019-05-22 00:32:45 -05:00
8e359831e9 couldn't get datatables to work yet 2019-05-22 00:30:42 -05:00
d758950189 datatables admin page 2019-05-22 00:29:00 -05:00
a76c04b993 datatables admin page 2019-05-22 00:28:09 -05:00
5300a3c289 datatables admin page 2019-05-22 00:24:39 -05:00
509230445f datatables for admin page 2019-05-22 00:21:50 -05:00
98241c47c6 moved how modify roles is done for admin dashboard 2019-05-22 00:06:38 -05:00
e4feb4d1e8 removed structure tax items from navbar 2019-05-22 00:04:32 -05:00
c93e8e26e4 reomved structure tax items from views 2019-05-22 00:03:56 -05:00
c5a7a9e3ea removed structure taxes from program 2019-05-22 00:03:16 -05:00
85d1c30e81 modified comments for web routes.
added new user modify button but no controls behind it yet.
2019-05-21 23:52:24 -05:00
1aff8da252 new controllers 2019-05-21 23:17:15 -05:00
5aa4a7a513 updates 2019-05-21 23:04:52 -05:00
8f4213678f updatemoon blade change 2019-05-21 22:49:10 -05:00
e65fff3ac0 updates 2019-05-22 03:47:20 +00:00
34ee987b03 app config 2019-05-21 22:42:14 -05:00
de5c31b605 artisan fix 2019-05-21 22:38:49 -05:00
2e4c98e4bf moon renter removal 2019-05-21 16:34:31 -05:00
e7bf9ec5e4 added remove renter functionality to update moon 2019-05-21 16:28:44 -05:00
3826bcd8c8 modified a few moons controller variables to not create the variable each time the loop is run to save on a bit of processing time. 2019-05-21 16:12:41 -05:00
f166b72b7d updated npm modules 2019-05-20 20:43:45 -05:00
2319197b81 clean commit 2019-05-20 02:15:00 -05:00
7fa63850fc user table added 2019-05-20 02:07:01 -05:00
c0d16b9d89 user table added 2019-05-20 02:06:21 -05:00
ec6889d815 user table added 2019-05-20 02:05:19 -05:00
249d1d7323 user table added 2019-05-20 02:03:55 -05:00
fba7c28051 user table added 2019-05-20 02:03:20 -05:00
25cd1e9a7f user table added 2019-05-20 02:01:38 -05:00
9c26a9dd94 user table added 2019-05-20 01:59:02 -05:00
94cb7cd030 wiki purge added back 2019-05-20 01:54:02 -05:00
bc900f87cc made a new scratchpad for blades for troubleshooting 2019-05-20 01:51:14 -05:00
2c9ab8fdfc dashboard css issues 2019-05-20 01:50:39 -05:00
88ad16668d dashboard css issues 2019-05-20 01:49:46 -05:00
644866f3ef b4.blade 2019-05-20 01:47:44 -05:00
dae0f5b159 old admin dashboard panel 2019-05-20 01:44:44 -05:00
0323763e83 admin dashboard 2019-05-20 01:44:01 -05:00
feb1ad2ac0 admin pane 2019-05-20 01:27:42 -05:00
af51db6b7f user pane on admin dashboard 2019-05-20 01:23:45 -05:00
56d564c1c1 user pane on admin dashboard 2019-05-20 01:21:46 -05:00
58f163837f tab pane issue 2019-05-20 01:18:17 -05:00
ab7410a02b added new features to the admin panel 2019-05-20 01:16:39 -05:00
96f8fa3375 added new features to the admin panel 2019-05-20 01:09:52 -05:00
30d2b3679a added new features to the admin panel 2019-05-20 01:08:45 -05:00
c304c32b28 added new features to the admin panel 2019-05-20 01:07:31 -05:00
54c9ff63f5 added new features to the admin panel 2019-05-20 00:54:14 -05:00
4e56114d3c added new features to the admin panel 2019-05-20 00:53:46 -05:00
c3959d8513 added new features to the admin panel 2019-05-20 00:52:24 -05:00
bfdbbe8de4 added new features to the admin panel 2019-05-20 00:51:16 -05:00
830aa15d24 added new features to the admin panel 2019-05-20 00:50:45 -05:00
2d2b28e49a added new features to the admin panel 2019-05-20 00:49:19 -05:00
fa3a3a4492 added new features to the admin panel 2019-05-20 00:48:38 -05:00
c6e317f93d added new features to the admin panel 2019-05-20 00:47:32 -05:00
ebcb93ee7d added new features to the admin panel 2019-05-20 00:46:12 -05:00
abcca7bf0b added new features to the admin panel 2019-05-20 00:45:35 -05:00
85e104adfd added new features to the admin panel 2019-05-20 00:44:50 -05:00
dab6c21957 added new features to the admin panel 2019-05-20 00:42:26 -05:00
d56b6c1420 logging changes 2019-05-18 14:46:19 -05:00
e9487fa58a updated packages 2019-05-18 09:06:43 +00:00
901d16349e updated to laravel 5.8 2019-05-18 04:04:31 -05:00
a67899adb5 updated package.json 2019-05-18 03:48:08 -05:00
978c6040f8 modified log and warning messages for exceptions. 2019-05-17 21:24:23 -05:00
fee295810b modified git ignore 2019-05-17 21:11:34 -05:00
95151048b9 modified git ignore 2019-05-17 21:10:02 -05:00
3b13a6a4ee added some graphics as well as changed all mail jobs to the correct mail queue 2019-05-17 21:08:40 -05:00
b29d557e5b public logs removed 2019-05-15 10:30:29 -05:00
2d0ba17044 cleared worker.log 2019-05-15 08:18:24 -05:00
c9cb3f10a8 modified queue balance to auto 2019-05-15 07:20:18 -05:00
8b0c60cd2d modified what jobs utilize what queueu 2019-05-15 07:18:49 -05:00
490714f5c0 added Log class use to all jobs 2019-05-15 07:15:16 -05:00
a9e338ba72 changed job connections to redis rather than database 2019-05-14 13:25:57 -05:00
ef7fc8173b wallet journal job 2019-05-14 13:23:39 -05:00
828510a39d modified some job variables 2019-05-14 13:20:39 -05:00
5ad0d51001 modified .env 2019-05-14 13:18:00 -05:00
619315b533 queue connection in .env 2019-05-14 01:10:18 -05:00
740a9517ab queue settings' 2019-05-14 01:07:01 -05:00
bd43e03d1b modified queues 2019-05-14 00:55:58 -05:00
deeb585e40 modified .env file 2019-05-14 00:49:18 -05:00
e8399e4590 added extra queues 2019-05-14 00:41:46 -05:00
85a000b8df added queues to horizon 2019-05-14 00:39:34 -05:00
a3bafa610f updated some horizon files 2019-05-14 00:30:00 -05:00
c36e49c7df .env update and kernel update for horizon 2019-05-14 00:26:57 -05:00
10123 changed files with 1075678 additions and 242610 deletions

14
.env
View File

@@ -4,7 +4,7 @@ APP_KEY=base64:PBOxrGFJAtwj9SDF4F0DZ1J+6MjrJmRiPZJQwRdy3XQ=
APP_DEBUG=true APP_DEBUG=true
APP_URL=http://localhost APP_URL=http://localhost
LOG_CHANNEL=stack LOG_CHANNEL=daily
DB_CONNECTION=mysql DB_CONNECTION=mysql
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
@@ -16,8 +16,8 @@ DB_PASSWORD=strtmage
BROADCAST_DRIVER=log BROADCAST_DRIVER=log
CACHE_DRIVER=file CACHE_DRIVER=file
QUEUE_CONNECTION=redis
QUEUE_DRIVER=redis QUEUE_DRIVER=redis
QUEUE_CONNECTION=sync
SESSION_DRIVER=file SESSION_DRIVER=file
SESSION_LIFETIME=120 SESSION_LIFETIME=120
@@ -33,18 +33,12 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null MAIL_PASSWORD=null
MAIL_ENCRYPTION=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_CLIENT_ID=e5848fea3618427a8ee0dccb6a04fc62
ESI_SECRET_KEY=TdnNGRM8RTNSifZdaIc9yHTTkYPgYEEXHRIbT6oY ESI_SECRET_KEY=TdnNGRM8RTNSifZdaIc9yHTTkYPgYEEXHRIbT6oY
ESI_USERAGENT='W4RP Services' ESI_USERAGENT='W4RP Services'
ESI_CALLBACK_URI='http://services.w4rp.space/callback' ESI_CALLBACK_URI='http://services.w4rp.space/callback'
ESI_PRIMARY_CHAR=93738489
ESI_ALLIANCE=99004116
EVEONLINE_CLIENT_ID=e5848fea3618427a8ee0dccb6a04fc62 EVEONLINE_CLIENT_ID=e5848fea3618427a8ee0dccb6a04fc62
EVEONLINE_CLIENT_SECRET=TdnNGRM8RTNSifZdaIc9yHTTkYPgYEEXHRIbT6oY EVEONLINE_CLIENT_SECRET=TdnNGRM8RTNSifZdaIc9yHTTkYPgYEEXHRIbT6oY

7
.gitignore vendored
View File

@@ -1,4 +1,9 @@
/node_modules /node_modules
/logs /logs
.editorconfig /.editorconfig
/cache /cache
/public/logs/*
worker.log
/public/cache/*
/.env
.vscode

View File

@@ -0,0 +1,96 @@
<?php
namespace App\Console\Commands\Assets;
use Illuminate\Console\Command;
use DB;
use Log;
//Job
use App\Jobs\ProcessAssetsJob;
//Library
use App\Library\Esi\Esi;
use Commands\Library\CommandHelper;
use App\Library\Assets\AssetHelper;
use Seat\Eseye\Exceptions\RequestFailedException;
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;
}
//Get the refresh token from the database
$token = $esiHelper->GetRefreshToken($charId);
//Create the authentication container
$esi = $esiHelper->SetupEsiAuthentication($token);
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++) {
ProcessAssetsJob::dispatch($charId, $corpId, $i)->onQueue('assets');
}
}
}

View File

@@ -0,0 +1,89 @@
<?php
namespace App\Console\Commands\Corps;
//Internal Library
use Illuminate\Console\Command;
use Commands\Library\CommandHelper;
//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 = '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();
//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();
}
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,178 @@
<?php
namespace App\Console\Commands\Data;
//Internal Library
use Illuminate\Console\Command;
use Carbon\Carbon;
use Log;
//Library
use Commands\Library\CommandHelper;
//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
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:CleanData';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Clean old database data';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
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,61 @@
<?php
namespace App\Console\Commands\Data;
//Internal Library
use Illuminate\Console\Command;
//Library
use Commands\Library\CommandHelper;
//Models
use App\Models\Structure\Structure;
use App\Models\Structure\Service;
use App\Models\Stock\Asset;
class EmptyJumpBridges extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services: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()
{
$task = new CommandHelper('EmptyJumpBridges');
//Add entry into the table saying the job is starting
$task->SetStartStatus();
Structure::truncate();
Service::truncate();
Asset::truncate();
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Console\Commands\Data;
//Internal Library
use Illuminate\Console\Command;
use Carbon\Carbon;
use Log;
//Library
use Commands\Library\CommandHelper;
//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()
{
$task = new CommandHelper('PurgeCorpLedgers');
$task->SetStartStatus();
PurgeMoonLedgerJob::dispatch();
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Console\Commands\Eve;
use Illuminate\Console\Command;
use Log;
//Library
use Commands\Library\CommandHelper;
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()
{
$task = new CommandHelper('ItemPriceUpdate');
$task->SetStartStatus();
$moonHelper = new MoonCalc;
$moonHelper->FetchNewPrices();
//ItemPricesUpdateJob::dispatch()->onQueue('default');
$task->SetStopStatus();
}
}

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

@@ -0,0 +1,78 @@
<?php
namespace App\Console\Commands\Finances;
use Illuminate\Console\Command;
use Log;
use Commands\Library\CommandHelper;
use App\Library\Finances\Helper\FinanceHelper;
//Jobs
use App\Jobs\ProcessWalletJournalJob;
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++) {
ProcessWalletJournalJob::dispatch(1, $config['primary'], $i)->onQueue('journal');
}
//Get the total pages for the journal for the sov bills from the holding corporation
$pages = $finance->GetJournalPageCount(6, $config['primary']);
//Dispatch a job for each page to process
for($i = 1; $i <= $pages; $i++) {
ProcessWalletJournalJob::dispatch(6, $config['primary'], $i)->onQueue('journal');
}
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,132 @@
<?php
namespace App\Console\Commands\Finances;
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\Esi\EsiToken;
use App\Models\Esi\EsiScope;
//Library
use App\Library\Esi\Esi;
use App\Library\Finances\AllianceMarketTax;
use App\Library\Finances\CorpMarketTax;
use App\Library\Finances\MarketTax;
use App\Library\Finances\PlayerDonation;
use App\Library\Finances\ReprocessingTax;
use App\Library\Finances\JumpBridgeTax;
use App\Library\Finances\StructureIndustryTax;
use App\Library\Finances\OfficeFee;
use App\Library\Finances\PlanetProductionTax;
use App\Library\Finances\PISale;
use App\Library\Lookups\LookupHelper;
use App\Library\Finances\SovBillExpenses;
//Seat Stuff
use Seat\Eseye\Exceptions\RequestFailedException;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
class SovBillsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:SovBills';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get the holding corps sov bills from wallet 6.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$sovBill = new SovBillExpenses;
$esiHelper = new Esi;
$finance = new FinanceHelper();
$lookup = new LookupHelper;
//Create the command helper container
$task = new CommandHelper('SovBills');
//Add the entry into the jobs table saying the job is starting
$task->SetStartStatus();
//Get the esi configuration
$config = config('esi');
//Set caching to null
$configuration = Configuration::getInstance();
$configuration->cache = NullCache::class;
$token = $esiHelper->GetRefreshToken($config['primary']);
if($token == null) {
return null;
}
//Create an ESI authentication container
$esi = $esiHelper->SetupEsiAuthentication($token);
$esi->setVersion('v4');
//Reference to see if the character is in our look up table for corporations and characters
$char = $lookup->GetCharacterInfo($config['primary']);
$corpId = $char->corporation_id;
//Get the total pages for the journal for the sov bills from the holding corporation
$pages = $finance->GetJournalPageCount(6, $config['primary']);
//Try to figure it out from the command itself.
for($i = 1; $i <= $pages; $i++) {
printf("Getting page: " . $i . "\n");
try {
$journals = $esi->page($i)
->invoke('get', '/corporations/{corporation_id}/wallets/{division}/journal/', [
'corporation_id' => $corpId,
'division' => 6,
]);
} catch(RequestFailedException $e) {
return null;
}
//Decode the wallet from json into an array
$wallet = json_decode($journals->raw, true);
dd($wallet);
foreach($wallet as $entry) {
if($entry['ref_type'] == 'infrastructure_hub_maintenance' && $entry['first_party_id'] == 98287666) {
$sovBill->InsertSovBillExpense($entry, $corpId, $division);
}
}
}
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,129 @@
<?php
namespace App\Console\Commands\Flex;
//Internal Library
use Illuminate\Console\Command;
use Carbon\Carbon;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
//Library
use Commands\Library\CommandHelper;
//Models
use App\Models\Flex\FlexStructure;
use App\Models\Mail\SentMail;
class FlexStructureCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:FlexStructures';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Mail out reminder for flex structure bills';
/**
* 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('FlexStructureMailer');
//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 of the contacts for the flex structures
$contacts = FlexStructure::select('requestor_id')->orderBy('requestor_id')->get();
//For each of the contacts, send a reminder mail about the total of the structures they are paying for
foreach($contacts as $contact) {
//Get all of the structures for requestor
$structures = FlexStructure::where([
'requestor_id' => $contact->requestor_id,
])->get();
//Totalize the total cost of everything
$totalCost = $this->TotalizeCost($structures);
//Build the body of the mail
$body = "Flex Structure Overhead Cost is due for the following structures:<br>";
foreach($structures as $structure) {
$body .= "System: " . $structure->system . " - " . $structure->structure_type . ": " . $structure->structure_cost . " ISK<br>";
}
$body .= "Total Cost: " . number_format($totalCost, 2,".", ",");
$body .= "Please remit payment to Spatial Forces by the 3rd of the month.<br>";
$body .= "Sincerely,<br>";
$body .= "Warped Intentions Leadership<br>";
//Dispatch the mail job
$subject = "Warped Intentions Flex Structures Payment Due for " . $today->englishMonth;
ProcessSendEveMailJob::dispatch($body, (int)$structure->requestor_id, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds($delay));
//Increment the delay for the mail to not hit the rate limits
$delay += 60;
//After the mail is dispatched, save the sent mail record
$this->SaveSentRecord($config['primary'], $subject, $body, (int)$structure->requestor_id, 'character');
}
//Mark the job as finished
$task->SetStopStatus();
}
private function TotalizeCost($structures) {
//Declare the total cost
$totalCost = 0.00;
foreach($structures as $structure) {
$totalCost += $structure->structure_cost;
}
return $totalCost;
}
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,48 @@
<?php
namespace Commands\Library;
//Internal Libraries
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
ScheduleJob::where([
'system_time' => $this->system_time,
'job_name' => $this->job_name,
])->update([
'job_state' => 'Finished',
]);
}
public function CleanJobStatusTable() {
//Delete old jobs
ScheduleJob::where(['system_time', '<', Carbon::now()->subMonths(3)])->delete();
}
}
?>

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

@@ -0,0 +1,90 @@
<?php
namespace App\Console\Commands\Moons;
//Internal Library
use Illuminate\Console\Command;
use Carbon\Carbon;
use Log;
//Jobs
use App\Jobs\Commands\Moons\FetchMoonLedgerJob;
use App\Jobs\Commands\Moons\FetchMoonObserverJob;
//Library
use Commands\Library\CommandHelper;
//Models
use App\Models\Esi\EsiScope;
class MoonsUpdateCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:MoonUpdate';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Update all of the moons registered for observers and ledgers.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Declare variables
$delay = 0;
$characters = array();
//Create the new command helper container
$task = new CommandHelper('MoonsUpdateCommand');
//Set the task start status
$task->SetStartStatus();
//Get all of the characters who have registered structures for moon ledgers
$miningChars = EsiScope::where([
'scope' => 'esi-industry.read_corporation_mining.v1',
])->get();
foreach($miningChars as $mChars) {
$universe = EsiScope::where([
'character_id' => $mChars->character_id,
'scope' => 'esi-universe.read_structures.v1',
])->first();
if($universe != null) {
array_push($characters, $universe->character_id);
}
}
//Cycle through each of the character Ids which have the correct scopes,
//and dispatch jobs accordingly.
foreach($characters as $charId) {
//Fetch all of the corp observers with the job dispatch
FetchMoonObserverJob::dispatch($charId);
//Fetch all of the corp ledgers with the job dispatch
FetchMoonLedgerJob::dispatch($charId);
}
//Set task done status
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,63 @@
<?php
namespace App\Console\Commands\RentalMoons;
//Internal Library
use Illuminate\Console\Command;
use Log;
use Carbon\Carbon;
//Library
use Commands\Library\CommandHelper;
//Jobs
use App\Jobs\Commands\RentalMoons\SendMoonRentalPaymentReminderJob;
use App\Jobs\Commands\RentalMoons\UpdateMoonRentalPaidState;
class AllianceRentalMoonInvoiceCreationCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:RentalInvoices';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send out rental invoice reminders';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Set the task as started
$task = new CommandHelper('AllianceRentalInvoice');
$task->SetStartStatus();
//Send the job for the invoice creation command
SendMoonRentalPaymentReminderJob::dispatch()->delay(Carbon::now()->addSeconds(10));
//Update the paid state for the moons
UpdateMoonRentalPaidState::dispatch()->delay(Carbon::now()->addSeconds(600));
//Set the task as stopped
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Console\Commands\RentalMoons;
//Internal Library
use Illuminate\Console\Command;
use Log;
//Library
use Commands\Library\CommandHelper;
//Job
use App\Jobs\Commands\RentalMoons\UpdateMoonRentalPrice;
class AllianceRentalMoonUpdatePricingCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:UpdateRentalPrice';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Update alliance rental moon prices.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Setup the task handler
$task = new CommandHelper('AllianceRentalMoonPriceUpdater');
$task->SetStartStatus();
UpdateMoonRentalPrice::dispatch();
$task->SetStopStatus();
}
}

View File

@@ -0,0 +1,114 @@
<?php
namespace App\Console\Commands\Structures;
use Illuminate\Console\Command;
use Log;
//Library
use App\Library\Structures\StructureHelper;
use App\Library\Esi\Esi;
use Commands\Library\CommandHelper;
use Seat\Eseye\Exceptions\RequestFailedException;
//Job
use App\Jobs\ProcessStructureJob;
//Models
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 = $esiHelper->GetRefreshToken($charId);
//Create the esi authentication container
$esi = $esiHelper->SetupEsiAuthentication($token);
//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++) {
ProcessStructureJob::dispatch($charId, $corpId, $currentPage)->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,133 @@
<?php
namespace App\Console\Commands\SystemRental;
//Internal Library
use Illuminate\Console\Command;
use Carbon\Carbon;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
//Library
use Command\Library\CommandHelper;
//Models
use App\Models\Rentals\RentalSystem;
use App\Models\Mail\SentMail;
class SystemRentalCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:SystemRentals';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Mail out bill for system rentals.';
/**
* 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('SystemRentalMailer');
//Add the entry into the jobs table saying the job has started
$task->SetStartStatus();
//Create other variables
$body = null;
$delay = 30;
//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 of the contacts for the system rentals
$contacts = RentalSystem::select('contact_id')->orderBy('contact_id')->get();
//For each of the contacts send a reminder mail about the total of the systems they are paying for
foreach($contacts as $contact) {
//Get all of the systems
$systems = RentalSystem::where([
'contact_id' => $contact->contact_id,
])->get();
//Totalize the total cost of all of the systems
$totalCost = $this->TotalizeCost($systems);
//Build the body of the mail
$body = "System Rental Cost is due for the following systems:<br>";
foreach($systems as $system) {
$body .= $system->system_name . "<br>";
}
//Create the rest of the email body
$body .= "Total Cost: " . number_format($totalCost, 2, ".", ",");
$body .= "Please remite payment to White Wolves Holding.<br>";
$body .= "Sincerely,<br>";
$body .= "Warped Intentions Leadership<br>";
//Fill in the subject
$subject = "Warped Intentions System Rental Bill Due";
//Dispatch the mail job
ProcessSendEveMailJob::dispatch($body, (int)$contact->contact_id, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds($delay));
//Increase the delay for the next mail job
$delay += 60;
//After the mail is dispatched, save the sent mail record
$this->SaveSentRecord($config['primary'], $subject, $body, (int)$contact->contact_id, 'character');
}
//Mark the job as finished
$task->SetStopStatus();
}
private function TotalizeCost($systems) {
//Declare the starting total cost
$totalCost = 0.00;
foreach($systems as $system) {
$totalCost += $system->rental_cost;
}
return $totalCost;
}
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

@@ -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,203 @@
<?php
namespace App\Console\Commands\Users;
//Internal Library
use Illuminate\Console\Command;
use Log;
//Libraries
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Wiki\WikiHelper;
//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;
use App\Models\Doku\DokuMember;
use App\Models\Doku\DokuUser;
/**
* 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()
{
//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();
//Delete the user from the wiki
$wikiHelper = new WikiHelper;
//Get the uid from the wiki tables utilizing the character's name
$uid = DokuUser::where(['name' => $user->name])->first();
$wikiHelper->DeleteWikiUser($uid);
}
}
}
}
}
}
}

View File

@@ -1,106 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Carbon\Carbon;
use DB;
//Jobs
use App\Jobs\SendEveMailJob;
//Libraries
use Commands\Library\CommandHelper;
use App\Library\Finances\Helper\FinanceHelper;
use App\Library\Structures\StructureTaxHelper;
use App\Library\Esi\Esi;
//Models
use App\Models\Market\MonthlyMarketTax;
use App\Models\ScheduledTask\ScheduleJob;
use App\Models\Corporation\CorpStructure;
use App\Models\User\UserToCorporation;
use App\Models\Jobs\JobSendEveMail;
class CalculateMarketTaxCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:CalculateMarketTax';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Calculate the market taxes owed to the holding corporation and store in the database.';
/**
* 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();
//Setup helper classes
$hFinances = new FinanceHelper();
$sHelper = new StructureTaxHelper();
$start = Carbon::now()->startOfMonth()->subMonth();
$end = Carbon::now()->endOfMOnth()->subMonth();
$end->hour = 23;
$end->minute = 59;
$end->second = 59;
//Get the set of corporations from the structure table
$corps = CorpStructure::select('corporation_id')->groupBy('corporation_id')->get();
$this->line('Got all of the corps with markets.' . sizeof($corps));
foreach($corps as $corp) {
if($corp->corporation_id != 98287666) {
$finalTaxes = $sHelper->GetTaxes($corp->corporation_id, 'Market', $start, $end);
if($finalTaxes < 0.00) {
$finalTaxes = 0.00;
}
//Get the info about the structures from the database
$info = CorpStructure::where(['corporation_id' => $corp->corporation_id])->first();
$character = UserToCorporation::where(['character_id' => $info->character_id])->first();
$mail = new JobSendEveMail;
$mail->sender = 93738489;
$mail->subject = 'Market Taxes Owed';
$mail->body = 'Year ' . $start->year . ' ' .
'Month: ' .
$start->month .
'<br>Market Taxes Owed: ' .
number_format($finalTaxes, 2, '.', ',') .
'<br>Please remit to Spatial Forces';
$mail->recipient = (int)$info->character_id;
$mail->recipient_type = 'character';
SendEveMailJob::dispatch($mail);
}
}
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -1,90 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use DB;
use Carbon\Carbon;
//Libraries
use Commands\Library\CommandHelper;
use App\Library\Finances\Helper\FinanceHelper;
//Jobs
use App\Jobs\ProcessWalletJournalJob;
//Models
use App\Models\Corporation\CorpStructure;
use App\Models\Jobs\JobProcessWalletJournal;
class CorpJournalCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:CorpJournal';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Grabs the corporation journals and deposit 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();
//Setup the Finances Container
$finance = new FinanceHelper();
//Setup an array to store corporations which have been logged so we don't keep calling the same ones. We need
//this step in order to save time during the cronjob.
$finishedCorps = array();
$corpCompleted = false;
//Get the corps with structures logged in the database
$corps = CorpStructure::select('corporation_id')->groupBy('corporation_id')->get();
//For all of the corporations, go through each structure and get wallet data
foreach($corps as $corp) {
//If the corporation isn't the holding corporation, then process the data.
//We process holding corporation data elsewhere.
if($corp->corporation_id != 98287666) {
$structure = CorpStructure::where(['corporation_id' => $corp->corporation_id])->first();
$pages = $finance->GetJournalPageCount(1, $structure->character_id);
for($i = 1; $i <= $pages; $i++) {
$job = new JobProcessWalletJournal;
$job->division = 1;
$job->charId = $structure->character_id;
$job->page = $i;
ProcessWalletJournalJob::dispatch($job);
}
}
}
//Mark the job as finished
$task->SetStopStatus();
}
}

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,73 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
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 total pages for the journal for the holding corporation
$pages = $finance->GetJournalPageCount(1, 93738489);
//Dispatch a single job for each page to process
for($i = 1; $i <= $pages; $i++) {
$job = new JobProcessWalletJournal;
$job->division = 1;
$job->charId = 93738489;
$job->page = $i;
ProcessWalletJournalJob::dispatch($job);
}
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -1,224 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Carbon\Carbon;
use DB;
//Jobs
use App\Jobs\SendEveMailJob;
//Library
use Commands\Library\CommandHelper;
use App\Library\Moons\MoonMailer;
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;
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();
//Declare the moon calc class variable to utilize the library to update the price
$mailer = new MoonMailer;
//Create other variables
$body = null;
//Get today's date.
$today = Carbon::now();
$today->second = 1;
$today->minute = 0;
$today->hour = 0;
//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 = $this->GetRentalMoons($contact);
//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 " . $cost . "<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 JobSendEveMail;
$mail->sender = 93738489;
$mail->subject = "Warped Intentions Moon Rental Payment Due";
$mail->body = $body;
$mail->recipient = (int)$contact;
$mail->recipient_type = 'character';
SendEveMailJob::dispatch($mail);
//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) {
if($today > $rental->Paid_Until)
$this->UpdateNotPaid($rental);
}
}
//Mark the job as finished
$task->SetStopStatus();
}
private function UpdateNotPaid(MoonRental $rental) {
$today = Carbon::now();
if($today >= $rental->Paid_Until) {
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(MoonRental $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 = 'System: ' . $moon->System;
$temp .= 'Planet: ' . $moon->Planet;
$temp .= 'Moon: ' . $moon->Moon;
//Push the new string onto the array list
array_push($list, $temp);
}
//Return the list
return $list;
}
private function GetRentalMoons($contact) {
$rentals = MoonRental::where([
'Contact' => $contact,
])->get();
return $rentals;
}
private function TotalizeMoonCost($rentals) {
//Delcare variables and classes
$moonCalc = new MoonCalc;
$totalCost = 0.00;
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->SpatialMoonsOnlyGoo($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,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);
//Mark the job as finished
$task->SetStopStatus();
}
}

View File

@@ -2,9 +2,13 @@
namespace App\Console; namespace App\Console;
//Internal Library
use Illuminate\Console\Scheduling\Schedule; use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
//Library
use Commands\Library\CommandHelper;
class Kernel extends ConsoleKernel class Kernel extends ConsoleKernel
{ {
/** /**
@@ -13,13 +17,23 @@ class Kernel extends ConsoleKernel
* @var array * @var array
*/ */
protected $commands = [ protected $commands = [
Commands\CorpJournalCommand::class, Commands\Corps\GetCorpsCommand::class,
Commands\GetCorpsCommand::class, Commands\Finances\HoldingFinancesCommand::class,
Commands\UpdateMoonPriceCommand::class, Commands\Structures\GetStructuresCommand::class,
Commands\CalculateMarketTaxCommand::class, Commands\Assets\GetAssetsCommand::class,
Commands\HoldingFinancesCommand::class, Commands\Users\PurgeUsers::class,
Commands\MoonMailerCommand::class, Commands\Flex\FlexStructureCommand::class,
Commands\PiTransactionsCommand::class, Commands\Data\EmptyJumpBridges::class,
Commands\Finances\SovBillsCommand::class,
Commands\Data\CleanStaleDataCommand::class,
Commands\Moons\MoonsUpdateCommand::class,
Commands\Data\PurgeCorpMoonLedgers::class,
Commands\Eve\ItemPricesUpdateCommand::class,
/**
* Rental Moon Commands
*/
Commands\RentalMoons\AllianceRentalMoonInvoiceCreationCommand::class,
Commands\RentalMoons\AllianceRentalMoonUpdatePricingCommand::class,
]; ];
/** /**
@@ -30,27 +44,51 @@ class Kernel extends ConsoleKernel
*/ */
protected function schedule(Schedule $schedule) protected function schedule(Schedule $schedule)
{ {
$schedule->command('services:CorpJournal') //Horizon Graph Schedule
->hourly() $schedule->command('horizon:snapshot')->everyFiveMinutes();
/**
* Rentals / Flex Schedule
*/
$schedule->command('services:UpdateRentalPrice')
->dailyAt('11:00')
->withoutOverlapping(); ->withoutOverlapping();
$schedule->command('services:FlexStructures')
->monthlyOn(2, '00:01');
/**
* Holding Corp Finance Schedule
*/
$schedule->command('services:HoldingJournal') $schedule->command('services:HoldingJournal')
->hourly() ->hourlyAt('45')
->withoutOverlapping(); ->withoutOverlapping();
$schedule->command('services:UpdateMoonPrice')
->hourly() /**
->withoutOverlapping(); * Get Information Schedule
*/
$schedule->command('services:GetCorps') $schedule->command('services:GetCorps')
->monthlyOn(1, '09:00') ->monthlyOn(1, '09:00');
$schedule->command('services:GetStructures')
->dailyAt('09:00');
$schedule->command('services:GetAssets')
->hourlyAt('22');
/**
* Purge Data Schedule
*/
$schedule->command('services:CleanData')
->weekly(7, '11:00');
$schedule->command('data:PurgeCorpLedgers')
->monthly();
$schedule->command('services:PurgeUsers')
->dailyAt('23:00');
/**
* Item Update Schedule
*/
$schedule->command('services:ItemPriceUpdate')
->hourlyAt('30')
->withoutOverlapping(); ->withoutOverlapping();
$schedule->command('services:CalculateMarketTax')
->monthlyOn(1, '08:00')
->withoutOverlapping();
$schedule->command('services:MoonMailer')
->monthlyOn(1, '00:01')
->withoutOverlapping();
$schedule->command('services:PiTransactions')
->hourly()
->withoutOverlapping();
} }
/** /**

View File

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

View File

@@ -2,23 +2,27 @@
namespace App\Http\Controllers\Auth; namespace App\Http\Controllers\Auth;
//Internal Library
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Socialite; use Socialite;
use Auth; use Auth;
use App\User; //Library
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use App\Library\Esi\Esi;
//Models
use App\Models\User\User;
use App\Models\Esi\EsiScope; use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken; use App\Models\Esi\EsiToken;
use App\Models\User\UserPermission; use App\Models\User\UserPermission;
use App\Models\User\UserRole; use App\Models\User\UserRole;
use App\Models\Admin\AllowedLogin; 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 class LoginController extends Controller
{ {
@@ -78,12 +82,68 @@ class LoginController extends Controller
* Redirect to the dashboard if logging in successfully. * Redirect to the dashboard if logging in successfully.
*/ */
public function handleProviderCallback() { public function handleProviderCallback() {
//Get the sso user from the socialite driver
$ssoUser = Socialite::driver('eveonline')->user(); $ssoUser = Socialite::driver('eveonline')->user();
$user = $this->createOrGetUser($ssoUser);
auth()->login($user, true); if(Auth::check()) {
//If a refresh token is present, then we are doing a scope callback
//to update scopes for an access token
return redirect()->to('/dashboard')->with('success', 'Successfully Logged In or Updated ESI.'); 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) {
return redirect()->to('/profile')->with('success', 'Alt registered.');
} else {
return redirect()->to('/profile')->with('error', 'Alt was previously registered.');
}
}
} else {
$user = $this->createOrGetUser($ssoUser);
auth()->login($user, true);
return redirect()->to('/dashboard')->with('success', 'Successfully Logged In.');
}
}
/**
* Check if an alt exists in the database, else, create and
* return the user object.
*
* @param \Laravel\Socialite\Two\User $user
*/
private function createAlt($user) {
$altCount = UserAlt::where('character_id', $user->id)->count();
if($altCount == 0) {
$newAlt = new UserAlt;
$newAlt->name = $user->getName();
$newAlt->main_id = auth()->user()->getId();
$newAlt->character_id = $user->id;
$newAlt->avatar = $user->avatar;
$newAlt->access_token = $user->token;
$newAlt->owner_hash = $user->owner_hash;
$newAlt->inserted_at = time();
$newAlt->expires_in = $user->expiresIn;
$newAlt->save();
return 1;
} else {
return 0;
}
} }
/** /**
@@ -93,69 +153,32 @@ class LoginController extends Controller
* @param \Laravel\Socialite\Two\User $user * @param \Laravel\Socialite\Two\User $user
*/ */
private function createOrGetUser($eve_user) { private function createOrGetUser($eve_user) {
//Search for user in the database $authUser = null;
$authUser = User::where('character_id', $eve_user->id)->first();
//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();
//If the user is found, do more checks to see what type of login we are doing //If the user is found, do more checks to see what type of login we are doing
if($authUser) { if($userCount > 0) {
//if a refresh token is present, then we are doing a scope callback to update scopes for an access token //Search for user in the database
if($eve_user->refreshToken !== null) { $authUser = User::where('character_id', $eve_user->id)->first();
//Check if the owner hash has changed to call the user type if it needs to be updated
if($this->OwnerHasChanged($authUser->owner_hash, $eve_user->owner_hash)) {
//Get the right role for the user
$role = $this->GetRole(null, $eve_user->id);
//Set the role for the user
$this->SetRole($role, $eve_user->id);
//Update the user information never the less. //Check to see if the owner has changed
User::where('character_id', $eve_user->id)->update([ //If the owner has changed, then update their roles and permissions
'avatar' => $eve_user->avatar, if($this->OwnerHasChanged($authUser->owner_hash, $eve_user->owner_hash)) {
'owner_hash' => $eve_user->owner_hash, //Get the right role for the user
'role' => $role, $role = $this->GetRole(null, $eve_user->id);
]); //Set the role for the user
//Update the user's roles and permission $this->SetRole($role, $eve_user->id);
UserPermission::where(['character_id' => $eve_user->id])->delete();
$perm = new UserPermission();
$perm->character_id = $eve_user->id;
$perm->permission = $role;
$perm->save();
} else {
//Update the user information never the less.
User::where('character_id', $eve_user->id)->update([
'avatar' => $eve_user->avatar,
]);
}
//See if we have an access token for the user.
//If we have a token update the token, if not create an entry into the database
$token = EsiToken::where('character_id', $eve_user->id)->first();
if($token) {
//Update the ESI Token
EsiToken::where('character_id', $eve_user->id)->update([
'character_id' => $eve_user->getId(),
'access_token' => $eve_user->token,
'refresh_token' => $eve_user->refreshToken,
'expires_in' => $eve_user->expiresIn,
]);
} else { //If a token entry is not found, then we create a new token entry into the database
//Save the ESI Token in the database
$token = new EsiToken;
$token->character_id = $eve_user->id;
$token->access_token = $eve_user->token;
$token->refresh_token = $eve_user->refreshToken;
$token->expires_in = $eve_user->expiresIn;
$token->save();
}
//After creating the token, we need to update the table for scopes //Update the user information never the less.
//First we look for all the scopes, then if need be add entries or delete entries from the database $this->UpdateUser($eve_user, $role);
$this->SetScopes($eve_user->user['Scopes'], $eve_user->id);
} else { //Update the user's roles and permission
//If the user is already in the database, but no refresh token was present in the callback, then just update the user $this->UpdatePermission($eve_user, $role);
User::where('character_id', $eve_user->id)->update([
'avatar' => $eve_user->avatar,
]);
} }
//Return the user to the calling auth function //Return the user to the calling auth function
return $authUser; return $authUser;
} else { } else {
@@ -163,16 +186,7 @@ class LoginController extends Controller
$role = $this->GetRole(null, $eve_user->id); $role = $this->GetRole(null, $eve_user->id);
//Create the user account //Create the user account
$user = User::create([ $user = $this->CreateNewUser($eve_user);
'name' => $eve_user->getName(),
'email' => null,
'avatar' => $eve_user->avatar,
'owner_hash' => $eve_user->owner_hash,
'character_id'=> $eve_user->getId(),
'expires_in' => $eve_user->expiresIn,
'access_token' => $eve_user->token,
'user_type' => $this->GetAccountType(null, $eve_user->id),
]);
//Set the role for the user //Set the role for the user
$this->SetRole($role, $eve_user->id); $this->SetRole($role, $eve_user->id);
@@ -182,6 +196,81 @@ 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,
'inserted_at' => time(),
'expires_in' => $eve_user->expiresIn,
]);
}
/**
* Create a new ESI Token in the database
*/
private function SaveEsiToken($eve_user) {
$token = new EsiToken;
$token->character_id = $eve_user->id;
$token->access_token = $eve_user->token;
$token->refresh_token = $eve_user->refreshToken;
$token->inserted_at = time();
$token->expires_in = $eve_user->expiresIn;
$token->save();
}
/**
* Update avatar
*/
private function UpdateAvatar($eve_user) {
User::where('character_id', $eve_user->id)->update([
'avatar' => $eve_user->avatar,
]);
}
/**
* Update user permission
*/
private function UpdatePermission($eve_user, $role) {
UserPermission::where(['character_id' => $eve_user->id])->delete();
$perm = new UserPermission();
$perm->character_id = $eve_user->id;
$perm->permission = $role;
$perm->save();
}
/**
* 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,
'role' => $role,
]);
}
/**
* Create a new user account
*/
private function CreateNewUser($eve_user) {
$user = User::create([
'name' => $eve_user->getName(),
'avatar' => $eve_user->avatar,
'owner_hash' => $eve_user->owner_hash,
'character_id' => $eve_user->getId(),
'inserted_at' => time(),
'expires_in' => $eve_user->expiresIn,
'access_token' => $eve_user->token,
'user_type' => $this->GetAccountType(null, $eve_user->id),
]);
return $user;
}
/** /**
* Set the user role in the database * Set the user role in the database
* *
@@ -259,22 +348,25 @@ class LoginController extends Controller
* @return text * @return text
*/ */
private function GetAccountType($refreshToken, $charId) { private function GetAccountType($refreshToken, $charId) {
//Declare some variables
$esiHelper = new Esi;
//Instantiate a new ESI isntance
$esi = $esiHelper->SetupEsiAuthentication();
//Set caching to null //Set caching to null
$configuration = Configuration::getInstance(); $configuration = Configuration::getInstance();
$configuration->cache = NullCache::class; $configuration->cache = NullCache::class;
// Instantiate a new ESI instance
$esi = new Eseye();
//Get the character information //Get the character information
$character_info = $esi->invoke('get', '/characters/{character_id}/', [ $character_info = $esiHelper->GetCharacterData($charId);
'character_id' => $charId,
]);
//Get the corporation information //Get the corporation information
$corp_info = $esi->invoke('get', '/corporations/{corporation_id}/', [ $corp_info = $esiHelper->GetCorporationData($character_info->corporation_id);
'corporation_id' => $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(); $legacy = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_id')->toArray();
$renter = AllowedLogin::where(['login_type' => 'Renter'])->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\Lookups\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,173 +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;
//Models
use App\User;
use App\Models\User\UserPermission;
use App\Models\Contracts\Contract;
use App\Models\Contracts\Bid;
use App\Models\Contracts\AcceptedBid;
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();
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;
$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';
while($mail->SendMail($bid['character_id'], 'character', $subject, $body)) {
$tries++;
if($tries == 5) {
TidyContract($contract, $bid);
return redirect('/contracts/admin/display')->with('error', 'Could not deliver mail. Please manually send the mail to the winner.');
}
}
TidyContract($contract, $bid);
return redirect('/contracts/admin/display')->with('success', 'Contract finalized. Mail took ' . $tries . ' attempt to send to the winner.');
}
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();
}
}

View File

@@ -1,316 +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\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;
//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'];
} else {
if($bid['bid_amount'] < $lowestBid) {
$lowestBid = $bid['bid_amount'];
$lowestCorp = $bid['corporation_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;
}
//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\Lookups\LookupHelper;
//Models
use App\Models\User\User;
use App\Models\Contracts\SupplyChainBid;
use App\Models\Contracts\SupplyChainContract;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
class SupplyChainController extends Controller
{
/**
* Constructor
*/
public function __construct() {
$this->middleware('auth');
$this->middleware('role:Renter');
}
/**
* 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>";
ProcessSendEveMailJob::dispatch($body, 145223267, 'mailing_list', $subject, $config['primary'])->onQueue('mail')->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;
ProcessSendEveMailJob::dispatch($body, 145223267, 'mailing_list', $subject, $config['primary'])->onQueue('mail')->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

@@ -5,16 +5,24 @@ namespace App\Http\Controllers\Dashboard;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use DB; use DB;
use Carbon\Carbon;
//Libraries //Libraries
use App\Library\Taxes\TaxesHelper; use App\Library\Taxes\TaxesHelper;
use App\Library\Wiki\WikiHelper;
use App\Library\Lookups\LookupHelper;
use App\Library\SRP\SRPHelper;
//Models //Models
use App\User; use App\Models\User\User;
use App\Models\User\UserRole; use App\Models\User\UserRole;
use App\Models\User\UserPermission; use App\Models\User\UserPermission;
use App\Models\User\AvailableUserPermission; use App\Models\User\AvailableUserPermission;
use App\Models\User\AvailableUserRole;
use App\Models\Admin\AllowedLogin; use App\Models\Admin\AllowedLogin;
use App\Models\Doku\DokuGroupNames;
use App\Models\Doku\DokuMember;
use App\Models\Doku\DokuUser;
class AdminController extends Controller class AdminController extends Controller
{ {
@@ -23,25 +31,141 @@ class AdminController extends Controller
$this->middleware('role:Admin'); $this->middleware('role:Admin');
} }
public function displayDashboard() { public function displayTestAdminDashboard() {
return view('admin.dashboards.testdashboard');
}
public function showJournalEntries() {
$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 2 MONTH) ORDER BY date DESC');
return view('admin.dashboards.walletjournal')->with('journal', $journal);
}
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 searchUsers(Request $request) {
//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);
}
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 displayTaxes() {
//Declare variables needed for displaying items on the page //Declare variables needed for displaying items on the page
$months = 3; $months = 3;
$pi = array(); $pi = array();
$industry = array(); $industry = array();
$reprocessing = array(); $reprocessing = array();
$office = array(); $office = array();
$user = array();
$permission = array();
$entities = array();
$corpId = 98287666; $corpId = 98287666;
$srpActual = array();
$srpLoss = array();
/** Taxes Pane */ /** Taxes Pane */
//Declare classes needed for displaying items on the page //Declare classes needed for displaying items on the page
$tHelper = new TaxesHelper(); $tHelper = new TaxesHelper();
$srpHelper = new SRPHelper();
//Get the dates for the tab panes //Get the dates for the tab panes
$dates = $tHelper->GetTimeFrameInMonths($months); $dates = $tHelper->GetTimeFrameInMonths($months);
//Get the data for the Taxes Pane //Get the data for the Taxes Pane
foreach($dates as $date) { 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 //Get the pi taxes for the date range
$pis[] = [ $pis[] = [
'date' => $date['start']->toFormattedDateString(), 'date' => $date['start']->toFormattedDateString(),
@@ -65,85 +189,79 @@ class AdminController extends Controller
//Get the market taxes for the date range //Get the market taxes for the date range
$markets[] = [ $markets[] = [
'date' => $date['start']->toFormattedDateString(), 'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetMarketGross($date['start'], $date['end']), 2, ".", ","), 'gross' => number_format($tHelper->GetAllianceMarketGross($date['start'], $date['end']), 2, ".", ","),
]; ];
//Get the jump gate taxes for the date range //Get the jump gate taxes for the date range
$jumpgates[] = [ $jumpgates[] = [
'date' => $date['start']->toFormattedDateString(), 'date' => $date['start']->toFormattedDateString(),
'gross' => number_format($tHelper->GetJumpGateGross($date['start'], $date['end']), 2, ".", ","), '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, ".", ","),
];
} }
/** Users & Permissions Pane */ return view('admin.dashboards.taxes')->with('pis', $pis)
//Get the users from the database to allow a selection of users for various parts of the webpage ->with('industrys', $industrys)
$users = User::pluck('name')->all(); ->with('offices', $offices)
//Get the available permissions from the database to allow a selection of permissions ->with('markets', $markets)
$permissions = AvailableUserPermission::pluck('permission')->all(); ->with('jumpgates', $jumpgates)
//Create the user key value pairs ->with('reprocessings', $reprocessings)
foreach($users as $key => $value) { ->with('srpActual', $srpActual)
$user[$value] = $value; ->with('srpLoss', $srpLoss);
} }
//Create the permission key value pairs
foreach($permissions as $key => $value) {
$permission[$value] = $value;
}
//Create the data array
$data = [
'users' => $user,
'permissions' => $permission,
];
/** Entities for allowed logins */ public function displayModifyUser(Request $request) {
$legacys = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_name')->toArray(); $permissions = array();
$renters = AllowedLogin::where(['login_type' => 'Renter'])->pluck('entity_name')->toArray();
//Compile a list of entities by their entity_id $name = $request->user;
foreach($legacys as $legacy) {
$entities[] = $legacy; //Get the user information from the name
} $user = User::where(['name' => $name])->first();
foreach($renters as $renter) {
$entities[] = $renter; $perms = AvailableUserPermission::all();
foreach($perms as $p) {
$permissions[$p->permission] = $p->permission;
} }
return view('admin.dashboard')->with('data', $data) $roles = AvailableUserRole::all();
->with('pis', $pis)
->with('industrys', $industrys) $role = $user->getRole();
->with('offices', $offices)
->with('markets', $markets) //Pass the user information to the page for hidden text entries
->with('jumpgates', $jumpgates) return view('admin.user.modify')->with('user', $user)
->with('reprocessings', $reprocessings) ->with('permissions', $permissions)
->with('entities', $entities) ->with('role', $role)
->with('pigross', $pigross); ->with('roles', $roles);
} }
public function modifyRole(Request $request) { public function modifyRole(Request $request) {
return redirect('/admin/dashboard')->with('error', 'Not implemented yet.'); $this->validate($request, [
'user' => 'required',
'role' => 'required|role!=None',
]);
UserRole::where(['character_id' => $user])->update([
'role' => $request->role,
]);
return redirect('/admin/dashboard/users')->with('success', "User: " . $user . " has been modified to a new role: " . $request->role . ".");
} }
public function addPermission(Request $request) { public function addPermission(Request $request) {
//Get the user and permission from the form //Get the user and permission from the form
$user = $request->user; $character = $request->user;
$permission = $request->permission; $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 to see if the character already has the permission
$check = UserPermission::where(['character_id' => $character[0]->character_id, 'permission' => $permission])->get(['permission']); $check = UserPermission::where(['character_id' => $character, 'permission' => $permission])->get(['permission']);
if(!isset($check[0]->permission)) { if(!isset($check[0]->permission)) {
$perm = new UserPermission; $perm = new UserPermission;
$perm->character_id = $character[0]->character_id; $perm->character_id = $character;
$perm->permission = $permission; $perm->permission = $permission;
$perm->save(); $perm->save();
return redirect('/admin/dashboard')->with('success', 'User udpated!'); return redirect('/admin/dashboard/users')->with('success', 'User udpated!');
} else { } else {
return redirect('/admin/dashboard')->with('error', 'User not updated or already has the permission.'); return redirect('/admin/dashboard/users')->with('error', 'User not updated or already has the permission.');
} }
} }
@@ -166,7 +284,7 @@ class AdminController extends Controller
//Delete the user from the user table //Delete the user from the user table
DB::table('users')->where(['character_id' => $data[0]->character_id])->delete(); DB::table('users')->where(['character_id' => $data[0]->character_id])->delete();
return redirect('/admin/dashboard')->with('success', 'User deleted from the site.'); return redirect('/admin/dashboard/users')->with('success', 'User deleted from the site.');
} }
public function addAllowedLogin(Request $request) { public function addAllowedLogin(Request $request) {
@@ -182,8 +300,8 @@ class AdminController extends Controller
$found = AllowedLogin::where([ $found = AllowedLogin::where([
'entity_type' => $request->allowedentityType, 'entity_type' => $request->allowedentityType,
'entity_name' => $request->allowedEntityName, 'entity_name' => $request->allowedEntityName,
])->get(); ])->count();
if($found != null) { if($found != 0) {
AllowedLogin::where([ AllowedLogin::where([
'entity_type' => $request->allowedEntityType, 'entity_type' => $request->allowedEntityType,
'entity_name' => $request->allowedEntityName, 'entity_name' => $request->allowedEntityName,
@@ -199,6 +317,7 @@ class AdminController extends Controller
$login->entity_name = $request->allowedEntityName; $login->entity_name = $request->allowedEntityName;
$login->entity_type = $request->allowedEntityType; $login->entity_type = $request->allowedEntityType;
$login->login_type = $request->allowedLoginType; $login->login_type = $request->allowedLoginType;
$login->save();
} }
return redirect('/admin/dashboard')->with('success', 'Entity added to allowed login list.'); return redirect('/admin/dashboard')->with('success', 'Entity added to allowed login list.');
@@ -216,4 +335,188 @@ class AdminController extends Controller
return redirect('/admin/dashboard')->with('success', 'Entity removed from allowed login list.'); return redirect('/admin/dashboard')->with('success', 'Entity removed from allowed login list.');
} }
/**
* Display the wiki dashboard for wiki functions
*/
public function displayWikiDashboard() {
//Declare some variables
$wikiUsers = array();
$wikiGroups = array();
$tempUsers = DokuUser::all();
$tempGroups = DokuGroupNames::all();
$wikiMembership = DokuMember::all();
//Create a list of users based on id and name for the select form
foreach($tempUsers as $temp) {
$wikiUsers[$temp->id] = $temp->name;
}
asort($wikiUsers);
foreach($tempGroups as $temp) {
$wikiGroups[$temp->id] = $temp->gname;
}
asort($wikiGroups);
return view('admin.dashboards.wiki')->with('wikiUsers', $wikiUsers)
->with('wikiGroups', $wikiGroups)
->with('wikiMembership', $wikiMembership);
}
/**
* Delete a wiki user
*/
public function deleteWikiUser(Request $request) {
$this->validate($request, [
'user' => 'required',
]);
//Declare helper variable
$wikiHelper = new WikiHelper;
$wikiHelper->DeleteWikiUser($request->user);
redirect('/admin/dashboard/wiki')->with('success', 'User: ' . $request->user . ' has been deleted.');
}
/**
* Add a group to a wiki user
*/
public function addWikiUserGroup(Request $request) {
$this->validate($request, [
'user' => 'required', //User Id number
'groupname' => 'required', //Group Id number
]);
//Declare some helper variables
$wikiHelper = new WikiHelper;
//Check to see if the user has the group we are going to add first
if($wikiHelper->UserHasGroup($request->user, $request->groupname)) {
return redirect('/admin/dashboard/wiki')->with('error', 'User already has the group.');
}
//Add the user to the wiki group
$results = $wikiHelper->AddUserToGroup($request->user, $request->groupname);
//Redirect based on the results of the add user to group function
if($results) {
return redirect('/admin/dashboard/wiki')->with('success', 'User added to group for the wiki.');
} else {
return redirect('/admin/dashboard/wiki')->with('error', 'Failed at add user to group, or user was already part of the group.');
}
}
/**
* Remove a group from a wiki user
*/
public function removeWikiUserGroup(Request $request) {
$this->validate($request, [
'user' => 'required',
'groupname' => 'required',
]);
//Declare some helper variables
$wikiHelper = new WikiHelper;
//Check to see if the user has the group we are going to remove them from
if(!$wikiHelper->UserHasGroup($request->user, $request->groupname)) {
return redirect('/admin/dashboard/wiki')->with('error', 'User does not have the group to remove.');
}
//Remove the user from the wiki group
$wikiHelper->RemoveUserFromGroup($request->user, $request->groupname);
return redirect('/admin/dashboard/wiki')->with('success', 'Removed user from group ' . $request->grouopname);
}
/**
* Remove a user from all wiki groups
*/
public function removeWikiUserAllGroups(Request $request) {
$this->validate($request, [
'user' => 'required',
]);
//Declare variable
$wikiHelper = new WikiHelper;
$wikiHelper->RemoveUserFromAllGroups($request->user);
return redirect('/admin/dashboard/wiki')->with('success', 'User successfully removed from all groups.');
}
/**
* Insert a new group for wiki user's to be added to
*/
public function insertNewWikiUserGroup(Request $request) {
$this->validate($request, [
'group' => 'required',
'description' => 'required',
]);
//Declare variable
$wikiHelper = new WikiHelper;
$wikiHelper->AddNewUserGroup($request->group, $request->description);
return redirect('/admin/dashboard/wiki')->with('success', 'Added new user group.');
}
public function purgeWikiUsers(Request $request) {
$this->validate($request, [
'admin' => 'required',
]);
//Declare helper classes
$lookup = new LookupHelper;
$wikiHelper = new WikiHelper;
//Get all of the users from the database
$users = User::all();
//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 = DokuUser::where(['name' => $user->name])->count();
//If the user is found, then check if they are allowed on the wiki.
//If the the count == 0, then the user wasn't found on the wiki, so do nothing.
if($count > 0) {
//If the user is not allowed, then delete the user, otherwise, leave the user untouched
if(!$wikiHelper->AllowedUser($user->name)) {
$uid = $wikiHelper->GetUID($user->name);
$wikiHelper->DeleteWikiUser($uid);
}
}
}
//Get all of the DokuUsers and verify against the Users on the services page
$users = DokuUser::all();
//Search the names and verify against the lookup table to find the corporation / alliance the user belongs to.
foreach($users as $user) {
//Lookup the character in the user table on the services page
$count = User::where(['name' => $user->name])->count();
//If the user is found, then check if they are allowed on the wiki.
//If the count == 0, then delete the user anyways
if($count > 0 ) {
//If the user is not allowed, then delete the user, otherwise, leave them alone.
if(!$wikiHelper->AllowedUser($user->name)) {
$uid = $wikiHelper->GetUID($user->name);
$wikiHelper->DeleteWikiUser($uid);
} else {
$wikiHelper->DeleteWikiUser($user->id);
}
}
}
return redirect('/admin/dashboard/wiki')->with('success', 'Wiki has been purged.');
}
} }

View File

@@ -0,0 +1,96 @@
<?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\Taxes\TaxesHelper;
use App\Library\Wiki\WikiHelper;
use App\Library\Lookups\LookupHelper;
use App\Library\SRP\SRPHelper;
//Models
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('moon.admin') || auth()->user()->hasPermission('srp.admin') || auth()->user()->hasPermission('contract.admin')) {
//Do nothing and continue on
} else {
redirect('/dashboard');
}
//Declare variables we will need
$tHelper = new TaxesHelper();
$srpHelper = new SRPHelper();
$days = 30;
$months = 1;
$lava = new Lavacharts;
//Get the dates for the information being requested
$dates = $tHelper->GetTimeFrameInMonths($months);
//Get the data for the sov expenses for a graph
//Setup the charts
//Setup the chart to be able the show the categories for income
/*
$iChart = $lava->DataTable();
$iChart->addStringColumn('Categories')
->addNumberColumn('ISK')
->addRow(['pi', $pi])
->addRow(['industry', $industry])
->addRow(['reprocessing', $reprocessing])
->addRow(['offices', $office])
->addRow(['industry', $industry])
->addRow(['market', $market])
->addRow(['gate', $gate])
->addRow(['iBuyback', $iBuyback])
->addRow(['renters', $renters])
->addRow(['ops', $ops]);
*/
//Setup the chart to be able to show the categories for expenses
/*
$eChart = $lava->DataTable();
$eCjart->addStringColumn('Categories')
->addNumberColumn('ISK')
->addRow(['sov', $sovBills])
->addRow(['srp', $srpActual])
->addRow(['maintenance', $maintenance])
->addRow(['wardecs', $wardecs])
->addRow(['fcs', $fcs])
->addRow(['keepstar_fuel', $keepstarFuel])
->addRow(['fortizar_fuel', $fortizarFuel])
->addRow(['astrahus_fuel', $astrahusFuel])
->addRow(['sotiyo_fuel', $sotiyoFuel])
->addRow(['azbel_fuel', $azbelFuel])
->addRow(['raitaru_fuel', $raitaruFuel])
->addRow(['beacon_fuel', $beaconFuel])
->addRow(['bridge_fuel', $bridgeFuel])
->addRow(['jammer_fuel', $jammerFuel]);
*/
return view('admin.dashboards.dashboard');
}
}

View File

@@ -2,15 +2,21 @@
namespace App\Http\Controllers\Dashboard; namespace App\Http\Controllers\Dashboard;
//Internal Libraries
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Khill\Lavacharts\Lavacharts;
use Carbon\Carbon;
//Models
use App\Models\Esi\EsiScope; use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken; use App\Models\Esi\EsiToken;
use App\Models\User\UserPermission; use App\Models\User\UserPermission;
use App\Models\User\UserRole; use App\Models\User\UserRole;
use App\Models\SRP\SRPShip;
use App\Models\User\UserAlt;
class DashboardController extends Controller class DashboardController extends Controller
{ {
@@ -32,7 +38,159 @@ class DashboardController extends Controller
*/ */
public function index() public function index()
{ {
return view('dashboard'); //Set some variables to be used in if statements
$open = array();
$approved = array();
$denied = array();
$altCount = null;
$alts = null;
//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();
//If the alt count is greater than 0 get all of the alt accounts
if($altCount > 0) {
$alts = UserAlt::where([
'main_id' => auth()->user()->character_id,
])->get();
}
//See if we can get all of the open SRP requests
$openCount = SRPShip::where([
'character_id' => auth()->user()->character_id,
'approved' => 'Under Review',
])->count();
if($openCount > 0) {
$open = SRPShip::where([
'character_id' => auth()->user()->character_id,
'approved' => 'Under Review'
])->get()->toArray();
}
//See if we can get all of the closed and approved SRP requests
$approvedCount = SRPShip::where([
'character_id' => auth()->user()->character_id,
'approved' => 'Approved',
])->count();
if($approvedCount > 0) {
$approved = SRPShip::where([
'character_id' => auth()->user()->character_id,
'approved' => 'Approved',
])->take(10)->get()->toArray();
}
//See if we can get all of the closed and denied SRP requests
$deniedCount = SRPShip::where([
'character_id' => auth()->user()->character_id,
'approved' => 'Denied',
])->count();
if($deniedCount > 0) {
$denied = SRPShip::where([
'character_id' => auth()->user()->character_id,
'approved' => 'Denied',
])->take(10)->get()->toArray();
}
//Process all types of srp requests for the alt of the main and add to the main's page
if($altCount > 0) {
//For each alt, get the open requests, and increment the open request counter
foreach($alts as $alt) {
$altOpenCount = SRPShip::where([
'character_id' => $alt->character_id,
'approved' => 'Under Review',
])->count();
if($altOpenCount > 0) {
//If the number of open requests is greater than zero, add to the open count
$openCount += $altOpenCount;
//Get the alt's open srp requests
$altOpen = SRPShip::where([
'character_id' => $alt->character_id,
'approved' => 'Under Review',
])->get()->toArray();
//Add the alt's open requests to the open requests array
foreach($altOpen as $aOpen) {
array_push($open, $aOpen);
}
}
$altApprovedCount = SRPShip::where([
'character_id' => $alt->character_id,
'approved' => 'Approved',
])->count();
if($altApprovedCount > 0) {
//If the number of approved requests is greater than zero, add to the approved count
$approvedCount += $altApprovedCount;
//Get the alt's approved srp request
$altApproved = SRPShip::where([
'character_id' => $alt->character_id,
'approved' => 'Approved',
])->take(5)->get()->toArray();
//For each alt add it to the array
foreach($altApproved as $aApproved) {
array_push($approved, $aApproved);
}
}
$altDeniedCount = SRPShip::where([
'character_id' => $alt->character_id,
'approved' => 'Denied',
])->count();
if($altDeniedCount > 0) {
//If the denied count is greater then zero for the alt, add it to the count
$deniedCount += $altDeniedCount;
//Get the denied alt's srp requests
$altDenied = SRPShip::where([
'character_id' => $alt->character_id,
'approved' => 'Denied',
])->take(5)->get()->toArray();
//For each alt's denied request add it to the array
foreach($altDenied as $aDenied) {
array_push($denied, $aDenied);
}
}
}
}
//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')
->addNumberColumn('Number')
->addRow(['SRP', $openCount]);
$lava->GaugeChart('SRP', $adur, [
'width' => 200,
'max' => 15,
'greenFrom' => 0,
'greenTo' => 5,
'yellowFrom' => 5,
'yellowTo' => 10,
'redFrom' => 10,
'redTo' => 15,
'majorTicks' => [
'Safe',
'Warning',
'Critical',
],
]);
return view('dashboard')->with('openCount', $openCount)
->with('approvedCount', $approvedCount)
->with('deniedCount', $deniedCount)
->with('open', $open)
->with('approved', $approved)
->with('denied', $denied)
->with('lava', $lava);
} }
/** /**
@@ -42,16 +200,57 @@ class DashboardController extends Controller
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function profile() { public function profile() {
$scopes = EsiScope::where('character_id', Auth()->user()->character_id)->get(); //Declare some variables
$permissions = UserPermission::where('character_id', Auth()->user()->characer_id)->get(); $alts = null;
$roles = UserRole::where('character_id', Auth()->user()->character_id)->get(); $scopes = null;
$permissions = null;
$data = [ $roles = null;
'scopes' => $scopes,
'permissions' => $permissions,
'roles' => $roles,
];
return view('dashboard.profile')->with('data', $data); //Get the Esi scopes, user permission set, and roles
$scopeCount = EsiScope::where('character_id', Auth()->user()->character_id)->count();
if($scopeCount > 0) {
$scopes = EsiScope::where('character_id', Auth()->user()->character_id)->get();
}
//Get the permission count and permission of the user
$permissionCount = UserPermission::where('character_id', auth()->user()->character_id)->count();
if($permissionCount > 0) {
$permissions = UserPermission::where('character_id', auth()->user()->character_id)->get();
}
//Get the roles and role count of the user
$roleCount = UserRole::where('character_id', Auth()->user()->character_id)->count();
if($roleCount > 0) {
$roles = UserRole::where('character_id', Auth()->user()->character_id)->get();
}
//Get the alt count and alts of the user
$altCount = UserAlt::where('main_id', Auth()->user()->character_id)->count();
if($altCount > 0) {
$alts = UserAlt::where(['main_id' => Auth()->user()->character_id])->get();
}
//Return the view with that data
return view('dashboard.profile')->with('scopeCount', $scopeCount)
->with('scopes', $scopes)
->with('permissionCount', $permissionCount)
->with('permissions', $permissions)
->with('roleCount', $roleCount)
->with('roles', $roles)
->with('altCount', $altCount)
->with('alts', $alts);
}
public function removeAlt(Request $request) {
$this->validate($request, [
'character' => 'required',
]);
UserAlt::where([
'main_id' => auth()->user()->character_id,
'character_id' => $request->character,
])->delete();
return redirect('/dashboard');
} }
} }

View File

@@ -0,0 +1,400 @@
<?php
namespace App\Http\Controllers\Dashboard;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Carbon\Carbon;
use Khill\Lavacharts\Lavacharts;
//Libraries
use App\Library\Taxes\TaxesHelper;
use App\Library\Lookups\LookupHelper;
use App\Library\SRP\SRPHelper;
//Models
use App\Models\User\User;
use App\Models\Doku\DokuGroupNames;
use App\Models\Doku\DokuMember;
use App\Models\Doku\DokuUser;
use App\Models\SRP\SrpFleetType;
use App\Models\SRP\SRPShip;
use App\Models\SRP\SrpShipType;
use App\Models\SRP\SrpPayout;
class StatisticsController extends Controller
{
/**
* Create a new controller instance
*
* @return void
*/
public function __construct() {
$this->middleware('auth');
}
/**
* Display Jump Bridge Statistics
*/
public function displayJumpBridgeStatistics() {
$this->middleware('role:Admin');
$lava = new Lavacharts;
}
/**
* Display Taxes Statistics
*/
public function displayTaxes() {
$this->middleware('role:Admin');
//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;
$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, ".", ","),
];
}
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);
}
/**
* Display wiki statistics
*/
public function displayWikiStatistics() {
$this->middleware('role:Admin');
}
/**
* Display SRP Statistics
*/
public function displaySRPStatistics() {
$months = 3;
$barChartData = array();
$start = Carbon::now()->toDateTimeString();
$end = Carbon::now()->subMonths(1)->toDateTimeString();
//Declare the Lavacharts variable
$lava = new Lavacharts;
//We need a function from this library rather than recreating a new library
$srpHelper = new SRPHelper();
/**
* Pie chart for the number of approved, denied, and under review payouts currently in the system.
*/
//Get the count of open srp requests
$pieOpen = SRPShip::where([
'approved' => 'Under Review',
['created_at', '>=', $end],
])->count();
//Get the count of approved srp requests
$pieApproved = SRPShip::where([
'approved' => 'Approved',
['created_at', '>=', $end],
])->count();
//Get the count of denied srp requests
$pieDenied = SRPShip::where([
'approved' => 'Denied',
['created_at', '>=', $end],
])->count();
//Create a new datatable for the lavachart.
$srp = $lava->DataTable();
//Add string columns, number columns, and data rows for the chart
$srp->addStringColumn('ISK Value')
->addNumberColumn('ISK')
->addRow(['Approved', $pieApproved])
->addRow(['Denied', $pieDenied])
->addRow(['Under Review', $pieOpen]);
//Create the pie chart in memory with any options needed to render the chart
$lava->PieChart('SRP Stats', $srp, [
'title' => 'SRP Stats',
'is3D' => true,
]);
/**
* Gauage chart for showing number of open srp requests
*/
//Create a new datatable in the
$adur = $lava->DataTable();
//Add string columns, number columns, and data row for the chart
$adur->addStringColumn('Type')
->addNumberColumn('Value')
->addRow(['Under Review', $pieOpen]);
//Create the gauge chart with any options needed to render the chart
$lava->GaugeChart('SRP', $adur, [
'width' => 400,
'greenFrom' => 0,
'greenTo' => 20,
'yellowFrom' => 20,
'yellowTo' => 40,
'redFrom' => 40,
'redTo' => 100,
'majorTicks' => [
'Safe',
'Critical',
],
]);
/**
* Create a vertical chart of all of the cost codes for the ships being SRP'ed.
* The chart will be by cost code of ships being replaced
*/
//Declare the data table
$costCodeChart = $lava->DataTable();
//Get the approved, under review, and denied cost codes and amounts
$t1fdcApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T1FDC',
])->sum('paid_value');
$t1fdcUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T1FDC',
])->sum('loss_value');
$t1fdcDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T1FDC',
])->sum('loss_value');
$t1bcApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T1BC',
])->sum('paid_value');
$t1bcUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T1BC',
])->sum('loss_value');
$t1bcDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T1BC',
])->sum('loss_value');
$t2fdApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T2FD',
])->sum('paid_value');
$t2fdUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T2FD',
])->sum('loss_value');
$t2fdDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T2FD',
])->sum('loss_value');
$t3dApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T3D',
])->sum('paid_value');
$t3dUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T3D',
])->sum('loss_value');
$t3dDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T3D',
])->sum('loss_value');
$t1t2logiApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T1T2Logi',
])->sum('paid_value');
$t1t2logiUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T1T2Logi',
])->sum('loss_value');
$t1t2logiDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T1T2Logi',
])->sum('loss_value');
$reconsApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'REC',
])->sum('paid_value');
$reconsUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'REC',
])->sum('loss_value');
$reconsDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'REC',
])->sum('loss_value');
$t2cApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T2C',
])->sum('paid_value');
$t2cUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T2C',
])->sum('loss_value');
$t2cDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T2C',
])->sum('loss_value');
$t3cApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T3C',
])->sum('paid_value');
$t3cUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T3C',
])->sum('loss_value');
$t3cDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T3C',
])->sum('loss_value');
$commandApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'COM',
])->sum('paid_value');
$commandUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'COM',
])->sum('loss_value');
$commandDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'COM',
])->sum('loss_value');
$interdictorApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'INTD',
])->sum('paid_value');
$interdictorUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'INTD',
])->sum('loss_value');
$interdictorDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'INTD',
])->sum('loss_value');
$t1bsApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T1BS',
])->sum('paid_value');
$t1bsUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T1BS',
])->sum('loss_value');
$t1bsDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T1BS',
])->sum('loss_value');
$dksApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'DKS',
])->sum('paid_value');
$dksUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'DKS',
])->sum('loss_value');
$dksDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'DKS',
])->sum('loss_value');
//Add string column, number columns.
$costCodeChart->addStringColumn('SRP Costs')
->addNumberColumn('Approved')
->addNumberColumn('Under Review')
->addNumberColumn('Denied')
->addRow(['T1FDC', $t1fdcApproved, $t1fdcUnderReview, $t1fdcDenied])
->addRow(['T1BC', $t1bcApproved, $t1bcUnderReview, $t1bcDenied])
->addRow(['T1BS', $t1bsApproved, $t1bsUnderReview, $t1bsDenied])
->addRow(['T2FD', $t2fdApproved, $t2fdUnderReview, $t2fdDenied])
->addRow(['T2C', $t2cApproved, $t2cUnderReview, $t2cDenied])
->addRow(['T1T2Logi', $t1t2logiApproved, $t1t2logiUnderReview, $t1t2logiDenied])
->addRow(['T3D', $t3dApproved, $t3dUnderReview, $t3dDenied])
->addRow(['T3C', $t3cApproved, $t3cUnderReview, $t3cDenied])
->addRow(['RECON', $reconsApproved, $reconsUnderReview, $reconsDenied])
->addRow(['COMMAND', $commandApproved, $commandUnderReview, $commandDenied])
->addRow(['DKS', $dksApproved, $dksUnderReview, $dksDenied]);
$lava->ColumnChart('Cost Codes', $costCodeChart, [
'columns' => 4,
'title' => 'Cost Code SRP Chart',
'titleTextStyle' => [
'color' => '#eb6b2c',
'fontSize' => 14,
],
]);
return view('srp.admin.statistics')->with('lava', $lava);
}
}

View File

@@ -0,0 +1,148 @@
<?php
namespace App\Http\Controllers\Flex;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
use DB;
use Carbon\Carbon;
//Models
use App\Models\Flex\FlexStructure;
//Library
use App\Library\Lookups\LookupHelper;
use App\Library\Esi\Esi;
class FlexAdminController extends Controller
{
//Constructor
public function __construct() {
$this->middleware('auth');
$this->middleware('role:Admin');
}
/**
* Function to display all active flex structures and
* the information regarding the flex structure
*/
public function displayFlexStructures() {
//Get the structures from the database
$structures = FlexStructure::all();
//Return the view with the data
return view('flex.list')->with('structures', $structures);
}
/**
* Function to display form for adding new flex structure
*/
public function displayAddFlexStructure() {
return view('flex.add');
}
/**
* Function to add new flex structure to the database
*/
public function addFlexStructure(Request $request) {
$this->validate($request, [
'requestor_name' => 'required',
'requestor_corp_name' => 'required',
'system' => 'required',
'structure_type' => 'required',
'structure_cost' => 'required',
]);
//Delcare variables and classes
$lookup = new LookupHelper;
//From the character name find the character id
$charId = $lookup->CharacterNameToId($request->requestor_name);
//From the corporation name find the corporation id
$corpId = $lookup->CorporationNameToId($request->requestor_corp_name);
//From the system name find the system id
$systemId = $lookup->SystemNameToId($request->system);
//Create the database model
$flex = new FlexStructure;
$flex->requestor_id = $charId;
$flex->requestor_name = $request->requestor_name;
$flex->requestor_corp_id = $corpId;
$flex->requestor_corp_name = $request->requestor_corp_name;
$flex->system_id = $systemId;
$flex->system = $request->system;
$flex->structure_type = $request->structure_type;
$flex->structure_cost = $request->structure_cost;
if(isset($request->paid_until)) {
$flex->paid_until = $request->paid_until;
}
$flex->save();
return redirect('/flex/display')->with('success', 'Flex Structure Added.');
}
/**
* Function to update paid until section of the flex structure in the database
*/
public function updateFlexStructure(Request $request) {
$this->validate($request, [
'paid_until' => 'required',
'requestor_id' => 'required',
'requestor_corp_id' => 'required',
'system_id' => 'required',
'structure_type' => 'required',
]);
FlexStructure::where([
'requestor_id' => $request->requestor_id,
'requestor_corp_id' => $request->requestor_corp_id,
'system_id' => $request->system_id,
'structure_type' => $request->structure_type,
])->update([
'paid_until' => $request->paid_until,
]);
return redirect('/flex/display')->with('success', 'Flex Structure Updated.');
}
/**
* Funciton to remove flex structure from the database
*/
public function removeFlexStructure(Request $request) {
$this->validate($request, [
'requestor_id' => 'required',
'requestor_corp_id' => 'required',
'system_id' => 'required',
'structure_type' => 'required',
]);
$count = FlexStructure::where([
'requestor_id' => $request->requestor_id,
'requestor_corp_id' => $request->requestor_corp_id,
'system_id' => $request->system_id,
'structure_type' => $request->structure_type,
])->count();
if($count > 0) {
FlexStructure::where([
'requestor_id' => $request->requestor_id,
'requestor_corp_id' => $request->requestor_corp_id,
'system_id' => $request->system_id,
'structure_type' => $request->structure_type,
])->delete();
return redirect('/flex/display')->with('success', 'Flex Structure Entry Removed.');
} else {
return redirect('/flex/display')->with('error', 'Could not find flex structure to delete.');
}
}
}

View File

@@ -0,0 +1,86 @@
<?php
namespace App\Http\Controllers\Logistics;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
use Log;
use Carbon\Carbon;
use Khill\Lavacharts\Lavacharts;
use Auth;
use Charts;
//Library Helpers
use App\Library\Assets\AssetHelper;
use App\Library\Structures\StructureHelper;
//Models
use App\Models\Structure\Structure;
class FuelController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
}
public function displayStructures() {
//Declare variables
$jumpGates = array();
$lava = new Lavacharts;
//Declare the class helpers
$sHelper = new StructureHelper(null, null, null);
$aHelper = new AssetHelper(null, null, null);
//Setup the charts
$gauge = $lava->DataTable();
$gauge->addStringColumn('Fuel')
->addNumberColumn('Units');
//Get all of the jump gates
$gates = $sHelper->GetStructuresByType('Ansiblex Jump Gate');
foreach($gates as $gate) {
$liquidOzone = $aHelper->GetAssetByType(16273, $gate->structure_id);
$temp = [
'name' => $gate->structure_name,
'system' => $gate->solar_system_name,
'fuel_expires' => $gate->fuel_expires,
'liquid_ozone' => $liquidOzone,
'link' => '/logistics/fuel/display/' . $gate->structure_id . '/',
];
array_push($jumpGates, $temp);
if($liquidOzone > 1000000) {
$liquidOzone = 1000000;
}
$gauge->addRow([$gate->solar_system_name, $liquidOzone]);
}
$lava->GaugeChart('Liquid Ozone', $gauge, [
'min' => 0,
'max' => 1000000,
'greenFrom' => 0,
'greenTo' => 150000,
'greenColor' => '#DC3912',
'yellowFrom' => 150000,
'yellowTo' => 300000,
'yellowColor' => '#FF9900',
'redFrom' => 300000,
'redTo' => 1000000,
'redColor' => '#109618',
'majorTicks' => [
'Empty',
'Full',
],
]);
return view('logistics.fuel')->with('jumpGates', $jumpGates)
->with('lava', $lava);
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Http\Controllers\Logistics;
//Internal Libraries
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Log;
//Models
use App\Models\Logistics\AnchorStructure;
class StructureRequestAdminController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('permission:fc.team');
}
public function displayRequests() {
$reqs = AnchorStructure::all();
return view('structurerequest.display.structurerequests')->with('reqs', $reqs);
}
public function deleteRequest(Request $request) {
$this->validate($request, [
'id' => 'required',
]);
AnchorStructure::where([
'id' => $request->id,
])->delete();
return redirect('/structures/display/requests');
}
}

View File

@@ -0,0 +1,83 @@
<?php
namespace App\Http\Controllers\Logistics;
//Internal Libraries
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Log;
use Carbon\Carbon;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
//Library Helpers
use App\Library\Lookups\LookupHelper;
//Models
use App\Models\Logistics\AnchorStructure;
use App\Models\User\UserPermission;
class StructureRequestController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
}
public function displayForm() {
return view('structurerequest.requeststructure');
}
public function storeForm(Request $request) {
$this->validate($request, [
'corporation_name' => 'required',
'system' => 'required',
'structure_size' => 'required',
'structure_type' => 'required',
'requested_drop_time' => 'required',
'requester' => 'required',
]);
$lookup = new LookupHelper;
$config = config('esi');
$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,
]);
//Send a mail out to the FC Team
$fcTeam = UserPermission::where([
'permission' => 'fc.team',
])->get();
//Set the mail delay
$delay = 30;
foreach($fcTeam as $fc) {
$body = "Structure Anchor Request has been entered.<br>";
$body .= "Please check the W4RP Services Site for the structure information.<br>";
$body .= "<br>Sincerely,<br>";
$body .= "Warped Intentions Leadership<br>";
//Dispatch the mail job
$subject = "New Structure Anchor Request";
ProcessSendEveMailJob::dispatch($body, (int)$fc->character_id, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds($delay));
$delay += 30;
}
return redirect('/dashboard')->with('success', 'Structure request successfully submitted.');
}
}

View File

@@ -0,0 +1,239 @@
<?php
namespace App\Http\Controllers\Moons;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Log;
use Carbon\Carbon;
//App Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Structures\StructureHelper;
use App\Library\Lookups\LookupHelper;
//App Models
use App\Models\Esi\EsiToken;
use App\Models\Esi\EsiScope;
use App\Models\Lookups\ItemLookup;
use App\Models\MoonRentals\AllianceRentalMoon;
use App\Models\Moon\RentalMoon;
use App\Models\Moon\CorpObserversRegistered;
use App\Models\Moon\CorpMoonObserver;
class MoonLedgerController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
}
public function displayMoonLedgerNew() {
}
public function displayMoonLedger() {
//Declare variables
$structures = array();
$miningLedgers = array();
$tempMiningLedger = array();
$tempMining = array();
$esiHelper = new Esi;
$lookup = new LookupHelper;
$response = null;
$structureInfo = null;
//Check for the esi scope
if(!$esiHelper->HaveEsiScope(auth()->user()->getId(), 'esi-industry.read_corporation_mining.v1')) {
return redirect('/dashboard')->with('error', 'Need to add scopes for esi-industry.read_corporation_mining.v1');
} else {
if(!$esiHelper->HaveEsiScope(auth()->user()->getId(), 'esi-universe.read_structures.v1')) {
return redirect('/dashboard')->with('error', 'Need to add scope for esi-universe.read_structures.v1');
}
}
//Get the refresh token if scope checks have passed
$refreshToken = $esiHelper->GetRefreshToken(auth()->user()->getId());
//Setup the esi container
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Get the character data from the lookup table if possible or esi
$character = $lookup->GetCharacterInfo(auth()->user()->getId());
//Try to get the mining observers for the corporation from esi
try {
$responses = $esi->invoke('get', '/corporation/{corporation_id}/mining/observers/', [
'corporation_id' => $character->corporation_id,
]);
} catch(RequestFailedException $e) {
//If an exception has occurred for some reason redirect back to the dashboard with an error message
return redirect('/dashboard')->with('error', 'Failed to get mining structures.');
}
//For each mining observer, let's build the array of data to show on the page
foreach($responses as $response) {
//Try to get the structure information from esi
try {
$structureInfo = $esi->invoke('get', '/universe/structures/{structure_id}/', [
'structure_id' => $response->observer_id,
]);
} catch(RequestFailedException $e) {
//If an exception has occurred, then do nothing
}
//We don't really care about the key, but it is better than just 0 through whatever number
$structures[$response->observer_id] = $structureInfo->name;
}
//For each of the structures we want to address it by it's key value pair.
//This will allow us to do some interesting things in the display.
foreach($structures as $key => $value) {
try {
$ledgers = $esi->invoke('get', '/corporation/{corporation_id}/mining/observers/{observer_id}/', [
'corporation_id' => $character->corporation_id,
'observer_id' => $key,
]);
} catch(RequestFailedException $e) {
$ledgers = null;
}
if($ledgers != null) {
foreach($ledgers as $ledger) {
//Declare a variable that will need to be cleared each time the foreach processes
$tempArray = array();
//Get the character information from the character id
$charInfo = $lookup->GetCharacterInfo($ledger->character_id);
//Get the corp ticker
$corpInfo = $lookup->GetCorporationInfo($charInfo->corporation_id);
//Get the ore name from the type id
$ore = $lookup->ItemIdToName($ledger->type_id);
//We only want to push the mining ledger entry into the array if it matches
//the date within 30 days
$sortTime = Carbon::now()->subDays(30);
$current = Carbon::createFromFormat('Y-m-d', $ledger->last_updated);
if($current->greaterThanOrEqualTo($sortTime)) {
array_push($miningLedgers, [
'structure' => $value,
'character' => $charInfo->name,
'corpTicker' => $corpInfo->ticker,
'ore' => $ore,
'quantity' => $ledger->quantity,
'updated' => $ledger->last_updated,
]);
}
}
}
}
return view('moons.ledger.displayledger')->with('miningLedgers', $miningLedgers)
->with('structures', $structures);
}
public function displayRentalMoonLedger() {
//Declare variables
$structures = array();
$miningLedgers = array();
$tempMiningLedger = array();
$tempMining = array();
$esiHelper = new Esi;
$lookup = new LookupHelper;
$response = null;
$structureInfo = null;
//Get the configuration for the main site
$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.');
} 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.');
}
}
//Get the refresh token if scope checks have passed
$refreshToken = $esiHelper->GetRefreshToken($config['primary']);
//Setup the esi container
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Get the character data from the lookup table if possible or esi
$character = $lookup->GetCharacterInfo($config['primary']);
//Try to get the mining observers for the corporation from esi
try {
$responses = $esi->invoke('get', '/corporation/{corporation_id}/mining/observers/', [
'corporation_id' => $character->corporation_id,
]);
} catch(RequestFailedException $e) {
//If an exception has occurred for some reason redirect back to the dashboard with an error message
return redirect('/dashboard')->with('error', 'Failed to get mining structures.');
}
//For each mining observer, let's build the array of data to show on the page
foreach($responses as $response) {
//Try to get the structure information from esi
try {
$structureInfo = $esi->invoke('get', '/universe/structures/{structure_id}/', [
'structure_id' => $response->observer_id,
]);
} catch(RequestFailedException $e) {
//If an exception has occurred, then do nothing
}
//We don't really care about the key, but it is better than just 0 through whatever number
$structures[$response->observer_id] = $structureInfo->name;
}
//For each of the structures we want to address it by it's key value pair.
//This will allow us to do some interesting things in the display.
foreach($structures as $key => $value) {
try {
$ledgers = $esi->invoke('get', '/corporation/{corporation_id}/mining/observers/{observer_id}/', [
'corporation_id' => $character->corporation_id,
'observer_id' => $key,
]);
} catch(RequestFailedException $e) {
$ledgers = null;
}
if($ledgers != null) {
foreach($ledgers as $ledger) {
//Declare a variable that will need to be cleared each time the foreach processes
$tempArray = array();
//Get the character information from the character id
$charInfo = $lookup->GetCharacterInfo($ledger->character_id);
//Get the corp ticker
$corpInfo = $lookup->GetCorporationInfo($charInfo->corporation_id);
//Get the ore name from the type id
$ore = $lookup->ItemIdToName($ledger->type_id);
//We only want to push the mining ledger entry into the array if it matches
//the date within 30 days
$sortTime = Carbon::now()->subDays(30);
$current = Carbon::createFromFormat('Y-m-d', $ledger->last_updated);
if($current->greaterThanOrEqualTo($sortTime)) {
array_push($miningLedgers, [
'structure' => $value,
'character' => $charInfo->name,
'corpTicker' => $corpInfo->ticker,
'ore' => $ore,
'quantity' => $ledger->quantity,
'updated' => $ledger->last_updated,
]);
}
}
}
}
return view('moons.ledger.rentalledger')->with('miningLedgers', $miningLedgers)
->with('structures', $structures);
}
}

View File

@@ -6,415 +6,590 @@ namespace App\Http\Controllers\Moons;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Auth; use Auth;
use DB;
use Carbon\Carbon; use Carbon\Carbon;
use Log;
//Models //Models
use App\Models\Moon\Config; use App\Models\Moon\Config;
use App\Models\Moon\ItemComposition; use App\Models\Moon\ItemComposition;
use App\Models\Moon\Moon; use App\Models\Moon\RentalMoon;
use App\Models\Moon\OrePrice; use App\Models\Moon\OrePrice;
use App\Models\Moon\Price; use App\Models\Moon\Price;
use App\Models\MoonRent\MoonRental; use App\Models\Moon\AllianceMoon;
use App\Models\MoonRentals\AllianceRentalMoon;
use App\Models\Moon\AllianceMoonRequest;
//Library //Library
use App\Library\Moons\MoonCalc; use App\Library\Moons\MoonCalc;
use App\Library\Esi\Esi; use App\Library\Esi\Esi;
use App\Library\Lookups\LookupHelper; use App\Library\Lookups\LookupHelper;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
class MoonsAdminController extends Controller class MoonsAdminController extends Controller
{ {
/**
* Variable for the class
*/
private $romans = [
'M' => 1000,
'CM' => 900,
'D' => 500,
'CD' => 400,
'C' => 100,
'XC' => 90,
'L' => 50,
'XL' => 40,
'X' => 10,
'IX' => 9,
'V' => 5,
'IV' => 4,
'I' => 1,
];
/**
* Constructor for the class
*/
public function __construct() { public function __construct() {
$this->middleware('auth'); $this->middleware('auth');
$this->middleware('role:Admin'); $this->middleware('role:Admin');
} }
public function showJournalEntries() { /**
$dateInit = Carbon::now(); * Function to display moon requests
$date = $dateInit->subDays(30); */
public function displayMoonRequests() {
$requests = AllianceMoonRequest::where([
'status' => 'Pending',
])->get();
$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.moonrequest')->with('requests', $requests);
return view('moons.admin.moonjournal')->with('journal', $journal);
} }
public function updateMoon() { /**
//Return the view and the form from the blade display * Function to approve a moon request
return view('moons.admin.updatemoon'); */
} public function storeApprovedMoonRequest(Request $request) {
//Validate the input request
public function storeUpdateMoonRental(Request $request) {
$moonCalc = new MoonCalc;
$lookup = new LookupHelper;
$this->validate($request, [ $this->validate($request, [
'id' => 'required',
'status' => 'required',
'system' => 'required', 'system' => 'required',
'planet' => 'required', 'planet' => 'required',
'moon' => 'required', 'moon' => 'required',
'renter' => 'required',
'date' => 'required',
'contact' => 'required',
]); ]);
//Take the contact name and create a character_id from it
if($request->contact == 'None') { //Get the request data which holds all of the information for the request user
$contact = 'None'; $moon = AllianceMoonRequest::where([
} else { 'id' => $request->id,
$contact = $lookup->CharacterNameToId($request->contact);
}
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');
$found = MoonRental::where([
'System' => $request->system,
'Planet' => $request->planet,
'Moon' => $request->moon,
'Contact' => $contact,
])->first(); ])->first();
//If the entry is found, we are most likely just updating an entry to include new paid until data //Get the configuration data to use later in the function
if($found) { $config = config('esi');
if($allianceId = 99004116) {
MoonRental::where([ //If the request is approved, then update everything.
'System' => $request->system, if($request->status == 'Approved') {
'Planet' => $request->planet, //Update the alliance moon request to either approved or denied
'Moon' => $request->moon, AllianceMoonRequest::where([
'Contact' => $contact, 'id' => $request->id,
])->update([ ])->update([
'System' => $request->system, 'status' => $request->status,
'Planet' => $request->planet, 'approver_name' => auth()->user()->getName(),
'Moon' => $request->moon, 'approver_id' => auth()->user()->getId(),
'RentalCorp' => $request->renter, ]);
'RentalEnd' => $date,
'Contact' => $contact, //Update the alliance moon in the table to the correct status
'Price' => $price['alliance'], AllianceMoon::where([
'Type' => 'alliance',
'Paid' => $paid,
'Paid_Until' => $request->paid_until,
]);
} else {
MoonRental::where([
'System' => $request->system,
'Planet' => $request->planet,
'Moon' => $request->moon,
'Contact' => $contact,
])->update([
'System' => $request->system,
'Planet' => $request->planet,
'Moon' => $request->moon,
'RentalCorp' => $request->renter,
'RentalEnd' => $date,
'Contact' => $contact,
'Price' => $price['outofalliance'],
'Type' => 'alliance',
'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' => $request->system, 'System' => $request->system,
'Planet' => $request->planet, 'Planet' => $request->planet,
'Moon' => $request->moon, 'Moon' => $request->moon,
])->delete(); ])->update([
'Corporation' => $moon->corporation_ticker,
'Availability' => 'Deployed',
]);
//Send an eve mail to the requestor stating they can set a moon up.
//Setup the mail body
$body = 'The moon request for ' . $request->system . ' - ' . $request->planet . ' - ' . $request->moon . ' has changed status.<br>';
$body .= 'The request has been ' . $request->status . '.<br>';
$body .= 'Please contact the FC Team should it be necessary to arrange a fleet to cover the structure drop.<br>';
$body .= 'Sincerely,<br>';
$body .= 'Warped Intentions Leadership<br>';
} else {
//If the status was Denied, then update the request, and mark the moon available again.
AllianceMoonRequest::where([
'id' => $request->id,
])->update([
'status' => $request->status,
'approver_name' => auth()->user()->getName(),
'approver_id' => auth()->user()->getId(),
]);
//Update the alliance moon in the table to the correct status
AllianceMoon::where([
'System' => (string)$request->system,
'Planet' => (string)$request->planet,
'Moon' => (string)$request->moon,
])->update([
'Availability' => 'Available',
]);
//Send an eve mail to the requestor stating they can set a moon up.
//Setup the mail body
$body = 'The moon request for ' . $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon . ' has changed status.<br>';
$body .= 'The request has been ' . $request->status . '.<br>';
$body .= 'Should you have questions please contact alliance leadership for further clarification.<br>';
$body .= 'Sincerely,<br>';
$body .= 'Warped Intentions Leadership<br>';
if($allianceId = 99004116) {
MoonRental::insert([
'System' => $request->system,
'Planet' => $request->planet,
'Moon' => $request->moon,
'RentalCorp' => $request->renter,
'RentalEnd' => $date,
'Contact' => $contact,
'Price' => $price['alliance'],
'Type' => 'alliance',
'Paid' => 'No',
]);
} else {
MoonRental::insert([
'System' =>$request->system,
'Planet' => $request->planet,
'Moon' => $request->moon,
'RentalCorp' => $request->renter,
'RentalEnd' => $date,
'Contact' => $contact,
'Price' => $price['outofalliance'],
'Type' => 'outofalliance',
'Paid' => 'No',
]);
}
} }
//Redirect to the update moon page //Setup the mail model
return redirect('/moons/admin/updatemoon')->with('success', 'Moon Updated'); ProcessSendEveMailJob::dispatch($body, (int)$moon->requestor_id, 'character', 'Warped Intentions Moon Request', $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds(30));
return redirect('/moons/admin/display/request')->with('success', 'Moon has been processed, and mail has been sent out.');
} }
public function storeUpdateMoon(Request $request) { /**
$moonCalc = new MoonCalc(); * Function to display the ability for the admins to update moons with who is renting,
$lookup = new LookupHelper(); * and when it ends
*/
public function updateMoon() {
$this->middleware('role:Admin');
//Declare the variables we need
$system = null;
$planet = null;
$moon = null;
$name = null;
$spmnTemp = array();
$spmn = array();
//Get the moons and put in order by System, Planet, Moon number
$moons = AllianceRentalMoon::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->structure_name;
array_push($spmnTemp, $temp);
}
//From the temporary array, build the final array
foreach($spmnTemp as $key => $value) {
$spmn[$value] = $value;
}
//Pass the data to the blade display
return view('moons.admin.updatemoon')->with('spmn', $spmn);
}
/**
* Function to remove a renter from a moon
* New function based on new table. Will
* update description in a future update.
*/
public function storeMoonRemoval(Request $request) {
//Check for the correct role for the user to utilize this function
$this->middleware('role:Admin');
//Validate the request
$this->validate($request, [ $this->validate($request, [
'system' => 'required', 'remove' => 'required',
'planet' => 'required',
'moon' => 'required',
'renter' => 'required',
'date' => 'required',
'contact' => 'required',
'paid' => 'required',
]); ]);
//Take the contact name and create a character id from it //Explode the remove request to an array of strings
if($request->contact == 'None') { $str_array = explode(" - ", $request->remove);
$contact = 'None';
} else {
$contact = $lookup->CharacterNameToId($request->contact);
}
//Let's find the corporation and alliance information to ascertain whether they are in Warped Intentions or another Legacy Alliance
$corpId = $lookup->LookupCharacter($contact);
$allianceId = $lookup->LookupCorporation($corpId);
//Create the date //Decode the value for the SPM into a system, planet, and moon
$date = new Carbon($request->date . '00:00:01'); $system = $str_array[0];
//Calculate the moon price $planet = $str_array[1];
$moon = Moon::where([ $moon = $str_array[2];
'System' => $request->system,
'Planet' => $request->planet, //Update the moon rental
'Moon' => $request->moon, AllianceRentalMoon::where([
])->first(); 'system' => $system,
$price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity, 'planet' => $planet,
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity); 'moon' => $moon,
$date = new Carbon($request->date . '00:00:01');
//Update the database entry
Moon::where([
'System' => $request->system,
'Planet' => $request->planet,
'Moon' => $request->moon,
])->update([ ])->update([
'RentalCorp' => $request->renter, 'rental_type' => 'Not Rented',
'RentalEnd' => $date, 'rental_until' => null,
'rental_contact_id' => 0,
'rental_contact_type' => 'Not Rented',
'paid' => 'Not Rented',
'paid_until' => null,
'alliance_use_until' => null,
]); ]);
//Going to store moon price in a table for future reference //Once the action is completed, redirect to the original page
//We need to insert a price based on whether part of Legacy or part of Warped Intentions return redirect('/moons/admin/display/rentals')->with('success', 'Renter removed from the moon.');
//Will need an if then else statement to complete this operation
if($allianceId = 99004116) {
MoonRental::insert([
'System' => $request->system,
'Planet' => $request->planet,
'Moon' => $request->moon,
'RentalCorp' => $request->renter,
'RentalEnd' => $date,
'Contact' => $contact,
'Price' => $price['alliance'],
'Type' => 'alliance',
'Paid' => $request->paid,
]);
} else {
MoonRental::insert([
'System' =>$request->system,
'Planet' => $request->planet,
'Moon' => $request->moon,
'RentalCorp' => $request->renter,
'RentalEnd' => $date,
'Contact' => $contact,
'Price' => $price['outofalliance'],
'Type' => 'outofalliance',
'Paid' => $request->paid,
]);
}
return redirect('/moons/admin/updatemoon')->with('success', 'Moon Updated');
} }
/** /**
* Function to display the moons to admins * Function to display the moons to admins
* New function based on new table. Will
* update description in a future update.
*/ */
public function displayMoonsAdmin() { public function displayRentalMoonsAdmin() {
$lookup = new LookupHelper; //Declare variables for the function
$contact = ''; $lookupHelper = new LookupHelper;
$paid = ''; $moonCalc = new MoonCalc;
$rentalEnd = ''; $contactId = null;
$renter = ''; $contactType = null;
$ticker = ''; $paid = null;
$paidUntil = null;
//Setup calls to the MoonCalc class $corpTicker = null;
$moonCalc = new MoonCalc();
//Update the prices for the moon
$moonCalc->FetchNewPrices();
//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(); $table = array();
foreach($moons as $moon) { //Setup the carbon date using Carbon\Carbon
//Get the rental data for the moon $lastMonth = Carbon::now()->subMonth();
$rental = MoonRental::where([ $today = Carbon::now();
'System' => $moon->System,
'Planet' => $moon->Planet,
'Moon' => $moon->Moon,
])->first();
//Check if their is a current rental for a moon going on //Get the moon rentals from the database
if($rental == false) { $rentalMoons = AllianceRentalMoon::orderBy('system', 'asc')->get();
//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 //For each of the moons compile different data for the view for formatting
$rentalTemp = Carbon::now()->subMonth(); foreach($rentalMoons as $moon) {
$rentalEnd = $rentalTemp->format('m-d');
//Set the contact info //Check if a current rental for the moon is on going
$contact = 'None'; if(($moon->rental_type == 'In Alliance' || $moon->rental_type == 'Out of Alliance')) {
$paid = $moon->paid;
//Set the renter info $paidUntil = new Carbon($moon->paid_until);
$renter = 'None'; $paidUntil = $paidUntil->format('m-d');
$ticker = 'N/A';
} else {
//If we find a rental record, mark the moon as whether it's paid or not
$paid = $rental->Paid;
//Set the rental date up //Set the rental date up
$rentalTemp = new Carbon($rental->RentalEnd); $rentalTemp = new Carbon($moon->rental_until);
$rentalEnd = $rentalTemp->format('m-d'); $rentalEnd = $rentalTemp->format('m-d');
//Set the contact name //Set the correct color for the table
$contact = $lookup->CharacterName($rental->Contact); if($rentalTemp->diffInDays(Carbon::now()) < 3 && $today->lessThan($rentalTemp)) {
$color = 'table-warning';
} else if($today->lessThan($rentalTemp)) {
$color = 'table-danger';
} else {
$color = 'table-primary';
}
//Set the contact name based on the contact type
if($moon->rental_contact_type == 'Alliance') {
$allianceInfo = $lookupHelper->GetAllianceInfo($moon->rental_contact_id);
//Set the contact name and ticker
$contact = $allianceInfo->name;
$ticker = $allianceInfo->ticker;
} else if($moon->rental_contact_type == 'Corporation') {
$corporationInfo = $lookupHelper->GetCorporationInfo($moon->rental_contact_id);
//Set the contact name and ticker
$contact = $corporationInfo->name;
$ticker = $corporationInfo->ticker;
} else if($moon->rental_contact_type == 'Character') {
$characterInfo = $lookupHelper->GetCharacterInfo($moon->rental_contact_id);
//Set the contact name
$contact = $characterInfo->name;
//Get the ticker for the character from the corporation he belongs to
$corpInfo = $lookupHelper->GetCorporationInfo($characterInfo->corporation_id);
$ticker = $corpInfo->ticker;
} else {
$contact = 'N/A';
$ticker = 'N/A';
$type = 'N/A';
$color = 'table-primary';
}
//Set up the renter whether it's W4RP or another corporation //Check if the moon is currently being utilized by the alliance
$corpId = $lookup->LookupCorporationId($rental->Contact); } else if($moon->rental_type == 'Alliance') {
$allianceId = $lookup->LookupCorporation($corpId); //If the moon is in use by the alliance then the moon isn't paid for
$ticker = $lookup->LookupAllianceTicker($allianceId); $paid = 'No';
}
//Set the color for the table //Setup the rental end time as the end of the month
$today = Carbon::now(); $rentalTemp = Carbon::now()->endOfMonth();
if($rentalTemp->diffInDays($today) < 3 ) { $rentalEnd = $rentalTemp->format('m-d');
$color = 'table-warning'; //Set the color of the table
} else if( $today > $rentalTemp) { $color = 'table-info';
$color = 'table-primary';
//Setup the paid time as the same as the rental end
$paidUntiltemp = $rentalTemp;
$paidUntil = $rentalEnd;
//Set the other information for the spreadsheet
$contact = 'Spatial Forces';
$renter = 'SP3C';
$ticker = 'SP3C';
$type = 'Alliance';
//The last case is the moon is not utilized by the Alliance or is not being rented
} else { } else {
$color = 'table-danger'; //If the moon is not being rented, or being utilized by the alliance then set paid to No
$paid = 'No';
//Setup the rental time to end as last month to show it's free
$rentalTemp = $lastMonth;
$rentalEnd = $rentalTemp->format('m-d');
//Setup the paid until as last month to show it's free
$paidUntilTemp = $lastMonth;
$paidUntil = $lastMonth->format('m-d');
//Setup the other variables with the correct information
$contact = 'None';
$renter = 'None';
$ticker = 'N/A';
$type = 'N/A';
//Set the color of the table
$color = 'table-primary';
}
//Set up the moon rental type
if($moon->rental_type == 'In Alliance') {
$type = 'IA';
//Setup the row color
if($rentalTemp->diffInDays(Carbon::now()) < 3 && $today->lessThan($rentalTemp)) {
$color = 'table-warning';
} else if($today->lessThan($rentalTemp)) {
$color = 'table-danger';
} else {
$color = 'table-primary';
}
} else if($moon->rental_type == 'Out of Alliance') {
$type = 'OOA';
//Setup the row color
if($rentalTemp->diffInDays(Carbon::now()) < 3 && $today->lessThan($rentalTemp)) {
$color = 'table-warning';
} else if($today->lessThan($rentalTemp)) {
$color = 'table-danger';
} else {
$color = 'table-primary';
}
} else if($moon->rental_type == 'Alliance') {
$type = 'W4RP';
//Set the row color
$color = 'table-info';
} else {
$type = 'N/A';
//Set the row color
$color = 'table-primary';
} }
//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 //Add the data to the html string to be passed to the view
array_push($table, [ array_push($table, [
'SPM' => $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon, 'SPM' => $moon->system . " - " . $moon->planet . " - " . $moon->moon,
'StructureName' => $moon->StructureName, 'StructureName' => $moon->structure_name,
'AlliancePrice' => $price['alliance'], 'AlliancePrice' => $moon->alliance_rental_price,
'OutOfAlliancePrice' => $price['outofalliance'], 'OutOfAlliancePrice' => $moon->out_of_alliance_rental_price,
'RentalEnd' => $rentalEnd, 'RentalEnd' => $rentalEnd,
'RowColor' => $color, 'RowColor' => $color,
'Paid' => $paid, 'Paid' => $moon->paid,
'PaidUntil' => $paidUntil,
'Contact' => $contact, 'Contact' => $contact,
'Renter' => $ticker, 'Type' => $moon->rental_type,
'Renter' => $type,
]); ]);
} }
return view('moons.admin.adminmoon')->with('table', $table); return view('moons.admin.adminmoon')->with('table', $table);
} }
public function UpdateMoonPaid(Request $request) { /**
* Function to store the updates from the moons.
* New function based on new table. Will update
* the description in a future update
*/
public function storeUpdateMoon(Request $request) {
//Require the site administration role
$this->middleware('role:Admin');
//Declare some variables we will need
$moonCalc = new MoonCalc;
$lookup = new LookupHelper;
$paid = false;
$system = null;
$planet = null;
$mn = null;
//Validate our request from the html form
$this->validate($request, [ $this->validate($request, [
'paid' => 'required', 'spmn' => 'required',
'contact' => 'required',
'contact_type' => 'required',
'paid_until' => 'required',
'rental_end' => 'required',
]); ]);
$str_array = explode(" - ", $request->paid); //Decode the spmn
$str_array = explode(" - ", $request->spmn);
//Decode the value for the SPM into a system, planet, and moon for the database to update
$system = $str_array[0]; $system = $str_array[0];
$planet = $str_array[1]; $planet = $str_array[1];
$moon = $str_array[2]; $mn = $str_array[2];
$name = $str_array[3];
//Update the paid status of the moon //Update the paid value from the request value
MoonRental::where([ if($request->paid == 'Yes') {
'System' => $system, $paid = 'Yes';
'Planet' => $planet, } else {
'Moon' => $moon, $paid = 'No';
])->update([ }
'Paid' => 'Yes',
]);
//Redirect back to the moon page, which should call the page to be displayed correctly //Setup the rental end and paid until variables
return redirect('/moons/admin/display'); $rentalEnd = $request->rental_end . " 23:59:59";
$paidUntil = $request->paid_until . " 23:59:59";
//Check if the alliance is renting the moon for itself
if($request->contact_type == 'Corporation' && $request->contact == 'Spatial Forces') {
AllianceRentalMoon::where([
'system' => $str_array[0],
'planet' => $str_array[1],
'moon' => $str_array[2],
])->update([
'rental_type' => 'Alliance',
'rental_until' => $request->rental_end . " 23:59:59",
'rental_contact_id' => 98287666,
'rental_contact_type' => 'Alliance',
'paid' => 'No',
'paid_until' => null,
'alliance_use_until' => $request->rental_end . " 23:59:59",
]);
} else if($request->contact_type == 'Character') {
//Get the character id from the lookup helper
$charId = $lookup->CharacterNameToId($request->contact);
//Get the character information including the corporation from the lookup tables
$char = $lookup->GetCharacterInfo($charId);
//Get the corporation id from the lookup helper, followed by the alliance id
//so we can determine if it's in alliance or out of alliance
$corp = $lookup->GetCorporationInfo($char->corporation_id);
if($corp->alliance_id == 99004116) {
$type = 'In Alliance';
} else {
$type = 'Out of Alliance';
}
AllianceRentalMoon::where([
'system' => $str_array[0],
'planet' => $str_array[1],
'moon' => $str_array[2],
])->update([
'rental_type' => $type,
'rental_until' => $request->rental_end . " 23:59:59",
'rental_contact_id' => $charId,
'rental_contact_type' => 'Character',
'paid' => $paid,
'paid_until' => $request->paid_until . " 23:59:59",
'alliance_use_until' => null,
]);
} else if($request->contact_type == 'Corporation') {
//Get the corporation id from the lookup helper
$corpId = $lookup->CorporationNameToId($request->contact);
//Get the corporation information to determine if they are in Warped Intentions or not.
$corporation = $lookup->GetCorporationInfo($request->contact);
if($corp->alliance_id == 99004116) {
$type = 'In Alliance';
} else {
$type = 'Out of Alliance';
}
AllianceMoonRental::where([
'system' => $str_array[0],
'planet' => $str_array[1],
'moon' => $str_array[2],
])->update([
'rental_type' => $type,
'rental_until' => $request->rental_end . " 23:59:59",
'rental_contact_id' => $corpId,
'rental_contact_type' => 'Corporation',
'paid' => $paid,
'paid_until' => $request->paid_until . " 23:59:59",
'alliance_use_until' => null,
]);
}
//Redirect to the previous screen.
return redirect('/moons/admin/updatemoon')->with('success', 'Moon Rental updated.');
} }
/** public function ImportMoonSurveyData(Request $request) {
* Display function for adding a new rental moon to the pool //Declare variables
* $added = 0;
*/ $updated = 0;
public function addMoon() { $moon = null;
return view('moons.admin.addmoon'); $newMoon = false;
$num = 0;
$planet = null;
$moonNumber = null;
foreach(explode("\n", $request->input('data')) as $row) {
$cols = explode("\t", $row);
dd($cols);
}
return redirect('/admin/dashboard')->with('success', 'Import done: ' . $added . ' moons added ' . $updated . ' moons updated.');
} }
/** private function romanNumberToInteger($roman) {
* Add a new moon into the database $result = 0;
*
* @return \Illuminate\Http\Reponse
*/
public function storeMoon(Request $request) {
$this->validate($request, [
'region' => 'required',
'system' => 'required',
'structure' => 'required',
]);
if($request->input('firstquan') < 1.00) { foreach($this->romans as $key => $value) {
$firstQuan = $request->input('firstquan') * 100.00; while(strpos($roman, $key) === 0) {
} else { $result += $value;
$firstQuan = $request->input('firstquan'); $roman = substr($roman, strlen($key));
}
} }
if($request->input('secondquan') < 1.00) { return $result;
$firstQuan = $request->input('secondquan') * 100.00; }
} else {
$firstQuan = $request->input('secondquan'); private function integerToRomanNumber($number) {
$returnValue = '';
while($number > 0) {
foreach($this->romans as $roman => $int) {
if($number >= $int) {
$number -= $int;
$returnValue .= $roman;
break;
}
}
} }
if($request->input('thirdquan') < 1.00) { return $returnValue;
$firstQuan = $request->input('thirdquan') * 100.00; }
} else {
$firstQuan = $request->input('thirdquan'); private function arrayToCsv(array $rows) {
//Declare needed variable as text null
$result = '';
//Open the temp file
$fp = fopen('php://temp', 'w');
//Process the file
foreach($rows as $fields) {
fputcsv($fp, $fields, ';', '"');
} }
if($request->input('fourthquan') < 1.00) { //Go back to the beginning of the file
$firstQuan = $request->input('fourthquan') * 100.00; rewind($fp);
} else {
$firstQuan = $request->input('fourthquan'); //Continue through the buffer until the end
while(($buffer = fgets($fp, 4096)) !== false) {
$result .= $buffer;
} }
// Add new moon //Close the temp file
$moon = new Moon; fclose($fp);
$moon->Region = $request->input('region');
$moon->System = $request->input('system');
$moon->Planet = $request->input('planet');
$moon->Moon = $request->input('moon');
$moon->StructureName = $request->input('structure');
$moon->FirstOre = $request->input('firstore');
$moon->FirstQuantity = $request->input('firstquan');
$moon->SecondOre = $request->input('secondore');
$moon->SecondQuantity = $request->input('secondquan');
$moon->ThirdOre = $request->input('thirdore');
$moon->ThirdQuantity = $request->input('thirdquan');
$moon->FourthOre = $request->input('fourthore');
$moon->FourthQuantity = $request->input('fourthquan');
$moon->save();
return redirect('/dashboard')->with('success', 'Moon Added'); //Return the result
return $result;
} }
} }

View File

@@ -12,13 +12,18 @@ use Carbon\Carbon;
//Models //Models
use App\Models\Moon\Config; use App\Models\Moon\Config;
use App\Models\Moon\ItemComposition; use App\Models\Moon\ItemComposition;
use App\Models\Moon\Moon;
use App\Models\Moon\OrePrice; use App\Models\Moon\OrePrice;
use App\Models\Moon\Price; use App\Models\Moon\Price;
use App\Models\MoonRent\MoonRental; use App\Models\Moon\AllianceMoon;
use App\Models\MoonRentals\AllianceRentalMoon;
use App\Models\Moon\AllianceMoonRequest;
//Library //Library
use App\Library\Moons\MoonCalc; use App\Library\Moons\MoonCalc;
use App\Library\Lookups\LookupHelper;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
class MoonsController extends Controller class MoonsController extends Controller
{ {
@@ -27,84 +32,283 @@ class MoonsController extends Controller
$this->middleware('role:Renter'); $this->middleware('role:Renter');
} }
public function displayRentalMoonPage() {
return view('moons.user.requestrental');
}
/** /**
* Function to display the moons and pass data to the blade template * Function to display all alliance moons and pass data to the blade template
*/ */
public function displayMoons() { public function displayMoons() {
$rentalEnd = ''; //Setup variables for moons
$moons = array();
$systems = array();
//Get the user type from the user Auth class //Get all of the alliance moon systems from the database
$type = Auth::user()->user_type; $systems = AllianceMoon::groupBy('System')->pluck('System');
//Setup calls to the MoonCalc class
$moonCalc = new MoonCalc(); //Get all of the alliance moons from the database
//Update the prices for the moon $moons = AllianceMoon::all();
$moonCalc->FetchNewPrices();
//get all of the moons from the database $gasGoo = [
$moons = DB::table('Moons')->orderBy('System', 'asc')->get(); 'Zeolites',
//declare the html variable and set it to null 'Sylvite',
'Bitumens',
'Coesite',
];
$r8Goo = [
'Cobaltite',
'Euxenite',
'Titanite',
'Scheelite',
];
$r16Goo = [
'Otavite',
'Sperrylite',
'Vanadinite',
'Chromite',
];
$r32Goo = [
'Carnotite',
'Zircon',
'Pollucite',
'Cinnabar',
];
$r64Goo = [
'Xenotime',
'Monazite',
'Loparite',
'Ytterbite',
];
return view('moons.user.allmoons')->with('systems', $systems)
->with('moons', $moons)
->with('gasGoo', $gasGoo)
->with('r8Goo', $r8Goo)
->with('r16Goo', $r16Goo)
->with('r32Goo', $r32Goo)
->with('r64Goo', $r64Goo);
}
/**
* Function to display moon request form
*/
public function displayRequestAllianceMoon() {
return view('moons.user.requestmoon');
}
/**
* Function to store the moon request
*/
public function storeRequestAllianceMoon(Request $request) {
$this->validate($request, [
'system' => 'required',
'planet' => 'required',
'moon' => 'required',
]);
//Declare some necessary arrays for figuring out what region a moon resides in
$catch = [
'6X7-JO',
'A803-L',
'I8-D0G',
'WQH-4K',
'GJ0-JO',
'Q-S7ZD',
'JWZ2-V',
'J-ODE7',
'OGL8-Q',
'R-K4QY',
];
$immensea = [
'ZBP-TP',
'XVV-21',
'B9E-H6',
'JDAS-0',
'Y19P-1',
'LN-56V',
'O7-7UX',
'Y2-QUV',
'SPBS-6',
'A4B-V5',
'GXK-7F',
'78TS-Q',
'CJNF-J',
'EA-HSA',
'FYI-49',
'WYF8-8',
'NS2L-4',
'B-S347',
'AF0-V5',
'QI-S9W',
'B-A587',
'PPFB-U',
'L-5JCJ',
'4-GB14',
'REB-KR',
'QE-E1D',
'LK1K-5',
'Z-H2MA',
'B-KDOZ',
'E8-YS9',
'DY-P7Q',
];
//Declare lookup variables
$lookup = new LookupHelper;
//Get all of the information needed to create the database entry
$charId = auth()->user()->getId();
$charInfo = $lookup->GetCharacterInfo($charId);
$charName = $charInfo->name;
$corpInfo = $lookup->GetCorporationInfo($charInfo->corporation_id);
$corpId = $corpInfo->corporation_id;
$corpName = $corpInfo->name;
$corpTicker = $corpInfo->ticker;
//Declare the region variable as null for the lookup if statement
$region = null;
//Get the region the moon resides in from the system
if(in_array($request->system, $catch, true)) {
$region = 'Catch';
} else if(in_array($request->system, $immensea, true)) {
$region = 'Immensea';
} else {
//False value. Redirect back to page
return redirct('/moons/display/request')->with('error', 'Region was not found.');
}
//Check to see if the moon has been previously inputted for
$allMoons = AllianceMoon::all();
foreach($allMoons as $moon) {
if($moon->Region == $region && $moon->System == $request->system && $moon->Planet == $request->planet && $moon->Moon == $request->moon) {
if($moon->Availability != 'Available') {
return redirect('moons/display/request')->with('error', 'The moon has already been reserved by another party.');
}
break;
}
}
//Create the new object to save into the database
$moonRequest = new AllianceMoonRequest;
$moonRequest->region = $region;
$moonRequest->system = $request->system;
$moonRequest->planet = $request->planet;
$moonRequest->moon = $request->moon;
$moonRequest->corporation_id = $corpId;
$moonRequest->corporation_name = $corpName;
$moonRequest->corporation_ticker = $corpTicker;
$moonRequest->requestor_name = $charName;
$moonRequest->requestor_id = $charId;
$moonRequest->status = 'Pending';
$moonRequest->save();
//Update the current moon's status in the model AllianceMoon
AllianceMoon::where([
'Region' => $region,
'System' => $request->system,
'Planet' => $request->planet,
'Moon' => $request->moon,
])->update([
'Availability' => 'Request Pending',
]);
//Send a mail over to the site admins to approve the moon request
$config = config('esi');
$body = 'A new moon request has been entered into the services site. Please approve or deny the request within 3 business days.<br><br>';
$body .= 'Sincerely,<br>';
$body .= 'W4RP Services Site';
$subject = 'New Moon Request Available';
ProcessSendEveMailJob::dispatch($body, 92947432, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds(30));
ProcessSendEveMailJob::dispatch($body, 92626011, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds(60));
return redirect('/moons/display/request')->with('success', 'Moon request submitted.');
}
/**
* Function to display the moons and pass to the blade template
* Function description will be updated in a future release.
*/
public function displayRentalMoons() {
//Declare variables
$lastMonth = Carbon::now()->subMonth();
$today = Carbon::now();
$table = array(); $table = array();
$moonprice = null; $moonprice = null;
//Get the user type from the user Auth class
$type = auth()->user()->getUserType();
//Get all of the rental moons from the database
$moons = AllianceRentalMoon::orderBy('system', 'ASC')
->orderBy('planet', 'ASC')
->orderBy('moon', 'ASC')
->get();
//For each of the moons let's format the data for the display table
foreach($moons as $moon) { foreach($moons as $moon) {
//get the rental data for the moon $color = null;
$rental = MoonRental::where([ $rentalTemp = null;
'System' => $moon->System, $rentalEnd = null;
'Planet' => $moon->Planet,
'Moon' => $moon->Moon,
])->first();
if($rental == false) { //Check if someone is currently renting the moon
//If we don't find a rental record, set the rental date as last month if($moon->rental_type == 'In Alliance' || $moon->rental_type == 'Out of Alliance') {
$rentalTemp = Carbon::now()->subMonth(); $rentalTemp = new Carbon($moon->rental_until);
$rentalEnd = $rentalTemp->format('m-d'); $rentalEnd = $rentalTemp->format('m-d');
} else {
//Set the rental date up //Setup the correct color for the table
$rentalTemp = new Carbon($rental->RentalEnd); if($rentalTemp->diffInDays(Carbon::now()) < 3 && $today->lessThan($rentalTemp)) {
$color = 'table-warning';
} else if($today->lessThan($rentalTemp)) {
$color = 'table-danger';
} else {
$color = 'table-primary';
}
} else if($moon->rental_type == 'Alliance') {
$rentalTemp = Carbon::now()->endOfMonth();
$rentalEnd = $rentalTemp->format('m-d'); $rentalEnd = $rentalTemp->format('m-d');
} $color = 'table-info';
//mark today's date in carbon format
$today = Carbon::now();
$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 { } else {
$moonprice = $price['outofalliance']; //Set the rental date for if someone is not renting the moon
} $rentalTemp = $lastMonth;
$rentalEnd = $rentalTemp->format('m-d');
if($rentalTemp->diffInDays($today) < 3 ) {
$color = 'table-warning';
} else if( $today > $rentalTemp) {
$color = 'table-primary'; $color = 'table-primary';
} else {
$color = 'table-danger';
} }
//Add the data to the html string to be passed to the view //Get the price of the moon from the database based on if the person is in Warped Intentions
$userType = auth()->user()->getUserType();
if($userType == 'W4RP') {
$moonprice = $moon->alliance_rental_price;
} else {
$moonprice = $moon->out_of_alliance_rental_price;
}
//Add the data to the html array to be passed to the view
array_push($table, [ array_push($table, [
'SPM' => $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon, 'SPM' => $moon->system . " - " . $moon->planet . " - " . $moon->moon,
'StructureName' => $moon->StructureName, 'StructureName' => $moon->structure_name,
'FirstOre' => $moon->FirstOre, 'FirstOre' => $moon->first_ore,
'FirstQuantity' => $moon->FirstQuantity, 'FirstQuantity' => number_format($moon->first_quantity, 0, ".", ","),
'SecondOre' => $moon->SecondOre, 'SecondOre' => $moon->second_ore,
'SecondQuantity' => $moon->SecondQuantity, 'SecondQuantity' => number_format($moon->second_quantity, 0, ".", ","),
'ThirdOre' => $moon->ThirdOre, 'ThirdOre' => $moon->third_ore,
'ThirdQuantity' => $moon->ThirdQuantity, 'ThirdQuantity' => number_format($moon->third_quantity, 0, ".", ","),
'FourthOre' => $moon->FourthOre, 'FourthOre' => $moon->fourth_ore,
'FourthQuantity' => $moon->FourthQuantity, 'FourthQuantity' => number_format($moon->fourth_quantity, 0, ".", ","),
'Price' => $moonprice, 'Price' => number_format($moonprice, 0, ".", ","),
'Worth' => number_format($worth, "2", ".", ","), 'Worth' => number_format($moon->moon_worth, 0, ".", ","),
'RentalEnd' => $rentalEnd, 'RentalEnd' => $rentalEnd,
'RowColor' => $color, 'RowColor' => $color,
]); ]);
} }
//Pass the data to the view
return view('moons.user.moon')->with('table', $table); return view('moons.user.moon')->with('table', $table);
} }
@@ -113,28 +317,252 @@ class MoonsController extends Controller
} }
public function displayTotalWorth(Request $request) { 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 //Setup calls to the MoonCalc class
$moonCalc = new MoonCalc(); $moonCalc = new MoonCalc();
//Update the prices for the moon $totalPull = 5.55 * (3600.00 * 24.00 * 30.00);
$moonCalc->FetchNewPrices(); $composition = [
'Tritanium' => 0,
'Pyerite' => 0,
'Mexallon' => 0,
'Isogen' => 0,
'Nocxium' => 0,
'Zydrine' => 0,
'Megacyte' => 0,
'Atmospheric_Gases' => 0,
'Evaporite_Deposits' => 0,
'Hydrocarbons' => 0,
'Silicates' => 0,
'Cobalt' => 0,
'Scandium' => 0,
'Titanium' => 0,
'Tungsten' => 0,
'Cadmium' => 0,
'Platinum' => 0,
'Vanadium'=> 0,
'Chromium' => 0,
'Technetium' => 0,
'Hafnium' => 0,
'Caesium' => 0,
'Mercury' => 0,
'Dysprosium' => 0,
'Neodymium' => 0,
'Promethium' => 0,
'Thulium' => 0,
];
$totalGoo = $moonCalc->SpatialMoonsOnlyGooTotalWorth($firstOre, $firstQuantity, $secondOre, $secondQuantity, $firstOre = $request->firstOre;
$thirdOre, $thirdQuantity, $fourthOre, $fourthQuantity); if($request->firstQuantity >= 1.00) {
$totalGoo = number_format($totalGoo, 2, ".", ","); $firstQuantity = $request->firstQuantity / 100.00;
} else {
$firstQuantity = $request->firstQuantity;
}
$secondOre = $request->secondOre;
if($request->secondQuantity >= 1.00) {
$secondQuantity = $request->secondQuantity / 100.00;
} else {
$secondQuantity = $request->secondQuantity;
}
$thirdOre = $request->thirdOre;
if($request->thirdQuantity >= 1.00) {
$thirdQuantity = $request->thirdQuantity / 100.00;
} else {
$thirdQuantity = $request->thirdQuantity;
}
$fourthOre = $request->fourthOre;
if($request->fourthQuantity >= 1.00) {
$fourthQuantity = $request->fourthQuantity / 100.00;
} else {
$fourthQuantity = $request->fourthQuantity;
}
if($request->reprocessing >= 1.00) {
$reprocessing = $request->reprocessing / 100.00;
} else {
$reprocessing = $request->reprocessing;
}
//Set the reprocessing level for 84% if the value is null
if($request->reprocessing == null) {
$reprocessing = 0.84;
}
//Get the total percentage of the ores, and normalize it to 1.00.
$totalPercent = $firstQuantity + $secondQuantity + $thirdQuantity + $fourthQuantity;
if($totalPercent < 1.00) {
$firstQuantity = $firstQuantity / $totalPercent;
$secondQuantity = $secondQuantity / $totalPercent;
$thirdQuantity = $thirdQuantity / $totalPercent;
$fourthQuantity = $fourthQuantity / $totalPercent;
}
//Calculate the total worth of the moon
$totalWorth = $moonCalc->SpatialMoonsTotalWorth($firstOre, $firstQuantity, $secondOre, $secondQuantity, $totalWorth = $moonCalc->SpatialMoonsTotalWorth($firstOre, $firstQuantity, $secondOre, $secondQuantity,
$thirdOre, $thirdQuantity, $fourthOre, $fourthQuantity); $thirdOre, $thirdQuantity, $fourthOre, $fourthQuantity);
//Format the number to send to the blade.
$totalWorth = number_format($totalWorth, 2, ".", ","); $totalWorth = number_format($totalWorth, 2, ".", ",");
return view('moons.user.displayTotalWorth')->with(['totalWorth' => $totalWorth, 'totalGoo' => $totalGoo]); //Get the composition for the first ore if it is not None.
//Add the first ore composition to the final composition
if($firstOre != 'None') {
//Get the ore's composition
$firstComp = $moonCalc->GetOreComposition($firstOre);
//Get the amount of units mine-able from the moon
$mUnits = $moonCalc->CalcOreUnits($firstOre, $firstQuantity);
//Calculate the number of reprocessing units to happen from moon units
$rUnits = floor($mUnits / 100.0);
//Compile the composition of the ore
$composition['Tritanium'] += floor(($firstComp->Tritanium * $rUnits) * $reprocessing);
$composition['Pyerite'] += floor(($firstComp->Pyerite * $rUnits) * $reprocessing);
$composition['Mexallon'] += floor(($firstComp->Mexallon * $rUnits) * $reprocessing);
$composition['Isogen'] += floor(($firstComp->Isogen * $rUnits) * $reprocessing);
$composition['Nocxium'] += floor(($firstComp->Nocxium * $rUnits) * $reprocessing);
$composition['Zydrine'] += floor(($firstComp->Zydrine * $rUnits) * $reprocessing);
$composition['Megacyte'] += floor(($firstComp->Megacyte * $rUnits) * $reprocessing);
$composition['Atmospheric_Gases'] += floor(($firstComp->AtmosphericGases * $rUnits) * $reprocessing);
$composition['Evaporite_Deposits'] += floor(($firstComp->EvaporiteDeposits * $rUnits) * $reprocessing);
$composition['Hydrocarbons'] += floor(($firstComp->Hydrocarbons * $rUnits) * $reprocessing);
$composition['Silicates'] += floor(($firstComp->Silicates * $rUnits) * $reprocessing);
$composition['Cobalt'] += floor(($firstComp->Cobalt * $rUnits) * $reprocessing);
$composition['Scandium'] += floor(($firstComp->Scandium * $rUnits) * $reprocessing);
$composition['Titanium'] += floor(($firstComp->Titanium * $rUnits) * $reprocessing);
$composition['Tungsten'] += floor(($firstComp->Tungsten * $rUnits) * $reprocessing);
$composition['Cadmium'] += floor(($firstComp->Cadmium * $rUnits) * $reprocessing);
$composition['Platinum'] += floor(($firstComp->Platinium * $rUnits) * $reprocessing);
$composition['Vanadium'] += floor(($firstComp->Vanadium * $rUnits) * $reprocessing);
$composition['Chromium'] += floor(($firstComp->Chromium * $rUnits) * $reprocessing);
$composition['Technetium'] += floor(($firstComp->Technetium * $rUnits) * $reprocessing);
$composition['Hafnium'] += floor(($firstComp->Hafnium * $rUnits) * $reprocessing);
$composition['Caesium'] += floor(($firstComp->Caesium * $rUnits) * $reprocessing);
$composition['Mercury'] += floor(($firstComp->Mercury * $rUnits) * $reprocessing);
$composition['Dysprosium'] += floor(($firstComp->Dysprosium * $rUnits) * $reprocessing);
$composition['Neodymium'] += floor(($firstComp->Neodymium * $rUnits) * $reprocessing);
$composition['Promethium'] += floor(($firstComp->Promethium * $rUnits) * $reprocessing);
$composition['Thulium'] += floor(($firstComp->Thulium * $rUnits) * $reprocessing);
}
//Get the composition for the second ore if it is not None.
//Add the second ore composition to the final composition
if($secondOre != 'None') {
//Get the ore's composition
$secondComp = $moonCalc->GetOreComposition($secondOre);
//Get the amount of units mine-able from the moon
$mUnits = $moonCalc->CalcOreUnits($secondOre, $secondQuantity);
//Calculate the number of reprocessing units to happen from moon units
$rUnits = floor($mUnits / 100.0);
$composition['Tritanium'] += floor(($secondComp->Tritanium * $rUnits) * $reprocessing);
$composition['Pyerite'] += floor(($secondComp->Pyerite * $rUnits) * $reprocessing);
$composition['Mexallon'] += floor(($secondComp->Mexallon * $rUnits) * $reprocessing);
$composition['Isogen'] += floor(($secondComp->Isogen * $rUnits) * $reprocessing);
$composition['Nocxium'] += floor(($secondComp->Nocxium * $rUnits) * $reprocessing);
$composition['Zydrine'] += floor(($secondComp->Zydrine * $rUnits) * $reprocessing);
$composition['Megacyte'] += floor(($secondComp->Megacyte * $rUnits) * $reprocessing);
$composition['Atmospheric_Gases'] += floor(($secondComp->AtmosphericGases * $rUnits) * $reprocessing);
$composition['Evaporite_Deposits'] += floor(($secondComp->EvaporiteDeposits * $rUnits) * $reprocessing);
$composition['Hydrocarbons'] += floor(($secondComp->Hydrocarbons * $rUnits) * $reprocessing);
$composition['Silicates'] += floor(($secondComp->Silicates * $rUnits) * $reprocessing);
$composition['Cobalt'] += floor(($secondComp->Cobalt * $rUnits) * $reprocessing);
$composition['Scandium'] += floor(($secondComp->Scandium * $rUnits) * $reprocessing);
$composition['Titanium'] += floor(($secondComp->Titanium * $rUnits) * $reprocessing);
$composition['Tungsten'] += floor(($secondComp->Tungsten * $rUnits) * $reprocessing);
$composition['Cadmium'] += floor(($secondComp->Cadmium * $rUnits) * $reprocessing);
$composition['Platinum'] += floor(($secondComp->Platinium * $rUnits) * $reprocessing);
$composition['Vanadium'] += floor(($secondComp->Vanadium * $rUnits) * $reprocessing);
$composition['Chromium'] += floor(($secondComp->Chromium * $rUnits) * $reprocessing);
$composition['Technetium'] += floor(($secondComp->Technetium * $rUnits) * $reprocessing);
$composition['Hafnium'] += floor(($secondComp->Hafnium * $rUnits) * $reprocessing);
$composition['Caesium'] += floor(($secondComp->Caesium * $rUnits) * $reprocessing);
$composition['Mercury'] += floor(($secondComp->Mercury * $rUnits) * $reprocessing);
$composition['Dysprosium'] += floor(($secondComp->Dysprosium * $rUnits) * $reprocessing);
$composition['Neodymium'] += floor(($secondComp->Neodymium * $rUnits) * $reprocessing);
$composition['Promethium'] += floor(($secondComp->Promethium * $rUnits) * $reprocessing);
$composition['Thulium'] += floor(($secondComp->Thulium * $rUnits) * $reprocessing);
}
//Get the composition for the third ore if it is not None.
//Add the third ore composition to the final composition
if($thirdOre != 'None') {
//Get the ore's composition
$thirdComp = $moonCalc->GetOreComposition($thirdOre);
//Get the amount of units mine-able from the moon
$mUnits = $moonCalc->CalcOreUnits($thirdOre, $thirdQuantity);
//Calculate the number of reprocessing units to happen from moon units
$rUnits = floor($mUnits / 100.0);
$composition['Tritanium'] += floor(($thirdComp->Tritanium * $rUnits) * $reprocessing);
$composition['Pyerite'] += floor(($thirdComp->Pyerite * $rUnits) * $reprocessing);
$composition['Mexallon'] += floor(($thirdComp->Mexallon * $rUnits) * $reprocessing);
$composition['Isogen'] += floor(($thirdComp->Isogen * $rUnits) * $reprocessing);
$composition['Nocxium'] += floor(($thirdComp->Nocxium * $rUnits) * $reprocessing);
$composition['Zydrine'] += floor(($thirdComp->Zydrine * $rUnits) * $reprocessing);
$composition['Megacyte'] += floor(($thirdComp->Megacyte * $rUnits) * $reprocessing);
$composition['Atmospheric_Gases'] += floor(($thirdComp->AtmosphericGases * $rUnits) * $reprocessing);
$composition['Evaporite_Deposits'] += floor(($thirdComp->EvaporiteDeposits * $rUnits) * $reprocessing);
$composition['Hydrocarbons'] += floor(($thirdComp->Hydrocarbons * $rUnits) * $reprocessing);
$composition['Silicates'] += floor(($thirdComp->Silicates * $rUnits) * $reprocessing);
$composition['Cobalt'] += floor(($thirdComp->Cobalt * $rUnits) * $reprocessing);
$composition['Scandium'] += floor(($thirdComp->Scandium * $rUnits) * $reprocessing);
$composition['Titanium'] += floor(($thirdComp->Titanium * $rUnits) * $reprocessing);
$composition['Tungsten'] += floor(($thirdComp->Tungsten * $rUnits) * $reprocessing);
$composition['Cadmium'] += floor(($thirdComp->Cadmium * $rUnits) * $reprocessing);
$composition['Platinum'] += floor(($thirdComp->Platinium * $rUnits) * $reprocessing);
$composition['Vanadium'] += floor(($thirdComp->Vanadium * $rUnits) * $reprocessing);
$composition['Chromium'] += floor(($thirdComp->Chromium * $rUnits) * $reprocessing);
$composition['Technetium'] += floor(($thirdComp->Technetium * $rUnits) * $reprocessing);
$composition['Hafnium'] += floor(($thirdComp->Hafnium * $rUnits) * $reprocessing);
$composition['Caesium'] += floor(($thirdComp->Caesium * $rUnits) * $reprocessing);
$composition['Mercury'] += floor(($thirdComp->Mercury * $rUnits) * $reprocessing);
$composition['Dysprosium'] += floor(($thirdComp->Dysprosium * $rUnits) * $reprocessing);
$composition['Neodymium'] += floor(($thirdComp->Neodymium * $rUnits) * $reprocessing);
$composition['Promethium'] += floor(($thirdComp->Promethium * $rUnits) * $reprocessing);
$composition['Thulium'] += floor(($thirdComp->Thulium * $rUnits) * $reprocessing);
}
//Get the composition for the fourth ore if it is not None.
//Add the fourth ore composition to the final composition
if($fourthOre != 'None') {
//Get the ore's composition
$fourthComp = $moonCalc->GetOreComposition($fourthOre);
//Get the amount of units mine-able from the moon
$mUnits = $moonCalc->CalcOreUnits($fourthOre, $fourthQuantity);
//Calculate the number of reprocessing units to happen from moon units
$rUnits = floor($mUnits / 100.0);
$composition['Tritanium'] += floor(($fourthComp->Tritanium * $rUnits) * $reprocessing);
$composition['Pyerite'] += floor(($fourthComp->Pyerite * $rUnits) * $reprocessing);
$composition['Mexallon'] += floor(($fourthComp->Mexallon * $rUnits) * $reprocessing);
$composition['Isogen'] += floor(($fourthComp->Isogen * $rUnits) * $reprocessing);
$composition['Nocxium'] += floor(($fourthComp->Nocxium * $rUnits) * $reprocessing);
$composition['Zydrine'] += floor(($fourthComp->Zydrine * $rUnits) * $reprocessing);
$composition['Megacyte'] += floor(($fourthComp->Megacyte * $rUnits) * $reprocessing);
$composition['Atmospheric_Gases'] += floor(($fourthComp->AtmosphericGases * $rUnits) * $reprocessing);
$composition['Evaporite_Deposits'] += floor(($fourthComp->EvaporiteDeposits * $rUnits) * $reprocessing);
$composition['Hydrocarbons'] += floor(($fourthComp->Hydrocarbons * $rUnits) * $reprocessing);
$composition['Silicates'] += floor(($fourthComp->Silicates * $rUnits) * $reprocessing);
$composition['Cobalt'] += floor(($fourthComp->Cobalt * $rUnits) * $reprocessing);
$composition['Scandium'] += floor(($fourthComp->Scandium * $rUnits) * $reprocessing);
$composition['Titanium'] += floor(($fourthComp->Titanium * $rUnits) * $reprocessing);
$composition['Tungsten'] += floor(($fourthComp->Tungsten * $rUnits) * $reprocessing);
$composition['Cadmium'] += floor(($fourthComp->Cadmium * $rUnits) * $reprocessing);
$composition['Platinum'] += floor(($fourthComp->Platinium * $rUnits) * $reprocessing);
$composition['Vanadium'] += floor(($fourthComp->Vanadium * $rUnits) * $reprocessing);
$composition['Chromium'] += floor(($fourthComp->Chromium * $rUnits) * $reprocessing);
$composition['Technetium'] += floor(($fourthComp->Technetium * $rUnits) * $reprocessing);
$composition['Hafnium'] += floor(($fourthComp->Hafnium * $rUnits) * $reprocessing);
$composition['Caesium'] += floor(($fourthComp->Caesium * $rUnits) * $reprocessing);
$composition['Mercury'] += floor(($fourthComp->Mercury * $rUnits) * $reprocessing);
$composition['Dysprosium'] += floor(($fourthComp->Dysprosium * $rUnits) * $reprocessing);
$composition['Neodymium'] += floor(($fourthComp->Neodymium * $rUnits) * $reprocessing);
$composition['Promethium'] += floor(($fourthComp->Promethium * $rUnits) * $reprocessing);
$composition['Thulium'] += floor(($fourthComp->Thulium * $rUnits) * $reprocessing);
}
return view('moons.user.displayTotalWorth')->with('totalWorth', $totalWorth)
->with('composition', $composition)
->with('reprocessing', $reprocessing);
} }
} }

View File

@@ -0,0 +1,62 @@
<?php
namespace App\Http\Controllers\Moons;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
use Log;
use Carbon\Carbon;
//Models
use App\Models\Moon\AllianceRentalMoon;
class RentalMoonsAdminController extends Controller
{
/**
* Construct
*/
public function __construct() {
$this->middleware('auth');
$this->middelware('role:user');
$this->middleware('permission:mining.director');
}
/**
* Function to display rental moons being used for the alliance
*/
public function displayAllianceUsageRentalMoons() {
}
/**
* Display the form for requesting new rental moon for the alliance
*/
public function displayRentalMoonForAllianceForm() {
}
/**
* Function to store when a new rental moon is requested
*/
public function storeRentalMoonForAlliance(Request $request) {
}
/**
* Function to display the form for figuring out item composition
*/
public function displayItemCompositionForm() {
}
/**
* Function to display the results of the form for figuring out item composition
*/
public function displayItemCompositionResults(Request $request) {
}
}

View File

@@ -0,0 +1,531 @@
<?php
namespace App\Http\Controllers\SRP;
//Laravel Libraries
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
use Khill\Lavacharts\Lavacharts;
use Carbon\Carbon;
//User Libraries
use App\Library\SRP\SRPHelper;
//Models
use App\Models\SRP\SRPShip;
use App\Models\User\User;
use App\Models\SRP\SrpFleetType;
use App\Models\SRP\SrpShipType;
use App\Models\SRP\SrpPayout;
class SRPAdminController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
$this->middleware('permission:srp.admin');
}
public function displaySRPRequests() {
//Middleware needed for permissions
$this->middleware('permission:srp.admin');
//Create the array
$requests = array();
$viewShipTypes = array();
//Declare variables for use later.
$sum_actual = 0.00;
$sum_loss = 0.00;
//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();
//Get the payouts from the database
$payouts = SrpPayout::all();
//Get the SRP ship count to see how many requests are avaiable "Under Review" in the database
$count = SRPShip::where(['approved' => 'Under Review'])->count();
//If the count is 0 then there are no requests
if($count === 0) {
$requests = null;
} else { //Process each request
$reqs = SRPShip::where(['approved' => 'Under Review'])->get()->toArray();
foreach($reqs as $r) {
$temp['id'] = $r['id'];
$temp['created_at'] = $r['created_at'];
$temp['character_name'] = $r['character_name'];
$temp['fleet_commander_name'] = $r['fleet_commander_name'];
$temp['zkillboard'] = $r['zkillboard'];
$temp['loss_value'] = $r['loss_value'];
$sum_loss += $temp['loss_value'];
//Get the ship type
foreach($shipTypes as $s) {
if($r['ship_type'] == $s->code) {
$temp['ship_type'] = $s->description;
$temp['cost_code'] = $s->code;
}
}
//Get the fleet type
foreach($fleetTypes as $f) {
if($r['fleet_type'] == $f->code) {
$temp['fleet_type'] = $f->description;
}
}
//Calculate the recommended srp amount
foreach($payouts as $p) {
if($r['ship_type'] == $p->code) {
$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'];
}
}
//Push the calculations into the array
array_push($requests, $temp);
}
}
$sum_actual = number_format($sum_actual, 2, '.', ',');
$sum_loss = number_format($sum_loss, 2, '.', ',');
//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('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) {
//Validate the request
$this->validate($request, [
'id' => 'required',
'approved' => 'required',
'paid_value' => 'required',
]);
//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_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_by_id' => auth()->user()->character_id,
'paid_by_name' => auth()->user()->name,
'paid_value' => $paidLoss,
]);
}
if($request->approved == 'Approved') {
return redirect('/srp/admin/display')->with('success', 'SRP Marked as Paid');
} else {
return redirect('/srp/admin/display')->with('error', 'SRP Request Denied.');
}
}
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();
$start = Carbon::now()->toDateTimeString();
$end = Carbon::now()->subMonths(1)->toDateTimeString();
//Declare the Lavacharts variable
$lava = new Lavacharts;
//We need a function from this library rather than recreating a new library
$srpHelper = new SRPHelper();
/**
* Pie chart for the number of approved, denied, and under review payouts currently in the system.
*/
//Get the count of open srp requests
$pieOpen = SRPShip::where([
'approved' => 'Under Review',
['created_at', '>=', $end],
])->count();
//Get the count of approved srp requests
$pieApproved = SRPShip::where([
'approved' => 'Approved',
['created_at', '>=', $end],
])->count();
//Get the count of denied srp requests
$pieDenied = SRPShip::where([
'approved' => 'Denied',
['created_at', '>=', $end],
])->count();
//Create a new datatable for the lavachart.
$srp = $lava->DataTable();
//Add string columns, number columns, and data rows for the chart
$srp->addStringColumn('ISK Value')
->addNumberColumn('ISK')
->addRow(['Approved', $pieApproved])
->addRow(['Denied', $pieDenied])
->addRow(['Under Review', $pieOpen]);
//Create the pie chart in memory with any options needed to render the chart
$lava->PieChart('SRP Stats', $srp, [
'title' => 'SRP Stats',
'is3D' => true,
]);
/**
* Gauage chart for showing number of open srp requests
*/
//Create a new datatable in the
$adur = $lava->DataTable();
//Add string columns, number columns, and data row for the chart
$adur->addStringColumn('Type')
->addNumberColumn('Value')
->addRow(['Under Review', $pieOpen]);
//Create the gauge chart with any options needed to render the chart
$lava->GaugeChart('SRP', $adur, [
'width' => 400,
'greenFrom' => 0,
'greenTo' => 20,
'yellowFrom' => 20,
'yellowTo' => 40,
'redFrom' => 40,
'redTo' => 100,
'majorTicks' => [
'Safe',
'Critical',
],
]);
/**
* Create a vertical chart of all of the cost codes for the ships being SRP'ed.
* The chart will be by cost code of ships being replaced
*/
//Declare the data table
$costCodeChart = $lava->DataTable();
//Get the approved, under review, and denied cost codes and amounts
$t1fdcApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T1FDC',
])->sum('paid_value');
$t1fdcUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T1FDC',
])->sum('loss_value');
$t1fdcDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T1FDC',
])->sum('loss_value');
$t1bcApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T1BC',
])->sum('paid_value');
$t1bcUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T1BC',
])->sum('loss_value');
$t1bcDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T1BC',
])->sum('loss_value');
$t2fdApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T2FD',
])->sum('paid_value');
$t2fdUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T2FD',
])->sum('loss_value');
$t2fdDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T2FD',
])->sum('loss_value');
$t3dApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T3D',
])->sum('paid_value');
$t3dUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T3D',
])->sum('loss_value');
$t3dDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T3D',
])->sum('loss_value');
$t1t2logiApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T1T2Logi',
])->sum('paid_value');
$t1t2logiUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T1T2Logi',
])->sum('loss_value');
$t1t2logiDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T1T2Logi',
])->sum('loss_value');
$reconsApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'REC',
])->sum('paid_value');
$reconsUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'REC',
])->sum('loss_value');
$reconsDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'REC',
])->sum('loss_value');
$t2cApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T2C',
])->sum('paid_value');
$t2cUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T2C',
])->sum('loss_value');
$t2cDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T2C',
])->sum('loss_value');
$t3cApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T3C',
])->sum('paid_value');
$t3cUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T3C',
])->sum('loss_value');
$t3cDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T3C',
])->sum('loss_value');
$commandApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'COM',
])->sum('paid_value');
$commandUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'COM',
])->sum('loss_value');
$commandDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'COM',
])->sum('loss_value');
$interdictorApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'INTD',
])->sum('paid_value');
$interdictorUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'INTD',
])->sum('loss_value');
$interdictorDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'INTD',
])->sum('loss_value');
$t1bsApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'T1BS',
])->sum('paid_value');
$t1bsUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'T1BS',
])->sum('loss_value');
$t1bsDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'T1BS',
])->sum('loss_value');
$dksApproved = SRPShip::where([
'approved' => 'Approved',
'ship_type' => 'DKS',
])->sum('paid_value');
$dksUnderReview = SRPShip::where([
'approved' => 'Under Review',
'ship_type' => 'DKS',
])->sum('loss_value');
$dksDenied = SRPShip::where([
'approved' => 'Denied',
'ship_type' => 'DKS',
])->sum('loss_value');
//Add string column, number columns.
$costCodeChart->addStringColumn('SRP Costs')
->addNumberColumn('Approved')
->addNumberColumn('Under Review')
->addNumberColumn('Denied')
->addRow(['T1FDC', $t1fdcApproved, $t1fdcUnderReview, $t1fdcDenied])
->addRow(['T1BC', $t1bcApproved, $t1bcUnderReview, $t1bcDenied])
->addRow(['T1BS', $t1bsApproved, $t1bsUnderReview, $t1bsDenied])
->addRow(['T2FD', $t2fdApproved, $t2fdUnderReview, $t2fdDenied])
->addRow(['T2C', $t2cApproved, $t2cUnderReview, $t2cDenied])
->addRow(['T1T2Logi', $t1t2logiApproved, $t1t2logiUnderReview, $t1t2logiDenied])
->addRow(['T3D', $t3dApproved, $t3dUnderReview, $t3dDenied])
->addRow(['T3C', $t3cApproved, $t3cUnderReview, $t3cDenied])
->addRow(['RECON', $reconsApproved, $reconsUnderReview, $reconsDenied])
->addRow(['COMMAND', $commandApproved, $commandUnderReview, $commandDenied])
->addRow(['DKS', $dksApproved, $dksUnderReview, $dksDenied]);
$lava->ColumnChart('Cost Codes', $costCodeChart, [
'columns' => 4,
'title' => 'Cost Code SRP Chart',
'titleTextStyle' => [
'color' => '#eb6b2c',
'fontSize' => 14,
],
]);
return view('srp.admin.statistics')->with('lava', $lava);
}
public function displayCostCodes() {
//Declare some variables
$costcodes = array();
$count = 0;
$shipType = SrpShipType::all();
$srpPayout = SrpPayout::all();
foreach($shipType as $ship) {
//Don't process if the code is None
if($ship->code != 'None') {
$tempCode = $ship->code;
$tempDescription = $ship->description;
$temp = SrpPayout::where(['code' => $ship->code])->first();
$tempPayout = $temp->payout;
//Store the data in a temporary variable
$block = [
'code' => $tempCode,
'description' => $tempDescription,
'payout' => $tempPayout,
];
//Push the data into the array
array_push($costcodes, $block);
}
}
return view('srp.admin.costcodes.display')->with('costcodes', $costcodes);
}
public function displayAddCostCode() {
return view('srp.admin.costcodes.add');
}
public function addCostCode(Request $request) {
$this->validate($request, [
'code' => 'required',
'description' => 'required',
'payout' => 'required',
]);
$code = $request->code;
$description = $request->description;
$payout = $request->payout;
$payoutCount = SrpPayout::where(['code' => $code])->count();
$shipTypeCount = SrpShipType::where(['code' => $code])->count();
//If we don't find the cost code, let's add it. otherwise send an error.
if($payoutCount == 0 && $shipTypeCount == 0) {
$payoutTable = new SrpPayout;
$payoutTable->code = $code;
$payoutTable->payout = $payout;
$payoutTable->save();
$shipType = new SrpShipType;
$shipType->code = $code;
$shipType->description = $description;
$shipType->save();
return redirect('/srp/admin/display')->with('success', 'Cost code added.');
} else {
return redirect('/srp/admin/display')->with('error', 'Cost code already exists in the database.');
}
}
public function modifyCostCodes(Request $request) {
$this->validate($request, [
'description' => 'required',
'payout' => 'required',
]);
//Update the SrpShipType
SrpShipType::where(['code' => $request->code])->update([
'description' => $request->description,
]);
//Update the payout
SrpPayout::where(['code' => $request->code])->update([
'payout' => $request->payout,
]);
return redirect('/srp/admin/display')->with('success', 'Payout and Description updated.');
}
}

View File

@@ -0,0 +1,156 @@
<?php
namespace App\Http\Controllers\SRP;
//Laravel Libraries
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
//User Libraries
//Models
use App\Models\SRP\SRPShip;
use App\Models\User\User;
use App\Models\SRP\SrpFleetType;
use App\Models\SRP\SrpShipType;
use App\Models\User\UserAlt;
use App\Models\SRP\SrpPayout;
class SRPController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
}
public function displaySrpHistory() {
}
public function displayPayoutAmounts() {
$payouts = array();
$count = 0;
$shipType = SrpShipType::all();
$srpPayout = SrpPayout::all();
foreach($shipType as $ship) {
//Don't process if the code is None
if($ship->code != 'None') {
$tempCode = $ship->code;
$tempDescription = $ship->description;
$temp = SrpPayout::where(['code' => $ship->code])->first();
$tempPayout = $temp->payout;
$block = [
'code' => $tempCode,
'description' => $tempDescription,
'payout' => $tempPayout,
];
array_push($payouts, $block);
}
}
return view('srp.payouts')->with('payouts', $payouts);
}
public function displaySrpForm() {
$shipTypes = array();
$fleetTypes = array();
$characters = array();
$temp = array();
$alts = null;
//Get all the ship types
$shipTypesTemp = SrpShipType::all();
//Get all of the fleet types
$fleetTypesTemp = SrpFleetType::all();
//Process the ship types and store in the array
foreach($shipTypesTemp as $type) {
$shipTypes[$type->code] = $type->description;
}
//Process the fleet types and store in the array
foreach($fleetTypesTemp as $type) {
$fleetTypes[$type->code] = $type->description;
}
//Get the user id and name, and store in the array
$characters[auth()->user()->character_id] = auth()->user()->getName();
//Get the alts and store in the array
$altCount = UserAlt::where(['main_id' => auth()->user()->character_id])->count();
if($altCount > 0) {
$alts = UserAlt::where([
'main_id' => auth()->user()->character_id,
])->get();
foreach($alts as $alt) {
$characters[$alt->character_id] = $alt->name;
}
}
return view('srp.srpform')->with('fleetTypes', $fleetTypes)
->with('shipTypes', $shipTypes)
->with('characters', $characters);
}
public function storeSRPFile(Request $request) {
$name = null;
$this->validate($request, [
'character' => 'required',
'FC' => 'required',
'FleetType' => 'required',
'zKillboard' => 'required',
'LossValue' => 'required',
'ShipType' => 'required',
]);
//See if the FC Name ties to a user on the services site
$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);
//Convert the FC name to a regular case of characters
$tempFcName = strtolower($request->FC);
$tempFcName = ucwords($tempFcName);
$userCount = User::where(['character_id' => $request->character])->count();
$altCount = UserAlt::where(['character_id' => $request->character])->count();
if($userCount > 0) {
$tempUser = User::where(['character_id' => $request->character])->first();
$name = $tempUser->name;
} else if($altCount > 0) {
$tempAlt = UserAlt::where(['character_id' => $request->character])->first();
$name = $tempAlt->name;
} else {
$name = 'None';
}
$ship = new SRPShip;
$ship->character_id = $request->character;
$ship->character_name = $name;
$ship->fleet_commander_name = $tempFcName;
if(isset($fcId[0])) {
$ship->fleet_commander_id = $fcId[0]->character_id;
}
$ship->zkillboard = $request->zKillboard;
$ship->fleet_type = $request->FleetType;
$ship->ship_type = $request->ShipType;
$ship->loss_value = $lossValue;
$ship->save();
return redirect('/dashboard')->with('success', 'SRP Form Submitted.');
}
}

View File

@@ -1,56 +0,0 @@
<?php
namespace App\Http\Controllers\Structures;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Auth;
use DB;
use App\Models\Corporation\CorpStructure;
use App\Models\Corporation\CorpTaxRatio;
use App\Library\Esi\Esi;
class RegisterStructureController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
$this->middleware('permission:structure.operator');
}
public function displayRegisterStructure() {
//Check to see if the user has the read corp journal esi scope before allowing to register a structure
if(Auth()->user()->hasEsiScope('esi-wallet.read_corporation_wallets.v1')) {
return view('structures.register.register');
} else {
return view('dashboard')->with('error', 'You need to setup your esi scope for read corporation wallets');
}
}
public function storeStructure(Request $request) {
$this->validate($request, [
'system' => 'required',
'structure_name' => 'required',
'tax' => 'required',
'structure_type' => 'required',
]);
$eHelper = new Esi;
$tax = floatval($request->tax);
$structure = new CorpStructure();
$structure->character_id = Auth::user()->character_id;
$structure->corporation_id = $eHelper->FindCorporationId(Auth::user()->character_id);
$structure->corporation_name = $eHelper->FindCorporationName(Auth::user()->character_id);
$structure->region = $request->region;
$structure->system = $request->system;
$structure->structure_name = $request->structure_name;
$structure->structure_type = $request->structure_type;
$structure->save();
//Return the view and the message of user updated
return redirect('/dashboard')->with('success', 'Structure Added to Database');
}
}

View File

@@ -1,58 +0,0 @@
<?php
namespace App\Http\Controllers\Structures;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class StructureAdminController extends Controller
{
public function __construct() {
$this->middleware('role:Admin');
}
public function displayDashboard() {
return view('structures.admin.dashboard');
}
public function storeTaxRatio(Request $request) {
$this->validate($request, [
'corpId',
'corporation',
'type',
'ratio',
]);
$ratio = new CorpTaxRatio;
$ratio->corporation_id = $request->corpId;
$ratio->corporation_name = $request->corporation;
$ratio->structure_type = $request->type;
$ratio->ratio = $request->ratio;
$ratio->save();
return redirect('structure.admin.dashboard');
}
public function updateTaxRatio(Request $request) {
$this->validate($request, [
'corporation',
'type',
'ratio',
]);
CorpTaxRatio::where([
'corporation_name' => $request->corporation,
'structure_type' => $request->type,
])->update([
'ratio' => $request->ratio,
]);
return redirect('/structure/admin/dashboard')->with('success', 'Tax Ratio updated for structure type: ' . $request->type . ' and corporation: ' . $request->corporation);
}
public function displayTaxRatios() {
$taxRatios = CorpTaxRation::all();
return view('structure.admin.taxratios')->with('structures', $structures);
}
}

View File

@@ -1,124 +0,0 @@
<?php
namespace App\Http\Controllers\Structures;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Auth;
use DB;
use Carbon\Carbon;
use App\Library\Structures\StructureTaxHelper;
use App\Library\Esi\Esi;
use App\Library\Lookups\LookupHelper;
use App\User;
use App\Models\User\UserRole;
use App\Models\User\UserPermission;
use App\Models\Corporation\CorpStructure;
use App\Models\Finances\StructureIndustryTaxJournal;
use App\Models\Esi\EsiToken;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
use Seat\Eseye\Exceptions\RequestFailedException;
class StructureController extends Controller
{
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
$this->middleware('permission:structure.operator');
}
public function chooseCorpTaxes() {
$this->middleware('role:Admin');
$corps = CorpStructure::pluck('corporation_name', 'corporation_id');
return view('structures.admin.choosecorporation')->with('corps', $corps);
}
public function displayCorpTaxes(Request $request) {
$this->middleware('role:Admin');
$corpId = $request->corpId;
$months = 3;
//Declare the structure tax helper class
$sHelper = new StructureTaxHelper();
//Get the dates we are working with
$dates = $sHelper->GetTimeFrameInMonths($months);
foreach($dates as $date) {
$totalTaxes[] = [
'date' => $date['start']->toFormattedDateString(),
'tax' => number_format($sHelper->GetTaxes($corpId, 'Market', $date['start'], $date['end']), 2, '.', ','),
'revenue' => number_format($sHelper->GetRevenue($corpId, 'Market', $date['start'], $date['end']), 2, '.', ',')
];
}
//Return the view with the data passed to it
return view('structures.admin.choosecorptaxes')->with('totalTaxes', $totalTaxes);
}
public function displayTaxes() {
//Declare new Lookup helper
$helper = new LookupHelper();
//Declare the structure tax helper class
$sHelper = new StructureTaxHelper();
$months = 3;
$totalTaxes = array();
//Get the character's corporation from the lookup table or esi
$corpId = $helper->LookupCharacter(Auth::user()->character_id);
//Get the dates we are working with
$dates = $sHelper->GetTimeFrameInMonths($months);
//Get the market taxes for this month from the database
foreach($dates as $date) {
$totalTaxes[] = [
'date' => $date['start']->toFormattedDateString(),
'tax' => number_format($sHelper->GetTaxes($corpId, 'Market', $date['start'], $date['end']), 2, '.', ','),
'revenue' => number_format($sHelper->GetRevenue($corpId, 'Market', $date['start'], $date['end']), 2, '.', ',')
];
}
return view('structures.user.taxes')->with('totalTaxes', $totalTaxes);
}
public function displayTaxHistory(Request $request) {
//Declare new Lookup helper
$helper = new LookupHelper();
//Get the months from the request
$months = $request->months;
//Get the character's corporation from the lookup table or esi
$corpId = $helper->LookupCharacter(Auth::user()->character_id);
//Declare the structure tax helper class
$sHelper = new StructureTaxHelper();
//Get the dates we are working with
$dates = $sHelper->GetTimeFrameInMonths($months);
//Build the array for displaying the data on the view
$totalTaxes = array();
foreach($dates as $date) {
$totalTaxes[] = [
'date' => $date['start']->toFormattedDateString(),
'tax' => number_format($sHelper->GetTaxes($corpId, 'Market', $date['start'], $date['end']), 2, '.', ','),
'revenue' => number_format($sHelper->GetRevenue($corpId, 'Market', $date['start'], $date['end']), 2, '.', ',')
];
}
return view('structures.user.taxhistory')->with(compact('totalTaxes', 'months'));
}
}

View File

@@ -0,0 +1,156 @@
<?php
namespace App\Http\Controllers\SystemRentals;
//Internal Library
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
use DB;
use Carbon\Carbon;
//Models
use App\Models\SystemRentals\RentalSystem;
//Library
use App\Library\Lookups\LookupHelper;
use App\Library\Esi\Esi;
class RentalAdminController extends Controller
{
//Constructor
public function __construct() {
$this->middleware('auth');
$this->middleware('role:Admin');
}
/**
* Function to display all active rental systems and
* the information regarding the rental systems
*/
public function displayRentalSystems() {
//Get the rental systems from the database
$rentals = RentalSystem::all();
foreach($rentals as $rental) {
//Format the rental cost
if($rental->rental_cost > 1000000000.00) {
$rental->rental_cost = $rental->rental_cost / 1000000000.00;
$rental->rental_cost = $rental->rental_cost . "B";
} else if($rental->rental_cost > 1000000.00 && $rental->rental_cost < 999999999.99) {
$rental->rental_cost = $rental->rental_cost / 1000000.00;
$rental->rental_cost = $rental->rental_cost . "M";
}
//Format the date
$rental->paid_until = Carbon::parse($rental->paid_until)->format('Y-m-d');
}
//Return the view with the data
return view('rental.list')->with('rentals', $rentals);
}
/**
* Function to display form for adding new rental system
*/
public function displayAddRentalSystem() {
return view('rental.add');
}
/**
* Function to add new rental system to the database
*/
public function addRentalSystem(Request $request) {
$this->validate($request, [
'contact_name' => 'required',
'contact_corp_name' => 'required',
'system' => 'required',
'rental_cost' => 'required',
'paid_until' => 'required',
]);
//Declare the variables and classes needed
$lookup = new LookupHelper;
//From the character name find the character id
$charId = $lookup->CharacterNameToId($request->contact_name);
//From the corporation name find the corporation id
$corpId = $lookup->CorporationNameToId($request->contact_corp_name);
//From the system name find the system id
$systemId = $lookup->SystemNameToId($request->system);
//Sanitize the bid amount
if(preg_match('(m|M|b|B)', $request->rental_cost) === 1) {
if(preg_match('(m|M)', $request->rental_cost) === 1) {
$cStringSize = strlen($request->rental_cost);
$tempCol = str_split($request->rental_cost, $cStringSize - 1);
$rentalCost = $tempCol[0];
$rentalCost = $rentalCost * 1000000.00;
} else if(preg_match('(b|B)', $request->rental_cost) === 1) {
$cStringSize = strlen($request->rental_cost);
$tempCol = str_split($request->rental_cost, $cStringSize - 1);
$rentalCost = $tempCol[0];
$rentalCost = $rentalCost * 1000000000.00;
}
} else {
$rentalCost = $request->rental_cost;
}
//Create the database model
$rental = new RentalSystem;
$rental->contact_id = $charId;
$rental->contact_name = $request->contact_name;
$rental->corporation_id = $corpId;
$rental->corporation_name = $request->contact_corp_name;
$rental->system_id = $systemId;
$rental->system_name = $request->system;
$rental->rental_cost = $rentalCost;
$rental->paid_until = $request->paid_until;
$rental->save();
return redirect('/system/rental/dashboard')->with('success', 'Rental System Added.');
}
/**
* Function to update paid until section of the rental system in the database
*/
public function updateRentalSystem(Request $request) {
$this->validate($request, [
'paid_until' => 'required',
'contact_id' => 'required',
'corporation_id' => 'required',
'system_id' => 'required',
]);
RentalSystem::where([
'contact_id' => $request->contact_id,
'corporation_id' => $request->corporation_id,
'system_id' => $request->system_id,
])->update([
'paid_until' => $request->paid_until,
]);
return redirect('/system/rental/dashboard')->with('success', 'Rental System updated.');
}
/**
* Function to remove rental system from the database
*/
public function removeRentalSystem(Request $request) {
$this->validate($request, [
'contact_id' => 'required',
'corporation_id' => 'required',
'system_id' => 'required',
]);
RentalSystem::where([
'contact_id' => $request->contact_id,
'corporation_id' => $request->corporation_id,
'system_id' => $request->system_id,
])->delete();
return redirect('/system/rental/dashboard')->with('success', 'Removed renter from database.');
}
}

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Http\Controllers\Test;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Library\Lookups\LookupHelper;
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 CharacterLookupTest(Request $request) {
}
}

View File

@@ -5,17 +5,18 @@ namespace App\Http\Controllers\Wiki;
//Laravel libraries //Laravel libraries
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use DB;
use Auth; use Auth;
//User Libraries //User Libraries
use App\Library\Lookups\LookupHelper; use App\Library\Lookups\LookupHelper;
use App\Library\Wiki\WikiHelper;
//Models //Models
use App\Models\Doku\DokuGroupNames; use App\Models\Doku\DokuGroupNames;
use App\Models\Doku\DokuMember; use App\Models\Doku\DokuMember;
use App\Models\Doku\DokuUser; use App\Models\Doku\DokuUser;
use App\Models\Admin\AllowedLogin; use App\Models\Admin\AllowedLogin;
use App\Models\User\User;
class WikiController extends Controller class WikiController extends Controller
{ {
@@ -23,32 +24,6 @@ class WikiController extends Controller
$this->middleware('auth'); $this->middleware('auth');
$this->middleware('role:Renter'); $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) {
$charId = $helper->CharacterNameToId($user);
$corpId = $helper->LookupCharacter($charId);
$allianceId = $helper->LookupCorporation($corpId);
if(in_array($allianceId, $legacy) || in_array($allianceId, $renter) || $allianceId == 99004116) {
//Do nothing
} else {
DokuUser::where(['name' => $user])->delete();
}
}
return view('admin.dashboard')->with('success', 'Wiki has been purged.');
}
public function displayRegister() { public function displayRegister() {
//make user name syntax like we want it. //make user name syntax like we want it.
@@ -57,9 +32,19 @@ class WikiController extends Controller
$name = str_replace(' ', '_', $name); $name = str_replace(' ', '_', $name);
//Check to see if the user is already registered in the database //Check to see if the user is already registered in the database
$check = DB::select('SELECT login FROM wiki_user WHERE login = ?', [$name]); $count = DokuUser::where([
if(isset($check[0]) && ($check[0]->login === $name)) { 'login' => $name,
return redirect('/dashboard')->with('error', 'Already registered for the wiki!'); ])->count();
//If the count is greater than zero, also check the login name as a reference
if($count > 0) {
$check = DokuUser::where([
'login' => $name,
])->first();
if($check->login === $name) {
return redirect('/dashboard')->with('error', 'Already registered for the wiki!');
}
} }
return view('wiki.user.register')->with('name', $name); return view('wiki.user.register')->with('name', $name);
@@ -82,8 +67,10 @@ class WikiController extends Controller
if(Auth::user()->hasRole('User')) { if(Auth::user()->hasRole('User')) {
$role = 1; //User role id from wiki_groupname table $role = 1; //User role id from wiki_groupname table
$roleDescription = 'user';
} else if(Auth::user()->hasRole('Renter')) { } else if(Auth::user()->hasRole('Renter')) {
$role = 8; //Renter role id from wiki_groupname table $role = 8; //Renter role id from wiki_groupname table
$roleDescription = 'renter';
} }
//Load the model //Load the model
@@ -102,10 +89,16 @@ class WikiController extends Controller
$user->save(); $user->save();
//Get the user from the table to get the uid //Get the user from the table to get the uid
$uid = DB::select('SELECT id FROM wiki_user WHERE login = ?', [$name]); $uid = DokuUser::where([
$member->uid = $uid[0]->id; 'login' => $name,
])->first();
//Save information in the model
$member->uid = $uid->id;
$member->gid = $role; $member->gid = $role;
$member->groupname = $roleDescription;
$member->save(); $member->save();
//Return to the dashboard view //Return to the dashboard view
return redirect('/dashboard')->with('success', 'Registration successful. Your username is: ' . $name); return redirect('/dashboard')->with('success', 'Registration successful. Your username is: ' . $name);
} }
@@ -114,10 +107,15 @@ class WikiController extends Controller
$name = Auth::user()->name; $name = Auth::user()->name;
$name = strtolower($name); $name = strtolower($name);
$name = str_replace(' ', '_', $name); $name = str_replace(' ', '_', $name);
$check = DB::select('SELECT login FROM wiki_user WHERE login = ?', [$name]);
if(!isset($check[0])) { //Get the password
return redirect('/dashboard')->with('error', 'Login Not Found!'); $check = DokuUser::where([
} 'login' => $name
])->count();
if($check == 0) {
return redirect('/dashboard')->with('error', 'Login Not Found');
}
return view('wiki.user.changepassword')->with('name', $name); return view('wiki.user.changepassword')->with('name', $name);
} }
@@ -141,30 +139,14 @@ class WikiController extends Controller
$name = Auth::user()->name; $name = Auth::user()->name;
$name = strtolower($name); $name = strtolower($name);
$name = str_replace(' ', '_', $name); $name = str_replace(' ', '_', $name);
//Update the password for the login name //Update the password for the login name
DB::table('wiki_user') DokuUser::where([
->where('login', $name) 'login' => $name,
->update(['pass' => $password]); ])->update([
'pass' => $password,
]);
return redirect('/dashboard')->with('success', 'Password changed successfully. Your username is: ' . $name); 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);
}
} }

View File

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

View File

@@ -2,29 +2,120 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
//Internal Library
use Closure; use Closure;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Socialite; use Socialite;
use DB; use DB;
use App\User;
//Libraries
use Seat\Eseye\Cache\NullCache; use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration; use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication; use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye; use Seat\Eseye\Eseye;
//Models
use App\Models\User\User;
use App\Models\Esi\EsiToken;
use App\Models\Esi\EsiScope;
class Callback class Callback
{ {
/** /**
* Handle an incoming request. * Handle an incoming request for callback. Set to handle the request after the
* login controller does what it needs to do.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
*/ */
public function handle($request, Closure $next, $guard = null) public function handle($request, Closure $next, $ssoUser)
{ {
return $next($request); $response = $next($request);
if(isset($ssoUser->refreshToken)) {
//See if an access token is present for the user
$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 or updating the token, update the table for the scopes.
$this->SetScopes($ssoUser->user['Scopes'], $ssoUser->id);
} else {
$created = $this->createAlt($ssoUser);
}
return $response;
}
/**
* 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,
'inserted_at' => time(),
'expires_in' => $eve_user->expiresIn,
]);
}
/**
* Create a new ESI Token in the database
*/
private function SaveEsiToken($eve_user) {
$token = new EsiToken;
$token->character_id = $eve_user->id;
$token->access_token = $eve_user->token;
$token->refresh_token = $eve_user->refreshToken;
$token->inserted_at = time();
$token->expires_in = $eve_user->expiresIn;
$token->save();
}
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;
$data->scope = $scope;
$data->save();
}
}
/**
* Check if an alt exists in the database, else, create and
* return the user object.
*
* @param \Laravel\Socialite\Two\User $user
*/
private function createAlt($user) {
$altCount = UserAlt::where('character_id', $user->id)->count();
if($altCount == 0) {
$newAlt = new UserAlt;
$newAlt->name = $user->getName();
$newAlt->main_id = auth()->user()->getId();
$newAlt->character_id = $user->id;
$newAlt->avatar = $user->avatar;
$newAlt->access_token = $user->token;
$newAlt->owner_hash = $user->owner_hash;
$newAlt->inserted_at = time();
$newAlt->expires_in = $user->expiresIn;
$newAlt->save();
return 1;
} else {
return 0;
}
} }
} }

View File

@@ -7,7 +7,7 @@ use Illuminate\Support\Facades\Auth;
use Socialite; use Socialite;
use DB; use DB;
use App\User; use App\Models\User\User;
use Seat\Eseye\Cache\NullCache; use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration; use Seat\Eseye\Configuration;

View File

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

View File

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

View File

@@ -0,0 +1,40 @@
<?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 ItemPricesUpdateJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$moonHelper = new MoonCalc;
$moonHelper->FetchNewPrices();
}
}

View File

@@ -0,0 +1,152 @@
<?php
namespace App\Jobs\Commands\Moons;
//Internal Libraries
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Log;
//App Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Lookups\LookupHelper;
use App\Library\Structures\StructureHelper;
//App Models
use App\Models\Moon\CorpMoonLedger;
use App\Models\Moon\CorpMoonObserver;
class FetchMoonLedgerJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Retries
*
* @var int
*/
public $retries = 3;
/**
* Private Variables
*/
private $charId;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($charId)
{
//Set the character id
$this->charId = $charId;
//Set the connection
$this->connection = 'redis';
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare Variables
$esiHelper = new Esi;
$lookup = new LookupHelper;
$response = null;
$structureInfo = null;
//Get the configuration for the main site
$config = config('esi');
//Check for esi scope for the character
if(!$esiHelper->HaveEsiScope($this->charId, 'esi-industry.read_corporation_mining.v1') || !$esiHelper->HaveEsiScope($this->charId, 'esi-universe.read_structures.v1')) {
Log::critical('The primary character does not have the necessary scopes for FetchRentalMoonLedgerCommand.');
return;
}
//Get the refresh token if the scope checks have passed
$refreshToken = $esiHelper->GetRefreshToken($this->charId);
//Setup the esi information
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//Get the character data from the lookup table
$character = $lookup->GetCharacterInfo($this->charId);
//Get the corporation data from the lookup table
$corporation = $lookup->GetCorporationInfo($character->corporation_id);
//Setup the structure helper
$structure = new StructureHelper($this->charId, $character->corporation_id, $esi);
//Get the moon observers from the database
$observers = CorpMoonObserver::where([
'corporation_id' => $character->corporation_id,
])->get();
foreach($observers as $observer) {
//Try to get the ledger data from the esi
try {
$ledgers = $esi->invoke('get', '/corporation/{corporation_id}/mining/observers/{observer_id}/', [
'corporation_id' => $character->corporation_id,
'observer_id' => $observer->observer_id,
]);
} catch(RequestFailedException $e) {
//Log the exception
Log::critical('FetchMoonLedger job failed to get the mining ledgers.');
}
if($ledgers != null) {
foreach($ledgers as $ledger) {
//Get the ore name from the lookup table
$ore = $lookup->ItemIdToName($ledger->type_id);
//Get the character name from the lookup helper
$charInfo = $lookup->GetCharacterInfo($ledger->character_id);
//Get the corporation info from the lookup helper
$corpInfo = $lookup->GetCorporationInfo($charInfo->corporation_id);
//Get the recorded corporation information
$recordedCorpInfo = $lookup->GetCorporationInfo($ledger->recorded_corporation_id);
$entries[] = [
'corporation_id' => $corpInfo->corporation_id,
'corporation_name' => $corpInfo->name,
'character_id' => $ledger->character_id,
'character_name' => $charInfo->name,
'observer_id' => $observer->observer_id,
'observer_name' => $observer->observer_name,
'type_id' => $ledger->type_id,
'ore' => $ore,
'quantity' => $ledger->quantity,
'recorded_corporation_id' => $ledger->recorded_corporation_id,
'recorded_corporation_name' => $recordedCorpInfo->name,
'last_updated' => $ledger->last_updated,
'created_at' => $ledger->last_updated . ' 23:59:59',
'updated_at' => $ledger->last_updated . ' 23:59:59',
];
}
//Insert or ignore each entry into the database
CorpMoonLedger::insertOrIgnore($entries);
Log::info('FetchMoonLedgerJob inserted up to ' . count($entries) . 'into the database.');
}
}
}
}

View File

@@ -0,0 +1,130 @@
<?php
namespace App\Jobs\Commands\Moons;
//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 Log;
//App Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Lookups\LookupHelper;
use App\Library\Structures\StructureHelper;
//App Models
use App\Models\Moon\CorpMoonObserver;
class FetchMoonObserverJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Retries
*
* @var int
*/
public $retries = 3;
/**
* Private variables
*/
private $charId;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($charId)
{
//Set the character id
$this->charId = $charId;
//Set the connection
$this->connection = 'redis';
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare some variables
$lookup = new LookupHelper;
$esiHelper = new Esi;
//Get the configuration from the main site
$config = config('esi');
//Check for the esi scope
if(!$esiHelper->HaveEsiScope($this->charId, 'esi-industry.read_corporation_mining.v1') || !$esiHelper->HaveEsiScope($this->charId, 'esi-universe.read_structures.v1')) {
Log::warning('Esi scopes were not found for Fetch Moon Observers job.');
return;
}
//Get the refresh token for the character
$refreshToken = $esiHelper->GetRefreshToken($this->charId);
//Get the esi variable
$esi = $esiHelper->SetupEsiAuthentication($refreshToken);
//With the lookup helper, get the character information
$character = $lookup->GetCharacterInfo($this->charId);
//With the lookup helper, get the corporation information
$corporation = $lookup->GetCorporationInfo($character->corporation_id);
//Delcare the structure helper since we have the necessary data
$structureHelper = new StructureHelper($this->charId, $character->corporation_id, $esi);
//Get the mining observers for the corporation's from esi
try {
$response = $esi->invoke('get', '/corporation/{corporation_id}/mining/observers/', [
'corporation_id' => $character->corporation_id,
]);
} catch(RequestFailedException $e) {
Log::critical('FetchMoonObservers failed to get the moon observers for the corporation');
return null;
}
//Run through the mining observers, and add them to the database as needed
foreach($response as $observer) {
$count = CorpMoonObserver::where(['observer_id' => $observer->observer_id])->count();
//If the observer is not found, then add it to the database
if($count == 0) {
//Get the structure information from the universe structure esi endpoint
$structureInfo = $structureHelper->GetStructureInfo($observer->observer_id);
//Create a new corp moon observer in the database
$obs = new CorpMoonObserver;
$obs->corporation_id = $character->corporation_id;
$obs->corporation_name = $corporation->name;
$obs->observer_id = $observer->observer_id;
$obs->observer_name = $structureInfo->name;
$obs->observer_owner_id = $structureInfo->owner_id;
$obs->solar_system_id = $structureInfo->solar_system_id;
$obs->observer_type = $observer->observer_type;
$obs->observer_type_id = $structureInfo->type_id;
$obs->last_updated = $observer->last_updated;
$obs->save();
} else {
CorpMoonObserver::where([
'observer_id' => $observer->observer_id,
])->update([
'last_updated' => $observer->last_updated,
]);
}
}
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Jobs\Commands\Moons;
//Internal Libraries
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Log;
use Carbon\Carbon;
//App Models
use App\Models\Moon\CorpMoonLedger;
class PurgeMoonLedgerJob 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()
{
//Set the connection for the job
$this->connection = 'redis';
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$previous = Carbon::now()->subDays(60);
//Remove old ledger entries
CorpMoonLedger::where('created_at', '<', $previous)->delete();
}
}

View File

@@ -0,0 +1,143 @@
<?php
namespace App\Jobs\Commands;
//Internal Libraries
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Log;
//App Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Lookups\LookupHelper;
//App Models
use App\Models\RentalMoonLedger;
use App\Models\RentalMoonObserver;
class FetchRentalMoonLedgerJob 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()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$esiHelper = new Esi;
$lookup = new LookupHelper;
$response = null;
$structureInfo = null;
$entries = array();
//Get the configuration for the main site
$config = config('esi');
//Check for the esi scope
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-industry.read_corporation_mining.v1') || !$esiHelper->HaveEsiScope($config['primary'], 'esi-universe.read_structures.v1')) {
Log::critical('The primary character does not have the necessary scopes for FetchRentalMoonLedgerCommand.');
return;
}
//Get the refresh token if scope checks have passed
$refreshToken = $esiHelper->GetRefreshtoken($config['primary']);
//Get the character data from the lookup table if possible or esi
$character = $lookup->GetCharacterInfo($config['primary']);
//Get all of the rental moon observers from the database
$observers = RentalMoonObserver::all();
//Dump the mining ledger table for rental moons
RentalMoonLedger::truncate();
//Foreach observer get the ledger
foreach($observers as $observer) {
//Get the observer name.
$observerInfo = Structure::where([
'structure_id' => $observer->observer_id,
])->first();
try {
$ledgers = $esi->invoke('get', '/corporation/{corporation_id}/mining/observers/{observer_id}/', [
'corporation_id' => $character->corporation_id,
'observer_id' => $observer->observer_id,
]);
} catch(RequestFailedException $e) {
//If an exception has occurred, then log it
Log::critical('FetchRentalMoonLedger command failed to get the mining ledger for observer id: ' . $observer->observer_id);
}
if($ledgers != null) {
foreach($ledgers as $ledger) {
//Get the ore name from the lookup table
$ore = $lookup->ItemIdToName($ledger->type_id);
//Get the character name from the lookup helper using the characterId
$charInfo = $lookup->GetCharacterInfo($ledger->character_id);
//Get the corporation information
$corpInfo = $lookup->GetCorporationInfo($charInfo->corporation_id);
//Get the recorded corporation information
$recordedCorpInfo = $lookup->GetCorporationInfo($ledger->recorded_corporation_id);
$entries[] = [
'corporation_id' => $corpInfo->corporation_id,
'corporation_name' => $corpInfo->name,
'character_id' => $ledger->character_id,
'character_name' => $charInfo->name,
'observer_id' => $observer->observer_id,
'observer_name' => $observerInfo->name,
'type_id' => $ledger->type_id,
'ore' => $ore,
'quantity' => $ledger->quantity,
'recorded_corporation_id' => $ledger->recorded_corporation_id,
'recorded_corporation_name' => $recordedCorpInfo->name,
'last_updated' => $ledger->last_updated,
'created_at' => $ledger->last_updated . ' 23:59:59',
'updated_at' => $ledger->last_updated . ' 23:59:59',
];
}
//Insert or ignore each of the records saved into the array through the foreach loop
RentalMoonLedger::insertOrIgnore($entries);
Log::info(
'FetchRentalMoonLedgerJob inserted up to ' .count($entires) . ' new ledger entries.'
);
}
}
}
}

View File

@@ -0,0 +1,97 @@
<?php
namespace App\Jobs\Commands;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Log;
//App Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Lookups\LookupHelper;
//App Models
use App\Models\Moon\RentalMoonObserver;
class FetchRentalMoonObserversJob 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()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare some variables
$lookup = new LookupHelper;
$esi = new Esi;
$obss = array();
//Get the configuration for the main site
$config = config('esi');
//Check for the esi scope
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-industry.read_corporation_mining.v1') || !$esiHelper->HaveEsiScope($config['primary'], 'esi-universe.read_structures.v1')) {
Log::critical('The primary character does not have the necessary scopes for FetchRentalMoonObservers.');
return;
}
//Get the refresh token for spatial forces
$refreshToken = $esiHelper->GetRefreshToken($config['primary']);
//Get the character data from the lookup table if possible or esi
$character = $lookup->GetCharacterInfo($config['primary']);
//Get the mining observers for spatial forces from esi
try {
$responses = $esi->invoke('get', '/corporation/{corporation_id}/mining/observers/', [
'corporation_id' => $character->corporation_id,
]);
} catch(RequestFailedException $e) {
Log::critical('RentalMoonObservers failed to get the moon observers for Spatial Forces.');
}
//Run through the mining observers, and add them to the database as needed
foreach($responses as $observer) {
//Populate the array with the data, so we can do an insert or ignore after the foreach loop is completed.
$obss[] = [
'observer_id' => $observer->observer_id,
'observer_type' => $observer->observer_type,
'last_updated' => $esi->DecodeDate($observer->last_updated)
];
}
RentalMoonObserver::insertOrIgnore($obss);
}
}

View File

@@ -0,0 +1,95 @@
<?php
namespace App\Jobs\Commands\PublicContracts;
//Internal Libraries
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Log;
use Carbon\Carbon;
//App Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Lookups\LookupHelper;
//Jobs
use App\Jobs\Commands\PublicContracts\GetPublicContractItemsJob;
//Models
use App\Models\PublicContracts\PublicContract;
use App\Models\PublicContracts\PUblicContractItem;
class GetPublicContractItemsJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Private Variables
*/
private $esi;
private $contractId;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($esi, $contract)
{
//Setup the variables
$this->esi = $esi;
$this->contractId = $contract;
//Set the connection
$this->connection = 'redis';
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Get the items from esi
$responses = $this->esi->invoke('get', '/contracts/public/items/{contract_id}/', [
'contract_id' => $this->contract,
]);
foreach($response as $resp) {
//See if the item exists
$count = PublicContractItems::where([
'record_id' => $resp->record_id,
])->count();
//If the item doesn't exist in the database, save it to the database
if($count == 0) {
$contractItem = new PublicContractItems;
if(isset($resp->is_blueprint_copy)) {
$contractItem->is_blueprint_copy = $resp->is_blueprint_copy;
}
$contractItem->is_included = $resp->is_included;
if(isset($resp->item_id)) {
$contractItem->item_id = $resp->item_id;
}
if(isset($resp->material_efficiency)) {
$contractItem->material_efficiency = $resp->material_efficiency;
}
$contractItem->quantity = $resp->quantity;
$contractItem->recorded_id = $resp->recorded_id;
if(isset($resp->runs)) {
$contractItem->runs = $resp->runs;
}
if(isset($resp->time_efficiency)) {
$contractItem->time_efficiency = $resp->time_efficiency;
}
$contractItem->type_id = $resp->type_id;
$contractItem->save();
}
}
}
}

View File

@@ -0,0 +1,115 @@
<?php
namespace App\Jobs\Commands\PublicContracts;
//Internal Libraries
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Log;
use Carbon\Carbon;
//App Library
use Seat\Eseye\Exceptions\RequestFailedException;
use App\Library\Esi\Esi;
use App\Library\Lookups\LookupHellper;
//Models
use App\Models\PublicContracts\PublicContract;
class GetPublicContractsJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Job Variables
*/
private $esi;
private $region;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($regionId, $esi = null)
{
//Setup the esi authentication container
if($esi == null) {
$this->esi = new Esi();
} else {
$this->esi = $esi;
}
//Set the region code
$this->region = $regionId;
//Set the connection
$this->connection = 'redis';
}
/**
* Execute the job.
* The job gets all of the contracts in a region
*
* @return void
*/
public function handle()
{
$responses = $this->esi->invoke('get', '/contracts/public/{region_id}/', [
'region_id' => $this->region,
]);
foreach($response as $resp) {
$count = PublicContract::where([
'contract_id' => $resp->contract_id,
])->count();
if($count == 0) {
$pub = new PublicContract;
$pub->region_id = $this->region;
if(isset($resp->buyout)) {
$pub->buyout = $resp->buyout;
}
if(isset($resp->collateral)) {
$pub->collateral = $resp->collateral;
}
$pub->contract_id = $resp->contract_id;
$pub->date_expired = $resp->date_expired;
$pub->date_issed = $resp->date_issed;
if(isset($resp->days_to_complete)) {
$pub->days_to_complete = $resp->days_to_complete;
}
if(isset($resp->end_location_id)) {
$pub->end_location_id = $resp->end_location_id;
}
if(isset($resp->for_corporation)) {
$pub->for_corporation = $resp->for_corporation;
}
$pub->issuer_corporation_id = $resp->issuer_corporation_id;
$pub->issuer_id = $resp->issuer_id;
if(isset($resp->price)) {
$pub->price = $resp->price;
}
if(isset($resp->reward)) {
$pub->reward = $resp->reward;
}
if(isset($resp->start_location_id)) {
$pub->start_location_id = $resp->start_location_id;
}
if(isset($resp->title)) {
$pub->title = $resp->title;
}
$pub->type = $resp->type;
if(isset($resp->volume)) {
$pub->volume = $resp->volume;
}
//Save the new contract
$pub->save();
//Dispatch a job to collect the contract items
GetPublicContractItemsJob::dispatch($this->esi, $resp->contract_id);
}
}
}
}

View File

@@ -0,0 +1,68 @@
<?php
namespace App\Jobs\Commands\PublicContracts;
//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 Carbon\Carbon;
use Log;
//Library
//Models
use App\Models\PublicContracts\PublicContract;
use App\Models\PublicContracts\PublicContractItem;
/**
* Job to purge some old data from the public contracts
*/
class PurgePublicContracts implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set the connection
$this->connection = 'redis';
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Get today's date
$today = Carbon::now();
//If the date for a contract has expired, then purge it from the system
$contracts = PublicContract::all();
//Check each contract to see if it has expired
foreach($contracts as $contract) {
//If the contract has expired, then delete the contract and all of it's items
if($today->greaterThan($contract->date_expired)) {
//Delete the contract
PublicContract::where([
'id' => $contract->id,
])->delete();
//Delete the items from the contract from the other table
PublicContract::where([
'contract_id' => $contract->id,
])->delete();
}
}
}
}

View File

@@ -0,0 +1,195 @@
<?php
namespace App\Jobs\Commands\RentalMoons;
//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 Log;
use Carbon\Carbon;
//Library
use App\Library\Lookups\LookupHelper;
//Jobs
use App\Jobs\ProcessSendEvveMailJob;
//Models
use App\Models\MoonRentals\AllianceRentalMoon;
use App\Models\Mail\SentMail;
/**
* This job will send out a reminder about the moon rental payment being due
* when it's due based on the rental paid date versus rental date. If the paid
* date is in the future from today, then we don't need to send out a reminder.
* If the paid date is today or less, then we need to send out a reminder about
* paying for the moon rental.
*/
class SendMoonRentalPaymentReminderJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 1600;
/**
* Retries
*
* @var int
*/
public $retries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set the queue connection
$this->connection = 'redis';
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Get today's date
$today = Carbon::now();
$today->second = 1;
$today->minute = 0;
$today->hour = 0;
//Declare some other variables
$totalCost = 0.00;
$moonList = array();
$delay = 30;
$lookup = new LookupHelper;
$config = config('esi');
//Get all of the contacts from the rentals group
$contacts = AllianceMoonRental::select('rental_contact_id')->groupBy('rental_contact_id')->get();
//For each of the contacts, totalize the moon rentals, and create a reminder mail
foreach($contacts as $contact) {
//Get the moons the renter is renting, but only get the ones whose paid date is not after today.
$dues = $this->GetMoonDueList($contact->rental_contact_id);
//Get the list of moons for the mail body.
$alls = $this->GetMoonRentalList($contact->rental_contact_id);
//Totalize the cost for the moons whose rent is due
$cost = $this->TotalizeMoonCost($contact->rental_contact_id);
//For each of the rentals, build the mail body, and totalize the cost of the moon
$body = "Moon Rent is due for the following moons:<br>";
foreach($rentalsDue as $due) {
$body .= $due . "<br>";
}
//Put the price for the moons
$body .= "The price for next month's rent is " . number_format($cost, 0, ".", ",") . "<br>";
$body .= "Rental Payment is due on the 1st of the month. If the rental payment is not remitted to Spatial Forces by the 3rd of the month, the rental claim shall be forfeited.<br>";
$body .= "Rental Payment should be transferred to Spatial Forces.<br>";
$body .= "In the description of the payment please put the following transaction identification: " . $transId . "<br>";
$body .= "<br>";
$body .= $contact->contact_name . " is responsible for payment of the moons.<br>";
$body .= "The following moons are being rented:<br>";
foreach($alls as $all) {
$body .= $all . "<br>";
}
$body .= "<br>";
$body .= "Sincerely,<br>";
$body .= "Warped Intentions Leadership<br>";
//Create the subject line
$subject = "Warped Intentions Moon Rental Payment Due for " . $today->englishMonth;
//Dispatch the mail job if the contact type is a character, otherwise
//dispatch the job to the ceo of the corporation instead. If the contact is an alliance
//dispatch the job to the ceo of the holding corporation.
if($contact->contact_type == 'Character') {
ProcessSendEveMailJob::dispatch($body, (int)$contact->rental_contact_id, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds($delay));
//Increment the delay to get ready for the next mail job
$delay += 30;
} else if($contact->contact_type == 'Corporation') {
//Get the CEO of the corporation from the lookup helper
$corporation = $lookup->GetCorporationInfo($contact->rental_contact_id);
$charId = $corporation->ceo_id;
//Send out the mail
ProcessSendEveMailJob::dispatch($body, (int)$charId, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds($delay));
//Increment the delay to get ready for the next mail job
$delay += 30;
} else if($contact->contact_type == 'Alliance') {
//Get the holding corporation from the lookup helper
$alliance = $lookup->GetAllianceInfo($contact->rental_contact_id);
//Get the CEO of the corporation of the holding corp from the lookup helper
$corporation = $lookup->GetCorporationInfo($alliance->executor_corporation_id);
$charId = $corporation->ceo_id;
//Send out the mail
ProcessSendEveMailJob::dispatch($body, (int)$charId, 'character', $subject, $config['primaryh'])->onQueue('mail')->delay(Carbon::now()->addSeconds($delay));
//Increment the detaly to get ready for the next mail job
$delay += 30;
}
}
}
private function GetMoonRentalsList($contact) {
//Declare the variables
$list = array();
$moons = AllianceMoonRental::where([
'rental_contact_id' => $contact,
])->get();
foreach($moons as $moon) {
$temp = 'Rental: ' . $moon->region . ' - ' . $moon->system . ' - ' . $moon->planet . ' - ' . $moon->moon;
array_push($list, $temp);
}
//Return the list
return $list;
}
private function GetMoonDueList($contact) {
//Declare the variables
$list = array();
$moons = AllianceMoonRental::where([
'rental_contact_id' => $contact,
])->where('paid_until', '<=', $today)->get();
//Create the list
foreach($moons as $moon) {
$temp = 'Rental: ' . $moon->region . ' - ' . $moon->system . ' - ' . $moon->planet . ' - ' . $moon->moon;
array_push($list, $temp);
}
//Return the list
return $list;
}
private function TotalizeCost($rentals, $rentalType) {
//Declare the stuff we need
$totalCost = 0.00;
//Totalize the cost
foreach($rentals as $rental) {
if($rentalType = 'In Alliance') {
$totalCost += $rental->alliance_rental_price;
} else {
$totalCost += $rental->out_of_alliance_rental_price;
}
}
return $totalCost;
}
}

View File

@@ -0,0 +1,153 @@
<?php
namespace App\Jobs\Commands\RentalMoons;
//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 Carbon\Carbon;
use Log;
//Library
use App\Library\Lookups\LookupHelper;
//Models
use App\Models\MoonRentals\AllianceRentalMoon;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
class UpdateMoonRentalPaidState implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 1600;
/**
* Retries
*
* @var int
*/
public $retries = 3;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set the queue connection up
$this->connection = 'redis';
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare variables
$mailDelay = 5;
//Get all of the moons from the rental database
$moons = AllianceRentalMoons::all();
//Set today's date
$today = Carbon::now();
//Get the esi configuration
$esiConfig = config('esi');
/**
* For each of the moons check the rental until date, the paid until date,
* and compare them to today's current date.
*
* If the paid date is later than the rental until date, then update the rental until
* date to match the paid date. If the paid until date is today or less, then update the
* paid column of the moon to not paid. If the moon hasn't been paid 2 weeks after the first
* of the month, then remove the renter, and send an eve mail to alliance leadership, and the renter
* denoting failure of payment has resulted in the moon rental for the current month being
* revoked.
*/
foreach($moon as $rental) {
//Setup the rental date, paid until date, and today's date as functions of Carbon library
$rentedUntil = new Carbon($rental->rental_until);
$paidUntil = new Carbon($rental->paid_until);
//If the paid date is larger than the rental date, then update the rental date
if($paidUntil->greaterThan($rentedUntil)) {
AllianceMoonRental::where([
'region' => $rental->region,
'system' => $rental->system,
'planet' => $rental->planet,
'moon' => $rental->moon,
])->update([
'rental_until' => $rental->paid_until,
]);
}
//If the paid date is today or less, then update the paid column of the moon as not paid
if($paidUntil->greaterThanOrEqualTo($today)) {
AllianceMoonRental::where([
'region' => $rental->region,
'system' => $rental->system,
'planet' => $rental->planet,
'moon' => $rental->moon,
])->update([
'paid' => 'No',
]);
}
//If the moon hasn't been paid for in two weeks, then remove the renter,
//then send the renter and w4rp leadership a mail.
if($paidUntil->greaterThanOrEqualTo($today->subWeeks(2))) {
//Declare the lookup helper as it will be needed
$lookupHelper = new LookupHelper;
//Get the character id for Minerva Arbosa and Rock Onzo
$minerva = $lookupHelper->CharacterNameToId('Minerva Arbosa');
$rock = $lookupHelper->CharacterNameToId('Rock Onzo');
//Remove the renter
AllianceMoonRental::where([
'region' => $rental->region,
'system' => $rental->system,
'planet' => $rental->planet,
'moon' => $rental->moon,
])->update([
'rental_type' => 'Not Rented',
'rental_until' => null,
'rental_contact_id' => 0,
'rental_contact_type' => null,
'paid' => 'Not Rented',
'paid_until' => null,
]);
//Send a mail over to the alliance leadership, and the former renter with
//why the moon was removed.
$subject = "W4RP Moon Rental Cancelled";
//Dispatch the mail job
ProcessSendEveMailJob::dispatch($body, (int)$rental->rental_contact_id, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds($mailDelay));
$mailDelay += 30;
if($minerva != null) {
ProcessSendEveMailJob::dispatch($body, (int)$minerva, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds($mailDelay));
$mailDelay += 30;
}
if($rock != null) {
ProcessSendEveMailJob::dispatch($body, (int)$rock, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds($mailDelay));
}
}
}
}
}

View File

@@ -0,0 +1,104 @@
<?php
namespace App\Jobs\Commands\RentalMoons;
//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 Log;
//Library
use App\Library\Moons\MoonCalc;
//Models
use App\Models\MoonRentals\AllianceRentalMoon;
/**
* This job performs the action of updating the moon rental price once per day.
*/
class UpdateMoonRentalPrice implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3200;
/**
* Retries
*
* @var int
*/
public $retries = 1;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set the connection for the job
$this->connection = 'redis';
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare the helper for moon calculations
$moonHelper = new MoonCalc;
//Get all the moons from the rental database
$moons = AllianceRentalMoon::all();
/**
* Calculate the worth of each moon along with the rental prices.
* For all of the moon calculations, the price of the mineral is averaged,
* thereby, the price of the moon worth is also averaged based on the averaging
* of the mineral price.
*/
foreach($moons as $rental) {
//Calculate the total worth of the moon
$totalWorth = $moonHelper->SpatialMoonsTotalWorth(
$rental->first_ore, $rental->first_quantity,
$rental->second_ore, $rental->second_quantity,
$rental->third_ore, $rental->third_quantity,
$rental->fourth_ore, $rental->fourth_quantity,
);
//Calculate the rental prices of the moon
$rentalPrice = $moonHelper->SpatialMoons(
$rental->first_ore, $rental->first_quantity,
$rental->second_ore, $rental->second_quantity,
$rental->third_ore, $rental->third_quantity,
$rental->fourth_ore, $rental->fourth_quantity,
);
//Update the moon in the database
AllianceRentalMoon::where([
'region' => $rental->region,
'system' => $rental->system,
'planet' => $rental->planet,
'moon' => $rental->moon,
])->update([
'moon_worth' => $totalWorth,
'alliance_rental_price' => $rentalPrice['alliance'],
'out_of_alliance_rental_price' => $rentalPrice['outofalliance'],
]);
Log::info('Alliance Rental Moon: ' . $rental->region . ' : ' . $rental->system . ' : ' . $rental->planet . ' : ' . $rental->moon . ' : ' . $rental->structure_name);
Log::info('Total Worth: ' . $totalWorth);
Log::info('Alliance Rental Price: ' . $rentalPrice['alliance']);
Log::info('Out of Alliance Rental Price: ' . $rentalPrice['outofalliance']);
}
}
}

View File

@@ -0,0 +1,103 @@
<?php
namespace App\Jobs\Commands\RentalMoons;
//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 Log;
use Carbon\Carbon;
//Library
use App\Library\Esi\Esi;
use Seat\Eseye\Exceptions\RequestFailedException;
//Models
use App\Models\MoonRentals\AllianceRentalMoon;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
class UpdateRentalMoonPullJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//Set the queue connection
$this->connection = 'redis';
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Setup the configuration variable for ESI
$config = config('esi');
//Setup the esi helper variable
$esiHelper = new Esi;
//Check for the esi scope
if(!$esiHelper->HaveEsiScope($config['primary'], 'esi-industry.read_corporation_mining.v1')) {
//Send a mail to the holding toon to update the esi scopes
return null;
}
//Is this valid?
AllianceRentalMoon::update([
'next_moon_pull' => null,
]);
//Reset all table entries to clear out the next moon pull entry
$allMoons = AllianceRentalMoon::all();
//Cycle through all of the moons, and make the next moon pull null
foreach($allMoons as $moon) {
AllianceRentalMoon::where([
'system' => $moon->system,
'planet' => $moon->planet,
'moon' => $moon->moon,
])->update([
'next_moon_pull' => null,
]);
}
//Get the refresh token
$token = $esiHelper->GetRefreshToken($config['primary']);
//Setup the esi authentication container
$esi = $esiHelper->SetupEsiAuthentication($token);
try {
$responses = $esi->invoke('get', '/corporation/{corporation_id}/mining/extractions/', [
'corporation_id' => 98287666,
]);
} catch(RequestExceptionFailed $e) {
return null;
}
foreach($response as $response) {
//Get whether the structure is being used by the alliance or not.
$usage = AllianceRentalMoon::where([
'structure_id' => $response->structure_id,
'rental_type' => 'Alliance',
])->count();
if($usage > 0) {
AllianceRentalMoon::where([
'structure_id' => $response->structure_id,
])->update([
'next_moon_pull' => $response->chunk_arrival_time,
]);
}
}
}
}

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\ProcessSendEveMailJob;
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,
]);
}
}

View File

@@ -0,0 +1,100 @@
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Log;
//App Library
use App\Library\Structures\StructureHelper;
use App\Jobs\Library\JobHelper;
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\Assets\AssetHelper;
//App Models
use App\Models\Jobs\JobStatus;
use App\Models\Stock\Asset;
class ProcessAssetsJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*/
public $tries = 3;
/**
* Job Variables
*/
private $charId;
private $corpId;
private $page;
private $esi;
protected $location_array = [
'StructureFuel',
'FighterBay',
];
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($charId, $corpId, $page)
{
$this->charId = $charId;
$this->corpId = $corpId;
$this->page = $page;
//Set the connection for the job
$this->connection = 'redis';
}
/**
* Execute the job.
* The job's task is to get all fo the information for all of the assets in
* a structure and store them in the database. This task can take a few seconds
* therefore we want the Horizon job queue to take care of the request rather
* than the cronjob.
*
* @return void
*/
public function handle()
{
//Declare the asset helper
$aHelper = new AssetHelper($this->charId, $this->corpId, $this->page);
//Get a page of assets
$assets = $aHelper->GetAssetsByPage();
//Cycle through the assets, and attmept to store them.
foreach($assets as $asset) {
//If the asset is in one of the locations we want, then store
//or update the asset
if(in_array($asset->location_flag, $this->location_array)) {
//Attempt to store the asset
$aHelper->StoreNewAsset($asset);
}
}
//Purge Stale Data
$aHelper->PurgeStaleData();
}
}

View File

@@ -0,0 +1,130 @@
<?php
namespace App\Jobs;
//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 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;
class ProcessSendEveMailJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Retries
*
* @var int
*/
public $retries = 3;
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) {
$this->body = $body;
$this->recipient = $recipient;
$this->recipient_type = $recipient_type;
$this->subject = $subject;
$this->sender = $sender;
$this->connection = 'redis';
}
/**
* Execute the job.
* Utilized by using ProcessSendEveMailJob::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;
//Get the esi configuration
$config = config('esi');
//Retrieve the token for main character to send mails from
$token = $esiHelper->GetRefreshToken($config['primary']);
//Create the ESI authentication container
$esi = $esiHelper->SetupEsiAuthentication($token);
//Attemp to send the mail
try {
$esi->setBody([
'approved_cost' => 100,
'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,
]);
} catch(RequestFailedException $e) {
Log::warning($e);
return null;
}
$this->SaveSentRecord($this->sender, $this->subject, $this->body, $this->recipient, $this->recipient_type);
$this->delete();
}
/**
* The job failed to process.
*
* @param Exception $exception
* @return void
*/
public function failed($exception)
{
Log::critical($exception);
}
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,78 @@
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
//App Library
use App\Library\Structures\StructureHelper;
//App Models
use App\Models\Jobs\JobStatus;
class ProcessStructureJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 3600;
/**
* Number of job retries
*/
public $tries = 3;
/**
* Job Variables
*/
private $charId;
private $corpId;
private $page;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($charId, $corpId, $page)
{
$this->charId = $charId;
$this->corpId = $corpId;
$this->page = $page;
//Set the connection for the job
$this->connection = 'redis';
}
/**
* Execute the job.
* The job's task is to get all of the information for a particular structure
* and store it in the database. This task can take a few seconds because of the ESI
* calls required to store the information. We leave this type of job up to the queue
* in order to take the load off of the cron job.
*
* @return void
*/
public function handle()
{
$sHelper = new StructureHelper($this->charId, $this->corpId);
$structures = $sHelper->GetStructuresByPage($this->page);
foreach($structures as $structure) {
$sHelper->ProcessStructure($structure);
}
//After the job is completed, delete the job
$this->delete();
}
}

View File

@@ -8,6 +8,7 @@ use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Foundation\Bus\Dispatchable;
use Log;
//App Library //App Library
use App\Library\Finances\Helper\FinanceHelper; use App\Library\Finances\Helper\FinanceHelper;
@@ -26,7 +27,7 @@ class ProcessWalletJournalJob implements ShouldQueue
* *
* @var int * @var int
*/ */
public $timeout = 300; public $timeout = 3600;
public $tries = 3; public $tries = 3;
@@ -39,13 +40,12 @@ class ProcessWalletJournalJob implements ShouldQueue
* *
* @return void * @return void
*/ */
public function __construct(JobProcessWalletJournal $pwj) { public function __construct($division, $charId, $page) {
$this->division = $pwj->division; $this->division = $division;
$this->charId = $pwj->charId; $this->charId = $charId;
$this->page = $pwj->page; $this->page = $page;
$this->delay = 15; $this->connection = 'redis';
$this->connection = 'database';
} }
/** /**
@@ -75,6 +75,6 @@ class ProcessWalletJournalJob implements ShouldQueue
*/ */
public function failed($exception) public function failed($exception)
{ {
dd($exception); Log::critical($exception);
} }
} }

View File

@@ -1,75 +0,0 @@
<?php
namespace App\Jobs;
//Internal Libraries
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
//App Library
use App\Library\Finances\Helper\FinanceHelper;
use App\Jobs\Library\JobHelper;
//App Models
use App\Models\Jobs\JobProcessWalletTransaction;
use App\Models\Jobs\JobError;
use App\Models\Jobs\JobStatus;
class ProcessWalletTransactionJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 300;
public $tries = 3;
private $division;
private $charId;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(JobProcessWalletTransaction $pwt)
{
$this->division = $pwt->division;
$this->charId = $pwt->charId;
$this->connection = 'database';
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//Declare the class variables
$finance = new FinanceHelper();
$finance->GetWalletTransaction($this->division, $this->charId);
//After the job is completed, delete the job
$this->delete();
}
/**
* The job failed to process
*
* @param Exception $exception
* @return void
*/
public function failed($exception) {
dd($exception);
}
}

View File

@@ -1,116 +0,0 @@
<?php
namespace App\Jobs;
//Internal Library
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
//Seat stuff
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
use Seat\Eseye\Exceptions\RequestFailedException;
//Models
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
use App\Models\Mail\EveMail;
use App\Models\Jobs\JobError;
use App\Models\Jobs\JobStatus;
class SendEveMailJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Timeout in seconds
*
* @var int
*/
public $timeout = 120;
/**
* Retries
*
* @var int
*/
public $retries = 3;
private $body;
private $recipient;
private $recipient_type;
private $subject;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(EveMail $mail) {
$this->body = $mail->body;
$this->recipient = $mail->recipient;
$this->recipient_type = $mail->recipient_type;
$this->subject = $mail->subject;
$this->connection = 'database';
}
/**
* Execute the job.
* Utilized by using SendEveMailJob::dispatch($mail);
* The model is passed into the dispatch function, then added to the queue
* for processing.
*
* @return void
*/
public function handle()
{
//Retrieve the token for main character to send mails from
$token = EsiToken::where(['character_id'=> 93738489])->get();
//Create the ESI authentication container
$config = config('esi');
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token[0]->refresh_token,
]);
//Setup the Eseye class
$esi = new Eseye($authentication);
//Attemp to send the mail
try {
$esi->setBody([
'approved_cost' => 0,
'body' => $this->body,
'recipients' => [[
'recipient_id' => (int)$this->recipient,
'recipient_type' => $this->recipient_type,
]],
'subject' => $this->subject,
])->invoke('post', '/characters/{character_id}/mail/', [
'character_id'=> 93738489,
]);
} catch(RequestFailedException $e) {
return null;
}
$this->delete();
}
/**
* The job failed to process.
*
* @param Exception $exception
* @return void
*/
public function failed($exception)
{
dd($exception);
}
}

View File

@@ -0,0 +1,145 @@
<?php
namespace App\Library\Assets;
//Internal Library
use Log;
use Carbon\Carbon;
//App Library
use App\Jobs\Library\JobHelper;
use App\Library\Esi\Esi;
use Seat\Eseye\Exceptions\RequestFailedException;
//Models
use App\Models\Jobs\JobStatus;
use App\Models\Stock\Asset;
class AssetHelper {
private $charId;
private $corpId;
private $page;
public function __construct($char, $corp, $pg = null) {
$this->charId = $char;
$this->corpId = $corp;
$this->page = $pg;
}
/**
* Get Assets By Page in order to store in the database
*/
public function GetAssetsByPage() {
//Declare the variable for the esi helper
$esiHelper = new Esi;
//Setup the esi authentication container
$config = config('esi');
//Check for the scope needed
$hasScope = $esiHelper->HaveEsiScope($this->charId, 'esi-assets.read_corporation_assets.v1');
if($hasScope == false) {
Log::critical('ESI Scope check has failed for esi-assets.read_corporation_assets.v1 for character id: ' . $this->charId);
return null;
}
//Get the refresh token from the database
$token = $esiHelper->GetRefreshToken($this->charId);
//Setup the esi authentication container
$esi = $esiHelper->SetupEsiAuthentication($token);
try {
$assets = $esi->page($this->page)
->invoke('get', '/corporations/{corporation_id}/assets/', [
'corporation_id' => $this->corpId,
]);
} catch(RequestFailedException $e) {
Log::critical("Failed to get page of assets from ESI.");
$assets = null;
}
return $assets;
}
/**
* Store a new asset record in the database
*/
public function StoreNewAsset($asset) {
//See if we find any assets which already exist
$found = Asset::where([
'item_id' => $asset->item_id,
])->count();
//If nothing is found
if($found == 0) {
$item = new Asset;
if(isset($asset->is_blueprint_copy)) {
$item->is_blueprint_copy = $asset->is_blueprint_copy;
}
$item->is_singleton = $asset->is_singleton;
$item->item_id = $asset->item_id;
$item->location_flag = $asset->location_flag;
$item->location_id = $asset->location_id;
$item->location_type = $asset->location_type;
$item->quantity = $asset->quantity;
$item->type_id = $asset->type_id;
$item->save();
} else {
$this->UpdateAsset($asset);
}
}
/**
* Purge old data, so we don't run into data issues
*/
public function PurgeStaleData() {
$date = Carbon::now()->subDay(1);
Asset::where('updated_at', '<', $date)->delete();
}
/**
* Get the liquid ozone asset
*/
public function GetAssetByType($type, $structureId) {
//See if the row is in the database table
$count = Asset::where([
'location_id' => $structureId,
'type_id' => $type,
'location_flag' => 'StructureFuel',
])->count();
//Get the row if it is in the table
$asset = Asset::where([
'location_id' => $structureId,
'type_id' => $type,
'location_flag' => 'StructureFuel',
])->first();
if($count == 0) {
return 0;
} else {
return $asset['quantity'];
}
}
/**
* Update an existing asset based off the esi pull
*/
private function UpdateAsset($asset) {
Asset::where([
'item_id' => $asset->item_id,
])->update([
'is_singleton' => $asset->is_singleton,
'location_flag' => $asset->location_flag,
'location_id' => $asset->location_id,
'location_type' => $asset->location_type,
'quantity' => $asset->quantity,
'type_id' => $asset->type_id,
'updated_at' => Carbon::now(),
]);
}
}
?>

View File

@@ -3,14 +3,14 @@
namespace App\Library\Esi; namespace App\Library\Esi;
//Internal Libraries //Internal Libraries
use DB; use Carbon\Carbon;
//Models //Models
use App\Models\Esi\EsiToken;
use App\Models\Esi\EsiScope; use App\Models\Esi\EsiScope;
use App\Models\Jobs\JobSendEveMail;
//Jobs //Jobs
use App\Jobs\SendEveMailJob; use App\Jobs\ProcessSendEveMailJob;
//Seat Stuff //Seat Stuff
use Seat\Eseye\Cache\NullCache; use Seat\Eseye\Cache\NullCache;
@@ -33,29 +33,26 @@ class Esi {
* @return true,false * @return true,false
*/ */
public function HaveEsiScope($charId, $scope) { public function HaveEsiScope($charId, $scope) {
//Get the esi config
$config = config('esi');
//Check for an esi scope //Check for an esi scope
$checks = DB::table('EsiScopes')->where('character_id', $charId)->get(); $check = EsiScope::where(['character_id' => $charId, 'scope' => $scope])->count();
foreach($checks as $check) { if($check == 0) {
if($check->scope === $scope) { //Compose a mail to send to the user if the scope is not found
return true; $subject = 'W4RP Services - Incorrect ESI Scope';
} $body = "Please register on https://services.w4rp.space with the scope: " . $scope;
ProcessSendEveMailJob::dispatch($body, (int)$charId, 'character', $subject, $config['primary'])->onQueue('mail')->delay(Carbon::now()->addSeconds(5));
return false;
} }
$mail = new EveMail; return true;
$mail->sender = 93738489;
$mail->subject = 'W4RP Services - Incorrect ESI Scope';
$mail->body = "Please register on https://services.w4rp.space with the scope: " . $scope;
$mail->recipient = (int)$charId;
$mail->recipient_type = 'character';
$mail->save();
SendEveMailJob::dispatch($mail)->delay(Carbon::now()->addSeconds(5));
return false;
} }
public function GetCharacterData($charId) { public function GetCharacterData($charId) {
$esi = new Eseye(); $esi = $this->SetupEsiAuthentication();
try { try {
$character = $esi->invoke('get', '/characters/{character_id}/', [ $character = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => $charId, 'character_id' => $charId,
@@ -67,8 +64,23 @@ class Esi {
return $character; return $character;
} }
public function GetCorporationData($corpId) {
$esi = $this->SetupEsiAuthentication();
try {
$corporation = $esi->invoke('get', '/corporations/{corporation_id}/', [
'corporation_id' => $corpId,
]);
} catch(RequestFailedException $e) {
return null;
}
return $corporation;
}
public function GetCharacterName($charId) { public function GetCharacterName($charId) {
$esi = new Eseye(); $esi = $this->SetupEsiAuthentication;
try { try {
$character = $esi->invoke('get', '/characters/{character_id}/', [ $character = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => $charId, 'character_id' => $charId,
@@ -82,32 +94,27 @@ class Esi {
public function FindCharacterId($name) { public function FindCharacterId($name) {
$config = config('esi'); $config = config('esi');
//Create the esi authentication container
$authentication = new EsiAuthentication([ $esi = $this->SetupEsiAuthentication();
'client_id' => $config['client_id'],
'secret' => $config['secret'],
]);
//Create the esi container
$esi = new Eseye($authentication);
try { try {
$character = $esi->setQueryString([ $character = $esi->setBody(array(
'categories' => 'character', $name,
'language' => 'en-us', ))->invoke('post', '/universe/ids/');
'search' => $name,
'strict' => 'true',
])->invoke('get', '/search/');
} catch(RequestFailedException $e) { } catch(RequestFailedException $e) {
return null; return null;
} }
$character = json_decode($character, true); if(isset($character->characters[0]->id)) {
return $character->characters[0]->id;
return $character['character']; } else {
return null;
}
} }
public function FindCorporationId($charId) { public function FindCorporationId($charId) {
$esi = new Eseye(); $esi = $this->SetupEsiAuthentication();
try { try {
$character = $esi->invoke('get', '/characters/{character_id}/', [ $character = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => $charId, 'character_id' => $charId,
@@ -120,7 +127,8 @@ class Esi {
} }
public function FindCorporationName($charId) { public function FindCorporationName($charId) {
$esi = new Eseye(); $esi = $this->SetupEsiAuthentication();
try { try {
$character = $esi->invoke('get', '/characters/{character_id}/', [ $character = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => $charId, 'character_id' => $charId,
@@ -151,6 +159,49 @@ class Esi {
//Return the combined date in the correct format //Return the combined date in the correct format
return $realDate; return $realDate;
} }
public function GetRefreshToken($charId) {
//Get the refresh token from the database
$tokenCount = EsiToken::where([
'character_id' => $charId,
])->count();
//If the token is not found, then don't return it.
if($tokenCount == 0) {
return null;
}
$token = EsiToken::where([
'character_id' => $charId,
])->first();
return $token->refresh_token;
}
public function SetupEsiAuthentication($token = null) {
//Get the platform configuration
$config = config('esi');
//Declare some variables
$authentication = null;
$esi = null;
if($token == null) {
$esi = new Eseye();
} else {
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token,
]);
//Setup the esi variable
$esi = new Eseye($authentication);
}
//Return the created variable
return $esi;
}
} }
?> ?>

View File

@@ -1,49 +0,0 @@
<?php
namespace App\Library\Esi;
use DB;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
use Seat\Eseye\Exceptions\RequestFailedException;
class Mail {
public function SendMail($recipient, $rType, $subject, $body) {
//Retrieve the token for main character to send mails from
$token = EsiToken::where(['character_id' => 93738489])->first();
//Create the ESI authentication container
$config = config('esi');
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token->refresh_token,
]);
$esi = new Eseye($authentication);
try {
$esi->setBody([
'approved_cost' => 0,
'body' => $body,
'recipients' => [[
'recipient_id' => (int)$recipient,
'recipient_type' => $rType,
]],
'subject' => $subject,
])->invoke('post', '/characters/{character_id}/mail/', [
'character_id'=> 93738489,
]);
} catch(RequestFailedException $e) {
return 1;
}
return 0;
}
}
?>

View File

@@ -0,0 +1,71 @@
<?php
/**
* W4RP Services
* GNU Public License
*/
namespace App\Library\Finances;
//Library
use App\Library\Esi\Esi;
//Models
use App\Models\Finances\AllianceMarketJournal;
class AllianceMarketTax {
public function EntryExists($journal) {
if(AllianceMarketJournal::where(['id' => $journal['id']])->exists()) {
return true;
} else {
return false;
}
}
public function InsertMarketTax($journal, $corpId, $division) {
//Create the ESI Helper class
$esiHelper = new Esi;
//Check to see if we can find the entry in the database already.
//If we don't then add it to the database
if(!AllianceMarketJournal::where(['id' => $journal['id']])->exists()) {
$entry = new AllianceMarketJournal;
$entry->id = $journal['id'];
$entry->corporation_id = $corpId;
$entry->division = $division;
if(isset($journal['amount'])) {
$entry->amount = $journal['amount'];
}
if(isset($journal['balance'])) {
$entry->balance = $journal['balance'];
}
if(isset($journal['context_id'])) {
$entry->context_id = $journal['context_id'];
}
if(isset($journal['context_id_type'])) {
$entry->context_id_type = $journal['context_id_type'];
}
$entry->date = $esiHelper->DecodeDate($journal['date']);
$entry->description = $journal['description'];
if(isset($journal['first_party_id'])) {
$entry->first_party_id = $journal['first_party_id'];
}
if(isset($journal['reason'])) {
$entry->reason = $journal['reason'];
}
$entry->ref_type = $journal['ref_type'];
if(isset($journal['second_party_id'])) {
$entry->second_party_id = $journal['second_party_id'];
}
if(isset($journal['tax'])) {
$entry->tax = $journal['tax'];
}
if(isset($journal['tax_receiver_id'])) {
$entry->tax_receiver_id = $journal['tax_receiver_id'];
}
$entry->save();
}
}
}
?>

View File

@@ -8,18 +8,17 @@
namespace App\Library\Finances\Helper; namespace App\Library\Finances\Helper;
//Internal Library //Internal Library
use DB; use Log;
use Carbon\Carbon;
//Job
use App\Jobs\SendEveMailJob;
//Models //Models
use App\Models\Esi\EsiToken; use App\Models\Esi\EsiToken;
use App\Models\Esi\EsiScope; use App\Models\Esi\EsiScope;
use App\Models\Mail\EveMail;
//Library //Library
use App\Library\Esi\Esi; use App\Library\Esi\Esi;
use App\Library\Finances\AllianceMarketTax;
use App\Library\Finances\CorpMarketTax;
use App\Library\Finances\MarketTax; use App\Library\Finances\MarketTax;
use App\Library\Finances\PlayerDonation; use App\Library\Finances\PlayerDonation;
use App\Library\Finances\ReprocessingTax; use App\Library\Finances\ReprocessingTax;
@@ -29,71 +28,15 @@ use App\Library\Finances\OfficeFee;
use App\Library\Finances\PlanetProductionTax; use App\Library\Finances\PlanetProductionTax;
use App\Library\Finances\PISale; use App\Library\Finances\PISale;
use App\Library\Lookups\LookupHelper; use App\Library\Lookups\LookupHelper;
use App\Library\Finances\SovBillExpenses;
//Seat Stuff //Seat Stuff
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
use Seat\Eseye\Exceptions\RequestFailedException; use Seat\Eseye\Exceptions\RequestFailedException;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
class FinanceHelper { class FinanceHelper {
public function GetWalletTransaction($division, $charId) {
//Declare the lookup class helper
$lookups = new LookupHelper;
//Setup array for PI items
$pi_items = $this->GetPIMaterialsArray();
//Get the ESI refresh token for the corporation to add new wallet journals into the database
$tokenData = $this->TokenInfo($charId);
$token = $tokenData['token'];
$scope = $tokenData['scope'];
//If the token is not found, send the user an eve mail, and just exit out of the function
if($this->TokenNotFound($token, $scope, $charId)) {
printr("Token not found\n");
return null;
}
//Reference to see if the character is in our look up table for corporations and characters
$corpId = $lookups->LookupCharacter($charId);
//Create an ESI authentication container
$config = config('esi');
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token[0]->refresh_token,
]);
//Create the esi class varialble
$esi = new Eseye($authentication);
//Get the entries of the journal for transactions
try {
$journals = $esi->invoke('get', '/corporations/{corporation_id}/wallets/{division}/transactions/', [
'corporation_id' => 98251577,
'division' => 3,
]);
} catch(RequestFailedException $e) {
return $e->getEsiResponse();
}
//Decode the wallet from json into an array
$wallet = json_decode($journals->raw, true);
//For each transactional entry, attempt to store it in the database.
//The PutWalletJournal function checks to see if it's already in the database.
foreach($wallet as $entry) {
if($division == 3 && $charId == 94415555) {
if(in_array($entry['type_id'], $pi_items, false)) {
$pi = new PISale();
$pi->InsertPISale($entry, 98287666);
}
}
}
}
public function GetWalletJournal($division, $charId) { public function GetWalletJournal($division, $charId) {
//Declare new class variables //Declare new class variables
$market = new MarketTax(); $market = new MarketTax();
@@ -102,34 +45,33 @@ class FinanceHelper {
$other = new PlayerDonation(); $other = new PlayerDonation();
$industry = new StructureIndustryTax(); $industry = new StructureIndustryTax();
$office = new OfficeFee(); $office = new OfficeFee();
$esiHelper = new Esi();
$sovBillHelper = new SovBillExpenses();
$lookup = new LookupHelper;
//Get the ESI refresh token for the corporation to add new wallet journals into the database //Get the ESI refresh token for the corporation to add new wallet journals into the database
$tokenData = $this->TokenInfo($charId); $hasScope = $esiHelper->HaveEsiScope($charId, 'esi-wallet.read_corporation_wallets.v1');
$token = $tokenData['token']; if($hasScope == false) {
$scope = $tokenData['scope']; Log::critical('Scope check failed for esi-wallet.read_corporation_wallets.v1 for character id: ' . $charId);
//Declare the lookup class helper
$lookups = new LookupHelper;
//If the token is not found, send the user an eve mail, and just exit out of the function
if($this->TokenNotFound($token, $scope, $charId)) {
return null; return null;
} }
$token = $esiHelper->GetRefreshToken($charId);
if($token == null) {
return null;
}
//Reference to see if the character is in our look up table for corporations and characters //Reference to see if the character is in our look up table for corporations and characters
$corpId = $lookups->LookupCharacter($charId); $char = $lookup->GetCharacterInfo($charId);
$corpId = $char->corporation_id;
//Create an ESI authentication container //Create an ESI authentication container
$config = config('esi'); $esi = $esiHelper->SetupEsiAuthentication($token);
$authentication = new EsiAuthentication([ //Set the version
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token[0]->refresh_token,
]);
//Create the esi class varialble
$esi = new Eseye($authentication);
$esi->setVersion('v4'); $esi->setVersion('v4');
//Set caching to null
$configuration = Configuration::getInstance();
$configuration->cache = NullCache::class;
//Set our current page to 1 which is the one we are starting on. //Set our current page to 1 which is the one we are starting on.
$currentPage = 1; $currentPage = 1;
@@ -147,31 +89,34 @@ class FinanceHelper {
'division' => $division, 'division' => $division,
]); ]);
} catch(RequestFailedException $e) { } catch(RequestFailedException $e) {
return $e->getEsiResponse(); return null;
} }
//Set the total pages we need to cycle through. if($currentPage == 1) {
$totalPages = $journals->pages; //Set the total pages we need to cycle through.
$totalPages = $journals->pages;
}
//Decode the wallet from json into an array //Decode the wallet from json into an array
$wallet = json_decode($journals->raw, true); $wallet = json_decode($journals->raw, true);
//For each journal entry, attempt to store it in the database. //For each journal entry, attempt to store it in the database.
//The PutWalletJournal function checks to see if it's already in the database. //The PutWalletJournal function checks to see if it's already in the database.
foreach($wallet as $entry) { foreach($wallet as $entry) {
if($entry['amount'] > 0) { if($entry['ref_type'] == 'brokers_fee') {
if($entry['ref_type'] == 'brokers_fee') { $market->InsertMarketTax($entry, $corpId, $division);
$market->InsertMarketTax($entry, $corpId, $division); } else if($entry['ref_type'] == 'reprocessing_tax') {
} else if($entry['ref_type'] == 'reprocessing_tax') { $reprocessing->InsertReprocessingTax($entry, $corpId, $division);
$reprocessing->InsertReprocessingTax($entry, $corpId, $division); } else if($entry['ref_type'] == 'structure_gate_jump') {
} else if($entry['ref_type'] == 'structure_gate_jump') { $jb->InsertJumpBridgeTax($entry, $corpId, $division);
$jb->InsertJumpBridgeTax($entry, $corpId, $division); } else if($entry['ref_type'] == 'player_donation' ||
} else if($entry['ref_type'] == 'player_donation' || ($entry['ref_type'] == 'corporation_account_withdrawal' && $entry['second_party_id'] == 98287666)) {
($entry['ref_type'] == 'corporation_account_withdrawal' && $entry['second_party_id'] == 98287666)) { $other->InsertPlayerDonation($entry, $corpId, $division);
$other->InsertPlayerDonation($entry, $corpId, $division); } else if($entry['ref_type'] == 'industry_job_tax' && $entry['second_party_id'] == 98287666) {
} else if($entry['ref_type'] == 'industry_job_tax' && $entry['second_party_id'] == 98287666) { $industry->InsertStructureIndustryTax($entry, $corpId, $division);
$industry->InsertStructureIndustryTax($entry, $corpId, $division); } else if($entry['ref_type'] == 'office_rental_fee' && $entry['second_party_id'] == 98287666) {
} else if($entry['ref_type'] == 'office_rental_fee' && $entry['second_party_id'] == 98287666) { $office->InsertOfficeFee($entry, $corpId, $division);
$office->InsertOfficeFee($entry, $corpId, $division); } else if($entry['ref_type'] == 'infrastructure_hub_maintenance' && $entry['first_party_id'] == 98287666) {
} $sovBillHelper->InsertSovBillExpense($entry, $corpId, $division);
} }
} }
@@ -183,32 +128,34 @@ class FinanceHelper {
public function GetJournalPageCount($division, $charId) { public function GetJournalPageCount($division, $charId) {
//Declare class variables //Declare class variables
$lookups = new LookupHelper; $lookup = new LookupHelper;
$esiHelper = new Esi;
//Get the ESI refresh token for the corporation //Get the ESI refresh token for the corporation to add new wallet journals into the database
$tokenData = $this->TokenInfo($charId); $hasScope = $esiHelper->HaveEsiScope($charId, 'esi-wallet.read_corporation_wallets.v1');
$token = $tokenData['token']; if($hasScope == false) {
$scope = $tokenData['scope']; Log::critical('Esi Scope check failed for esi-wallet.read_corporation_wallets.v1 for character id: ' . $charId);
return null;
if($this->TokenNotFound($token, $scope, $charId)) { }
$token = $esiHelper->GetRefreshToken($charId);
if($token == null) {
return null; return null;
} }
//Refrence to see if the character is in our look up table for corporation and characters //Refrence to see if the character is in our look up table for corporation and characters
$corpId = $lookups->LookupCharacter($charId); $char = $lookup->GetCharacterInfo($charId);
$corpId = $char->corporation_id;
//Create the ESI authentication container //Create the ESI authentication container
$config = config('esi'); $esi = $esiHelper->SetupEsiAuthentication($token);
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token[0]->refresh_token,
]);
//Create the esi class variable //Set the esi version to v4
$esi = new Eseye($authentication);
$esi->setVersion('v4'); $esi->setVersion('v4');
//Set caching to null
$configuration = Configuration::getInstance();
$configuration->cache = NullCache::class;
//Call the first page so we can get the header data for the number of pages //Call the first page so we can get the header data for the number of pages
try { try {
$journals = $esi->invoke('get', '/corporations/{corporation_id}/wallets/{division}/journal/', [ $journals = $esi->invoke('get', '/corporations/{corporation_id}/wallets/{division}/journal/', [
@@ -216,7 +163,8 @@ class FinanceHelper {
'division' => $division, 'division' => $division,
]); ]);
} catch(RequestFailedException $e) { } catch(RequestFailedException $e) {
return $e->getEsiResponse(); Log::warning($e->getEsiResponse());
return null;
} }
$pages = $journals->pages; $pages = $journals->pages;
@@ -224,38 +172,83 @@ class FinanceHelper {
return $pages; return $pages;
} }
public function GetWalletJournalPage($division, $charId, $page = 1) { public function GetCorpWalletJournalPage($division, $charId, $corpId, $page = 1) {
//Declare new class variables //Declare new class variables
$market = new MarketTax(); $corpMarket = new MarketTax();
$reprocessing = new ReprocessingTax(); $esiHelper = new Esi;
$jb = new JumpBridgeTax();
$other = new PlayerDonation();
$industry = new StructureIndustryTax();
$office = new OfficeFee();
//Get the ESI refresh token for the corporation to add new wallet journals into the database //Get the ESI refresh token for the corporation to add new wallet journals into the database
$tokenData = $this->TokenInfo($charId); $token = $esiHelper->GetRefreshToken($charId);
$token = $tokenData['token'];
$scope = $tokenData['scope'];
//Declare the lookup class helper //Setup the esi authentication container
$lookups = new LookupHelper; $esi = $esiHelper->SetupEsiAuthentication($token);
$esi->setVersion('v4');
//Set caching to null
$configuration = Configuration::getInstance();
$configuration->cache = NullCache::class;
//Call the page of the wallet journal
try {
$journals = $esi->page($page)
->invoke('get', '/corporations/{corporation_id}/wallets/{division}/journal/', [
'corporation_id' => $corpId,
'division' => $division,
]);
} catch(RequestFailedException $e) {
Log::warning($e->getEsiResponse());
return null;
}
//Decode the wallet from json into an array
$wallets = json_decode($journals->raw, true);
//For each journal entry, attempt to store the information into the database
foreach($wallets as $wallet) {
if($wallet['amount'] > 0) {
if($wallet['ref_type'] == 'brokers_fee') {
$corpMarket->InsertCorpMarketTax($wallet, $corpId, $division);
}
}
}
}
public function GetWalletJournalPage($division, $charId, $page = 1) {
//Declare new class variables
$market = new AllianceMarketTax;
$reprocessing = new ReprocessingTax;
$jb = new JumpBridgeTax;
$other = new PlayerDonation;
$industry = new StructureIndustryTax;
$office = new OfficeFee;
$pi = new PlanetProductionTax;
$esiHelper = new Esi;
$lookup = new LookupHelper;
$sovBill = new SovBillExpenses;
//Get the ESI refresh token for the corporation to add new wallet journals into the database
$hasScope = $esiHelper->HaveEsiScope($charId, 'esi-wallet.read_corporation_wallets.v1');
if($hasScope == false) {
Log::critical('Esi Scope check failed for esi-wallet.read_corporation_wallets.v1 for character id: ' . $charId);
return null;
}
$token = $esiHelper->GetRefreshToken($charId);
if($token == null) {
return null;
}
//Reference to see if the character is in our look up table for corporations and characters //Reference to see if the character is in our look up table for corporations and characters
$corpId = $lookups->LookupCorporationId($charId); $char = $lookup->GetCharacterInfo($charId);
$corpId = $char->corporation_id;
//Create an ESI authentication container //Create an ESI authentication container
$config = config('esi'); $esi = $esiHelper->SetupEsiAuthentication($token);
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token[0]->refresh_token,
]);
//Create the esi class varialble
$esi = new Eseye($authentication);
$esi->setVersion('v4'); $esi->setVersion('v4');
//Set caching to null
$configuration = Configuration::getInstance();
$configuration->cache = NullCache::class;
//Call the first page of the wallet journal, as we are always going to get at least one page. //Call the first page of the wallet journal, as we are always going to get at least one page.
//If we have more pages, then we will continue through the while loop. //If we have more pages, then we will continue through the while loop.
try { try {
@@ -265,7 +258,7 @@ class FinanceHelper {
'division' => $division, 'division' => $division,
]); ]);
} catch(RequestFailedException $e) { } catch(RequestFailedException $e) {
return $e->getEsiResponse(); return null;
} }
//Decode the wallet from json into an array //Decode the wallet from json into an array
@@ -273,58 +266,27 @@ class FinanceHelper {
//For each journal entry, attempt to store it in the database. //For each journal entry, attempt to store it in the database.
//The PutWalletJournal function checks to see if it's already in the database. //The PutWalletJournal function checks to see if it's already in the database.
foreach($wallet as $entry) { foreach($wallet as $entry) {
if($entry['amount'] > 0) { if($entry['ref_type'] == 'brokers_fee') {
if($entry['ref_type'] == 'brokers_fee') { $market->InsertMarketTax($entry, $corpId, $division);
$market->InsertMarketTax($entry, $corpId, $division); } else if($entry['ref_type'] == 'reprocessing_tax') {
} else if($entry['ref_type'] == 'reprocessing_tax') { $reprocessing->InsertReprocessingTax($entry, $corpId, $division);
$reprocessing->InsertReprocessingTax($entry, $corpId, $division); } else if($entry['ref_type'] == 'structure_gate_jump') {
} else if($entry['ref_type'] == 'structure_gate_jump') { $jb->InsertJumpBridgeTax($entry, $corpId, $division);
$jb->InsertJumpBridgeTax($entry, $corpId, $division); } else if($entry['ref_type'] == 'player_donation' ||
} else if($entry['ref_type'] == 'player_donation' || ($entry['ref_type'] == 'corporation_account_withdrawal' && $entry['second_party_id'] == 98287666)) {
($entry['ref_type'] == 'corporation_account_withdrawal' && $entry['second_party_id'] == 98287666)) { $other->InsertPlayerDonation($entry, $corpId, $division);
$other->InsertPlayerDonation($entry, $corpId, $division); } else if($entry['ref_type'] == 'industry_job_tax' && $entry['second_party_id'] == 98287666) {
} else if($entry['ref_type'] == 'industry_job_tax' && $entry['second_party_id'] == 98287666) { $industry->InsertStructureIndustryTax($entry, $corpId, $division);
$industry->InsertStructureIndustryTax($entry, $corpId, $division); } else if($entry['ref_type'] == 'office_rental_fee' && $entry['second_party_id'] == 98287666) {
} else if($entry['ref_type'] == 'office_rental_fee' && $entry['second_party_id'] == 98287666) { $office->InsertOfficeFee($entry, $corpId, $division);
$office->InsertOfficeFee($entry, $corpId, $division); } else if($entry['ref_type'] == 'planetary_export_tax' || $entry['ref_type'] == 'planetary_import_tax') {
} $pi->InsertPlanetProductionTax($entry, $corpId, $division);
} else if($entry['ref_type'] == 'infrastructure_hub_maintenance' && $entry['first_party_id'] == 98287666) {
$sovBill->InsertSovBillExpense($entry, $corpId, $division);
} }
} }
} }
private function TokenInfo($charId) {
//Get the ESI refresh token for the corporation to add a new wallet jouranls into the database
//send the token and scope back to the calling function
$token = EsiToken::where(['character_id' => $charId])->get(['refresh_token']);
$scope = EsiScope::where(['character_id' => $charId, 'scope' => 'esi-wallet.read_corporation_wallets.v1'])->get(['scope']);
$data = [
'token' => $token,
'scope' => $scope,
];
return $data;
}
private function TokenNotFound($token, $scope, $charId) {
if(!isset($token[0]->refresh_token) || !isset($scope[0]->scope)) {
//Register a mail to be dispatched as a job
$mail = new EveMail;
$mail->sender = 93738489;
$mail->subject = 'W4RP Services ESI API';
$mail->body = 'You need to register an ESI API on the services site for esi-wallet.read_corporation_wallet.v1<br>This is also labeled Corporation Wallets';
$mail->recipient = (int)$charId;
$mail->recipient_type = 'character';
$mail->save();
SendEveMailJob::dispatch($mail);
return true;
}
return false;
}
private function GetPIMaterialsArray() { private function GetPIMaterialsArray() {
//Setup array for PI items //Setup array for PI items
$pi_items = [ $pi_items = [

View File

@@ -6,13 +6,15 @@
namespace App\Library\Finances; namespace App\Library\Finances;
//Internal Library
use DB; use DB;
use Carbon\Carbon; use Carbon\Carbon;
//Library
use App\Library\Esi\Esi; use App\Library\Esi\Esi;
//Models
use App\Models\Finances\JumpBridgeJournal; use App\Models\Finances\JumpBridgeJournal;
use App\Models\User\UserToCorporation;
class JumpBridgeTax { class JumpBridgeTax {
private $date; private $date;
@@ -76,55 +78,6 @@ class JumpBridgeTax {
} }
} }
/**
* Function to get the corporations using the jump bridge over a given time period
*/
public function CorporationUsage() {
//Make an array for corporations, and amounts
$amounts = array();
$characters = array();
$data = array();
$esi = new Esi();
//Get all of the parties which have utilized the jump bridge
$parties = DB::table('jump_bridge_journal')
->select('first_party_id')
->groupBy('first_party_id')
->whereTime('date', '>', $this->date)
->get();
//Run through each party and assign them into a corporation, then add the corporation to the corporation array if they don't
//exist in the array.
foreach($parties as $party) {
//If the entry in the database lookup table isn't found, add it.
if(!CharacterToCorporation::where(['character_id' => $party->first_party_id])->exists()) {
$character = $esi->GetCharacterData($party->first_party_id);
$corporation = $esi->GetCorporationData($character->corporation_id);
$char = new CharacterToCorporation;
$char->character_id = $party->first_party_id;
$char->character_name = $character->name;
$char->corporation_id = $character->corporation_id;
$char->corporation_name = $corporation->name;
$char->save();
}
//Perform the lookup and add the user into the corps array, and the ammount to the amount array
$char = CharacterToCorporation::where(['character_id' => $party->first_party_id])->get();
//Find the amount utilized from the jump bridge by the character
$isk = JumpBridgeJournal::where(['first_party_id' => $char->character_id])
->whereBetween('date', [$this->date, $this->date->addDays(30)])
->sum('amount');
//We have the character and isk amount, so we need to build an array with these two values as key value pairs.
$data[$char->corporation_name] = $data[$char->corporation_name] + $isk;
}
//Return the data
return $data;
}
/** /**
* Returns the overall usage for statistics * Returns the overall usage for statistics
*/ */
@@ -143,6 +96,7 @@ class JumpBridgeTax {
* Returns a specific briddge usage statistics for overall usage * Returns a specific briddge usage statistics for overall usage
*/ */
public function JBOverallUsage($structure) { public function JBOverallUsage($structure) {
$usage = DB::table('jump_bridge_journal') $usage = DB::table('jump_bridge_journal')
->select('amount') ->select('amount')
->where('context_id', $structure) ->where('context_id', $structure)

View File

@@ -1,63 +0,0 @@
<?php
/**
* W4RP Services
* GNU Public License
*/
namespace App\Library\Finances;
use DB;
use App\Library\Esi\Esi;
use App\Models\Finances\CorpMarketJournal;
class MarketTax {
public function InsertMarketTax($journal, $corpId, $division) {
//Create the ESI Helper class
$esiHelper = new Esi;
//Check to see if we can find the entry in the database already.
//If we don't then add it to the database
if(!CorpMarketJournal::where(['id' => $journal['id']])->exists()) {
$entry = new CorpMarketJournal;
$entry->id = $journal['id'];
$entry->corporation_id = $corpId;
$entry->division = $division;
if(isset($journal['amount'])) {
$entry->amount = $journal['amount'];
}
if(isset($journal['balance'])) {
$entry->balance = $journal['balance'];
}
if(isset($journal['context_id'])) {
$entry->context_id = $journal['context_id'];
}
if(isset($journal['context_id_type'])) {
$entry->context_id_type = $journal['context_id_type'];
}
$entry->date = $esiHelper->DecodeDate($journal['date']);
$entry->description = $journal['description'];
if(isset($journal['first_party_id'])) {
$entry->first_party_id = $journal['first_party_id'];
}
if(isset($journal['reason'])) {
$entry->reason = $journal['reason'];
}
$entry->ref_type = $journal['ref_type'];
if(isset($journal['second_party_id'])) {
$entry->second_party_id = $journal['second_party_id'];
}
if(isset($journal['tax'])) {
$entry->tax = $journal['tax'];
}
if(isset($journal['tax_receiver_id'])) {
$entry->tax_receiver_id = $journal['tax_receiver_id'];
}
$entry->save();
}
}
}
?>

View File

@@ -7,10 +7,10 @@
namespace App\Library\Finances; namespace App\Library\Finances;
use DB; //Library
use App\Library\Esi\Esi; use App\Library\Esi\Esi;
//Models
use App\Models\Finances\OfficeFeesJournal; use App\Models\Finances\OfficeFeesJournal;
class OfficeFee { class OfficeFee {

View File

@@ -5,22 +5,20 @@
* GNU Public License * GNU Public License
*/ */
namespace App\Library\Finances; namespace App\Library\Finances;
use DB; //Library
use App\Library\Esi\Esi;
use App\Library\Esi\Esi; //Models
use App\Models\Finances\PISaleJournal;
use App\Models\Finances\PISaleJournal; class PISale {
class PISale {
public function InsertPISale($journal, $corpId) { public function InsertPISale($journal, $corpId) {
//Create the ESI Helper class //Create the ESI Helper class
$esiHelper = new Esi; $esiHelper = new Esi;
//dd($journal);
//Insert the PI Sale into the database //Insert the PI Sale into the database
if(!PISaleJournal::where(['journal_ref_id' => $journal['journal_ref_id']])->exists()) { if(!PISaleJournal::where(['journal_ref_id' => $journal['journal_ref_id']])->exists()) {
$entry = new PISaleJournal; $entry = new PISaleJournal;

View File

@@ -7,10 +7,10 @@
namespace App\Library\Finances; namespace App\Library\Finances;
use DB; //Library
use App\Library\Esi\Esi; use App\Library\Esi\Esi;
//Models
use App\Models\Finances\PlanetProductionTaxJournal; use App\Models\Finances\PlanetProductionTaxJournal;
class PlanetProductionTax { class PlanetProductionTax {

View File

@@ -7,10 +7,10 @@
namespace App\Library\Finances; namespace App\Library\Finances;
use DB; //Library
use App\Library\Esi\Esi; use App\Library\Esi\Esi;
//Models
use App\Models\Finances\PlayerDonationJournal; use App\Models\Finances\PlayerDonationJournal;
class PlayerDonation { class PlayerDonation {

View File

@@ -7,9 +7,10 @@
namespace App\Library\Finances; namespace App\Library\Finances;
use DB; //Library
use App\Library\Esi\Esi; use App\Library\Esi\Esi;
//Models
use App\Models\Finances\ReprocessingTaxJournal; use App\Models\Finances\ReprocessingTaxJournal;
class ReprocessingTax { class ReprocessingTax {

View File

@@ -0,0 +1,63 @@
<?php
/**
* W4RP Services
* GNU Public License
*/
namespace App\Library\Finances;
//Library
use App\Library\Esi\Esi;
//Models
use App\Models\Finances\SovBillJournal;
class SovBillExpenses {
public function InsertSovBillExpense($journal, $corpId, $division) {
//Create the ESI Helper class
$esiHelper = new Esi;
//Check to see if we can find the entry in the database already.
//If we don't then add it to the database
if(!SovBillJournal::where(['id' => $journal['id']])->exists()) {
$entry = new SovBillJournal;
$entry->id = $journal['id'];
$entry->corporation_id = $corpId;
$entry->division = $division;
if(isset($journal['amount'])) {
$entry->amount = $journal['amount'];
}
if(isset($journal['balance'])) {
$entry->balance = $journal['balance'];
}
if(isset($journal['context_id'])) {
$entry->context_id = $journal['context_id'];
}
if(isset($journal['context_id_type'])) {
$entry->context_id_type = $journal['context_id_type'];
}
$entry->date = $esiHelper->DecodeDate($journal['date']);
$entry->description = $journal['description'];
if(isset($journal['first_party_id'])) {
$entry->first_party_id = $journal['first_party_id'];
}
if(isset($journal['reason'])) {
$entry->reason = $journal['reason'];
}
$entry->ref_type = $journal['ref_type'];
if(isset($journal['second_party_id'])) {
$entry->second_party_id = $journal['second_party_id'];
}
if(isset($journal['tax'])) {
$entry->tax = $journal['tax'];
}
if(isset($journal['tax_receiver_id'])) {
$entry->tax_receiver_id = $journal['tax_receiver_id'];
}
$entry->save();
}
}
}
?>

View File

@@ -7,9 +7,10 @@
namespace App\Library\Finances; namespace App\Library\Finances;
use DB; //Library
use App\Library\Esi\Esi; use App\Library\Esi\Esi;
//Models
use App\Models\Finances\StructureIndustryTaxJournal; use App\Models\Finances\StructureIndustryTaxJournal;
class StructureIndustryTax { class StructureIndustryTax {

View File

@@ -0,0 +1,67 @@
<?php
namespace App\Library\Fleets;
//Internal Libraries
use Log;
//Seat Stuff
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
use Seat\Eseye\Exceptions\RequestFailedException;
//Libraries
use App\library\Esi\Esi;
//Models
use App\Models\Fleets\AllianceFleet;
use App\Models\Fleets\AllianceFleetMember;
class FleetHelper {
//Variables
private $esi;
//Constructi
public function __construct($charId) {
//Declare a variable for use by the constructor
$esiHelper = new Esi;
//Check for the ESI scope
$check = $esiHelper->HaveEsiScope($charId, 'esi-fleets.read_fleet.v1');
if($check) {
//Setup the ESI authentication container
$this->esi = $esiHelper->SetupEsiAuthentication();
} else {
$this->esi = null;
}
}
//Get fleet information
public function GetFleetInfo($fleetId) {
}
//Get fleet members
public function GetFleetMembers($fleetId) {
}
//Get fleet wings
public function GetFleetWings($fleetId) {
}
//Update fleet time
public function UpdateFleetTime($fleetId) {
}
//Update fleet character names
public function UpdateFleetCharacters($fleetId) {
}
}
?>

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Library\JumpBridges;
//Internal Libraries
use Carbon\Carbon;
//Library
use App\Library\Taxes\TaxesHelper;
//Models
use App\Models\JumpBridgeJournal;
class JumpBridgeHelper {
public function __construct() {
//
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,74 @@
<?php
namespace App\Library\Market;
//Internal Library
use Log;
use Carbon\Carbon;
//Library
use App\Library\Esi\Esi;
class MarketHelper {
/**
* Private variables
*
* @var esi
*/
private $esi;
/**
* Class Construct
*/
public function __construct($esi = null) {
$this->esi = $esi;
}
/**
* Get the regional market orders
*
* @var region
*/
public function GetRegionalMarketOrders($region) {
}
/**
* Price an item out and return the different price schemes
*
* @var itemId
*/
public function PriceItem($itemId) {
}
/**
* Get the market group infromation
*
* @var group
*/
public function GetMarketGroup($group) {
}
/**
* Get the public contract items
*
* @var contractId
*/
public function GetPublicContractItem($contractId) {
}
/**
* Get market price for an item
*
* @var itemId
*/
public function GetMarketPrice($itemId) {
}
}
?>

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