diff --git a/src/components/myPage/ApproveBox.tsx b/src/components/myPage/ApproveBox.tsx
index 28cf01d..912da3c 100644
--- a/src/components/myPage/ApproveBox.tsx
+++ b/src/components/myPage/ApproveBox.tsx
@@ -6,8 +6,8 @@ import {
convertRecruitmentName
} from '@/utils/mypage/recruitmentNameFormat';
import useBottomSheet from '@/hooks/common/useBottomSheet';
+import { UserRoleType } from '@/types/user';
-type MemberRole = 'GUEST' | 'ASSOCIATE' | 'REGULAR' | 'ADMIN';
type BoxVariantType = 'arrow' | 'checkbox' | 'text' | 'warn';
type BoxStatusType = 'default' | 'success' | 'error';
@@ -15,12 +15,12 @@ export const ApproveBox = ({
role,
currentRecruitment
}: {
- role: MemberRole;
+ role: UserRoleType;
currentRecruitment: CurrentRecruitmentType;
}) => {
const { handleBottomSheet } = useBottomSheet();
const boxContent: Record<
- MemberRole,
+ UserRoleType,
{
title: string;
description?: string;
@@ -44,29 +44,34 @@ export const ApproveBox = ({
title: '모든 가입 절차를 완료했어요.',
boxVariant: 'text',
status: 'success'
- },
- //TODO: 어드민 가입 상태 논의하기
- ADMIN: {
- title: '모든 가입 절차를 완료했어요.',
- boxVariant: 'text',
- status: 'success'
}
};
return (
- {
- if (role === 'ASSOCIATE') handleBottomSheet();
- else {
- return;
- }
- }}>
-
-
+ <>
+ {currentRecruitment.period.open ? (
+ {
+ if (role === 'ASSOCIATE') handleBottomSheet();
+ else {
+ return;
+ }
+ }}>
+
+
+ ) : (
+
+ )}
+ >
);
};
diff --git a/src/components/myPage/AssociateRequirementCheck.tsx b/src/components/myPage/AssociateRequirementCheck.tsx
index 2deefd4..be6e727 100644
--- a/src/components/myPage/AssociateRequirementCheck.tsx
+++ b/src/components/myPage/AssociateRequirementCheck.tsx
@@ -1,5 +1,6 @@
import { Flex, Text } from '@/components/common/Wrapper';
import Box from 'wowds-ui/Box';
+import { UnivEmailStatus } from '@/types/status';
import { Discord } from '@/assets/Discord';
import { AssociateRequirement } from '@/types/user';
import RoutePath from '@/routes/routePath';
@@ -14,6 +15,42 @@ const AssociateRequirementCheck = ({
associateRequirement;
const navigate = useNavigate();
+ const univStatusContent = (univStatus: UnivEmailStatus) => {
+ if (univStatus === 'PENDING')
+ return (
+
+
+ 재학생 이메일 인증이 필요해요.
+
+
+ 홍익대학교 재학생인지 알려주세요.
+
+ 학교 Gmail을 통해 인증할 수 있어요.
+
+
+ );
+ if (univStatus === 'IN_PROGRESS')
+ return (
+
+
+ 재학생 이메일 인증이 진행 중이에요.
+
+
+ 메일함을 확인해주세요.
+
+
+ );
+ return '홍익대학교 재학생 인증을 완료했어요.';
+ };
+
return (
@@ -55,28 +92,9 @@ const AssociateRequirementCheck = ({
onClick={() => {
navigate(RoutePath.AuthenticationProcess2_StudentVerification);
}}
- text={
- univStatus === 'PENDING' ? (
-
-
- 재학생 이메일 인증이 필요해요.
-
-
- 홍익대학교 재학생인지 알려주세요.
-
- 학교 Gmail을 통해 인증할 수 있어요.
-
-
- ) : (
- '홍익대학교 재학생 인증을 완료했어요.'
- )
- }
- status={univStatus === 'PENDING' ? 'error' : 'success'}
- variant={univStatus === 'PENDING' ? 'arrow' : 'text'}
+ text={univStatusContent(univStatus)}
+ status={univStatus === 'SATISFIED' ? 'success' : 'error'}
+ variant={univStatus === 'SATISFIED' ? 'text' : 'arrow'}
/>
{
diff --git a/src/types/status.ts b/src/types/status.ts
index 23a532f..2f538f1 100644
--- a/src/types/status.ts
+++ b/src/types/status.ts
@@ -1 +1,2 @@
export type Status = 'PENDING' | 'SATISFIED';
+export type UnivEmailStatus = 'IN_PROGRESS' | 'PENDING' | 'SATISFIED';
diff --git a/src/types/user.ts b/src/types/user.ts
index e93e027..918d04f 100644
--- a/src/types/user.ts
+++ b/src/types/user.ts
@@ -1,21 +1,21 @@
-import { Status } from '@/types/status';
+import { Status, UnivEmailStatus } from '@/types/status';
export type User = {
memberId: string; // C000000 (학번)
role: UserRoleType;
basicInfo: UserBasicInfo;
associateRequirement: {
- univStatus: Status;
+ univStatus: UnivEmailStatus;
discordStatus: Status;
bevyStatus: Status;
infoStatus: Status;
};
};
-export type UserRoleType = 'GUEST' | 'ASSOCIATE' | 'REGULAR' | 'ADMIN';
+export type UserRoleType = 'GUEST' | 'ASSOCIATE' | 'REGULAR';
export type AssociateRequirement = {
- univStatus: Status;
+ univStatus: UnivEmailStatus;
discordStatus: Status;
bevyStatus: Status;
infoStatus: Status;