@include('backend.components.apply_license_modal')
@php $logoImageUrl = asset('storage/backend-resources/images/profile/profile.png'); $bannerImageUrl = $logoImageUrl; if ($establishment->image) { $logoImageUrl = asset( 'storage/Establishments/' . $establishment->name . '/' . $establishment->image, ); } if ($establishment->banner_image) { $bannerImageUrl = asset( 'storage/Establishments/' . $establishment->name . '/' . $establishment->banner_image, ); } @endphp

{{ ucfirst($establishment->name) }}

{{ $establishment->proprietor_name }}

({{ $establishment->manager_license_id ? ucfirst(\App\Models\License::find($establishment->manager_license_id)->applicant_name) : 'No Associated Manager' }})
{{ $establishment->proprietor_contact_number }}
{{ $establishment->user->email }} {{-- {{ $establishment->is_proprietor_or_manager }} --}}
{{--

{{ $establishment->user->email }}

Email
--}}

{{ $establishment->phone }}

{{ $establishment->phone2 }}

Phone
Tax Id.

{{ $establishment->tax_id_number }}

@if ($establishment->user->est_license_id == 3)

@if ($establishment->is_iata_member)
Member
@else
Not a member
@endif

IATA Member Status
@endif @if ($establishment->user->est_license_id == 1)
Is member of Hotel Federation

@if ($establishment->is_member_hotel_federation)
Member
@else
Not a member
@endif

Is EPA License Compliant

@if ($establishment->is_EPA_license_fee_compliant)
Member
@else
Not a member
@endif

@endif
Is Local Policy Compliant

@if ($establishment->is_local_policy_compliant)
Member
@else
Not a member
@endif

Profile

{{ $establishment->is_profile_approved ? 'Approved' : 'Pending Approved' }}

{{--
User  
{{ $establishment->user->is_active ? 'Active' : 'Inactive' }}
Profile  
{{ $establishment->is_profile_approved ? 'Approved' : 'Pending Approved' }}
--}}
@php $userType = $establishment->user->user_type; $hasLicense = $establishment->Licenses()->exists(); $profileApproved = $establishment->is_profile_approved; $establishmentScore = $establishment->EstablishmentScore ? $establishment->EstablishmentScore : '#'; @endphp @if ($userType !== 1 && $userType !== 2 && $profileApproved && !$hasLicense) @else @if ($establishmentScore) @php $runningTotalRestaurant = 0; $runningTotalBar = 0; $finalTotalToShow = 0; $generalScoreBase = 25 * 10; $restaurantBase = 13 * 10; $barBase = 11 * 10; if ( $establishment->EstablishmentScore && $establishment->EstablishmentScore->EstablishmentRestaurants->count() > 0 ) { $restaurantBase = $restaurantBase * $establishment->EstablishmentScore->EstablishmentRestaurants->count(); foreach ( $establishment->EstablishmentScore->EstablishmentRestaurants as $restScore ) { $runningTotalRestaurant += $restScore->subtotal; } } if ( $establishment->EstablishmentScore && $establishment->EstablishmentScore->EstablishmentBars->count() > 0 ) { $barBase = $barBase * $establishment->EstablishmentScore->EstablishmentBars->count(); foreach ( $establishment->EstablishmentScore->EstablishmentBars as $barScore ) { $runningTotalBar += $barScore->bar_subtotal; } } $totalBase = $generalScoreBase + $restaurantBase + $barBase; $finalTotalToShow = $establishment->EstablishmentScore ? $establishment->EstablishmentScore->totalScore : 0; $finalTotalToShow += $runningTotalBar + $runningTotalRestaurant; $percentage = number_format(($finalTotalToShow / $totalBase) * 100, 2); if ($percentage >= 90 && $percentage <= 100) { $category = 'Class 1'; } elseif ($percentage >= 75 && $percentage < 90) { $category = 'Class 2'; } elseif ($percentage >= 60 && $percentage < 75) { $category = 'Class 3'; } elseif ($percentage >= 45 && $percentage < 60) { $category = 'Class 4'; } elseif ($percentage <= 0.0) { $category = 'NOT CLASSIFIED'; } else { $category = 'Class 5'; } @endphp
Ranking

{{ $category . ' (' . $percentage . '%)' }}

@else Update Establishment Rank @endif @endif