70 lines
3.7 KiB
PHP
70 lines
3.7 KiB
PHP
@extends('layouts.masteruser')
|
|
@section('title', 'Histories Datas')
|
|
@section('styles')
|
|
<!-- DataTables -->
|
|
<link href="{{ asset('assets/vendors/datatables.net-bs5/css/dataTables.bootstrap5.min.css') }}" rel="stylesheet" type="text/css" />
|
|
|
|
<!-- Responsive datatable examples -->
|
|
<link href="{{ asset('assets/vendors/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css') }}" rel="stylesheet" type="text/css" />
|
|
@endsection
|
|
@section('content')
|
|
<div class="page-content">
|
|
<div class="row">
|
|
<div class="col-md-12 grid-margin stretch-card">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h4 class="card-title">History Data</h4>
|
|
<div class="table-responsive">
|
|
<table id="datatable" class="table align-middle">
|
|
<thead>
|
|
<tr>
|
|
<th width="10px" class="text-center">No</th>
|
|
<th>Addiction</th>
|
|
<th>Result</th>
|
|
<th>Date Time</th>
|
|
<th width="10px" class="text-center">Detail</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($histories as $history)
|
|
<tr>
|
|
<td>{{ $loop->iteration }}</td>
|
|
<td>{{ $history->addiction->name }}</td>
|
|
<td>{{ $history->result }}%</td>
|
|
<td>{{ $history->created_at->format('d-m-Y H:i:s') }}</td>
|
|
<td class="text-center">
|
|
<div class="dropdown d-inline-block">
|
|
<button class="btn btn-inverse-secondary btn-xs dropdown py-0 px-1" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
<i data-feather="more-horizontal"></i>
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
<li><a class="dropdown-item" href="{{ route('user.history.show', $history->id) }}"><i class="mdi mdi-eye-outline align-bottom me-2 text-muted"></i> Detail</a></li>
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> <!-- end col -->
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
@section('scripts')
|
|
<!-- Required datatable js -->
|
|
<script src="{{ asset('assets/vendors/datatables.net/js/jquery.dataTables.min.js') }}"></script>
|
|
<script src="{{ asset('assets/vendors/datatables.net-bs5/js/dataTables.bootstrap5.min.js') }}"></script>
|
|
|
|
<!-- Responsive examples -->
|
|
<script src="{{ asset('assets/vendors/datatables.net-responsive/js/dataTables.responsive.min.js') }}"></script>
|
|
<script src="{{ asset('assets/vendors/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js') }}"></script>
|
|
<script>
|
|
$(function () {
|
|
$('#datatable').DataTable();
|
|
});
|
|
</script>
|
|
@endsection
|