Files
ladill-pos/resources/views/pos/branches/edit.blade.php
T
isaaccladandCursor 35970dfd2a
Deploy Ladill POS / deploy (push) Successful in 37s
Surface branches and team as explicit settings sections.
Embed branch list, switching, and team invites on the main settings page; dedicated routes redirect back with anchors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 06:46:17 +00:00

43 lines
3.0 KiB
PHP

<x-app-layout title="Edit branch">
<x-settings.page description="Update branch details.">
<x-settings.card title="Edit {{ $location->name }}">
<form method="POST" action="{{ route('pos.branches.update', $location) }}" class="space-y-4">
@csrf
@method('PUT')
<div>
<label for="name" class="text-sm font-medium text-slate-700">Branch name</label>
<input type="text" id="name" name="name" value="{{ old('name', $location->name) }}" required
class="mt-1.5 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
</div>
<div>
<label for="currency" class="text-sm font-medium text-slate-700">Currency</label>
<input type="text" id="currency" name="currency" value="{{ old('currency', $location->currency) }}" maxlength="3" required
class="mt-1.5 block w-full rounded-xl border-slate-300 text-sm uppercase shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
</div>
<div>
<label for="service_style" class="text-sm font-medium text-slate-700">Service style</label>
<select id="service_style" name="service_style"
class="mt-1.5 block w-full rounded-xl border-slate-300 text-sm shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
<option value="retail" @selected(old('service_style', $location->service_style) === 'retail')>Retail</option>
<option value="restaurant" @selected(old('service_style', $location->service_style) === 'restaurant')>Restaurant / café</option>
</select>
</div>
<label class="flex items-center gap-2 text-sm text-slate-700">
<input type="checkbox" name="is_default" value="1" @checked(old('is_default', $location->is_default))
class="rounded border-slate-300 text-indigo-600 focus:ring-indigo-500">
Default branch for admins
</label>
<div class="flex justify-end gap-3">
<a href="{{ route('pos.settings') }}#branches" class="rounded-xl border border-slate-200 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">Back</a>
<button type="submit" class="btn-primary">Save branch</button>
</div>
</form>
<form method="POST" action="{{ route('pos.branches.destroy', $location) }}" class="mt-4 border-t border-slate-100 pt-4" onsubmit="return confirm('Remove this branch?');">
@csrf
@method('DELETE')
<button type="submit" class="text-sm font-medium text-red-600 hover:text-red-800">Delete branch</button>
</form>
</x-settings.card>
</x-settings.page>
</x-app-layout>