closed:#628 Item reminder is not reminding with notifications

This commit is contained in:
Batuhan Baş 2018-11-16 16:34:23 +03:00
parent f5495474c6
commit c81f156c89
3 changed files with 14 additions and 0 deletions

View File

@ -24,6 +24,7 @@ class Header
$bills = [];
$invoices = [];
$items = [];
$items_reminder = [];
$notifications = 0;
$company = null;
@ -55,6 +56,10 @@ class Header
$items[$data['item_id']] = $data['name'];
$notifications++;
break;
case 'App\Notifications\Common\ItemReminder':
$items_reminder[$data['item_id']] = $data['name'];
$notifications++;
break;
}
}
@ -68,6 +73,7 @@ class Header
'bills' => $bills,
'invoices' => $invoices,
'items' => $items,
'items_reminder' => $items_reminder,
'company' => $company,
'updates' => $updates,
]);

View File

@ -9,6 +9,7 @@ return [
'overdue_invoices' => '{1} :count overdue invoice|[2,*] :count overdue invoices',
'upcoming_bills' => '{1} :count upcoming bill|[2,*] :count upcoming bills',
'items_stock' => '{1} :count item out of stock|[2,*] :count items out of stock',
'items_reminder' => '{1} You have :count item left|[2,*] You have :count items left',
'view_all' => 'View All'
],
'docs_link' => 'https://akaunting.com/docs',

View File

@ -130,6 +130,13 @@
</a>
</li>
@endif
@if (count($items_reminder))
<li>
<a href="{{ url('auth/users/' . $user->id . '/read-items') }}">
<i class="fa fa-cubes text-red"></i> {{ trans_choice('header.notifications.items_reminder', count($items_reminder), ['count' => count($items_reminder)]) }}
</a>
</li>
@endif
</ul>
</li>
<li class="footer"><a href="#">{{ trans('header.notifications.view_all') }}</a></li>