@if(session('discount_success'))
{{ session('discount_success') }}
@endif
@if(session('discount_error'))
{{ session('discount_error') }}
@endif
@if(session('discount_partial'))
Some codes were not created:
@foreach(session('discount_partial') as $f)
{{ $f['code'] }} — {{ $f['reason'] }}
@endforeach
@endif
{{--
Validation errors, unless a modal is about to reopen and show them itself.
Both places at once means the same message twice: once inside the modal
and once on the page behind it, still there when the modal is closed.
Every discount form reopens on a refusal, so this is left for the
actions that have no form behind them: switch on and off, delete, give an
offer, remove a discount.
--}}
@if($errors->any() && ! in_array(old('form'), ['add_offer', 'add_codes', 'edit_offer'], true))
@foreach($errors->all() as $error)- {{ $error }}
@endforeach
@endif