Skip to content

Commit

Permalink
Chip 파트 한 개 이슈 대응 (#932)
Browse files Browse the repository at this point in the history
* test: 임시로 Chip 구현 (MDS 문의 필요)

* feat: chip 구현 및 반응형 작업

* feat: 전체파트 클릭 로직 + MDS Chip 연결

* docs: 불필요한 파일 삭제

* docs: 불필요한 코드 삭제

* fix: 개별 옵션 해제 시 전체파트 해제 로직 추가

* refactor: 코드리뷰 반영

* refactor: input 높이 반응형 제거

* feat: 모임 안내 모집 대상 chip 변경

* style: 색상변경

* style: QA 반영

* fix: 이슈대응
  • Loading branch information
j-nary authored Oct 13, 2024
1 parent 989a82a commit 78d7678
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pages/edit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const EditPage = () => {
parts.length - 2 === formData?.joinableParts.length
? parts
: // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
[parts[0], ...formData!.joinableParts.map(partString => parts.find(part => part.value === partString))];
[...formData!.joinableParts.map(partString => parts.find(part => part.value === partString))];

formMethods.reset({
...formData,
Expand All @@ -94,7 +94,6 @@ const EditPage = () => {
isMentorNeeded: formData?.isMentorNeeded,
joinableParts,
canJoinOnlyActiveGeneration: formData?.canJoinOnlyActiveGeneration,
//targetDesc: formData?.targetDesc,
note: formData?.note ?? '',
},
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/form/TableOfContents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ function TableOfContents({ label }: TableOfContentsProps) {
const isTargetValid =
form.detail &&
form.detail.joinableParts &&
form.detail.joinableParts.length > 1 &&
form.detail.joinableParts.length > 0 &&
form.capacity &&
!errors.capacity &&
!errors.detail; // default 옵션이 선택되어 있기 때문 최소 2개 이상 선택되어야 통과
!errors.detail;
const isActivationDateValid = form.detail && form.detail.mStartDate && form.detail.mEndDate;
const isProcessDesc = form.detail?.processDesc;
return (
Expand Down
2 changes: 1 addition & 1 deletion src/types/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const schema = z.object({
value: z.string().nullable(),
})
)
.min(2, { message: '대상 파트를 선택해주세요.' }), // NOTE: default 옵션에 더해 최소 1개는 선택해야 한다(총 2개)
.min(1, { message: '대상 파트를 선택해주세요.' }),
note: z.string().max(1000, { message: '1000자 까지 입력 가능합니다.' }).optional().nullable(),
}),
});
Expand Down

0 comments on commit 78d7678

Please sign in to comment.