From 037a05903b1a6921ae65049f9f55c94dd84036b4 Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Tue, 3 Oct 2023 18:33:48 +0200 Subject: [PATCH] fix in recupero prenotazioni con varianti cancellate --- code/app/VariantCombo.php | 2 +- code/resources/views/delivery/edit.blade.php | 17 ++++++++++++----- .../views/delivery/modifierrow.blade.php | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/code/app/VariantCombo.php b/code/app/VariantCombo.php index 3faaf0b2e..4b3b43c0d 100644 --- a/code/app/VariantCombo.php +++ b/code/app/VariantCombo.php @@ -79,7 +79,7 @@ public static function activeValues($combos) }); foreach($combos as $combo) { - foreach($combo->values->orderBy('value', 'asc')->get() as $value) { + foreach($combo->values->sortBy('value') as $value) { $variant_id = $value->variant_id; if (!isset($ret[$variant_id])) { $ret[$variant_id] = []; diff --git a/code/resources/views/delivery/edit.blade.php b/code/resources/views/delivery/edit.blade.php index df2d6490b..733127f88 100644 --- a/code/resources/views/delivery/edit.blade.php +++ b/code/resources/views/delivery/edit.blade.php @@ -112,8 +112,8 @@ - - + + @@ -166,7 +166,14 @@ - + @if($combo) + + @else + + @endif @foreach($var->components as $comp) @@ -209,14 +216,14 @@ @foreach($mods as $mod_value) @include('delivery.modifierrow', [ 'mod_value' => $mod_value, - 'skip_cells' => 2, + 'skip_cells' => 3, 'final_value' => true, ]) @endforeach @include('delivery.modifierrow', [ 'mod_value' => null, - 'skip_cells' => 2 + 'skip_cells' => 3 ]) @if($order->isActive()) diff --git a/code/resources/views/delivery/modifierrow.blade.php b/code/resources/views/delivery/modifierrow.blade.php index 89a22e325..65d79b902 100644 --- a/code/resources/views/delivery/modifierrow.blade.php +++ b/code/resources/views/delivery/modifierrow.blade.php @@ -36,7 +36,7 @@