-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
90 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,34 @@ class="flex flex-col gap-2" enctype="multipart/form-data"> | |
class="text-center bg-[#7186F3] hover:bg-[#435EEF] duration-200 text-white px-4 py-2 rounded-lg font-semibold flex-grow">Export</button> | ||
</form> | ||
</div> --}} | ||
<div id="detail-pindah-modal" tabindex="-1" aria-hidden="true" | ||
class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full"> | ||
<div class="relative p-4 w-full max-w-2xl max-h-full"> | ||
<!-- Modal content --> | ||
<div class="relative bg-white rounded-lg shadow "> | ||
<!-- Modal header --> | ||
<div class="flex items-center justify-between p-4 md:p-5 border-b rounded-t "> | ||
<h3 class="text-xl font-semibold text-gray-900 "> | ||
Detail Data Pindah | ||
</h3> | ||
<button type="button" | ||
class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center" | ||
data-modal-hide="detail-pindah-modal"> | ||
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" | ||
viewBox="0 0 14 14"> | ||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" | ||
stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6" /> | ||
</svg> | ||
<span class="sr-only">Close modal</span> | ||
</button> | ||
</div> | ||
<!-- Modal body --> | ||
<div id="body" class="p-4 md:p-5 space-y-4"> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<section> | ||
<div class="bg-[#FFB72D] p-8"> | ||
<h1 class="text-center font-bold text-xl">DATA PERSONIL OPERASI <br> | ||
|
@@ -143,6 +171,9 @@ class="sticky top-0 text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 | |
<th scope="col" class="px-6 py-3"> | ||
Job Text | ||
</th> | ||
<th scope="col" class="px-6 py-3"> | ||
Pengajuan Pindah | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
|
@@ -235,6 +266,15 @@ class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"> | |
<td class="px-6 py-4"> | ||
{{ $personel->job_text }} | ||
</td> | ||
<td class="px-6 py-4"> | ||
@if (count($personel->pengajuan_pindah) > 0) | ||
<button data-modal-target="detail-pindah-modal" | ||
data-modal-toggle="detail-pindah-modal" | ||
onclick='setPindahDetail(@json($personel->pengajuan_pindah))'>✅</button> | ||
@else | ||
- | ||
@endif | ||
</td> | ||
</tr> | ||
@endforeach | ||
</tbody> | ||
|
@@ -251,6 +291,20 @@ class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"> | |
@include('components.footer') | ||
<script src="/script/nav.js"></script> | ||
<script> | ||
function setPindahDetail(dataPindah) { | ||
const body = document.querySelector('#detail-pindah-modal #body'); | ||
body.innerHTML = ''; | ||
dataPindah.forEach(data => { | ||
const div = ` | ||
<div class="flex gap-2 border mb-2 px-2 py-1"> | ||
<span>Dari: ${data.lokasi_awal.nama}</span> | ||
<span>Ke: ${data.lokasi_tujuan.nama}</span> | ||
<span>Diajukan: ${data.created_at}</span> | ||
</div> | ||
`; | ||
body.innerHTML += div; | ||
}); | ||
} | ||
var activepopup = null; | ||
const aksiPopup = document.querySelectorAll('.personels-action'); | ||
aksiPopup.forEach((element) => { | ||
|
@@ -273,6 +327,7 @@ class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"> | |
}); | ||
</script> | ||
<script src="/script/chatbot.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/flowbite.min.js"></script> | ||
</body> | ||
|
||
</html> |