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

View File

@ -9,6 +9,7 @@ return [
'overdue_invoices' => '{1} :count overdue invoice|[2,*] :count overdue invoices', 'overdue_invoices' => '{1} :count overdue invoice|[2,*] :count overdue invoices',
'upcoming_bills' => '{1} :count upcoming bill|[2,*] :count upcoming bills', '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_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' 'view_all' => 'View All'
], ],
'docs_link' => 'https://akaunting.com/docs', 'docs_link' => 'https://akaunting.com/docs',

View File

@ -130,6 +130,13 @@
</a> </a>
</li> </li>
@endif @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> </ul>
</li> </li>
<li class="footer"><a href="#">{{ trans('header.notifications.view_all') }}</a></li> <li class="footer"><a href="#">{{ trans('header.notifications.view_all') }}</a></li>