|
@@ -168,7 +168,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="resume--tab_info corsi">
|
|
<div class="resume--tab_info corsi">
|
|
|
- <h2 class="title d-flex align-items-center mb-3 gap-4"><i class="fa-solid fa-chalkboard"></i>Corsi</h2>
|
|
|
|
|
|
|
+ <h2 class="title d-flex align-items-center mb-3 gap-4"><i class="fa-solid fa-chalkboard"></i>Corsi e Abbonamenti</h2>
|
|
|
@foreach($currentMember->courses as $member_course)
|
|
@foreach($currentMember->courses as $member_course)
|
|
|
@php
|
|
@php
|
|
|
$course_year = date('Y', strtotime($member_course->date_from));
|
|
$course_year = date('Y', strtotime($member_course->date_from));
|
|
@@ -489,7 +489,7 @@
|
|
|
<div class="section--tab d-flex">
|
|
<div class="section--tab d-flex">
|
|
|
<h4 style="cursor:pointer;{{$type == 'dati' ? 'border-bottom:2px solid var(--color-blu); color:var(--color-blu);' : ''}}" wire:click="change('dati')">Anagrafica</h4>
|
|
<h4 style="cursor:pointer;{{$type == 'dati' ? 'border-bottom:2px solid var(--color-blu); color:var(--color-blu);' : ''}}" wire:click="change('dati')">Anagrafica</h4>
|
|
|
<h4 style="cursor:pointer;{{$type == 'tesseramento' ? 'border-bottom:2px solid var(--color-blu); color:var(--color-blu);' : ''}}" wire:click="change('tesseramento')">Tesseramento</h4>
|
|
<h4 style="cursor:pointer;{{$type == 'tesseramento' ? 'border-bottom:2px solid var(--color-blu); color:var(--color-blu);' : ''}}" wire:click="change('tesseramento')">Tesseramento</h4>
|
|
|
- <h4 style="cursor:pointer;{{$type == 'corsi' ? 'border-bottom:2px solid var(--color-blu); color:var(--color-blu);' : ''}}" wire:click="change('corsi')">Corsi</h4>
|
|
|
|
|
|
|
+ <h4 style="cursor:pointer;{{$type == 'corsi' ? 'border-bottom:2px solid var(--color-blu); color:var(--color-blu);' : ''}}" wire:click="change('corsi')">Corsi e Abbonamenti</h4>
|
|
|
<h4 style="cursor:pointer;{{$type == 'gruppi' ? 'border-bottom:2px solid var(--color-blu); color:var(--color-blu);' : ''}}" wire:click="change('gruppi')">Gruppi</h4>
|
|
<h4 style="cursor:pointer;{{$type == 'gruppi' ? 'border-bottom:2px solid var(--color-blu); color:var(--color-blu);' : ''}}" wire:click="change('gruppi')">Gruppi</h4>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row">
|
|
<div class="row">
|
|
@@ -1064,347 +1064,462 @@
|
|
|
@if($dataId > 0)
|
|
@if($dataId > 0)
|
|
|
@if(!$addCourse && !$updateCourse)
|
|
@if(!$addCourse && !$updateCourse)
|
|
|
@if($active["status"] != 1 && !$hasCertificate)
|
|
@if($active["status"] != 1 && !$hasCertificate)
|
|
|
- <div class="alert alert-info" role="alert">
|
|
|
|
|
- {{-- <strong>Attenzione:</strong> Per aggiungere corsi è necessario avere un tesseramento attivo o un certificato medico valido. --}}
|
|
|
|
|
- <strong>Info:</strong> Non sono presenti un tesseramento attivo o un certificato medico valido.
|
|
|
|
|
|
|
+ <div class="row mb-3">
|
|
|
|
|
+ <div class="col-md-12">
|
|
|
|
|
+ <div class="alert alert-info" role="alert">
|
|
|
|
|
+ {{-- <strong>Attenzione:</strong> Per aggiungere corsi è necessario avere un tesseramento attivo o un certificato medico valido. --}}
|
|
|
|
|
+ <strong>Info:</strong> Non sono presenti un tesseramento attivo o un certificato medico valido.
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
@elseif($active["status"] != 1)
|
|
@elseif($active["status"] != 1)
|
|
|
- <div class="alert alert-info" role="alert">
|
|
|
|
|
- <strong>Info:</strong> Il tesseramento non è attivo, ma è presente un certificato medico valido.
|
|
|
|
|
|
|
+ <div class="row mb-3">
|
|
|
|
|
+ <div class="col-md-12">
|
|
|
|
|
+ <div class="alert alert-info" role="alert">
|
|
|
|
|
+ <strong>Info:</strong> Il tesseramento non è attivo, ma è presente un certificato medico valido.
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
@elseif(!$hasCertificate)
|
|
@elseif(!$hasCertificate)
|
|
|
- <div class="alert alert-info" role="alert">
|
|
|
|
|
- <strong>Info:</strong> Non è presente un certificato medico valido, ma il tesseramento è attivo.
|
|
|
|
|
|
|
+ <div class="row mb-3">
|
|
|
|
|
+ <div class="col-md-12">
|
|
|
|
|
+ <div class="alert alert-info" role="alert">
|
|
|
|
|
+ <strong>Info:</strong> Non è presente un certificato medico valido, ma il tesseramento è attivo.
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
@endif
|
|
@endif
|
|
|
- <table class="table tablesaw tableHead tablesaw-stack tabella--corsi" id="tablesaw-350-2" style="min-width:800px">
|
|
|
|
|
- <tbody id="checkall-target">
|
|
|
|
|
- @foreach($member_courses as $member_course)
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td style="width:20%;" colspan="1">
|
|
|
|
|
- <b>{{$member_course->course->name}}</b><br>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td style="width:20%;">
|
|
|
|
|
- {{$member_course->course->level->name ?? ""}}<br>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td style="width:20%;">
|
|
|
|
|
- {{$member_course->course->frequency->name ?? ""}}<br>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td style="width:20%">
|
|
|
|
|
- @php
|
|
|
|
|
- $ok = false;
|
|
|
|
|
- @endphp
|
|
|
|
|
- @foreach(json_decode($member_course->when) as $xx => $x)
|
|
|
|
|
- @if($xx > 0)
|
|
|
|
|
- <br>
|
|
|
|
|
- @endif
|
|
|
|
|
- @foreach($x->day as $zz => $d)
|
|
|
|
|
- {{$zz > 0 ? '- ' : ''}}{{$d}}
|
|
|
|
|
- @endforeach
|
|
|
|
|
- @if($x->from != '' && $x->to != '')
|
|
|
|
|
- h {{$x->from}} - {{$x->to}}
|
|
|
|
|
- @endif
|
|
|
|
|
- @php
|
|
|
|
|
- $ok = $x->from != '';
|
|
|
|
|
- @endphp
|
|
|
|
|
- @endforeach
|
|
|
|
|
- @if(!$ok && $member_course->course->when != '')
|
|
|
|
|
- @foreach(json_decode($member_course->course->when) as $xx => $x)
|
|
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col-md-12">
|
|
|
|
|
+ <h4 class="text-uppercase">Abbonamenti</h4>
|
|
|
|
|
+ @if ((is_array($member_subscriptions) && empty($member_subscriptions)) || $member_subscriptions->count() == 0)
|
|
|
|
|
+ <div class="alert alert-warning" role="alert">
|
|
|
|
|
+ Nessun abbonamento associato all'utente
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @else
|
|
|
|
|
+ <table class="table tablesaw tableHead tablesaw-stack tabella--abbonamenti" id="tablesaw-abbonamenti" style="min-width:800px">
|
|
|
|
|
+ <tbody id="checkall-target">
|
|
|
|
|
+ @foreach($member_subscriptions as $member_subscription)
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td style="width:30%;" colspan="1">
|
|
|
|
|
+ <b>{{$member_subscription->subscription->name}}</b><br>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="width:40%;">
|
|
|
|
|
+ @if($member_subscription->notes != '')
|
|
|
|
|
+ <b>Note: </b>
|
|
|
|
|
+ {{$member_subscription->notes}}
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="text-align:right;width:15%;">
|
|
|
@php
|
|
@php
|
|
|
- $ok = true;
|
|
|
|
|
|
|
+ $status = $member_subscription->getStatus();
|
|
|
@endphp
|
|
@endphp
|
|
|
- @if($xx > 0)
|
|
|
|
|
- <br>
|
|
|
|
|
- @endif
|
|
|
|
|
- @foreach($x->day as $zz => $d)
|
|
|
|
|
- {{$zz > 0 ? '- ' : ''}}{{$d}}
|
|
|
|
|
- @endforeach
|
|
|
|
|
- @if($x->from != '')
|
|
|
|
|
- h {{$x->from}} - {{$x->to}}
|
|
|
|
|
- @endif
|
|
|
|
|
- @endforeach
|
|
|
|
|
- @endif
|
|
|
|
|
- </td>
|
|
|
|
|
- <td style="text-align:right;width:5%;">
|
|
|
|
|
- @php
|
|
|
|
|
- $status = $member_course->getStatus();
|
|
|
|
|
- @endphp
|
|
|
|
|
- <a href="/rates?member_id={{$member_course->member_id}}&member_course_id={{$member_course->id}}"><span class="badge tessera-badge {{$status == 0 ? 'due' : ($status == 1 ? 'active' : 'suspended')}}">{{$status == 0 ? 'Da pagare' : ($status == 1 ? 'Pagato' : 'Sospeso')}}</span></a>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td style="text-align:right;width:15%;">
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <div class="col-4">
|
|
|
|
|
- <button style="float:left;" type="button" class="btn" wire:click="editCourse({{ $member_course->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="Modifica"><i class="fa-regular fa-pen-to-square"></i></button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="col-4">
|
|
|
|
|
- <button type="button" class="btn" onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="deleteCourse({{ $member_course->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="Elimina"><i class="fa-regular fa-trash-can"></i></button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td style="text-align:left;width:15%;padding-top:15px;">
|
|
|
|
|
- @if($member_course->notes != '')
|
|
|
|
|
- <button type="button" class="btn" wire:click="showHideCourse({{ $member_course->id }})">
|
|
|
|
|
- @if(in_array($member_course->id, $showCourse))
|
|
|
|
|
- <i class="fa-solid fa-chevron-circle-up"></i>
|
|
|
|
|
- @else
|
|
|
|
|
- <i class="fa-solid fa-chevron-circle-down"></i>
|
|
|
|
|
- @endif
|
|
|
|
|
- </button>
|
|
|
|
|
- @endif
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- {{-- <tr>
|
|
|
|
|
- <td style="width:30%" colspan="2">
|
|
|
|
|
- {{date("d/m/Y", strtotime($member_course->date_from))}} - {{date("d/m/Y", strtotime($member_course->date_to))}}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td style="width:30%"colspan="5">
|
|
|
|
|
- @php
|
|
|
|
|
- $ok = false;
|
|
|
|
|
- @endphp
|
|
|
|
|
- @foreach(json_decode($member_course->when) as $xx => $x)
|
|
|
|
|
- @if($xx > 0)
|
|
|
|
|
- <br>
|
|
|
|
|
- @endif
|
|
|
|
|
- @foreach($x->day as $zz => $d)
|
|
|
|
|
- {{$zz > 0 ? '-' : ''}}{{$d}}
|
|
|
|
|
- @endforeach
|
|
|
|
|
- @if($x->from != '' && $x->to != '')
|
|
|
|
|
- h {{$x->from}} - {{$x->to}}
|
|
|
|
|
- @endif
|
|
|
|
|
- @php
|
|
|
|
|
- $ok = $x->from != '';
|
|
|
|
|
- @endphp
|
|
|
|
|
- @endforeach
|
|
|
|
|
- @if(!$ok && $member_course->course->when != '')
|
|
|
|
|
- @foreach(json_decode($member_course->course->when) as $xx => $x)
|
|
|
|
|
|
|
+ <a href="/rates?member_id={{$member_subscription->member_id}}&member_subscription_id={{$member_subscription->id}}"><span class="badge tessera-badge {{$status == 0 ? 'due' : ($status == 1 ? 'active' : 'suspended')}}">{{$status == 0 ? 'Da pagare' : ($status == 1 ? 'Pagato' : 'Sospeso')}}</span></a>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="text-align:right;width:15%;">
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col-4">
|
|
|
|
|
+ <button style="float:left;" type="button" class="btn" wire:click="editSubscription({{ $member_subscription->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="Modifica"><i class="fa-regular fa-pen-to-square"></i></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-4">
|
|
|
|
|
+ <button type="button" class="btn" onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="deleteSubscription({{ $member_subscription->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="Elimina"><i class="fa-regular fa-trash-can"></i></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="col-md-12 mt-5">
|
|
|
|
|
+ <h4 class="text-uppercase">Corsi</h4>
|
|
|
|
|
+ @if ((is_array($member_courses) && empty($member_courses)) || $member_courses->count() == 0)
|
|
|
|
|
+ <div class="alert alert-warning" role="alert">
|
|
|
|
|
+ Nessun corso associato all'utente
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @else
|
|
|
|
|
+ <table class="table tablesaw tableHead tablesaw-stack tabella--corsi" id="tablesaw-350-2" style="min-width:800px">
|
|
|
|
|
+ <tbody id="checkall-target">
|
|
|
|
|
+ @foreach($member_courses as $member_course)
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td style="width:20%;" colspan="1">
|
|
|
|
|
+ <b>{{$member_course->course->name}}</b><br>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="width:20%;">
|
|
|
|
|
+ {{$member_course->course->level->name ?? ""}}<br>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="width:20%;">
|
|
|
|
|
+ {{$member_course->course->frequency->name ?? ""}}<br>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="width:20%">
|
|
|
@php
|
|
@php
|
|
|
- $ok = true;
|
|
|
|
|
|
|
+ $ok = false;
|
|
|
@endphp
|
|
@endphp
|
|
|
- @if($xx > 0)
|
|
|
|
|
- <br>
|
|
|
|
|
- @endif
|
|
|
|
|
- @foreach($x->day as $zz => $d)
|
|
|
|
|
- {{$zz > 0 ? '-' : ''}}{{$d}}
|
|
|
|
|
|
|
+ @foreach(json_decode($member_course->when) as $xx => $x)
|
|
|
|
|
+ @if($xx > 0)
|
|
|
|
|
+ <br>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @foreach($x->day as $zz => $d)
|
|
|
|
|
+ {{$zz > 0 ? '- ' : ''}}{{$d}}
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ @if($x->from != '' && $x->to != '')
|
|
|
|
|
+ h {{$x->from}} - {{$x->to}}
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @php
|
|
|
|
|
+ $ok = $x->from != '';
|
|
|
|
|
+ @endphp
|
|
|
@endforeach
|
|
@endforeach
|
|
|
- @if($x->from != '')
|
|
|
|
|
- h {{$x->from}} - {{$x->to}}
|
|
|
|
|
|
|
+ @if(!$ok && $member_course->course->when != '')
|
|
|
|
|
+ @foreach(json_decode($member_course->course->when) as $xx => $x)
|
|
|
|
|
+ @php
|
|
|
|
|
+ $ok = true;
|
|
|
|
|
+ @endphp
|
|
|
|
|
+ @if($xx > 0)
|
|
|
|
|
+ <br>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @foreach($x->day as $zz => $d)
|
|
|
|
|
+ {{$zz > 0 ? '- ' : ''}}{{$d}}
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ @if($x->from != '')
|
|
|
|
|
+ h {{$x->from}} - {{$x->to}}
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @endforeach
|
|
|
@endif
|
|
@endif
|
|
|
- @endforeach
|
|
|
|
|
- @endif
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr> --}}
|
|
|
|
|
- @if(in_array($member_course->id, $showCourse))
|
|
|
|
|
- @if(false)
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td colspan="5">
|
|
|
|
|
- <a class="{{$this->getSubscriptionStatus($member_course->subscribed, $member_course->id)}}" wire:click="setCreateSubscription({{$member_course->subscribed}}, {{$member_course->id}})" style="float:none; width:150px;{{$this->getSubscriptionStatus($member_course->subscribed,$member_course->id) == 'blue' || $this->getSubscriptionStatus($member_course->subscribed,$member_course->id) == 'orange' || $this->getSubscriptionStatus($member_course->subscribed,$member_course->id) == 'yellow' ? 'cursor:pointer' : ''}}">Iscrizione</a><br>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(9, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(9, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(9, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Set</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(10, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(10, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(10, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Ott</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(11, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(11, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(11, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Nov</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(12, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(12, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(12, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Dic</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(1, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(1, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(1, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Gen</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(2, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(2, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(2, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Feb</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(3, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(3, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(3, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Mar</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(4, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(4, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(4, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Apr</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(5, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(5, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(5, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Mag</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(6, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(6, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(6, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Giu</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(7, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(7, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(7, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Lug</a>
|
|
|
|
|
- <a class="{{$this->getMonthStatus(8, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(8, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(8, $member_course->months, $member_course->id) , ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Ago</a>
|
|
|
|
|
</td>
|
|
</td>
|
|
|
- <td>
|
|
|
|
|
- <button type="button" class="btn" wire:click="editCourse({{ $member_course->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="Modifica"><i class="fa-regular fa-pen-to-square"></i></button>
|
|
|
|
|
- <button type="button" class="btn" onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="deleteCourse({{ $member_course->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="Elimina"><i class="fa-regular fa-trash-can"></i></button>
|
|
|
|
|
|
|
+ <td style="text-align:right;width:5%;">
|
|
|
|
|
+ @php
|
|
|
|
|
+ $status = $member_course->getStatus();
|
|
|
|
|
+ @endphp
|
|
|
|
|
+ <a href="/rates?member_id={{$member_course->member_id}}&member_course_id={{$member_course->id}}"><span class="badge tessera-badge {{$status == 0 ? 'due' : ($status == 1 ? 'active' : 'suspended')}}">{{$status == 0 ? 'Da pagare' : ($status == 1 ? 'Pagato' : 'Sospeso')}}</span></a>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="text-align:right;width:15%;">
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col-4">
|
|
|
|
|
+ <button style="float:left;" type="button" class="btn" wire:click="editCourse({{ $member_course->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="Modifica"><i class="fa-regular fa-pen-to-square"></i></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-4">
|
|
|
|
|
+ <button type="button" class="btn" onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="deleteCourse({{ $member_course->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="Elimina"><i class="fa-regular fa-trash-can"></i></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="text-align:left;width:15%;padding-top:15px;">
|
|
|
|
|
+ @if($member_course->notes != '')
|
|
|
|
|
+ <button type="button" class="btn" wire:click="showHideCourse({{ $member_course->id }})">
|
|
|
|
|
+ @if(in_array($member_course->id, $showCourse))
|
|
|
|
|
+ <i class="fa-solid fa-chevron-circle-up"></i>
|
|
|
|
|
+ @else
|
|
|
|
|
+ <i class="fa-solid fa-chevron-circle-down"></i>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </button>
|
|
|
|
|
+ @endif
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
- @endif
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td colspan="7">
|
|
|
|
|
- @if($member_course->notes != '')
|
|
|
|
|
- <b>Note</b><br>
|
|
|
|
|
- {{$member_course->notes}}
|
|
|
|
|
- @endif
|
|
|
|
|
- @if($selectedCourseMember == $member_course->id)
|
|
|
|
|
- @if(sizeof($payMonths) > 0 || $createSubscription)
|
|
|
|
|
- <button class="btn--ui primary" style="color:white" wire:click="newPayment({{$member_course}})">Nuova entrata</button>
|
|
|
|
|
- <button class="btn--ui primary" style="color:white" wire:click="block({{$member_course}})">Sospendi</button>
|
|
|
|
|
|
|
+ {{-- <tr>
|
|
|
|
|
+ <td style="width:30%" colspan="2">
|
|
|
|
|
+ {{date("d/m/Y", strtotime($member_course->date_from))}} - {{date("d/m/Y", strtotime($member_course->date_to))}}
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="width:30%"colspan="5">
|
|
|
|
|
+ @php
|
|
|
|
|
+ $ok = false;
|
|
|
|
|
+ @endphp
|
|
|
|
|
+ @foreach(json_decode($member_course->when) as $xx => $x)
|
|
|
|
|
+ @if($xx > 0)
|
|
|
|
|
+ <br>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @foreach($x->day as $zz => $d)
|
|
|
|
|
+ {{$zz > 0 ? '-' : ''}}{{$d}}
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ @if($x->from != '' && $x->to != '')
|
|
|
|
|
+ h {{$x->from}} - {{$x->to}}
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @php
|
|
|
|
|
+ $ok = $x->from != '';
|
|
|
|
|
+ @endphp
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ @if(!$ok && $member_course->course->when != '')
|
|
|
|
|
+ @foreach(json_decode($member_course->course->when) as $xx => $x)
|
|
|
|
|
+ @php
|
|
|
|
|
+ $ok = true;
|
|
|
|
|
+ @endphp
|
|
|
|
|
+ @if($xx > 0)
|
|
|
|
|
+ <br>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @foreach($x->day as $zz => $d)
|
|
|
|
|
+ {{$zz > 0 ? '-' : ''}}{{$d}}
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ @if($x->from != '')
|
|
|
|
|
+ h {{$x->from}} - {{$x->to}}
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @endforeach
|
|
|
@endif
|
|
@endif
|
|
|
- @if(sizeof($suspendedMonths) > 0)
|
|
|
|
|
- <button class="btn--ui primary" style="color:white" wire:click="reactivate({{$member_course}})">Riattiva</button>
|
|
|
|
|
- @endif<br>
|
|
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr> --}}
|
|
|
|
|
+ @if(in_array($member_course->id, $showCourse))
|
|
|
|
|
+ @if(false)
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td colspan="5">
|
|
|
|
|
+ <a class="{{$this->getSubscriptionStatus($member_course->subscribed, $member_course->id)}}" wire:click="setCreateSubscription({{$member_course->subscribed}}, {{$member_course->id}})" style="float:none; width:150px;{{$this->getSubscriptionStatus($member_course->subscribed,$member_course->id) == 'blue' || $this->getSubscriptionStatus($member_course->subscribed,$member_course->id) == 'orange' || $this->getSubscriptionStatus($member_course->subscribed,$member_course->id) == 'yellow' ? 'cursor:pointer' : ''}}">Iscrizione</a><br>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(9, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(9, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(9, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Set</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(10, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(10, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(10, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Ott</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(11, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(11, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(11, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Nov</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(12, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(12, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(12, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Dic</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(1, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(1, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(1, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Gen</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(2, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(2, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(2, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Feb</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(3, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(3, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(3, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Mar</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(4, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(4, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(4, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Apr</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(5, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(5, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(5, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Mag</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(6, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(6, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(6, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Giu</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(7, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(7, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(7, $member_course->months, $member_course->id), ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Lug</a>
|
|
|
|
|
+ <a class="{{$this->getMonthStatus(8, $member_course->months, $member_course->id)}}" wire:click="setPayMonth(8, '{{ $member_course->months }}', {{$member_course->id}})" {{in_array($this->getMonthStatus(8, $member_course->months, $member_course->id) , ['blue', 'orange', 'yellow', 'orange half']) ? 'style=cursor:pointer' : ''}}>Ago</a>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <button type="button" class="btn" wire:click="editCourse({{ $member_course->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="Modifica"><i class="fa-regular fa-pen-to-square"></i></button>
|
|
|
|
|
+ <button type="button" class="btn" onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="deleteCourse({{ $member_course->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="Elimina"><i class="fa-regular fa-trash-can"></i></button>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
@endif
|
|
@endif
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- @endif
|
|
|
|
|
- @endforeach
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td colspan="7">
|
|
|
|
|
+ @if($member_course->notes != '')
|
|
|
|
|
+ <b>Note</b><br>
|
|
|
|
|
+ {{$member_course->notes}}
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @if($selectedCourseMember == $member_course->id)
|
|
|
|
|
+ @if(sizeof($payMonths) > 0 || $createSubscription)
|
|
|
|
|
+ <button class="btn--ui primary" style="color:white" wire:click="newPayment({{$member_course}})">Nuova entrata</button>
|
|
|
|
|
+ <button class="btn--ui primary" style="color:white" wire:click="block({{$member_course}})">Sospendi</button>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @if(sizeof($suspendedMonths) > 0)
|
|
|
|
|
+ <button class="btn--ui primary" style="color:white" wire:click="reactivate({{$member_course}})">Riattiva</button>
|
|
|
|
|
+ @endif<br>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
@if($dataId > 0)
|
|
@if($dataId > 0)
|
|
|
|
|
+ <div class="row mt-5">
|
|
|
|
|
+ <div class="col-md-12">
|
|
|
{{-- @if ($active["status"] == 1 || $hasCertificate) --}}
|
|
{{-- @if ($active["status"] == 1 || $hasCertificate) --}}
|
|
|
<button class="btn--ui primary" wire:click.prevent="addCourse()" style="max-width:200px">Aggiungi</button>
|
|
<button class="btn--ui primary" wire:click.prevent="addCourse()" style="max-width:200px">Aggiungi</button>
|
|
|
{{-- @else --}}
|
|
{{-- @else --}}
|
|
|
{{-- <button class="btn--ui lightGrey" disabled style="max-width:200px">Aggiungi corso (non disponibile)</button>
|
|
{{-- <button class="btn--ui lightGrey" disabled style="max-width:200px">Aggiungi corso (non disponibile)</button>
|
|
|
<small class="text-muted d-block mt-1">Completa prima il tesseramento o carica un certificato medico valido</small> --}}
|
|
<small class="text-muted d-block mt-1">Completa prima il tesseramento o carica un certificato medico valido</small> --}}
|
|
|
{{-- @endif --}}
|
|
{{-- @endif --}}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
@endif
|
|
@endif
|
|
|
@else
|
|
@else
|
|
|
<div class="form--wrapper">
|
|
<div class="form--wrapper">
|
|
|
<form class="form--utente">
|
|
<form class="form--utente">
|
|
|
- <div class="row ">
|
|
|
|
|
- <div class="col-12 mt-2">
|
|
|
|
|
- <label for="course_name" class="form-label">Tipo corso</label><br>
|
|
|
|
|
- <label class="form-radio-wrapper"><input type="radio" name="chkType" value="standard" wire:model="course_course_type">Singolo</label>
|
|
|
|
|
- <label class="form-radio-wrapper"><input type="radio" name="chkType" value="custom" wire:model="course_course_type">Personalizzato</label>
|
|
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col-4 mt-2">
|
|
|
|
|
+ <label for="subscription_id" class="form-label">Abbonamento</label><br>
|
|
|
|
|
+ <select id="subscription_id" class="form-select" aria-label="Abbonamento" wire:model="subscription_id" >
|
|
|
|
|
+ <option value=""></option>
|
|
|
|
|
+ <option value="course">Abbonamento corso singolo</option>
|
|
|
|
|
+ @foreach($subscriptions as $subscription)
|
|
|
|
|
+ <option value="{{$subscription->id}}">{{$subscription->name}}</option>
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ </select>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="row mt-3">
|
|
|
|
|
- <div class="col-md-4">
|
|
|
|
|
- <label for="course_name" class="form-label">Corso</label>
|
|
|
|
|
- <select id="course_name" class="form-select" aria-label="Livello" wire:model="course_name" >
|
|
|
|
|
- <option value="">
|
|
|
|
|
- @foreach($course_names as $cn)
|
|
|
|
|
- <option value="{{$cn}}">{{$cn}}
|
|
|
|
|
- @endforeach
|
|
|
|
|
- </select>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @if($subscription_id == 'course')
|
|
|
|
|
+ <div class="mt-4">
|
|
|
|
|
+ <div class="col-12 mt-2">
|
|
|
|
|
+ <label for="course_name" class="form-label">Tipo corso</label><br>
|
|
|
|
|
+ <label class="form-radio-wrapper"><input type="radio" name="chkType" value="standard" wire:model="course_course_type">Singolo</label>
|
|
|
|
|
+ <label class="form-radio-wrapper"><input type="radio" name="chkType" value="custom" wire:model="course_course_type">Personalizzato</label>
|
|
|
</div>
|
|
</div>
|
|
|
- @if(false)
|
|
|
|
|
- <label for="course_name" class="form-label">Corso</label>
|
|
|
|
|
- <select id="course_course_id" class="form-select @error('course_course_id') is-invalid @enderror" aria-label="Corso" wire:model="course_course_id" >
|
|
|
|
|
- <option value="">
|
|
|
|
|
- @foreach($courses as $c)
|
|
|
|
|
- <option value="{{$c->id}}">{{$c->name}}
|
|
|
|
|
- @endforeach
|
|
|
|
|
- </select>
|
|
|
|
|
- @endif
|
|
|
|
|
- @error('course_course_id')
|
|
|
|
|
- <div class="invalid-feedback">Devi selezionare un corso</div>
|
|
|
|
|
- @enderror
|
|
|
|
|
- @if($course_exist)
|
|
|
|
|
- <small style="color:red">Attenzione : il corso selezionato è già associato all'utente</small>
|
|
|
|
|
- @endif
|
|
|
|
|
- @if($course_name != '')
|
|
|
|
|
|
|
+ <div class="row mt-3">
|
|
|
<div class="col-md-4">
|
|
<div class="col-md-4">
|
|
|
- <label for="course_level_id" class="form-label">Livello</label>
|
|
|
|
|
- <select id="course_level_id" class="form-select" aria-label="Livello" wire:model="course_level_id" >
|
|
|
|
|
|
|
+ <label for="course_name" class="form-label">Corso</label>
|
|
|
|
|
+ <select id="course_name" class="form-select" aria-label="Livello" wire:model="course_name" >
|
|
|
<option value="">
|
|
<option value="">
|
|
|
- @foreach($course_levels as $l)
|
|
|
|
|
- <option value="{{$l->id}}">{{$l->name}}
|
|
|
|
|
|
|
+ @foreach($course_names as $cn)
|
|
|
|
|
+ <option value="{{$cn}}">{{$cn}}
|
|
|
@endforeach
|
|
@endforeach
|
|
|
</select>
|
|
</select>
|
|
|
</div>
|
|
</div>
|
|
|
- @endif
|
|
|
|
|
- @if($course_level_id != '')
|
|
|
|
|
- <div class="col-md-4">
|
|
|
|
|
- <label for="course_frequency_id" class="form-label">Frequenza</label>
|
|
|
|
|
- <select id="course_frequency_id" class="form-select" aria-label="Tipologia" wire:model="course_frequency_id" >
|
|
|
|
|
|
|
+ @error('course_course_id')
|
|
|
|
|
+ <div class="invalid-feedback">Devi selezionare un corso</div>
|
|
|
|
|
+ @enderror
|
|
|
|
|
+ @if($course_exist)
|
|
|
|
|
+ <small style="color:red">Attenzione : il corso selezionato è già associato all'utente</small>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @if($course_name != '')
|
|
|
|
|
+ <div class="col-md-4">
|
|
|
|
|
+ <label for="course_level_id" class="form-label">Livello</label>
|
|
|
|
|
+ <select id="course_level_id" class="form-select" aria-label="Livello" wire:model="course_level_id" >
|
|
|
|
|
+ <option value="">
|
|
|
|
|
+ @foreach($course_levels as $l)
|
|
|
|
|
+ <option value="{{$l->id}}">{{$l->name}}
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @if($course_level_id != '')
|
|
|
|
|
+ <div class="col-md-4">
|
|
|
|
|
+ <label for="course_frequency_id" class="form-label">Frequenza</label>
|
|
|
|
|
+ <select id="course_frequency_id" class="form-select" aria-label="Tipologia" wire:model="course_frequency_id" >
|
|
|
|
|
+ <option value="">
|
|
|
|
|
+ @foreach($course_frequencies as $f)
|
|
|
|
|
+ <option value="{{$f->id}}">{{$f->name}}
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @if($course_course_id > 0)
|
|
|
|
|
+ <div class="row mt-4">
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="course_course_subscription_id" class="form-label">Pagamenti</label>
|
|
|
|
|
+ <select id="course_course_subscription_id" class="form-select @error('course_course_subscription_id') is-invalid @enderror" aria-label="Pagamenti" wire:model="course_course_subscription_id">
|
|
|
<option value="">
|
|
<option value="">
|
|
|
- @foreach($course_frequencies as $f)
|
|
|
|
|
- <option value="{{$f->id}}">{{$f->name}}
|
|
|
|
|
|
|
+ @foreach($course_subscriptions as $t)
|
|
|
|
|
+ <option value="{{$t["id"]}}">{{$t["name"]}}
|
|
|
@endforeach
|
|
@endforeach
|
|
|
</select>
|
|
</select>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="course_price" class="form-label">Costo</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="course_price" placeholder="Costo" wire:model="course_price" onkeyup="onlyNumberAmount(this)">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @if(false)
|
|
|
|
|
+ <div class="row mt-4 course--duration">
|
|
|
|
|
+ <div class="col-md-12">
|
|
|
|
|
+ <label for="duration" class="form-label">Durata del corso</label>
|
|
|
|
|
+ <div class="d-flex course--duration_mounth">
|
|
|
|
|
+ @foreach($course_months_list as $cm)
|
|
|
|
|
+ <a class="{{$this->checkMonth($cm) ? 'selected' : 'notSelected'}}" wire:click="setMonth({{$cm}})">{{getMonthName($cm, true)}}</a>
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
@endif
|
|
@endif
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- @if($course_course_id > 0)
|
|
|
|
|
|
|
+ <div class="row mt-4">
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="course_date_from" class="form-label">Data inizio</label>
|
|
|
|
|
+ <input class="form-control" type="date" id="course_date_from" wire:model="course_date_from">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="course_date_to" class="form-label">Data fine</label>
|
|
|
|
|
+ <input class="form-control" type="date" id="course_date_to" wire:model="course_date_to">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="row mt-4">
|
|
|
|
|
+ <div class="col-md-6">
|
|
|
|
|
+ <label for="course_subscription_price" class="form-label">Costo iscrizione</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="course_subscription_price" placeholder="Costo iscrizione" wire:model="course_subscription_price" onkeyup="onlyNumberAmount(this)">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @if($course_course_type == 'custom')
|
|
|
|
|
+ @foreach($course_when as $idW => $when)
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col-12">
|
|
|
|
|
+ <div class="day durata--corso d-flex">
|
|
|
|
|
+ <label for="" class="form-label">Giorno</label>
|
|
|
|
|
+ <div class="durata--corso_days mb-3">
|
|
|
|
|
+ <a class="{{in_array('lun', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'lun')">Lun</a>
|
|
|
|
|
+ <a class="{{in_array('mar', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'mar')">Mar</a>
|
|
|
|
|
+ <a class="{{in_array('mer', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'mer')">Mer</a>
|
|
|
|
|
+ <a class="{{in_array('gio', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'gio')">Gio</a>
|
|
|
|
|
+ <a class="{{in_array('ven', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'ven')">Ven</a>
|
|
|
|
|
+ <a class="{{in_array('sab', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'sab')">Sab</a>
|
|
|
|
|
+ <a class="{{in_array('dom', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'dom')">Dom</a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="durata--corso_select">
|
|
|
|
|
+ <div class="from--h me-3">
|
|
|
|
|
+ <label for="" class="form-label">Dalle</label>
|
|
|
|
|
+ <select class="form-select" wire:model="course_when.{{$idW}}.from">
|
|
|
|
|
+ <option value="">--Seleziona--
|
|
|
|
|
+ @for($c=6;$c<=23;$c++)
|
|
|
|
|
+ <option value="{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:00">{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:00
|
|
|
|
|
+ <option value="{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:30">{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:30
|
|
|
|
|
+ @endfor
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="to--h">
|
|
|
|
|
+ <label for="" class="form-label">Alle</label>
|
|
|
|
|
+ <select class="form-select" wire:model="course_when.{{$idW}}.to">
|
|
|
|
|
+ <option value="">--Seleziona--
|
|
|
|
|
+ @for($c=6;$c<=23;$c++)
|
|
|
|
|
+ <option value="{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:00">{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:00
|
|
|
|
|
+ <option value="{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:30">{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:30
|
|
|
|
|
+ @endfor
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button class="btn--ui primary remove--day position-absolute" wire:click.prevent="delRow({{$idW}})"><i class="fa-solid fa-minus"></i></button>
|
|
|
|
|
+ <button class="btn--ui primary add--day position-absolute" wire:click.prevent="addRow()"><i class="fa-solid fa-plus"></i></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ @endif
|
|
|
|
|
+ <div class="row mt-2">
|
|
|
|
|
+ <div class="col-md-12">
|
|
|
|
|
+ <label for="course_date_from" class="form-label">Note</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="course_note" placeholder="Note" wire:model="course_note">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @elseif($subscription_id != '')
|
|
|
<div class="row mt-4">
|
|
<div class="row mt-4">
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="course_course_subscription_id" class="form-label">Pagamenti</label>
|
|
|
|
|
- <select id="course_course_subscription_id" class="form-select @error('course_course_subscription_id') is-invalid @enderror" aria-label="Pagamenti" wire:model="course_course_subscription_id">
|
|
|
|
|
|
|
+ <label for="subscription_course_subscription_id" class="form-label">Pagamenti</label>
|
|
|
|
|
+ <select id="subscription_course_subscription_id" class="form-select @error('subscription_course_subscription_id') is-invalid @enderror" aria-label="Pagamenti" wire:model="subscription_course_subscription_id">
|
|
|
<option value="">
|
|
<option value="">
|
|
|
- @foreach($course_subscriptions as $t)
|
|
|
|
|
|
|
+ @foreach($subscription_subscriptions as $t)
|
|
|
<option value="{{$t["id"]}}">{{$t["name"]}}
|
|
<option value="{{$t["id"]}}">{{$t["name"]}}
|
|
|
@endforeach
|
|
@endforeach
|
|
|
</select>
|
|
</select>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="course_price" class="form-label">Costo</label>
|
|
|
|
|
- <input class="form-control" type="text" id="course_price" placeholder="Costo" wire:model="course_price" onkeyup="onlyNumberAmount(this)">
|
|
|
|
|
|
|
+ <label for="subscription_price" class="form-label">Costo</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="subscription_price" placeholder="Costo" wire:model="subscription_price" onkeyup="onlyNumberAmount(this)">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- @if(false)
|
|
|
|
|
- <div class="row mt-4 course--duration">
|
|
|
|
|
- <div class="col-md-12">
|
|
|
|
|
- <label for="duration" class="form-label">Durata del corso</label>
|
|
|
|
|
- <div class="d-flex course--duration_mounth">
|
|
|
|
|
- @foreach($course_months_list as $cm)
|
|
|
|
|
- <a class="{{$this->checkMonth($cm) ? 'selected' : 'notSelected'}}" wire:click="setMonth({{$cm}})">{{getMonthName($cm, true)}}</a>
|
|
|
|
|
- @endforeach
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- @endif
|
|
|
|
|
<div class="row mt-4">
|
|
<div class="row mt-4">
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="course_date_from" class="form-label">Data inizio</label>
|
|
|
|
|
- <input class="form-control" type="date" id="course_date_from" wire:model="course_date_from">
|
|
|
|
|
|
|
+ <label for="subscription_date_from" class="form-label">Data inizio</label>
|
|
|
|
|
+ <input class="form-control" type="date" id="subscription_date_from" wire:model="subscription_date_from">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="course_date_to" class="form-label">Data fine</label>
|
|
|
|
|
- <input class="form-control" type="date" id="course_date_to" wire:model="course_date_to">
|
|
|
|
|
|
|
+ <label for="subscription_date_to" class="form-label">Data fine</label>
|
|
|
|
|
+ <input class="form-control" type="date" id="subscription_date_to" wire:model="subscription_date_to">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row mt-4">
|
|
<div class="row mt-4">
|
|
|
<div class="col-md-6">
|
|
<div class="col-md-6">
|
|
|
- <label for="course_subscription_price" class="form-label">Costo iscrizione</label>
|
|
|
|
|
- <input class="form-control" type="text" id="course_subscription_price" placeholder="Costo iscrizione" wire:model="course_subscription_price" onkeyup="onlyNumberAmount(this)">
|
|
|
|
|
|
|
+ <label for="subscription_subscription_price" class="form-label">Costo iscrizione</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="subscription_subscription_price" placeholder="Costo iscrizione" wire:model="subscription_subscription_price" onkeyup="onlyNumberAmount(this)">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- @if($course_course_type == 'custom')
|
|
|
|
|
- @foreach($course_when as $idW => $when)
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <div class="col-12">
|
|
|
|
|
- <div class="day durata--corso d-flex">
|
|
|
|
|
- <label for="" class="form-label">Giorno</label>
|
|
|
|
|
- <div class="durata--corso_days mb-3">
|
|
|
|
|
- <a class="{{in_array('lun', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'lun')">Lun</a>
|
|
|
|
|
- <a class="{{in_array('mar', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'mar')">Mar</a>
|
|
|
|
|
- <a class="{{in_array('mer', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'mer')">Mer</a>
|
|
|
|
|
- <a class="{{in_array('gio', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'gio')">Gio</a>
|
|
|
|
|
- <a class="{{in_array('ven', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'ven')">Ven</a>
|
|
|
|
|
- <a class="{{in_array('sab', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'sab')">Sab</a>
|
|
|
|
|
- <a class="{{in_array('dom', $course_when[$idW]["day"]) ? 'selected' : 'notSelected'}}" wire:click="setDay({{$idW}}, 'dom')">Dom</a>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="durata--corso_select">
|
|
|
|
|
- <div class="from--h me-3">
|
|
|
|
|
- <label for="" class="form-label">Dalle</label>
|
|
|
|
|
- <select class="form-select" wire:model="course_when.{{$idW}}.from">
|
|
|
|
|
- <option value="">--Seleziona--
|
|
|
|
|
- @for($c=6;$c<=23;$c++)
|
|
|
|
|
- <option value="{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:00">{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:00
|
|
|
|
|
- <option value="{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:30">{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:30
|
|
|
|
|
- @endfor
|
|
|
|
|
- </select>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="to--h">
|
|
|
|
|
- <label for="" class="form-label">Alle</label>
|
|
|
|
|
- <select class="form-select" wire:model="course_when.{{$idW}}.to">
|
|
|
|
|
- <option value="">--Seleziona--
|
|
|
|
|
- @for($c=6;$c<=23;$c++)
|
|
|
|
|
- <option value="{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:00">{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:00
|
|
|
|
|
- <option value="{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:30">{{str_pad($c, 2, "0", STR_PAD_LEFT)}}:30
|
|
|
|
|
- @endfor
|
|
|
|
|
- </select>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <button class="btn--ui primary remove--day position-absolute" wire:click.prevent="delRow({{$idW}})"><i class="fa-solid fa-minus"></i></button>
|
|
|
|
|
- <button class="btn--ui primary add--day position-absolute" wire:click.prevent="addRow()"><i class="fa-solid fa-plus"></i></button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- @endforeach
|
|
|
|
|
- @endif
|
|
|
|
|
- <div class="row mt-2">
|
|
|
|
|
|
|
+ <div class="row mt-4">
|
|
|
<div class="col-md-12">
|
|
<div class="col-md-12">
|
|
|
- <label for="course_date_from" class="form-label">Note</label>
|
|
|
|
|
- <input class="form-control" type="text" id="course_note" placeholder="Note" wire:model="course_note">
|
|
|
|
|
|
|
+ <label for="subscription_notes" class="form-label">Note</label>
|
|
|
|
|
+ <input class="form-control" type="text" id="subscription_notes" placeholder="Note" wire:model="subscription_notes">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
@endif
|
|
@endif
|
|
|
</form>
|
|
</form>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
<br>
|
|
<br>
|
|
|
- <div class="row mt-2">
|
|
|
|
|
|
|
+ <div class="row mt-5">
|
|
|
<div class="col-md-12">
|
|
<div class="col-md-12">
|
|
|
<button class="btn--ui lightGrey" wire:click.prevent="cancelCourse()">Annulla</button>
|
|
<button class="btn--ui lightGrey" wire:click.prevent="cancelCourse()">Annulla</button>
|
|
|
|
|
+
|
|
|
@if($course_course_id > 0)
|
|
@if($course_course_id > 0)
|
|
|
@if($addCourse)
|
|
@if($addCourse)
|
|
|
@if(!$course_exist)
|
|
@if(!$course_exist)
|
|
@@ -1415,6 +1530,17 @@
|
|
|
<button class="btn--ui primary" wire:click.prevent="updateCourse()">Salva corso</button>
|
|
<button class="btn--ui primary" wire:click.prevent="updateCourse()">Salva corso</button>
|
|
|
@endif
|
|
@endif
|
|
|
@endif
|
|
@endif
|
|
|
|
|
+
|
|
|
|
|
+ @if($subscription_id > 0 && $subscription_id != 'course')
|
|
|
|
|
+ @if($addCourse)
|
|
|
|
|
+ @if(!$subscription_exist)
|
|
|
|
|
+ <button class="btn--ui primary" wire:click.prevent="storeSubscription()">Salva abbonamento</button>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @if($updateCourse)
|
|
|
|
|
+ <button class="btn--ui primary" wire:click.prevent="updateSubscription()">Salva abbonamento</button>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @endif
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
@endif
|
|
@endif
|
|
@@ -1524,7 +1650,7 @@
|
|
|
@endforeach
|
|
@endforeach
|
|
|
</div>
|
|
</div>
|
|
|
<div class="resume--tab_info gruppi corsi">
|
|
<div class="resume--tab_info gruppi corsi">
|
|
|
- <h2 class="mb-3"><i class="fa-solid fa-chalkboard"></i><span>Corsi</span></h2>
|
|
|
|
|
|
|
+ <h2 class="mb-3"><i class="fa-solid fa-chalkboard"></i><span>Corsi e Abbonamenti</span></h2>
|
|
|
@foreach($member_courses as $member_course)
|
|
@foreach($member_courses as $member_course)
|
|
|
@php
|
|
@php
|
|
|
$course_year = date('Y', strtotime($member_course->date_from));
|
|
$course_year = date('Y', strtotime($member_course->date_from));
|