cms-laravel/resources/views/livewire/reports/top-up-list.blade.php

44 lines
1.7 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="container mt-4">
<div class="card">
<div class="card-header">
<h4>Top-Up Usage Report</h4>
</div>
<div class="card-header d-flex justify-content-between align-items-center">
<h4>Top-Up Usage Report</h4>
<button class="btn btn-primary" wire:click="exportCsv">Export CSV</button>
</div>
<div class="card-body">
<table class="table table-bordered">
<thead>
<tr>
<th>Transaction Date & Time</th>
<th>Card Number</th>
<th>Top-up Amount</th>
</tr>
</thead>
<tbody>
@forelse ($data as $item)
<tr>
<td>{{ \Carbon\Carbon::parse($item['date'])->format('M d, Y H:i') }}</td>
<td>{{ $item['card_number'] ?? 'N/A' }}</td>
<td>{{ number_format($item['amount'], 2) }}</td>
</tr>
@empty
<tr>
<td colspan="3" class="text-center">No data found.</td>
</tr>
@endforelse
</tbody>
</table>
@if ($updating)
<div class="text-center">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> Loading...
</div>
@endif
</div>
</div>
</div>
@endsection