parfum/resources/views/livewire/studio/stock/inventory-history/index.blade.php

67 lines
3.3 KiB
PHP

<flux:main>
<div class="flex flex-col gap-4 sm:flex-row sm:justify-between sm:items-center">
<div>
<flux:heading size="xl">Riwayat Stok</flux:heading>
<flux:subheading>Lihat histori perubahan stok untuk semua barang.</flux:subheading>
</div>
</div>
<div class="mt-6 flex flex-col gap-4 sm:flex-row sm:items-center">
<flux:input wire:model.live.debounce.300ms="search" placeholder="Cari barang..." autocomplete="off"
icon="magnifying-glass" class="flex-1" />
<div class="w-full sm:w-48">
<flux:select variant="listbox" wire:model.live="typeFilter">
<flux:select.option value="all">Semua Tipe</flux:select.option>
<flux:select.option value="perfume">Parfum</flux:select.option>
<flux:select.option value="product">Produk</flux:select.option>
<flux:select.option value="bottle">Botol</flux:select.option>
</flux:select>
</div>
</div>
<div class="mt-6">
<flux:card class="overflow-hidden">
<flux:table>
<flux:table.columns>
<flux:table.column>Nama Barang</flux:table.column>
<flux:table.column>Tipe</flux:table.column>
<flux:table.column>Stok Saat Ini</flux:table.column>
<flux:table.column align="end">Aksi</flux:table.column>
</flux:table.columns>
<flux:table.rows>
@forelse ($items as $item)
<flux:table.row :key="$item->hash">
<flux:table.cell class="font-medium">{{ $item->name }}</flux:table.cell>
<flux:table.cell>
<flux:badge size="sm">{{ $item->type_label }}</flux:badge>
</flux:table.cell>
<flux:table.cell class="font-semibold text-zinc-700 dark:text-zinc-200">
{{ formatCurrencyNumber($item->total_stock) }}
</flux:table.cell>
<flux:table.cell align="end">
<flux:tooltip content="Lihat">
<flux:button size="sm" variant="primary" icon="clock"
href="{{ route('studio.stock.inventory_history.show', ['type' => $item->type, 'hash' => $item->hash]) }}"
wire:navigate>
</flux:button>
</flux:tooltip>
</flux:table.cell>
</flux:table.row>
@empty
<flux:table.row>
<flux:table.cell colspan="4" class="text-center py-10">
<div class="flex flex-col items-center justify-center text-zinc-500">
<flux:icon name="archive-box" size="xl" class="mb-2 opacity-20" />
<span>Tidak ada barang ditemukan.</span>
</div>
</flux:table.cell>
</flux:table.row>
@endforelse
</flux:table.rows>
</flux:table>
</flux:card>
</div>
</flux:main>