|
@@ -1139,22 +1139,44 @@
|
|
|
<tbody id="checkall-target">
|
|
<tbody id="checkall-target">
|
|
|
@foreach($member_courses as $member_course)
|
|
@foreach($member_courses as $member_course)
|
|
|
<tr>
|
|
<tr>
|
|
|
- <td style="width:10%">
|
|
|
|
|
|
|
+ <td style="width:70%;border:0px;" colspan="3">
|
|
|
<b>{{$member_course->course->name}}</b><br>
|
|
<b>{{$member_course->course->name}}</b><br>
|
|
|
</td>
|
|
</td>
|
|
|
- <td style="width:10%">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <td style="text-align:right;width:15%;border:0px;">
|
|
|
|
|
+ @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>
|
|
|
|
|
+ @if($member_course->notes != '')
|
|
|
|
|
+ <button type="button" class="btn" wire:click="showHideCourse({{ $member_course->id }})"><i class="fa-solid fa-chevron-down"></i></button>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="text-align:right;width:15%;border:0px;">
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col-6">
|
|
|
|
|
+ <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-6">
|
|
|
|
|
+ <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>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td style="width:20%">
|
|
|
{{$member_course->course->frequency->name ?? ""}}<br>
|
|
{{$member_course->course->frequency->name ?? ""}}<br>
|
|
|
</td>
|
|
</td>
|
|
|
- <td style="width:10%">
|
|
|
|
|
|
|
+ <td style="width:20%">
|
|
|
{{$member_course->course->level->name ?? ""}}<br>
|
|
{{$member_course->course->level->name ?? ""}}<br>
|
|
|
</td>
|
|
</td>
|
|
|
<td style="width:30%">
|
|
<td style="width:30%">
|
|
|
@php
|
|
@php
|
|
|
- $when = $member_course->when;
|
|
|
|
|
- if ($when == '[{"to": "", "day": [], "from": ""}]')
|
|
|
|
|
- $when = $member_course->course->when;
|
|
|
|
|
|
|
+ $ok = false;
|
|
|
@endphp
|
|
@endphp
|
|
|
- @foreach(json_decode($when) as $xx => $x)
|
|
|
|
|
|
|
+ @foreach(json_decode($member_course->when) as $xx => $x)
|
|
|
@if($xx > 0)
|
|
@if($xx > 0)
|
|
|
<br>
|
|
<br>
|
|
|
@endif
|
|
@endif
|
|
@@ -1162,30 +1184,30 @@
|
|
|
{{$zz > 0 ? '-' : ''}}{{$d}}
|
|
{{$zz > 0 ? '-' : ''}}{{$d}}
|
|
|
@endforeach
|
|
@endforeach
|
|
|
h {{$x->from}} - {{$x->to}}
|
|
h {{$x->from}} - {{$x->to}}
|
|
|
|
|
+ @php
|
|
|
|
|
+ $ok = $x->from != '';
|
|
|
|
|
+ @endphp
|
|
|
@endforeach
|
|
@endforeach
|
|
|
- </td>
|
|
|
|
|
- <td style="width:15%">
|
|
|
|
|
- {{date("d/m/Y", strtotime($member_course->date_from))}} <br> {{date("d/m/Y", strtotime($member_course->date_to))}}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td style="text-align:right;width:10%">
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <div class="col-6">
|
|
|
|
|
- <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-6">
|
|
|
|
|
- <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: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>
|
|
|
|
|
- @if($member_course->notes != '')
|
|
|
|
|
- <button type="button" class="btn" wire:click="showHideCourse({{ $member_course->id }})"><i class="fa-solid fa-chevron-down"></i></button>
|
|
|
|
|
|
|
+ @if(!$ok)
|
|
|
|
|
+ @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
|
|
|
</td>
|
|
</td>
|
|
|
|
|
+ <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>
|
|
|
|
|
|
|
|
</tr>
|
|
</tr>
|
|
|
@if(in_array($member_course->id, $showCourse))
|
|
@if(in_array($member_course->id, $showCourse))
|
|
@@ -1248,7 +1270,7 @@
|
|
|
|
|
|
|
|
<input type="radio" name="chkType" value="custom" wire:model="course_course_type"> Personalizzato
|
|
<input type="radio" name="chkType" value="custom" wire:model="course_course_type"> Personalizzato
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="row">
|
|
|
|
|
|
|
+ <div class="row mt-3">
|
|
|
|
|
|
|
|
<div class="col-md-4">
|
|
<div class="col-md-4">
|
|
|
<label for="course_name" class="form-label">Corso</label>
|
|
<label for="course_name" class="form-label">Corso</label>
|