53 lines
2.5 KiB
PHP
53 lines
2.5 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', 'Dashboard Kehadiran')
|
|
|
|
@section('content')
|
|
<div class="page-heading">
|
|
<div class="eyebrow">Admin</div>
|
|
<h1 class="h3 mb-1">Dashboard Kehadiran</h1>
|
|
<p class="text-secondary mb-0">Ringkasan kehadiran mengikut Pusat Mengundi.</p>
|
|
</div>
|
|
|
|
<div class="content-panel p-0 overflow-hidden">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle mb-0">
|
|
<thead>
|
|
<tr>
|
|
<x-sort-th column="name" label="Pusat Mengundi" />
|
|
<th>Staf</th>
|
|
<th>Hadir</th>
|
|
<th>Tidak Hadir</th>
|
|
<th>Belum Rekod</th>
|
|
<th>Status Modul</th>
|
|
<th class="text-end no-sort">Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($pusats as $pusat)
|
|
@php($summary = $summaryService->totalsForPusat($pusat))
|
|
<tr>
|
|
<td>
|
|
<div class="fw-semibold">{{ $pusat->code }} - {{ $pusat->name }}</div>
|
|
<div class="small text-secondary">{{ $pusat->election?->name }}</div>
|
|
</td>
|
|
<td>{{ $summary['total_staff'] }}</td>
|
|
<td><span class="badge text-bg-success">{{ $summary['present'] }}</span></td>
|
|
<td><span class="badge text-bg-danger">{{ $summary['absent'] }}</span></td>
|
|
<td><span class="badge text-bg-warning">{{ $summary['not_recorded'] }}</span></td>
|
|
<td><span class="badge {{ $pusat->election?->settings?->is_attendance_active ? 'text-bg-success' : 'text-bg-secondary' }}">{{ $pusat->election?->settings?->is_attendance_active ? 'Aktif' : 'Belum aktif' }}</span></td>
|
|
<td class="text-end">
|
|
<a class="btn btn-sm btn-outline-primary" href="{{ route('admin.attendance.show', $pusat) }}">Detail</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="7" class="text-center text-secondary py-4">Tiada Pusat Mengundi.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3">{{ $pusats->links() }}</div>
|
|
@endsection
|