Skip to content

Commit 683f40b

Browse files
authored
Merge pull request #254 from code-zero-to-one/feat/QNRR-648/signup-flow-N-me-certify
[Feat] QNRR-648 (그로스) 유저의 회원가입시 전화번호 수집 및 프로필 개선
2 parents db2f198 + 5742073 commit 683f40b

57 files changed

Lines changed: 2858 additions & 530 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/(admin)/admin/detail/[id]/profile/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,11 @@ export default async function ProfilePage({
103103
title="선호하는 스터디 주제"
104104
content={profile.memberInfo.preferredStudySubject?.name}
105105
/>
106+
107+
{/* TODO : 상단으로 이동 필요 */}
106108
<ProfileInfoCard
107109
title="기술 스택"
108-
content={profile.memberInfo.techStacks
110+
content={profile.memberProfile.techStacks
109111
.map((t) => t.techStackName)
110112
.join(', ')}
111113
/>

src/app/(service)/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import '../global.css';
22

3+
import React from 'react';
34
import Clarity from '@microsoft/clarity';
45
import { GoogleTagManager } from '@next/third-parties/google';
56
import { clsx } from 'clsx';

src/app/global.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,40 @@
44
/*
55
---break--- */
66
@plugin 'tailwindcss-animate';
7+
8+
@layer base {
9+
*, ::before, ::after {
10+
box-sizing: border-box;
11+
border-width: 0;
12+
border-style: solid;
13+
border-color: #e5e7eb;
14+
}
15+
input, button, select, textarea {
16+
font-family: inherit;
17+
font-feature-settings: inherit;
18+
font-variation-settings: inherit;
19+
font-size: 100%;
20+
font-weight: inherit;
21+
line-height: inherit;
22+
color: inherit;
23+
margin: 0;
24+
padding: 0;
25+
}
26+
button, input, optgroup, select, textarea {
27+
font-family: inherit;
28+
font-size: 100%;
29+
line-height: 1.15;
30+
margin: 0;
31+
}
32+
button, select {
33+
text-transform: none;
34+
}
35+
button, [type='button'], [type='reset'], [type='submit'] {
36+
-webkit-appearance: button;
37+
background-color: transparent;
38+
background-image: none;
39+
}
40+
}
741
/*
842
---break--- */
943
@custom-variant dark (&:is(.dark *));

src/components/ui/modal/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use client';
22

3+
import React from 'react';
34
import * as DialogPrimitive from '@radix-ui/react-dialog';
45

56
import { cn } from '@/components/ui/(shadcn)/lib/utils';

src/components/ui/toggle/group.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ComponentType, ReactNode } from 'react';
1+
import React, { type ComponentType, type ReactNode } from 'react';
22
import ToggleButton from './button';
33

44
type Value = string | number;

src/entities/user/api/types.ts

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
export interface TechStack {
2-
techStackId: number;
3-
code: string;
4-
techStackName: string;
5-
parentId: number | undefined;
6-
level: number;
7-
}
8-
91
export interface AvailableStudyTime {
102
id: number;
113
fromTime: string | undefined;
@@ -19,12 +11,44 @@ export interface PreferredStudySubject {
1911
name: string;
2012
}
2113

22-
export interface MemberInfo {
14+
export interface Job {
15+
job?: string; // Enum 값 (예: "IT_PRACTITIONER_GAME_DEV")
16+
description?: string; // 설명 (예: "게임 개발자")
17+
}
18+
19+
export interface Career {
20+
career: string; // Enum 값 (예: "JUNIOR")
21+
description: string; // 설명 (예: "주니어")
22+
}
23+
24+
export interface StudyFormatType {
25+
studyFormatType: string; // Enum 값 (예: "MENTORING")
26+
description: string; // 설명 (예: "멘토링")
27+
}
28+
29+
// 내 스터디 정보 (SPRINT2 프로필개선)
30+
export interface MemberInfo {
2331
selfIntroduction: string;
2432
studyPlan: string;
2533
preferredStudySubject: PreferredStudySubject;
2634
availableStudyTimes: AvailableStudyTime[];
27-
techStacks: TechStack[];
35+
// techStacks: TechStack[]; 기본정보로 이동 (SPRINT2 프로필개선) => memberProfile에 추가
36+
// 기본정보에 추가되는 정보들 (SPRINT2 프로필개선)
37+
jobs: Job[] | null;
38+
career: Career | null;
39+
studyFormatTypes: StudyFormatType[] | null;
40+
goal: string;
41+
}
42+
43+
/**
44+
* 기본정보 (SPRINT2 프로필개선)
45+
**/
46+
export interface TechStack {
47+
techStackId: number;
48+
code: string;
49+
techStackName: string;
50+
parentId: number | undefined;
51+
level: number;
2852
}
2953

3054
export interface SocialLink {
@@ -59,8 +83,11 @@ export interface Hobby {
5983
name: string;
6084
}
6185

86+
// 기본정보 (SPRINT2 프로필개선)
6287
export interface MemberProfile {
63-
memberName: string;
88+
memberName: string; // 본인, 관리자만 조회 (+스터디 참여시 SPRINT2 프로필개선)
89+
tel?: string; // 본인, 관리자만 조회 (+스터디 참여시 SPRINT2 프로필개선) - 스터디 참가자끼리는 볼 수 있음
90+
nickname: string;
6491
profileImage: ProfileImage;
6592
simpleIntroduction: string;
6693
mbti: string;
@@ -69,7 +96,7 @@ export interface MemberProfile {
6996
birthDate: string;
7097
githubLink: SocialLink | undefined;
7198
blogOrSnsLink: SocialLink | undefined;
72-
tel: string;
99+
techStacks: TechStack[]; // 기본정보로 이동 (SPRINT2 프로필개선) => memberInfo에서 삭제
73100
}
74101

75102
export interface SincerityTemp {

src/entities/user/ui/my-profile-card.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { getSincerityPresetByLevelName } from '@/config/sincerity-temp-presets';
99
import { useReviewReminder } from '@/entities/review/lib/use-reminder-review';
1010
import StudyReviewModal from '@/entities/review/ui/study-review-modal';
1111
import { usePatchAutoMatchingMutation } from '@/entities/user/model/use-user-profile-query';
12+
import StartStudyModal from '@/features/study/participation/ui/start-study-modal'; // 추가
1213
import AccessTimeIcon from 'public/icons/access_time.svg';
1314
import AssignmentIcon from 'public/icons/assignment.svg';
1415
import CodeIcon from 'public/icons/code.svg';
@@ -41,13 +42,20 @@ export default function MyProfileCard({
4142
const { showReviewReminder, setShowReviewReminder } = useReviewReminder();
4243

4344
const [enabled, setEnabled] = useState(matching);
45+
const [isStartStudyModalOpen, setIsStartStudyModalOpen] = useState(false); // 모달 상태 추가
4446
const temperPreset = getSincerityPresetByLevelName(sincerityTemp.levelName);
4547

4648
const { mutate: patchAutoMatching, isPending } =
4749
usePatchAutoMatchingMutation();
4850

4951
const handleToggleChange = (checked: boolean) => {
50-
if (!studyApplied) return;
52+
// 스터디 신청 안 했을 때 -> 신청 모달 열기 (여기서 본인인증 체크도 자동으로 됨)
53+
if (!studyApplied) {
54+
setIsStartStudyModalOpen(true);
55+
// 토글 상태는 바꾸지 않음 (신청 완료 후 바뀌도록 유도하거나 사용자가 다시 켜야 함)
56+
57+
return;
58+
}
5159

5260
setEnabled(checked);
5361

@@ -67,6 +75,13 @@ export default function MyProfileCard({
6775
open={showReviewReminder}
6876
onOpenChange={setShowReviewReminder}
6977
/>
78+
{/* 스터디 신청 모달 (토글 클릭 시 실행됨) */}
79+
<StartStudyModal
80+
memberId={memberId}
81+
open={isStartStudyModalOpen}
82+
onOpenChange={setIsStartStudyModalOpen}
83+
/>
84+
7085
<section className="rounded-200 border-border-subtle bg-text-inverse flex flex-col items-start gap-200 border p-200">
7186
<div className="flex flex-row items-center gap-200">
7287
<div className="relative h-[64px] w-[64px] shrink-0">
@@ -101,7 +116,7 @@ export default function MyProfileCard({
101116
size="md"
102117
checked={enabled}
103118
onCheckedChange={handleToggleChange}
104-
disabled={isPending || !studyApplied}
119+
disabled={isPending} // !studyApplied 제거
105120
/>
106121
</div>
107122
</div>

0 commit comments

Comments
 (0)