65 lines
2.6 KiB
PHP
65 lines
2.6 KiB
PHP
<div class="container mt-4" style="border: 1px solid #E6ECF5;">
|
|
<x-header-form title="Card Member" />
|
|
|
|
@if(session('error'))
|
|
<div class="alert alert-danger">
|
|
{{ session('error') }}
|
|
</div>
|
|
@endif
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="mb-3">
|
|
<select wire:model="filters.status" class="form-select" style="max-width: 200px;">
|
|
<option value="">All Status</option>
|
|
<option value="active">Active</option>
|
|
<option value="inactive">Inactive</option>
|
|
</select>
|
|
</div>
|
|
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Card Number</th>
|
|
<th>First Name</th>
|
|
<th>Last Name</th>
|
|
<th>Birthday</th>
|
|
<th>Card Type</th>
|
|
<th>Status</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($members as $member)
|
|
<tr>
|
|
<td>{{ $member['card_number'] }}</td>
|
|
<td>{{ $member['firstname'] }}</td>
|
|
<td>{{ $member['lastname'] }}</td>
|
|
<td>{{ \Carbon\Carbon::parse($member['birthdate'])->format('d-M-Y') }}</td>
|
|
<td>{{ $member['card_type'] }}</td>
|
|
<td>{{ $member['status'] === 'active' ? 'Active' : 'Inactive' }}</td>
|
|
<td>
|
|
<a href="{{ route('card-members.view', $member['id']) }}" class="btn btn-primary btn-sm">
|
|
<i class="fas fa-eye"></i> View
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="d-flex justify-content-center">
|
|
<nav>
|
|
<ul class="pagination">
|
|
<li class="page-item {{ $page > 1 ? '' : 'disabled' }}">
|
|
<a class="page-link" href="#" wire:click.prevent="previousPage">Previous</a>
|
|
</li>
|
|
<li class="page-item {{ $page < $lastPage ? '' : 'disabled' }}">
|
|
<a class="page-link" href="#" wire:click.prevent="nextPage">Next</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |