{{-- resources/views/pages/expert-categories/create.blade.php --}} @extends('layouts.app') @section('css') @endsection @section('js') @endsection @push('pageTitle') {{ isset($expertCategory) ? __('labels.edit_category') : __('labels.create_category') }} @endpush @section('content') @include('components.common.page-header', [ 'pageTitle' => isset($expertCategory) ? __('labels.edit_category') : __('labels.create_category'), 'actionButton' => [ 'url' => route('expert-categories.index'), 'text' => __('labels.back_to_categories'), ], ]) @include('components.common.flush-message') @include('components.common.validation-errors')
@csrf @if (isset($expertCategory)) @method('PUT') @endif
{{ __('labels.basic_information') }}
{{-- Category Name --}}
@error('name')
{{ $message }}
@enderror
{{-- Slug --}}
{{ url('/expert-categories/') }}/
{{ __('labels.leave_empty_for_auto') }} @error('slug')
{{ $message }}
@enderror
{{-- Description --}}
@error('description')
{{ $message }}
@enderror
@include('components.form.pick-color', [ 'name' => 'color', 'selectedValue' => $expertCategory->color ?? null, 'required' => false, ])
@include('components.form.select-icons', [ 'name' => 'icon', 'selectedValue' => $expertCategory->icon ?? null, 'required' => false, ])
{{ __('labels.settings') }}
is_active ?? true))>
@error('is_active')
{{ $message }}
@enderror {{-- {{ __('labels.status_help_text') }} --}}
@error('sort_order')
{{ $message }}
@enderror
@if (isset($expertCategory) && isset($readonly) && $readonly)
{{ $expertCategory->threads_count ?? 0 }}
{{ __('labels.threads') }}
{{ $expertCategory->active_threads_count ?? 0 }}
{{ __('labels.active') }}
@if ($expertCategory->created_at)
{{ __('labels.created') }}: {{ $expertCategory->created_at->format('d.m.Y') }}
@endif
@endif
@if (isset($expertCategory) && $expertCategory->created_at)
{{ __('labels.audit_trail') }}
{{ __('labels.created') }}: {{ $expertCategory->created_at->format('d.m.Y H:i') }}
@if ($expertCategory->createdBy)
{{ __('labels.created_by') }}: {{ $expertCategory->createdBy->name ?? 'N/A' }}
@endif @if ($expertCategory->updated_at && $expertCategory->updated_at != $expertCategory->created_at)
{{ __('labels.last_updated') }}: {{ $expertCategory->updated_at->format('d.m.Y H:i') }}
@endif
@endif
@if (!isset($readonly) || (isset($readonly) && !$readonly))
{{ __('labels.cancel') }}
@endif
@endsection