@php $empresa = $empresaTurismo->companhia @endphp @extends('layouts.admin.theme') @section("title", env("APP_NAME") . " :: Nova Embarcação" . $empresa->razaoSocial) @section('content')
@php $header = "Nova Embarcação da empresa {$empresa->razaoSocial}

CNPJ: {$empresa->cnpj}

"; @endphp @include('components.buttons._headLineButtonsBackAdd', [ 'headLine' => __($header), 'routeBack' => 'admin.embarcacoes.index', 'routeBackParams' => [$empresaTurismo->id], 'nameBack' => __("Voltar"), ])
@csrf @include("errors.messageFlash")
@include('components.inputs._selectType', [ "for" => "categoria", "label" => "Categoria", "name" => "categoria", "required" => true, "readonly" => false, "options" => collect(App\Enums\StatusTipoCategoriaEmbarcacoesNavegueLegal::cases()) ->mapWithKeys(fn($status) => [$status->name => $status->value]) ->toArray(), "selected" => old('categoria'), "placeholder" => "Selecione a categoria...", "small" => "Informe categoria atual do cadastro.", "onchange" => "javascript:toggleEmbarcacaoAndBoats(this)" ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Embarcação nome", "name" => "nome", "id" => null, "required" => true, "type" => null, "old" => old('nome'), "oninput" => "javascript:this.value = this.value.toUpperCase()", "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Inscrição na Capitania", "name" => "inscricao", "id" => null, "required" => true, "type" => null, "old" => old('inscricao'), "oninput" => "javascript:this.value = this.value.replace(/\D/g, '')", "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Apólice de Seguro / RCI", "name" => "rci", "id" => null, "required" => true, "type" => null, "old" => old('rci'), "oninput" => "javascript:this.value = this.value.toUpperCase()", "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "TIE", "name" => "tie", "id" => null, "required" => false, "type" => null, "old" => old('tie'), "oninput" => "javascript:this.value = this.value.replace(/\D/g, '')", "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Validade TIE", "name" => "validadeTie", "id" => null, "required" => false, "type" => "date", "old" => old('validadeTie'), "oninput" => "", "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Marinheiro nome", "name" => "nomeMarinheiro", "id" => null, "required" => true, "type" => null, "old" => old('nomeMarinheiro'), "oninput" => "javascript:this.value = this.value.toLocaleUpperCase('pt-BR').replace(/[^\p{L}\s]+/gu, '').replace(/\s{2,}/g,' ').trimStart()", "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Marinheiro documento", "name" => "documentoMarinheiro", "id" => null, "required" => true, "type" => null, "old" => old('documentoMarinheiro'), "oninput" => "javascript:this.value = this.value.replace(/\D/g, '')", "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Marinheiro documento validade", "name" => "validadeDocumentoMarinheiro", "id" => null, "required" => true, "type" => "date", "old" => old('validadeDocumentoMarinheiro'), "oninput" => "", "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Capacidade da embarcação", "name" => "capacidade", "id" => null, "required" => true, "type" => null, "old" => old('capacidade'), "oninput" => "javascript:this.value = this.value.replace(/\D/g, '')", "readonly" => false, "small" => null, ])
@foreach(App\Enums\StatusTipoBoatsNavegueLegal::cases() as $status) @endforeach
@foreach(App\Enums\StatusTipoEmbarcacoesNavegueLegal::cases() as $status) @endforeach
@include('components.inputs._selectType', [ "for" => "tipo", "label" => "Tipo de Embarcação", "name" => "tipo", "id" => "tiposEmbarcacaoAndBoats", "required" => true, "readonly" => false, "options" => collect(App\Enums\StatusTipoBoatsNavegueLegal::cases()) ->mapWithKeys(fn($status) => [$status->name => $status->value]) ->toArray(), "selected" => old('tipo'), "placeholder" => "Selecione o tipo...", "small" => "Informe o tipo da embarcação para o cadastro.", "onchange" => null ])
@include('components.inputs._selectType', [ "for" => "areaNavegacao", "label" => "Área de Navegação", "name" => "areaNavegacao", "id" => null, "required" => true, "readonly" => false, "options" => collect(App\Enums\StatusTipoAreaDeNavegacao::cases()) ->mapWithKeys(fn($status) => [$status->name => $status->value]) ->toArray(), "selected" => old('areaNavegacao'), "placeholder" => "Selecione a área de navegação...", "small" => "Informe a área de navegação da embracação para o cadastro.", "onchange" => null ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Ano de Construção", "name" => "anoConstrucao", "id" => null, "required" => true, "type" => null, "old" => old('anoConstrucao'), "oninput" => "javascript:this.value = this.value.replace(/\D/g, '')", "readonly" => false, "small" => null, ])
@include('components.inputs._inputType',[ "for" => null, "label" => "Selo", "name" => "selo", "id" => null, "required" => true, "type" => null, "old" => old('selo'), "oninput" => "javascript:this.value = this.value.replace(/\D/g, '')", "readonly" => false, "small" => null, ])
@include('components.inputs._textarea', [ 'label' => 'Descreva a atividade desta embarcação', 'name' => 'atividade', 'id' => null, 'rows' => 0, 'required' => false, 'height' => '100px', 'class' => null, 'style' => null, 'value' => old('atividade'), ])
@include('components.inputs._selectType', [ "for" => "status", "label" => "Status do cadastro", "name" => "status", "required" => true, "readonly" => false, "options" => collect(App\Enums\StatusEnum::cases()) ->mapWithKeys(fn($status) => [$status->name => $status->value]) ->toArray(), "selected" => old('status'), "placeholder" => "Selecione o status...", "small" => "Informe o status atual do cadastro.", "onchange" => null ])
@include('components.buttons._backAndSend', [ 'textBack' => 'Voltar', 'textSend' => 'Cadastrar', 'routeBack' => 'admin.embarcacoes.index', 'backId' => $empresaTurismo->id ] )
@endsection