diff --git a/src/components/Schedule/ScheduleTemplate/ScheduleTemplate.component.tsx b/src/components/Schedule/ScheduleTemplate/ScheduleTemplate.component.tsx index d021232f..aec49d44 100644 --- a/src/components/Schedule/ScheduleTemplate/ScheduleTemplate.component.tsx +++ b/src/components/Schedule/ScheduleTemplate/ScheduleTemplate.component.tsx @@ -125,16 +125,23 @@ const ScheduleTemplate = () => { /> {locationType === LocationType.OFFLINE && ( - + + + + + - - + )} diff --git a/src/components/Schedule/ScheduleTemplate/ScheduleTemplate.styled.ts b/src/components/Schedule/ScheduleTemplate/ScheduleTemplate.styled.ts index 4dd16bc6..93648f02 100644 --- a/src/components/Schedule/ScheduleTemplate/ScheduleTemplate.styled.ts +++ b/src/components/Schedule/ScheduleTemplate/ScheduleTemplate.styled.ts @@ -64,10 +64,16 @@ export const RequiredDot = styled.span` export const RadioButtonGroup = styled.div` display: flex; gap: 2rem; - margin-bottom: 1rem; + margin-bottom: 0.6rem; `; export const InputWithButton = styled.div` display: flex; gap: 1rem; `; + +export const LocationWrapper = styled.div` + display: flex; + flex-direction: column; + gap: 0.6rem; +`; diff --git a/src/pages/UpdateSchedule/UpdateSchedule.page.tsx b/src/pages/UpdateSchedule/UpdateSchedule.page.tsx index e36ebcca..cf8e64ef 100644 --- a/src/pages/UpdateSchedule/UpdateSchedule.page.tsx +++ b/src/pages/UpdateSchedule/UpdateSchedule.page.tsx @@ -44,6 +44,7 @@ const UpdateSchedule = () => { const handleSubmitForm: SubmitHandler = useRecoilCallback( ({ set }) => async (data) => { + console.log('updateScheduleRequest'); const updateScheduleRequest = parseFormValuesToScheduleRequest(data); if (!scheduleId) { diff --git a/src/utils/schedule.ts b/src/utils/schedule.ts index caaa7a89..7067e127 100644 --- a/src/utils/schedule.ts +++ b/src/utils/schedule.ts @@ -27,6 +27,7 @@ export interface ScheduleFormValues { longitude: string; placeName: string; }; + detailAddress?: string; } export const getScheduleStatusText = (status: ValueOf) => { @@ -73,8 +74,10 @@ export const parseScheduleResponseToFormValues = ( export const parseFormValuesToScheduleRequest = ( formValues: ScheduleFormValues, ): ScheduleCreateRequest | ScheduleUpdateRequest => { - const { generationNumber, date, sessions, name, locationType, locationInfo } = formValues; + const { generationNumber, date, sessions, name, locationType, locationInfo, detailAddress } = + formValues; + console.log(locationType, 'detailAddress', detailAddress, locationInfo); const formattedDate = date.format('YYYY-MM-DD'); const eventsCreateRequests: EventCreateRequest[] = sessions.map((session) => ({ @@ -99,7 +102,7 @@ export const parseFormValuesToScheduleRequest = ( }; if (locationType === LocationType.OFFLINE && locationInfo) { - scheduleRequest.address = locationInfo.address; + scheduleRequest.address = `${locationInfo.address}${detailAddress ? `(${detailAddress})` : ''}`; scheduleRequest.latitude = Number(locationInfo.latitude); scheduleRequest.longitude = Number(locationInfo.longitude); scheduleRequest.placeName = locationInfo.placeName;