This commit is contained in:
Saufi
2026-06-16 15:04:58 +08:00
commit 77a87fbdf1
171 changed files with 21225 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
@extends('layouts.app')
@section('title', $pageTitle)
@section('page-title', $pageTitle)
@section('page-label', 'Import Excel')
@section('page-actions')
<a href="{{ route('import.template', ['type' => $importType]) }}" class="btn btn-outline-primary">Download Template Excel</a>
@endsection
@section('content')
<div class="row g-4">
<div class="col-lg-5">
<div class="card surface-card p-4">
<h2 class="h5 fw-bold mb-3">Muat Naik dan Proses Fail</h2>
<p class="text-muted">{{ $description }}</p>
<div class="alert alert-info">
@if ($importType === 'tax')
Import ini hanya untuk <strong>Admin</strong> dan digunakan sebagai data cukai harta. Kolum penting: <strong>No_Bgnn</strong>, <strong>Nama_Jalan</strong>, <strong>Kadar</strong>, <strong>Cukai_Harta</strong>.
@else
Import ini digunakan oleh <strong>Staff</strong> untuk data tunggakan. Format tunggakan sedia ada dikekalkan.
@endif
</div>
<p class="text-muted">Format dibenarkan: <strong>xlsx</strong>, <strong>xls</strong> atau <strong>csv</strong>.</p>
<form method="POST" action="{{ route($prefix.'.import.store') }}" enctype="multipart/form-data" class="d-grid gap-3">
@csrf
<div>
<label class="form-label">Pilih Fail Excel</label>
<input type="file" name="file" class="form-control" required>
</div>
<button class="btn btn-primary">Muat Naik dan Proses</button>
</form>
</div>
</div>
<div class="col-lg-7">
<div class="card surface-card p-4">
<h2 class="h5 fw-bold mb-3">Sejarah Import</h2>
<div class="table-responsive">
<table class="table align-middle">
<thead>
<tr>
<th>Batch</th>
<th>Jenis</th>
<th>Fail</th>
<th>Diproses</th>
<th>Baharu</th>
<th>Dikemaskini</th>
<th>Tiada Dalam Import</th>
<th>Gagal</th>
</tr>
</thead>
<tbody>
@forelse ($batches as $batch)
<tr>
<td>#{{ $batch->id }}</td>
<td>{{ $batch->import_type === 'tax' ? 'Cukai Harta' : 'Tunggakan' }}</td>
<td>
<div class="fw-semibold">{{ $batch->filename }}</div>
<div class="text-muted small">{{ $batch->created_at->format('d/m/Y h:i A') }}</div>
</td>
<td>{{ $batch->total_processed }}</td>
<td>{{ $batch->total_new }}</td>
<td>{{ $batch->total_updated }}</td>
<td>{{ $batch->total_missing }}</td>
<td>{{ $batch->total_failed }}</td>
</tr>
@empty
<tr><td colspan="8" class="text-center text-muted py-4">Belum ada sejarah import.</td></tr>
@endforelse
</tbody>
</table>
</div>
<div class="mt-3">{{ $batches->links() }}</div>
</div>
</div>
</div>
@endsection