|
|
|
@extends('layouts.main')
|
|
|
|
@section('content')
|
|
|
|
<style>
|
|
|
|
.table th {
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.table td {
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
@include('layouts.components.alert-prompt')
|
|
|
|
@if (auth()->user()->role_id == 1)
|
|
|
|
<div class="card shadow mb-4">
|
|
|
|
<div class="card-header py-3">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6">
|
|
|
|
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Disposal</h5>
|
|
|
|
</div>
|
|
|
|
<div class="col-6 text-right">
|
|
|
|
<a href="{{ route('dashboard.disposal.create') }}" class="btn btn-success btn-icon-split">
|
|
|
|
<span class="text">Disposal Peti</span>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="text-center">No</th>
|
|
|
|
<th>Kode Peti</th>
|
|
|
|
<th>Nama Customer</th>
|
|
|
|
<th>Tanggal Disposal</th>
|
|
|
|
<th>Alasan Disposal</th>
|
|
|
|
{{-- <th>Status Peti</th> --}}
|
|
|
|
<th class="text-center">Action</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@php
|
|
|
|
$nodisposal = 1;
|
|
|
|
@endphp
|
|
|
|
@forelse ($disposal as $data_disposal)
|
|
|
|
<tr>
|
|
|
|
<td>{{ $nodisposal++ }}</td>
|
|
|
|
<td>{{ optional($data_disposal->peti)->fix_lot }}</td>
|
|
|
|
<td>{{ optional($data_disposal->customer)->name }}</td>
|
|
|
|
<td>{{ \Carbon\Carbon::parse($data_disposal->date_disposal)->format('d/m/Y') }}</td>
|
|
|
|
<td>{{ $data_disposal->description }}</td>
|
|
|
|
{{-- <td>{{ $data_disposal->status_disposal }}</td> --}}
|
|
|
|
<td class="text-center">
|
|
|
|
<a href="{{ route('dashboard.disposal.edit', $data_disposal->id) }}" title="Edit">
|
|
|
|
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
|
|
|
|
</a>
|
|
|
|
<form action="{{ route('dashboard.disposal.destroy', $data_disposal->id) }}"
|
|
|
|
method="POST" style="display: inline;">
|
|
|
|
@csrf
|
|
|
|
@method('DELETE')
|
|
|
|
<button type="submit"
|
|
|
|
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"
|
|
|
|
title="Delete" style="border: none; background: none; cursor: pointer;">
|
|
|
|
<i class="fa fa-trash text-danger" style="font-size: 20px"></i>
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@empty
|
|
|
|
@endforelse
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@elseif (auth()->user()->role_id == 2)
|
|
|
|
@include('pages.user.dashboard.disposal.index')
|
|
|
|
@endif
|
|
|
|
@endsection
|