@extends('layouts.vendor.app') @section('title', translate('messages.Notification_Setup')) @section('content')
{{ translate('messages.From here you setup who can see what types of notification from') }} {{ $business_name }}
|
{{ translate('messages.Sl') }}
{{ translate('messages.Push Notification') }}
{{ translate('messages.Mail') }}
{{ translate('messages.SMS') }}
{{ translate('messages.Topics') }}
|
||||
|---|---|---|---|---|
@php
$grouped = collect($data)->groupBy(function ($item) {
$parts = explode('_', (string) $item->key);
return $parts[1] ?? 'other';
});
$titleFromKey = function ($g) {
return ucwords(str_replace('_', ' ', $g));
};
$sl = 0;
@endphp
@foreach ($grouped as $groupKey => $items)
{{ $titleFromKey($groupKey) }}
@foreach ($items as $key => $item)
@php
$sl++;
$item_admin_data = \App\CentralLogics\Helpers::getNotificationStatusData('restaurant', $item->key);
@endphp
@endforeach
{{ $sl }}
{{ translate($item->title) }}{{ translate($item->sub_title) }}
@if ($item_admin_data->push_notification_status == 'disable')
{{ translate('messages.N/A') }}
{{-- @elseif($item_admin_data->push_notification_status == 'inactive')
--}}
@else
@endif
@if ($item_admin_data->mail_status == 'disable')
{{ translate('messages.N/A') }}
@elseif($item_admin_data->mail_status == 'inactive')
@else
@endif
@if ($item_admin_data->sms_status == 'disable')
{{ translate('messages.N/A') }}
@elseif($item_admin_data->sms_status == 'inactive')
@else
@endif
|
||||