Skip to content

Commit

Permalink
Merge pull request #235 from helsingborg-stad/fix/view-additional-tic…
Browse files Browse the repository at this point in the history
…ket-types-causes-fatal-error

fix: correct handling of formatted_price in view CU-86944h2mb
  • Loading branch information
sebastianthulin authored Mar 21, 2024
2 parents d99988e + 80420cc commit 177e532
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions views/widgets/additional-ticket-types.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,32 @@
<strong>{{ $ticketType['ticket_name'] }}</strong>
@endtypography
@endif

<ul role="list" aria-labelledby="single-event-tickettypes-{{$index}}">
@if(!empty($ticketType['ticket_type']))
<li role="listitem">
<span hidden id="single-event-tickettypes-{{$index}}-type">{{ $eventLang->ticketType }}:</span>
<span hidden id="single-event-tickettypes-{{$index}}-type">{{ $eventLang->ticketType }}:</span>
<strong aria-labelledby="single-event-tickettypes-{{$index}}-type">{{ strtolower($ticketType['ticket_type']) === 'seated' ? $eventLang->ticketSeated : $eventLang->ticketStanding }}</strong>
</li>
@endif

@if($ticketType['minimum_price']['formatted_price'])
@if($ticketType['minimum_price'] && is_array($ticketType['minimum_price']) && array_key_exists('formatted_price', $ticketType['minimum_price']))
<li role="listitem">
<strong id="single-event-tickettypes-{{$index}}-pricemin">{{ $eventLang->priceMin }}:</strong>
<span aria-labelledby="single-event-tickettypes-{{$index}}-pricemin">{{ $ticketType['minimum_price']['formatted_price'] }}</span>
</li>
@endif

@if($ticketType['maximum_price']['formatted_price'])
@if($ticketType['maximum_price'] && is_array($ticketType['maximum_price']) && array_key_exists('formatted_price', $ticketType['maximum_price']))
<li role="listitem">
<strong id="single-event-tickettypes-{{$index}}-pricemax">{{ $eventLang->priceMax }}:</strong>
<span aria-labelledby="single-event-tickettypes-{{$index}}-pricemax">{{ $ticketType['maximum_price']['formatted_price'] }}</span>
</li>
@endif

</ul>
@endforeach
@endif
</div>
@endcard
@endif
@endif

0 comments on commit 177e532

Please sign in to comment.