Penambahan Sementara Pengajuan Presensi WhatsApp
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
@extends('layouts.action')
|
||||
|
||||
@section('content')
|
||||
<div class="card border shadow-sm">
|
||||
<div class="card-body p-4 text-center">
|
||||
<div class="avatar-lg mx-auto mb-3">
|
||||
<span class="avatar-title rounded-circle bg-danger text-white display-5">
|
||||
<i class="uil-times"></i>
|
||||
</span>
|
||||
</div>
|
||||
<h4 class="text-danger mb-1">Berhasil Ditolak!</h4>
|
||||
<p class="text-muted mb-4">Pengajuan absen telah berhasil ditolak.</p>
|
||||
|
||||
<div class="table-responsive text-start mb-4">
|
||||
<table class="table table-sm table-bordered">
|
||||
<tr>
|
||||
<th width="140" class="bg-light">NIP</th>
|
||||
<td>{{ $pengajuan->nip }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="bg-light">Nama</th>
|
||||
<td>{{ $pengajuan->pegawai?->nama ?? '-' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="bg-light">Tanggal</th>
|
||||
<td>{{ \Carbon\Carbon::parse($pengajuan->tanggal_mulai)->translatedFormat('d F Y') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="bg-light">Kategori</th>
|
||||
<td>{{ $pengajuan->kategori }}</td>
|
||||
</tr>
|
||||
@if ($pengajuan->notes?->last())
|
||||
<tr>
|
||||
<th class="bg-light">Alasan Penolakan</th>
|
||||
<td>{{ $pengajuan->notes->last()->message }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th class="bg-light">Status</th>
|
||||
<td><span class="badge bg-danger rounded-pill fs-6 px-2 py-1">Ditolak</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p class="text-muted small" id="countdown-text">Halaman akan ditutup dalam <strong id="countdown">5</strong> detik...</p>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script>
|
||||
let seconds = 5;
|
||||
const countdownEl = document.getElementById('countdown');
|
||||
const timer = setInterval(() => {
|
||||
seconds--;
|
||||
if (countdownEl) { countdownEl.textContent = seconds; }
|
||||
|
||||
if (seconds <= 0) {
|
||||
clearInterval(timer);
|
||||
window.close();
|
||||
setTimeout(() => {
|
||||
document.getElementById('countdown-text').textContent = 'Silakan tutup tab ini secara manual.';
|
||||
}, 500);
|
||||
}
|
||||
}, 1000);
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user