{{-- Money links for non-admin staff (manager, adviser, teacher), each shown only when this user has its permission (App\Support\Permissions — editable at /admin/permissions.php, per user at /admin/user_permissions.php) and its module is on for this instance. Admin's own sidebar keeps its fixed «Деньги» block: admin always has every permission. $withHeading prints a «Деньги» section title above the links when there is at least one to show (adviser/teacher, whose sidebars have none by default); the manager's sidebar lists them inline as before. --}} @php $moneyLinks = array_values(array_filter([ ['finances.view', 'admin_charges', '/admin/finances.php', 'bi-cash-coin', __('Финансы')], ['group_finances.view', null, '/admin/group_finances.php', 'bi-diagram-3', __('Финансы по группам')], ['payments.view', null, '/payments.php', 'bi-cash-stack', __('Оплаты')], ['charges.view', 'admin_charges', '/charges.php', 'bi-receipt', __('Начисления')], ['tariffs.view', 'admin_tariffs', '/admin/tariffs.php', 'bi-tags', __('Тарифы')], ['teacher_pay.view', 'admin_teachers_summary', '/admin/teachers_count.php', 'bi-people', __('Сводка по преподавателям')], ], fn (array $l) => \App\Support\Permissions::current($l[0]) && ($l[1] === null || \App\Support\Modules::enabled($l[1])))); @endphp {{-- One «Деньги» row folding them all (a plain row when there's only one). The row is its own label, so $withHeading no longer prints a section title. --}} @include('layouts.partials._nav_group', [ 'id' => 'navGroupStaffMoney', 'label' => __('Деньги'), 'icon' => 'bi-cash-coin', 'links' => array_map(fn (array $l) => [$l[2], $l[3], $l[4]], $moneyLinks), ])