@csrf
@method('PUT')
@include("errors.messageFlash")
@include('components.inputs._inputType',[
"for" => null,
"label" => "Título da Notícia",
"name" => "title",
"id" => null,
"required" => false,
"type" => 'text',
"old" => old('title', $noticia->title),
"oninput" => null,
"readonly" => false,
"small" => null,
"placeholder" => null,
])
{{ strlen($noticia->title) }}/85
@include('components.inputs._textarea', [
'label' => 'Resumo',
'name' => 'summary',
'id' => null,
'rows' => 0,
'required' => false,
'height' => '100px',
'class' => null,
'style' => null,
'value' => old('summary', $noticia->summary),
])
{{ strlen($noticia->summary) }}/200
@include('components.inputs._textarea', [
'label' => 'Corpo da Nótícia',
'name' => 'description',
'id' => null,
'rows' => 5,
'required' => false,
'height' => '400px',
'class' => "textarea-body",
'style' => null,
'value' => old('description', $noticia->description),
])
@include('components.inputs._inputType',[
"for" => null,
"label" => "Link Flickr",
"name" => "flickr",
"id" => null,
"required" => false,
"type" => 'url',
"old" => old('flickr', $noticia->flickr),
"oninput" => "javascript:this.value = this.value.toLowerCase()",
"readonly" => false,
"small" => null,
"placeholder" => "https://seulink.com",
])
@if ($noticia->internalPhoto)
@include('components.tables._openPhoto', [
'asset' => $noticia->featuredPhoto,
'alt' => $noticia->title,
'title' => $noticia->title,
'text' => 'Visualizar foto',
'index' => 1,
'style' => "width: 200px",
])
@endif
@include('components.inputs._inputType',[
"for" => null,
"label" => "Foto Destaque",
"name" => "featuredPhoto",
"id" => null,
"required" => false,
"type" => 'file',
"old" => null,
"oninput" => null,
"readonly" => true,
"small" => null,
"accept" => 'image/jpeg,image/jpg,image/png,image/gif',
])
@if ($noticia->internalPhoto)
@include('components.tables._openPhoto', [
'asset' => $noticia->internalPhoto,
'alt' => $noticia->title,
'title' => $noticia->title,
'text' => 'Visualizar foto',
'index' => 2,
'style' => "width: 200px",
])
@endif
@include('components.inputs._inputType',[
"for" => null,
"label" => "Foto Corpo da Notícia",
"name" => "internalPhoto",
"id" => null,
"required" => false,
"type" => 'file',
"old" => null,
"oninput" => null,
"readonly" => true,
"small" => null,
"accept" => 'image/jpeg,image/jpg,image/png,image/gif',
])
@include('components.inputs._selectType', [
"for" => "status",
"label" => "Status",
"name" => "status",
"required" => true,
"readonly" => false,
"options" => collect(App\Enums\StatusEnum::cases())
->mapWithKeys(fn($status) => [$status->name => $status->value])
->toArray(),
"selected" => old('status', $noticia->status ?? ''),
"placeholder" => "Selecione o status...",
"small" => "Informe o status atual do usuário.",
"onchange" => null
])
fix ? 'checked' : '' }}>
@include('components.inputs.inputCheckBoxListNoticias',[
'collection' => $gabinetes,
'title' => '* Pertence ao Gabinete',
'small' => '* selecionar todos os gabinetes',
'id' => 'checkboxGabinetesNoticias',
'onclick' => 'javascript:selectAllCheckboxGabinetesNoticias(this)',
'belongsTo' => $belongsTo,
])
@include('components.inputs.inputCheckBoxListNoticias',[
'collection' => $secretarias,
'title' => '* Pertence as Secretarias',
'small' => '* selecionar todas as secretarias',
'id' => 'checkboxSecretariasNoticias',
'onclick' => 'javascript:selectAllCheckboxSecretariasNoticias(this)',
'belongsTo' => $belongsTo,
])
@include('components.inputs.inputCheckBoxListNoticias',[
'collection' => $executivas,
'title' => '* Pertence as Executivas',
'small' => '* selecionar todas as executivas',
'id' => 'checkboxExecutivasNoticias',
'onclick' => 'javascript:selectAllCheckboxExecutivasNoticias(this)',
'belongsTo' => $belongsTo,
])
@include('components.inputs.inputCheckBoxListNoticias',[
'collection' => $autarquias,
'title' => '* Pertence as Autarquias ou Fundações',
'small' => '* selecionar todos os órgãos',
'id' => 'checkboxAutarquiasNoticias',
'onclick' => 'javascript:selectAllCheckboxAutarquiasNoticias(this)',
'belongsTo' => $belongsTo,
])
@include('components.inputs.inputCheckBoxListCategoriaNoticias',[
'collection' => App\Enums\StatusTagCloudNewsEnum::cases(),
'title' => '* Categorias',
'small' => '* selecionar todas as categorias',
'id' => 'checkboxCategoriasNoticias',
'onclick' => 'javascript:selectAllCheckboxCategoriasNoticias(this)',
'tags' => explode(",", $noticia->tags),
])
@if (auth()->user()->getPermissaoDetalhes("ADMIN"))
@include('components.inputs._textarea', [
'label' => 'Códigos HTML',
'name' => 'code',
'id' => null,
'rows' => 5,
'required' => false,
'height' => '400px',
'class' => null,
'style' => null,
'value' => old('code', $noticia->code),
])
@endif
@include('components.buttons._backAndSend', [
'textBack' => 'Voltar',
'textSend' => 'Enviar',
'routeBack' => 'admin.noticias.index'
]
)