99 lines
5.8 KiB
PHP
Executable File
99 lines
5.8 KiB
PHP
Executable File
@extends('admin.layouts.app')
|
|
|
|
@section('title', '
|
|
{{ __(\'Nuova Anagrafica (Soggetto)\') }}
|
|
')
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
|
|
|
|
<div class="py-5">
|
|
<div class="max-w-4xl mx-auto sm:px-4 lg:px-8">
|
|
<div class="bg-white dark:bg-dark overflow-hidden shadow-sm rounded">
|
|
<div class="p-6 text-gray-900 dark:text-gray-100">
|
|
<div class="d-flex justify-content-between align-items-center mb-6">
|
|
<h3 class="text-2xl fw-bold text-dark ">Crea Anagrafica</h3>
|
|
<a href="{{ route('admin.soggetti.index') }}" class="bg-light0 hover:bg-gray-700 text-white fw-bold py-2 px-3 rounded">
|
|
Torna alla Lista
|
|
</a>
|
|
</div>
|
|
|
|
<form method="POST" action="{{ route('admin.soggetti.store') }}" class="space-y-6">
|
|
@csrf
|
|
|
|
<!-- Nome e Cognome -->
|
|
<div class="grid row md:row gap-6">
|
|
<div>
|
|
<label for="nome" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Nome</label>
|
|
<input type="text" name="nome" id="nome" value="{{ old('nome') }}" class="mt-1 block w-full form-control dark:bg-gray-900 dark:text-gray-300 rounded shadow-sm">
|
|
</div>
|
|
<div>
|
|
<label for="cognome" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Cognome</label>
|
|
<input type="text" name="cognome" id="cognome" value="{{ old('cognome') }}" class="mt-1 block w-full form-control dark:bg-gray-900 dark:text-gray-300 rounded shadow-sm">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Ragione Sociale (Alternativa a Nome/Cognome) -->
|
|
<div>
|
|
<label for="ragione_sociale" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Ragione Sociale</label>
|
|
<input type="text" name="ragione_sociale" id="ragione_sociale" value="{{ old('ragione_sociale') }}" class="mt-1 block w-full form-control dark:bg-gray-900 dark:text-gray-300 rounded shadow-sm">
|
|
</div>
|
|
|
|
<!-- Altri campi -->
|
|
<div class="grid row md:row gap-6">
|
|
<div>
|
|
<label for="codice_fiscale" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Codice Fiscale</label>
|
|
<input type="text" name="codice_fiscale" id="codice_fiscale" value="{{ old('codice_fiscale') }}" class="mt-1 block w-full form-control dark:bg-gray-900 dark:text-gray-300 rounded shadow-sm">
|
|
</div>
|
|
<div>
|
|
<label for="partita_iva" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Partita IVA</label>
|
|
<input type="text" name="partita_iva" id="partita_iva" value="{{ old('partita_iva') }}" class="mt-1 block w-full form-control dark:bg-gray-900 dark:text-gray-300 rounded shadow-sm">
|
|
</div>
|
|
<div>
|
|
<label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Email</label>
|
|
<input type="email" name="email" id="email" value="{{ old('email') }}" class="mt-1 block w-full form-control dark:bg-gray-900 dark:text-gray-300 rounded shadow-sm">
|
|
</div>
|
|
<div>
|
|
<label for="telefono" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Telefono</label>
|
|
<input type="text" name="telefono" id="telefono" value="{{ old('telefono') }}" class="mt-1 block w-full form-control dark:bg-gray-900 dark:text-gray-300 rounded shadow-sm">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tipo Soggetto -->
|
|
<div>
|
|
<label for="tipo" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Tipo Soggetto</label>
|
|
<select name="tipo" id="tipo" required class="mt-1 block w-full form-control dark:bg-gray-900 dark:text-gray-300 rounded shadow-sm">
|
|
<option value="">Seleziona Tipo</option>
|
|
@foreach($tipi_anagrafica as $tipo)
|
|
<option value="{{ $tipo }}" {{ old('tipo') == $tipo ? 'selected' : '' }}>{{ ucfirst($tipo) }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<!-- Pulsanti -->
|
|
<div class="d-flex align-items-center justify-end">
|
|
<a href="{{ route('admin.soggetti.index') }}" class="bg-gray-300 hover:bg-gray-400 text-dark fw-bold py-2 px-3 rounded mr-2">Annulla</a>
|
|
<button type="submit" class="bg-primary text-white fw-bold py-2 px-3 rounded">Crea Anagrafica</button>
|
|
</div>
|
|
</form>
|
|
|
|
@if ($errors->any())
|
|
<div class="mt-4 text-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
@endsection |