@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => '']) @push('css') @endpush @if (session('message')) @endif @if (session('errorplus')) {{-- Additional for error message from Mspp12Controller --}} @endif @if (session('success')) @endif @if (session('error')) @endif
@if (isset($periode_h_minus_1) && count($periode_h_minus_1) > 0) {{-- Card H-3: Periode akan berakhir dalam 3 hari --}}
{{ count($periode_h_minus_1) }} Periode Akan Berakhir (H-3)

Akan berakhir dalam ≤3 hari: @php $namaListH3 = collect($periode_h_minus_1)->take(3)->pluck('nama')->map(fn($n) => '' . e($n) . '')->implode(', '); $sisanyaH3 = count($periode_h_minus_1) - 3; @endphp {!! $namaListH3 !!} @if ($sisanyaH3 > 0) +{{ $sisanyaH3 }} lainnya @endif

Pastikan tidak ada permohonan izin/tugas yang masih diproses (nyangkut) sebelum periode berakhir.

@endif @if (isset($ini_saatnya_rekap) && $ini_saatnya_rekap == true) {{-- Card H-0: Hari ini adalah hari terakhir / saatnya rekap --}}
Hari Ini Saatnya Rekap

Periode {{ $periode_berakhir->nama }} berakhir hari ini ({{ \Carbon\Carbon::parse($periode_berakhir->berakhir)->format('d/m/Y') }}).

Pastikan semua permohonan izin/tugas sudah diproses, lalu lakukan rekapitulasi.

@endif @if (isset($periode_perlu_ditutup) && count($periode_perlu_ditutup) > 0) {{-- Card: periode sudah berakhir tapi belum ditutup (isactive masih 1) --}}
{{ count($periode_perlu_ditutup) }} Periode Perlu Ditutup

Sudah berakhir namun masih terbuka: @php $namaList = collect($periode_perlu_ditutup)->take(3)->pluck('nama')->map(fn($n) => '' . e($n) . '')->implode(', '); $sisanya = count($periode_perlu_ditutup) - 3; @endphp {!! $namaList !!} @if ($sisanya > 0) +{{ $sisanya }} lainnya @endif

Tutup melalui tombol Tutup Periode agar tidak ada lagi pengajuan izin/tugas yang masuk.

@endif @if (isset($periode_rekap_perlu_dibuat) && count($periode_rekap_perlu_dibuat) > 0) {{-- Card: periode sudah ditutup tapi rekap belum dibuat --}}
{{ count($periode_rekap_perlu_dibuat) }} Rekap Perlu Dibuat

Sudah ditutup namun rekap belum dibuat: @php $namaList2 = collect($periode_rekap_perlu_dibuat)->take(3)->pluck('nama')->map(fn($n) => '' . e($n) . '')->implode(', '); $sisanya2 = count($periode_rekap_perlu_dibuat) - 3; @endphp {!! $namaList2 !!} @if ($sisanya2 > 0) +{{ $sisanya2 }} lainnya @endif

Buat melalui tombol Buat Rekap agar data tersalin ke periode berikutnya.

@endif
{{-- Progress Bar --}}
{{-- Modal: Pilih Periode untuk Rekap --}}

Filter Rekap Surat Izin/Tugas

Gunakan form di bawah ini untuk melakukan rekap izin/tugas

@if ($authorize->add == '1')
{{-- Progress Bar --}}
@endif
@csrf {{--

Filter {{ $title_menu }}

--}} {{--
--}}
{{-- retrieve table filter --}} @foreach ($table_filter as $filter)
{{-- display label alias on type field not hidden --}} @if ($filter->type != 'hidden') @endif {{-- field type char and string --}} @if ($filter->type == 'char' || $filter->type == 'string') @if ($filter->note != '')

{{ '*) ' . $filter->note }}

@endif {{-- field type email --}} @elseif ($filter->type == 'email') @if ($filter->note != '')

{{ '*) ' . $filter->note }}

@endif {{-- field type hidden --}} @elseif ($filter->type == 'hidden') {{-- field type date --}} @elseif ($filter->type == 'date') @if ($filter->note != '')

{{ '*) ' . $filter->note }}

@endif {{-- field type date2 on between format --}} @elseif ($filter->type == 'date2')
@if ($filter->note != '')

{{ '*) ' . $filter->note }}

@endif {{-- field type text --}} @elseif ($filter->type == 'text') @if ($filter->note != '')

{{ '*) ' . $filter->note }}

@endif {{-- field type number --}} @elseif ($filter->type == 'number') @if ($filter->note != '')

{{ '*) ' . $filter->note }}

