Files
ladill-pos/resources/views/pos/branches/index.blade.php
T
isaaccladandCursor 9d7dac6c24
Deploy Ladill POS / deploy (push) Successful in 1m58s
Add multi-branch POS with team roles and branch-scoped cashiers.
Pro and Business users can manage branches, invite cashiers with branch assignment, and switch registers; sales and register flows respect acting location.

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

59 lines
3.3 KiB
PHP

<x-app-layout title="Branches">
<x-settings.page description="Manage registers and locations across your business.">
<div class="mb-4 flex flex-wrap items-center justify-between gap-3">
<div class="flex flex-wrap gap-2 text-sm">
<a href="{{ route('pos.settings') }}" class="text-slate-500 hover:text-slate-800">Branch settings</a>
<span class="text-slate-300">/</span>
<span class="font-medium text-slate-900">All branches</span>
@if (! empty($canManageTeam))
<a href="{{ route('pos.team.index') }}" class="ml-3 text-indigo-600 hover:text-indigo-800">Team</a>
@endif
</div>
@if ($canAddBranch)
<a href="{{ route('pos.branches.create') }}" class="btn-primary">Add branch</a>
@endif
</div>
<x-settings.card title="Branches" description="Each branch has its own register, receipts, and sales history.">
@if ($branches->isEmpty())
<p class="text-sm text-slate-500">No branches yet.</p>
@else
<ul class="divide-y divide-slate-100">
@foreach ($branches as $branch)
<li class="flex items-center justify-between gap-4 py-3">
<div>
<p class="font-medium text-slate-900">
{{ $branch->name }}
@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="text-xs text-slate-500">
{{ strtoupper($branch->currency) }}
· {{ $branch->isRestaurant() ? 'Restaurant' : 'Retail' }}
</p>
</div>
<div class="flex items-center gap-3">
@if (($actingLocation->id ?? null) !== $branch->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
<a href="{{ route('pos.branches.edit', $branch) }}" class="text-sm font-medium text-slate-600 hover:text-slate-900">Edit</a>
</div>
</li>
@endforeach
</ul>
@endif
@unless ($hasMultiLocation)
<p class="mt-4 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>.
</p>
@endunless
</x-settings.card>
</x-settings.page>
</x-app-layout>