@extends('layouts.guest.master') @section('content') @php $locale = session()->get('locale') ? session()->get('locale') : App\Helpers\ConstantHelper::ENGLISH; @endphp
@csrf
{{ isset($branch->companyProfile->company_logo) ? $branch->companyProfile->company_logo : '' }}

{{ $locale == App\Helpers\ConstantHelper::ARABIC ? @$branch->name_ar : @$branch->name_en }}

{{ @$branch->address }} ({{ round($branch->distance) . 'Km' }} )

@php $rating = $branch->avgRating()->first() ? $branch->avgRating()->first()->aggregate : 0; @endphp @for ($i = 1; $i <= 5; $i++) @if ($i <= $rating) @else @endif @endfor ({{ $rating }})
@foreach ($services as $key => $service) @php $discount = 0; $totalDiscount = 0; $price = $orginalPrice = isset($service['serviceTypes'][0]['pivot']['price']) ? $service['serviceTypes'][0]['pivot']['price'] : 0; if (isset($service['offers']) && $price) { foreach ($service['offers'] as $offer) { $discount_amount = ($price * $offer->discount) / 100; $price = $price - $discount_amount; $discount = $discount + $discount_amount; } } $totalDiscount = ($discount * 100) / $orginalPrice; @endphp @if ($key == 2) +4 @break @endif @endforeach

{{ __('static.book_your_service') }}

{{ __('static.total_cost') }}

{{ __('static.egp') }} 0.00

@forelse ($serviceTypes as $key => $serviceType)
alias ? 'checked' : '' }} onchange="selectServiceType('{{ $serviceType->alias }}')">
@empty @endforelse
@error('staff_id')
{{ $message }}
@enderror

@error('date')
{{ $message }}
@enderror
@error('slot')
{{ $message }}
@enderror
@if (auth()->check()) @else @endif
@endsection @section('script') @endsection