@extends('user.layouts')
@section('title', 'Service Request View')
@section('header')
@endsection
@section('content')
@php
/*
|--------------------------------------------------------------------------
| SERVICES
|--------------------------------------------------------------------------
*/
$services = $view_service->service;
if (is_string($services)) {
$decodedServices = json_decode($services, true);
$services = is_array($decodedServices)
? $decodedServices
: [$services];
} elseif (!is_array($services)) {
$services = !empty($services)
? [$services]
: [];
}
/*
|--------------------------------------------------------------------------
| GALLERY
|--------------------------------------------------------------------------
*/
$galleryImages = $view_service->gallery;
if (is_string($galleryImages)) {
$decodedGallery = json_decode($galleryImages, true);
$galleryImages = is_array($decodedGallery)
? $decodedGallery
: (
!empty($galleryImages)
? [$galleryImages]
: []
);
} elseif (!is_array($galleryImages)) {
$galleryImages = !empty($galleryImages)
? [$galleryImages]
: [];
}
/*
|--------------------------------------------------------------------------
| SAFE DISPLAY VALUES
|--------------------------------------------------------------------------
*/
$profileImage = $view_service->business_profile ?? null;
$coverImage = $view_service->business_cover_photo ?? null;
$businessName = $view_service->business_name ?? 'N/A';
$categoryName = $view_service->category_name ?? 'N/A';
$ownerName = $view_service->name ?? 'N/A';
$phoneNumber = $view_service->phone_number ?? 'N/A';
$whatsappNumber = $view_service->whatsapp_number ?? 'N/A';
$district = $view_service->district ?? 'N/A';
$village = $view_service->village ?? 'N/A';
$place = $view_service->place ?? 'N/A';
$description = $view_service->description ?? 'No description available.';
@endphp
{{-- ======================================================
PAGE HEADER
======================================================= --}}
{{-- ======================================================
BUSINESS OVERVIEW
======================================================= --}}
{{-- COVER --}}
@if(!empty($coverImage))
@endif
{{-- OVERVIEW CONTENT --}}
{{-- PROFILE --}}
@if(!empty($profileImage))
@else
@endif
{{-- SUMMARY --}}
{{ $businessName }}
{{ $categoryName }}
{{ $ownerName }}
{{ $phoneNumber }}
{{ $place }}
Pending Review
{{-- ======================================================
CONTACT + LOCATION
======================================================= --}}
{{-- CONTACT INFORMATION --}}
Contact Information
Business owner contact details
{{-- NAME --}}
{{-- BUSINESS --}}
Business Name
{{ $businessName }}
{{-- PHONE --}}
Phone Number
{{ $phoneNumber }}
{{-- WHATSAPP --}}
WhatsApp Number
{{ $whatsappNumber }}
{{-- CATEGORY --}}
Category
{{ $categoryName }}
{{-- LOCATION --}}
Business Location
Registered business location
{{-- DISTRICT --}}
{{-- VILLAGE --}}
{{-- PLACE --}}
{{-- FULL LOCATION --}}
Location
{{ $place }}
@if(
!empty($village) &&
$village !== 'N/A'
)
, {{ $village }}
@endif
@if(
!empty($district) &&
$district !== 'N/A'
)
, {{ $district }}
@endif
{{-- ======================================================
DESCRIPTION
======================================================= --}}
About Business
Business description
{{-- ======================================================
SERVICES
======================================================= --}}
Services
Services provided by this business
@if(count($services) > 0)
{{ count($services) }}
@endif
@if(count($services) > 0)
@foreach($services as $service)
@if(
!is_array($service) &&
!is_object($service) &&
trim((string) $service) !== ''
)
{{ $service }}
@endif
@endforeach
@else
No services available
@endif
{{-- ======================================================
BUSINESS ATTACHMENTS
======================================================= --}}
Business Attachments
Profile and cover images
{{-- PROFILE IMAGE --}}
@if(!empty($profileImage))
@else
Business profile image not available
@endif
{{-- COVER IMAGE --}}
@if(!empty($coverImage))
@else
Business cover image not available
@endif
{{-- ======================================================
GALLERY
======================================================= --}}
Gallery
Business gallery images
@if(count($galleryImages) > 0)
{{ count($galleryImages) }}
@endif
@if(count($galleryImages) > 0)
@foreach($galleryImages as $image)
@if(!empty($image))
@endif
@endforeach
@else
No gallery images available
@endif
{{-- ======================================================
BOTTOM ACTION
======================================================= --}}
{{-- ==========================================================
IMAGE VIEW MODAL
========================================================== --}}