Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/app/application/backup/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const sendSms = async ({ name, phone }: { name: string; phone: string }) => {
"안녕하세요," +
name +
"님\n" +
'2025년 2학기 에코노베이션 30기 신입회원 모집에 지원해주셔서 감사드립니다.\n한 번 제출하신 지원서는 수정이 불가능하며, 서류 합격 여부 및 면접 시간은 9월 12일 금요일에 안내될 예정입니다.\n더 궁금하신 내용은 카카오톡 채널 "에코노베이션"으로 문의 주시길 바랍니다.\n감사합니다.',
'2026년 1학기 에코노베이션 31기 신입회원 모집에 지원해주셔서 감사드립니다.\n한 번 제출하신 지원서는 수정이 불가능하며, 서류 합격 여부 및 면접 시간은 3월 14일 금요일에 안내될 예정입니다.\n더 궁금하신 내용은 카카오톡 채널 "에코노베이션"으로 문의 주시길 바랍니다.\n감사합니다.',
Comment on lines 45 to +48

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

템플릿 리터럴을 사용하면 여러 줄의 문자열과 변수를 더 쉽게 조합할 수 있어 가독성이 향상됩니다. 현재 문자열 연결(+) 방식 대신 템플릿 리터럴을 사용하는 것을 제안합니다.

      `안녕하세요,${name}님\n2026년 1학기 에코노베이션 31기 신입회원 모집에 지원해주셔서 감사드립니다.\n한 번 제출하신 지원서는 수정이 불가능하며, 서류 합격 여부 및 면접 시간은 3월 14일 금요일에 안내될 예정입니다.\n더 궁금하신 내용은 카카오톡 채널 "에코노베이션"으로 문의 주시길 바랍니다.\n감사합니다.`,

messages: [
{
to: phone,
Expand Down
6 changes: 3 additions & 3 deletions frontend/app/application/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { CURRENT_GENERATION, PRODUCTION_HOSTNAME } from "@/src/constants";
import {
APPLICATION_DESIGN,
APPLICATION_NAVBAR_DESIGN,
} from "@/src/constants/application/30/designer";
} from "@/src/constants/application/31/designer";
import {
APPLICATION_DEVELOPER,
APPLICATION_NAVBAR_DEVELOPER,
} from "@/src/constants/application/30/developer";
} from "@/src/constants/application/31/developer";
import {
APPLICATION_MANAGER,
APPLICATION_NAVBAR_MANAGER,
} from "@/src/constants/application/30/manager";
} from "@/src/constants/application/31/manager";
import { localStorage } from "@/src/functions/localstorage";
import {
applicationDataAtom,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import RadioGroup from "@/components/common/Radio.component";
import Txt from "@/components/common/Txt.component";
import { MAX_TEXT_LENGTH } from "@/src/constants";
import { MAX_BOOLEAN_TEXT_LENGTH } from "@/src/constants";
import type {
ApplicationBooleanTextarea,
ApplicationQuestion,
Expand All @@ -24,7 +24,7 @@ interface TextAreaProps {
const TextArea = ({ node }: TextAreaProps) => {
const [textValue, setTextValue] = useLocalStorage(node.name, "");
const onInput = (e: FormEvent<HTMLTextAreaElement>) => {
setTextValue(e.currentTarget.value.slice(0, MAX_TEXT_LENGTH));
setTextValue(e.currentTarget.value.slice(0, MAX_BOOLEAN_TEXT_LENGTH));
};

return (
Expand All @@ -41,12 +41,12 @@ const TextArea = ({ node }: TextAreaProps) => {
<textarea
className="border rounded-lg px-4 py-6 w-full resize-none"
rows={20}
maxLength={MAX_TEXT_LENGTH}
maxLength={MAX_BOOLEAN_TEXT_LENGTH}
name={node.name}
value={textValue}
onInput={onInput}
/>
<div className="absolute bottom-3 right-4 bg-white text-sm">{`(${textValue.length}/${MAX_TEXT_LENGTH})`}</div>
<div className="absolute bottom-3 right-4 bg-white text-sm">{`(${textValue.length}/${MAX_BOOLEAN_TEXT_LENGTH})`}</div>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const ApplicationText = ({ data }: ApplicationTextProps) => {
<Txt typography="h6">{`${textData.title}${
textData.require ? "*" : ""
}`}</Txt>
{textData.subtitle && <Txt>{` ${textData.subtitle}`}</Txt>}
{textData.subtitle && <Txt className="whitespace-pre-line">{` ${textData.subtitle}`}</Txt>}
</label>
)}
<input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";

import Txt from "@/components/common/Txt.component";
import { MAX_TEXT_LENGTH } from "@/src/constants";
import {
ApplicationNode,
ApplicationTextarea,
Expand All @@ -15,11 +14,11 @@ interface ApplicationTextareaProps {

const ApplicationTexarea = ({ data }: ApplicationTextareaProps) => {
const textData = data as ApplicationTextarea;
const maxLength = ['deep', 'restoration', 'studyPlan'].includes(textData.name) ? 500 : 800;
const maxLength = ['deep', 'failure', 'studyPlan'].includes(textData.name) ? 500 : 800;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

하드코딩된 문자열 배열 ['deep', 'failure', 'studyPlan']과 숫자 500, 800은 '매직 스트링'과 '매직 넘버'에 해당하여 유지보수를 어렵게 할 수 있습니다. 이 값들을 파일 상단이나 별도의 상수 파일에 명확한 이름의 상수로 정의하여 사용하는 것을 권장합니다.

const [value, setValue] = useLocalStorage(textData.name, "");

const onInput = (e: FormEvent<HTMLTextAreaElement>) => {
setValue(e.currentTarget.value.slice(0, MAX_TEXT_LENGTH));
setValue(e.currentTarget.value.slice(0, maxLength));
};

return (
Expand Down
35 changes: 17 additions & 18 deletions frontend/src/constants/application/31.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ export const APPLICATION: ApplicationQuestion[] = [
},
{
id: 3,

title: "전공을 입력해주세요.",
subtitle: "복수 전공과 부전공은 선택 입력사항입니다.",
direction: "horizontal",
Expand Down Expand Up @@ -169,7 +168,7 @@ export const APPLICATION: ApplicationQuestion[] = [
title:
"학업 외에 병행하고 있거나 향후 계획 중에 있는 활동이 있으시다면 ‘꼭’ 서술해 주세요.",
subtitle:
"(동아리, 연구실, 아르바이트, 스터디, 교환학생 등), 없을 경우, 없음으로 기재해 주세요. 기재하지 않고 추후 적발시 최종 합불 논의에 불이익이 있을 수 있습니다.)",
"(동아리, 연구실, 아르바이트, 스터디, 교환학생 등)\n 없을 경우, 없음으로 기재해 주세요. 기재하지 않고 추후 적발시 최종 합불 논의에 불이익이 있을 수 있습니다.",
},
{
name: "channel",
Expand Down Expand Up @@ -201,16 +200,16 @@ export const APPLICATION_TIMELINE: ApplicationTimeline = {
seperate: 30,
time: [
{
startTime: new Date(2025, 8, 15, 10, 0, 0),
endTime: new Date(2025, 8, 15, 20, 30, 0),
startTime: new Date(2026, 2, 17, 10, 0, 0),
endTime: new Date(2026, 2, 17, 20, 30, 0),
},
{
startTime: new Date(2025, 8, 16, 10, 0, 0),
endTime: new Date(2025, 8, 16, 20, 30, 0),
startTime: new Date(2026, 2, 18, 10, 0, 0),
endTime: new Date(2026, 2, 18, 20, 30, 0),
},
{
startTime: new Date(2025, 8, 17, 10, 0, 0),
endTime: new Date(2025, 8, 17, 20, 30, 0),
startTime: new Date(2026, 2, 19, 10, 0, 0),
endTime: new Date(2026, 2, 19, 20, 30, 0),
},
Comment on lines 201 to 213

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

APPLICATION_TIMELINE에서 new Date() 생성자에 월(month)을 0부터 시작하는 숫자 리터럴(e.g., 2 for March)로 직접 전달하고 있습니다. 하지만 파일 내 다른 날짜 상수들(START_DATE, END_DATE 등)은 1-12 범위의 월을 사용하고, Date 객체 생성 시 -1을 해주는 방식을 사용하고 있습니다. 이러한 불일치는 혼란을 야기하고 버그를 유발할 수 있습니다. 모든 날짜 관련 상수를 동일한 방식으로(예: 1-12월 사용 후 조정) 처리하여 일관성을 유지하는 것이 좋습니다.

],
disableTime: [],
Expand All @@ -226,8 +225,8 @@ export const APPLICATION_TIMELINE: ApplicationTimeline = {
* @property {number} seconds - 1차 모집 시작 시간(초) (0-59)
*/
export const START_DATE = {
year: 2025,
month: 9,
year: 2026,
month: 3,
date: 1,
hours: 0,
minutes: 0,
Expand All @@ -244,8 +243,8 @@ export const START_DATE = {
* @property {number} seconds - 1차 모집 마감 시간(초) (0-59)
*/
export const END_DATE = {
year: 2025,
month: 9,
year: 2026,
month: 3,
date: 10,
hours: 23,
minutes: 59,
Expand All @@ -259,9 +258,9 @@ export const END_DATE = {
* @property {number} date - 1차 합격자 공지 일 (1-31)
*/
export const FIRST_NOTIFICATION_DATE = {
year: 2025,
month: 9,
date: 12,
year: 2026,
month: 3,
date: 14,
};

/**
Expand All @@ -271,7 +270,7 @@ export const FIRST_NOTIFICATION_DATE = {
* @property {number} date - 최종 모집 마감 일 (1-31)
*/
export const FINAL_DATE = {
year: 2025,
month: 9,
date: 22,
year: 2026,
month: 3,
date: 23,
};
6 changes: 3 additions & 3 deletions frontend/src/constants/application/31/designer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ export const APPLICATION_DESIGN: ApplicationQuestion[] = [
},
{
id: 14,
title: "자신을 어필할 수 있는 포트폴리오를 업로드해 주세요.",
title: "자신을 어필할 수 있는 포트폴리오를 업로드해 주세요.\n무엇이든 부담 없이 제출해 주셔도 됩니다.",
direction: "horizontal",
subtitle:
"지원자 분의 포트폴리오 링크 접근 권한을 열어주세요. 만약 접근 권한이 없을 경우 불이익이 있을 수 있습니다.",
"단, 지원자 분의 포트폴리오 링크 접근 권한을 '꼭' 열어주세요. 만약 접근 권한이 없을 경우 불이익이 있을 수 있습니다.",
alert: "최종 제출 후 포트폴리오 수정은 불가합니다.",
nodes: [
{
Expand Down Expand Up @@ -190,7 +190,7 @@ export const APPLICATION_DESIGN: ApplicationQuestion[] = [
{
id: 16,
direction: "horizontal",
title: "합격여부 전달을 위하여 이메일을 입력해주세요.",
title: "합격 여부 전달을 위하여 이메일을 입력해주세요.",
subtitle: "이메일을 기재하지 않을 시, 합격이 취소될 수 있습니다.",
require: true,
nodes: [
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/constants/application/31/developer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ export const APPLICATION_DEVELOPER: ApplicationQuestion[] = [
},
{
id: 12,
title: "자신을 어필할 수 있는 포트폴리오를 업로드해 주세요.",
title: "자신을 어필할 수 있는 포트폴리오를 업로드해 주세요.\n무엇이든 부담 없이 제출해 주셔도 됩니다.",
subtitle:
"지원자 분의 포트폴리오 링크 접근 권한을 열어주세요. 만약 접근 권한이 없을 경우 불이익이 있을 수 있습니다.",
"단, 지원자 분의 포트폴리오 링크 접근 권한을 '꼭' 열어주세요. 만약 접근 권한이 없을 경우 불이익이 있을 수 있습니다.",
alert: "최종 제출 후 포트폴리오 수정은 불가합니다.",
direction: "horizontal",
nodes: [
Expand Down Expand Up @@ -160,7 +160,7 @@ export const APPLICATION_DEVELOPER: ApplicationQuestion[] = [
{
id: 14,
direction: "horizontal",
title: "합격여부 전달을 위하여 이메일을 입력해주세요.",
title: "합격 여부 전달을 위하여 이메일을 입력해주세요.",
subtitle: "이메일을 기재하지 않을 시, 합격이 취소될 수 있습니다.",
require: true,
nodes: [
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/constants/application/31/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ export const APPLICATION_MANAGER: ApplicationQuestion[] = [
},
{
id: 13,
title: "자신을 어필할 수 있는 포트폴리오를 업로드해 주세요.",
title: "자신을 어필할 수 있는 포트폴리오를 업로드해 주세요.\n무엇이든 부담 없이 제출해 주셔도 됩니다.",
subtitle:
"지원자 분의 포트폴리오 링크 접근 권한을 열어주세요. 만약 접근 권한이 없을 경우 불이익이 있을 수 있습니다.",
"단, 지원자 분의 포트폴리오 링크 접근 권한을 '꼭' 열어주세요. 만약 접근 권한이 없을 경우 불이익이 있을 수 있습니다.",
alert: "최종 제출 후 포트폴리오 수정은 불가합니다.",
direction: "horizontal",
nodes: [
Expand All @@ -172,7 +172,7 @@ export const APPLICATION_MANAGER: ApplicationQuestion[] = [
title:
"기획자를 지원하는 경우 이번 학기에 진행하고 싶은 프로젝트의 기획서를 제출해 주세요.",
subtitle:
"단, 제출한 기획을 기반으로 이번 학기에 프로젝트를 진행하지 못할 수 있습니다.",
"제출한 기획은 참고용으로 이를 기반으로 이번 학기에 프로젝트를 진행하지 못할 수 있습니다.",
},
{
name: "fileUrlforPlanner",
Expand Down Expand Up @@ -210,7 +210,7 @@ export const APPLICATION_MANAGER: ApplicationQuestion[] = [
{
id: 15,
direction: "horizontal",
title: "합격여부 전달을 위하여 이메일을 입력해주세요.",
title: "합격 여부 전달을 위하여 이메일을 입력해주세요.",
subtitle: "이메일을 기재하지 않을 시, 합격이 취소될 수 있습니다.",
require: true,
nodes: [
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export const needValidatePath = [
"/kanban",
];

export const MAX_TEXT_LENGTH = 1000;
export const MAX_BOOLEAN_TEXT_LENGTH = 800;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

MAX_BOOLEAN_TEXT_LENGTH라는 이름은 BooleanTextarea 컴포넌트에만 국한되는 것처럼 보입니다. 하지만 Textarea.component.tsx에서도 동일한 값(800)을 하드코딩하여 사용하고 있습니다. 여러 곳에서 사용될 수 있는 값이라면 TEXT_LENGTH_LONG과 같이 좀 더 일반적인 이름으로 상수를 정의하는 것이 좋습니다. 또한, 500과 같은 다른 글자 수 제한도 TEXT_LENGTH_SHORT 등으로 함께 상수로 관리하면 코드의 일관성과 재사용성이 향상될 것입니다.

Suggested change
export const MAX_BOOLEAN_TEXT_LENGTH = 800;
export const TEXT_LENGTH_LONG = 800;


export const CHARACTERS = {
DOUBLE_QUOTE: '"',
Expand Down