Surface branches and team as explicit settings sections.
Deploy Ladill POS / deploy (push) Successful in 37s
Deploy Ladill POS / deploy (push) Successful in 37s
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>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<x-settings.card id="branches" title="Branches" description="Each branch is a separate register with its own receipts, sales, and settings. Switch the active branch here or from the top bar.">
|
||||
@if ($branches->isNotEmpty())
|
||||
<ul class="divide-y divide-slate-100">
|
||||
@foreach ($branches as $branch)
|
||||
<li class="flex items-center justify-between gap-4 py-3 first:pt-0 last:pb-0">
|
||||
<div class="min-w-0">
|
||||
<p class="font-medium text-slate-900">
|
||||
{{ $branch->name }}
|
||||
@if ($branch->id === $location->id)
|
||||
<span class="ml-2 rounded-full bg-indigo-50 px-2 py-0.5 text-[10px] font-semibold uppercase text-indigo-700">Active</span>
|
||||
@endif
|
||||
@if ($branch->is_default)
|
||||
<span class="ml-2 rounded-full bg-slate-100 px-2 py-0.5 text-[10px] font-semibold uppercase text-slate-500">Default</span>
|
||||
@endif
|
||||
</p>
|
||||
<p class="mt-0.5 text-xs text-slate-500">
|
||||
{{ strtoupper($branch->currency) }}
|
||||
· {{ $branch->isRestaurant() ? 'Restaurant' : 'Retail' }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex shrink-0 items-center gap-3">
|
||||
@if ($branch->id !== $location->id)
|
||||
<form method="POST" action="{{ route('pos.location.switch') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="location" value="{{ $branch->id }}">
|
||||
<button type="submit" class="text-sm font-medium text-indigo-600 hover:text-indigo-800">Switch</button>
|
||||
</form>
|
||||
@endif
|
||||
@if (! empty($canManageBranches) && $hasMultiLocation)
|
||||
<a href="{{ route('pos.branches.edit', $branch) }}" class="text-sm font-medium text-slate-600 hover:text-slate-900">Edit</a>
|
||||
@endif
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@else
|
||||
<p class="text-sm text-slate-500">No branches yet.</p>
|
||||
@endif
|
||||
|
||||
<div class="mt-4 flex flex-wrap items-center gap-3 border-t border-slate-100 pt-4">
|
||||
@if (! empty($canManageBranches) && $hasMultiLocation && $canAddBranch)
|
||||
<a href="{{ route('pos.branches.create') }}" class="btn-primary">Add branch</a>
|
||||
@endif
|
||||
@unless ($hasMultiLocation)
|
||||
<p class="rounded-xl bg-amber-50 px-4 py-3 text-sm text-amber-900">
|
||||
Multi-branch POS is available on
|
||||
<a href="{{ route('pos.pro.index') }}" class="font-semibold underline">Pro or Business</a>.
|
||||
Your account is limited to one branch.
|
||||
</p>
|
||||
@endunless
|
||||
</div>
|
||||
</x-settings.card>
|
||||
Reference in New Issue
Block a user