@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
{{-- Progress Bar --}}
@if (isset($periode_h_minus_1) && $periode_h_minus_1->isNotEmpty()) {{-- Card H-3: Periode akan berakhir dalam 3 hari --}}
{{ $periode_h_minus_1->count() }} Periode Akan Berakhir (H-3)

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

Pastikan tidak ada permohonan cuti 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 cuti sudah diproses, lalu lakukan rekapitulasi.

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

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

Tutup melalui tombol Tutup Periode agar tidak ada lagi pengajuan cuti yang masuk.

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

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

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

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

Filter Rekap Surat Cuti

Gunakan form di bawah ini untuk melakukan rekap cuti

@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') {{-- Input periode yang buka modal search (bukan dropdown) --}}
{{-- Hidden input untuk menyimpan nilai periode yang dipilih --}} @if ($filter->note != '')

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

@endif @else {{-- Dropdown biasa untuk field enum lainnya --}} @if ($filter->sub != '') @endif @if ($filter->note != '')

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

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

{{ $message }}

@enderror
@endforeach

{{-- Card "Tolak Semua" dan "Atasi Masalah" tetap di luar tab (di atas) --}}
@csrf

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


{{-- 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 yang Masih Diproses di Sisi Personalia


{{-- Link ke pckbr1 --}}
{{-- === 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 yang Masih Diproses di Sisi 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
@foreach ($table_detail as $index => $item) @php $encryptedId = encrypt($item->id); @endphp @endforeach
No. Action ID Cuti NIK Nama Karyawan Departemen Alasan Jenis Cuti Tanggal Mulai Tanggal Selesai
{{ $index + 1 }}
{{-- Tombol tolak --}}
{{ $item->idcuti }} {{ $item->nik }} {{ $item->nama }} {{ $item->departemen }} {{ $item->alasan }} {{ $item->jenis_cuti }} {{ \Carbon\Carbon::parse($item->tanggal_mulai)->format('d/m/Y') }} {{ \Carbon\Carbon::parse($item->tanggal_berakhir)->format('d/m/Y') }}
@include('rekap.rpcm12.partials.pagination')
{{-- CLOSE TAB 1 + OPEN TAB 2: Daftar Pengajuan Ditolak --}}
{{-- /.tab-pane #pane-pengajuan-diproses --}}
@php $which = '-undoReject'; @endphp
Daftar Pengajuan yang Baru Saja Ditolak (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
@if (session()->has('message-below')) @endif
{{-- --}}

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

@foreach ($table_history_reject as $index => $item) @php $encryptedId = encrypt($item->id); @endphp @endforeach
No. Action ID Cuti NIK Nama Karyawan Departemen Alasan Jenis Cuti Tanggal Mulai Tanggal Selesai
{{ $index + 1 }}
{{-- Tombol undo penolakan --}}
{{ $item->idcuti }} {{ $item->nik }} {{ $item->nama }} {{ $item->departemen }} {{ $item->alasan }} {{ $item->jenis_cuti }} {{ \Carbon\Carbon::parse($item->tanggal_mulai)->format('d/m/Y') }} {{ \Carbon\Carbon::parse($item->tanggal_berakhir)->format('d/m/Y') }}
@include('rekap.rpcm12.partials.pagination')
{{-- CLOSE TAB 2 + OPEN TAB 3: List Token Email Aktif --}}
{{-- /.tab-pane #pane-pengajuan-ditolak --}}
{{-- === LIST TOKEN EMAIL CUTI AKTIF === --}}
@php $which = '-tokenAktif'; @endphp
List Token Email Cuti Aktif

Token email aktif yang belum digunakan. Karyawan belum submit pengajuan cuti 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 (rendered via AJAX) --}}
@if (isset($tokenCutiAktifList) && $tokenCutiAktifList->count() > 0)
@foreach ($tokenCutiAktifList 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 cuti yang aktif.

@endif
{{-- Client-side search/filter untuk Token Email Aktif --}} {{-- 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 --}}
{{-- /.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