Files
NextChair/resources/views/owner/services.blade.php
T
Stefan Lazic 2ef3654841
CI / ci (push) Canceled after 0s
PHP Rebuild
Initial PHP rebuild of the app
2026-09-05 08:21:33 +01:00

6 lines
3.4 KiB
PHP

<x-layouts.staff :business="$business">
<main class="mx-auto max-w-6xl px-5 py-8 sm:px-8 lg:px-12 lg:py-12"><a href="{{ route('owner.dashboard') }}" class="text-xs font-bold uppercase tracking-widest text-white/60">← Owner workspace</a><div class="mt-12 flex flex-wrap items-end justify-between gap-4"><div><p class="text-[10px] font-bold uppercase tracking-[0.3em] text-accent">Catalogue</p><h1 class="mt-3 text-4xl font-black tracking-tight">Services</h1></div><a href="{{ route('owner.booking-rules') }}" class="text-xs font-bold uppercase tracking-widest text-accent">Booking rules →</a></div>@if (session('status'))<div class="mt-6 rounded-tile bg-accent p-4 text-sm font-bold text-ink">{{ session('status') }}</div>@endif
<div class="mt-8 grid gap-8 lg:grid-cols-[1fr_340px]"><div class="space-y-4">@foreach ($categories as $category)<section><h2 class="mb-3 text-sm font-bold uppercase tracking-widest text-white/50">{{ $category->name }}</h2>@foreach ($category->services as $service)<article class="mb-3 rounded-jumbo bg-white p-5 text-ink"><form method="POST" action="{{ route('owner.services.update', $service->id) }}" class="grid gap-4 sm:grid-cols-[1fr_110px_100px_auto] sm:items-end">@csrf @method('PUT')<label class="text-xs font-bold">Service<input name="name" value="{{ $service->name }}" class="mt-2 w-full rounded-tile border border-line px-3 py-2 text-sm"></label><label class="text-xs font-bold">Minutes<input name="durationMinutes" type="number" value="{{ $service->durationMinutes }}" class="mt-2 w-full rounded-tile border border-line px-3 py-2 text-sm"></label><label class="text-xs font-bold">Price<input name="price" type="number" step="0.01" value="{{ $service->price }}" class="mt-2 w-full rounded-tile border border-line px-3 py-2 text-sm"></label><div class="flex gap-2"><input type="hidden" name="isActive" value="{{ $service->isActive ? 1 : 0 }}"><input type="hidden" name="allowOnlineBooking" value="{{ $service->allowOnlineBooking ? 1 : 0 }}"><button class="rounded-md bg-ink px-3 py-2 text-[10px] font-bold uppercase tracking-widest text-white">Save</button></div></form></article>@endforeach</section>@endforeach</div><aside class="rounded-jumbo bg-white p-6 text-ink"><h2 class="text-lg font-bold">Add service</h2><form method="POST" action="{{ route('owner.services.store') }}" class="mt-5 space-y-4">@csrf<label class="block text-xs font-bold">Category<select name="categoryId" class="mt-2 w-full rounded-tile border border-line px-3 py-2 text-sm"><option value="">New category</option>@foreach ($categories as $category)<option value="{{ $category->id }}">{{ $category->name }}</option>@endforeach</select></label><label class="block text-xs font-bold">New category name<input name="categoryName" class="mt-2 w-full rounded-tile border border-line px-3 py-2 text-sm"></label><label class="block text-xs font-bold">Name<input name="name" required class="mt-2 w-full rounded-tile border border-line px-3 py-2 text-sm"></label><label class="block text-xs font-bold">Duration<input name="durationMinutes" type="number" value="30" required class="mt-2 w-full rounded-tile border border-line px-3 py-2 text-sm"></label><label class="block text-xs font-bold">Price<input name="price" type="number" step="0.01" required class="mt-2 w-full rounded-tile border border-line px-3 py-2 text-sm"></label><x-ui.button type="submit" class="w-full">Add service</x-ui.button></form></aside></div>
</main>
</x-layouts.staff>