From ef9144b5e74ac73ed0222861d530b437edddfb50 Mon Sep 17 00:00:00 2001 From: v-stamenova Date: Wed, 16 Oct 2024 12:39:47 +0200 Subject: [PATCH 1/2] Add checks to ensure that the sponsor is approved before being shown on the page --- resources/views/welcome.blade.php | 90 ++++++++++++++++--------------- 1 file changed, 48 insertions(+), 42 deletions(-) diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 942293a8..cd021d53 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -248,68 +248,74 @@ class="absolute inset-0 bg-gradient-to-br from-gradient-purple to-gradient-pink
- @if(\App\Models\Sponsorship::find(1)->companies->count() > 0) + @if(\App\Models\Sponsorship::find(1)->companies()->where('is_sponsorship_approved', true)->count() > 0)

Gold sponsor

@foreach(\App\Models\Sponsorship::find(1)->companies as $company) - + @if($company->is_sponsorship_approved) + + @endif @endforeach
@endif - @if(\App\Models\Sponsorship::find(2)->companies->count() > 0) + @if(\App\Models\Sponsorship::find(2)->companies()->where('is_sponsorship_approved', true)->count() > 0)

Silver sponsor

@foreach(\App\Models\Sponsorship::find(2)->companies as $company) - + @if($company->is_sponsorship_approved) + + @endif @endforeach
@endif - @if(\App\Models\Sponsorship::find(3)->companies->count() > 0) + @if(\App\Models\Sponsorship::find(3)->companies()->where('is_sponsorship_approved', true)->count() > 0)

Bronze sponsor

@foreach(\App\Models\Sponsorship::find(3)->companies as $company) - + @if($company->is_sponsorship_approved) + + @endif @endforeach
From 011dd6dd09745b153bcbcec34e0f4b6b3fb471b2 Mon Sep 17 00:00:00 2001 From: v-stamenova Date: Wed, 16 Oct 2024 12:48:47 +0200 Subject: [PATCH 2/2] Fix styling when showing sponsor's name --- resources/views/welcome.blade.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index cd021d53..4c5c4037 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -263,7 +263,9 @@ class="object-contain h-full w-full block dark:text-white transition ease-in-out src="{{ url('storage/'. $company->logo_path) }}" alt="Logo of {{$company->name}}"> @else -

{{$company->name}}

+
+

{{$company->name}}

+
@endif
@@ -287,7 +289,9 @@ class="object-contain h-full w-full block dark:text-white transition ease-in-out src="{{ url('storage/'. $company->logo_path) }}" alt="Logo of {{$company->name}}"> @else -

{{$company->name}}

+
+

{{$company->name}}

+
@endif
@@ -311,7 +315,9 @@ class="object-contain h-full w-full block dark:text-white transition ease-in-out src="{{ url('storage/'. $company->logo_path) }}" alt="Logo of {{$company->name}}"> @else -

{{$company->name}}

+
+

{{$company->name}}

+
@endif