| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- <div class="col card--ui" id="card--dashboard">
- <header id="title--section" class="d-flex align-items-center justify-content-between">
- <div class="title--section_name d-flex align-items-center justify-content-between" style="display:none !important" >
- <i class="ico--ui title_section utenti me-2"></i>
- <h2 class="primary">@if(!$add && !$update)causali @else Inserimento/modifica causale @endif</h2>
- </div>
- @if(!$add && !$update)
- <div class="title--section_addButton" wire:click="add()" style="cursor: pointer;">
- <div class="card--ui card--ui_btnAddHeaderUser entrata d-flex justify-items-between">
- <a href="#" wire:click="add()" style="color:white">AGGIUNGI</a>
- </div>
- </div>
- @endif
- </header>
- @if(!$add && !$update)
- <section id="resume-table">
- <div class="compare--chart_wrapper d-none"></div>
- <h1>Entrata</h1>
- <table class="table tablesaw tablesaw-stack" id="tablesaw-350">
- <thead>
- <tr>
- <th scope="col" width="50%">Nome</th>
- <th scope="col" width="10%">Tipologia</th>
- <th scope="col" width="10%">Abilitato</th>
- <th scope="col" width="30%">...</th>
- </tr>
- </thead>
- <tbody id="checkall-target" wire:sortable="reorder" wire:sortable.options="{ animation: 100 }" wire:sortable-group="reorderGroup">
- @foreach($recordsIn as $record)
- <tr wire:sortable.item="{{ $record->id }}" wire:sortable.triggers="reorder">
- <td>{{$record->name}}</td>
- <td>{{$record->type == 'IN' ? 'Entrata' : 'Uscita'}}</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 btn-outline-success btn-sm" wire:click="addLevel({{ $record->id }})">Aggiungi livello</button>
- <button type="button" class="btn btn-outline-success btn-sm" wire:click="duplicate({{ $record->id }})">Duplica</button>
- <button type="button" class="btn" wire:click="edit({{ $record->id }})"><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 }})"><i class="fa-regular fa-trash-can"></i></button>
- </td>
- </tr>
- @if(count($record->childs))
- @include('livewire/causal_child',['records' => $record->childs, 'indentation' => 1])
- @endif
- @endforeach
- </tbody>
- </table>
- <br>
- <h1>Uscita</h1>
- <table class="table tablesaw tablesaw-stack" id="tablesaw-350">
- <thead>
- <tr>
- <th scope="col" width="50%">Nome</th>
- <th scope="col" width="10%">Tipologia</th>
- <th scope="col" width="10%">Abilitato</th>
- <th scope="col" width="30%">...</th>
- </tr>
- </thead>
- <tbody id="checkall-target" wire:sortable="reorder" wire:sortable.options="{ animation: 100 }" wire:sortable-group="reorderGroup">
- @foreach($recordsOut as $record)
- <tr wire:sortable.item="{{ $record->id }}" wire:sortable.triggers="reorder">
- <td>{{$record->name}}</td>
- <td>{{$record->type == 'IN' ? 'Entrata' : 'Uscita'}}</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 btn-outline-success btn-sm" wire:click="addLevel({{ $record->id }})">Aggiungi livello</button>
- <button type="button" class="btn btn-outline-success btn-sm" wire:click="duplicate({{ $record->id }})">Duplica</button>
- <button type="button" class="btn" wire:click="edit({{ $record->id }})"><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 }})"><i class="fa-regular fa-trash-can"></i></button>
- </td>
- </tr>
- @if(count($record->childs))
- @include('livewire/causal_child',['records' => $record->childs, 'indentation' => 1])
- @endif
- @endforeach
- </tbody>
- </table>
- </section>
- @else
- <div class="container">
- @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>
- <div class="row mb-3">
- <div class="col">
- <label for="next_month_expire" class="form-label">Tipologia</label>
- <select name="type" class="form-select @error('type') is-invalid @enderror" aria-label="Seleziona una tipologia" wire:model="type">
- <option value="">--Seleziona--
- <option value="IN">Entrata
- <option value="OUT">Uscita
- </select>
- </div>
- </div>
- <div class="form--item mb-3">
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="checkbox" id="enabled" wire:model="enabled">
- <label class="form-check-label" for="enabled">Abilitato</label>
- </div>
- </div>
- <div class="form--item mb-3">
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="checkbox" id="money" wire:model="money">
- <label class="form-check-label" for="money">Incrementa borsellino virtuale</label>
- </div>
- </div>
- <div class="form--item mb-3">
- <div class="form-check form-check-inline">
- @if($corrispettivo_causal_id == 0 || $corrispettivo_causal_id == $dataId)
- <input class="form-check-input" type="checkbox" id="corrispettivo_fiscale" wire:model="corrispettivo_fiscale">
- @else
- C'è già una causale associata al corrispettivo fiscale
- @endif
- <label class="form-check-label" for="corrispettivo_fiscale">Utilizza per corrispettivo fiscale</label>
- </div>
- </div>
- <div class="form--item mb-3">
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="checkbox" id="no_receipt" wire:model="no_receipt">
- <label class="form-check-label" for="no_receipt">Non generare ricevuta</label>
- </div>
- </div>
- <div class="form--item mb-3">
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="checkbox" id="user_status" wire:model="user_status">
- <label class="form-check-label" for="user_status">Impatta stato utente</label>
- </div>
- </div>
- <div class="form--item mb-3">
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="checkbox" id="no_first" wire:model="no_first">
- <label class="form-check-label" for="no_first">Escludi dalla prima nota</label>
- </div>
- </div>
- <div class="form--item mb-3">
- <div class="form-check form-check-inline">
- <input class="form-check-input" type="checkbox" id="no_records" wire:model="no_records">
- <label class="form-check-label" for="no_records">Escludi da ingressi/uscite</label>
- </div>
- </div>
- <!-- // inline input field -->
- <div class="form--item">
- @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
- <button type="button" class="btn--ui lightGrey" wire:click="cancel()">Annulla</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- @endif
- </div>
- @push('scripts')
- <!--
- <script src="https://cdn.jsdelivr.net/gh/livewire/sortable@v0.x.x/dist/livewire-sortable.js"></script>
- -->
- @endpush
|