Skip to content
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

[24기] 24기 지원마감 (PM 제외) #161

Merged
merged 1 commit into from
Apr 13, 2024
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
12 changes: 9 additions & 3 deletions components/recruit/RecruitField/RecruitFieldExplain.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Button } from 'components/common';
import Breakpoints from 'constants/breakpoints';
import { IS_RECRUITING } from 'database/recruit';
import { IS_RECRUITING, IS_RECRUIT_CLOSED_EXCEPT_PM } from 'database/recruit';
import DOMPurify from 'isomorphic-dompurify';
import { ReactElement } from 'react';
import styled from 'styled-components';
Expand Down Expand Up @@ -28,6 +28,8 @@ function RecruitFieldExplain({
}: RecruitFieldExplainProps): ReactElement {
const { content1, content2, content3 } = explainContents;

const isPM = fieldName === 'PM';

return (
<RecruitFieldWrapper>
<FieldBox backgroundColor="grey_50">
Expand Down Expand Up @@ -76,10 +78,14 @@ function RecruitFieldExplain({
fontColor="white"
buttonColor="grey_850"
borderColor="lightGrey"
disabled={!IS_RECRUITING}
disabled={!IS_RECRUITING || (IS_RECRUIT_CLOSED_EXCEPT_PM && !isPM)}
>
{isDeveloper ? developField : fieldName}{' '}
{IS_RECRUITING ? '지원하기' : '지원마감'}
{IS_RECRUITING && !IS_RECRUIT_CLOSED_EXCEPT_PM
? '지원하기'
: IS_RECRUIT_CLOSED_EXCEPT_PM && isPM
? '지원하기'
: '지원마감'}
</ApplyButton>
</ButtonBlock>
</RecruitFieldWrapper>
Expand Down
5 changes: 5 additions & 0 deletions database/recruit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import Yapp from 'constants/yapp';
/* 현재 모집중이면 true 아니면 false */
export const IS_RECRUITING = true;

// TODO : remove (= PM 직군만 연장하므로 다른 직군은 지원버튼 비활성화하기 위해 마감일 생성)
const recruitCloseDateExceptPM = new Date(2024, 3, 14, 0, 0, 0);
const now = new Date();
export const IS_RECRUIT_CLOSED_EXCEPT_PM = now > recruitCloseDateExceptPM;

/** Banner */
export const RECRUIT_BANNER = {
title: '지금은 모집기간이 아닙니다',
Expand Down
Loading