From 0ebd5598c220e1a6dd5cb14d0fe06ab7aa21ffb1 Mon Sep 17 00:00:00 2001 From: maxxkim Date: Thu, 14 Dec 2023 12:58:09 +0300 Subject: [PATCH] Ingredient add fix --- .../views/livewire/recipe/edit.blade.php | 43 ++++++++++++++++++- .../views/livewire/recipe/list-view.blade.php | 12 +++--- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/resources/views/livewire/recipe/edit.blade.php b/resources/views/livewire/recipe/edit.blade.php index 6f08d65..13fee5f 100644 --- a/resources/views/livewire/recipe/edit.blade.php +++ b/resources/views/livewire/recipe/edit.blade.php @@ -97,6 +97,36 @@ @php $n = count($ingredients); $lastIngedient = $n-1; @endphp + @if($n == 0) +
+
+
+ +
+
+
+ +
+ +
+ +
+ + +
+
+
+
+
+ @endif @foreach($ingredients as $k => $ingredient)
@@ -105,13 +135,24 @@
+
+ +
@if($k == count($ingredients)-1) @endif
- +
diff --git a/resources/views/livewire/recipe/list-view.blade.php b/resources/views/livewire/recipe/list-view.blade.php index baf5eb1..e6e5a37 100644 --- a/resources/views/livewire/recipe/list-view.blade.php +++ b/resources/views/livewire/recipe/list-view.blade.php @@ -23,11 +23,13 @@ @php $image = $recipe->image @endphp - @if(is_null($image)) - formats - @else - recipe - @endif + + @if(is_null($image)) + formats + @else + recipe + @endif +