first commit
This commit is contained in:
35
resources/views/checklist/templates/index.blade.php
Normal file
35
resources/views/checklist/templates/index.blade.php
Normal file
@@ -0,0 +1,35 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', 'Templat Senarai Semak')
|
||||
@section('heading', 'Templat Senarai Semak')
|
||||
@section('page-title', 'Templat Senarai Semak')
|
||||
@section('subtitle', 'Reka bentuk borang senarai semak secara dinamik — JPP boleh ubah seksyen, item & formula tanpa perubahan kod.')
|
||||
|
||||
@section('actions')
|
||||
<a href="{{ route('checklist-templates.create') }}" class="btn btn-success"><i class="bi bi-plus-lg me-1"></i> Templat Baharu</a>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card"><div class="card-body p-0">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<thead><tr><th class="ps-3">Nama Templat</th><th>Versi</th><th>Seksyen</th><th>Status</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
@forelse ($templates as $t)
|
||||
<tr>
|
||||
<td class="ps-3 fw-semibold">{{ $t->name }}</td>
|
||||
<td>{{ $t->version }}</td>
|
||||
<td><span class="badge bg-light text-dark">{{ $t->sections_count }}</span></td>
|
||||
<td>@if($t->is_active)<span class="badge bg-success">Aktif</span>@else<span class="badge bg-secondary">Tidak Aktif</span>@endif</td>
|
||||
<td class="text-end pe-3">
|
||||
<a href="{{ route('checklist-templates.builder', $t) }}" class="btn btn-sm btn-primary"><i class="bi bi-tools me-1"></i> Bina</a>
|
||||
@unless($t->is_active)
|
||||
<form method="POST" action="{{ route('checklist-templates.activate', $t) }}" class="d-inline">@csrf<button class="btn btn-sm btn-outline-success">Aktifkan</button></form>
|
||||
@endunless
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="5" class="text-center text-muted py-3">Tiada templat.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div></div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user