@extends('admin.layouts.admin') @section('content')
@if ($message = Session::get('success'))
@endif
@if(isset($record->id)) @php $id=$record->id @endphp @else @php $id=0; @endphp @endif
@if($action == 'Edit')
@else @endif @csrf
@if(isset($record->image)) @php $image=$record->image @endphp @php $imageUrl=asset(Storage::url('services/'.$record->image)) @endphp @elseif(old('image')) @php $image=old('image'); @endphp $imageUrl="" @else @php $image=''; $imageUrl="" @endphp @endif
@if(isset($record->name)) @php $name=$record->name @endphp @elseif(old('name')) @php $name=old('name'); @endphp @else @php $name=''; @endphp @endif
@if(isset($record->cat_id)) @php $cat_id=$record->cat_id @endphp @elseif(old('cat_id')) @php $cat_id=old('cat_id'); @endphp @else @php $cat_id=0; @endphp @endif
@if(isset($record->price)) @php $price=$record->price @endphp @elseif(old('price')) @php $price=old('price'); @endphp @else @php $price=''; @endphp @endif
@if(isset($record->duration)) @php $duration=$record->duration @endphp @elseif(old('duration')) @php $duration=old('duration'); @endphp @else @php $duration='0:00:00'; @endphp @endif
@if(isset($record->description)) @php $description=$record->description @endphp @elseif(old('description')) @php $description=old('description'); @endphp @else @php $description=''; @endphp @endif
@if(isset($record->rank)) @php $rank=$record->rank @endphp @elseif(old('rank')) @php $rank=old('rank'); @endphp @else @php $rank=''; @endphp @endif
@if(isset($record->active)) @php $active=$record->active @endphp @elseif(old('active')) @php $active=old('active'); @endphp @else @php $active=1; @endphp @endif
@if($action == 'Edit')
@csrf
@foreach($record->staff as $user)
{{ $user->first_name .' '.$user->last_name }}
@endforeach
@endif
@if($action == 'Edit')
@csrf
@foreach($days as $key=>$day) @php $from_time=''; $to_time=''; $dayoff=0; @endphp @if($day->timesheet->count()>0) @php $from_time=isset($day->timesheet[0]->from_time) ? $day->timesheet[0]->from_time : ''; $to_time=isset($day->timesheet[0]->to_time) ? $day->timesheet[0]->to_time : ''; $dayoff=$day->timesheet[0]->active; @endphp @endif
{{($key+1).'. '. $day->day}}
@endforeach
@endif
@endsection @push('scripts') @endpush