-
Notifications
You must be signed in to change notification settings - Fork 2
Feat: 일정 만들기 추가 구현 #55
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
Open
Choi-Jinwook
wants to merge
31
commits into
develop
Choose a base branch
from
feat/makeplan
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
bedefe7
[feat] 썸네일 선택 후 대표 이미지 표시
Choi-Jinwook d0158b3
[feat] 사이드바 클릭 상태 설정
Choi-Jinwook 5ec4709
[feat] constant 분리
Choi-Jinwook 4e85caf
[fix] 사이드바 버그 수정
Choi-Jinwook 5f3fa95
[feat] 사이드바 메뉴 클릭 시 해당 위치 이동 로직 추가
Choi-Jinwook 8069dbf
Merge remote-tracking branch 'Catcher-origin/develop' into feat/makeplan
Choi-Jinwook 1b1d7f2
[feat] 템플릿, 작성중 일정 msw 적용
Choi-Jinwook 6c4f3e7
[feat] 템플릿, 작성 중 일정 타입 통일
Choi-Jinwook 031c192
[feat] 불러온 데이터 적용
Choi-Jinwook 63f25f8
[feat] 작성 중 일정이 없는 경우 핸들링
Choi-Jinwook 93541bf
Merge remote-tracking branch 'Catcher-origin/develop' into feat/makeplan
Choi-Jinwook fe1f6e2
[fix] 다른 프로세스 이동 시 제목 날아가는 현상 수정
Choi-Jinwook 28f3491
[feat] 사용하지 않는 리코일 제거
Choi-Jinwook d679a93
[feat] 상단 현재페이지 표시문구 관리 로직 변경
Choi-Jinwook 4464110
[feat] 작성 중 일정 없을 때 프로세스 관리 로직 상위 컴포넌트로 이동
Choi-Jinwook e5f2497
[feat] 가독성을 위한 리코일 이름 변경
Choi-Jinwook 5cd97e5
[feat] 타입 추가
Choi-Jinwook 350bf01
[feat] API 요청 경로 추가
Choi-Jinwook 99f16e6
[feat] 변경된 타입 적용
Choi-Jinwook c66d173
[feat] msw 타입, 경로 수정
Choi-Jinwook f1860e5
Merge remote-tracking branch 'Catcher-origin/develop' into feat/makeplan
Choi-Jinwook 8d73ce3
[feat] interface key 통일
Choi-Jinwook 8fd804a
[feat] 기본정보 임시저장 msw 적용
Choi-Jinwook 618b669
[feat] 임시저장 post method 추가
Choi-Jinwook 1052446
[feat] 지역 정보 추가
Choi-Jinwook 162b2c5
[feat] default export 추가
Choi-Jinwook c1f354d
[feat] 지역 타입 추가
Choi-Jinwook 0878aa6
[feat] 지역 선택 모달 세팅
Choi-Jinwook 44c7b3e
[feat] 지역 선택 로직 구성
Choi-Jinwook 2edc490
[feat] 기본정보 버튼 비활성화 추가
Choi-Jinwook 4a8ef06
[feat] 기본정보 post method try-catch 적용
Choi-Jinwook File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,48 @@ | ||
| import { PlanContent, PlanSideBar } from "@create-schedule/components"; | ||
| import axios from "axios"; | ||
| import { GetServerSideProps } from "next"; | ||
| import { CREATE_SCHEDULE_PATH } from "@shared/constants"; | ||
| import { TemplateSchedule, TemporarySchedule } from "@shared/types"; | ||
|
|
||
| const CreateSchedule = () => { | ||
| interface CreateScheduleProps { | ||
| temporary: TemporarySchedule[]; | ||
| templates: TemplateSchedule[]; | ||
| } | ||
|
|
||
| const CreateSchedule = ({ temporary, templates }: CreateScheduleProps) => { | ||
| return ( | ||
| <div className="w-full h-without-header mt-[78px]"> | ||
| <PlanSideBar /> | ||
| <PlanContent /> | ||
| <PlanContent temporary={temporary} templates={templates} /> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default CreateSchedule; | ||
|
|
||
| export const getServerSideProps: GetServerSideProps = async () => { | ||
| try { | ||
| const [temporary, templates] = await axios.all([ | ||
| axios.get( | ||
| `${process.env.NEXT_PUBLIC_BASE_URL}/${CREATE_SCHEDULE_PATH.temporary}`, | ||
| ), | ||
| axios.get( | ||
| `${process.env.NEXT_PUBLIC_BASE_URL}/${CREATE_SCHEDULE_PATH.templates}`, | ||
| ), | ||
| ]); | ||
|
|
||
| return { | ||
| props: { | ||
| temporary: temporary.data as TemporarySchedule[], | ||
| templates: templates.data as TemplateSchedule[], | ||
| }, | ||
| }; | ||
| } catch (error) { | ||
| return { | ||
| props: { | ||
| temporary: [], | ||
| templates: [], | ||
| }, | ||
| }; | ||
| } | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| import { useState } from "react"; | ||
| import { LOCATION } from "@shared/constants"; | ||
| import { LocationType } from "@shared/types"; | ||
|
|
||
| interface LocationModalProps { | ||
| callType: "first" | "second"; | ||
| handleLocation: (value: string) => void; | ||
| firstLocation?: string; | ||
| } | ||
|
|
||
| const LocationModal = ({ | ||
| callType, | ||
| handleLocation, | ||
| firstLocation, | ||
| }: LocationModalProps) => { | ||
| const [clickedCity, setClickedCity] = useState(""); | ||
|
|
||
| const onClick = (index: number) => { | ||
| if (callType === "first") { | ||
| setClickedCity(Object.keys(LOCATION)[index]); | ||
| } else if (firstLocation) { | ||
| setClickedCity(LOCATION[firstLocation as keyof LocationType][index]); | ||
| } | ||
| }; | ||
|
|
||
| return ( | ||
| <> | ||
| <div className="flex flex-wrap gap-[8px]"> | ||
| {callType === "first" | ||
| ? Object.keys(LOCATION).map((location, index) => ( | ||
| <div key={`${location}-${index}`}> | ||
| <div | ||
| className={`${ | ||
| clickedCity === location | ||
| ? "text-[#F864A1] border-[#F864A1]" | ||
| : "text-[#333333] border-[#E0E0E0]" | ||
| } w-[120px] h-[40px] text-[14px] text-center border rounded-[9px] py-[6.5px] cursor-pointer`} | ||
| onClick={() => onClick(index)} | ||
| > | ||
| {location} | ||
| </div> | ||
| </div> | ||
| )) | ||
| : firstLocation && | ||
| LOCATION[firstLocation as keyof LocationType].map( | ||
| (location, index) => ( | ||
| <div key={`${location}-${index}`}> | ||
| <div | ||
| className={`${ | ||
| clickedCity === location | ||
| ? "text-[#F864A1] border-[#F864A1]" | ||
| : "text-[#333333] border-[#E0E0E0]" | ||
| } w-[120px] h-[40px] text-[14px] text-center border rounded-[9px] py-[6.5px] cursor-pointer`} | ||
| onClick={() => onClick(index)} | ||
| > | ||
| {location} | ||
| </div> | ||
| </div> | ||
| ), | ||
| )} | ||
| </div> | ||
| <div className="w-[376px] text-center mt-[24px]"> | ||
| <button | ||
| disabled={clickedCity === ""} | ||
| className={`${ | ||
| clickedCity | ||
| ? "text-white bg-[#F864A1]" | ||
| : "text-[#B1B1B1] bg-[#E9ECEF]" | ||
| } w-[120px] h-[40px] text-center rounded-[9px] mx-auto`} | ||
| onClick={() => handleLocation(clickedCity)} | ||
| > | ||
| 완료 | ||
| </button> | ||
| </div> | ||
| </> | ||
| ); | ||
| }; | ||
|
|
||
| export default LocationModal; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.