|
|
@@ -2,28 +2,24 @@
|
|
|
|
|
|
@if(!$add && !$update)
|
|
|
|
|
|
- <a class="btn--ui lightGrey" href="/settings?type=anagrafica"><i class="fa-solid fa-arrow-left"></i></a><br>
|
|
|
+ <a class="btn--ui lightGrey" href="/settings?type=anagrafica"><i class="fa-solid fa-arrow-left"></i></a>
|
|
|
|
|
|
- <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)Categorie @else Inserimento/modifica categoria @endif</h2>
|
|
|
- </div>
|
|
|
+ <header id="title--section" class="d-flex align-items-center justify-content-between" style="display:none !important">
|
|
|
+ <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)Categorie @else Inserimento/modifica categoria @endif</h2>
|
|
|
+ </div>
|
|
|
+ </header>
|
|
|
|
|
|
@if(!$add && !$update)
|
|
|
- <div class="title--section_addButton text-right " wire:click="add()" style="cursor: pointer;margin-top:20px;">
|
|
|
- <div class="btn--ui entrata d-flex justify-items-between">
|
|
|
+ <div class="title--section_addButton d-flex justify-content-end" >
|
|
|
+ {{-- <button type="button" class="btn--ui entrata" wire:click="openImportModal" onclick="openImportModal()">Importa</button> --}}
|
|
|
+ <div class="btn--ui entrata d-flex justify-items-between" wire:click="add()" style="cursor: pointer;">
|
|
|
<a href="#" wire:click="add()" style="color:white">AGGIUNGI</a>
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
+ </div><br>
|
|
|
@endif
|
|
|
|
|
|
- </header>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<section id="resume-table">
|
|
|
<div class="compare--chart_wrapper d-none"></div>
|
|
|
|
|
|
@@ -45,7 +41,7 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
@if(count($record->childs))
|
|
|
- @include('livewire/category_child',['records' => $record->childs, 'indentation' => 1])
|
|
|
+ @include('livewire/category_child',['records' => $record->childs->sortBy('name'), 'indentation' => 1])
|
|
|
@endif
|
|
|
@endforeach
|
|
|
|
|
|
@@ -55,50 +51,46 @@
|
|
|
</section>
|
|
|
|
|
|
@else
|
|
|
+ <a class="btn--ui lightGrey" href="/categories"><i class="fa-solid fa-arrow-left"></i></a><br><br>
|
|
|
|
|
|
- <div class="container">
|
|
|
-
|
|
|
- <a class="btn--ui lightGrey" href="/categories"><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
|
|
|
+ @if (session()->has('error'))
|
|
|
+ <div class="alert alert-danger" role="alert">
|
|
|
+ {{ session()->get('error') }}
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
|
|
|
- <div class="row">
|
|
|
- <div class="col">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col">
|
|
|
|
|
|
- <form action="">
|
|
|
+ <form action="">
|
|
|
|
|
|
- @if($parent != '')
|
|
|
- <h3>Aggiungi livello a {{$parent}}</h3><br>
|
|
|
- @endif
|
|
|
+ @if($parent != '')
|
|
|
+ <h3>Aggiungi livello a {{$parent}}</h3><br>
|
|
|
+ @endif
|
|
|
|
|
|
- <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 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="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 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>
|
|
|
|