|
|
|
@ -26,23 +26,20 @@
|
|
|
|
|
</tr> |
|
|
|
|
</thead> |
|
|
|
|
<tbody> |
|
|
|
|
{{-- @php |
|
|
|
|
$notype = 1; |
|
|
|
|
@php |
|
|
|
|
$nokondisi = 1; |
|
|
|
|
@endphp |
|
|
|
|
@forelse ($typepeti as $data_typepeti) |
|
|
|
|
@forelse ($kondisiPeti as $data_kondisiPeti) |
|
|
|
|
<tr> |
|
|
|
|
<td class="text-center">{{ $notype++ }}</td> |
|
|
|
|
<td>{{ $data_typepeti->type }}</td> |
|
|
|
|
<td>{{ $data_typepeti->size_peti }}</td> |
|
|
|
|
<td>{{ $data_typepeti->description }}</td> |
|
|
|
|
<td class="text-center">{{ $nokondisi++ }}</td> |
|
|
|
|
<td>{{ $data_kondisiPeti->nama_kondisi }}</td> |
|
|
|
|
<td>{{ $data_kondisiPeti->deskripsi_kondisi }}</td> |
|
|
|
|
<td class="text-center"> |
|
|
|
|
<a href="{{ route('dashboard.typepeti.show', [$data_typepeti->id]) }}"> |
|
|
|
|
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
|
|
|
|
</a> |
|
|
|
|
<a href="{{ route('dashboard.typepeti.edit', [$data_typepeti->id]) }}"> |
|
|
|
|
<a href="#" data-toggle="modal" |
|
|
|
|
data-target="#editDataModal{{ $data_kondisiPeti->id }}"> |
|
|
|
|
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
|
|
|
|
</a> |
|
|
|
|
<form action="{{ route('dashboard.typepeti.destroy', $data_typepeti->id) }}" |
|
|
|
|
<form action="{{ route('dashboard.kondisipeti.destroy', $data_kondisiPeti->id) }}" |
|
|
|
|
method="POST" style="display: inline;"> |
|
|
|
|
@csrf |
|
|
|
|
@method('DELETE') |
|
|
|
@ -56,7 +53,7 @@
|
|
|
|
|
</tr> |
|
|
|
|
@empty |
|
|
|
|
<p>Data Kosong</p> |
|
|
|
|
@endforelse --}} |
|
|
|
|
@endforelse |
|
|
|
|
</tbody> |
|
|
|
|
</table> |
|
|
|
|
</div> |
|
|
|
@ -80,17 +77,17 @@
|
|
|
|
|
@csrf |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="name" class="col-form-label">Kondisi Peti : <span |
|
|
|
|
<label for="nama_kondisi" class="col-form-label">Kondisi Peti : <span |
|
|
|
|
class="text-danger">*</span></label> |
|
|
|
|
<input class="form-control" name="name" type="text" id="name" |
|
|
|
|
value="{{ old('name') }}" placeholder="Masukan Kondisi Peti" pattern="[^0-9]+" |
|
|
|
|
<input class="form-control" name="nama_kondisi" type="text" id="nama_kondisi" |
|
|
|
|
value="{{ old('nama_kondisi') }}" placeholder="Masukan Kondisi Peti" pattern="[^0-9]+" |
|
|
|
|
oninput="this.value=this.value.replace(/[0-9]/g,'');" |
|
|
|
|
title="Hanya karakter selain huruf yang diperbolehkan" required> |
|
|
|
|
|
|
|
|
|
<label for="description" class="col-form-label">Deskripsi: <span |
|
|
|
|
<label for="deskripsi_kondisi" class="col-form-label">Deskripsi: <span |
|
|
|
|
class="text-danger">*</span></label> |
|
|
|
|
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Kondisi Peti" |
|
|
|
|
required>{{ old('description') }}</textarea> |
|
|
|
|
<textarea class="form-control" name="deskripsi_kondisi" id="deskripsi_kondisi" |
|
|
|
|
placeholder="Masukkan Deskripsi Kondisi Peti" required>{{ old('deskripsi_kondisi') }}</textarea> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="modal-footer"> |
|
|
|
@ -104,34 +101,36 @@
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- Edit data Modal --> |
|
|
|
|
{{-- @foreach ($role as $data) |
|
|
|
|
@foreach ($kondisiPeti as $data) |
|
|
|
|
<div class="modal fade" id="editDataModal{{ $data['id'] }}" tabindex="-1" role="dialog" |
|
|
|
|
aria-labelledby="exampleModalLabel" aria-hidden="true"> |
|
|
|
|
<div class="modal-dialog" role="document"> |
|
|
|
|
<div class="modal-content"> |
|
|
|
|
<div class="modal-header"> |
|
|
|
|
<h5 class="modal-title" id="exampleModalLabel">Edit Role</h5> |
|
|
|
|
<h5 class="modal-title" id="exampleModalLabel">Edit Kondisi Peti</h5> |
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
|
|
|
|
<span aria-hidden="true">×</span> |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
<div class="modal-body"> |
|
|
|
|
<form action="{{ route('dashboard.role.update', $data->id) }}" method="POST" |
|
|
|
|
<form action="{{ route('dashboard.kondisipeti.update', $data->id) }}" method="POST" |
|
|
|
|
enctype="multipart/form-data" id="inputanForm"> |
|
|
|
|
@csrf |
|
|
|
|
@method('PUT') |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="name" class="col-form-label">Nama Hak Akses: <span |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="nama_kondisi" class="col-form-label">Kondisi Peti : <span |
|
|
|
|
class="text-danger">*</span></label> |
|
|
|
|
<input class="form-control" name="name" type="text" id="name" |
|
|
|
|
value="{{ $data->name }}" placeholder="Masukan Nama Hak Akses" pattern="[^0-9]+" |
|
|
|
|
oninput="this.value=this.value.replace(/[0-9]/g,'');" |
|
|
|
|
<input class="form-control" name="nama_kondisi" type="text" id="nama_kondisi" |
|
|
|
|
value="{{ $data->nama_kondisi }}" placeholder="Masukan Kondisi Peti" |
|
|
|
|
pattern="[^0-9]+" oninput="this.value=this.value.replace(/[0-9]/g,'');" |
|
|
|
|
title="Hanya karakter selain huruf yang diperbolehkan" required> |
|
|
|
|
|
|
|
|
|
<label for="description" class="col-form-label">Deskripsi Hak Akses: <span |
|
|
|
|
<label for="deskripsi_kondisi" class="col-form-label">Deskripsi: <span |
|
|
|
|
class="text-danger">*</span></label> |
|
|
|
|
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Hak Akses" |
|
|
|
|
required>{{ $data->description }}</textarea> |
|
|
|
|
<textarea class="form-control" name="deskripsi_kondisi" id="deskripsi_kondisi" |
|
|
|
|
placeholder="Masukkan Deskripsi Kondisi Peti" required>{{ $data->deskripsi_kondisi }}</textarea> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="modal-footer"> |
|
|
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button> |
|
|
|
@ -142,7 +141,7 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
@endforeach --}} |
|
|
|
|
@endforeach |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
document.getElementById('inputanForm').addEventListener('submit', function() { |
|
|
|
|