Skip to content

Fix type violations and enhance role string safety in UI#17

Closed
RedAvocado22 wants to merge 1 commit into
mainfrom
fix/hot-fix
Closed

Fix type violations and enhance role string safety in UI#17
RedAvocado22 wants to merge 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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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