v1.2.2
- Subcategories can now be reordered within their category — up/down arrow buttons next to "Edytuj" in Admin > Kategorie. The order set there is used everywhere a subcategory list is shown (pickers, admin listings, etc.).
This commit is contained in:
@@ -85,7 +85,7 @@ $tabGroups = [
|
||||
<table class="table" style="margin:0;border-top:none">
|
||||
<thead><tr><th>Podkategoria</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
@foreach ($cat->subcategories as $sub)
|
||||
@foreach ($cat->subcategories as $i => $sub)
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display:flex;flex-direction:column;gap:2px">
|
||||
@@ -97,7 +97,9 @@ $tabGroups = [
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div style="display:flex;gap:6px;justify-content:flex-end">
|
||||
<div style="display:flex;gap:6px;justify-content:flex-end;align-items:center">
|
||||
<button class="btn btn-icon" type="button" wire:click="moveSubcategoryUp({{ $sub->id }})" @disabled($i === 0) style="padding:2px;width:24px;height:24px" title="Przesuń wyżej"><span class="material-symbols-outlined" style="font-size:16px">arrow_upward</span></button>
|
||||
<button class="btn btn-icon" type="button" wire:click="moveSubcategoryDown({{ $sub->id }})" @disabled($i === $cat->subcategories->count() - 1) style="padding:2px;width:24px;height:24px" title="Przesuń niżej"><span class="material-symbols-outlined" style="font-size:16px">arrow_downward</span></button>
|
||||
<button class="btn btn-ghost" type="button" wire:click="openSubcategoryEditForm({{ $sub->id }})">Edytuj</button>
|
||||
<button class="btn btn-ghost" type="button" wire:click="removeSubcategory({{ $sub->id }})">Usuń</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user