diff --git a/resources/views/livewire/plan/comment/show.blade.php b/resources/views/livewire/plan/comment/show.blade.php index 504e478..c630e63 100644 --- a/resources/views/livewire/plan/comment/show.blade.php +++ b/resources/views/livewire/plan/comment/show.blade.php @@ -1,90 +1,81 @@
@php - $positivComments = $plan->positiveComments(); + $positivComments = $plan->positiveComments(); - $negativeComments = $plan->negativeComments(); + $negativeComments = $plan->negativeComments(); - $positiveCommmentsCount = $positivComments->count(); + $positiveCommmentsCount = $positivComments->count(); - $negativeCommentsCount = $negativeComments->count(); + $negativeCommentsCount = $negativeComments->count(); @endphp
- - + +
-
$tabpanelState['negative'] - ]) role="tabpanel" id="tabpanel-1" tabindex="0" aria-labelledby="tab-1"> +
$tabpanelState['negative'] + ]) role="tabpanel" id="tabpanel-1" tabindex="0" aria-labelledby="tab-1"> +
@foreach ($positivComments->get() as $comment) -
-
-
- user +
+
+ user +
+
+
+ {{ $comment->author->name }}
-
-
- {{ $comment->author->name }} -
-
- {{ $comment->body }} -
+
+ {{ $comment->body }} +
+
+
+
+ {{ $plan->name }}
-
-
- {{ $plan->name }} -
-
- {{ $comment->grade }} -
- +
+ {{ $comment->grade }}
+
- @endforeach + @endforeach +
-
$tabpanelState['positive'] - ]) role="tabpanel" id="tabpanel-2" tabindex="0" aria-labelledby="tab-1"> +
$tabpanelState['positive'] + ]) role="tabpanel" id="tabpanel-2" tabindex="0" aria-labelledby="tab-1"> + +
@foreach ($negativeComments->get() as $comment) -
-
-
- user +
+
+ user +
+
+
+ {{ $comment->author->name }}
-
-
- {{ $comment->author->name }} -
-
- {{ $comment->body }} -
+
+ {{ $comment->body }} +
+
+
+
+ {{ $plan->name }}
-
-
- {{ $plan->name }} -
-
- {{ $comment->grade }} -
- - +
+ {{ $comment->grade }}
+
- @endforeach + @endforeach +
-
-
diff --git a/resources/views/livewire/plan/like.blade.php b/resources/views/livewire/plan/like.blade.php index 03f2ced..007c51d 100644 --- a/resources/views/livewire/plan/like.blade.php +++ b/resources/views/livewire/plan/like.blade.php @@ -19,46 +19,28 @@
- +

{{ $plan->details }}

- + @php + $planTypeSvgClasses = ['slim' => '#SlimBig', 'fit' => '#FitBig', 'wellness' => '#WellnessBig', 'behavior' => '#BehaviorBig']; + @endphp
- - - @if ($plan->type['slim'] === true) + @foreach($planTypeSvgClasses as $type => $svgCssClass) + @if (isset($plan->type[$type]) && $plan->type[$type] === true) - + - @endif - - @if ($plan->type['fit'] === true) - - - - @endif - - @if ($plan->type['wellness'] === true) - - - - @endif - - @if ($plan->type['behavior'] === true) - - - - @endif + @endif + @endforeach