startSection('title', 'Preview Import Absensi'); ?> startSection('content'); ?> ['bg'=>'#DCFCE7','c'=>'#166534','ic'=>'βœ…'], 'Terlambat' => ['bg'=>'#FEF9C3','c'=>'#92400E','ic'=>'⏰'], 'Alpa' => ['bg'=>'#FEE2E2','c'=>'#991B1B','ic'=>'❌'], 'Pulang' => ['bg'=>'#FFF7ED','c'=>'#9A3412','ic'=>'🏠'], 'Izin' => ['bg'=>'#F3E8FF','c'=>'#6B21A8','ic'=>'πŸ“‹'], 'Sakit' => ['bg'=>'#E0F2FE','c'=>'#0C4A6E','ic'=>'πŸ₯'], ]; // ── 1. Kolom kegiatan: UNIK, diurutkan waktu_mulai ─────────────────────────── $kegiatanCols = collect($hasilEnriched) ->flatMap(fn($h) => $h['rows']) ->unique('kegiatan_id') ->sortBy('waktu_mulai') ->values() ->map(fn($r) => [ 'kegiatan_id' => $r['kegiatan_id'], 'nama' => $r['nama_kegiatan'], 'waktu_mulai' => $r['waktu_mulai'], ]); // ── 2. Susun data: [tanggal][id_santri_or_mesin] = data ────────────────────── $byTanggalSantri = []; $santriList = []; // untuk urutan santri konsisten foreach ($hasilEnriched as $h) { $tgl = $h['tanggal']; $key = $h['id_santri'] ?? ('__'.$h['id_mesin']); $byTanggalSantri[$tgl][$key] = $h; if (!isset($santriList[$key])) { $santriList[$key] = [ 'nama' => $h['nama_web'] ?? $h['nama_mesin'], 'kelas' => $h['kelas'] ?? '-', 'status' => $h['match_status'], ]; } } ksort($byTanggalSantri); // ── 3. Statistik ───────────────────────────────────────────────────────────── $allRows = collect($hasilEnriched)->flatMap(fn($h) => $h['rows']); $totalKonflik = $allRows->where('is_conflict', true)->count(); $hadir = $allRows->where('status_final','Hadir')->count(); $terlambat = $allRows->where('status_final','Terlambat')->count(); $alpa = $allRows->where('status_final','Alpa')->count(); $notMapped = collect($hasilEnriched)->where('match_status','NOT_MAPPED')->count(); ?>
❌ Error:
Preview Import
santri 0): ?> Β· ⚑ konflik perlu diselesaikan Β· βœ… Siap disimpan
Hadir
Telat
Alpa
0): ?>
Konflik
0): ?>
Blm Map
0): ?>
Konflik:
← Kembali
Status: addLoop($__currentLoopData); foreach($__currentLoopData as $st => $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> popLoop(); $loop = $__env->getLastLoop(); ?> | β€” = tidak ada data ⚑ Konflik = ada data berbeda, pilih salah satu 0): ?> ⚠️ belum dipetakan β†’ Lengkapi Mapping
addLoop($__currentLoopData); foreach($__currentLoopData as $kg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> popLoop(); $loop = $__env->getLastLoop(); ?> addLoop($__currentLoopData); foreach($__currentLoopData as $tgl => $santriRows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> locale('id')->isoFormat('ddd, D MMM'); $isOdd = ($loop->index % 2 === 1); ?> addLoop($__currentLoopData); foreach($__currentLoopData as $key => $info): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> index % 2 === 0) ? 'white' : '#FAFAFA'; if ($data && $data['match_status'] === 'NOT_MAPPED') $rowBg = '#FFF5F5'; ?> addLoop($__currentLoopData); foreach($__currentLoopData as $kg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> firstWhere('kegiatan_id', $kg['kegiatan_id']) : null; $sf = $row['status_final'] ?? null; $st = $sf ? ($statusStyle[$sf] ?? null) : null; $isConf = $row['is_conflict'] ?? false; $key2 = "{$kg['kegiatan_id']}_{$data['id_santri']}_{$tgl}"; ?> popLoop(); $loop = $__env->getLastLoop(); ?> popLoop(); $loop = $__env->getLastLoop(); ?> popLoop(); $loop = $__env->getLastLoop(); ?> addLoop($__currentLoopData); foreach($__currentLoopData as $kg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> popLoop(); $loop = $__env->getLastLoop(); ?>
Tanggal Santri
first): ?>
⚠ BELUM MAP
β€” '#F9FAFB','c'=>'#6B7280','ic'=>'?']; ?>
πŸ‘†
MesinΒ·
πŸ”’
Β·
⚑ pilih
0): ?> +m
Tanggal Santri
πŸ“Š santri Β· hari βœ… Hadir ⏰ Terlambat ❌ Alpa 0): ?> ⚑ Konflik Toleransi: m sebelum / m sesudah
stopSection(); ?> make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>