82 lines
3.8 KiB
PHP
82 lines
3.8 KiB
PHP
@extends('admin.layouts.app')
|
|
@section('title', 'Periode Seleksi')
|
|
|
|
@section('content')
|
|
<div class="card">
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
<span><i class="bi bi-calendar3 me-2"></i>Periode Seleksi</span>
|
|
<a href="{{ route('admin.periode.create') }}" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-plus-circle me-1"></i>Tambah Periode
|
|
</a>
|
|
</div>
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Nama Periode</th>
|
|
<th>Tanggal Mulai</th>
|
|
<th>Tanggal Selesai</th>
|
|
<th>Kuota</th>
|
|
<th>Status</th>
|
|
<th>Aksi</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($periode as $i => $p)
|
|
<tr>
|
|
<td>{{ $periode->firstItem() + $i }}</td>
|
|
<td class="fw-semibold">{{ $p->nama }}</td>
|
|
<td>{{ \Carbon\Carbon::parse($p->tanggal_mulai)->format('d/m/Y') }}</td>
|
|
<td>{{ \Carbon\Carbon::parse($p->tanggal_selesai)->format('d/m/Y') }}</td>
|
|
<td>{{ $p->kuota_penerima }} orang</td>
|
|
<td>
|
|
@if($p->status === 'aktif')
|
|
<span class="badge bg-success">Aktif</span>
|
|
@elseif($p->status === 'selesai')
|
|
<span class="badge bg-primary">Selesai</span>
|
|
@else
|
|
<span class="badge bg-secondary">Draft</span>
|
|
@endif
|
|
</td>
|
|
<td>
|
|
<div class="d-flex gap-1">
|
|
<a href="{{ route('admin.saw.index', $p) }}" class="btn btn-sm btn-success" title="Proses SAW">
|
|
<i class="bi bi-calculator"></i>
|
|
</a>
|
|
@if($p->status === 'selesai')
|
|
<button class="btn btn-sm btn-outline-secondary" disabled title="Periode Selesai (Dikunci)">
|
|
<i class="bi bi-pencil"></i>
|
|
</button>
|
|
@else
|
|
<a href="{{ route('admin.periode.edit', $p) }}" class="btn btn-sm btn-outline-primary" title="Edit">
|
|
<i class="bi bi-pencil"></i>
|
|
</a>
|
|
@endif
|
|
<form action="{{ route('admin.periode.destroy', $p) }}" method="POST" onsubmit="return confirm('Hapus periode ini?')">
|
|
@csrf @method('DELETE')
|
|
<button class="btn btn-sm btn-outline-danger" title="Hapus">
|
|
<i class="bi bi-trash"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="7" class="text-center text-muted py-4">
|
|
<i class="bi bi-inbox fs-4 d-block mb-2"></i>
|
|
Belum ada periode seleksi.
|
|
</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@if($periode->hasPages())
|
|
<div class="p-3">{{ $periode->links() }}</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endsection |