Files
ladill-pos/resources/views/partials/topbar.blade.php
T
isaaccladandClaude Opus 4.8 e9a0c92308
Deploy Ladill POS / deploy (push) Successful in 47s
Align POS header with other apps: AI assistant, register button, sidebar
- Add the Afia AI assistant to the header (topbar AI button + slide-over),
  matching every other Ladill app. Ports config/afia.php, AfiaService, a POS
  AiController (pos.ai.chat) scoped to register/sales/products, and includes
  the slide-over in the app layout. The afia() Alpine component already existed.
- Hide the header "Open register" button while on the register page.
- Move Settings to a pinned bottom section of the sidebar, like other apps.
- Commit the updated POS logo + launcher icon assets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 07:08:43 +00:00

23 lines
1.3 KiB
PHP

@php
$user = auth()->user();
$initials = collect(explode(' ', trim((string) $user?->name)))
->filter()->take(2)->map(fn ($p) => strtoupper(substr($p, 0, 1)))->implode('');
@endphp
<header class="flex items-center justify-between h-16 border-b border-slate-200 bg-white px-4 sm:px-6">
<div class="flex flex-1 items-center gap-3 min-w-0">
<button @click="sidebarOpen = !sidebarOpen" class="lg:hidden shrink-0 text-slate-500 hover:text-slate-700" aria-label="Menu">
<svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
</button>
<h1 class="truncate text-base font-semibold text-slate-900 lg:hidden">{{ $heading ?? 'Ladill POS' }}</h1>
@unless(request()->routeIs('pos.register'))
<a href="{{ route('pos.register') }}" class="hidden rounded-xl bg-indigo-600 px-3 py-2 text-sm font-medium text-white hover:bg-indigo-700 lg:inline-flex">Open register</a>
@endunless
</div>
<div class="flex items-center gap-3">
@includeIf('partials.topbar-widgets-prepend')
@include('partials.topbar-desktop-widgets', ['user' => $user, 'showUser' => true])
@includeIf('partials.topbar-widgets-append')
</div>
</header>