|
@@ -1,3 +1,37 @@
|
|
|
|
|
+<style>
|
|
|
|
|
+ .btn-primary,
|
|
|
|
|
+ .bg-primary,
|
|
|
|
|
+ .text-primary,
|
|
|
|
|
+ .border-primary .card-primary {
|
|
|
|
|
+ background-color: #1F7A8C !important;
|
|
|
|
|
+ color: #fff !important;
|
|
|
|
|
+ border-color: #1F7A8C !important;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .btn-danger,
|
|
|
|
|
+ .bg-danger,
|
|
|
|
|
+ .text-danger,
|
|
|
|
|
+ .border-danger {
|
|
|
|
|
+ background-color: #023047 !important;
|
|
|
|
|
+ color: #fff !important;
|
|
|
|
|
+ border-color: #023047 !important;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .btn-success,
|
|
|
|
|
+ .bg-success,
|
|
|
|
|
+ .text-success,
|
|
|
|
|
+ .border-success {
|
|
|
|
|
+ background-color: white !important;
|
|
|
|
|
+ color: #023047 !important;
|
|
|
|
|
+ border-color: #023047 !important;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .pagination {
|
|
|
|
|
+ background-color: white !important;
|
|
|
|
|
+ color: #023047 !important;
|
|
|
|
|
+ border-color: #023047 !important;
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|
|
|
<div class="m-3">
|
|
<div class="m-3">
|
|
|
|
|
|
|
|
<div class="row mb-3">
|
|
<div class="row mb-3">
|
|
@@ -6,7 +40,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-6 text-right">
|
|
<div class="col-md-6 text-right">
|
|
|
@if(!$add && !$update)
|
|
@if(!$add && !$update)
|
|
|
- <button wire:click="add()" type="button" class="btn btn-block btn-success float-right" style="max-width:150px">Aggiungi</button><br>
|
|
|
|
|
|
|
+ <button wire:click="add()" type="button" class="btn btn-block btn-success float-right"
|
|
|
|
|
+ style="max-width:150px">Aggiungi</button><br>
|
|
|
@endif
|
|
@endif
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -39,48 +74,52 @@
|
|
|
<div class="card-header">
|
|
<div class="card-header">
|
|
|
|
|
|
|
|
<div class="card-tools">
|
|
<div class="card-tools">
|
|
|
- <div class="input-group input-group-sm" style="width: 300px;">
|
|
|
|
|
- <input type="text" name="search" wire:model="search" class="form-control float-right" placeholder="Cerca">
|
|
|
|
|
-
|
|
|
|
|
- <div class="input-group-append">
|
|
|
|
|
- <button type="submit" class="btn btn-default">
|
|
|
|
|
- <i class="fas fa-search"></i>
|
|
|
|
|
- </button>
|
|
|
|
|
|
|
+ <div class="input-group input-group-sm" style="width: 300px;">
|
|
|
|
|
+ <input type="text" name="search" wire:model="search" class="form-control float-right"
|
|
|
|
|
+ placeholder="Cerca">
|
|
|
|
|
+
|
|
|
|
|
+ <div class="input-group-append">
|
|
|
|
|
+ <button type="submit" class="btn btn-default">
|
|
|
|
|
+ <i class="fas fa-search"></i>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body table-responsive p-0">
|
|
<div class="card-body table-responsive p-0">
|
|
|
<table class="table table-hover text-nowrap">
|
|
<table class="table table-hover text-nowrap">
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>Nome</th>
|
|
|
|
|
- <th>Cognome</th>
|
|
|
|
|
- <th>Gruppo</th>
|
|
|
|
|
- <th style="width:150px"> </th>
|
|
|
|
|
- <th style="width:150px"> </th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody>
|
|
|
|
|
- @foreach($records as $record)
|
|
|
|
|
|
|
+ <thead>
|
|
|
<tr>
|
|
<tr>
|
|
|
- <td>{{$record->firstname}}</td>
|
|
|
|
|
- <td>{{$record->lastname}}</td>
|
|
|
|
|
- <td>{{$record->group()}}</td>
|
|
|
|
|
- <td>
|
|
|
|
|
- @if($record->username != 'admin')
|
|
|
|
|
- <button wire:click="edit({{ $record->id }})" type="button" class="btn btn-primary btn-block"><i class="fa fa-edit"></i> Modifica</button>
|
|
|
|
|
- @endif
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- @if($record->username != 'admin')
|
|
|
|
|
- <button onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()" wire:click="delete({{ $record->id }})" type="button" class="btn btn-danger btn-block"><i class="fa fa-trash"></i> Elimina</button>
|
|
|
|
|
- @endif
|
|
|
|
|
- </td>
|
|
|
|
|
|
|
+ <th>Nome</th>
|
|
|
|
|
+ <th>Cognome</th>
|
|
|
|
|
+ <th>Gruppo</th>
|
|
|
|
|
+ <th style="width:150px"> </th>
|
|
|
|
|
+ <th style="width:150px"> </th>
|
|
|
</tr>
|
|
</tr>
|
|
|
- @endforeach
|
|
|
|
|
- </tbody>
|
|
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ @foreach($records as $record)
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td>{{$record->firstname}}</td>
|
|
|
|
|
+ <td>{{$record->lastname}}</td>
|
|
|
|
|
+ <td>{{$record->group()}}</td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ @if($record->username != 'admin')
|
|
|
|
|
+ <button wire:click="edit({{ $record->id }})" type="button"
|
|
|
|
|
+ class="btn btn-primary btn-block"><i class="fa fa-edit"></i> Modifica</button>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ @if($record->username != 'admin')
|
|
|
|
|
+ <button onclick="confirm('Sei sicuro?') || event.stopImmediatePropagation()"
|
|
|
|
|
+ wire:click="delete({{ $record->id }})" type="button"
|
|
|
|
|
+ class="btn btn-danger btn-block"><i class="fa fa-trash"></i> Elimina</button>
|
|
|
|
|
+ @endif
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ </tbody>
|
|
|
|
|
|
|
|
</table>
|
|
</table>
|
|
|
|
|
|
|
@@ -113,7 +152,8 @@
|
|
|
<div class="card-body">
|
|
<div class="card-body">
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="firstname">Nome</label>
|
|
<label for="firstname">Nome</label>
|
|
|
- <input class="form-control @error('firstname') is-invalid @enderror" type="text" id="firstname" placeholder="Nome" wire:model="firstname">
|
|
|
|
|
|
|
+ <input class="form-control @error('firstname') is-invalid @enderror" type="text" id="firstname"
|
|
|
|
|
+ placeholder="Nome" wire:model="firstname">
|
|
|
@error('firstname')
|
|
@error('firstname')
|
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
|
@enderror
|
|
@enderror
|
|
@@ -121,7 +161,8 @@
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="lastname">Cognome</label>
|
|
<label for="lastname">Cognome</label>
|
|
|
- <input class="form-control @error('lastname') is-invalid @enderror" type="text" id="lastname" placeholder="Cognome" wire:model="lastname">
|
|
|
|
|
|
|
+ <input class="form-control @error('lastname') is-invalid @enderror" type="text" id="lastname"
|
|
|
|
|
+ placeholder="Cognome" wire:model="lastname">
|
|
|
@error('lastname')
|
|
@error('lastname')
|
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
|
@enderror
|
|
@enderror
|
|
@@ -129,7 +170,8 @@
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="username">Username</label>
|
|
<label for="username">Username</label>
|
|
|
- <input class="form-control @error('username') is-invalid @enderror" type="text" id="username" placeholder="Username" wire:model="username">
|
|
|
|
|
|
|
+ <input class="form-control @error('username') is-invalid @enderror" type="text" id="username"
|
|
|
|
|
+ placeholder="Username" wire:model="username">
|
|
|
@error('username')
|
|
@error('username')
|
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
|
@enderror
|
|
@enderror
|
|
@@ -137,7 +179,8 @@
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="email">Email</label>
|
|
<label for="email">Email</label>
|
|
|
- <input class="form-control @error('email') is-invalid @enderror" type="text" id="email" placeholder="Email" wire:model="email">
|
|
|
|
|
|
|
+ <input class="form-control @error('email') is-invalid @enderror" type="text" id="email"
|
|
|
|
|
+ placeholder="Email" wire:model="email">
|
|
|
@error('email')
|
|
@error('email')
|
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
|
@enderror
|
|
@enderror
|
|
@@ -147,28 +190,29 @@
|
|
|
<label for="group">Gruppo</label>
|
|
<label for="group">Gruppo</label>
|
|
|
<select id="group_id" wire:model="group_id" class="form-control">
|
|
<select id="group_id" wire:model="group_id" class="form-control">
|
|
|
<option value="">
|
|
<option value="">
|
|
|
- @foreach($groups as $group)
|
|
|
|
|
- <option value="{{$group->id}}">{{$group->name}}
|
|
|
|
|
- @endforeach
|
|
|
|
|
|
|
+ @foreach($groups as $group)
|
|
|
|
|
+ <option value="{{$group->id}}">{{$group->name}}
|
|
|
|
|
+ @endforeach
|
|
|
</select>
|
|
</select>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label for="password">Password</label>
|
|
<label for="password">Password</label>
|
|
|
<small>Lasciare vuoto per non aggiornarla</small>
|
|
<small>Lasciare vuoto per non aggiornarla</small>
|
|
|
- <input class="form-control @error('password') is-invalid @enderror" type="text" id="password" placeholder="Password" wire:model="password">
|
|
|
|
|
|
|
+ <input class="form-control @error('password') is-invalid @enderror" type="text" id="password"
|
|
|
|
|
+ placeholder="Password" wire:model="password">
|
|
|
@error('password')
|
|
@error('password')
|
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
|
@enderror
|
|
@enderror
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
@if($add)
|
|
@if($add)
|
|
|
- <button type="submit" class="btn btn-primary" wire:click.prevent="store()">Salva</button>
|
|
|
|
|
|
|
+ <button type="submit" class="btn btn-primary" wire:click.prevent="store()">Salva</button>
|
|
|
@endif
|
|
@endif
|
|
|
@if($update)
|
|
@if($update)
|
|
|
- <button type="submit" class="btn btn-primary" wire:click.prevent="update()">Salva</button>
|
|
|
|
|
|
|
+ <button type="submit" class="btn btn-primary" wire:click.prevent="update()">Salva</button>
|
|
|
@endif
|
|
@endif
|
|
|
- <button type="submit" class="btn btn-default" wire:click.prevent="cancel()">Annulla</button>
|
|
|
|
|
|
|
+ <button type="submit" class="btn btn-default" wire:click.prevent="cancel()">Annulla</button>
|
|
|
</div>
|
|
</div>
|
|
|
</form>
|
|
</form>
|
|
|
</div>
|
|
</div>
|