@endif {{-- field type search --}} @elseif ($filter->type == 'search')
@if ($filter->note != '')

{{ '*) ' . $filter->note }}

@endif {{-- field type enum --}} @elseif ($filter->type == 'enum') @if ($filter->field == 'periode') {{-- Periode diganti dengan modal-search input (bukan dropdown) --}}
@else @if ($filter->sub != '') @endif @endif @if ($filter->note != '')

{{ '*) ' . $filter->note }}

@endif @endif @error($filter->field)

{{ $message }}

@enderror
@endforeach
{{-- Card "Tolak Semua" dan "Atasi Masalah" tetap di luar tab (di atas) --}}
{{-- Form ini sepertinya masih merujuk ke izin/tugas, perlu konfirmasi apakah route rpitm1.reject-perizinan-onprogress.personalia juga menangani izin/tugas --}}
@csrf

Tolak Semua Pengajuan Izin/Tugas yang Masih Diproses di Sisi Atasan (Berdasarkan Periode)

{{-- ! Perubahan Teks --}}
{{-- Input enum untuk periode --}} @foreach ($table_filter as $filter) @if ($filter->type == 'enum') {{-- Make only periode thats made in this loop --}} @if ($filter->field == 'periode') {{-- display label alias on type field not hidden --}} @if ($filter->type != 'hidden') @endif @if ($filter->sub != '') @endif @if ($filter->note != '')

{{ '*) ' . $filter->note }}

@endif @endif @endif @endforeach @if (session('error-right')) @endif
@if (session('success-right')) @endif
@csrf

Atasi Masalah Pengajuan Izin/Tugas yang Masih Diproses di Sisi Personalia {{-- ! Perubahan Teks --}}


{{-- Link ke pitkkb. Asumsi pitkkb menangani persetujuan izin/tugas juga. Jika tidak, URL perlu disesuaikan. --}}
{{-- === TAB NAVIGATION untuk List sections === --}} {{-- Hanya 3 list table yang masuk tab: List Pengajuan Diproses, Daftar Ditolak, Token Aktif. Background putih hanya sampai batas menu (tab buttons), tidak full card width. --}}
{{-- TAB 1: List Pengajuan Diproses --}}
@php $which = '-reject'; @endphp
List Pengajuan Izin/Tugas yang Masih Diproses di Sisi {{-- ! Perubahan Teks --}} Atasan

{{-- Table with datatables to show all pengajuan based on periode dna department --}}
@foreach ($table_filter as $filter) @if ($filter->type == 'enum')
{{-- display label alias on type field not hidden --}} @if ($filter->type != 'hidden') @endif

{{ '*) Kosongkan untuk melihat semua' . $filter->field }}

