|
@@ -0,0 +1,243 @@
|
|
|
|
|
+<div class="col card--ui" id="card--dashboard">
|
|
|
|
|
+ @if(!$add && !$update)
|
|
|
|
|
+
|
|
|
|
|
+ <!--<button id="open-filter" onclick="pcsh1()"></button>
|
|
|
|
|
+ <button id="close-filter" onclick="pcsh2()"></button>-->
|
|
|
|
|
+
|
|
|
|
|
+ <a class="btn--ui lightGrey" href="/settings?type=contabilita"><i class="fa-solid fa-arrow-left"></i></a><br>
|
|
|
|
|
+
|
|
|
|
|
+ <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">Campi</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>
|
|
|
|
|
+ <!--
|
|
|
|
|
+ <section id="subheader" class="d-flex align-items-center justify-content-between">
|
|
|
|
|
+ <form action="" class="group--action d-flex align-items-center">
|
|
|
|
|
+ <select class="form-select form-select-lg me-1" aria-label=".form-select-lg example">
|
|
|
|
|
+ <option selected>Open this select menu</option>
|
|
|
|
|
+ <option value="1">One</option>
|
|
|
|
|
+ <option value="2">Two</option>
|
|
|
|
|
+ <option value="3">Three</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <button type="submit" class="btn--ui">applica</button>
|
|
|
|
|
+ </form>
|
|
|
|
|
+
|
|
|
|
|
+ <form action="" class="search--form d-flex align-items-center">
|
|
|
|
|
+ <div class="input-group mb-3">
|
|
|
|
|
+ <input type="text" class="form-control" placeholder="Cerca utente" aria-label="cerca utent" aria-describedby="button-addon2">
|
|
|
|
|
+ <button class="btn--ui" type="button" id="button-addon2"><i class="ico--ui search"></i>Cerca</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ -->
|
|
|
|
|
+ <section id="resume-table">
|
|
|
|
|
+ <div class="compare--chart_wrapper d-none"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <table class="table tablesaw tableHead tablesaw-stack" id="tablesaw-350" width="100%">
|
|
|
|
|
+ <thead>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th scope="col">Nome</th>
|
|
|
|
|
+ <th scope="col">Abilitato</th>
|
|
|
|
|
+ <th scope="col">...</th>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ <tbody id="checkall-target">
|
|
|
|
|
+ @foreach($records as $record)
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td>{{$record->name}}</td>
|
|
|
|
|
+ <td> <span class="tablesaw-cell-content"><span class="badge tessera-badge {{$record->enabled ? 'active' : 'suspended'}}">{{$record->enabled ? 'attivo' : 'disattivo'}}</span></span></td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <button type="button" class="btn" wire:click="edit({{ $record->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="delete({{ $record->id }})" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="bottom" data-bs-content="cestina"><i class="fa-regular fa-trash-can"></i></button>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ <!--
|
|
|
|
|
+ <div class="paginator d-flex justify-content-center">
|
|
|
|
|
+ <nav aria-label="Page navigation example">
|
|
|
|
|
+ <ul class="pagination">
|
|
|
|
|
+ <li class="page-item">
|
|
|
|
|
+ <a class="page-link" href="#" aria-label="Previous">
|
|
|
|
|
+ <span aria-hidden="true"></span>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li class="page-item"><a class="page-link" href="#">1</a></li>
|
|
|
|
|
+ <li class="page-item"><a class="page-link" href="#">2</a></li>
|
|
|
|
|
+ <li class="page-item"><a class="page-link" href="#">3</a></li>
|
|
|
|
|
+ <li class="page-item"><a class="page-link" href="#">3</a></li>
|
|
|
|
|
+
|
|
|
|
|
+ <li class="page-item"><span class="more-page">...</span></li>
|
|
|
|
|
+
|
|
|
|
|
+ <li class="page-item">
|
|
|
|
|
+ <a class="page-link" href="#" aria-label="Next">
|
|
|
|
|
+ <span aria-hidden="true"></span>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </nav>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ -->
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ @else
|
|
|
|
|
+
|
|
|
|
|
+ <div class="container">
|
|
|
|
|
+
|
|
|
|
|
+ <a class="btn--ui lightGrey" href="/banks"><i class="fa-solid fa-arrow-left"></i></a><br><br>
|
|
|
|
|
+
|
|
|
|
|
+ @if (session()->has('error'))
|
|
|
|
|
+ <div class="alert alert-danger" role="alert">
|
|
|
|
|
+ {{ session()->get('error') }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ @endif
|
|
|
|
|
+
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+
|
|
|
|
|
+ <form action="">
|
|
|
|
|
+
|
|
|
|
|
+ <div class="row mb-3">
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="form--item">
|
|
|
|
|
+ <label for="inputName" class="form-label">Nome</label>
|
|
|
|
|
+ <input class="form-control js-keyupTitle @error('name') is-invalid @enderror" type="text" id="name" placeholder="Nome" wire:model="name">
|
|
|
|
|
+ @error('name')
|
|
|
|
|
+ <div class="invalid-feedback">{{ $message }}</div>
|
|
|
|
|
+ @enderror
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="form--item">
|
|
|
|
|
+ <label for="enabled" class="form-label">Abilitato</label>
|
|
|
|
|
+ <input class="form-check-input form-control" style="width:22px; height:22px;" type="checkbox" id="enabled" wire:model="enabled">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- // inline input field -->
|
|
|
|
|
+
|
|
|
|
|
+ <div class="form--item">
|
|
|
|
|
+ <button type="button" class="btn--ui lightGrey" wire:click="cancel()">Annulla</button>
|
|
|
|
|
+ @if($add)
|
|
|
|
|
+ <button type="submit" class="btn--ui" wire:click.prevent="store()">Salva</button>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ @if($update)
|
|
|
|
|
+ <button type="submit" class="btn--ui" wire:click.prevent="update()">Salva</button>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ @endif
|
|
|
|
|
+</div>
|
|
|
|
|
+
|
|
|
|
|
+@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>
|
|
|
|
|
+ <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>
|
|
|
|
|
+
|
|
|
|
|
+ $(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: 'Campi',
|
|
|
|
|
+ exportOptions: {
|
|
|
|
|
+ columns: ":not(':last')"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ extend: 'pdfHtml5',
|
|
|
|
|
+ title: 'Campi',
|
|
|
|
|
+ exportOptions: {
|
|
|
|
|
+ columns: ":not(':last')"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ extend: 'print',
|
|
|
|
|
+ text: 'Stampa',
|
|
|
|
|
+ title: 'Campi',
|
|
|
|
|
+ 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
|
|
|
|
|
+
|