@extends('layouts.app') @section('title', (isset($item) && is_object($item)) ? 'Edit '.$cfg['entity_label'] : 'Add '.$cfg['entity_label']) @section('contents')
@php $resource = str_replace('.index', '', $cfg['index_route']); $nameField = $cfg['name_field'] ?? 'name'; $nameValue = old($nameField, $item?->{$nameField} ?? $item?->name ?? ''); @endphp
@csrf @if (isset($item) && is_object($item)) @method('PUT') @endif

{{ (isset($item) && is_object($item)) ? 'Edit' : 'Add' }} {{ $cfg['entity_label'] }}

@if ($cfg['show_category'] ?? false)
@endif @if ($cfg['show_parent'] ?? false)
Leave blank for top-level category.
@endif @if ($cfg['show_code'] ?? false)
@if ($cfg['show_parent'] ?? false) Optional leaf code shown in reports (e.g. SS1E, USP). @else Lowercase letters, numbers, underscores only. @endif
@endif @if ($cfg['show_rows_key'] ?? false)
Payload key for checklist rows (e.g. roads_rows).
@endif @if ($cfg['show_checklist_heading'] ?? false)
Optional panel title in the report wizard. Leave blank to auto-generate from label.
@endif @if ($cfg['show_has_remarks'] ?? false)
@endif
@if ($nameField === 'label') @else @endif
@if ($cfg['show_sort_order'] ?? false)
@endif
@if ($cfg['show_standard'] ?? false)
Optional standard code shown in the report (e.g. IS).
@endif @if ($cfg['show_found_places_hint'] ?? false)
Optional label for the “Found in # of Places” cell (e.g. Quantity in Tons).
@endif
@endsection