Skip to content

Commit

Permalink
Merge pull request #385 from Bamdoliro/feat/#379
Browse files Browse the repository at this point in the history
1차 QA with 선아T, 정하T
  • Loading branch information
SEOKKAMONI authored Sep 18, 2023
2 parents dbfd9a2 + a553c37 commit ca02cf5
Show file tree
Hide file tree
Showing 29 changed files with 119 additions and 183 deletions.
23 changes: 13 additions & 10 deletions apps/user/src/app/form/보호자정보/보호자정보.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const 보호자정보 = () => {
value={form.parent.name}
onChange={handle보호자정보DataChange}
label="성명"
placeholder="예) 홍길동"
width="100%"
isError={form.parent.name.length > 20}
errorMessage="20자 이하여야 합니다."
Expand All @@ -35,39 +36,40 @@ const 보호자정보 = () => {
value={form.parent.phoneNumber}
onChange={handle보호자정보DataChange}
label="전화번호"
placeholder="- 없이 입력"
placeholder="- 없이 입력해주세요."
width="100%"
isError={
!!form.parent.phoneNumber && form.parent.phoneNumber.length !== 11
}
errorMessage="11글자여야 합니다"
/>
</Row>
<Input
label="보호자 관계"
value={form.parent.relation}
onChange={handle보호자정보DataChange}
name="relation"
placeholder="예) 부, 모"
width="calc(50% - 24px)"
/>
<ButtonInput
label="주소"
buttonText="검색"
onClick={openFindAdressModal}
width="100%"
value={form.parent.address}
placeholder="예) 부산광역시 강서구 가락대로 1393 봉림동 15 "
readOnly
isError={form.parent.address.length > 100}
errorMessage="100자 이하여야 합니다."
/>
<Input
label="보호자 관계"
value={form.parent.relation}
onChange={handle보호자정보DataChange}
name="relation"
placeholder="부, 모, 삼촌 등등.."
width="calc(50% - 24px)"
/>

<Row gap={48}>
<Input
name="detailAddress"
value={form.parent.detailAddress}
onChange={handle보호자정보DataChange}
label="상세 주소"
placeholder="상세 주소를 입력해주세요."
width="100%"
isError={form.parent.detailAddress.length > 100}
errorMessage="100자 이하여야 합니다."
Expand All @@ -77,6 +79,7 @@ const 보호자정보 = () => {
value={form.parent.zoneCode}
onChange={handle보호자정보DataChange}
label="우편번호"
placeholder="우편번호 5자리를 입력해주세요."
width="100%"
isError={!!form.parent.zoneCode && form.parent.zoneCode.length !== 5}
readOnly
Expand Down
2 changes: 1 addition & 1 deletion apps/user/src/app/form/전형선택/전형선택.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const 전형선택 = () => {
</Row>
<Row>
<Td width="calc(736px/3)" height={56}>
소년 . 소녀가장
소년 소녀가장
</Td>
<Td width={80} height={56}>
<Radio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const useCTAButton = () => {

const handleNextButtonClick = () => {
setFormStep('보호자정보');

saveFormMutate(form);
};

Expand All @@ -20,6 +21,7 @@ export const useInput = () => {

const handle지원자정보DataChange: ChangeEventHandler<HTMLInputElement> = (e) => {
const { name, value } = e.target;

setForm((prev) => ({ ...prev, applicant: { ...prev.applicant, [name]: value } }));
};

Expand Down
14 changes: 11 additions & 3 deletions apps/user/src/app/form/지원자정보/지원자정보.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DateBox, FormController, ProfileUploader } from '@/components/form';
import { FormController, ProfileUploader } from '@/components/form';
import { FormLayout } from '@/layouts';
import { useFormValueStore } from '@/store';
import { Column, Input, RadioGroup, Row } from '@maru/ui';
Expand All @@ -21,11 +21,19 @@ const 지원자정보 = () => {
value={form.applicant.name}
onChange={handle지원자정보DataChange}
name="name"
placeholder="예) 홍길동"
width="100%"
isError={form.applicant.name.length > 20}
errorMessage="20자 이하여야 합니다."
/>
<DateBox />
<Input
label="생년월일"
value={form.applicant.birthday}
onChange={handle지원자정보DataChange}
name="birthday"
placeholder="예) 2006-07-06"
width="100%"
/>
<Row gap={40} alignItems="flex-end">
<RadioGroup
label="성별"
Expand All @@ -43,7 +51,7 @@ const 지원자정보 = () => {
value={form.applicant.phoneNumber}
onChange={handle지원자정보DataChange}
name="phoneNumber"
placeholder="- 없이 입력해주세요"
placeholder="- 없이 입력해주세요."
width="100%"
isError={
!!form.applicant.phoneNumber &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const useFilledEducationFieldsCount = (education: Form['education']) =>
case 'graduationYear':
return acc + Number(value.length === 4);
case 'schoolCode':
return acc + Number(value.length === 10);
return acc + Number(value.length === 7);
case 'teacherPhoneNumber':
case 'teacherMobilePhoneNumber':
return acc + Number(value.length <= 11);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const Styled초안작성완료 = styled.div<{ isFilledForm: boolean }>`
gap: ${(props) => (props.isFilledForm ? '48px' : '62px')};
max-width: 800px;
height: 100%;
margin: 62px auto 0;
margin: 62px auto 240px;
opacity: 0;
animation: show 1.2s 2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ export default 초안제출완료;

const Styled초안제출완료 = styled.div`
${flex({ flexDirection: 'column' })}
gap:48px;
gap: 48px;
max-width: 800px;
height: 100%;
margin: 0 auto;
margin: 62px auto 0;
opacity: 0;
animation: show 1.2s 2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
Expand Down
1 change: 1 addition & 0 deletions apps/user/src/app/form/최종제출/최종제출.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const Styled최종제출 = styled.div`
width: 100%;
height: 100%;
padding: 58px 96px 0px;
margin-bottom: 240px;
`;

const ContentBox = styled.div`
Expand Down
14 changes: 9 additions & 5 deletions apps/user/src/app/form/최종제출완료/최종제출완료.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { CompleteAlaram } from '@/components/form';
import { useUser } from '@/hooks';
import { AppLayout } from '@/layouts';
import { IconCheckCircle } from '@maru/icon';
import { color } from '@maru/theme';
import { Button, Column, Row, Text } from '@maru/ui';
import { flex } from '@maru/utils';
import { useRouter } from 'next/navigation';
import { styled } from 'styled-components';
import { useCTAButton } from './최종제출완료.hooks';

const 최종제출완료 = () => {
const router = useRouter();
const { userData } = useUser();
const { handleGoMainPageButtonClick } = useCTAButton();

return (
Expand All @@ -30,11 +30,12 @@ const 최종제출완료 = () => {
부산소프트웨어마이스터고에 지원해주셔서 감사합니다.
</Text>
<Text fontType="p2" color={color.gray900} textAlign="center">
신준서 님, 부산소프트웨어마이스터고에 지원해주셔서 대단히 감사드립니다.
{userData.name} 님, 부산소프트웨어마이스터고에 지원해주셔서 대단히
감사드립니다.
<br />
1차 합격자는 11월 3일에 발표됩니다.
1차 합격자는 11월 2일에 발표됩니다.
<br />
신준서 님의 1차 합격을 기원합니다.
{userData.name} 님의 1차 합격을 기원합니다.
</Text>
</Column>
<Button onClick={handleGoMainPageButtonClick} size="SMALL">
Expand All @@ -51,6 +52,9 @@ export default 최종제출완료;
const Styled최종제출완료 = styled.div`
${flex({ flexDirection: 'column' })}
gap: 70px;
width: 100%;
height: 100%;
padding-top: 69px;
opacity: 0;
animation: show 1.2s 2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const 출신학교및학력 = () => {
value={form.education.schoolName}
buttonText="검색"
onClick={openFindSchoolModal}
placeholder="클릭하여 검색하기"
placeholder="검색 버튼을 눌러 학교를 검색하세요."
readOnly
isError={form.education.schoolName.length > 20}
errorMessage="20자 이하여야 합니다."
Expand All @@ -46,7 +46,7 @@ const 출신학교및학력 = () => {
<Input
name="graduationYear"
label="졸업 년도, 합격 년도"
placeholder="뭐시기 뭐시기"
placeholder="예) 2022"
width="100%"
value={form.education.graduationYear}
onChange={handle출신학교및학력DataChange}
Expand All @@ -59,7 +59,7 @@ const 출신학교및학력 = () => {
<Input
name="schoolLocation"
label="지역"
placeholder="뭐시기 뭐시기"
placeholder="학교를 선택하면 자동완성됩니다."
isError={form.education.schoolLocation.length > 20}
errorMessage="20자여야 합니다."
width="100%"
Expand All @@ -71,7 +71,7 @@ const 출신학교및학력 = () => {
<Input
name="schoolCode"
label="표준 학교 코드"
placeholder="뭐시기 뭐시기"
placeholder="학교를 선택하면 자동완성됩니다."
width="100%"
value={form.education.schoolCode}
onChange={handle출신학교및학력DataChange}
Expand All @@ -83,7 +83,7 @@ const 출신학교및학력 = () => {
<Input
name="teacherPhoneNumber"
label="학교 연락처"
placeholder="뭐시기 뭐시기"
placeholder="학교의 교무실 연락처를 입력해주세요."
width="100%"
value={form.education.teacherPhoneNumber}
onChange={handle출신학교및학력DataChange}
Expand All @@ -95,7 +95,7 @@ const 출신학교및학력 = () => {
<Input
name="teacherName"
label="작성 교사 이름"
placeholder="뭐시기 뭐시기"
placeholder="예) 홍길동"
width="100%"
value={form.education.teacherName}
onChange={handle출신학교및학력DataChange}
Expand All @@ -105,7 +105,7 @@ const 출신학교및학력 = () => {
<Input
name="teacherMobilePhoneNumber"
label="작성 교사 연락처"
placeholder="뭐시기 뭐시기"
placeholder="- 없이 입력해 주세요"
width="100%"
value={form.education.teacherMobilePhoneNumber}
onChange={handle출신학교및학력DataChange}
Expand Down
4 changes: 2 additions & 2 deletions apps/user/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import Script from 'next/script';
import { ReactNode } from 'react';

export const metadata = {
title: '마루',
description: '부산소프트웨어마이스터고등학교 입학전형 시스템 마루입니다',
title: '부산소프트웨어마이스터고 입학전형 | 마루',
description: '부산소프트웨어마이스터고등학교 입학전형 시스템 마루입니다.',
};

interface Props {
Expand Down
2 changes: 2 additions & 0 deletions apps/user/src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ const LoginPage = () => {
label="전화번호"
width="100%"
name="phoneNumber"
placeholder="전화번호를 입력해주세요."
onChange={handleLoginUserDataChange}
/>
<PreviewInput
label="비밀번호"
width="100%"
name="password"
placeholder="비밀번호를 입력해주세요."
onChange={handleLoginUserDataChange}
/>
</Column>
Expand Down
2 changes: 1 addition & 1 deletion apps/user/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
GuidelineBox,
Notice,
Schedule,
SimulatorBox,
SimulatorBox
} from '@/components/main';
import { AppLayout } from '@/layouts';
import { Row } from '@maru/ui';
Expand Down
4 changes: 3 additions & 1 deletion apps/user/src/app/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const SignUpPage = () => {
}}
enabled={isRequestVerificationDisabled}
type="phoneNumber"
placeholder="- 없이 입력해주세요"
placeholder="- 없이 입력해주세요."
width="100%"
name="phoneNumber"
onChange={handleJoinUserDataChange}
Expand All @@ -81,12 +81,14 @@ const SignUpPage = () => {
label="비밀번호"
width="100%"
name="password"
placeholder="비밀번호를 입력해주세요."
onChange={handleJoinUserDataChange}
/>
<PreviewInput
label="비밀번호 재확인"
width="100%"
name="password_confirm"
placeholder="비밀번호를 다시 입력해주세요."
onChange={handleJoinUserDataChange}
isError={joinUserData.password !== joinUserData.password_confirm}
errorMessage="비밀번호가 맞지 않습니다."
Expand Down
Loading

0 comments on commit ca02cf5

Please sign in to comment.