diff --git a/app/Http/Controllers/PrimaryViewsController.php b/app/Http/Controllers/PrimaryViewsController.php index 2b5eade5..c10907c5 100644 --- a/app/Http/Controllers/PrimaryViewsController.php +++ b/app/Http/Controllers/PrimaryViewsController.php @@ -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'); diff --git a/app/Http/Controllers/Roster/RosterController.php b/app/Http/Controllers/Roster/RosterController.php index 59226f9a..a04f73e9 100644 --- a/app/Http/Controllers/Roster/RosterController.php +++ b/app/Http/Controllers/Roster/RosterController.php @@ -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')); diff --git a/app/Jobs/ProcessRosterInactivity.php b/app/Jobs/ProcessRosterInactivity.php index b952fa64..3fba8460 100644 --- a/app/Jobs/ProcessRosterInactivity.php +++ b/app/Jobs/ProcessRosterInactivity.php @@ -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){ diff --git a/resources/views/my/index.blade.php b/resources/views/my/index.blade.php index ce6db2f5..4d9b35f1 100644 --- a/resources/views/my/index.blade.php +++ b/resources/views/my/index.blade.php @@ -366,10 +366,10 @@ class='badge rounded {{ $class }} text-white p-2 shadow-none'> -

To remain active, you require 60 minutes of connection within the last 12 months.

+

To remain active, you require 60 minutes of connection during this calendar year.

Your Connections

-

List of all your Gander Oceanic connections to VATSIM over the last 12 Months.

+

List of all your Gander Oceanic connections to VATSIM during {{\Carbon\Carbon::now()->format('Y')}}.

{{--

Connections less than 30 minutes are shown in red, and do not count towards Controller Currency.

--}}

Connections less than 30 minutes are shown in red.