@php $user = auth()->user(); $ctx = app(\App\Support\Tenancy\TenantContext::class); $can = fn (string $permission) => $user->hasPermission($permission); $moduleOn = fn (string $module) => $ctx->moduleEnabled($module); $tenant = $ctx->tenant(); $subscription = $tenant?->currentSubscription; $mode = $user->ui_mode ?? 'simple'; $sections = [ 'عملیات روزانه' => array_values(array_filter([ $can('dashboard.view') ? ['label' => 'داشبورد', 'route' => 'dashboard', 'icon' => 'dashboard'] : null, $can('intake.view') && $moduleOn('intake') ? ['label' => 'ورود شلتوک', 'route' => 'intake.index', 'icon' => 'inbox'] : null, $can('dryers.view') && $moduleOn('dryers') ? ['label' => 'خشککنها', 'route' => 'dryers.index', 'icon' => 'wind'] : null, $can('processing.view') && $moduleOn('processing') ? ['label' => 'تولید و تبدیل', 'route' => 'production.index', 'icon' => 'cog'] : null, $can('pos.use') && $moduleOn('pos') ? ['label' => 'صندوق فروش', 'route' => 'pos.index', 'icon' => 'cart'] : null, ])), 'اشخاص' => array_values(array_filter([ $can('farmers.view') && $moduleOn('farmers') ? ['label' => 'کشاورزان', 'route' => 'farmers.index', 'icon' => 'users'] : null, $can('customers.view') && $moduleOn('sales') ? ['label' => 'مشتریان', 'route' => 'customers.index', 'icon' => 'users'] : null, $can('purchases.view') && $moduleOn('inventory') ? ['label' => 'فروشندگان', 'route' => 'suppliers.index', 'icon' => 'truck'] : null, $can('workers.view') && $moduleOn('workers') ? ['label' => 'کارگران', 'route' => 'workers.index', 'icon' => 'scale'] : null, ])), 'فروش و خرید' => array_values(array_filter([ $can('sales.view') && $moduleOn('sales') ? ['label' => 'فاکتورهای فروش', 'route' => 'sales.index', 'icon' => 'receipt'] : null, $can('sales.view') && $moduleOn('sales') ? ['label' => 'برگشت از فروش', 'route' => 'sale-returns.index', 'icon' => 'receipt'] : null, $can('purchases.view') && $moduleOn('inventory') ? ['label' => 'فاکتورهای خرید', 'route' => 'purchases.index', 'icon' => 'truck'] : null, $can('purchases.view') && $moduleOn('inventory') ? ['label' => 'برگشت از خرید', 'route' => 'purchase-returns.index', 'icon' => 'truck'] : null, ])), 'مالی و انبار' => array_values(array_filter([ $can('banking.view') && $moduleOn('banking') ? ['label' => 'خزانه و بانک', 'route' => 'banking.index', 'icon' => 'bank'] : null, $can('banking.view') && $moduleOn('banking') ? ['label' => 'دریافت و پرداخت', 'route' => 'payments.index', 'icon' => 'wallet'] : null, $can('banking.view') && $moduleOn('banking') ? ['label' => 'چکها', 'route' => 'cheques.index', 'icon' => 'receipt'] : null, $can('banking.view') && $moduleOn('banking') ? ['label' => 'هزینهها', 'route' => 'expenses.index', 'icon' => 'wallet'] : null, $can('inventory.view') && $moduleOn('inventory') ? ['label' => 'موجودی انبار', 'route' => 'inventory.index', 'icon' => 'archive'] : null, $can('inventory.view') && $moduleOn('inventory') ? ['label' => 'کالاها', 'route' => 'products.index', 'icon' => 'archive'] : null, $can('inventory.count') && $moduleOn('inventory') ? ['label' => 'انبارگردانی', 'route' => 'stock-counts.index', 'icon' => 'scale'] : null, ])), 'حسابداری و گزارش' => array_values(array_filter([ $can('accounting.view') && $moduleOn('accounting') ? ['label' => 'حسابداری', 'route' => 'accounting.index', 'icon' => 'calculator'] : null, $can('accounting.view') && $moduleOn('accounting') ? ['label' => 'اسناد حسابداری', 'route' => 'journal.index', 'icon' => 'calculator'] : null, $can('accounting.view') && $moduleOn('accounting') ? ['label' => 'تراز آزمایشی', 'route' => 'accounting.trial-balance', 'icon' => 'scale'] : null, $can('accounting.view') && $moduleOn('accounting') ? ['label' => 'سود و زیان', 'route' => 'accounting.income-statement', 'icon' => 'chart'] : null, $can('accounting.view') && $moduleOn('accounting') ? ['label' => 'ترازنامه', 'route' => 'accounting.balance-sheet', 'icon' => 'chart'] : null, $can('reports.view') && $moduleOn('reports') ? ['label' => 'گزارشها', 'route' => 'reports.index', 'icon' => 'chart'] : null, ])), 'سیستم' => array_values(array_filter([ $can('calendar.view') ? ['label' => 'تقویم و یادآوری', 'route' => 'calendar.index', 'icon' => 'calendar'] : null, $can('support.view') && $moduleOn('support') ? ['label' => 'پشتیبانی', 'route' => 'tickets.index', 'icon' => 'lifebuoy'] : null, $can('settings.view') ? ['label' => 'تنظیمات', 'route' => 'settings.index', 'icon' => 'settings'] : null, ])), ]; $sections = array_filter($sections); @endphp
@yield('title', 'داشبورد')
{{ jdate(now(), 'j F') }} · {{ jdate(now(), 'Y') }}
اعلانها
اعلانی نیست.
{{ $user->mobile }}
{{ $user->roles->pluck('name')->implode('، ') ?: 'بدون نقش' }}