@props(['note', 'incontext' => false, 'editable' => false]) @if(!empty(auth()->user()) && auth()->user()->getPermissionLevel() == "super") @php $editable = true; @endphp @endif
{{ $note->created_at->diffForHumans() }} @if(!empty($note->getAuthor())) by {!! $note->getAuthor()->name !!} @endif @if(!$incontext) @if(!empty($note->getSubjectUser()->lead))   -   {!! $note->getSubjectUser()->lead->fullname !!} {!! $note->getSubjectUser()->lead->address->address_line_1 !!} {!! $note->getSubjectUser()->lead->address->postcode !!} @endif @if(!empty($note->getSubjectTimeSlot()))   -   {!! $note->getSubjectTimeSlot()->getAdminInfoLine() !!} @endif @endif
{!! $note->body !!}
@foreach($note->files as $file) {!! $file->display() !!} @endforeach
{{ $note->created_at->format('D jS M y H:i') }} {{ config('enum.note_states')[$note->state] }} @if($editable) Edit @if(auth()->user() && auth()->user()->isPermitted("super")) {!! Form::open([ 'url' => 'api/async_note_update', 'id' => 'note-'.$note->id.'-types-form', 'class' => 'ajaxform', 'style' => 'display: inline;', 'data-endpoint' => 'async_note_update']) !!} {!! Form::hidden('id', $note->id) !!} {!! Form::hidden('type', 1, ['id' => 'note-'.$note->id.'-tv']) !!} {!! Form::close() !!} @endif @endif
@if($note->isTask())
@if($note->isDone()) @else @endif Task @if($note->isDone()) complete, @else outstanding, @endif @foreach($note->getTaskedUsers() as $user) tasked to: {!! $user->name !!} @endforeach {!! Form::open([ 'url' => 'api/async_note_update', 'id' => 'note-'.$note->id.'-type-form', 'class' => 'ajaxform', 'style' => 'display: inline;', 'data-endpoint' => 'async_note_update']) !!} {!! Form::hidden('id', $note->id) !!} @if($note->isDone()) {!! Form::hidden('type', 1, ['id' => 'note-'.$note->id.'-tv']) !!} @else {!! Form::hidden('type', 3, ['id' => 'note-'.$note->id.'-tv']) !!} @endif {!! Form::close() !!}
@endif