110 lines
7.1 KiB
PHP
110 lines
7.1 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-4xl mx-auto py-12 px-4">
|
|
|
|
|
|
<div class="flex items-center gap-6 mb-10">
|
|
<a href="<?php echo e(route('cats.index')); ?>" class="p-4 bg-white border border-slate-200 rounded-2xl text-slate-400 hover:text-emerald-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 uppercase tracking-tight">Bulk Weight Update</h2>
|
|
<p class="text-sm text-slate-400 font-bold uppercase tracking-widest">Perbarui berat badan massal via Excel/CSV</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-[3rem] shadow-xl border border-slate-100 p-10 md:p-14 overflow-hidden">
|
|
|
|
|
|
<div class="flex flex-col md:flex-row items-start md:items-center gap-6 p-8 bg-slate-50 rounded-[2rem] border border-slate-100 mb-10">
|
|
<div class="w-16 h-16 bg-white text-indigo-600 rounded-2xl flex items-center justify-center shrink-0 shadow-sm border border-slate-100">
|
|
<i class="fas fa-file-csv text-3xl"></i>
|
|
</div>
|
|
<div class="flex-1">
|
|
<h4 class="font-black text-slate-800 uppercase text-sm mb-2">Langkah 1: Unduh Format CSV</h4>
|
|
<p class="text-xs text-slate-500 mb-0 leading-relaxed font-medium">
|
|
Sistem akan mengunduh daftar kucing saat ini beserta <b>Kode Kucing</b>-nya.<br>
|
|
Cukup isi angka pada kolom <b>Berat Badan (Kg)</b>. Anda juga dapat mengubah <b>Tanggal</b> untuk mencatat data timbangan di masa lalu (Backdate).
|
|
</p>
|
|
</div>
|
|
<div class="shrink-0 mt-4 md:mt-0 w-full md:w-auto">
|
|
<a href="<?php echo e(route('cats.weight-template')); ?>" class="flex items-center justify-center px-6 py-4 bg-indigo-50 border border-indigo-100 text-indigo-700 text-[10px] font-black rounded-2xl hover:bg-indigo-600 hover:text-white transition-all shadow-sm uppercase tracking-widest w-full">
|
|
<i class="fas fa-download mr-2 text-sm"></i> Download Template
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<form action="<?php echo e(route('cats.bulk-weight.post')); ?>" method="POST" enctype="multipart/form-data" class="space-y-8">
|
|
<?php echo csrf_field(); ?>
|
|
<div class="space-y-4">
|
|
<label class="text-xs font-black text-slate-800 uppercase tracking-widest ml-2">Langkah 2: Unggah Data Terbaru</label>
|
|
<div class="relative group">
|
|
<input type="file" name="file_excel" id="file_excel" required accept=".csv, .xlsx, .xls" onchange="updateFileName(this)" class="absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10">
|
|
<div id="upload-box" class="w-full p-16 border-2 border-dashed border-slate-300 rounded-[2.5rem] bg-white text-center group-hover:border-emerald-500 group-hover:bg-emerald-50 transition-all">
|
|
<i id="upload-icon" class="fas fa-cloud-upload-alt text-6xl text-slate-300 group-hover:text-emerald-500 mb-6 transition-colors"></i>
|
|
<p id="upload-text" class="text-xs font-black text-slate-600 uppercase tracking-widest">Klik atau Seret File Excel/CSV ke Sini</p>
|
|
<p id="file-name" class="text-sm font-bold text-emerald-600 mt-4 hidden bg-white px-4 py-2 rounded-lg inline-block shadow-sm border border-emerald-100"></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="pt-4 border-t border-slate-100">
|
|
<button type="submit" class="w-full py-6 bg-emerald-600 text-white rounded-[2rem] font-black uppercase text-xs tracking-[0.3em] shadow-xl shadow-emerald-200 hover:bg-emerald-700 transition-all active:scale-95">
|
|
<i class="fas fa-check-circle mr-2 text-sm"></i> PROSES BULK UPDATE
|
|
</button>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<?php $__env->startPush('scripts'); ?>
|
|
<script>
|
|
// Script untuk mengubah tampilan UI saat file dipilih oleh user
|
|
function updateFileName(input) {
|
|
const fileName = input.files[0]?.name;
|
|
const textEl = document.getElementById('upload-text');
|
|
const nameEl = document.getElementById('file-name');
|
|
const iconEl = document.getElementById('upload-icon');
|
|
const boxEl = document.getElementById('upload-box');
|
|
|
|
if (fileName) {
|
|
textEl.innerText = "File Siap Diproses:";
|
|
nameEl.innerText = fileName;
|
|
nameEl.classList.remove('hidden');
|
|
|
|
iconEl.classList.replace('fa-cloud-upload-alt', 'fa-file-excel');
|
|
iconEl.classList.replace('text-slate-300', 'text-emerald-500');
|
|
boxEl.classList.replace('border-slate-300', 'border-emerald-500');
|
|
boxEl.classList.replace('bg-white', 'bg-emerald-50');
|
|
} else {
|
|
textEl.innerText = "Klik atau Seret File Excel/CSV ke Sini";
|
|
nameEl.classList.add('hidden');
|
|
|
|
iconEl.classList.replace('fa-file-excel', 'fa-cloud-upload-alt');
|
|
iconEl.classList.replace('text-emerald-500', 'text-slate-300');
|
|
boxEl.classList.replace('border-emerald-500', 'border-slate-300');
|
|
boxEl.classList.replace('bg-emerald-50', 'bg-white');
|
|
}
|
|
}
|
|
</script>
|
|
<?php $__env->stopPush(); ?>
|
|
<?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/cats/bulk-weight.blade.php ENDPATH**/ ?>
|