| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <div>
- <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">
- <i class="ico--ui title_section utenti me-2"></i>
- <h2 class="primary">@if(!$add && !$update)Elenco causali @else Inserimento/modifica causale @endif</h2>
- </div>
- @if(!$add && !$update)
- <div class="title--section_addButton">
- <div class="card--ui card--ui_btnAddHeaderUser entrata d-flex justify-items-between">
- <header class="d-flex justify-content-between"><div class="card-title d-flex align-items-start"><h2>Aggiungi </h2></div><a href="#" wire:click="add()"><i class="ico--ui big add primary"></i></a></header>
- </div>
- </div>
- @endif
- </header>
- @if(!$add && !$update)
- <section id="resume-table">
- <div class="compare--chart_wrapper d-none"></div>
- <table class="table tablesaw tablesaw-stack" data-tablesaw="" id="tablesaw-350">
- <thead>
- <tr>
- <th scope="col">Nome</th>
- <th scope="col">Tipologia</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>{{$record->type == 'IN' ? 'Ingresso' : '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-primary btn-sm" wire:click="edit({{ $record->id }})">Modifica</button>
- <button type="button" class="btn btn-outline-danger btn-sm" onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="delete({{ $record->id }})">Elimina</button>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- </section>
- @else
- <div class="container">
- <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">Ingresso
- <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>
- <!-- // 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>
|