@extends('backend.layouts.app') @section('title', \App\Http\Helpers\MenuHelper::getPageTitle()) @section('content') @include('backend.module._index-reset-button') @php $input = 'dark:bg-dark-900 shadow-theme-xs focus:border-brand-300 focus:ring-brand-500/10 dark:focus:border-brand-800 h-10 w-full rounded-lg border border-gray-300 bg-transparent px-4 py-2 text-sm text-gray-800 placeholder:text-gray-400 focus:ring-3 focus:outline-hidden dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30'; $select = 'dark:bg-dark-900 shadow-theme-xs focus:border-brand-300 focus:ring-brand-500/10 dark:focus:border-brand-800 h-10 rounded-lg border border-gray-300 bg-transparent px-4 py-2 text-sm text-gray-800 focus:ring-3 focus:outline-hidden dark:border-gray-700 dark:bg-gray-900 dark:text-white/90'; $active = filled($search ?? null) || filled($type ?? null) || filled($dewan ?? null) || filled($category ?? null) || filled($year ?? null) || filled($status ?? null); @endphp

All Parliament Entries

@can('content-parliament-qa.create') Create @endif
@if ($active) Reset @endif
@if(!$type)
Use the Type (and House) filter above to narrow the list, then drag & drop to reorder.
@elseif($type && count($items) <= 1)
Add at least 2 items in this filter to enable drag & drop reordering.
@endif @php $th = 'text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400'; @endphp
@forelse($items as $item) @php $mainTranslation = $item->translations->firstWhere('parliament_qa_translation_main', 1) ?? $item->translations->first(); $itemCategories = $item->categories->pluck('parliament_qa_category_code')->filter()->values(); $statusBadge = match ($item->parliament_qa_status) { 'PUBLISHED' => 'bg-success-50 text-success-600 dark:bg-success-500/10 dark:text-success-400', 'DRAFT' => 'bg-warning-50 text-warning-600 dark:bg-warning-500/10 dark:text-warning-400', default => 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-300', }; @endphp @empty @endforelse
# Title Type House Session Category Member Date Status Sort Actions
@if($type) @if(count($items) > 1) @else @endif @else @endif {{ ($items->currentPage() - 1) * $items->perPage() + $loop->iteration }} {{ $mainTranslation->parliament_qa_translation_title ?? '-' }} @if($item->translations->count() > 1) {{ $item->translations->count() }} languages @endif {{ $types[$item->parliament_qa_type] ?? ($item->parliament_qa_type ?: '-') }} @if($item->parliament_qa_question_type) {{ $questionTypes[$item->parliament_qa_question_type] ?? $item->parliament_qa_question_type }} @endif {{ $dewans[$item->parliament_qa_dewan] ?? ($item->parliament_qa_dewan ?: '-') }} {{ $item->parliament_qa_parlimen ?? '-' }} / {{ $item->parliament_qa_penggal ?? '-' }} / {{ $item->parliament_qa_sesi ?? '-' }} @if($item->parliament_qa_no) No. {{ $item->parliament_qa_no }} @endif @forelse($itemCategories->take(2) as $code) {{ $categories[$code] ?? $code }} @empty - @endforelse @if($itemCategories->count() > 2) +{{ $itemCategories->count() - 2 }} @endif {{ $item->parliament_qa_member ?: '-' }} @if($item->parliament_qa_area) {{ $item->parliament_qa_area }} @endif {{ $item->parliament_qa_date?->format('d/m/Y') ?? '-' }} {{ $statuses[$item->parliament_qa_status] ?? ($item->parliament_qa_status ?: '-') }} {{ $item->parliament_qa_sort ?? '-' }}
@can('content-parliament-qa.update') @endcan @can('content-parliament-qa.delete')
{!! csrf_field() !!} {!! method_field('DELETE') !!}
@endcan

No entries found

Click "Create" to add your first entry.

{{ $items->appends(request()->query())->links('vendor.pagination.custom') }}
@endsection @push('scripts') @endpush