diff --git a/public/images/org/ImgSchedule.png b/public/images/org/ImgSchedule.png new file mode 100644 index 00000000..fe262ad1 Binary files /dev/null and b/public/images/org/ImgSchedule.png differ diff --git a/src/components/org/OrgAdmin/AboutSection/Executives/ExecInfo.tsx b/src/components/org/OrgAdmin/AboutSection/Executives/ExecInfo.tsx index c55dba95..c2b75e45 100644 --- a/src/components/org/OrgAdmin/AboutSection/Executives/ExecInfo.tsx +++ b/src/components/org/OrgAdmin/AboutSection/Executives/ExecInfo.tsx @@ -51,6 +51,7 @@ const ExecInfo = ({ { ))} - - {/* - - */} + + + + ); }; diff --git a/src/components/org/OrgAdmin/AboutSection/Schedule/style.ts b/src/components/org/OrgAdmin/AboutSection/Schedule/style.ts index 17c29b86..69d3b7e3 100644 --- a/src/components/org/OrgAdmin/AboutSection/Schedule/style.ts +++ b/src/components/org/OrgAdmin/AboutSection/Schedule/style.ts @@ -98,6 +98,6 @@ export const StScheduleSessionField = styled(TextField)` export const StScheduleModalWrapper = styled.div` position: absolute; - top: 0; + top: 56px; left: calc(100% + 20px); `; diff --git a/src/components/org/OrgAdmin/HomeSection/HomeSection.tsx b/src/components/org/OrgAdmin/HomeSection/HomeSection.tsx index 56af27fc..c2655891 100644 --- a/src/components/org/OrgAdmin/HomeSection/HomeSection.tsx +++ b/src/components/org/OrgAdmin/HomeSection/HomeSection.tsx @@ -63,11 +63,15 @@ const HomeSectionContent = ({ onEditModeChange }: HomeSectionProps) => { const isDeployModalOpen = editStep === EDIT_STEP.DEPLOY; useEffect(() => { + if (isEditMode) { + return; + } + setDraft({ reviews: initialReviews, news: latestNews, }); - }, [initialReviews, latestNews]); + }, [initialReviews, isEditMode, latestNews]); const resetDraft = () => { setDraft({ diff --git a/src/components/org/OrgAdmin/HomeSection/_components/Modal/EditReviewModal.tsx b/src/components/org/OrgAdmin/HomeSection/_components/Modal/EditReviewModal.tsx index f324dd6e..2e342321 100644 --- a/src/components/org/OrgAdmin/HomeSection/_components/Modal/EditReviewModal.tsx +++ b/src/components/org/OrgAdmin/HomeSection/_components/Modal/EditReviewModal.tsx @@ -30,12 +30,14 @@ type EditReviewModalProps = { isOpen: boolean; reviewId?: number; onCancel?: () => void; + onSuccess?: (review: ReviewForm) => void; }; export const EditReviewModal = ({ isOpen, reviewId, onCancel, + onSuccess, }: EditReviewModalProps) => { const [editedReview, setEditedReview] = useState(null); const contentTextAreaRef = useRef(null); @@ -99,7 +101,15 @@ export const EditReviewModal = ({ formData.append('content', review.content); formData.append('authorInfo', review.authorInfo); - mutate({ id: reviewId, formData }, { onSuccess: () => handleCloseModal() }); + mutate( + { id: reviewId, formData }, + { + onSuccess: () => { + onSuccess?.(review); + handleCloseModal(); + }, + }, + ); }; const isSubmitDisabled = diff --git a/src/components/org/OrgAdmin/HomeSection/_components/Review/ReviewSection.tsx b/src/components/org/OrgAdmin/HomeSection/_components/Review/ReviewSection.tsx index 196ef67b..c12c1c78 100644 --- a/src/components/org/OrgAdmin/HomeSection/_components/Review/ReviewSection.tsx +++ b/src/components/org/OrgAdmin/HomeSection/_components/Review/ReviewSection.tsx @@ -84,6 +84,15 @@ const ReviewSection = ({ reviews, onChangeReviews, isEditable }: Props) => { isOpen={editReviewId != null} reviewId={editReviewId} onCancel={() => setEditReviewId(undefined)} + onSuccess={(updatedReview) => { + onChangeReviews( + reviews.map((review) => + review.id === editReviewId + ? { ...review, ...updatedReview } + : review, + ), + ); + }} /> ); diff --git a/src/components/org/OrgAdmin/RecruitSection/_components/PartIntroduction/index.tsx b/src/components/org/OrgAdmin/RecruitSection/_components/PartIntroduction/index.tsx index 50e1c6e0..900c1388 100644 --- a/src/components/org/OrgAdmin/RecruitSection/_components/PartIntroduction/index.tsx +++ b/src/components/org/OrgAdmin/RecruitSection/_components/PartIntroduction/index.tsx @@ -30,7 +30,6 @@ import { ERROR_MESSAGES, ONE_LINE_MAX_LENGTH, PREFERENCE_DEFAULT_COUNT, - PREFERENCE_MAX_COUNT, } from '@/components/org/OrgAdmin/RecruitSection/_constants/constants'; import { StSectionWrapper, @@ -98,7 +97,7 @@ const PartIntroSection = ({ .split('\n') .filter((item) => item.trim()); const count = items.length - ? Math.min(items.length, PREFERENCE_MAX_COUNT) + ? Math.min(items.length, PREFERENCE_DEFAULT_COUNT) : PREFERENCE_DEFAULT_COUNT; next[part as PART_KO] = Math.max(count, PREFERENCE_DEFAULT_COUNT); }); diff --git a/src/components/org/OrgAdmin/utils.ts b/src/components/org/OrgAdmin/utils.ts index a94d968d..b1a9feb4 100644 --- a/src/components/org/OrgAdmin/utils.ts +++ b/src/components/org/OrgAdmin/utils.ts @@ -139,12 +139,11 @@ export const validationAboutInputs = ( if (!isAllFilled) return false; - // 이름을 채운 임원진만 실존 인물로 보고, 소속/소개/사진(새 파일 or 기존 이미지)을 요구한다. + // 모든 임원진 역할은 이름/소속/소개/사진이 필수다. const { member } = getValues(); for (const execType of EXEC_ROLE_LIST) { const memberValue = member?.[execType]; - if (!memberValue?.name) continue; const apiRole = toMemberRole(execType); const existingImage = existingMembers?.find( @@ -152,17 +151,21 @@ export const validationAboutInputs = ( )?.profileImage; const memberFieldsToValidate = [ + { + name: `member.${execType}.name`, + value: memberValue?.name, + }, { name: `member.${execType}.affiliation`, - value: memberValue.affiliation, + value: memberValue?.affiliation, }, { name: `member.${execType}.introduction`, - value: memberValue.introduction, + value: memberValue?.introduction, }, { name: `member.${execType}.profileImageFileName`, - value: memberValue.profileImageFileName?.fileName ?? existingImage, + value: memberValue?.profileImageFileName?.fileName ?? existingImage, }, ];