@php $inputClass = 'dark:bg-dark-900 shadow-theme-xs focus:border-brand-300 focus:ring-brand-500/10 dark:focus:border-brand-800 h-11 w-full rounded-lg border bg-transparent px-4 py-2.5 text-sm text-gray-800 placeholder:text-gray-400 focus:ring-3 focus:outline-hidden dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30'; $selectClass = 'dark:bg-dark-900 shadow-theme-xs focus:border-brand-300 focus:ring-brand-500/10 dark:focus:border-brand-800 h-11 w-full appearance-none rounded-lg border bg-transparent px-4 py-2.5 text-sm text-gray-800 focus:ring-3 focus:outline-hidden dark:bg-gray-900 dark:text-white/90'; $labelClass = 'mb-1.5 block text-sm font-medium text-gray-700 dark:text-gray-400'; $errorClass = 'border-error-300 focus:border-error-300 focus:ring-error-500/10 dark:border-error-700'; $normalClass = 'border-gray-300 dark:border-gray-700'; $textAreaClass = 'dark:bg-dark-900 shadow-theme-xs focus:border-brand-300 focus:ring-brand-500/10 dark:focus:border-brand-800 w-full rounded-lg border bg-transparent px-4 py-2.5 text-sm text-gray-800 placeholder:text-gray-400 focus:ring-3 focus:outline-hidden dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30'; $item = $item ?? null; $savedTranslations = $item?->translations ?? collect(); $selectedCategories = old('categories', $item?->categoryCodes() ?? []); @endphp

Translations

@php $firstLang = array_key_first($languages); $mainLangCode = $firstLang; foreach ($languages as $code => $descr) { if (old('translations.' . $code . '.main')) { $mainLangCode = $code; break; } } if (! old('translations') && $savedTranslations->isNotEmpty()) { $savedMain = $savedTranslations->firstWhere('parliament_qa_translation_main', 1); $mainLangCode = $savedMain?->parliament_qa_translation_language ?? $firstLang; } $titleErrorLang = null; foreach ($languages as $code => $descr) { if ($errors->has('translations.' . $code . '.title')) { $titleErrorLang = $code; break; } } $initialLang = $titleErrorLang ?? $mainLangCode; @endphp
@foreach($languages as $code => $descr) @php $savedTranslation = $savedTranslations->firstWhere('parliament_qa_translation_language', $code); @endphp
@error('translations.' . $code . '.title')

{{ $message }}

@enderror
@endforeach
@foreach($languages as $code => $descr) @php $savedTranslation = $savedTranslations->firstWhere('parliament_qa_translation_language', $code); @endphp
@error('translations.' . $code . '.question')

{{ $message }}

@enderror
@endforeach
@foreach($languages as $code => $descr) @php $savedTranslation = $savedTranslations->firstWhere('parliament_qa_translation_language', $code); @endphp
@error('translations.' . $code . '.answer')

{{ $message }}

@enderror
@endforeach
@foreach($languages as $code => $descr)
@endforeach

Parliament Information

@include('backend.module.parliamentQa.partials._select', [ 'name' => 'parliament_qa_type', 'label' => 'Type', 'options' => $types, 'selected' => old('parliament_qa_type', $item->parliament_qa_type ?? ''), 'placeholder' => '-- Select Type --', 'required' => true, ]) @include('backend.module.parliamentQa.partials._select', [ 'id' => 'question-type-field', 'name' => 'parliament_qa_question_type', 'label' => 'Question Type', 'options' => $questionTypes, 'selected' => old('parliament_qa_question_type', $item->parliament_qa_question_type ?? ''), 'placeholder' => '-- Select Question Type --', 'required' => old('parliament_qa_type', $item->parliament_qa_type ?? '') === 'SOAL_JAWAB', ]) @include('backend.module.parliamentQa.partials._select', [ 'name' => 'parliament_qa_dewan', 'label' => 'House (Dewan)', 'options' => $dewans, 'selected' => old('parliament_qa_dewan', $item->parliament_qa_dewan ?? ''), 'placeholder' => '-- Select House --', 'required' => true, ])
@error('parliament_qa_parlimen')

{{ $message }}

@enderror
@error('parliament_qa_penggal')

{{ $message }}

@enderror
@error('parliament_qa_sesi')

{{ $message }}

@enderror
@include('backend.module.parliamentQa.partials._date-input', [ 'name' => 'parliament_qa_date', 'value' => old('parliament_qa_date', $item?->parliament_qa_date?->format('Y-m-d') ?? ''), ]) @error('parliament_qa_date')

{{ $message }}

@enderror
@error('parliament_qa_year')

{{ $message }}

@enderror
@error('parliament_qa_no')

{{ $message }}

@enderror
@error('parliament_qa_member')

{{ $message }}

@enderror
@error('parliament_qa_area')

{{ $message }}

@enderror
@error('parliament_qa_minister')

{{ $message }}

@enderror
@foreach($categories as $code => $descr) @endforeach
@error('categories')

{{ $message }}

@enderror @error('categories.*')

{{ $message }}

@enderror
@include('backend.module.parliamentQa.partials._select', [ 'name' => 'parliament_qa_status', 'label' => 'Status', 'options' => $statuses, 'selected' => old('parliament_qa_status', $item->parliament_qa_status ?? ''), 'placeholder' => '-- Select Status --', 'required' => true, 'firstWhenEmpty' => true, ])
@error('parliament_qa_sort')

{{ $message }}

@enderror

Leave as 0 to append at the end of the same session.

Answer File

Answer PDF Optional
@if(! empty($item?->parliament_qa_file)) @endif
@error('parliament_qa_file')

{{ $message }}

@enderror

PDF · max 15MB

Attachments

Extra documents for this entry (e.g. bill papers, full written answer).

@if (isset($item) && $item->documents->isNotEmpty()) @endif

PDF, Word, Excel or ZIP · max 15MB per file · up to 20 files at a time

@error('attachments')

{{ $message }}

@enderror @error('attachments.*')

{{ $message }}

@enderror
@push('scripts') @endpush