@extends('adminlte::page') @section('title', 'location-review-details') @section('content_header') @stop @section('content')

Member Suggestion

List of Member Suggestion

@if (Session::has('error'))

{{ session()->get('error') }}

@elseif (session()->has('success'))
Well done !!!

{{ session()->get('success') }}

@endif
@if(!empty($suggestions)) @foreach ($suggestions as $suggestion) @php $isOpen = (int) $suggestion->status === 1; $ageDays = (int) optional($suggestion->created_at)->diffInDays(now()); $openBadgeClass = $ageDays <= 15 ? 'badge-success' : ($ageDays <= 30 ? 'badge-warning' : 'badge-danger'); $statusText = $isOpen ? 'Open' : 'Closed'; @endphp @endforeach @endif
Suggestion No. Member Name Location Name Review Content Date Status Actions
{{ $suggestion->reference_no ?? ('TC/SS/' . optional($suggestion->created_at)->format('Y') . '/' . str_pad((string) $suggestion->id, 4, '0', STR_PAD_LEFT)) }}
{{ $suggestion->member->name ?? 'N/A' }}
{{ $suggestion->location->location_name ?? 'N/A'}} {{ $suggestion->comment }} {{ optional($suggestion->created_at)->format('d-m-Y') }} @if($isOpen) {{ $statusText }} @else {{ $statusText }} @endif
Suggestion No. Department Name Location Name Review Content Date Status Actions
@stop @section('js') @include('admin.locationReviewDetails.scripts.index') @stop