@include('components.inputs._selectType', [
'for' => 'structure_id',
'label' => __('Secretaria'),
'name' => 'structure_id',
'id' => 'structureSelect',
'required' => false,
'readonly' => false,
'placeholder' => __('Selecione a secretaria (opcional)...'),
'options' => $secretarias->mapWithKeys(
fn($s) => [$s->id => "{$s->abbreviation} — {$s->name}"]
)->toArray(),
'selected' => old('structure_id', $unidade->structure_id),
'small' => __('Opcional. Secretaria à qual esta unidade pertence.'),
])
@include('components.inputs._inputType', [
'for' => null,
'label' => __('Sigla'),
'name' => 'abbreviation',
'id' => null,
'required' => true,
'type' => null,
'old' => old('abbreviation', $unidade->abbreviation),
'oninput' => "javascript:this.value = this.value.toUpperCase().replace(/[^A-Z0-9\/\-]/g, '')",
'readonly' => false,
'small' => __('Ex.: CTSIS, DTIC, SADT. Será convertida para maiúsculas automaticamente.'),
])
@include('components.inputs._inputType', [
'for' => null,
'label' => __('Nome da Unidade'),
'name' => 'name',
'id' => null,
'required' => true,
'type' => null,
'old' => old('name', $unidade->name),
'oninput' => null,
'readonly' => false,
'small' => __('Ex.: Coordenação Técnica de Sistemas Informatizados.'),
])
@include('components.inputs._selectType', [
'for' => 'status',
'label' => __('Status'),
'name' => 'status',
'required' => true,
'readonly' => false,
'placeholder' => __('Selecione o status...'),
'options' => collect(App\Enums\StatusEnum::cases())
->mapWithKeys(fn($s) => [$s->name => $s->value])
->toArray(),
'selected' => old('status', $unidade->status),
'small' => null,
])