|
|
@@ -81,10 +81,13 @@
|
|
|
<div class="col-6">
|
|
|
<h3 class="mt-4">{{$detail}}</h3><br>
|
|
|
</div>
|
|
|
- <div class="col-3 right" style="margin-top:20px;text-align:right">
|
|
|
+ <div class="col-2 right" style="margin-top:20px;text-align:right">
|
|
|
+ <button id="btPay" style="display:none;" class="btn--ui" >PAGA</button>
|
|
|
+ </div>
|
|
|
+ <div class="col-2 right" style="margin-top:20px;text-align:right">
|
|
|
<button id="btSuspend" style="display:none;" class="btn--ui" >SOSPENDI/ATTIVA SELEZIONATI</button>
|
|
|
</div>
|
|
|
- <div class="col-3 right" style="margin-top:20px;text-align:right">
|
|
|
+ <div class="col-2 right" style="margin-top:20px;text-align:right">
|
|
|
<button id="btRemove" style="display:none;" class="btn--ui" >ELIMINA SELEZIONATI</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -135,6 +138,17 @@
|
|
|
data-bs-content="Visualizza ricevuta"><i class="fa-regular fa-eye"></i></button>
|
|
|
@endif
|
|
|
@if($record->status == 0)
|
|
|
+
|
|
|
+ <input type="hidden" id="memberId_{{$record->id}}" value="{{$record->member_id}}">
|
|
|
+ <input type="hidden" id="causalId_{{$record->id}}" value="{{!$record->is_subscription ? $record->member_course->course->causal_id : ''}}">
|
|
|
+ <input type="hidden" id="subCausalId_{{$record->id}}" value="{{$record->is_subscription ? $record->member_course->course->sub_causal_id : ''}}">
|
|
|
+ <input type="hidden" id="createSubscription_{{$record->id}}" value="{{$record->is_subscription ? '1' : ''}}">
|
|
|
+ <input type="hidden" id="months_{{$record->id}}" value="{{implode("|", json_decode($record->months))}}">
|
|
|
+ <input type="hidden" id="price_{{$record->id}}" value="{{!$record->is_subscription ? $record->price : ''}}">
|
|
|
+ <input type="hidden" id="subscription_price_{{$record->id}}" value="{{$record->is_subscription ? $record->price : ''}}">
|
|
|
+ <input type="hidden" id="courseId_{{$record->id}}" value="{{$record->member_course_id}}">
|
|
|
+ <input type="hidden" id="rateId_{{$record->id}}" value="{{$record->id}}">
|
|
|
+
|
|
|
<a class="btn u" href="/in?new=1&memberId={{$record->member_id}}&causalId={{!$record->is_subscription ? $record->member_course->course->causal_id : ''}}&subCausalId={{$record->is_subscription ? $record->member_course->course->sub_causal_id : ''}}&createSubscription={{$record->is_subscription ? '1' : ''}}&months={{implode("|", json_decode($record->months))}}&price={{!$record->is_subscription ? $record->price : ''}}&subscription_price={{$record->is_subscription ? $record->price : ''}}&courseId={{$record->member_course_id}}&rateId={{$record->id}}&backToRates" data-bs-toggle="popover"
|
|
|
data-bs-trigger="hover focus" data-bs-placement="bottom"
|
|
|
data-bs-content="Crea entrata"><i class="fa-regular fa-file-lines"></i></a>
|
|
|
@@ -474,11 +488,13 @@
|
|
|
{
|
|
|
$("#btRemove").show();
|
|
|
$("#btSuspend").show();
|
|
|
+ $("#btPay").show();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
$("#btRemove").hide();
|
|
|
$("#btSuspend").hide();
|
|
|
+ $("#btPay").hide();
|
|
|
}
|
|
|
|
|
|
});
|
|
|
@@ -496,11 +512,13 @@
|
|
|
{
|
|
|
$("#btRemove").show();
|
|
|
$("#btSuspend").show();
|
|
|
+ $("#btPay").show();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
$("#btRemove").hide();
|
|
|
$("#btSuspend").hide();
|
|
|
+ $("#btPay").hide();
|
|
|
$(".chkAll").prop( "checked", false );
|
|
|
}
|
|
|
|
|
|
@@ -536,6 +554,58 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ $('#btPay').click(function(){
|
|
|
+ var ids = [];
|
|
|
+
|
|
|
+ var memberId = 0;
|
|
|
+ var causalId = '';
|
|
|
+ var subCausalId = '';
|
|
|
+ var createSubscription = '';
|
|
|
+ var months = '';
|
|
|
+ var price = '0';
|
|
|
+ var subscription_price = '';
|
|
|
+ var courseId = 0;
|
|
|
+ var rateId = 0;
|
|
|
+
|
|
|
+ $('.chkIds').each(function () {
|
|
|
+ if (this.checked)
|
|
|
+ {
|
|
|
+ var id = $(this).val();
|
|
|
+ memberId = $("#memberId_" + id).val();
|
|
|
+
|
|
|
+ if ($("#subscription_price_" + id).val() != '')
|
|
|
+ {
|
|
|
+ subCausalId = $("#subCausalId_" + id).val();;
|
|
|
+ createSubscription = $("#createSubscription_" + id).val();
|
|
|
+ subscription_price = $("#subscription_price_" + id).val();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ causalId = $("#causalId_" + id).val();
|
|
|
+ if (months != '')
|
|
|
+ months += "|";
|
|
|
+ months += $("#months_" + id).val();;
|
|
|
+ price += $("#price_" + id).val();;
|
|
|
+ }
|
|
|
+ courseId = $("#courseId_" + id).val();;
|
|
|
+ if (rateId != '')
|
|
|
+ rateId += ",";
|
|
|
+ rateId += $("#rateId_" + id).val();;
|
|
|
+ }
|
|
|
+ //ids.push($(this).val());
|
|
|
+ });
|
|
|
+
|
|
|
+ document.location.href = "/in?new=1&memberId=" + memberId + "&causalId=" + causalId + "&subCausalId=" + subCausalId + "&createSubscription=" + createSubscription + "&months=" + months + "&price=" + price + "&subscription_price=" + subscription_price + "&courseId=" + courseId + "&rateId=" + rateId;
|
|
|
+
|
|
|
+ /*if (confirm('Sei sicuro?'))
|
|
|
+ {
|
|
|
+ @this.suspendMultiple(ids);
|
|
|
+ setTimeout(() => {
|
|
|
+ location.reload();
|
|
|
+ }, 200);
|
|
|
+ }*/
|
|
|
+ });
|
|
|
+
|
|
|
} );
|
|
|
|
|
|
|