survey-sdgs/resources/views/pages/masters/agamas/index.blade.php

63 lines
2.9 KiB
PHP
Executable File

@extends('layouts.app')
@section('title', 'Master Agama')
@section('content')
<div class="row">
<div class="col-lg-12 d-flex align-items-stretch">
<div class="card w-100">
<div class="card-body p-4">
<div class="d-flex align-items-stretch">
<h5 class="card-title fw-semibold mb-4">Master Agama</h5>
</div>
<div class="table-responsive">
<table class="table table-responsive table-bordered text-nowrap mb-0 align-middle">
<thead class="text-dark fs-4">
<tr>
<th class="border-bottom-0" width="65px">
<h6 class="fw-semibold mb-0 text-center">#</h6>
</th>
<th class="border-bottom-0" style="max-width: 100px;">
<h6 class="fw-semibold mb-0">Kode Master</h6>
</th>
</tr>
</thead>
<tbody>
@forelse ($agama as $_agama)
<tr>
<td class="border-bottom-0 text-center">
<span
class="fw-normal mb-0">{{ ($agama->currentPage() - 1) * $agama->perPage() + $loop->index + 1 }}</span>
</td>
<td class="border-bottom-0" style="max-width: 100px;">
<span
class="fw-normal mb-1 badge text-bg-light">{{ $_agama->keterangan }}</span>
</td>
</tr>
@empty
<div class="alert alert-danger">
Data master belum Tersedia.
</div>
@endforelse
</tbody>
</table>
{{-- Pagination --}}
<div class="d-flex justify-content-center">
{!! $agama->links('includes.custom-pagination') !!}
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
@if (Session::has('agamas-message'))
<script>
Swal.fire({
text: "{{ Session::get('agamas-message')['msg'] }}",
icon: "{{ Session::get('agamas-message')['type'] }}",
timer: 2500
});
</script>
@endif
@stop