{{-- Job notes: internal (staff only) or for the customer (tracking page). Needs $job. --}} @php use App\Enums\NoteType; $notes = $job->notes()->with('user')->get(); $type = old('type', NoteType::Internal->value); @endphp

Notes

{{ $notes->count() }}
@can('addNote', $job)
@csrf
Who can see this note?
@foreach (NoteType::cases() as $option) @endforeach

The customer will see this note on the tracking page. Write in simple, polite words.

@endcan @if ($notes->isEmpty())

No notes yet.

@else
    @foreach ($notes as $note)
  • $note->type === NoteType::Customer, 'border-gray-200 bg-gray-50' => $note->type === NoteType::Internal, ]) data-note="{{ $note->type->value }}">
    @if ($note->type === NoteType::Customer) Customer can see @else Internal @endif {{ $note->user?->name }} ยท {{ $note->created_at->format('d M Y, g:i A') }}

    {{ $note->body }}

  • @endforeach
@endif