2025-04-27 22:23:31 +07:00

72 lines
2.7 KiB
PHP

@extends('layout.main')
@section('content')
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<table id="pasien_tb" class="table table-bordered table-striped">
<thead>
<tr>
<th>No</th>
<th>Nama</th>
<th>NIK</th>
<th>Tgl Lahir</th>
<th>Jenis Kelamin</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@php
$no = 1;
@endphp
@foreach ($pasien as $data)
<tr>
<td>{{ $no++ }}</td>
<td>{{ $data->nama }}</td>
<td>{{ $data->nik }}</td>
<td>{{ $data->tgl_lahir }}</td>
<td>
@if ($data->jenis_kelamin === "male")
Laki-laki
@else
Perempuan
@endif
</td>
<td>
<div class="row">
<a href="{{ route('pasien.detail', $data->id) }}" target="BLANK" class="btn btn-info btn-sm mr-1 mt-1" title="Detail"><i class="fas fa-info-circle"></i></a>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
</div>
</div>
</section>
@push('script')
<script>
$(function () {
$("#pasien_tb").DataTable({
"responsive": true,
"lengthChange": false,
"autoWidth": false,
"ordering": false,
});
$('.select2bs4').select2({
theme: 'bootstrap4'
});
});
</script>
@endpush
@endsection