Skip to content

Fix type violations and improve role string safety in UI#18

Merged
RedAvocado22 merged 1 commit into
mainfrom
fix/hot-fix
Mar 25, 2026
Merged

Fix type violations and improve role string safety in UI#18
RedAvocado22 merged 1 commit into
mainfrom
fix/hot-fix

Conversation

@RedAvocado22

Copy link
Copy Markdown
Owner
  • Fix getDepartments return type: Department[] → PaginatedResponse
  • Update CreateEmployeePage department dropdown to read .content
  • Add isError handling to MedicalRecordsPage (shows Alert on failure)
  • Extract all role string literals into src/constants/roles.ts (ROLES, ROLE_NAMES)
  • Replace hardcoded role strings across jwt.ts, MedicalRecordDetailPage, CreateEmployeePage, and EmployeeListPage

- Fix getDepartments return type: Department[] → PaginatedResponse<Department>
- Update CreateEmployeePage department dropdown to read .content
- Add isError handling to MedicalRecordsPage (shows Alert on failure)
- Extract all role string literals into src/constants/roles.ts (ROLES, ROLE_NAMES)
- Replace hardcoded role strings across jwt.ts, MedicalRecordDetailPage,
  CreateEmployeePage, and EmployeeListPage
@RedAvocado22 RedAvocado22 merged commit a55b469 into main Mar 25, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant