From b60f74953858ef404eccbdd56a6ed0df33d1c5c5 Mon Sep 17 00:00:00 2001 From: Mufassil Yasir Date: Sun, 1 Oct 2023 21:47:53 +0500 Subject: [PATCH] update currency --- .github/workflows/deploy.yml | 4 +- app/Jobs/ProcessRosterInactivity.php | 2 +- app/Models/Roster/RosterMember.php | 4 +- resources/views/my/index.blade.php | 1401 ++++++++++++++------------ 4 files changed, 748 insertions(+), 663 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 508da90b..ad97155e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,7 @@ jobs: KEY: ${{ secrets.PASS }} PORT: 22 source: ./ - target: /var/www/czqoprod/ + target: /var/www/czqo-web-prod/ - name: Set permissions uses: appleboy/ssh-action@master @@ -29,7 +29,7 @@ jobs: KEY: ${{ secrets.PASS }} PORT: 22 script: | - cd /var/www/czqoprod/ + cd /var/www/czqo-web-prod/ chown -R mufassil:www-data . find . -type f -exec chmod 664 {} \; find . -type d -exec chmod 775 {} \; diff --git a/app/Jobs/ProcessRosterInactivity.php b/app/Jobs/ProcessRosterInactivity.php index 415fb02a..bed865bf 100644 --- a/app/Jobs/ProcessRosterInactivity.php +++ b/app/Jobs/ProcessRosterInactivity.php @@ -57,7 +57,7 @@ public function handle() } if ($rosterMember->active) { - if ($rosterMember->currency < 6.0) { + if ($rosterMember->currency < 3.0) { $discord = new DiscordClient(); $discord_user_id = $rosterMember->user->discord_user_id; if ($discord_user_id && $rosterMember->user->member_of_czqo){ diff --git a/app/Models/Roster/RosterMember.php b/app/Models/Roster/RosterMember.php index 94af4dd2..b82db130 100644 --- a/app/Models/Roster/RosterMember.php +++ b/app/Models/Roster/RosterMember.php @@ -126,8 +126,8 @@ public function meetsActivityRequirement() return true; } - //If they are meet activity requirements why send em an email? - if ($this->currency >= 6.0) { + //If they are meeting activity requirements why send em an email? + if ($this->currency >= 3.0) { return true; } diff --git a/resources/views/my/index.blade.php b/resources/views/my/index.blade.php index ef59b324..788547d7 100644 --- a/resources/views/my/index.blade.php +++ b/resources/views/my/index.blade.php @@ -1,720 +1,805 @@ @extends('layouts.primary', ['solidNavBar' => false]) @section('title', 'myCZQO - ') @section('content') -
- -
-
-
-

- + +
+
+
+

+ "Aloha", - "ahoy"=>"Ahoy", - "bonjour"=>"Bonjour", - "gday"=>"G'day", - "hello"=>"Hello", - "hey"=>"Hey", - "hi"=>"Hi", - "hola"=>"Hola", - "howdy"=>"Howdy", - "guten_tag"=>"Guten Tag", - "grüß_dich"=>"Grüß Dich"); - - //echo greeting - echo (randomArrayVar($greeting)); - ?> - {{auth()->user()->fullName('F')}}! -

- @if(isset($quote)) -

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

- @endif + + //list of grettings as arary + + $greeting = [ + 'aloha' => 'Aloha', + 'ahoy' => 'Ahoy', + 'bonjour' => 'Bonjour', + 'gday' => "G'day", + 'hello' => 'Hello', + 'hey' => 'Hey', + 'hi' => 'Hi', + 'hola' => 'Hola', + 'howdy' => 'Howdy', + 'guten_tag' => 'Guten Tag', + 'grüß_dich' => 'Grüß Dich', + ]; + + //echo greeting + echo randomArrayVar($greeting); + ?> + {{ auth()->user()->fullName('F') }}! +

+ @if (isset($quote)) +

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

+ @endif +
+ @if (auth()->user()->created_at->diffInDays(Carbon\Carbon::now()) < 14) + + + @endif
- @if(auth()->user()->created_at->diffInDays(Carbon\Carbon::now()) < 14) - - @endif -
- -
-

myCZQO

- @if (auth()->user()->rating_id >= 5) - @endif -
- @role('Restricted') -
- Your account on Gander Oceanic is currently restricted. You cannot access pages that require an account, except for "Manage your data". Contact the OCA Chief for more information.
- @endrole -
-
- +
+
+
+

Your Profile

+
+
+
+ +
+
+ + {{ auth()->user()->fullName('FLC') }} + +
+
+ {{ auth()->user()->rating_GRP }} ({{ auth()->user()->rating_short }}) +
+ Region: {{ auth()->user()->region_name }}
+ Division: {{ auth()->user()->division_name }}
+ @if (auth()->user()->subdivision_name) + vACC/ARTCC: {{ auth()->user()->subdivision_name }}
+ @endif + Role: {{ auth()->user()->highestRole()->name }}
+ @if (auth()->user()->staffProfile) + Staff Role: {{ auth()->user()->staffProfile->position }} + @endif
-
-
-
- - {{ auth()->user()->fullName('FLC') }} +
+
-
- {{auth()->user()->rating_GRP}} ({{auth()->user()->rating_short}}) -
- Region: {{ auth()->user()->region_name }}
- Division: {{ auth()->user()->division_name }}
- @if (auth()->user()->subdivision_name) - vACC/ARTCC: {{ auth()->user()->subdivision_name }}
- @endif - Role: {{auth()->user()->highestRole()->name}}
- @if(auth()->user()->staffProfile) - Staff Role: {{auth()->user()->staffProfile->position}} @endif +

Biography

+

+ @if (auth()->user()->bio) + {{ auth()->user()->bio }} + @else + You have no biography. + @endif +

+ + + + +   + + Edit + +
-
-
-

Discord

- @if (!auth()->user()->hasDiscord()) -

You have not linked your Discord account.

- - - - -   - - Link your Discord - - - @else -

  {{auth()->user()->discord_username}}

- @if(!auth()->user()->member_of_czqo) - - - - -   - - Join Our Discord - -   - @endif - - - - -   - - Unlink - - - @endif -

Biography

-

- @if (auth()->user()->bio) - {{auth()->user()->bio}} - @else - You have no biography. - @endif -

- - - - -   - - Edit - - -
-
-
- @if(auth()->user()->pendingApplication()) - -

You have a pending application for Gander Oceanic

-

#{{auth()->user()->pendingApplication()->reference_id}} - submitted {{auth()->user()->pendingApplication()->created_at->diffForHumans()}}

-
- @endif - @if ($studentProfile = auth()->user()->studentProfile && $cert = auth()->user()->studentProfile->soloCertification()) -
-

{{ $cert->expires->diffInDays(Carbon\Carbon::now()) <= 2 ? 'Your solo certification is about to expire' : 'Your active solo certification'}}

-
Expires: {{$cert->expires->toFormattedDateString()}} (in {{$cert->expires->diffForHumans()}})
-
Granted by: {{$cert->instructor->fullName('FL')}}
-

{{ $cert->expires->diffInDays(Carbon\Carbon::now()) <= 2 ? 'Contact your instructor to request an extension or proceed to an OTS assessment.' : 'Your use of this solo certification is bound to our policies and VATSIM\'s GRP. Your instructor will give you more information.'}}

-
- @endif - @if ($studentProfile = auth()->user()->studentProfile && $session = auth()->user()->studentProfile->upcomingTrainingSession()) -
-

Your upcoming training session

-
Scheduled for {{$session->scheduled_time->toFormattedDateString()}} (in {{$session->scheduled_time->diffForHumans()}})
-
With {{$session->instructor->user->fullName('FL')}}
-
- @endif - @if ($studentProfile = auth()->user()->studentProfile && $session = auth()->user()->studentProfile->upcomingOtsSession()) -
-

Your upcoming OTS session

-
Scheduled for {{$session->scheduled_time->toFormattedDateString()}} (in {{$session->scheduled_time->diffForHumans()}})
-
With {{$session->instructor->user->fullName('FL')}}
+
+ @if (auth()->user()->pendingApplication()) + +

You have a pending application for Gander Oceanic

+

+ #{{ auth()->user()->pendingApplication()->reference_id }} - submitted + {{ auth()->user()->pendingApplication()->created_at->diffForHumans() }}

+
+ @endif + @if ( + $studentProfile = + auth()->user()->studentProfile && + ($cert = auth()->user()->studentProfile->soloCertification())) +
+

+ {{ $cert->expires->diffInDays(Carbon\Carbon::now()) <= 2 ? 'Your solo certification is about to expire' : 'Your active solo certification' }} +

+
Expires: {{ $cert->expires->toFormattedDateString() }} (in + {{ $cert->expires->diffForHumans() }})
+
Granted by: {{ $cert->instructor->fullName('FL') }}
+

+ {{ $cert->expires->diffInDays(Carbon\Carbon::now()) <= 2 ? 'Contact your instructor to request an extension or proceed to an OTS assessment.' : 'Your use of this solo certification is bound to our policies and VATSIM\'s GRP. Your instructor will give you more information.' }} +

+
+ @endif + @if ( + $studentProfile = + auth()->user()->studentProfile && + ($session = auth()->user()->studentProfile->upcomingTrainingSession())) +
+

Your upcoming training session

+
Scheduled for + {{ $session->scheduled_time->toFormattedDateString() }} (in + {{ $session->scheduled_time->diffForHumans() }})
+
With {{ $session->instructor->user->fullName('FL') }}
+
+ @endif + @if ( + $studentProfile = + auth()->user()->studentProfile && + ($session = auth()->user()->studentProfile->upcomingOtsSession())) +
+

Your upcoming OTS session

+
Scheduled for + {{ $session->scheduled_time->toFormattedDateString() }} (in + {{ $session->scheduled_time->diffForHumans() }})
+
With {{ $session->instructor->user->fullName('FL') }}
+
+ @endif
- @endif
-
- -