first
This commit is contained in:
70
resources/views/admin/setup/quotas/pusat-index.blade.php
Normal file
70
resources/views/admin/setup/quotas/pusat-index.blade.php
Normal file
@@ -0,0 +1,70 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Kuota Pusat — ' . $pusat->name)
|
||||
|
||||
@section('content')
|
||||
<div class="page-heading">
|
||||
<div class="eyebrow">
|
||||
Setup ·
|
||||
<a href="{{ route('admin.setup.pusat.index') }}">Pusat Mengundi</a> ·
|
||||
<a href="{{ route('admin.setup.pusat.saluran.index', $pusat) }}">{{ $pusat->name }}</a>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between flex-column flex-lg-row gap-3">
|
||||
<div>
|
||||
<h1 class="h3 mb-1">Kuota Jawatan — Peringkat Pusat</h1>
|
||||
<p class="text-secondary mb-0">{{ $pusat->code }} — {{ $pusat->name }} · Saluran 0 (Pusat)</p>
|
||||
</div>
|
||||
<a href="{{ route('admin.setup.pusat.kuota.create', $pusat) }}" class="btn btn-primary">
|
||||
<i class="bi bi-plus-circle me-1"></i>Tambah Kuota
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('admin.setup._nav')
|
||||
|
||||
<div class="content-panel p-3 p-md-4">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Jawatan</th>
|
||||
<x-sort-th column="quota" label="Kuota" class="text-end" />
|
||||
<th class="text-end no-sort">Tindakan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($quotas as $quota)
|
||||
<tr>
|
||||
<td>
|
||||
<span class="fw-semibold">{{ $quota->position?->code }}</span>
|
||||
<div class="small text-secondary">{{ $quota->position?->name }}</div>
|
||||
</td>
|
||||
<td class="text-end fw-semibold">{{ $quota->quota }}</td>
|
||||
<td class="text-end">
|
||||
<a href="{{ route('admin.setup.pusat.kuota.edit', [$pusat, $quota]) }}" class="btn btn-sm btn-outline-secondary">Edit</a>
|
||||
<form method="POST" action="{{ route('admin.setup.pusat.kuota.destroy', [$pusat, $quota]) }}" class="d-inline"
|
||||
onsubmit="return confirm('Padam kuota {{ addslashes($quota->position?->code) }}?')">
|
||||
@csrf @method('DELETE')
|
||||
<button class="btn btn-sm btn-outline-danger" type="submit">Padam</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="3" class="text-center text-secondary py-4">
|
||||
Tiada kuota peringkat pusat. <a href="{{ route('admin.setup.pusat.kuota.create', $pusat) }}">Tambah kuota</a>.
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ $quotas->links() }}
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<a href="{{ route('admin.setup.pusat.saluran.index', $pusat) }}" class="btn btn-outline-secondary">
|
||||
<i class="bi bi-arrow-left me-1"></i>Kembali ke Saluran
|
||||
</a>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user