110 lines
3.9 KiB
PHP
110 lines
3.9 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title')
|
|
Dashboard
|
|
@endsection
|
|
|
|
@section('admin-content')
|
|
<section class="content-header">
|
|
<div class="container-fluid">
|
|
<div class="row mb-2">
|
|
<div class="col-sm-6">
|
|
<h1>Forms Vehicle Running Cost</h1>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<ol class="breadcrumb float-sm-right">
|
|
<li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Dashboard</a></li>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section class="content">
|
|
<div class="container-fluid">
|
|
<div class="card card-primary card-outline">
|
|
<div class="card-body">
|
|
<h4 class="header-title float-left">List Data Forms Vehicle Running Cost Anda</h4>
|
|
<p class="float-right mb-2">
|
|
@if (auth()->user()->can('forms.vehicle.create'))
|
|
<a class="btn btn-primary text-white" href="{{ route('forms.vehicle.create') }}">
|
|
Add New Expense Vehicle Running Cost
|
|
</a>
|
|
@endif
|
|
</p>
|
|
<div class="clearfix"></div>
|
|
<div class="dataTables_wrapper dt-bootstrap4 mt-2">
|
|
@include('backend.layouts.partials.messages')
|
|
<table id="dataTable"
|
|
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
|
|
style="width:100%">
|
|
<thead class="bg-light text-capitalize">
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Nama</th>
|
|
<th>Tanggal</th>
|
|
<th>Liter</th>
|
|
<th>Harga</th>
|
|
<th>Jarak</th>
|
|
<th>Tipe Bensin</th>
|
|
<th>Nomor Polisi</th>
|
|
<th>Bukti 1</th>
|
|
<th>Bukti 2</th>
|
|
<th>Bukti 3</th>
|
|
<th>Account Number</th>
|
|
<th>Status</th>
|
|
<th>Aksi</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($forms as $item)
|
|
<tr>
|
|
<td>{{ $loop->iteration }}</td>
|
|
<td>{{ $item->user->name }}</td>
|
|
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('dddd, D MMMM Y HH:mm:ss') }}</td>
|
|
<td>{{ $item->liter }}</td>
|
|
<td>{{ $item->harga }}</td>
|
|
<td>{{ $item->jarak }}</td>
|
|
<td>{{ $item->tipe_bensin }}</td>
|
|
<td>{{ $item->nopol }}</td>
|
|
<td>{{ $item->bukti1 }}</td>
|
|
<td>{{ $item->bukti2 }}</td>
|
|
<td>{{ $item->bukti3 }}</td>
|
|
<td>{{ $item->account_number }}</td>
|
|
<td>
|
|
@if ($item->status == 'On Progress')
|
|
<span class="badge badge-warning text-white">{{ $item->status }}</span>
|
|
@elseif ($item->status == 'Completed')
|
|
<span class="badge badge-success text-white">{{ $item->status }}</span>
|
|
@else
|
|
<span class="badge badge-danger text-white">{{ $item->status }}</span>
|
|
@endif
|
|
</td>
|
|
<td>
|
|
@if (auth()->user()->can('forms.vehicle.edit'))
|
|
<a href="{{ route('forms.vehicle.edit', $item->id) }}" class="btn btn-warning btn-sm">
|
|
<i class="fas fa-edit text-white"></i>
|
|
</a>
|
|
@endif
|
|
|
|
@if (auth()->user()->can('forms.vehicle.delete'))
|
|
<form action="{{ route('forms.vehicle.destroy', $item->id) }}" method="POST" class="d-inline" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn btn-danger btn-sm">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
</form>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|