Skip to content

Commit

Permalink
Merge pull request #344 from czqoocavatsim/JoshuaBranch
Browse files Browse the repository at this point in the history
Final Updates for a while
  • Loading branch information
JoshuaMicallefYBSU authored Sep 1, 2024
2 parents 0f1730d + ca633b1 commit 8d7ba32
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
6 changes: 3 additions & 3 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function schedule(Schedule $schedule)
$schedule->job(new ProcessRosterInactivity())->daily();

// Monthly Statistics Breakdown
$schedule->job(new ProcessMonthlyBreakdown())->monthlyOn(1, '00:40');
$schedule->job(new ProcessMonthlyBreakdown())->monthlyOn(1, '00:01');

//Solo cert expiry warning
// $schedule->job(new ProcessSoloCertExpiryWarnings())->daily();
Expand All @@ -58,10 +58,10 @@ protected function schedule(Schedule $schedule)
$schedule->job(new ProcessSessionReminders())->daily();

// Check Training Threads Status (Once per week)
$schedule->job(new DiscordTrainingWeeklyUpdates())->weeklyOn(6, '6:00');
$schedule->job(new DiscordTrainingWeeklyUpdates())->weeklyOn(6, '00:01');

// Check If Account is Linked
$schedule->job(new DiscordAccountCheck)->weeklyOn(5, '0:30');
$schedule->job(new DiscordAccountCheck)->weeklyOn(5, '0:01');

//CRONS FOR INACTIVITY EMAILS 2 weeks
// $schedule->call(function () {
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/DiscordTrainingWeeklyUpdates.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function handle()
$avail_message++;

// // SendEmbed to ask student to send availability
$discord->sendEmbedInTrainingThread($cid, "Please Provide Availability", 'Hello, <@'.$student->discord_user_id.'>
$discord->sendEmbedInTrainingThread($cid, "Please Provide Availability", 'Hello, <@'.$student->user->discord_user_id.'>
As we head into the Weekend, we ask you please provide your availability for next week. Please ensure to tag the `@Instructor` role with all times you are available. Please provide these times in Zulu Format.
Expand Down
4 changes: 2 additions & 2 deletions app/Jobs/ProcessMonthlyBreakdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public function handle()
$message .= "\n**__Top 3 Controllers__**\n";
foreach($top_3 as $t) {
if($t->user->discord_user_id === null){
$message .= "- " . $t->user->fullName('FLC') . " - ".$t->monthly_hours."\n";
$message .= "- " . $t->user->fullName('FLC') . " - ".$t->monthly_hours." hours\n";
} else {
$message .= "- <@" . $t->user->discord_user_id . "> - ".$t->monthly_hours."\n";
$message .= "- <@" . $t->user->discord_user_id . "> - ".$t->monthly_hours." hours\n";
}
}

Expand Down
8 changes: 5 additions & 3 deletions app/Jobs/ProcessRosterInactivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ public function handle()

// Go through each session to get some information
foreach($sessions as $s){
if($s->duration > 0.49){
$currency += $s->duration;
}
// if($s->duration > 0.49){
// $currency += $s->duration;
// }

$currency += $s->duration;
}


Expand Down
4 changes: 2 additions & 2 deletions app/Jobs/ProcessSessionLogging.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ public function handle()
// Controller is either Certified or In Training
if (($rosterMember->certification == 'certified' || $rosterMember->certification == 'training')) {

// Only add hours if more than 30mins
if($currency > 0.49){
// Only add hours if more than 30mins (Disabled to 01mins until policy update)
if($currency > 0.00){
$rosterMember->currency += $currency;
$rosterMember->monthly_hours += $monthly_hours;
$rosterMember->save();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
</div>
<div class="modal-body">
<p>This will mark the students training as 'completed', close out all of their training, and add them to the controller roster.</p>
<p>Please do not do this unless the student is actually completed. This is REALLY REALLY painful to reverse</p>
<p>Please do not do this unless the student is actually completed. This is **REALLY REALLY painful** to reverse</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-dismiss="modal">Dismiss</button>
Expand Down
3 changes: 2 additions & 1 deletion resources/views/my/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ class='badge rounded {{ $class }} text-white p-2 shadow-none'>

<h3 class="font-weight-bold blue-text mt-4 pb-2">Your Connections</h3>
<p class="mt-2">List of all your Gander Oceanic connections to VATSIM over the last 12 Months.</p>
<p class="mt-0">Connections less than 30 minutes are shown in red, and do not count towards Controller Currency.</p>
{{-- <p class="mt-0">Connections less than 30 minutes are shown in red, and do not count towards Controller Currency.</p> --}}
<p class="mt-0">Connections less than 30 minutes are shown in red.</p>
<table class="table dt table-hover table-bordered">
<thead>
<th>Position</th>
Expand Down

0 comments on commit 8d7ba32

Please sign in to comment.