Files
kaunter/resources/views/shoraka/index.blade.php
T

74 lines
3.7 KiB
PHP

@extends('layouts.app')
@section('content')
<style>
.shoraka-list-card .table th,
.shoraka-list-card .table td {
vertical-align: middle;
}
.shoraka-list-card .status-badge {
padding: 8px 12px;
font-size: 13px;
font-weight: 500;
white-space: normal;
line-height: 1.5;
}
</style>
<div class="container">
<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">Komoditi Shoraka</li>
</ol>
</nav>
<div class="card shoraka-list-card">
<div class="card-header bg-secondary d-flex flex-wrap align-items-center justify-content-between">
<h5 class="mb-0 py-2">Komoditi Shoraka</h5>
<a class="btn btn-info btn-sm my-1" href="{{ route('home') }}">
<i class="fas fa-arrow-left mr-1" aria-hidden="true"></i> Kembali ke Paparan Utama
</a>
</div>
<div class="card-body">
<p class="text-muted mb-4">Semak transaksi komoditi dan selesaikan pembiayaan selepas status Completed.</p>
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover mb-0">
<thead class="thead-dark">
<tr>
<th scope="col">No. rujukan</th>
<th scope="col">Teller</th>
<th scope="col">Penyelesaian pembiayaan</th>
<th scope="col" class="text-center">Tindakan</th>
</tr>
</thead>
<tbody>
@forelse($records as $record)
@php
$statusLabels = ['WAITING' => 'Menunggu Shoraka / penyelesaian', 'PROCESSING' => 'Sedang diproses', 'REVIEW' => 'Perlu semakan operasi', 'DONE' => 'Selesai'];
$statusColors = ['WAITING' => 'warning', 'PROCESSING' => 'info', 'REVIEW' => 'danger', 'DONE' => 'success'];
@endphp
<tr>
<td class="text-nowrap">{{ $record->norujukan }}</td>
<td>{{ $record->teller }}</td>
<td>
<span class="badge badge-{{ $statusColors[$record->state] ?? 'secondary' }} status-badge">{{ $statusLabels[$record->state] ?? $record->state }}</span>
</td>
<td class="text-center">
<a class="btn btn-info btn-sm" href="{{ route('shoraka.show', $record->norujukan) }}" aria-label="Buka pembiayaan {{ $record->norujukan }}">Buka</a>
</td>
</tr>
@empty
<tr><td colspan="4" class="text-center text-muted py-5">Tiada transaksi.</td></tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection