@if(!empty($Today) && count($Today)>0)
Today
@php
$N_recordRepeatInfo = array();
$N_recorduserinfo = array();
@endphp
@foreach($Today as $row)
@php
$notificationDate = date('' . Config::get('Constant.DEFAULT_DATE_FORMAT') . ' ' . Config::get('Constant.DEFAULT_TIME_FORMAT') . '', strtotime($row->created_at));
$ReadToday = \App\UserNotification::getReadRecordList($row->id);
if (!isset($N_recordRepeatInfo[$row->ModelName][$row->fkRecordId]) && empty($N_recordRepeatInfo[$row->ModelName][$row->fkRecordId])) {
$recordData = \App\Helpers\Mylibrary::getModuleWiseRecordData($row->ModelName,$row->varTableName,$row->fkRecordId);
$N_recordRepeatInfo[$row->ModelName][$row->fkRecordId] = $recordData;
}else{
$recordData = $N_recordRepeatInfo[$row->ModelName][$row->fkRecordId];
}
if(isset($recordData->varEmail)){
$userEmail = \App\Helpers\Mylibrary::getLaravelDecryptedString($recordData->varEmail);
$dispalyInfo = $recordData->Title." - ".$userEmail;
$notificationIcon = $CDN_PATH.'resources/images/phone_icon.svg';
}else{
$notificationIcon = $CDN_PATH.'resources/images/man.png';
if(isset($recordData->Title)){
$dispalyInfo = $recordData->Title;
}else{
$dispalyInfo = "Record not Available";
}
if (!isset($N_recorduserinfo[$row->fkIntUserId]) && empty($N_recorduserinfo[$row->fkIntUserId])) {
$userlogoData = \App\Helpers\Mylibrary::getUserLogoByUserID($row->fkIntUserId);
$N_recorduserinfo[$row->fkIntUserId] = $userlogoData;
}else{
$userlogoData = $N_recorduserinfo[$row->fkIntUserId];
}
if(!empty($userlogoData)){
$notificationIcon = $userlogoData;
}
}
if($ReadToday > 0){
$class='';
}else{
$class='selected_read';
}
$redirctionModule ="";
if(!$userIsAdmin){
if($row->chrNotificationType=="C"){
$redirctionModule ="dashboard";
}else if($row->chrNotificationType=="T"){
$redirctionModule ="dashboard";
}else{
$redirctionModule = $row->ModuleName;
}
}else{
if(!in_array($row->fkIntModuleId,$currentUserAccessibleModulesIDs))
{
$redirctionModule ="dashboard";
}else{
$redirctionModule = $row->ModuleName;
}
}
@endphp
-
{{ $row->txtNotification }}
{{ $dispalyInfo }} {{ $notificationDate }}
@endforeach
@endif
@if(!empty($sevenDays) && count($sevenDays)>0)
Previous Notifications
@foreach($sevenDays as $row)
@php
$notificationDate = date('' . Config::get('Constant.DEFAULT_DATE_FORMAT') . ' ' . Config::get('Constant.DEFAULT_TIME_FORMAT') . '', strtotime($row->created_at));
$Readseven = \App\UserNotification::getReadRecordList($row->id);
if (!isset($N_recordRepeatInfo[$row->ModelName][$row->fkRecordId]) && empty($N_recordRepeatInfo[$row->ModelName][$row->fkRecordId])) {
$recordData = \App\Helpers\Mylibrary::getModuleWiseRecordData($row->ModelName,$row->varTableName,$row->fkRecordId);
$N_recordRepeatInfo[$row->ModelName][$row->fkRecordId] = $recordData;
}else{
$recordData = $N_recordRepeatInfo[$row->ModelName][$row->fkRecordId];
}
if(isset($recordData->varEmail)){
$userEmail = \App\Helpers\Mylibrary::getLaravelDecryptedString($recordData->varEmail);
$dispalyInfo = $recordData->Title." - ".$userEmail;
$notificationIcon = $CDN_PATH.'resources/images/phone_icon.svg';
}else{
$notificationIcon = $CDN_PATH.'resources/images/man.png';
if(isset($recordData->Title)){
$dispalyInfo = $recordData->Title;
}else{
$dispalyInfo = "Record not Available";
}
if (!isset($N_recorduserinfo[$row->fkIntUserId]) && empty($N_recorduserinfo[$row->fkIntUserId])) {
$userlogoData = \App\Helpers\Mylibrary::getUserLogoByUserID($row->fkIntUserId);
$N_recorduserinfo[$row->fkIntUserId] = $userlogoData;
}else{
$userlogoData = $N_recorduserinfo[$row->fkIntUserId];
}
if(!empty($userlogoData)){
$notificationIcon = $userlogoData;
}
}
if($Readseven > 0){
$class='';
}else{
$class='selected_read';
}
$redirctionModule ="";
if(!$userIsAdmin){
if($row->chrNotificationType=="C"){
$redirctionModule ="dashboard";
}else if($row->chrNotificationType=="T"){
$redirctionModule ="dashboard";
}else{
$redirctionModule = $row->ModuleName;
}
}else{
if(!in_array($row->fkIntModuleId,$currentUserAccessibleModulesIDs))
{
$redirctionModule ="dashboard";
}else{
$redirctionModule = $row->ModuleName;
}
}
@endphp
-
{{ $row->txtNotification }}
{{ $dispalyInfo }} {{ $notificationDate }}
@endforeach
@endif
@if(count($Today) <=0 && count($sevenDays) <= 0)
No Data Available
@endif