مرحباً
{{ Auth::user()['user_name'] }}
@php $shortcut_items = []; @endphp
@can('accounting')
@php
$accounting_shortcuts = [
[
'title' => __('home.add_entry'),
'link' => 'entries.create',
'icon' => 'fa-clipboard-list',
'perm' => 'accounting-entries-add',
],
[
'title' => __('home.add_receipt_entry'),
'link' => 'receipts.create',
'icon' => 'fa-money-bill-wave-alt',
'perm' => 'accounting-receipts-add',
],
[
'title' => __('home.add_exchange_entry'),
'link' => 'exchanges.create',
'icon' => 'fa-money-check-alt',
'perm' => 'accounting-exchanges-add',
],
[
'title' => __('home.add_sales_services_invoice'),
'link' => 'services-invoices.create',
'icon' => 'fa-file-invoice',
'perm' => 'accounting-servicesInvoices-add',
],
[
'title' => __('home.add_returned_services_bond'),
'link' => 'returned-services-bonds.create',
'icon' => 'fa-file-invoice',
'perm' => 'accounting-returnedServicesBonds-add',
],
[
'title' => __('home.add_debit_note'),
'link' => 'debitNotes.create',
'icon' => 'fa-file-import',
'perm' => 'accounting-debitNotes-add',
],
[
'title' => __('home.add_credit_note'),
'link' => 'creditNotes.create',
'icon' => 'fa-file-export',
'perm' => 'accounting-creditNotes-add',
],
];
foreach ($accounting_shortcuts as $accounting_shortcut) {
if (Permission::where('name', $accounting_shortcut['perm'])->where('guard_name', 'web')->exists()) {
if (Auth::check() && Auth::user()->hasPermissionTo($accounting_shortcut['perm'])) {
$accounting_shortcut['link'] = 'tenant.accounting.' . $accounting_shortcut['link'];
$shortcut_items[] = $accounting_shortcut;
}
}
}
@endphp
@endcan
@can('rentals')
@php
$rentals_shortcuts = [
[
'title' => __('home.shops'),
'link' => 'tenant.rentals.shops.index',
'icon' => 'fa-door-open',
'perm' => 'rentals-shops-show',
],
[
'title' => __('home.add_contract'),
'link' => 'tenant.rentals.rental-contracts.create',
'icon' => 'fa-city',
'perm' => 'rentals-contracts-add',
],
];
foreach ($rentals_shortcuts as $rentals_shortcut) {
if (Auth::user()->hasPermissionTo($rentals_shortcut['perm'])) {
$shortcut_items[] = $rentals_shortcut;
}
}
@endphp
@endcan