1.6 KiB
1.6 KiB
Why
Currently, the frontend displays raw UUIDs for user references (assignee, creator, members) which creates a poor user experience. Users should see meaningful names like "Alice Smith" instead of "a1b2c3d4-e5f6-7890-abcd-ef1234567890". The backend already stores display names in the Member entity, but the API DTOs don't expose them.
What Changes
- Backend DTOs: Add name fields to task and shift DTOs
TaskListItemDto: Addstring? AssigneeNameTaskDetailDto: Addstring? AssigneeNameandstring CreatedByNameShiftSignupDto: Addstring MemberName
- Backend Services: Update TaskService and ShiftService to query and populate member names
- Join with Members table to fetch display names
- Include names in DTO construction
- Frontend Types: Update TypeScript interfaces to include new name fields
TaskListItemDto,TaskDetailDto,ShiftSignupDtointerfaces
- Frontend UI: Replace UUID displays with names
- Task list: show assignee name instead of ID
- Task detail: show assignee and creator names
- Shift detail: show member names in signup list
Capabilities
New Capabilities
member-name-enrichment: API DTOs include human-readable member names alongside IDs
Modified Capabilities
- None (this is purely an enhancement to existing capabilities)
Impact
- Backend: TaskService.cs, ShiftService.cs, and DTOs in WorkClub.Application
- Frontend: Tasks pages, Shifts pages, and React hooks (useTasks.ts, useShifts.ts)
- Database: Additional JOIN queries on Members table (no schema changes)
- API Response: New optional fields in existing endpoints (backward compatible)