@php
$latestVerification = $business->verifications->sortByDesc('created_at')->first();
$status = $latestVerification->overall_status ?? null;
@endphp
{{-- PAGE HEADER --}}
@if (in_array(optional(auth()->user()->role)->alias, ['SADM', 'ARAD']))
{{-- MAIN CARD --}}
{{ $business->business_name }}
{{ $business->business_email }}
@if ($status === 'approved')
Approved
@elseif ($status === 'rejected')
Rejected
@else
@endif
@endif
{{-- TABS --}}
{{-- OVERVIEW --}}
{{-- SOCIAL LINKS --}}
{{-- SHOP --}}
{{-- HOURS --}}
{{-- REGIONS --}}
{{-- MODAL --}}
{{-- REGISTRATIONS --}}
@php
$role = auth('web')->user()->role->alias;
$isVolunteer = $role === 'VOL';
$isAdmin = in_array($role, ['SADM', 'ARAD']);
@endphp
{{-- PRODUCTS --}}
{{-- Staff Details --}}
{{-- HISTORY --}}
Business Info
Category{{ $business->category->name ?? 'N/A' }}
Subcategory
{{ $business->subcategory->name ?? 'N/A' }}
Location
State{{ $business->state->state_name ?? 'N/A' }}
City
{{ $business->city->city_name ?? 'N/A' }}
District
{{ $business->district->district_name ?? 'N/A' }}
Zone
{{ $business->zone->name ?? 'N/A' }}
Zonal Area
{{ $business->zonalArea->name ?? 'N/A' }}
Address
{{ $business->address }}
Social Links
{{-- Facebook --}}
@if ($business->socialLinks && $business->socialLinks->facebook_url)
{{ $business->socialLinks->facebook_url }}
@else
N/A
@endif
{{-- Instagram --}}
Instagram
@if ($business->socialLinks?->instagram_url)
{{ $business->socialLinks->instagram_url }}
@else
N/A
@endif
{{-- Twitter --}}
Twitter
@if ($business->socialLinks?->twitter_url)
{{ $business->socialLinks->twitter_url }}
@else
N/A
@endif
{{-- Website --}}
Website
@if ($business->socialLinks?->website_url)
{{ $business->socialLinks->website_url }}
@else
N/A
@endif
Logo
@if ($business->details?->shop_logo)
@endif
@if ($business->details?->shop_logo)
Banner
@if ($business->details?->shop_banner)
@endif
@if ($business->details?->shop_banner)
Description:
{{ $business->details->shop_description ?? 'N/A' }}
About:{{ $business->details->about_business ?? 'N/A' }}
{{-- Header --}}
{{-- Table Head --}}
Operating Hours
| Day | Opening Time | Closing Time | Status |
|---|---|---|---|
| {{ ucfirst($hour->day) }} | {{-- Open --}}{{ $hour->open_time ?? '-' }} | {{-- Close --}}{{ $hour->close_time ?? '-' }} | {{-- Status --}}{{ $hour->is_closed ? 'Closed' : 'Open' }} |
@foreach ($business->serviceableRegions as $region)
{{-- GOVERNMENT TAB --}}
@php
$role = auth('web')->user()->role->alias;
$isVolunteer = $role === 'VOL';
$isAdmin = in_array($role, ['SADM', 'ARAD']);
@endphp
{{ $region->state->state_name ?? '' }},
{{ $region->city->city_name ?? '' }},
{{ $region->district->district_name ?? '' }} -
{{ $region->pincode }}
@endforeach
@foreach ($business->governmentIds as $id)
@endforeach
{{-- ID INFO --}}
{{ $id->id_type }}
{{ $id->id_number }} {{-- DOCUMENT --}} @if ($id->id_document) @php $fileUrl = asset('storage/' . $id->id_document); $ext = strtolower(pathinfo($fileUrl, PATHINFO_EXTENSION)); @endphp
{{ $id->id_number }} {{-- DOCUMENT --}} @if ($id->id_document) @php $fileUrl = asset('storage/' . $id->id_document); $ext = strtolower(pathinfo($fileUrl, PATHINFO_EXTENSION)); @endphp
@if (in_array($ext, ['jpg', 'jpeg', 'png']))
@elseif ($ext === 'pdf')
View PDF
@endif
@endif
{{-- STATUS --}}
Status:
{{ $id->verification_status == 'volunteer_approved'
? 'Pending Admin Approval'
: ucfirst($id->verification_status) }}
{{-- REMARKS --}}
@if ($id->remarks)
Remark: {{ $id->remarks }}
@endif
{{-- ACTION BUTTONS --}}
{{-- VOLUNTEER --}}
@if ($isVolunteer && $id->verification_status == 'pending')
@endif
{{-- ADMIN --}}
@if ($isAdmin && $id->verification_status == 'volunteer_approved')
@endif
{{-- ALREADY APPROVED --}}
@if ($id->verification_status == 'approved')
Already Approved
@endif
@foreach ($business->registrations as $reg)
{{-- MODAL --}}
{{ $reg->registration_type }}
{{ $reg->registration_number ?? 'N/A' }} @if ($reg->registration_document) @php $fileUrl = asset('storage/' . $reg->registration_document); $ext = strtolower(pathinfo($fileUrl, PATHINFO_EXTENSION)); @endphp
@endforeach
{{ $reg->registration_number ?? 'N/A' }} @if ($reg->registration_document) @php $fileUrl = asset('storage/' . $reg->registration_document); $ext = strtolower(pathinfo($fileUrl, PATHINFO_EXTENSION)); @endphp
@if (in_array($ext, ['jpg', 'jpeg', 'png']))
@elseif ($ext === 'pdf')
View PDF
@endif
@endif
{{-- STATUS --}}
Status:
{{ $reg->verification_status == 'volunteer_approved'
? 'Pending Admin Approval'
: ucfirst($reg->verification_status) }}
{{-- REMARKS --}}
@if ($reg->remarks)
Remark: {{ $reg->remarks }}
@endif
{{-- ACTIONS --}}
{{-- VOLUNTEER --}}
@if ($isVolunteer && $reg->verification_status == 'pending')
@endif
{{-- ADMIN --}}
@if ($isAdmin && $reg->verification_status == 'volunteer_approved')
@endif
@foreach ($products as $product)
@endforeach
{{ $product->name }}
{{ Str::limit($product->description, 70) }}
₹{{ $product->pricing->price ?? 0 }}
@foreach ($business->staffDetails as $staff)
@endforeach
{{-- HEADER --}}
{{-- CONTACT --}}
@php
$role = auth()->user()->role->alias;
$allDocsApproved =
$staff->documents->count() > 0 &&
$staff->documents->every(
fn($doc) => $doc->status === 'approved',
);
@endphp
@if (in_array($role, ['SADM', 'ARAD']) && $staff->status !== 'active' && $allDocsApproved)
@endif
{{-- DOCUMENTS --}}
{{ $staff->first_name }} {{ $staff->last_name }}
{{ ucfirst($staff->status) }}📞 {{ $staff->phone }}
📧 {{ $staff->email }}
@foreach ($business->verifications as $verification)
{{ ucfirst($verification->overall_status) }}
@endforeach
{{ $verification->verified_at }} | {{ $verification->user->name ?? 'N/A' }}
@if ($verification->remarks)
{{ $verification->remarks }}
@endif