Skip to content

Commit

Permalink
Merge pull request #407 from czqoocavatsim/JoshuaBranch
Browse files Browse the repository at this point in the history
Little Fixes
JoshuaMicallefYBSU authored Oct 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 71ca54d + 56ff765 commit 80ab6aa
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/PrimaryViewsController.php
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ public function dashboard(Request $request)
{
$user = Auth::user();

$sessions = SessionLog::where('cid', Auth::user()->id)->where('created_at', '>=', Carbon::now()->subMonths(12))->orderBy('created_at', 'desc')->get();
$sessions = SessionLog::where('cid', Auth::user()->id)->where('created_at', '>=', Carbon::now()->startOfYear())->orderBy('created_at', 'desc')->get();

$atcResources = AtcResource::all()->sortBy('title');

2 changes: 1 addition & 1 deletion app/Http/Controllers/Roster/RosterController.php
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ public function viewRosterMember($cid)
//Get roster member
$rosterMember = RosterMember::where('cid', $cid)->firstOrFail();

$sessions = SessionLog::where('cid', $cid)->where('created_at', '>=', Carbon::now()->subMonths(12))->orderBy('created_at', 'desc')->get();
$sessions = SessionLog::where('cid', $cid)->where('created_at', '>=', Carbon::now()->startOfYear())->orderBy('created_at', 'desc')->get();

//Return view
return view('admin.training.roster.controller', compact('rosterMember', 'sessions'));
8 changes: 4 additions & 4 deletions app/Jobs/ProcessRosterInactivity.php
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ public function handle()
}

// 1NOV - 2 Month Activity Check
if($roster->active && Carbon::now()->format('d/m') == "11/11" && $roster->currency < 1) {
if($roster->certification == "certified" && $roster->active && Carbon::now()->format('d/m') == "1/11" && $roster->currency < 1) {
$active_status = 0;

$first_names[] = $name;
@@ -98,21 +98,21 @@ public function handle()
}

// 1DEC - 1 Month till Removal
if(Carbon::now()->format('d/m') == "1/12" && $roster->currency < 1){
if($roster->certification == "certified" && Carbon::now()->format('d/m') == "1/12" && $roster->currency < 1){
$second_names[] = $name;

$second_notice++;
}

// 24DEC - 7 Days Till Removal
if(Carbon::now()->format('d/m') == "24/12" && $roster->currency < 1){
if($roster->certification == "certified" && Carbon::now()->format('d/m') == "24/12" && $roster->currency < 1){
$third_names[] = $name;

$third_notice++;
}

// End Of Year - Reset Time
if(Carbon::now()->format('d/m') == "31/12"){
if($roster->certification == "certified" && Carbon::now()->format('d/m') == "31/12"){

// User to be terminated
if($roster->currency < 1){
4 changes: 2 additions & 2 deletions resources/views/my/index.blade.php
Original file line number Diff line number Diff line change
@@ -366,10 +366,10 @@ class='badge rounded {{ $class }} text-white p-2 shadow-none'>
</span>
</h3>

<p class="mt-2">To remain active, you require 60 minutes of connection within the last 12 months.</p>
<p class="mt-2">To remain active, you require 60 minutes of connection during this calendar year.</p>

<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-2">List of all your Gander Oceanic connections to VATSIM during {{\Carbon\Carbon::now()->format('Y')}}.</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">

0 comments on commit 80ab6aa

Please sign in to comment.