Files
kaunter/resources/views/pembiayaan_online/operasi/senarai.blade.php
T
ismailmasseran 4c5c690196
Build Docker Image / build-frontend (push) Successful in 43s
Explore/ismail (#3)
Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local>
Reviewed-on: #3
2026-08-26 16:21:01 +08:00

103 lines
5.6 KiB
PHP

@extends('layouts.app_operasi')
@section('content')
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-md-12">
<nav aria-label="breadcrumb">
<ol class="breadcrumb pb-3">
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Pembiayaan Online Operasi</li>
</ol>
</nav>
@if(session()->has('message'))
<div class="alert alert-success">{{ session('message') }}</div>
@endif
@if(session()->has('error'))
<div class="alert alert-danger">{{ session('error') }}</div>
@endif
<div class="card mb-3">
<div class="card-body">
<form method="get" action="{{ route('pembiayaan.online.operasi') }}" class="form-inline">
<label class="mr-2">Status</label>
<select name="status" class="form-control mr-3">
@foreach(['SUBMITTED' => 'Menunggu (SUBMITTED)', 'PARTIAL' => 'Separa (PARTIAL)', 'OPS_DONE' => 'Selesai Lulus (OPS_DONE)', 'PAID' => 'Dibayar (PAID)', 'all' => 'Semua'] as $val => $label)
<option value="{{ $val }}" {{ ($status ?? 'SUBMITTED') === $val ? 'selected' : '' }}>{{ $label }}</option>
@endforeach
</select>
<label class="mr-2">Tarikh</label>
<input type="date" name="tarikh" class="form-control mr-3" value="{{ $tarikh ?? '' }}">
<button type="submit" class="btn btn-primary">Tapis</button>
<a href="{{ route('pembiayaan.online.operasi') }}" class="btn btn-secondary ml-2">Reset</a>
</form>
</div>
</div>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Senarai Batch Pembiayaan Online</h5>
<div>
<a href="{{ route('pembiayaan.online.operasi.topup') }}" class="btn btn-sm btn-warning">Modal Online</a>
<a href="{{ route('pembiayaan.online.operasi.eod') }}" class="btn btn-sm btn-dark">EOD</a>
<span class="text-muted ml-2">{{ count($batches) }} batch</span>
</div>
</div>
<div class="card-body table-responsive">
<table class="table table-striped table-hover table-sm text-center">
<thead class="thead-dark">
<tr>
<th>Batch No</th>
<th>Cawangan</th>
<th>Tarikh</th>
<th>Slot</th>
<th>Bil</th>
<th>Jumlah (RM)</th>
<th>Status</th>
<th>Dihantar Oleh</th>
<th></th>
</tr>
</thead>
<tbody>
@forelse($batches as $batch)
@php
$st = $batch['status'] ?? '';
$badge = 'badge-secondary';
if ($st === 'SUBMITTED') $badge = 'badge-primary';
elseif ($st === 'PARTIAL') $badge = 'badge-warning';
elseif ($st === 'OPS_DONE') $badge = 'badge-success';
elseif ($st === 'PAID') $badge = 'badge-dark';
@endphp
<tr>
<td>{{ $batch['batch_no'] ?? '-' }}</td>
<td class="text-left">
<div>{{ $batch['cawangan_nama'] ?? '-' }}</div>
<small class="text-muted">{{ $batch['kodcaw'] ?? '' }}</small>
</td>
<td>{{ $batch['tarikh'] ?? '-' }}</td>
<td>{{ $batch['slot'] ?? '-' }}</td>
<td>{{ $batch['bilangan'] ?? 0 }}</td>
<td class="text-right">{{ number_format((float)($batch['jumlah_keseluruhan'] ?? 0), 2) }}</td>
<td><span class="badge {{ $badge }}">{{ $st ?: '-' }}</span></td>
<td>{{ $batch['pc_submitted_by'] ?? '-' }}</td>
<td>
<a class="btn btn-sm btn-info"
href="{{ route('pembiayaan.online.operasi.batch', ['kodcaw' => $batch['kodcaw'], 'batchId' => $batch['id']]) }}">
Semak
</a>
</td>
</tr>
@empty
<tr>
<td colspan="9">Tiada batch untuk tapisan ini.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection