@extends('layouts.admin.theme') @section("title", env("APP_NAME") . " :: Atualizar Banner") @section('content')
@include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => __("Atualizar Banner"), 'routeBack' => 'admin.banners.index', 'routeBackParams' => [], 'nameBack' => __("Voltar"), ])
id) }}'> @csrf @method('patch') @include("errors.messageFlash")
@include('components.inputs._inputType',[ "for" => null, "label" => "Titulo ou nome da campanha", "name" => "title", "id" => null, "required" => true, "type" => "text", "old" => old('order', $banner->title), "oninput" => null, "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Link", "name" => "url", "id" => null, "required" => true, "type" => "url", "old" => old('order', $banner->url), "oninput" => null, "readonly" => false, "small" => null, ])
@include('components.inputs._selectType', [ "for" => "target", "label" => "Tipo de link", "name" => "target", "required" => true, "readonly" => false, "options" => collect(App\Enums\StatusLinkEnum::cases()) ->mapWithKeys(fn($status) => [$status->name => $status->value]) ->toArray(), "selected" => old('section', $banner->target ?? ''), "placeholder" => "Selecione um tipo...", "small" => "Informe o tipo de link.", "onchange" => null ])
@include('components.tables._openPhoto', [ 'asset' => $banner->photo ?? "pmar/assets/img/icons/photoLG-940x130px.png", 'alt' => $banner->title, 'title' => $banner->title, 'text' => 'Visualizar foto', 'style' => 'width: 900px', 'index' => 1, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Banner Large (940px x 130px)", "name" => "photo", "id" => null, "required" => true, "type" => 'file', "old" => null, "oninput" => null, "readonly" => true, "small" => null, "accept" => 'image/jpeg,image/jpg,image/png,image/gif', ])
@include('components.tables._openPhoto', [ 'asset' => $banner->photoMD ?? "pmar/assets/img/icons/photoMD-1024x600px.png", 'alt' => $banner->title, 'title' => $banner->title, 'text' => 'Visualizar foto', 'style' => 'width: 500px', 'index' => 2, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Banner Médio (1024px x 600px)", "name" => "photoMD", "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.tables._openPhoto', [ 'asset' => $banner->photoSM ?? "pmar/assets/img/icons/photoSM-1080x1350px.png", 'alt' => $banner->title, 'title' => $banner->title, 'text' => 'Visualizar foto', 'style' => 'width: 300px', 'index' => 3, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Banner Small (1080px x 1350px)", "name" => "photoSM", "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._inputType',[ "for" => null, "label" => "Ordem de exibição", "name" => "order", "id" => null, "required" => true, "type" => null, "old" => old('order', $banner->order), "oninput" => "javascript:this.value = this.value.replace(/\D/g, '')", "readonly" => false, "small" => null, ])
@include('components.inputs._selectType', [ "for" => "section", "label" => "Exibição em", "name" => "section", "required" => true, "readonly" => false, "options" => collect(App\Enums\StatusSectionBanner::cases()) ->mapWithKeys(fn($status) => [$status->name => $status->value]) ->toArray(), "selected" => old('section', $banner->section ?? ''), "placeholder" => "Selecione uma seção...", "small" => "Informe a seção onde o banner deverá aparecer.", "onchange" => null ])
@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', $banner->status ?? ''), "placeholder" => "Selecione o status...", "small" => "Informe o status atual do usuário.", "onchange" => null ])
@include('components.buttons._backAndSend', [ 'url' => 'admin.banners.index', 'textBack' => 'Voltar', 'textSend' => 'Atualizar', 'routeBack' => 'admin.banners.index' ] )
@endsection