@section("title", "BizMan | Appointments")

{{ __('Appointments Management') }}

{{ date('l, d M Y') }}

Manage Your Appointments

Schedule meetings and automatically create deals

Add New Appointment
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif

Total Appointments

{{ $totalAppointments }}

Upcoming

{{ $upcomingAppointments }}

Completed

{{ $completedAppointments }}

Upcoming Appointments

@forelse($appointments->where('status', 'scheduled') as $appointment)

{{ $appointment->title }}

{{ $appointment->status }}
{{ $appointment->customer->name }}
{{ $appointment->customer->email }}
{{ \Carbon\Carbon::parse($appointment->scheduled_at)->format('d/m/Y') }}
{{ \Carbon\Carbon::parse($appointment->scheduled_at)->format('H:i') }} ({{ $appointment->duration }} min)
@if ($appointment->notes)

{{ $appointment->notes }}

@endif @if ($appointment->members->count() > 0)
Team Members:
@foreach ($appointment->members as $member) {{ $member->name }} @endforeach
@endif
@empty

No upcoming appointments

@endforelse
@if ($appointments->whereIn('status', ['completed', 'cancelled'])->count() > 0)

Past Appointments

@foreach ($appointments->whereIn('status', ['completed', 'cancelled']) as $appointment)

{{ $appointment->title }}

@if ($appointment->status == 'completed') completed @else cancelled @endif
{{ $appointment->customer->name }}
{{ \Carbon\Carbon::parse($appointment->scheduled_at)->format('d/m/Y') }}
{{ \Carbon\Carbon::parse($appointment->scheduled_at)->format('H:i') }} ({{ $appointment->duration }} min)
@if ($appointment->status == 'completed' && !$appointment->deal)
@elseif($appointment->status == 'completed' && $appointment->deal)
Deal sudah dibuat (Stage: {{ ucfirst($appointment->deal->stage) }})
@endif
@endforeach
@endif
@push('scripts') @endpush