Files
ladill-pos/resources/views/pos/products/index.blade.php
T
isaaccladandClaude Opus 4.8 9fcea24680
Deploy Ladill POS / deploy (push) Successful in 1m39s
Add bulk CSV product import for POS (retail + restaurant)
Customers with large catalogs can upload a CSV instead of adding products one by
one. Mode-aware: restaurant imports into the local catalog (chunked INSERT,
categories resolved/created by name); retail batches to the CRM products/bulk
endpoint. Streamed parsing + batched writes handle thousands of rows in one
request. Includes a downloadable template, an Import button on both product
pages, and a skipped-rows report.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:20:40 +00:00

42 lines
2.3 KiB
PHP

<x-app-layout title="Products">
<div class="space-y-5">
<div class="flex items-center justify-between gap-3">
<h1 class="text-lg font-semibold text-slate-900">Products</h1>
<div class="flex items-center gap-2">
<a href="{{ route('pos.products.import.form') }}" class="rounded-xl border border-slate-200 bg-white px-4 py-2 text-sm font-semibold text-slate-700 transition hover:bg-slate-50">Import</a>
<a href="{{ route('pos.products.create') }}" class="btn-primary">Add product</a>
</div>
</div>
@include('pos.products._import-errors')
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
<table class="min-w-full text-sm">
<thead class="bg-slate-50 text-left text-xs uppercase tracking-wide text-slate-500">
<tr>
<th class="px-4 py-3">Name</th>
<th class="px-4 py-3">SKU</th>
<th class="px-4 py-3 text-right">Price</th>
<th class="px-4 py-3">Status</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100">
@forelse ($products as $product)
<tr class="hover:bg-slate-50 cursor-pointer" onclick="window.location='{{ route('pos.products.edit', $product) }}'">
<td class="px-4 py-3 font-medium text-slate-900">{{ $product->name }}</td>
<td class="px-4 py-3 text-slate-500">{{ $product->sku ?: '—' }}</td>
<td class="px-4 py-3 text-right">{{ pos_money($product->price_minor, $product->currency) }}</td>
<td class="px-4 py-3">{{ $product->is_active ? 'Active' : 'Hidden' }}</td>
</tr>
@empty
<tr><td colspan="4" class="px-4 py-8 text-center text-slate-500">No products yet.</td></tr>
@endforelse
</tbody>
</table>
@if ($products->hasPages())
<div class="border-t border-slate-100 px-4 py-3">{{ $products->links() }}</div>
@endif
</div>
</div>
</x-app-layout>