refactor(dashboard): drop the services list from the staff dashboard

The assigned-services card and its stat card are gone. The staff role has one
job — today's sessions — and with /admin/my-services already removed, a list of
services the operator cannot act on was the last thing on the page competing
with the work itself.

The remaining stat card no longer stretches the page: `.stat-grid` is built for
four cards and collapses to one full-width column with a single child, so the
staff grid is capped.

The endpoint still returns `services` and `stats.services`; the field is
documented and cheap, and nothing else needed to change to stop rendering it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-08-07 14:38:21 +03:30
co-authored by Claude Opus 5
parent 93c11139fd
commit e43e8ec93e
2 changed files with 22 additions and 51 deletions
+9 -3
View File
@@ -220,14 +220,20 @@ describe('داشبورد پرسنل', () => {
expect(screen.getByText('محمد رستمی')).toBeInTheDocument();
});
it('کارت جلسات لینک است و کارت سرویس‌ها نیست', async () => {
it('کارت جلسات لینک است', async () => {
renderWithProviders(<DashboardPage />);
const sessions = (await screen.findByText('جلسات امروز من')).closest('a');
expect(sessions).toHaveAttribute('href', '/admin/my-sessions');
});
// صفحهٔ «سرویس‌های من» حذف شد؛ کارتِ بدون مقصد نباید لینک باشد.
expect(screen.getByText('سرویس‌های من').closest('a')).toBeNull();
/** سرویس‌ها کارِ اپراتور نیستند؛ داشبورد فقط کارِ امروز را نشان می‌دهد. */
it('هیچ‌جای داشبورد سرویس‌ها را نشان نمی‌دهد', async () => {
renderWithProviders(<DashboardPage />);
await screen.findByText('محمد رسولی');
expect(screen.queryByText('سرویس‌های من')).not.toBeInTheDocument();
expect(screen.queryByText('سرویس‌های تخصیص‌یافته')).not.toBeInTheDocument();
});
it('هر ردیف کار به همان جلسه می‌رود', async () => {