fix bug
This commit is contained in:
parent
685beea7de
commit
3dbd356d2f
@ -41,16 +41,16 @@
|
|||||||
<table class="w-full table-fixed border border-gray-300 text-left">
|
<table class="w-full table-fixed border border-gray-300 text-left">
|
||||||
<thead class="bg-gray-100">
|
<thead class="bg-gray-100">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="w-[10%] p-2 border border-gray-300 text-center">ID</th>
|
<th class="w-[10%] p-2 border border-gray-300 text-center">No</th>
|
||||||
<th class="w-[60%] p-2 border border-gray-300 text-center">Deskripsi</th>
|
<th class="w-[60%] p-2 border border-gray-300 text-center">Deskripsi</th>
|
||||||
<th class="w-[30%] p-2 border border-gray-300 text-center">Aksi</th>
|
<th class="w-[30%] p-2 border border-gray-300 text-center">Aksi</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($kategoriFitur as $item)
|
@forelse ($kategoriFitur as $index => $item)
|
||||||
<tr class="hover:bg-gray-50">
|
<tr class="hover:bg-gray-50">
|
||||||
<td class="py-4 px-2 border border-gray-300 text-center">
|
<td class="py-4 px-2 border border-gray-300 text-center">
|
||||||
{{ $item->id }}
|
{{ ($kategoriFitur->currentPage() - 1) * $kategoriFitur->perPage() + $loop->iteration }}
|
||||||
</td>
|
</td>
|
||||||
<td class="py-4 px-2 border border-gray-300">
|
<td class="py-4 px-2 border border-gray-300">
|
||||||
{{ $item->deskripsi }}
|
{{ $item->deskripsi }}
|
||||||
|
|||||||
@ -283,13 +283,14 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!-- Modal Edit Template - Fixed Version -->
|
<!-- Modal Edit Template - Fixed Version -->
|
||||||
@foreach ($templates as $template)
|
@foreach ($templates as $template)
|
||||||
<div id="modalEdit{{ $template->id }}" class="fixed inset-0 hidden items-center justify-center z-50">
|
<div id="modalEdit{{ $template->id }}" class="fixed inset-0 hidden items-center justify-center z-50">
|
||||||
<div class="absolute inset-0 bg-black opacity-50 closeEditOverlay" data-id="{{ $template->id }}"></div>
|
<div class="absolute inset-0 bg-black opacity-50 closeEditOverlay" data-id="{{ $template->id }}"></div>
|
||||||
<div class="bg-white rounded-lg shadow-lg w-full max-w-md z-50 flex flex-col max-h-[90vh]">
|
<div class="bg-white rounded-lg shadow-lg w-full max-w-md z-50 flex flex-col max-h-[90vh]">
|
||||||
|
|
||||||
<!-- PINDAHKAN FORM KE LUAR AGAR MENCAKUP SEMUA ELEMEN -->
|
<!-- PINDAHKAN FORM KE LUAR AGAR MENCAKUP SEMUA ELEMEN -->
|
||||||
<form id="editForm{{ $template->id }}" action="{{ route('templates.update', $template->id) }}" method="POST" enctype="multipart/form-data" class="h-full flex flex-col">
|
<form id="editForm{{ $template->id }}" action="{{ route('templates.update', $template->id) }}"
|
||||||
|
method="POST" enctype="multipart/form-data" class="h-full flex flex-col">
|
||||||
@csrf @method('PUT')
|
@csrf @method('PUT')
|
||||||
|
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
@ -399,7 +400,31 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
<!-- Modal Konfirmasi Hapus Template -->
|
||||||
|
<div id="modalDeleteTemplate" class="fixed inset-0 hidden items-center justify-center z-50">
|
||||||
|
<div class="absolute inset-0 bg-black opacity-50" id="modalDeleteTemplateOverlay"></div>
|
||||||
|
<div class="bg-white rounded-lg shadow-lg w-full max-w-md z-50 overflow-hidden">
|
||||||
|
<form id="deleteTemplateForm" method="POST">
|
||||||
|
@csrf
|
||||||
|
@method('DELETE')
|
||||||
|
<div class="p-4 border-b">
|
||||||
|
<h5 class="text-lg font-medium">Hapus Template</h5>
|
||||||
|
</div>
|
||||||
|
<div class="p-4">
|
||||||
|
Apakah Anda yakin ingin menghapus template <strong id="deleteTemplateName">—</strong>?
|
||||||
|
</div>
|
||||||
|
<div class="p-4 border-t flex justify-end space-x-2">
|
||||||
|
<button type="button" id="closeDeleteTemplateModal"
|
||||||
|
class="bg-gray-300 text-black px-3 py-1 rounded">Batal</button>
|
||||||
|
<button type="submit" class="bg-red-600 text-white px-3 py-1 rounded">
|
||||||
|
Ya, Hapus
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user