Skip to content

refactor: 지원서 접수 시작/마감 시간 설정 API 요청 형식 변경#319

Merged
2yunseong merged 4 commits intomainfrom
refactor/316-time-setting-changing-type
Feb 25, 2026
Merged

refactor: 지원서 접수 시작/마감 시간 설정 API 요청 형식 변경#319
2yunseong merged 4 commits intomainfrom
refactor/316-time-setting-changing-type

Conversation

@cho-in-sik
Copy link
Collaborator

관련 이슈

작업 분류

  • 버그 수정
  • 신규 기능 추가
  • 프로젝트 구조 변경
  • 코드 스타일 변경
  • 기존 기능 개선
  • 문서 수정

PR에서 핵심적으로 변경된 부분이 어떤 부분인가요? 👀

  • 백엔드의 요구사항에 따라 시간설정 부분의 시간 타입을 수정합니다.
  • 반환값을 서버 수신 규격에 맞춰 정규화 하는 로직을 구현했습니다.

추가적으로, 리뷰어가 리뷰하며 알아야 할 정보가 있나요? 🙌

  • input datetime-local에 step이라는게 기본값으로 60 이지만 브라우저마다 datetime-local이 초반환을 하는 경우도 있기에 명시를 해주었습니다.

체크리스트 ✅

  • reviewers 설정
  • assignees 설정
  • label 설정

@cho-in-sik cho-in-sik self-assigned this Feb 19, 2026
@cho-in-sik cho-in-sik added the refactor 리팩터링 관련 이슈 label Feb 19, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @cho-in-sik, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 모집 시간 설정 기능의 데이터 처리 방식을 개선합니다. 백엔드 API와의 일관성을 위해 시작일과 종료일의 데이터 타입을 숫자 타임스탬프에서 ISO 8601 형식의 문자열로 전환하고, 클라이언트에서 서버로 전송되는 날짜/시간 데이터가 표준화된 형식으로 유지되도록 새로운 유틸리티 함수를 도입했습니다. 이는 데이터 무결성을 높이고 백엔드와의 통합을 원활하게 합니다.

Highlights

  • 데이터 타입 변경: 백엔드 요구사항에 맞춰 모집 기간의 startDateendDate 필드 타입을 number에서 string으로 변경했습니다.
  • 날짜 형식 정규화 로직 추가: datetime-local 입력값을 서버 수신 규격인 YYYY-MM-DDTHH:mm:ss 형식으로 정규화하는 formatToLocalISOString 함수를 구현했습니다.
  • 입력 필드 step 속성 명시: datetime-local 타입의 입력 필드에 step="60" 속성을 명시하여 분 단위 입력을 보장하고 브라우저별 동작 차이를 방지했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • frontend/app/(WithNavbar)/admin/[generation]/on-off/page.tsx
    • handleFormSubmit 함수의 startDateendDate 매개변수 타입을 number에서 string으로 변경했습니다.
  • frontend/components/recruitment/RecruitmentForm.tsx
    • RecruitmentFormProps 인터페이스에서 startDateendDate의 타입을 string으로 업데이트했습니다.
    • 기존의 타임스탬프 변환 로직을 제거하고 formatToLocalISOString 함수를 사용하여 날짜 형식을 처리하도록 변경했습니다.
    • datetime-local 타입의 startDateendDate 입력 필드에 step="60" 속성을 추가했습니다.
  • frontend/src/apis/recruitment/index.ts
    • RecruitmentTime 인터페이스 내 startDateendDate 필드의 타입을 number에서 string으로 수정했습니다.
  • frontend/src/functions/recruitment.ts
    • datetime-local 입력값을 서버 형식으로 정규화하는 formatToLocalISOString 유틸리티 함수를 새로 추가했습니다.
Activity
  • 이 PR은 이슈 #316을 해결합니다.
  • 작업 분류는 '기존 기능 개선'으로 표시되었습니다.
  • 리뷰어, 담당자, 라벨이 설정되었습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request modifies the recruitment form to handle date and time inputs correctly. It changes the startDate and endDate types from number to string and introduces a formatToLocalISOString function to normalize the datetime-local input to the server format. The reviewer suggests improving the formatToLocalISOString function by checking the number of colons in the input string instead of relying on the string length to determine the format.

* "2026-02-14T23:38:45" → "2026-02-14T23:38:45"
*/
export const formatToLocalISOString = (datetimeLocal: string): string => {
return datetimeLocal.length === 16 ? datetimeLocal + ":00" : datetimeLocal.slice(0, 19);

Choose a reason for hiding this comment

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

medium

새로 추가된 formatToLocalISOString 함수가 문자열 길이를 기준으로 형식을 판단하고 있습니다. 이 방법은 datetime-local 입력 타입 덕분에 대부분의 경우 잘 동작하겠지만, 예상치 못한 형식의 문자열이 들어올 경우 취약할 수 있습니다. 예를 들어, 우연히 길이가 16인 다른 형식의 문자열이 들어오면 잘못된 날짜 문자열을 반환할 수 있습니다.

조금 더 안정적인 방법으로, 문자열에 포함된 콜론(:)의 개수를 기준으로 형식을 구분하는 것을 제안합니다. YYYY-MM-DDTHH:mm 형식은 콜론이 1개, YYYY-MM-DDTHH:mm:ss 형식은 2개 포함되어 있으므로, split(':')의 결과 배열 길이를 확인하면 더 정확하게 판단할 수 있습니다.

Suggested change
return datetimeLocal.length === 16 ? datetimeLocal + ":00" : datetimeLocal.slice(0, 19);
return datetimeLocal.split(":").length === 2 ? datetimeLocal + ":00" : datetimeLocal.slice(0, 19);

@cho-in-sik cho-in-sik changed the title Refactor/316 time setting changing type refactor: 지원서 접수 시작/마감 시간 설정 API 요청 형식 변경 Feb 21, 2026
@2yunseong 2yunseong merged commit 64df133 into main Feb 25, 2026
1 check passed
@2yunseong 2yunseong deleted the refactor/316-time-setting-changing-type branch February 25, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 리팩터링 관련 이슈

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FE] refactor: 지원서 접수 시작/마감 시간 설정 API 요청 형식 변경

2 participants