Consolidate the 7 role dashboards into one role-aware /dashboard
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- nuxt, typescript
- Domain
- authorization, documentation, frontend
Research direction
Review the local implementation and the listed dashboard, navigation, layout, permissions, config, and requirements files first. Run nuxt build, eslint, and prettier, then live-test /dashboard for each role and verify the old dashboard URLs and all 13 tile destinations behave as specified.
Written by the indexing model from the issue text.
Description
Summary
Collapse the seven role-specific dashboard pages into a single role-aware /dashboard whose tiles show/hide via conditionals on the signed-in user's permissions. This removes ~7 near-identical page files, deletes the per-role dashboard URLs, and simplifies the routing/composable layer that fanned users out to one-of-seven dashboards.
Status: design finalized + a full implementation exists locally (uncommitted, build-verified). Work is paused pending review before it goes onto a branch/PR. This issue captures the complete context to resume or re-do.
Motivation
The seven dashboards are the same page rendered seven ways — each is just useDashboardGuard(ROLE) + a computed tiles array + <DashboardTiles :tiles>:
| File | Route | Role |
|---|---|---|
pages/dashboard/admin.vue |
/admin |
ADMIN |
pages/dashboard/iTServiceDashboard.vue |
/iTServiceDashboard |
IT_SERVICE |
pages/dashboard/userServiceDashboard.vue |
/userServiceDashboard |
USER_SERVICE |
pages/dashboard/therapistDashboard.vue |
/therapistDashboard |
THERAPIST |
pages/dashboard/evaluatorDashboard.vue |
/dashboard/evaluatorDashboard |
EVALUATOR |
pages/dashboard/parentDashboard.vue |
/parentDashboard |
PARENT |
pages/dashboard/patientDashboard.vue |
/patientDashboard |
PATIENT |
pages/dashboard/dashboard.vue |
/dashboard |
(fallback welcome) |
Access is a set of role booleans (server/utils/permissions.ts → computePermissions), and every authenticated user carries USER: true, so a single /dashboard gated USER safely admits everyone (including PATIENT/PARENT). ADMIN is a declared superset of every employee capability (STAFF, USER_SERVICE, IT_SERVICE, THERAPIST, EVALUATOR).
The feature pages are NOT part of this — patientSearch, viewContactForms, scheduleView, referrals, etc. already exist as single permission-gated pages shared across roles. Two of them (patient/patientProfile/[id].vue with can('PATIENT')/can('THERAPIST') v-ifs, and admin/scheduleView.vue with USER_SERVICE/ADMIN branching) are already the exact "one page, role conditionals" pattern this issue applies to dashboards. No feature-page changes needed.
Decisions (settled)
- Multi-role behavior: show the union of every tile the user qualifies for (not one dashboard picked by priority). Strictly more capable.
- Tile gating: each tile is gated by the destination page's own permission (same rule the router enforces via
pageAccessMap), so a tile only appears when the user can actually open it — no dead tiles. - Old per-role URLs: deleted entirely (not redirected). Stale bookmarks 404 / bounce via middleware.
- Scope: dashboards only; feature pages audited and confirmed already-consolidated.
Design — unified tile catalog
One pages/dashboard/dashboard.vue, one catalog, each tile filtered by useAccess().can(...):
| Tile | Destination | Gate (permission) |
|---|---|---|
| Schedule | /scheduleView |
USER (all authenticated) |
| View Patients | patient-patientSearch |
STAFF |
| Contact Forms | /viewContactForms |
USER_SERVICE |
| Appointment Requests | /viewAppointmentRequests |
USER_SERVICE |
| Assign Specialist | /assignNeuroSpecialist |
USER_SERVICE |
| Create Referral | evaluator-createReferral |
EVALUATOR |
| My Referrals | evaluator-myReferrals |
EVALUATOR |
| Employees | /admin/employeeSearch |
ADMIN |
| Create Account | /admin/createAccount |
ADMIN |
| Children | childSearch (/myChildren) |
PARENT |
| Profile | myProfile-id |
PATIENT |
| Appointments | /patient/appointments |
PATIENT |
| Request Services | requestForm |
PATIENT |
Latent bug this fixes
Today's dashboards link to routes the middleware forbids for that role:
- IT dashboard shows Contact Forms / Employees / Create Account, but IT only has
IT_SERVICE + STAFF + USER; those routes requireUSER_SERVICE/ADMIN, so clicking bounces IT — 3 of its 4 tiles are dead (it looks copy-pasted from the admin dashboard). - Evaluator dashboard shows Contact Forms (
USER_SERVICE), which evaluators also can't open.
Capability-gating (decision #2) removes these dead tiles and, conversely, surfaces tiles a role can use (e.g. IT gains View Patients via STAFF).
Blast radius / files
Delete: the 7 role dashboard .vue files (keep dashboard/dashboard.vue, rewritten).
Rewire:
composables/auth/useDashboardNavigation.ts— collapse per-role branches →/dashboardlayouts/default.vue—dashboardPath→/dashboard; drop dead evaluatorNAV_METAentry + now-unusedaccesscomposables/auth/useUserLinks.ts— remove deaddashboard-evaluatorDashboardsidebar linktypes/permissions.ts— remove 7 deadpageAccessMapentries (keepdashboard-dashboard: USER)nuxt.config.ts— remove 6 deadrouteOverridesdocs/REQUIREMENTS.md— §4.4 table → single-dashboard description
useDashboardGuard stays (still used by pages/patient/appointments.vue).
Verification done on the local implementation
nuxt build→ exit 0 (all templates + types compile)eslint→ 0 errors (2 pre-existingmulti-word-component-nameswarnings on filenames)prettier→ changed code files clean (REQUIREMENTS.mdprettier warning is pre-existing at HEAD)- Built route table: all 7 old dashboard paths + bare
/adminremoved;/dashboardpresent; all 13 tile destinations resolve (by path or name) - Net diff: 14 files, +141 / −313
Next steps to resume
- Move the local WIP onto a branch + open PR
- Live click-through of
/dashboardas each role (admin, user-service, IT, therapist, evaluator, parent, patient) — confirm union tiles + no dead tiles - Confirm the deleted-URL behavior (old bookmarks 404/bounce) is acceptable
- Decide whether
useDashboardGuardshould also be removed frompatient/appointments.vue(redundant with middleware)
- Dominant language
- Vue
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from UTDallasEPICS/connected-care
-
area: auth enhancement P2: medium security
Difficulty 5/5 Over a week Newbie friendliness 35/100
UTDallasEPICS/connected-care#309 ·
-
area: auth enhancement P1: high security
Difficulty 5/5 Over a week Newbie friendliness 25/100
UTDallasEPICS/connected-care#308 ·
-
area: auth enhancement P1: high security
Difficulty 5/5 Over a week Newbie friendliness 38/100
UTDallasEPICS/connected-care#307 ·
-
area: auth enhancement P1: high security
Difficulty 5/5 Over a week Newbie friendliness 25/100
UTDallasEPICS/connected-care#306 ·
-
area: patient area: schedule enhancement P2: medium
Difficulty 5/5 Over a week Newbie friendliness 35/100
UTDallasEPICS/connected-care#305 ·
All issues in UTDallasEPICS/connected-care
Similar issues
-
Discovered ports from service discovery are never propagated to modules in Module.load()Possibly taken @vishalmore90 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OWASP/Nettacker#1828 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
sjkim1127/Reversecore_MCP#363 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Azure/azure-storage-azcopy#3674 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 70/100
OpenZeppelin/openzeppelin-relayer#967 ·
Maintainers usually reply within 1 day
-
bot-found bug priority: P3
Difficulty 1/5 Under an hour Newbie friendliness 74/100
madenvel/KalinkaPlayer#497 ·