Initial PHP rebuild of the app
This commit is contained in:
690 files changed
+33944
-12046
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<x-layouts.public :business="$business">
|
||||
<div class="mx-auto min-h-screen max-w-md bg-stone pb-28 text-ink">
|
||||
<header class="flex items-center justify-between px-6 pb-4 pt-10">
|
||||
<div><p class="text-xs font-medium text-muted">{{ now($business->timezone)->format('H') < 12 ? 'Good morning' : (now($business->timezone)->format('H') < 18 ? 'Good afternoon' : 'Good evening') }}</p><h1 class="text-2xl font-bold tracking-tight">{{ $profile?->firstName ?: $user->name }}</h1><span class="sr-only">Good to see you, {{ $profile?->firstName ?: $user->name }}</span></div>
|
||||
<div class="flex items-center gap-3"><a href="{{ route('customer.notifications') }}" class="relative flex h-11 w-11 items-center justify-center rounded-full border border-line bg-white"><i class="fa-regular fa-bell"></i></a><a href="{{ route('customer.profile') }}" class="flex h-11 w-11 items-center justify-center rounded-full border border-line bg-ink text-white"><i class="fa-solid fa-user"></i></a></div>
|
||||
</header>
|
||||
<main class="space-y-6 px-6">
|
||||
@if ($appointments->first())
|
||||
@php($next = $appointments->first())
|
||||
<a href="{{ route('customer.appointments.show', $next->id) }}" class="relative block overflow-hidden rounded-jumbo bg-ink p-6 text-white shadow-xl"><div class="relative z-10"><div class="mb-6 flex items-center justify-between"><span class="text-[10px] font-bold uppercase tracking-widest text-white/50">Your next visit</span><span class="rounded-full bg-accent/20 px-3 py-1 text-[10px] font-bold uppercase tracking-widest text-accent">{{ ucfirst(strtolower($next->status->value)) }}</span></div><div class="mb-6 flex items-center gap-4"><div class="flex h-14 w-14 items-center justify-center rounded-full border-2 border-white/20 bg-white/10"><i class="fa-solid fa-scissors"></i></div><div><h2 class="text-lg font-bold">{{ $next->services->pluck('service.name')->join(', ') }}</h2><p class="text-sm text-white/60">with {{ $next->staff->user?->name ?: 'your barber' }}</p></div></div><div class="flex items-center justify-between border-t border-white/10 pt-5"><div><p class="text-sm font-bold">{{ $next->startAt->setTimezone($business->timezone)->format('D, M j · g:i A') }}</p><p class="mt-0.5 text-[10px] uppercase tracking-widest text-white/50">{{ $business->name }}</p></div><span class="flex items-center gap-1 text-xs font-bold uppercase tracking-widest text-white/60">Details <i class="fa-solid fa-chevron-right text-[10px]"></i></span></div></div><div class="absolute -bottom-10 -right-10 h-40 w-40 rounded-full bg-accent/10 blur-3xl"></div></a>
|
||||
@endif
|
||||
<div class="grid grid-cols-2 gap-3"><a href="{{ route('booking.services') }}" class="flex flex-col gap-3 rounded-jumbo border border-line bg-white p-5"><div class="flex h-10 w-10 items-center justify-center rounded-xl bg-stone"><i class="fa-solid fa-rotate-right"></i></div><span class="text-sm font-bold">Book again</span></a><a href="{{ route('booking.services') }}" class="flex flex-col gap-3 rounded-jumbo border border-line bg-white p-5"><div class="flex h-10 w-10 items-center justify-center rounded-xl bg-stone"><i class="fa-solid fa-plus"></i></div><span class="text-sm font-bold">Book new</span></a></div>
|
||||
@if ($loyaltySummary)
|
||||
@php($threshold = max(1, $loyaltySummary['threshold']))
|
||||
<a href="{{ route('customer.loyalty') }}" class="block rounded-jumbo border border-line bg-white p-5"><div class="mb-4 flex items-center justify-between"><div class="flex items-center gap-3"><div class="flex h-10 w-10 items-center justify-center rounded-xl bg-amber-50 text-amber-500"><i class="fa-solid fa-award"></i></div><div><p class="text-sm font-bold">Loyalty card</p><p class="text-[11px] text-muted">{{ max(0, $threshold - $loyaltySummary['currentStamps']) }} more visits until your reward</p></div></div><i class="fa-solid fa-chevron-right text-[10px] text-muted"></i></div><div class="h-2 w-full overflow-hidden rounded-full bg-stone"><div class="h-full rounded-full bg-amber-500" style="width: {{ min(100, ($loyaltySummary['currentStamps'] / $threshold) * 100) }}%"></div></div></a>
|
||||
@endif
|
||||
<section><div class="mb-4 flex items-center justify-between px-1"><h3 class="text-[10px] font-bold uppercase tracking-widest text-muted">Your barbers</h3><a href="{{ route('public.home') }}#details" class="border-b border-ink text-[10px] font-bold uppercase tracking-widest">See all</a></div><div class="flex gap-5 overflow-x-auto no-scrollbar">@forelse ($business->staff->where('status.value', 'ACTIVE')->take(4) as $member)<div class="w-20 shrink-0 text-center"><div class="mb-2 flex h-20 w-20 items-center justify-center rounded-full border border-line bg-white text-xl"><i class="fa-solid fa-user"></i></div><p class="text-xs font-medium">{{ Str::before($member->user?->name ?: 'Barber', ' ') }}</p></div>@empty<p class="text-sm text-muted">Your shop team will appear here.</p>@endforelse</div></section>
|
||||
<section><div class="mb-4 flex items-center justify-between px-1"><h3 class="text-[10px] font-bold uppercase tracking-widest text-muted">Popular services</h3><a href="{{ route('public.home') }}#services" class="border-b border-ink text-[10px] font-bold uppercase tracking-widest">See all</a></div><div class="divide-y divide-line overflow-hidden rounded-jumbo border border-line bg-white">@foreach ($business->serviceCategories->flatMap->services->where('isActive', true)->take(3) as $service)<div class="flex items-center justify-between px-5 py-4"><div><p class="text-sm font-bold">{{ $service->name }}</p><p class="mt-0.5 text-xs text-muted">{{ $service->durationMinutes }}m</p></div><span class="text-sm font-bold">£{{ number_format((float) $service->price, 2) }}</span></div>@endforeach</div></section>
|
||||
</main>
|
||||
<nav class="fixed bottom-0 left-0 right-0 z-50 mx-auto flex max-w-md items-center justify-between border-t border-line bg-white px-5 py-2"><a href="{{ route('customer.dashboard') }}" class="flex flex-col items-center gap-1 text-ink"><i class="fa-solid fa-house text-xl"></i><span class="text-[10px] font-bold uppercase tracking-widest">Home</span></a><a href="{{ route('customer.appointments') }}" class="flex flex-col items-center gap-1 text-muted"><i class="fa-solid fa-calendar-check text-xl"></i><span class="text-[10px] font-bold uppercase tracking-widest">Bookings</span></a><a href="{{ route('customer.profile') }}" class="flex flex-col items-center gap-1 text-muted"><i class="fa-solid fa-user text-xl"></i><span class="text-[10px] font-bold uppercase tracking-widest">Settings</span></a></nav>
|
||||
</div>
|
||||
</x-layouts.public>
|
||||
Reference in new issue
Block a user