@extends('voyager::master') @section('page_title',$dataType->getTranslatedAttribute('display_name_singular').' | '.setting('admin.title')) @section('page_header')

{{ __('voyager::generic.viewing') }} {{ ucfirst($dataType->getTranslatedAttribute('display_name_singular')) }}   @can('edit', $dataTypeContent)   {{ __('voyager::generic.edit') }} @endcan @can('delete', $dataTypeContent) @if($isSoftDeleted) @else @endif @endcan   {{ __('voyager::generic.return_to_list') }}

@include('voyager::multilingual.language-selector') @stop @section('content')
@php $fields = ['booking_number','created_at','booking_belongsto_status_relationship','booking_hasone_booking_user_relationship', 'booking_time','service_name','total_price','payment_type']; @endphp @for($i=0; $i < count($fields); $i++) @php $is_last = count($fields)-1; $row = $dataType->readRows->where('field',$fields[$i])->first(); if(!$row)continue; @endphp @php if ($dataTypeContent->{$row->field.'_read'}) { $dataTypeContent->{$row->field} = $dataTypeContent->{$row->field.'_read'}; } @endphp

{{ $row->getTranslatedAttribute('display_name') }}

@if (isset($row->details->view)) @include($row->details->view, ['row' => $row, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, 'content' => $dataTypeContent->{$row->field}, 'action' => 'read', 'view' => 'read', 'options' => $row->details]) @elseif($row->type == "image") @elseif($row->type == 'multiple_images') @if(json_decode($dataTypeContent->{$row->field})) @foreach(json_decode($dataTypeContent->{$row->field}) as $file) @endforeach @else @endif @elseif($row->type == 'relationship') @include('voyager::formfields.relationship', ['view' => 'read', 'options' => $row->details]) @elseif($row->type == 'select_dropdown' && property_exists($row->details, 'options') && !empty($row->details->options->{$dataTypeContent->{$row->field}}) ) @elseif($row->type == 'select_multiple') @if(property_exists($row->details, 'relationship')) @foreach(json_decode($dataTypeContent->{$row->field}) as $item) {{ $item->{$row->field} }} @endforeach @elseif(property_exists($row->details, 'options')) @if (!empty(json_decode($dataTypeContent->{$row->field}))) @foreach(json_decode($dataTypeContent->{$row->field}) as $item) @if (@$row->details->options->{$item}) {{ $row->details->options->{$item} . (!is_last ? ', ' : '') }} @endif @endforeach @else {{ __('voyager::generic.none') }} @endif @endif @elseif($row->type == 'date' || $row->type == 'timestamp') @if ( property_exists($row->details, 'format') && !is_null($dataTypeContent->{$row->field}) ) {{ \Carbon\Carbon::parse($dataTypeContent->{$row->field})->formatLocalized($row->details->format) }} @else {{ $dataTypeContent->{$row->field} }} @endif @elseif($row->type == 'checkbox') @if(property_exists($row->details, 'on') && property_exists($row->details, 'off')) @if($dataTypeContent->{$row->field}) {{ $row->details->on }} @else {{ $row->details->off }} @endif @else {{ $dataTypeContent->{$row->field} }} @endif @elseif($row->type == 'color') {{ $dataTypeContent->{$row->field} }} @elseif($row->type == 'coordinates') @include('voyager::partials.coordinates') @elseif($row->type == 'rich_text_box') @include('voyager::multilingual.input-hidden-bread-read') {!! $dataTypeContent->{$row->field} !!} @elseif($row->type == 'file') @if(json_decode($dataTypeContent->{$row->field})) @foreach(json_decode($dataTypeContent->{$row->field}) as $file) {{ $file->original_name ?: '' }}
@endforeach @else {{ __('voyager::generic.download') }} @endif @else @include('voyager::multilingual.input-hidden-bread-read')

@if($row->field == 'total_price') £@endif{{ $dataTypeContent->{$row->field} }}

@endif
@switch($row->field) @case('booking_hasone_booking_user_relationship')

Email

{{$dataTypeContent->user->email??null}}


Phone

{{$dataTypeContent->user->phone??null}}


Address

{{$dataTypeContent->user->address??null}}

@case('payment_type') @if($dataTypeContent->{$row->field} == 'stripe' && $dataTypeContent->payment_detail) @php $payment_detail = json_decode($dataTypeContent->payment_detail) @endphp

Payment ID

{{$payment_detail->payment_id??null}}

@endif @endswitch @if(!$is_last)
@endif @endfor

Payment Breakup

@if($dataTypeContent->payment_breakups) @foreach($dataTypeContent->payment_breakups as $pb)

{{$pb->name}}

£{{$pb->price??null}}

@endforeach @endif
{{-- Single delete modal --}} @stop @section('javascript') @if ($isModelTranslatable) @endif @stop