TIF_E41201452/Website/resources/views/server-side/pages/manajemen-data/data-masyarakat.blade.php

105 lines
6.0 KiB
PHP

@extends('server-side.layouts.server-app')
@section('pageTitle', 'Data Masyarakat | Tectcrime')
@section('mainContent')
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
<div class="toolbar" id="kt_toolbar">
<div id="kt_toolbar_container" class="container-fluid d-flex flex-stack">
<div data-kt-swapper="true" data-kt-swapper-mode="prepend"
data-kt-swapper-parent="{default: '#kt_content_container', 'lg': '#kt_toolbar_container'}"
class="page-title d-flex align-items-center flex-wrap me-3 mb-5 mb-lg-0">
<h1 class="d-flex align-items-center text-dark fw-bolder fs-3 my-1">Manajemen Data
<span class="h-20px border-gray-200 border-start ms-3 mx-2"></span>
<small class="text-muted fs-7 fw-bold my-1 ms-1">Masyarakat</small>
</h1>
</div>
</div>
</div>
<div class="post d-flex flex-column-fluid" id="kt_post">
<div id="kt_content_container" class="container-xxl">
@if (Session::has('message'))
<div class="alert alert-success alert-dismissible fade show" role="alert">
<i class="bi bi-check-circle me-1"></i> {{ Session::get('message') }}.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
@endif
<div class="card mb-5 mb-xl-8">
<div class="card-body py-3">
<div class="table-responsive">
<table id="kt_datatable_example_5"
class="table table-row-dashed table-row-gray-300 align-middle gs-0 gy-4">
<thead>
<tr class="fw-bolder text-muted">
<th>#No</th>
<th class="min-w-150px">Nama</th>
<th class="min-w-120px">TTL</th>
<th class="min-w-140px">Jenis Kelamin</th>
<th class="min-w-120px">Nomor</th>
<th class="min-w-120px">Alamat</th>
</tr>
</thead>
<tbody>
@foreach ($masyarakat as $data)
<tr>
<td>
<span class="text-muted fw-bold text-muted d-block fs-7">
{{ $numtab++ }}
</span>
</td>
<td>
<div class="d-flex align-items-center">
<div class="d-flex justify-content-start flex-column">
<a href="#" class="text-dark fw-bolder text-hover-primary fs-6">
{{ $data->name }}
</a>
<span class="text-muted fw-bold text-muted d-block fs-7">{{ $data->email }}</span>
</div>
</div>
</td>
<td>
<div class="d-flex flex-column w-100 me-2">
<span class="text-dark fw-bolder text-hover-primary fs-6">{{ $data->tempat_lahir == '' ? 'Null' : $data->tempat_lahir }}</span>
<span class="text-muted fw-bold text-muted d-block fs-7">{{ $data->tanggal_lahir == '' ? 'Null' : $data->tanggal_lahir }}</span>
</div>
</td>
<td>
<span class="text-dark fw-bolder text-hover-primary d-block fs-6 text-capitalize">{{ $data->jenis_kelamin == '' ? 'Null' : $data->jenis_kelamin }}</span>
</td>
<td>
<span class="text-dark fw-bolder text-hover-primary d-block fs-6 text-capitalize">{{ $data->nohp == '' ? 'Null' : $data->nohp }}</span>
</td>
<td>
<span class="text-dark fw-bolder text-hover-primary d-block fs-6 text-capitalize">{{ $data->alamat == '' ? 'Null' : $data->alamat }}</span>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('addScripts')
<script>
$("#kt_datatable_example_5").DataTable({
"language": {
"lengthMenu": "Show _MENU_",
},
"dom":
"<'row'" +
"<'col-sm-6 d-flex align-items-center justify-content-start'l>" +
"<'col-sm-6 d-flex align-items-center justify-content-end'f>" +
">" +
"<'table-responsive'tr>" +
"<'row'" +
"<'col-sm-12 col-md-5 d-flex align-items-center justify-content-center justify-content-md-start'i>" +
"<'col-sm-12 col-md-7 d-flex align-items-center justify-content-center justify-content-md-end'p>" +
">"
});
</script>
@endpush