-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: current generation 업데이트 #157
Changes from all commits
aa8e604
92039da
e61bbc3
0301d45
425ca8c
cf534d4
52f4ff1
72d58e6
e9c5ec5
a702b1e
df9f627
b2a22ef
f9343d9
3170bf6
fa560d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,12 +47,11 @@ const DetailContentJunction = ({ | |
|
||
const KanbanBoardDetailPage = ({ | ||
params: { generation }, | ||
searchParams: { columnIndex, applicantId, type, cardId }, | ||
searchParams: { applicantId, type, cardId }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. type이 뭘 지칭하는 타입인지 domain을 명시하면 좋을 것 같아요! cardId는 card의 id잖아요. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 음..! 좋네요! 해당 부분의 명확한 이름을 고민해보겠습니다! |
||
}: KanbanBoardDetailPageProps) => { | ||
return ( | ||
<main className="flex mt-8 overflow-auto pt-12 pl-12"> | ||
<KanbanColumnDetailCard | ||
columnIndex={+columnIndex ?? 0} | ||
generation={generation} | ||
cardId={cardId} | ||
applicantId={applicantId} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import CommonNavbarCell from "./NavbarCell"; | ||
import { CURRENT_GENERATION } from "@/src/constants"; | ||
|
||
type NavbarGenerationToggleProps = { | ||
generation: string; | ||
isShort: boolean; | ||
}; | ||
export const NavbarGenerationToggle = ({ | ||
generation, | ||
isShort, | ||
}: NavbarGenerationToggleProps) => { | ||
const isCurrentGeneration = +generation === CURRENT_GENERATION; | ||
const targetGeneration = isCurrentGeneration | ||
? CURRENT_GENERATION - 1 | ||
: CURRENT_GENERATION; | ||
Comment on lines
+8
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1씩 줄여가며 찾는것도 있지만 option 에서 몇기인지 셀랙 하는건 어떨까요? 고냥 opnion.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 현업자 리뷰.. 너무 귀하네요..! |
||
|
||
const short_title = isCurrentGeneration ? "지난 모집" : "현재 모집"; | ||
const title = isCurrentGeneration | ||
? "지난 신입모집 보기" | ||
: "현재 신입모집 보기"; | ||
|
||
return ( | ||
<CommonNavbarCell | ||
currentType="kanban" | ||
isShort={isShort} | ||
href={`/kanban/${targetGeneration}`} | ||
short_title={short_title} | ||
title={title} | ||
type="toggle" | ||
/> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
const APPLICANT: ApplicantNode[] = [ | ||
{ | ||
id: 1, | ||
title: "프로젝트 희망 분야를 선택해주세요.*", | ||
type: "customField", | ||
value: { | ||
name: "field", | ||
}, | ||
subValue: [ | ||
{ title: "1순위", name: "field1" }, | ||
{ title: "2순위", name: "field2" }, | ||
], | ||
}, | ||
{ | ||
id: 2, | ||
title: "기본 인적 사항을 입력해주세요.", | ||
type: "customHuman", | ||
value: { | ||
hunamName: { name: "name" }, | ||
humanEmail: { name: "email" }, | ||
humanPhone: { name: "contacted" }, | ||
humanEtc: [ | ||
{ name: "classOf" }, | ||
{ name: "major" }, | ||
{ name: "doubleMajor" }, | ||
{ name: "minor" }, | ||
{ name: "grade" }, | ||
{ name: "semester" }, | ||
{ name: "registered" }, | ||
], | ||
}, | ||
}, | ||
{ | ||
id: 3, | ||
title: "기타 질문 사항에 답변해주세요.", | ||
type: "shortSplit", | ||
value: [ | ||
{ title: "향후 계획 활동", name: "activity" }, | ||
{ title: "지원 경로* (중복 선택 가능)", name: "channel" }, | ||
], | ||
}, | ||
]; | ||
|
||
export type ScoreKeyword = | ||
| "실천력" | ||
| "동아리 활동의지" | ||
| "협업" | ||
| "베풀려는 마음"; | ||
|
||
// type ScoreKeywordName = | ||
// | "passion" | ||
// | "clubInvolvement" | ||
// | "collaboration" | ||
// | "devotion"; | ||
|
||
export const ScoreSequence: { | ||
[key: number]: ScoreKeyword; | ||
} = { | ||
0: "실천력", | ||
1: "동아리 활동의지", | ||
2: "협업", | ||
3: "베풀려는 마음", | ||
}; | ||
|
||
export type Score = { | ||
fieldName: ScoreKeyword; | ||
score: number | ""; | ||
}; | ||
|
||
// type ScoreKeywordType = { | ||
// title: ScoreKeyword; | ||
// name: ScoreKeywordName; | ||
// }; | ||
|
||
// const INTERVIEW_SCORE_KEYWORD: ScoreKeywordType[] = [ | ||
// { title: "실천력", name: "passion" }, | ||
// { title: "동아리 활동의지", name: "clubInvolvement" }, | ||
// { title: "협업", name: "collaboration" }, | ||
// { title: "베풀려는 마음", name: "devotion" }, | ||
// ]; | ||
|
||
const FIELD_NAME: ScoreKeyword[] = Object.values(ScoreSequence); | ||
|
||
export { APPLICANT, FIELD_NAME }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기서 데이터를 받아와 뿌려주어 생기는 리렌더링이었군요!!
다른 곳에서 navbar를 사용할 줄 알아, 위에서 내리도록 작성했는데 이는 성급한 일반화로 발전한 것 같네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이제 안깜빡 거리나요 ㅎ 원래 네브바 나올때마다 깜빡였던거같던데