@extends('layouts.app') @section('title', $business->name) @section('page-title', $business->name) @section('content') {{-- Back Link --}}
Tum Isletmeler
{{-- Business Header Card --}}
{{-- Logo --}}
@if($business->logo_data_uri) {{ $business->name }} @elseif($business->business_type_icon) {{ $business->business_type_icon }} @else @endif

{{ $business->name }}

{{ $business->business_type_name }} @if($business->is_open_now) Acik @else Kapali @endif
@if($business->description)

{{ $business->description }}

@endif
@if($business->location) {{ $business->location }} @endif @if($business->phone) {{ $business->phone }} @endif @if($business->contact_person) {{ $business->contact_person }} @endif
{{-- Working Hours --}}

Calisma Saatleri

@php $sortedHours = $business->workingHours->sortBy('day_of_week'); $now = \Carbon\Carbon::now(); $dayMap = [1 => 0, 2 => 1, 3 => 2, 4 => 3, 5 => 4, 6 => 5, 0 => 6]; $todayIdx = $dayMap[$now->dayOfWeek]; @endphp @if($sortedHours->count() > 0)
@foreach($sortedHours as $wh)
{{ $wh->day_name }} @if($wh->day_of_week === $todayIdx) (Bugun) @endif @if($wh->is_closed) Kapali @elseif($wh->open_time && $wh->close_time) {{ $wh->open_time }} - {{ $wh->close_time }} @else - @endif
@endforeach
@else

Calisma saatleri tanimlanmamis.

@endif
{{-- Products --}}

Urunler

@if($business->products->count() > 0) @php $categories = $business->productCategories; $uncategorized = $business->products->whereNull('category_source_id'); @endphp @foreach($categories as $category) @php $catProducts = $business->products->where('category_source_id', $category->source_id); @endphp @if($catProducts->count() > 0)

{{ $category->name }}

@foreach($catProducts as $product)
{{ $product->name }} @if($product->description)

{{ $product->description }}

@endif
{{ number_format($product->price, 2, ',', '.') }} TL
@endforeach
@endif @endforeach @if($uncategorized->count() > 0)
@if($categories->count() > 0)

Diger

@endif
@foreach($uncategorized as $product)
{{ $product->name }} @if($product->description)

{{ $product->description }}

@endif
{{ number_format($product->price, 2, ',', '.') }} TL
@endforeach
@endif @else

Urun tanimlanmamis.

@endif
@endsection