@extends('backend.app') @push('style') @endpush @section('title', 'Company Details - ' . $company->name) @section('content')
@if($company->images && $company->images->first() && $company->images->first()->image) @else @endif

{{ $company->name }}

@if($company->categories && is_array($company->categories)) @foreach(array_slice($company->categories, 0, 2) as $category) {{ $category }} @endforeach @endif @if($company->city) {{ $company->city }} @endif
Back to List @if($company->status == 'approved') Approved @else Pending @endif
Total Employees
{{ $totalEmployees }}
{{ $activeEmployees }} active
Total Bookings
{{ $totalBookings }}
{{ $completedBookings }} completed
Services
{{ $totalServices }}
Active listings
Rating
{{ $avgRating['rating'] }}
{{ $totalReviews }} reviews
Company Information
Company Name
{{ $company->name }}
@if($company->website) @endif @if($company->categories && is_array($company->categories))
Categories
@foreach($company->categories as $category) {{ $category }} @endforeach
@endif @if($company->address)
Address
{{ $company->address }} @if($company->city), {{ $company->city }}@endif
@endif @if($company->team_size)
Team Size
{{ $company->team_size }} members
@endif
Member Since
{{ $company->created_at->format('M d, Y') }}
Owner Information
@if($company->user)
@if($company->user->avatar) {{ $company->user->name }} @else
{{ strtoupper(substr($company->user->name, 0, 1)) }}
@endif
{{ $company->user->name }}

{{ $company->user->email }}

Phone
@if($company->user->phone) {{ $company->user->phone }} @else Not provided @endif
@if($company->user->address)
Address
{{ $company->user->address }}
@endif
Account Status
@if($company->user->status == 'active') Active @else Inactive @endif
@else

No owner information available

@endif
Subscription Status
{{ ucfirst($company->subscription_status ?? 'inactive') }}
@if($company->subscription_ends_at)
@if($company->subscription_ends_at->isFuture()) Expires in {{ $company->subscription_ends_at->diffForHumans() }} @else Expired {{ $company->subscription_ends_at->diffForHumans() }} @endif
@endif
Subscription End Date
@if($company->subscription_ends_at) {{ $company->subscription_ends_at->format('M d, Y') }} @else Not set @endif
Total Bookings
{{ $company->total_bookings ?? 0 }}
@if($company->about)
About Company

{{ $company->about }}

@endif @if($company->openingTimes)
Opening Hours
@php $days = [ 'monday' => 'Monday', 'tuesday' => 'Tuesday', 'wednesday' => 'Wednesday', 'thursday' => 'Thursday', 'friday' => 'Friday', 'saturday' => 'Saturday', 'sunday' => 'Sunday' ]; @endphp @foreach($days as $key => $day) @if($company->openingTimes->$key) @php $hours = json_decode($company->openingTimes->$key, true); $isOpen = is_array($hours) && !empty($hours); @endphp
{{ $day }} @if($isOpen) @foreach($hours as $index => $slot) @if(isset($slot['start']) && isset($slot['end'])) {{ $slot['start'] }} - {{ $slot['end'] }} @if($index < count($hours) - 1), @endif @endif @endforeach @else Closed @endif
@endif @endforeach
@endif
@if($company->images && $company->images->isNotEmpty())
Gallery
@foreach($company->images as $image)
@endforeach
@endif @if($activeEmployeesList->isNotEmpty())
Active Employees (Latest 5)
@foreach($activeEmployeesList as $employee) @endforeach
Name Email Job Title Status
@if($employee->user) {{ $employee->user->name }} @else N/A @endif @if($employee->user) {{ $employee->user->email }} @else N/A @endif {{ $employee->job_title ?? 'N/A' }} {{ ucfirst($employee->status) }}
@if($activeEmployees > 5)
@endif
@endif @if($recentBookings->isNotEmpty())
Recent Bookings (Latest 5)
@foreach($recentBookings as $booking) @endforeach
Booking ID Customer Employee Date & Time Status
#{{ $booking->id }} @if($booking->user) {{ $booking->user->name }} @else N/A @endif @if($booking->employee && $booking->employee->user) {{ $booking->employee->user->name }} @else N/A @endif
{{ $booking->booking_date?->format('M d, Y') ?? 'N/A' }}
{{ $booking->booking_time ?? 'N/A' }}
{{ ucfirst($booking->status) }}
@if($totalBookings > 5) @endif
@endif
@push('script') @endpush @endsection