@extends('layouts.app') @section('titulo', (!$model->exists ? 'Creando' : 'Editando') . ' Cliente') @php $manual = true; @endphp @section('content')
Datos del cliente
{{ html()->modelForm($model, !$model->exists ? 'POST' : 'PATCH', !$model->exists ? route('gestion.clientes.store') : route('gestion.clientes.update', $model->id))->open() }}
{{ html()->text('Nombre')->class('form-control')->attributes(['oninput' => 'this.value = this.value.toUpperCase()']) }}
{{ html()->text('RTN')->class('form-control') }}
{{ html()->text('Direccion')->class('form-control')->attributes(['oninput' => 'this.value = this.value.toUpperCase()']) }}
@php $telefonos = 0; @endphp @if ($model->exists && $model->telefonos->count() > 0) @foreach ($model->telefonos as $item) @php $telefonos++; @endphp @endforeach @else @endif
Teléfono #{{ $telefonos }}
Teléfono #1
{{ html()->submit(' ' . (!$model->exists ? 'Guardar' : 'Editar'))->class('btn btn-primary') }}
{{ html()->closeModelForm() }}
@if ($model->exists)
Lista de contratos del cliente
@livewire('cliente-contrato-table', ['Cliente' => $model])
@endif @endsection @section('js') @endsection