Skip to content

Commit 8f75adf

Browse files
authored
Fix styling and display issues on plans in admin/frontend
1 parent db45c30 commit 8f75adf

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

resources/views/admin/events/seats.blade.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ class="badge bg-muted text-muted-fg">{{ $clanMember->clan->name }}</span>
138138
style="min-width: {{ collect($seats[$plan->id] ?? [])->max('x') * 2 + 4 }}em;">
139139
<div class="card-body p-0">
140140
<div class="seating-plan" style="
141-
@if($plan->image_url)
142-
background-image:url('{{ $plan->image_url }}');
143-
min-height: {{ $plan->image_height}}px;
144-
min-width: {{ $plan->image_width}}px";
145-
@else
146-
min-height: {{ (collect($seats[$plan->id] ?? [])->max('y') * 2) + 4 }}em;"
147-
@endif
148-
>
141+
@if($plan->image_height && $plan->image_width)
142+
background-image:url('{{ $plan->image_url }}');
143+
min-height: {{ $plan->image_height}}px;
144+
min-width: {{ $plan->image_width}}px;
145+
@else
146+
min-height: {{ (collect($seats[$plan->id])->max('y') * 2) + 4 }}em;
147+
@endif
148+
">
149149
@foreach($seats[$plan->id] as $seat)
150150
@php
151151
$link = null;

resources/views/admin/seatingplans/show.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ class="btn btn-primary">
121121
<div class="card">
122122
<div class="card-body p-0">
123123
<div class="seating-plan" style="
124-
@if($plan->image_url)
124+
@if($plan->image_height && $plan->image_width)
125125
background-image:url('{{ $plan->image_url }}');
126126
min-height: {{ $plan->image_height}}px;
127-
min-width: {{ $plan->image_width}}px";
127+
min-width: {{ $plan->image_width}}px;
128128
@else
129-
min-height: {{ (collect($seats[$plan->id] ?? [])->max('y') * 2) + 4 }}em;"
129+
min-height: {{ (collect($seats)->max('y') * 2) + 4 }}em;
130130
@endif
131-
>
131+
">
132132
@foreach($seats as $seat)
133133
@php
134134
$class = 'available';

resources/views/seatingplans/_plan.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<div class="card-body p-0">
22
<div class="seating-plan" style="
3-
@if($plan->image_url)
3+
@if($plan->image_height && $plan->image_width)
44
background-image:url('{{ $plan->image_url }}');
55
min-height: {{ $plan->image_height}}px;
6-
min-width: {{ $plan->image_width}}px";
6+
min-width: {{ $plan->image_width}}px;
77
@else
8-
min-height: {{ (collect($seats[$plan->id] ?? [])->max('y') * 2) + 4 }}em;"
8+
min-height: {{ (collect($seats[$plan->id] ?? [])->max('y') * 2) + 4 }}em;
99
@endif
10-
>
10+
">
1111
@foreach($seats[$plan->id] ?? [] as $seat)
1212
@php
1313
$url = null;

0 commit comments

Comments
 (0)