feat: 근로자 등록/수정을 workers API에 연결 - #271
Merged
Merged
Conversation
WorkerController에 이미 있던 POST/PATCH /workers를 아무데도 안 부르고 있어서 UI에서 근로자를 등록·수정할 방법이 없었음. WorkerFormModal 하나로 등록/수정 겸용 폼 만들고, 목록 페이지엔 등록 버튼, 상세 페이지 기본정보 카드엔 수정 버튼 붙임. Closes #270
4 tasks
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.
요약
WorkerController에 이미 있던POST /api/v1/workers(등록),PATCH /api/v1/workers/{id}(수정)를 아무 client 코드도 호출하지 않고 있어서 UI에서 근로자 등록·수정이 아예 불가능했음src/api/workers.ts에registerWorker/patchWorker추가src/components/worker/WorkerFormModal.tsx신설 — 등록/수정 겸용 모달 (표시 이름, 국적 칩, 선호 언어, 근무상태(수정 전용), 체류 만료일, 계약 기간). 수정은expected_version으로 낙관적 잠금 처리WorkerListPage툴바에 "+ 근로자 등록" 버튼, 성공 시 목록 refetch + 새 근로자 선택WorkerDetailPage"기본정보" 카드에 "정보 수정" 버튼, 성공 시 상세 refetchPWF3/Screen/PEOPLE-001(node1291:1010) 확인 결과 이 화면엔 인라인 폼이 없어서, 기존 목록/상세 화면에 버튼만 추가하는 방식으로 구현 (새 화면 없음)검증
npx tsc -b✅npm run lint✅npx vitest run— 352/352 통과 (신규 2건 포함) ✅npm run build✅Closes #270