@php
// Badge classes
switch ($notification->type) {
case 'new_query':
case 'new_Query':
$badgeClass = 'bg-info';
break;
case 'booking_cancellation':
$badgeClass = 'bg-danger';
break;
case 'max_voucher_limit_exceed':
$badgeClass = 'bg-warning text-dark';
break;
case 'preferred_timings':
case 'Preferred Timings':
$badgeClass = 'bg-primary';
break;
case 'spo_product_request':
$badgeClass = 'bg-warning';
break;
case 'payment_link_paid':
$badgeClass = 'bg-dark';
break;
case 'new_booking_request':
$badgeClass = 'bg-purple';
break;
case 'new_SPO_registration':
$badgeClass = 'bg-success';
break;
case 'user_slot_change_request':
$badgeClass = 'bg-pink';
break;
case 'SPO_product_enable':
case 'SPO_product_administration':
$badgeClass = 'bg-darkGreen';
break;
case 'payment_link_expired':
$badgeClass = 'bg-danger';
break;
case 'voucher_expired':
$badgeClass = 'bg-warning text-dark';
break;
default:
$badgeClass = 'bg-secondary';
}
// Translate notification type
$formattedType = trans('messages.types.' . strtolower($notification->type));
if ($formattedType === 'messages.types.' . strtolower($notification->type)) {
$formattedType = \Illuminate\Support\Str::title(str_replace('_', ' ', $notification->type));
}
// Translate status
$status = trans('messages.notificationstatus.' . $notification->status);
if ($status === 'messages.notificationstatus.' . $notification->status) {
$status = $notification->status;
}
@endphp
{{ $formattedType }}
{{ $status }}
@if(!$notification->is_read)
@else
@endif
{{ ucwords($notification->customer_name) }} - {{ $notification->customer_email }} - {{ $notification->customer_phone }}
@if(is_array($notification->data))