<div class="card mb-2">
    <h6 class="card-header  bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingNotice" aria-expanded="false" aria-controls="collapseBookingNotice">
        <strong style="line-height: 1.6em">Notizen</strong>
    </h6>
    <div class="collapse" id="collapseBookingNotice">

        <div class="card-body row">

            <div class="col-sm-12">
                {!! Form::open(['url' => route('travel_user_booking_fewo_detail', [$id]), 'class' => 'form-horizontal']) !!}                <input type="hidden" name="action" value="save_notice">
                <div class="form-group">
                    {{ Form::textarea('booking_fewo_notice', '',  array('placeholder'=>__('Neue Notiz hinzufügen …'), 'class'=>'form-control autoExpand', 'id'=>'booking_notice', 'rows'=>'1', 'data-min-rows'=>'1', 'required')) }}
                </div>
                <div class="form-group text-right">
                    <button type="submit" class="btn btn-sm btn-primary" ><i class="ion ion-ios-send"></i>&nbsp;Notiz hinzufügen</button>
                    <hr>
                </div>
                {!! Form::close() !!}
            </div>

            @if($travel_user_booking_fewo->booking_fewo_notices)
            @foreach($travel_user_booking_fewo->booking_fewo_notices as $booking_fewo_notices)

            <div class="col-sm-12">
                @if($booking_fewo_notices->from_user_id === \Auth::user()->id)
                <div class="bg-primary rounded py-2 px-3 mr-3 text-white mb-2">
                    <div class="font-weight-semibold mb-1">{{ $booking_fewo_notices->getName() }} | {{ $booking_fewo_notices->created_at->format("d.m.Y - H:i:s") }}
                @else
                <div class="bg-secondary rounded py-2 px-3 mr-3 mb-2">
                    <div class="font-weight-semibold mb-1">{{ $booking_fewo_notices->getName() }} | {{ $booking_fewo_notices->created_at->format("d.m.Y - H:i:s") }}
                @endif
                @if($booking_fewo_notices->edit_at != null)
                | <i class="ion ion-ios-create"></i> {{ $booking_fewo_notices->edit_at->format("d.m.Y - H:i:s") }}
                @endif
                @if($booking_fewo_notices->from_user_id === \Auth::user()->id || \Auth::user()->isPermission('sua-bo-n-edit'))
                    <div class="float-right"><a href="">
                        <a href="javascript:void(0)" class="btn btn-xs btn-white" data-toggle="modal" data-target="#modals-load-content" 
                        data-id="{{ $booking_fewo_notices->id }}" 
                        data-model="TravelUserBookingFewoNotice" 
                        data-action="edit_notice" 
                        data-url="{{ route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]) }}" 
                        data-redirect="back" 
                        data-travel_user_booking_fewo_id="{{$travel_user_booking_fewo->id}}" 
                        data-route="{{ route('travel_user_booking_fewo_modal_load') }}">
                            <i class="ion ion-ios-create"></i>
                        </a>
                        <a href="{{ route('travel_user_booking_fewo_delete', [$booking_fewo_notices->id, 'booking_fewo_notices']) }}" class="btn btn-xs btn-white text-danger" onclick="return confirm('Wirklich löschen?');"><i class="ion ion-md-trash"></i></a>
                    </div>
                    @endif
                    </div>
                    {!! nl2br($booking_fewo_notices->message) !!}
                </div>

                  
            </div>
            @endforeach
            @endif
        </div>
    </div>
</div>