fix: 🐛 add is_array check in mail view to prevent loop on null
This commit is contained in:
parent
a66830c6fb
commit
cc7dcf6c28
2 changed files with 3 additions and 3 deletions
|
|
@ -35,7 +35,7 @@ Zone géographique :
|
|||
Société : {{ $data->company }}
|
||||
@endif
|
||||
|
||||
@if (\App\Enums\Contact\ContactFormType::restauration->equals($data->enumType) ||
|
||||
@if (is_array($data->type) && \App\Enums\Contact\ContactFormType::restauration->equals($data->enumType) ||
|
||||
\App\Enums\Contact\ContactFormType::export->equals($data->enumType))
|
||||
Type de demande :
|
||||
@foreach($data->type as $t)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
<p>Société : {{ $data->company }}</p>
|
||||
@endif
|
||||
|
||||
@if (\App\Enums\Contact\ContactFormType::restauration->equals($data->enumType))
|
||||
@if (is_array($data->type) && \App\Enums\Contact\ContactFormType::restauration->equals($data->enumType))
|
||||
<p>Type de demande : </p>
|
||||
<ul>
|
||||
@foreach ($data->type as $t)
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
@endif
|
||||
|
||||
{{-- Export --}}
|
||||
@if (\App\Enums\Contact\ContactFormType::export->equals($data->enumType))
|
||||
@if (is_array($data->type) && \App\Enums\Contact\ContactFormType::export->equals($data->enumType) && $data->type)
|
||||
<p>Type de demande : </p>
|
||||
<ul>
|
||||
@foreach ($data->type as $t)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue