| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- <div class="col card--ui" id="card--dashboard">
- <header id="title--section" style="display:none !important"
- class="d-flex align-items-center justify-content-between">
- <div class="title--section_name d-flex align-items-center justify-content-between">
- <i class="ico--ui title_section utenti me-2"></i>
- <h2 class="primary">Rate</h2>
- </div>
- <!--
- <div class="title--section_addButton" wire:click="add()" style="cursor: pointer;">
- <div class="btn--ui entrata d-flex justify-items-between">
- <a href="#" wire:click="add()" style="color:white">Aggiungi</a>
- </div>
- </div>
- -->
- </header>
- <a class="btn--ui lightGrey" href="/course_member?id={{$mc->course_id}}"><i class="fa-solid fa-arrow-left"></i></a><br>
- <div class="showFilter" style="display:none" wire:ignore.self>
- <hr size="1">
- <div class="row g-3">
- <div class="col-md-2">
- <div class="row">
- <div class="col-md-12" style="margin-bottom:10px;">
- <b>Periodo</b>
- </div>
- <div class="col-12 mb-2">
- <input id="dateFrom" type="date" class="form-control filterFrom" name="txtFrom">
- </div>
- <div class="col-12">
- <input id="dateTo" type="date" class="form-control filterTo" name="txtTo">
- </div>
- <div class="col-6 mt-2">
- <button class="btn--ui lightGrey todayButton" style="width:100%"
- onclick="setToday('{{date("Y-m-d")}}')">OGGI</button>
- </div>
- <div class="col-6 mt-2">
- <button class="btn--ui lightGrey yesterdayButton" style="width:100%"
- onclick="setYesterday('{{date("Y-m-d", strtotime("-1 days"))}}')">IERI</button>
- </div>
- </div>
- </div>
- <div class="col-md-2">
- <div class="row">
- <div class="col-md-12" style="margin-bottom:10px;">
- <b>Stato</b>
- </div>
- <div class="col-12">
- <select class="form-select filterStatus">
- <option value="">--Seleziona--
- <option value="1">Attiva
- <option value="99">Annullata
- </select>
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <div class="row">
- <div class="col-md-12" style="margin-bottom:10px;">
- <b>Cerca Utente</b>
- </div>
- <div class="col-12">
- <select class="form-select filterMember" wire:model="filteredMemberId">
- <option value="">--Seleziona Utente--</option>
- @foreach($members as $member)
- <option value="{{ $member->id }}">{{ $member->last_name }} {{ $member->first_name }}
- </option>
- @endforeach
- </select>
- </div>
- </div>
- </div>
- </div>
- <div class="row g-3">
- <div class="col-md-12" style="text-align:right">
- <button class="btn--ui_outline light" onclick="reset()">RESET</button>
- <button class="btn--ui" onclick="loadDataTable()">FILTRA</button>
- </div>
- </div>
- <hr size="1">
- </div>
- <section id="resume-table">
- <div class="compare--chart_wrapper d-none"></div>
- <h3>{{$detail}}</h3><br>
- <table class="table tablesaw tableHead tablesaw-stack table--lista_ricevute" id="tablesaw-350" width="100%">
- <thead>
- <tr>
- <th scope="col"></th>
- <th scope="col">Data scadenza</th>
- <th scope="col">Rata</th>
- <th scope="col">Competenza</th>
- <th scope="col">Prezzo</th>
- <th scope="col">Stato pagamento</th>
- <th scope="col">...</th>
- </tr>
- </thead>
- <tbody id="checkall-target">
- @foreach($records as $record)
- <tr>
- <td></td>
- <td>{{date("d/m/Y", strtotime($record->date))}}</td>
- <td>{{$record->course_subscription ? $record->course_subscription->name : 'Iscrizione'}}</td>
- <td>
- @if(sizeof(json_decode($record->months)) > 1)
- {{getMonthName(json_decode($record->months)[0])}} - {{getMonthName(json_decode($record->months)[sizeof(json_decode($record->months)) - 1])}}
- @else
- @if(sizeof(json_decode($record->months)) > 0)
- {{getMonthName(json_decode($record->months)[0])}}
- @endif
- @endif
- </td>
- <td>{{formatPrice($record->price)}}</td>
- <td>
- <span class="tablesaw-cell-content">
- <span class="badge tessera-badge {{$record->status == 0 ? 'due' : ($record->status == 1 ? 'active' : 'suspended')}}">{{$record->status == 0 ? 'Da pagare' : ($record->status == 1 ? 'Pagato' : 'Sospeso')}}</span>
- </span>
- </td>
- <td>
- @if($record->status == 1)
- <button type="button" class="btn u"
- onclick="document.location.href='/in?id={{$record->record_id}}'" data-bs-toggle="popover"
- data-bs-trigger="hover focus" data-bs-placement="bottom"
- data-bs-content="Visualizza ricevuta"><i class="fa-regular fa-eye"></i></button>
- @endif
- @if($record->status == 0)
- <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}}" 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>
- <a class="btn u" onclick="confirmDelete({{$record->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>
- @endif
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- </section>
- </div>
- @push('scripts')
- <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
- <style>
- .select2-container--default .select2-selection--single {
- background-color: #E9F0F5;
- border: 0.0625rem solid #DFE5EB;
- font-size: 0.75rem;
- }
- .select2-selection {
- height: 38px !important;
- }
- .select2-selection__rendered {
- padding-top: 3px;
- }
- .select2 {
- width: 100% !important;
- }
- </style>
- <script src="https://code.jquery.com/jquery-2.2.4.min.js"
- integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
- <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
- @endpush
- @push('scripts')
- <link href="/css/datatables.css" rel="stylesheet" />
- <script src="https://code.jquery.com/jquery-2.2.4.min.js"
- integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
- <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
- <style>
- .select2-container--default .select2-selection--single {
- background-color: #E9F0F5;
- border: 0.0625rem solid #DFE5EB;
- font-size: 0.75rem;
- }
- .select2-selection {
- height: 38px !important;
- }
- .select2-selection__rendered {
- padding-top: 3px;
- }
- .select2 {
- width: 100% !important;
- }
- .select2-selection--multiple {
- overflow: hidden !important;
- height: auto !important;
- }
- .select2-container {
- box-sizing: border-box;
- display: inline-block;
- margin: 0;
- position: relative;
- vertical-align: middle;
- }
- .select2-container .select2-selection--single {
- box-sizing: border-box;
- cursor: pointer;
- display: block;
- height: 38px;
- user-select: none;
- -webkit-user-select: none;
- }
- .select2-container .select2-selection--single .select2-selection__rendered {
- display: block;
- padding-left: 8px;
- padding-right: 20px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .select2-selection__choice__display {
- color: #000000 !important;
- }
- </style>
- <script src="https://code.jquery.com/jquery-2.2.4.min.js"
- integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
- <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
- <script src="/assets/js/datatables.js"></script>
- <script src="https://cdn.datatables.net/buttons/3.0.2/js/buttons.dataTables.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
- @endpush
- @push('scripts')
- <script>
- function confirmDelete(id)
- {
- if (confirm('Confermi di voler eliminare la rata?'))
- {
- @this.delete(id);
- }
- }
- $(document).ready(function() {
- loadDataTable();
- } );
- Livewire.on('load-data-table', () => {
- loadDataTable();
- });
- function loadDataTable(){
- if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
- $('#tablesaw-350').DataTable().destroy();
- }
- $('#tablesaw-350').DataTable({
- thead: {
- 'th': {'background-color': 'blue'}
- },
- layout: {
- topStart : null,
- topEnd : null,
- top1A: {
- buttons: [
- {
- extend: 'collection',
- text: 'ESPORTA',
- buttons: [
- {
- extend: 'excelHtml5',
- title: 'Metodi di pagamento',
- exportOptions: {
- columns: ":not(':last')"
- }
- },
- {
- extend: 'pdfHtml5',
- title: 'Metodi di pagamento',
- exportOptions: {
- columns: ":not(':last')"
- }
- },
- {
- extend: 'print',
- text: 'Stampa',
- title: 'Metodi di pagamento',
- exportOptions: {
- columns: ":not(':last')"
- }
- }
- ],
- dropup: true
- }
- ]
- },
- top1B : {
- pageLength: {
- menu: [[10, 25, 50, 100, 100000], [10, 25, 50, 100, "Tutti"]]
- }
- },
- top1C :'search',
- },
- pagingType: 'numbers',
- "language": {
- "url": "/assets/js/Italian.json"
- },
- "fnInitComplete": function (oSettings, json) {
- var html = ' <a href="#" class="addData btn--ui"><i class="fa-solid fa-plus"></i></a>';
- $(".dt-search").append(html);
- }
- });
- $('#tablesaw-350 thead tr th').addClass('col');
- $('#tablesaw-350 thead tr th').css("background-color", "#f6f8fa");
- $(document).ready(function() {
- $(document).on("click",".addData",function() {
- $(".title--section_addButton").trigger("click")
- });
- } );
- }
- </script>
- @endpush
|