@extends('user.layouts')
@section('title', 'Edit Service Request View')
@section('header')
@endsection
@section('content')
@php
/*
|--------------------------------------------------------------------------
| NORMALIZE SERVICES
|--------------------------------------------------------------------------
*/
$services = $view_service->service ?? [];
if (is_string($services)) {
$decodedServices = json_decode($services, true);
if (is_array($decodedServices)) {
$services = $decodedServices;
} elseif (trim($services) !== '') {
$services = [$services];
} else {
$services = [];
}
} elseif (!is_array($services)) {
$services = !empty($services)
? [$services]
: [];
}
/*
|--------------------------------------------------------------------------
| NORMALIZE GALLERY
|--------------------------------------------------------------------------
*/
$galleryImages = $view_service->gallery ?? [];
if (is_string($galleryImages)) {
$decodedGallery = json_decode($galleryImages, true);
if (is_array($decodedGallery)) {
$galleryImages = $decodedGallery;
} elseif (trim($galleryImages) !== '') {
$galleryImages = [$galleryImages];
} else {
$galleryImages = [];
}
} elseif (!is_array($galleryImages)) {
$galleryImages = !empty($galleryImages)
? [$galleryImages]
: [];
}
/*
|--------------------------------------------------------------------------
| BUSINESS INITIAL
|--------------------------------------------------------------------------
*/
$businessName =
$view_service->business_name
?: 'Business';
$businessInitial =
strtoupper(
substr(
trim($businessName),
0,
1
)
);
@endphp
{{-- =====================================================
TOP BAR
====================================================== --}}
Edit Service Request
Review complete business information and request details
{{-- =====================================================
BUSINESS HERO
====================================================== --}}
@if(!empty($view_service->business_profile))
 }})
@else
{{ $businessInitial }}
@endif
{{ $businessName }}
{{ $view_service->category_name ?: 'No Category' }}
Request {{ $view_service->id }}
{{-- =====================================================
DETAILS + LOCATION
====================================================== --}}
{{-- PERSONAL / BUSINESS DETAILS --}}
{{-- NAME --}}
Name
{{ $view_service->name ?: 'N/A' }}
{{-- CATEGORY --}}
Category Name
{{ $view_service->category_name ?: 'N/A' }}
{{-- BUSINESS --}}
Business Name
{{ $view_service->business_name ?: 'N/A' }}
{{-- PHONE --}}
{{-- WHATSAPP --}}
WhatsApp No
{{ $view_service->whatsapp_number ?: 'N/A' }}
{{-- REQUEST ID --}}
Request ID
#{{ $view_service->id }}
{{-- LOCATION --}}
District
{{ $view_service->district ?: 'N/A' }}
Village
{{ $view_service->village ?: 'N/A' }}
Place
{{ $view_service->place ?: 'N/A' }}
{{-- =====================================================
ATTACHMENTS
====================================================== --}}
{{-- BUSINESS PROFILE --}}
@if(!empty($view_service->business_profile))
@else
No business profile image available.
@endif
{{-- COVER PHOTO --}}
@if(!empty($view_service->business_cover_photo))
@else
No business cover photo available.
@endif
{{-- =====================================================
DESCRIPTION + SERVICES
====================================================== --}}
{{-- DESCRIPTION --}}
@if(!empty($view_service->description))
{{ $view_service->description }}
@else
No description available.
@endif
{{-- SERVICES --}}
@if(count($services) > 0)
@foreach($services as $item)
@if(!empty($item))
{{ $item }}
@endif
@endforeach
@else
No services available.
@endif
{{-- =====================================================
GALLERY
====================================================== --}}
@if(count($galleryImages) > 0)
@foreach($galleryImages as $image)
@if(!empty($image))
@endif
@endforeach
@else
No gallery images found.
@endif
{{-- =====================================================
IMAGE VIEW MODAL
====================================================== --}}
{{-- =====================================================
APPROVE MODAL
====================================================== --}}
Approve Service Request?
Are you sure you want to accept this service request?
{{-- =====================================================
DECLINE MODAL
====================================================== --}}
Decline Service Request?
Are you sure you want to reject this service request?
@endsection
@section('footer')
@endsection