|
@@ -199,8 +199,8 @@
|
|
|
|
|
|
|
|
<div class="col-12">
|
|
<div class="col-12">
|
|
|
@foreach(getCards() as $card)
|
|
@foreach(getCards() as $card)
|
|
|
- <div class="form-check form-check-inline d-inline-flex align-items-center">
|
|
|
|
|
- <input class="form-check-input" type="checkbox" value="{{$card->id}}" wire:model="filterCard">
|
|
|
|
|
|
|
+ <div class="form-check form-check-inline align-items-center">
|
|
|
|
|
+ <input class="form-check-input" type="checkbox" value="{{$card->id}}" wire:model="filterCard" onclick="destroyDataTable()">
|
|
|
<label class="form-check-label ms-2" >{{$card->name}}</label>
|
|
<label class="form-check-label ms-2" >{{$card->name}}</label>
|
|
|
</div>
|
|
</div>
|
|
|
@endforeach
|
|
@endforeach
|
|
@@ -214,22 +214,22 @@
|
|
|
|
|
|
|
|
<div class="filter--item_formElement row">
|
|
<div class="filter--item_formElement row">
|
|
|
<div class="col-6">
|
|
<div class="col-6">
|
|
|
- <div class="form-check form-check-inline d-inline-flex align-items-center">
|
|
|
|
|
- <input class="form-check-input" type="checkbox" wire:model="filterCertNormal">
|
|
|
|
|
|
|
+ <div class="form-check form-check-inline align-items-center">
|
|
|
|
|
+ <input class="form-check-input" type="checkbox" wire:model="filterCertNormal" onclick="destroyDataTable()">
|
|
|
<label class="form-check-label ms-2" >Normale</label>
|
|
<label class="form-check-label ms-2" >Normale</label>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="form-check form-check-inline d-inline-flex align-items-center">
|
|
|
|
|
- <input class="form-check-input" type="checkbox" wire:model="filterCertInScadenza">
|
|
|
|
|
|
|
+ <div class="form-check form-check-inline align-items-center">
|
|
|
|
|
+ <input class="form-check-input" type="checkbox" wire:model="filterCertInScadenza" onclick="destroyDataTable()">
|
|
|
<label class="form-check-label ms-2" >In Scadenza</label>
|
|
<label class="form-check-label ms-2" >In Scadenza</label>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-6">
|
|
<div class="col-6">
|
|
|
- <div class="form-check form-check-inline d-inline-flex align-items-center">
|
|
|
|
|
- <input class="form-check-input" type="checkbox" wire:model="filterCertAgonistic">
|
|
|
|
|
|
|
+ <div class="form-check form-check-inline align-items-center">
|
|
|
|
|
+ <input class="form-check-input" type="checkbox" wire:model="filterCertAgonistic" onclick="destroyDataTable()">
|
|
|
<label class="form-check-label ms-2" >Agonistico</label>
|
|
<label class="form-check-label ms-2" >Agonistico</label>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="form-check form-check-inline d-inline-flex align-items-center">
|
|
|
|
|
- <input class="form-check-input" type="checkbox" wire:model="filterCertScaduto">
|
|
|
|
|
|
|
+ <div class="form-check form-check-inline align-items-center">
|
|
|
|
|
+ <input class="form-check-input" type="checkbox" wire:model="filterCertScaduto" onclick="destroyDataTable()">
|
|
|
<label class="form-check-label ms-2" >Scaduti</label>
|
|
<label class="form-check-label ms-2" >Scaduti</label>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -244,8 +244,8 @@
|
|
|
<div class="filter--item_formElement row">
|
|
<div class="filter--item_formElement row">
|
|
|
<div class="col-6">
|
|
<div class="col-6">
|
|
|
@foreach(getCategories() as $category)
|
|
@foreach(getCategories() as $category)
|
|
|
- <div class="form-check form-check-inline d-inline-flex align-items-center">
|
|
|
|
|
- <input class="form-check-input" type="checkbox" value="{{$category->id}}" wire:model="filterCategory">
|
|
|
|
|
|
|
+ <div class="form-check form-check-inline align-items-center">
|
|
|
|
|
+ <input class="form-check-input" type="checkbox" value="{{$category->id}}" wire:model="filterCategory" onclick="destroyDataTable()">
|
|
|
<label class="form-check-label ms-2" >{{$category->name}}</label>
|
|
<label class="form-check-label ms-2" >{{$category->name}}</label>
|
|
|
</div>
|
|
</div>
|
|
|
@endforeach
|
|
@endforeach
|
|
@@ -262,7 +262,7 @@
|
|
|
|
|
|
|
|
<footer>
|
|
<footer>
|
|
|
<div class="filter--buttons d-flex align-items-center justify-content-between">
|
|
<div class="filter--buttons d-flex align-items-center justify-content-between">
|
|
|
- <button class="btn--ui small dark disable" wire:click.prevent="advancedSearchCancel()">cancella</button><button class="btn--ui small white" wire:click.prevent="advancedSearch()">filtra</button>
|
|
|
|
|
|
|
+ <button class="btn--ui small dark disable" wire:click.prevent="advancedSearchCancel()" onclick="destroyDataTable()">cancella</button><button class="btn--ui small white" onclick="destroyDataTable()" wire:click.prevent="advancedSearch()">filtra</button>
|
|
|
</div>
|
|
</div>
|
|
|
</footer>
|
|
</footer>
|
|
|
|
|
|
|
@@ -301,18 +301,20 @@
|
|
|
<button type="submit" class="btn--ui" wire:click.prevent="executeMultipleAction()">applica</button>
|
|
<button type="submit" class="btn--ui" wire:click.prevent="executeMultipleAction()">applica</button>
|
|
|
</form>
|
|
</form>
|
|
|
|
|
|
|
|
|
|
+ @if(false)
|
|
|
<form action="" class="search--form d-flex align-items-center">
|
|
<form action="" class="search--form d-flex align-items-center">
|
|
|
<div class="input-group mb-3">
|
|
<div class="input-group mb-3">
|
|
|
<input type="text" class="form-control" placeholder="Cerca utente" aria-label="cerca utent" aria-describedby="button-addon2" wire:model="search">
|
|
<input type="text" class="form-control" placeholder="Cerca utente" aria-label="cerca utent" aria-describedby="button-addon2" wire:model="search">
|
|
|
- @if(false)
|
|
|
|
|
|
|
+
|
|
|
@if($showReset)
|
|
@if($showReset)
|
|
|
<button class="btn--ui" type="button" id="button-addon2" wire:click="resetSearch()"><i class="ico--ui search"></i>Reset</button>
|
|
<button class="btn--ui" type="button" id="button-addon2" wire:click="resetSearch()"><i class="ico--ui search"></i>Reset</button>
|
|
|
@else
|
|
@else
|
|
|
<button class="btn--ui" type="button" id="button-addon2" wire:click="search()"><i class="ico--ui search"></i>Cerca</button>
|
|
<button class="btn--ui" type="button" id="button-addon2" wire:click="search()"><i class="ico--ui search"></i>Cerca</button>
|
|
|
@endif
|
|
@endif
|
|
|
- @endif
|
|
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</form>
|
|
</form>
|
|
|
|
|
+ @endif
|
|
|
</section>
|
|
</section>
|
|
|
|
|
|
|
|
<section id="resume-table">
|
|
<section id="resume-table">
|
|
@@ -516,7 +518,7 @@
|
|
|
@endif
|
|
@endif
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="col-md-6">
|
|
|
|
|
|
|
+ <div class="col-md-12">
|
|
|
<label for="inputDate" class="form-label">Data di nascita {!!$age != '' ? ' <b>(' . $age . ')</b>' : ''!!}{!!$under18 ? '<span style="color:red;font-weight:bold"> MINORENNE</span>' : ''!!}</label>
|
|
<label for="inputDate" class="form-label">Data di nascita {!!$age != '' ? ' <b>(' . $age . ')</b>' : ''!!}{!!$under18 ? '<span style="color:red;font-weight:bold"> MINORENNE</span>' : ''!!}</label>
|
|
|
<div class="input-group mb-3">
|
|
<div class="input-group mb-3">
|
|
|
<input class="form-control" type="date" id="birth_date" placeholder="Data di nascita" wire:model="birth_date">
|
|
<input class="form-control" type="date" id="birth_date" placeholder="Data di nascita" wire:model="birth_date">
|
|
@@ -527,36 +529,64 @@
|
|
|
@if($under18)
|
|
@if($under18)
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="father_name" class="form-label">Nome padre</label>
|
|
|
|
|
- <input class="form-control" type="text" id="father_name" placeholder="Nome padre" wire:model="father_name">
|
|
|
|
|
|
|
+ <label for="father_name" class="form-label">Nome genitore 1</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="father_name" placeholder="Nome genitore 1" wire:model="father_name">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="mother_name" class="form-label">Nome madre</label>
|
|
|
|
|
- <input class="form-control " type="text" id="mother_name" placeholder="Nome madre" wire:model="mother_name">
|
|
|
|
|
|
|
+ <label for="mother_name" class="form-label">Nome genitore 2</label>
|
|
|
|
|
+ <input class="form-control " type="text" id="mother_name" placeholder="Nome genitore 2" wire:model="mother_name">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="father_email" class="form-label">Email padre</label>
|
|
|
|
|
- <input class="form-control" type="text" id="father_email" placeholder="Email padre" wire:model="father_email">
|
|
|
|
|
|
|
+ <label for="father_email" class="form-label">Email genitore 1</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="father_email" placeholder="Email genitore 1" wire:model="father_email">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="mother_email" class="form-label">Email madre</label>
|
|
|
|
|
- <input class="form-control " type="text" id="mother_email" placeholder="Email madre" wire:model="mother_email">
|
|
|
|
|
|
|
+ <label for="mother_email" class="form-label">Email genitore 2</label>
|
|
|
|
|
+ <input class="form-control " type="text" id="mother_email" placeholder="Email genitore 2" wire:model="mother_email">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="father_phone" class="form-label">Telefono padre</label>
|
|
|
|
|
- <input class="form-control" type="text" id="father_phone" placeholder="Telefono padre" wire:model="father_phone">
|
|
|
|
|
|
|
+ <label for="father_phone" class="form-label">Telefono genitore 1</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="father_phone" placeholder="Telefono genitore 1" wire:model="father_phone">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="mother_phone" class="form-label">Telefono madre</label>
|
|
|
|
|
- <input class="form-control " type="text" id="mother_phone" placeholder="Telefono madre" wire:model="mother_phone">
|
|
|
|
|
|
|
+ <label for="mother_phone" class="form-label">Telefono genitore 2</label>
|
|
|
|
|
+ <input class="form-control " type="text" id="mother_phone" placeholder="Telefono genitore 2" wire:model="mother_phone">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="father_fiscal_code" class="form-label">Codice fiscale padre</label>
|
|
|
|
|
- <input class="form-control" type="text" id="father_fiscal_code" placeholder="Codice fiscale padre" wire:model="father_fiscal_code" maxmaxlength="16">
|
|
|
|
|
|
|
+ <label for="father_fiscal_code" class="form-label">Codice fiscale genitore 1</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="father_fiscal_code" placeholder="Codice fiscale genitore 1" wire:model="father_fiscal_code" maxlength="16">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="mother_fiscal_code" class="form-label">Codice fiscale madre</label>
|
|
|
|
|
- <input class="form-control " type="text" id="mother_fiscal_code" placeholder="Codice fiscale madre" wire:model="mother_fiscal_code" maxmaxlength="16">
|
|
|
|
|
|
|
+ <label for="mother_fiscal_code" class="form-label">Codice fiscale genitore 2</label>
|
|
|
|
|
+ <input class="form-control " type="text" id="mother_fiscal_code" placeholder="Codice fiscale genitore 2" wire:model="mother_fiscal_code" maxlength="16">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="father_doc_number" class="form-label">Numero documento genitore 1</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="father_doc_number" placeholder="Numero documento genitore 1" wire:model="father_doc_number">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="mother_doc_number" class="form-label">Numero documento genitore 2</label>
|
|
|
|
|
+ <input class="form-control " type="text" id="mother_doc_number" placeholder="Numero documento genitore 2" wire:model="mother_doc_number">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="father_doc_type" class="form-label">Tipo documento genitore 1</label>
|
|
|
|
|
+ <select class="form-select form-select-lg me-1" aria-label=".form-select-lg example" wire:model="father_doc_type">
|
|
|
|
|
+ <option value=""></option>
|
|
|
|
|
+ <option value="Carta di identità">Carta di identità</option>
|
|
|
|
|
+ <option value="Passaporto">Passaporto</option>
|
|
|
|
|
+ <option value="Patente">Patente</option>
|
|
|
|
|
+ <option value="Permesso di soggiorno">Permesso di soggiorno</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="mother_doc_type" class="form-label">Tipo documento genitore 2</label>
|
|
|
|
|
+ <select class="form-select form-select-lg me-1" aria-label=".form-select-lg example" wire:model="mother_doc_type">
|
|
|
|
|
+ <option value=""></option>
|
|
|
|
|
+ <option value="Carta di identità">Carta di identità</option>
|
|
|
|
|
+ <option value="Passaporto">Passaporto</option>
|
|
|
|
|
+ <option value="Patente">Patente</option>
|
|
|
|
|
+ <option value="Permesso di soggiorno">Permesso di soggiorno</option>
|
|
|
|
|
+ </select>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
@endif
|
|
@endif
|
|
@@ -586,6 +616,14 @@
|
|
|
</div>
|
|
</div>
|
|
|
@endif
|
|
@endif
|
|
|
|
|
|
|
|
|
|
+ <div class="col-md-12">
|
|
|
|
|
+ <label for="fiscal_code" class="form-label">Codice fiscale (<a wire:click="getFiscalCode()" href="#" style="font-size:18px;color: #006099;font-weight: bold;">calcola</a>)</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="fiscal_code" placeholder="Codice fiscale" wire:model="fiscal_code" maxlength="16">
|
|
|
|
|
+ @if($this->error_fc)
|
|
|
|
|
+ <span style="color:red;font-size:12px">Dati mancanti</span>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
@if($dataId > 0)
|
|
@if($dataId > 0)
|
|
|
<span class="title-form primary d-block w-100">Stato</span>
|
|
<span class="title-form primary d-block w-100">Stato</span>
|
|
|
<div class="col-12">
|
|
<div class="col-12">
|
|
@@ -602,13 +640,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>-->
|
|
</div>-->
|
|
|
|
|
|
|
|
- <div class="col-md-6">
|
|
|
|
|
- <label for="fiscal_code" class="form-label">Codice fiscale (<a wire:click="getFiscalCode()" href="#" style="font-size:18px;color: #006099;font-weight: bold;">calcola</a>)</label>
|
|
|
|
|
- <input class="form-control" type="text" id="fiscal_code" placeholder="Codice fiscale" wire:model="fiscal_code" maxmaxlength="16">
|
|
|
|
|
- @if($this->error_fc)
|
|
|
|
|
- <span style="color:red;font-size:12px">Dati mancanti</span>
|
|
|
|
|
- @endif
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -618,75 +650,7 @@
|
|
|
<div class="form--col">
|
|
<div class="form--col">
|
|
|
<div class="row g-3" wire:key='reload-{{$selectId}}'>
|
|
<div class="row g-3" wire:key='reload-{{$selectId}}'>
|
|
|
|
|
|
|
|
- <span class="title-form primary d-block w-100">Certificato Medico</span>
|
|
|
|
|
-
|
|
|
|
|
- @if($dataId > -1)
|
|
|
|
|
- @if(!$addCertificate && !$updateCertificate)
|
|
|
|
|
- <table class="table tablesaw tablesaw-stack" >
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th scope="col">Tipo</th>
|
|
|
|
|
- <th scope="col">Scadenza</th>
|
|
|
|
|
- <th scope="col"></th>
|
|
|
|
|
- <th scope="col">...</th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody >
|
|
|
|
|
- @foreach($member_certificates as $member_certificate)
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td>{{$member_certificate->type == 'A' ? 'Agonistico' : 'Non agonistico'}}</td>
|
|
|
|
|
- <td>{{$member_certificate->expire_date ? date("d/m/Y", strtotime($member_certificate->expire_date)) : ''}}</td>
|
|
|
|
|
- <td>{!!$member_certificate->filename != '' ? '<a href="/storage/app/public/' . $member_certificate->filename . '" target="_blank">Visualizza</a>' : ''!!}</td>
|
|
|
|
|
- <td>
|
|
|
|
|
- <button type="button" class="btn btn-outline-primary btn-sm" wire:click="editCertificate({{ $member_certificate->id }})">Modifica</button>
|
|
|
|
|
- <button type="button" class="btn btn-outline-danger btn-sm" onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="deleteCertificate({{ $member_certificate->id }})">Elimina</button>
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- @endforeach
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- <button class="btn--ui primary"wire:click.prevent="addCertificate()">Aggiungi</button>
|
|
|
|
|
- @else
|
|
|
|
|
-
|
|
|
|
|
- <div class="form--wrapper">
|
|
|
|
|
- <form class="form--utente">
|
|
|
|
|
- <div class="row ">
|
|
|
|
|
- <div class="col-md-6">
|
|
|
|
|
- <label for="certificate_type" class="form-label">Tipo</label>
|
|
|
|
|
- <select id="certificate_type" class="form-select certificate_type" aria-label="Tessera" wire:model="certificate_type">
|
|
|
|
|
- <option value="N">Non agonistico
|
|
|
|
|
- <option value="A">Agonistico
|
|
|
|
|
- </select>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="col-md-6">
|
|
|
|
|
- <label for="certificate_expire_date" class="form-label">Data scadenza</label>
|
|
|
|
|
- <input class="form-control @error('certificate_expire_date') is-invalid @enderror" type="date" id="certificate_expire_date" placeholder="Data scadenza" wire:model="certificate_expire_date">
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="col-12">
|
|
|
|
|
- <div class="upload--image_box d-flex align-items-center justify-content-center flex-column">
|
|
|
|
|
- <input class="form-control" type="file" wire:model="certificate_filename">
|
|
|
|
|
- </div>
|
|
|
|
|
- <p class="caption text-center mt-1">Formati consentiti: .jpg, .pdf, .docx</p>
|
|
|
|
|
- {!!$certificate_filename_old != '' ? '<br><a href="/storage/app/public/' . $certificate_filename_old . '" target="_blank">Visualizza</a>' : ''!!}
|
|
|
|
|
- </div>
|
|
|
|
|
- </form>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <br>
|
|
|
|
|
- @if($addCertificate)
|
|
|
|
|
- <button class="btn--ui primary" wire:click.prevent="storeCertificate()">Salva</button>
|
|
|
|
|
- @endif
|
|
|
|
|
- @if($updateCertificate)
|
|
|
|
|
- <button class="btn--ui primary" wire:click.prevent="updateCertificate()">Salva</button>
|
|
|
|
|
- @endif
|
|
|
|
|
- <button class="btn--ui primary" wire:click.prevent="cancelCertificate()">Annulla</button>
|
|
|
|
|
-
|
|
|
|
|
- @endif
|
|
|
|
|
- @else
|
|
|
|
|
- <label for="last_name" class="form-label">Prima di caricare un certificato salva l'utente</label>
|
|
|
|
|
|
|
|
|
|
- @endif
|
|
|
|
|
|
|
|
|
|
<!--
|
|
<!--
|
|
|
<div class="col-12">
|
|
<div class="col-12">
|
|
@@ -706,7 +670,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-4">
|
|
<div class="col-4">
|
|
|
<label for="zip_code" class="form-label">CAP</label>
|
|
<label for="zip_code" class="form-label">CAP</label>
|
|
|
- <input class="form-control" type="number" id="zip_code" placeholder="CAP" wire:model="zip_code" maxlength="5" >
|
|
|
|
|
|
|
+ <input class="form-control" type="text" id="zip_code" placeholder="CAP" wire:model="zip_code" maxlength="5" >
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-12" wire:ignore>
|
|
<div class="col-md-12" wire:ignore>
|
|
|
<label for="nation_id" class="form-label">Nazione</label>
|
|
<label for="nation_id" class="form-label">Nazione</label>
|
|
@@ -757,14 +721,92 @@
|
|
|
<label for="document_expire_date" class="form-label">Scadenza</label>
|
|
<label for="document_expire_date" class="form-label">Scadenza</label>
|
|
|
<input class="form-control" type="date" id="document_expire_date" placeholder="Scadenza" wire:model="document_expire_date">
|
|
<input class="form-control" type="date" id="document_expire_date" placeholder="Scadenza" wire:model="document_expire_date">
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="col-6">
|
|
|
|
|
|
|
+ <div class="col-12">
|
|
|
<label for="document_files" class="form-label">File</label>
|
|
<label for="document_files" class="form-label">File</label>
|
|
|
<input class="form-control" type="file" wire:model="documents" multiple><br>
|
|
<input class="form-control" type="file" wire:model="documents" multiple><br>
|
|
|
|
|
+ <label for="document_files" class="form-label">Caricati</label>
|
|
|
@foreach ($document_files as $idx => $d)
|
|
@foreach ($document_files as $idx => $d)
|
|
|
- <a href="{{ asset('storage/app/public/'.$d) }}" target="_blank" class="form-label">{{$d}}</a> <a wire:click="removeDocument({{$idx}})" class="form-label">(elimina)</a><br>
|
|
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col-6">
|
|
|
|
|
+ <a href="{{ asset('storage/app/public/'.$d) }}" target="_blank" class="form-label">{{$d}}</a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-6">
|
|
|
|
|
+ <a wire:click="removeDocument({{$idx}})" class="form-label">(elimina)</a><br>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
@endforeach
|
|
@endforeach
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <span class="title-form primary d-block w-100">Certificato Medico</span>
|
|
|
|
|
+
|
|
|
|
|
+ @if($dataId > -1)
|
|
|
|
|
+ @if(!$addCertificate && !$updateCertificate)
|
|
|
|
|
+ <table class="table tablesaw tablesaw-stack" >
|
|
|
|
|
+ <thead>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th scope="col">Tipo</th>
|
|
|
|
|
+ <th scope="col">Scadenza</th>
|
|
|
|
|
+ <th scope="col"></th>
|
|
|
|
|
+ <th scope="col">...</th>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ <tbody >
|
|
|
|
|
+ @foreach($member_certificates as $member_certificate)
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td>{{$member_certificate->type == 'A' ? 'Agonistico' : 'Non agonistico'}}</td>
|
|
|
|
|
+ <td>{{$member_certificate->expire_date ? date("d/m/Y", strtotime($member_certificate->expire_date)) : ''}}</td>
|
|
|
|
|
+ <td>{!!$member_certificate->filename != '' ? '<a href="/storage/app/public/' . $member_certificate->filename . '" target="_blank">Visualizza</a>' : ''!!}</td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <button type="button" class="btn btn-outline-primary btn-sm" wire:click="editCertificate({{ $member_certificate->id }})">Modifica</button>
|
|
|
|
|
+ <button type="button" class="btn btn-outline-danger btn-sm" onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="deleteCertificate({{ $member_certificate->id }})">Elimina</button>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ <button class="btn--ui primary"wire:click.prevent="addCertificate()">Aggiungi</button>
|
|
|
|
|
+ @else
|
|
|
|
|
+
|
|
|
|
|
+ <div class="form--wrapper">
|
|
|
|
|
+ <form class="form--utente">
|
|
|
|
|
+ <div class="row ">
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="certificate_type" class="form-label">Tipo</label>
|
|
|
|
|
+ <select id="certificate_type" class="form-select certificate_type" aria-label="Tessera" wire:model="certificate_type">
|
|
|
|
|
+ <option value="N">Non agonistico
|
|
|
|
|
+ <option value="A">Agonistico
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="certificate_expire_date" class="form-label">Data scadenza</label>
|
|
|
|
|
+ <input class="form-control @error('certificate_expire_date') is-invalid @enderror" type="date" id="certificate_expire_date" placeholder="Data scadenza" wire:model="certificate_expire_date">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-12">
|
|
|
|
|
+ <div class="upload--image_box d-flex align-items-center justify-content-center flex-column">
|
|
|
|
|
+ <input class="form-control" type="file" wire:model="certificate_filename">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <p class="caption text-center mt-1">Formati consentiti: .jpg, .pdf, .docx</p>
|
|
|
|
|
+ {!!$certificate_filename_old != '' ? '<br><a href="/storage/app/public/' . $certificate_filename_old . '" target="_blank">Visualizza</a>' : ''!!}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <br>
|
|
|
|
|
+ @if($addCertificate)
|
|
|
|
|
+ <button class="btn--ui primary" wire:click.prevent="storeCertificate()">Salva</button>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @if($updateCertificate)
|
|
|
|
|
+ <button class="btn--ui primary" wire:click.prevent="updateCertificate()">Salva</button>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ <button class="btn--ui primary" wire:click.prevent="cancelCertificate()">Annulla</button>
|
|
|
|
|
+
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @else
|
|
|
|
|
+ <label for="last_name" class="form-label">Prima di caricare un certificato salva l'utente</label>
|
|
|
|
|
+
|
|
|
|
|
+ @endif
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</form>
|
|
</form>
|
|
@@ -1488,11 +1530,30 @@
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
Livewire.on('load-data-table', () => {
|
|
Livewire.on('load-data-table', () => {
|
|
|
- loadDataTable();
|
|
|
|
|
|
|
+ setTimeout(function() {loadDataTable()}, 100);
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ Livewire.on('destroy-data-table', () => {
|
|
|
|
|
+ $('#tablesaw-350').DataTable().destroy();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- function loadDataTable(){
|
|
|
|
|
|
|
+ function destroyDataTable()
|
|
|
|
|
+ {
|
|
|
|
|
+ $('#tablesaw-350').DataTable().destroy();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function loadDataTable()
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
|
|
|
|
|
+ $('#tablesaw-350').DataTable().destroy();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$('#tablesaw-350').DataTable({
|
|
$('#tablesaw-350').DataTable({
|
|
|
|
|
+ //destroy: true,
|
|
|
|
|
+ fixedHeader: true,
|
|
|
|
|
+ order: [[3, 'asc'], [4, 'asc']],
|
|
|
thead: {
|
|
thead: {
|
|
|
'th': {'background-color': 'blue'}
|
|
'th': {'background-color': 'blue'}
|
|
|
},
|
|
},
|