@if ($filter->sub != '') @endif @endif @endforeach
@if (session()->has('message-below')) @endif
{{-- ! Start Perubahan Header Table --}} {{-- ! End Perubahan Header Table --}} {{-- ! Start Perubahan Body Table --}} @foreach ($table_detail as $index => $item) @php $encryptedId = encrypt($item->id); @endphp {{-- ! Adjusted for pagination --}} @endforeach {{-- ! End Perubahan Body Table --}}
No. Action ID Izin/Tugas NIK Nama Karyawan Departemen Alasan Kategori Izin/Tugas Jenis Izin/Tugas Jam Masuk Jam Keluar
{{ $loop->iteration + ($table_detail->currentPage() - 1) * $table_detail->perPage() }}
{{-- Tombol tolak --}} {{-- Asumsi route reject-perizinan-onprogress-one-by-one.personalia menangani izin/tugas juga --}}
{{ $item->idperizinan }} {{ $item->nik }} {{ $item->nama }} {{ $item->departemen }} {{ $item->alasan }} {{ $item->kategori_perizinan }} {{ $item->jenis_izin }} {{ $item->jam_masuk }} {{ $item->jam_keluar }}
{{-- Pagination links will be loaded here by AJAX --}} @include('rekap.rpitm1.partials.pagination', [ 'paginator' => $table_detail, 'which' => $which, ])
{{-- CLOSE TAB 1 + OPEN TAB 2: Daftar Pengajuan Ditolak --}}
{{-- /.tab-pane #pane-pengajuan-diproses --}}
@php $which = '-undoReject'; @endphp
Daftar Pengajuan Izin/Tugas yang Baru Saja Ditolak {{-- ! Perubahan Teks --}} (Histories)

{{-- Table with datatables to show all pengajuan based on periode dna department --}}
@foreach ($table_filter as $filter) @if ($filter->type == 'enum')
{{-- display label alias on type field not hidden --}} @if ($filter->type != 'hidden') @endif

{{ '*) Kosongkan untuk melihat semua' . $filter->field }}

@if ($filter->sub != '') @endif @endif @endforeach
{{-- Asumsi route rpitm1.clear.histories menangani izin/tugas juga --}}
@if (session()->has('message-below-history')) {{-- ! Unique session key if needed --}} @endif
{{-- Asumsi route rpitm1.history_penolakan.excel.export menangani izin/tugas juga --}} {{-- --}}

*) Excel akan menghiraukan filter yang ada (export semua data)

{{-- ! Start Perubahan Header Table --}} {{-- ! End Perubahan Header Table --}} {{-- ! Start Perubahan Body Table --}} @foreach ($table_history_reject as $index => $item) @php $encryptedId = encrypt($item->id); @endphp {{-- ! Adjusted for pagination --}} @endforeach {{-- ! End Perubahan Body Table --}}
No. Action ID Izin/Tugas NIK Nama Karyawan Departemen Alasan Kategori Izin/Tugas Jenis Izin/Tugas Jam Masuk Jam Keluar
{{ $loop->iteration + ($table_history_reject->currentPage() - 1) * $table_history_reject->perPage() }}
{{-- Tombol undo penolakan --}} {{-- Asumsi route undo-reject-perizinan-onprogress-one-by-one.personalia menangani izin/tugas juga --}}
{{ $item->idperizinan }} {{ $item->nik }} {{ $item->nama }} {{ $item->departemen }} {{ $item->alasan }} {{ $item->kategori_perizinan }} {{ $item->jenis_izin }} {{ $item->jam_masuk }} {{ $item->jam_keluar }}
{{-- Pagination links will be loaded here by AJAX --}} @include('rekap.rpitm1.partials.pagination', [ 'paginator' => $table_history_reject, 'which' => $which, ])
{{-- CLOSE TAB 2 + OPEN TAB 3: List Token Email Aktif --}}
{{-- /.tab-pane #pane-pengajuan-ditolak --}}
{{-- === LIST TOKEN EMAIL IZIN/TUGAS AKTIF === --}}
@php $which = '-tokenAktif'; @endphp
List Token Email Izin/Tugas Aktif

Token email aktif yang belum digunakan. Karyawan belum submit pengajuan izin/tugas via link email. Tutup periode akan diblokir selama masih ada token aktif.


{{-- Filter form: Periode + Departemen + Pencarian Bebas --}} {{-- Gunakan name unik (token_periode, token_departemen) untuk hindari konflik dgn select di tab lain yang juga pakai name="periode"/"departemen". --}}
@foreach ($table_filter as $filter) @if ($filter->type == 'enum') @if ($filter->field == 'periode' || $filter->field == 'departemen')
@if ($filter->type != 'hidden') @endif

{{ '*) Kosongkan untuk melihat semua' }}

@endif @endif @endforeach
{{-- Token table --}}
@if (isset($tokenIzinAktifList) && $tokenIzinAktifList->count() > 0)
@foreach ($tokenIzinAktifList as $idx => $token) @endforeach
# NIK Nama Karyawan Departemen Email Tanggal Kirim Dikirim Oleh
{{ $idx + 1 }} {{ $token->nik }} {{ $token->nama_karyawan ?? '-' }} {{ $token->departemen ?? '-' }} {{ $token->email ?? '-' }} {{ $token->tanggal_kirim ? \Carbon\Carbon::parse($token->tanggal_kirim)->format('d/m/Y H:i') : '-' }} {{ $token->dikirim_oleh ?? '-' }}
@else

Tidak ada token email izin/tugas yang aktif.

@endif
{{-- Client-side search/filter untuk Token Email Aktif (izin/tugas) --}} {{-- CLOSE TAB 3 + CLOSE tab-content + CLOSE wrapper --}}
{{-- /.tab-pane #pane-token-aktif --}}
{{-- /.tab-content --}} {{-- (no card-body / card to close — pakai plain div) --}}
{{-- /.col-md-12 --}}
{{-- /.col-md-12 --}}
{{-- /.row --}}
{{-- check flag js on dmenu --}} @if ($jsmenu == '1') @if (view()->exists("js.{$dmenu}")) @push('addjs') {{-- file js in folder (resources/views/js) --}} @include('js.' . $dmenu); @endpush @else @push('addjs') @endpush @endif @endif {{-- For closing / opening period (Tutup / Buka Periode) --}} {{-- Ajax for exporting histories --}} {{-- Ajax for clearing histories --}} {{-- This script is for pagination and search with ajax --}} @endsection @push('css') @endpush @push('js') @endpush