[Fix] 대시보드 우선 업무 카드에 근로자 이름이 안 뜨는 경우가 많음 - #328
Merged
Merged
Conversation
priority_tasks에는 worker_id만 있고 서버가 이름을 안 줘서, upcoming_7_days 목록에 겹치는 근로자만 우연히 이름이 보이던 문제. 전체 근로자 목록을 추가 조회해서 매핑에 사용하도록 수정. closes #327
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #327
실제 브라우저로 확인 — Today 대시보드 "담당자 우선 업무" 카드가 자주 "근로자 이름 미제공"으로 표시됨.
priority_tasks에는worker_id만 있고 이름이 없어서,upcoming_7_days와 겹치는 근로자만 우연히 이름이 보이던 구조였음.변경 사항
fetchWorkers({ size: 100 })) 추가 조회해서 이름 매핑에 사용, 기존 upcoming_7_days 매핑은 폴백 유지트러블슈팅
동시 fetch 2개(오늘 데이터 + 근로자 목록)를 테스트에서 같은
Response객체 하나로 mock하고 있어서, body를 두 번 읽으려다 스트림 에러가 나는 기존 테스트 버그도 같이 발견·수정 (mockResolvedValue(jsonResponse(x))→ 매 호출마다 새 Response 만드는mockImplementation으로 교체).검증
tsc -b/lint/ 전체 테스트 441개 /build통과