@extends('layouts.site') @php $my_name_view = 'SZKOL - Lista pytan'; $my_short_view_name = 'Lista pytan'; @endphp @section('title', 'SZKOL - Lista pytan') @php $questionTypeOptions = [ 'single_choice' => 'Jednokrotny wybor', 'multiple_choice' => 'Wielokrotny wybor', 'true_false' => 'Prawda/Falsz', 'short_answer' => 'Krotka odpowiedz', 'matching' => 'Dopasowywanie', ]; $columns = [ [ 'key' => 'id', 'label' => 'ID', 'field' => 'id', 'sort' => 'id', 'search_field' => 'id', 'align' => 'center', 'width' => '6rem', 'checked' => true, ], [ 'key' => 'nazwa', 'label' => 'Nazwa / Tresc', 'field' => 'nazwa_label', 'sort' => 'nazwa', 'search_field' => 'nazwa_or_tresc', 'align' => 'left', 'checked' => true, ], [ 'key' => 'typ_pytania', 'label' => 'Typ', 'field' => 'typ_pytania_label', 'sort' => 'typ_pytania', 'search_field' => 'typ_pytania', 'align' => 'center', 'width' => '12rem', 'checked' => true, ], [ 'key' => 'kategoria_nazwa', 'label' => 'Kategoria', 'field' => 'kategoria_nazwa', 'sort' => 'kategoria_nazwa', 'search_field' => 'kategoria_nazwa', 'align' => 'left', 'checked' => true, ], [ 'key' => 'status_aktywny', 'label' => 'Status', 'field' => 'status_aktywny_label', 'sort' => 'status_aktywny', 'search_field' => 'status_aktywny', 'align' => 'center', 'width' => '10rem', 'checked' => true, ], [ 'key' => 'has_image', 'label' => 'Grafika', 'field' => 'has_image_icon', 'sort' => 'has_image', 'search_field' => 'has_image', 'align' => 'center', 'width' => '9rem', 'html' => true, 'checked' => true, ], [ 'key' => 'updated_at', 'label' => 'Modyfikacja', 'field' => 'updated_at', 'sort' => 'updated_at', 'search_field' => 'updated_at', 'align' => 'center', 'width' => '13rem', 'nowrap' => true, 'checked' => true, ], ]; $categoryOptions = []; foreach ($categories as $category) { $categoryOptions[(string) $category->id] = (string) $category->nazwa; } $filters = [ [ 'key' => 'typ_pytania', 'label' => 'Typ', 'type' => 'select', 'placeholder' => '-- wszystkie --', 'options' => $questionTypeOptions, 'value' => '', ], [ 'key' => 'id_kategoria', 'label' => 'Kategoria', 'type' => 'select', 'placeholder' => '-- wszystkie --', 'options' => $categoryOptions, 'value' => '', ], [ 'key' => 'status_aktywny', 'label' => 'Status', 'type' => 'select', 'placeholder' => '-- wszystkie --', 'options' => [ '1' => 'Aktywne', '0' => 'Nieaktywne', ], 'value' => '', ], [ 'key' => 'has_image', 'label' => 'Grafika', 'type' => 'select', 'placeholder' => '-- wszystkie --', 'options' => [ '1' => 'Z grafika', '0' => 'Bez grafiki', ], 'value' => '', ], ]; $routes = [ 'list' => route('m_szkol_baza_pytan_component_list'), ]; @endphp @section('content') @endsection @section('navbar') @include('sites.szkol._navbar_szkol') @endsection @section('menu') @include('sites.szkol.menu_szkol') @endsection @push('scripts') @endpush