Import notification file and updated other file..

This commit is contained in:
Cüneyt Şentürk
2021-06-19 22:30:14 +03:00
parent 4687185f4a
commit 5c5b890942
12 changed files with 182 additions and 27 deletions

View File

@ -20,7 +20,7 @@ class Header
{
$user = user();
$invoices = $bills = $exports = $imports = [];
$new_apps = $invoices = $bills = $exports = $imports = [];
$updates = $notifications = 0;
$company = null;
@ -51,11 +51,11 @@ class Header
$notifications++;
break;
case 'App\Notifications\Common\ImportCompleted':
$import_completed[$data['bill_id']] = $data['amount'];
$imports['completed'][] = $data['translation'];
$notifications++;
break;
case 'App\Notifications\Common\ImportFailed':
$import_failed[$data['bill_id']] = $data['amount'];
$imports['failed'][] = '';
$notifications++;
break;
case 'App\Notifications\Purchase\Bill':
@ -68,6 +68,12 @@ class Header
break;
}
}
$new_apps = $this->getNotifications('new-apps');
foreach ($new_apps as $new_app) {
$notifications++;
}
}
if ($user->can('read-install-updates')) {
@ -80,6 +86,7 @@ class Header
$view->with([
'user' => $user,
'notifications' => $notifications,
'new_apps' => $new_apps,
'exports' => $exports,
'imports' => $imports,
'bills' => $bills,