{{-- Flash Message --}} @if(session('error'))
{{ session('error') }}
@endif {{-- Check-In Modal --}} @if($showCheckInModal)

Selamat Datang! 👋

Silakan check-in untuk memulai shift

Masukkan jumlah uang di laci kasir

*Tanpa check-in, kamu tidak bisa melakukan transaksi

@endif {{-- Check-Out Modal --}} @if($showCheckOutModal)

Check-Out Shift

Tutup shift dan lihat ringkasan

{{-- Shift Summary --}}

Ringkasan Shift

Modal Awal: Rp {{ number_format($this->currentShift?->opening_cash ?? 0, 0, ',', '.') }}
Transaksi: {{ $this->todayTransactionsCount }}
Penjualan Cash: Rp {{ number_format($this->cashSales, 0, ',', '.') }}
Total Penjualan: Rp {{ number_format($this->todaySales, 0, ',', '.') }}
Seharusnya di Laci: Rp {{ number_format($this->expectedCash, 0, ',', '.') }}
{{-- Closing Cash Input --}}
{{-- Difference Warning --}} @if($closingCash && $closingCash != $this->expectedCash)
Selisih: Rp {{ number_format(abs($closingCash - $this->expectedCash), 0, ',', '.') }} {{ $closingCash > $this->expectedCash ? '(Lebih)' : '(Kurang)' }}
@endif {{-- Note --}}
@endif {{-- Main Dashboard Content (only show if checked in OR view-only mode) --}} @if($this->currentShift || $viewOnlyMode) {{-- Header --}}

Dashboard Kasir

@if($this->currentShift)

Shift dimulai {{ $this->currentShift->check_in_at->format('H:i') }} • {{ $this->currentShift->duration }}

@else

Mode lihat saja - Belum check-in

@endif
@if($this->currentShift) Mulai Transaksi @else @endif
@if($viewOnlyMode && !$this->currentShift) {{-- View Only Stats - Show overall performance --}} @php $myTotalSales = \App\Models\Transaction::where('userId', auth()->id())->where('status', 'COMPLETED')->sum('totalAmount'); $myTotalTransactions = \App\Models\Transaction::where('userId', auth()->id())->where('status', 'COMPLETED')->count(); $myTodaySales = \App\Models\Transaction::where('userId', auth()->id())->where('status', 'COMPLETED')->whereDate('date', today())->sum('totalAmount'); $myTodayTransactions = \App\Models\Transaction::where('userId', auth()->id())->where('status', 'COMPLETED')->whereDate('date', today())->count(); @endphp

Penjualan Hari Ini

Rp {{ number_format($myTodaySales, 0, ',', '.') }}

Transaksi Hari Ini

{{ $myTodayTransactions }}

Total Penjualan

Rp {{ number_format($myTotalSales, 0, ',', '.') }}

Total Transaksi

{{ $myTotalTransactions }}

{{-- Low Stock Alert for View Only Mode --}}

Stok Menipis

@forelse($this->lowStockProducts as $product)
{{ $product->category?->icon ?? '📦' }}
{{ $product->name }}

{{ $product->category?->name ?? '-' }}

Sisa {{ $product->stock }}
@empty

Semua stok aman!

@endforelse
@else {{-- Quick Stats --}}

Modal Awal

Rp {{ number_format($this->currentShift->opening_cash, 0, ',', '.') }}

Penjualan Shift

Rp {{ number_format($this->todaySales, 0, ',', '.') }}

Jumlah Transaksi

{{ $this->todayTransactionsCount }}

Kas di Laci

Rp {{ number_format($this->expectedCash, 0, ',', '.') }}

Cash only

{{-- Main Grid --}}
{{-- Recent Transactions --}}

Transaksi Shift Ini

Lihat Semua
@forelse($this->recentTransactions as $trx)
{{ $trx->invoiceNumber }} {{ $trx->date?->format('H:i') }}
@if($trx->member) {{ $trx->member->name }} @else Guest @endif {{ $trx->paymentMethod }}
Rp {{ number_format($trx->totalAmount, 0, ',', '.') }}
@empty

Belum ada transaksi di shift ini

@endforelse
{{-- Low Stock Alert --}}

Stok Menipis

@forelse($this->lowStockProducts as $product)
{{ $product->category?->icon ?? '📦' }}
{{ $product->name }}

{{ $product->category?->name ?? '-' }}

Sisa {{ $product->stock }}
@empty

Semua stok aman!

@endforelse
@endif @endif