86 lines
6.4 KiB
PHP
86 lines
6.4 KiB
PHP
<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
|
|
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
|
<?php $component->withName('app-layout'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
|
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes([]); ?>
|
|
<div class="max-w-3xl mx-auto space-y-6 pb-12">
|
|
<div class="flex items-center gap-4 px-2">
|
|
<a href="<?php echo e(route('inventory.foods.index')); ?>" class="p-3 bg-white border border-slate-200 rounded-2xl text-slate-400 hover:text-indigo-600 transition-all shadow-sm active:scale-90">
|
|
<i class="fas fa-arrow-left"></i>
|
|
</a>
|
|
<div>
|
|
<h2 class="text-2xl font-black text-slate-800 tracking-tight">Edit Stok Makanan</h2>
|
|
<p class="text-sm text-slate-500 font-medium italic">Pembaruan nutrisi untuk <?php echo e($food->nama_makanan); ?>.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<form action="<?php echo e(route('inventory.foods.update', $food->id)); ?>" method="POST" enctype="multipart/form-data" class="space-y-6 mx-2">
|
|
<?php echo csrf_field(); ?>
|
|
<?php echo method_field('PATCH'); ?>
|
|
|
|
<div class="bg-white border border-slate-200 rounded-[2.5rem] p-8 shadow-sm space-y-6">
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
<div class="md:col-span-2 space-y-1">
|
|
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Nama Produk Makanan</label>
|
|
<input type="text" name="nama_makanan" value="<?php echo e(old('nama_makanan', $food->nama_makanan)); ?>" required
|
|
class="w-full px-5 py-4 bg-slate-50 border border-slate-200 rounded-2xl text-sm font-bold text-slate-800 focus:ring-2 focus:ring-indigo-500 transition-all outline-none">
|
|
</div>
|
|
|
|
<div class="space-y-1">
|
|
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Jumlah Stok</label>
|
|
<input type="number" step="any" name="qty" value="<?php echo e(old('qty', (float)$food->qty)); ?>" required
|
|
class="w-full px-5 py-4 bg-slate-50 border border-slate-200 rounded-2xl text-sm font-bold text-slate-800 focus:ring-2 focus:ring-indigo-500 transition-all outline-none">
|
|
</div>
|
|
|
|
<div class="space-y-1">
|
|
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Satuan (Unit)</label>
|
|
<input type="text" name="unit" value="<?php echo e(old('unit', $food->unit)); ?>" required placeholder="kg, pouch, can"
|
|
class="w-full px-5 py-4 bg-slate-50 border border-slate-200 rounded-2xl text-sm font-bold text-slate-800 focus:ring-2 focus:ring-indigo-500 transition-all outline-none">
|
|
</div>
|
|
|
|
<div class="space-y-1">
|
|
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Tanggal Kadaluarsa</label>
|
|
<input type="date" name="expired_at" min="<?php echo e(date('Y-m-d')); ?>" value="<?php echo e(old('expired_at', $food->expired_at ? $food->expired_at->format('Y-m-d') : '')); ?>"
|
|
class="w-full px-5 py-4 bg-slate-50 border border-slate-200 rounded-2xl text-sm font-bold text-slate-800 focus:ring-2 focus:ring-indigo-500 transition-all outline-none">
|
|
</div>
|
|
|
|
<div class="space-y-1">
|
|
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Ganti Foto Produk</label>
|
|
<input type="file" name="foto_produk"
|
|
class="w-full px-5 py-3 bg-slate-50 border border-slate-200 rounded-2xl text-xs font-bold text-slate-500 file:mr-4 file:py-2 file:px-4 file:rounded-xl file:border-0 file:text-[10px] file:font-black file:bg-indigo-50 file:text-indigo-600 hover:file:bg-indigo-100">
|
|
</div>
|
|
</div>
|
|
|
|
<?php if($food->foto_produk): ?>
|
|
<div class="pt-4 border-t border-slate-100 flex items-center gap-4">
|
|
<div>
|
|
<p class="text-[10px] font-black text-slate-400 uppercase tracking-widest mb-3">Foto Saat Ini</p>
|
|
<div class="w-24 h-24 rounded-2xl border-4 border-white shadow-md overflow-hidden bg-slate-50">
|
|
<img src="<?php echo e(asset('storage/' . $food->foto_produk)); ?>" class="w-full h-full object-cover">
|
|
</div>
|
|
</div>
|
|
<div class="text-[10px] text-slate-400 italic">Foto lama akan dihapus otomatis jika Anda mengunggah foto baru.</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<button type="submit" class="w-full py-5 bg-indigo-600 text-white text-sm font-black rounded-[2rem] shadow-xl shadow-indigo-100 hover:bg-indigo-700 transition-all active:scale-[0.98] flex items-center justify-center gap-3">
|
|
<i class="fas fa-save text-lg"></i> SIMPAN PERUBAHAN STOK
|
|
</button>
|
|
</form>
|
|
</div>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
|
|
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
|
|
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
|
|
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
|
|
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
|
|
<?php endif; ?><?php /**PATH /home/u806112658/domains/earrinasia.com/ilycats/resources/views/pages/inventory/foods/edit.blade.php ENDPATH**/ ?>
|