@php
$tones = [
'primary' => ['ic' => 'bg-primary/10 text-primary', 'amt' => 'text-primary', 'accent' => 'accent-primary', 'card' => 'has-checked:border-primary/50 has-checked:bg-primary/5 hover:border-primary/40'],
'secondary' => ['ic' => 'bg-secondary/10 text-secondary', 'amt' => 'text-secondary', 'accent' => 'accent-secondary', 'card' => 'has-checked:border-secondary/50 has-checked:bg-secondary/5 hover:border-secondary/40'],
'success' => ['ic' => 'bg-success/10 text-success', 'amt' => 'text-success', 'accent' => 'accent-success', 'card' => 'has-checked:border-success/50 has-checked:bg-success/5 hover:border-success/40'],
'warning' => ['ic' => 'bg-warning/10 text-warning', 'amt' => 'text-warning', 'accent' => 'accent-warning', 'card' => 'has-checked:border-warning/50 has-checked:bg-warning/5 hover:border-warning/40'],
'muted' => ['ic' => 'bg-muted/10 text-muted', 'amt' => 'text-muted', 'accent' => 'accent-muted', 'card' => 'has-checked:border-muted/50 has-checked:bg-muted/5 hover:border-muted/40'],
];
$toneFor = fn (string $c) => $tones[match ($c) {
'primary' => 'primary', 'info' => 'secondary', 'success' => 'success', 'warning' => 'warning', default => 'muted',
}];
@endphp
recompute())">
{{-- Back --}}
Kembali ke daftar
{{-- Hero header --}}
Mode Kolektif
Batch Potong Gaji per OPD
Tarik anggota aktif satu OPD, atur jenis simpanan & nominalnya, lalu setor sekaligus dalam satu proses.
{{-- KIRI --}}
{{-- Card: OPD & periode --}}
Pilih OPD & Periode
@error('agency_id')
{{ $message }}
@enderror
! $errors->has('period_month'),
'border-danger focus-visible:ring-danger' => $errors->has('period_month'),
])>
@error('period_month')
{{ $message }}
@else
Anggota yang sudah disetor periode ini dilewati otomatis.
@enderror
{{-- Card: anggota --}}
Anggota Aktif
@if (! empty($rows))
0 dari {{ $memberCount }} ikut
@endif
@if (blank($agency_id))
Pilih OPD dulu
Daftar anggota aktif beserta jenis simpanannya akan muncul setelah OPD dipilih.
@elseif (empty($rows))
Tidak ada anggota berstatus Aktif di OPD ini.
@else
@foreach ($rows as $i => $row)
{{-- Header anggota + checkbox ikut --}}
{{-- Jenis simpanan per anggota (tampil bila "Ikut") --}}
@foreach ($row['lines'] as $j => $line)
@php($type = $line['savings_type'])
@php($done = $line['done'] ?? false)
@php($locked = $this->isLocked($type))
@php($t = $toneFor($this->typeColor($type)))
@if ($done)
{{-- Sudah disetor → terkunci --}}
{{ $line['type_label'] }}
Sudah disetor
@else
{{-- Toggle jenis = checkbox biasa --}}
@unless ($locked)
@endunless
@endif
@endforeach
@endforeach
@endif
{{-- KANAN: ringkasan sticky --}}
Total Potong Gaji
Rp 0
0 anggota · 0 setoran
@if ($this->canExport())
@if (blank($agency_id))
Export Rekap (CSV)
@else
{{-- GET route → download CSV andal (bukan via aksi Livewire). --}}
Export Rekap (CSV)
@endif
@endif
Metode Potong Gaji, disetor oleh Bendahara. Jenis sudah disetor periode ini otomatis dilewati.