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