@extends('adminlte::page') @section('title', 'User Profile') @section('content_header')

User Profile

@stop @section('content') @if ($user->appointments->count()) @endif @if ($user->employee && $user->employee->appointments)
@csrf
@endif {{-- modal to chagne profile pic --}}
@if (count($errors) > 0)
Whoops! There were some problems with your input.
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if (session('success'))
{{ session('success') }}
@endif
User profile picture
Change image @if ($user->image)
@csrf @method('PATCH')
@endif

{{ $user->name }}

{{ $user->email }}

{{-- @if (!$user->is_requesting_author) Become Author @endif --}}
10 Feb. 2014
12:05

Support Team sent you an email

Etsy doostang zoodles disqus groupon greplin oooj voxy zoodles, weebly ning heekya handango imeem plugg dopplr jibjab, movity jajah plickers sifteo edmodo ifttt zimbra. Babblely odeo kaboodle quora plaxo ideeli hulu weebly balihoo...
5 mins ago

Sarah Young accepted your friend request

27 mins ago

Jay White commented on your post

Take me to your leader! Switzerland is small and neutral! We are more like Germany, ambitious and misunderstood!
3 Jan. 2014
2 days ago

Mina Lee uploaded new photos

... ... ... ...
{{-- --}} @foreach ($user->authentications as $auth) {{-- --}} @endforeach
Login LogoutCity Country
{{ $auth->login_at ? $auth->login_at->format('H:i | d M Y') : 'NA' }} {{ $auth->logout_at ? $auth->logout_at->format('H:i | d M Y') : 'NA' }} {{ $auth->location['city'] ?? 'NA' }} {{ $auth->location['country'] ?? 'NA' }}
@csrf @method('PATCH')
@error('email') {{ $message }} @enderror
@if ($user->employee)
@csrf @method('PUT')
@endif @if ($user->employee)

Only For Employees

Fill these details if adding an employee only
@csrf @method('PATCH')
Create booking slots based on your preferred time duration. @error('slot_duration') {{ $message }} @enderror
Break between one to another appointment @error('break_duration') {{ $message }} @enderror

Set Availability - For Employee

Select days and timings, with the option to add multiple time slots in a day, e.g., 9 AM–12 PM and 4 PM–8 PM.
@foreach ($days as $day)
From:
To:
Add More
@if (old('days.' . $day) || isset($employeeDays[$day])) @foreach (old('days.' . $day) ?: $employeeDays[$day] as $index => $time) @if ($index > 1 && $index % 2 == 0)
From:
To
Remove
@endif @endforeach @endif @endforeach

Add Holidays

No need to add time for a full day; for part-time work, specify the day and time.

Add Holiday
@php // Get holidays from old input or database $holidaysInput = old('holidays.date', []); $dbHolidays = $user->employee->holidays ?? []; $holidaysToDisplay = !empty($holidaysInput) ? $holidaysInput : $dbHolidays; @endphp @forelse($holidaysToDisplay as $index => $holidayItem) @php // Determine if we're using old input or database data $usingOldInput = !empty($holidaysInput); if ($usingOldInput) { $date = old("holidays.date.$index"); $holiday = null; } else { $holiday = $holidayItem; $date = $holiday->date; // Format date for input field if it's not already in YYYY-MM-DD format if ( !preg_match( '/^\d{4}-\d{2}-\d{2}$/', $date, ) ) { try { $date = \Carbon\Carbon::parse( $date, )->format('Y-m-d'); } catch (Exception $e) { $date = ''; } } } $fromTime = old( "holidays.from_time.$index", $holiday && $holiday->hours ? explode('-', $holiday->hours[0])[0] ?? '' : '', ); $toTime = old( "holidays.to_time.$index", $holiday && $holiday->hours ? explode('-', $holiday->hours[0])[1] ?? '' : '', ); $recurring = old( "holidays.recurring.$index", $holiday->recurring ?? 0, ); @endphp
From:
To:
Remove
@empty

No holidays found for this user. Click "Add Holiday" to create one.

@endforelse
@endif @if ($user->employee && $user->employee->appointments)
@foreach ($user->employee->appointments->sortByDesc('created_at') as $appointment) @endforeach
# User Service Staff Date Time Status Action
{{ $loop->iteration }} {{ $appointment->name }} {{ $appointment->service->title }} {{ $appointment->employee->user->name }} {{ $appointment->booking_date }} {{ $appointment->booking_time }} @php $statusColors = [ 'Pending payment' => '#f39c12', 'Processing' => '#3498db', 'Confirmed' => '#2ecc71', 'Cancelled' => '#ff0000', 'Completed' => '#008000', 'On Hold' => '#95a5a6', 'Rescheduled' => '#f1c40f', 'No Show' => '#e67e22', ]; @endphp @php $status = $appointment->status; $color = $statusColors[$status] ?? '#7f8c8d'; @endphp {{ $status }}
@endif @if ($user->appointments->count())
@foreach ($user->appointments->sortByDesc('created_at') as $appointment) @endforeach
# User Service Staff Date Time Status Action
{{ $loop->iteration }} {{ $appointment->name }} {{ $appointment->service->title }} {{ $appointment->employee->user->name }} {{ $appointment->booking_date }} {{ $appointment->booking_time }} @php $statusColors = [ 'Pending payment' => '#f39c12', 'Processing' => '#3498db', 'Confirmed' => '#2ecc71', 'Cancelled' => '#ff0000', 'Completed' => '#008000', 'On Hold' => '#95a5a6', 'Rescheduled' => '#f1c40f', 'No Show' => '#e67e22', ]; @endphp @php $status = $appointment->status; $color = $statusColors[$status] ?? '#7f8c8d'; @endphp {{ $status }}
@endif
@csrf @method('PATCH')
@stop @section('js') {{-- for employee --}} {{-- user booking data --}} @stop