* You should not negative operator with `if ... else ... then` block.
```php
if (value['status'] == 'rejected'){
  var html = '<div class="row danger alert notification" id="notification_' + notification_id + '" hidden="hidden">';
} else {
  var html = '<div class="row success alert notification" id="notification_' + notification_id + '" hidden="hidden">';  
}
```

* You should DRY as much as you possible
```php
$notice_class = (value['status'] == 'rejected') ? "danger" : "success";
var html = "<div class=¥"row #{$notice_class} alert notification¥" id=¥"notification_" + notification_id + '" hidden="hidden">';
```