Deploy Ladill POS / deploy (push) Successful in 2m15s
Enforce plan location caps in SubscriptionService, surface upgrade copy on plans and branch settings, and cover the limits in tests.
67 lines
3.7 KiB
PHP
67 lines
3.7 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>
|
|
@else
|
|
@if (! $canAddBranch)
|
|
<p class="mt-4 rounded-xl bg-amber-50 px-4 py-3 text-sm text-amber-900">
|
|
You've reached the branch limit on Pro (up to 3).
|
|
<a href="{{ route('pos.pro.index') }}" class="font-semibold underline">Upgrade to Business</a>
|
|
for unlimited locations.
|
|
</p>
|
|
@endif
|
|
@endunless
|
|
</x-settings.card>
|
|
</x-settings.page>
|
|
</x-app-layout>
|