From 27d76cfa3d3ac7ed338f31ffa2db5f143a8df7fe Mon Sep 17 00:00:00 2001 From: Mufassil Yasir Date: Wed, 12 Jun 2024 12:12:24 +0500 Subject: [PATCH] update activity requirement --- app/Http/Controllers/PrimaryViewsController.php | 15 +-------------- app/Models/Roster/RosterMember.php | 2 +- resources/views/my/index.blade.php | 8 ++------ 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/app/Http/Controllers/PrimaryViewsController.php b/app/Http/Controllers/PrimaryViewsController.php index 4623f7f3..aa65edf3 100644 --- a/app/Http/Controllers/PrimaryViewsController.php +++ b/app/Http/Controllers/PrimaryViewsController.php @@ -73,19 +73,6 @@ public function dashboard(Request $request) $bannerImg = null; } - //Quote of the day - $quote = Cache::remember('quoteoftheday', 86400, function () { - $client = new Client(); - $headers = [ - 'X-Api-Key' => env('QUOTES_API_TOKEN') - ]; - $output = $client->get('https://api.api-ninjas.com/v1/quotes',[ - 'headers' => $headers - ]); - - return json_decode($output->getBody()); - }); - - return view('my.index', compact('atcResources', 'bannerImg', 'quote')); + return view('my.index', compact('atcResources', 'bannerImg')); } } diff --git a/app/Models/Roster/RosterMember.php b/app/Models/Roster/RosterMember.php index b82db130..fbef44cd 100644 --- a/app/Models/Roster/RosterMember.php +++ b/app/Models/Roster/RosterMember.php @@ -127,7 +127,7 @@ public function meetsActivityRequirement() } //If they are meeting activity requirements why send em an email? - if ($this->currency >= 3.0) { + if ($this->currency >= 1.0) { return true; } diff --git a/resources/views/my/index.blade.php b/resources/views/my/index.blade.php index 788547d7..91a07bcb 100644 --- a/resources/views/my/index.blade.php +++ b/resources/views/my/index.blade.php @@ -37,9 +37,6 @@ function randomArrayVar($array) ?> {{ auth()->user()->fullName('F') }}! - @if (isset($quote)) -

{{ $quote[0]->quote }} ~ {{ $quote[0]->author }}

- @endif @if (auth()->user()->created_at->diffInDays(Carbon\Carbon::now()) < 14) @@ -355,7 +352,7 @@ class="list-group-item list-group-item-action p-4 z-depth-1 shadow-none mb-3">

Activity

@php $currency = auth()->user()->rosterProfile->currency; - $class = $currency < 0.1 ? 'red' : ($currency < 3.0 ? 'blue' : 'green'); + $class = $currency < 0.1 ? 'red' : ($currency < 1.0 ? 'blue' : 'green'); @endphp

@@ -365,8 +362,7 @@ class='badge rounded {{ $class }} text-white p-2 shadow-none'>

-

You require 3 hours of activity every quarter, unless you were certified within - the current activity cycle.

+

You require 1 hour of activity within the last 12 months.

@else