@php
use App\Models\User;
@endphp
@if ( $current_route_name === 'orders.edit' && !empty($customer_questions->where('order_id', $current_id)->first()) )
auftragsspezifische Fragen / Bemerkungen
@foreach ($customer_questions->where('order_id', $current_id)->get() as $question)
@if ($question->replies()->count() < 1)
@includeIf('layouts.components.btn_save', [
'only_dropdown' => true,
'without_head_div' => true,
'dropdown_btn_class' => 'rounded-circle btn-success btn-sm fs-7',
'dropdown_btn_icon_fa' => 'pencil',
'dropdown_menu_class' => 'end-0 ms-auto fs-7',
'dropdown_menu_attr' => 'style="inset: 0px 0 auto auto;"',
'dropdown' => [
[
'href' => '#',
'class' => 'reply-button',
'name' => 'antowrten',
'fa_icon' => 'pencil',
'attr' => 'data-question-route="' .route('customer_questions.reply', $question->id) .'"',
],
[
'href' => '#',
'class' => 'taken-note-button',
'name' => 'zur Kenntnis genommen',
'fa_icon' => 'glasses',
'attr' => 'data-href="/customer_questions/' .$question->id .'/reply"',
],
]
])
@else
@includeIf('layouts.components.btn_save', [
'only_dropdown' => true,
'without_head_div' => true,
'dropdown_btn_class' => 'rounded-circle btn-success btn-sm fs-7',
'dropdown_btn_icon_fa' => 'pencil',
'dropdown_menu_class' => 'end-0 ms-auto fs-7',
'dropdown_menu_attr' => 'style="inset: 0px 0 auto auto;"',
'dropdown' => [
[
'href' => '#',
'class' => 'reply-button',
'name' => 'antowrten',
'fa_icon' => 'pencil',
'attr' => 'data-question-route="' .route('customer_questions.reply', $question->id) .'"',
]
]
])
@endif
@if ($question->replies()->count() > 0)
@foreach ($question->replies()->latestFirst()->get() as $reply)
{{ $reply->reply }}
@endforeach
@endif
@endforeach
@endif
@foreach ($active_questions->get() as $question)
@php
if ($current_route_name === 'orders.edit' && $current_id == $question->order_id) {
continue;
}
@endphp
@includeIf('layouts.components.btn_save', [
'only_dropdown' => true,
'without_head_div' => true,
'dropdown_btn_class' => 'rounded-circle btn-success btn-sm fs-7',
'dropdown_btn_icon_fa' => 'pencil',
'dropdown_menu_class' => 'end-0 ms-auto fs-7',
'dropdown' => [
[
'href' => '#',
'class' => 'reply-button',
'name' => 'antowrten',
'fa_icon' => 'pencil',
'attr' => 'data-question-route="' .route('customer_questions.reply', $question->id) .'"',
],
[
'href' => '#',
'class' => 'taken-note-button',
'name' => 'zur Kenntnis genommen',
'fa_icon' => 'glasses',
'attr' => 'data-href="/customer_questions/' .$question->id .'/reply"',
],
]
])
@endforeach
@once
@endonce
@section('modal')
@parent
@stop