@extends('layouts.app') @section('title', 'Customer Feedback & Complaints') @section('content')

Customer Feedback & Complaints

Average Rating
{{ $avgRating ? number_format($avgRating, 1) . ' ★' : '—' }}
Open Complaints
{{ $openComplaints }}
Feedback
@forelse ($feedback as $f)
{{ $f->customer->name ?? $f->customer_name ?? 'Guest' }} @if ($f->rating){{ str_repeat('★', $f->rating) }}{{ str_repeat('☆', 5 - $f->rating) }}@endif
@if ($f->comment)
{{ $f->comment }}
@endif
{{ $f->created_at->format('d M Y') }}
@empty

No feedback logged yet.

@endforelse
Complaints
@forelse ($complaints as $c)
{{ $c->customer->name ?? $c->customer_name ?? 'Guest' }} — {{ ucfirst(str_replace('_',' ',$c->category)) }} {{ ucfirst($c->status) }}
{{ $c->description }}
@if ($c->resolution_notes)
Resolution: {{ $c->resolution_notes }}
@endif @if ($c->status !== 'resolved')
@csrf @method('PATCH')
@endif
@empty

No complaints logged.

@endforelse
@endsection