refactor: move secretary and staff management from main nav to settings menu

Remove پرسنل (/admin/staff) and منشی ها (/admin/my-secretaries) from the
clinic and doctor main sidebars; surface them under the settings menu instead
(PurchaseSubscriptionSidebar + SETTINGS_MENU). Wrap StaffPage in SettingsLayout
so it renders inside the settings shell like MySecretariesPage already does.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-07-15 11:51:31 +03:30
co-authored by Claude Opus 4.8
parent cf02fdd433
commit 850b2832ff
5 changed files with 29 additions and 17 deletions
@@ -0,0 +1,22 @@
import { describe, it, expect } from 'vitest';
import { screen } from '@testing-library/react';
import { renderWithProviders } from '../../test/utils';
import PurchaseSubscriptionSidebar from './PurchaseSubscriptionSidebar';
describe('PurchaseSubscriptionSidebar — settings menu', () => {
it('lists secretary and staff management (moved out of the main nav)', () => {
renderWithProviders(<PurchaseSubscriptionSidebar active="staff" />, { route: '/admin/staff' });
const secretary = screen.getByRole('link', { name: 'مدیریت منشی' });
const staff = screen.getByRole('link', { name: 'پرسنل' });
expect(secretary).toHaveAttribute('href', '/admin/my-secretaries');
expect(staff).toHaveAttribute('href', '/admin/staff');
});
it('highlights the active item (aria-current) for staff', () => {
renderWithProviders(<PurchaseSubscriptionSidebar active="staff" />, { route: '/admin/staff' });
expect(screen.getByRole('link', { name: 'پرسنل' })).toHaveAttribute('aria-current', 'page');
expect(screen.getByRole('link', { name: 'مدیریت منشی' })).not.toHaveAttribute('aria-current');
});
});