@extends('layouts.marketing') @section('title', __('app.my_profile') . ' - ' . __('app.company_name')) @section('content') @php $nameParts = preg_split('/\s+/', trim((string) $user->name), 2, PREG_SPLIT_NO_EMPTY); $profileFirstName = $nameParts[0] ?? ''; $profileLastName = $nameParts[1] ?? ''; $pkgUsed = $activePayment !== null ? (int) $activePayment->classes_used : null; $pkgRemaining = $activePayment !== null ? (int) $activePayment->classes_remaining : null; $pkgTotal = ($pkgUsed !== null && $pkgRemaining !== null) ? max(0, $pkgUsed + $pkgRemaining) : null; $expLabel = match ($user->fitness_level ?? '') { 'beginner' => __('app.beginner'), 'intermediate' => __('app.intermediate'), 'advanced' => __('app.advanced'), '' => '—', default => $user->fitness_level, }; $aptTotal = $profileAppointments->count(); $aptCompleted = $user->isUser() ? $profileAppointments->filter(fn ($b) => $b->pilatesClass->date->lt(\Carbon\Carbon::today()))->count() : 0; @endphp
{{ __('app.customer_profile_admin_readonly_hint') }}
{{ $user->name }}
{{ $user->email }}
{{ $user->phone ?: '—' }}
{{ $user->date_of_birth?->format('d.m.Y') ?? '—' }}
{{ ucfirst($user->role) }}
{{ __('app.customer_profile_staff_hint') }}
{{ $profileFirstName ?: '—' }}
{{ $profileLastName ?: '—' }}
{{ $user->email }}
{{ $profileFirstName ?: '—' }}
{{ $profileLastName ?: '—' }}
{{ $user->email }}
{{ $activePayment ? $activePayment->getPaymentTypeLabel() : '—' }}
@if($pkgTotal !== null && $pkgTotal > 0) {{ $pkgUsed }} / {{ $pkgTotal }} @else — @endif
{{ $activePayment && $activePayment->valid_from ? $activePayment->valid_from->format('d.m.Y') : '—' }}
{{ $user->phone ?: '—' }}
{{ $user->date_of_birth?->format('d.m.Y') ?? '—' }}
{{ $firstTrainingDate->format('d.m.Y') }}
{{ $expLabel }}
{{ $user->gender === 'female' ? __('app.gender_female') : ($user->gender === 'male' ? __('app.gender_male') : '—') }}
{{ trim(implode(', ', array_filter([$user->city, $user->address]))) ?: '—' }}
{{ $user->emergency_contact_name ?: '—' }}
{{ $user->emergency_contact_phone ?: '—' }}
{{ $user->emergency_contact }}
—
—
{{ $user->name }}
{{ $user->email }}
@if($beautyOnly ?? false) {{ __('app.manage_your_beauty_profile_hint') }} @else {{ __('app.manage_your_profile_payments_and_bookings') }} @endif
{{ __('app.packages') }}: {{ $user->getActivePilatesPayments()->count() }}
{{ __('app.monthly_limit') }}: {{ $totalMonthlyLimit }} {{ __('app.classes') }}
{{ __('app.weekly_limit') }}: {{ $totalWeeklyLimit }} {{ __('app.classes') }}
| {{ __('app.date') }} | {{ __('app.type') }} | {{ __('app.amount') }} | {{ __('app.status') }} | {{ __('app.valid_until') }} | {{ __('app.classes_remaining') }} |
|---|---|---|---|---|---|
| {{ $payment->created_at->format('M j, Y') }} | {{ $payment->getPaymentTypeLabel() }} | {{ number_format($payment->amount, 0) }} {{ __('app.currency') }} | {{ __('app.' . $payment->status) }} | {{ $payment->valid_until ? $payment->valid_until->format('M j, Y') : '-' }} | {{ $payment->classes_remaining ?? '-' }} |
{{ __('app.no_payments_description') }}
| {{ __('app.class') }} | {{ __('app.date') }} & {{ __('app.time') }} | {{ __('app.instructor') }} | {{ __('app.status') }} |
|---|---|---|---|
| {{ $booking->pilatesClass->name }} |
{{ $booking->pilatesClass->date ? $booking->pilatesClass->date->format('M j, Y') : '-' }}
{{ $booking->pilatesClass->start_time->format('H:i') }} - {{ $booking->pilatesClass->end_time->format('H:i') }}
|
{{ $booking->pilatesClass->instructor?->name ?? __('app.no_instructor') }} | {{ __('app.' . $booking->status) }} |
{{ __('app.no_pilates_bookings_description') }}
| {{ __('app.service') }} | {{ __('app.date') }} & {{ __('app.time') }} | {{ __('app.price') }} | {{ __('app.status') }} |
|---|---|---|---|
| {{ $appointment->service?->name ?? __('app.deleted_service') }} |
{{ $appointment->appointment_date ? $appointment->appointment_date->format('M j, Y') : '-' }}
{{ $appointment->appointment_time }}
|
{{ number_format($appointment->service?->price ?? 0, 0) }} {{ __('app.currency') }} | {{ __('app.' . $appointment->status) }} |
{{ __('app.no_salon_appointments_description') }}
{{ $profileFirstName }} {{ $profileLastName }}
{{ __('app.members_no_appointments') }}
{{ $pc->date->format('d.m.Y') }} — {{ $pc->start_time->format('H:i') }}
{{ $pc->name }}
{{ $aptTotal }}
{{ __('app.total_appointments') }}
{{ $aptCompleted }}
{{ __('app.members_apt_completed') }}