11"use client" ;
22
3+ import Link from "next/link" ;
34import classNames from "classnames/bind" ;
45
56import { Button , Flex , Select , TextField , Typography } from "@permit/design-system" ;
67import { useSelect , useTextField } from "@permit/design-system/hooks" ;
78import { useTimeTableSuspenseQuery } from "@/data/admin/getTimeTables/queries" ;
89import { useTimeTableMutation } from "@/data/admin/patchTimeTables/mutation" ;
910import { usePostTimeTableInitial } from "@/data/admin/postTimeTable/mutation" ;
11+ import { EXTERNAL_PATH } from "@/shared/constants/path" ;
12+ import { getPathUrl } from "@/shared/helpers/getPathUrl" ;
1013
1114import styles from "./index.module.scss" ;
1215
@@ -24,8 +27,6 @@ export const TimeTableManagementClient = ({ eventId }: Props) => {
2427 } ,
2528 } ) ;
2629
27- console . log ( "@@timeTableData" , timeTableData ) ;
28-
2930 const { mutateAsync : createTimeTable , isPending } = usePostTimeTableInitial ( {
3031 eventId,
3132 } ) ;
@@ -147,6 +148,13 @@ export const TimeTableManagementClient = ({ eventId }: Props) => {
147148 < div className = { cx ( "container" ) } >
148149 < Typography type = "title24" > TimeTable</ Typography >
149150 { /* TODO: 최초 등록에만 사용해주세요. */ }
151+ { timeTableData ?. eventId && (
152+ < Link href = { getPathUrl ( EXTERNAL_PATH . TIMETABLE , { eventId : timeTableData . eventId } ) } >
153+ < Typography type = "body16" weight = "bold" style = { { marginTop : "12px" , color : "#5640ff" } } >
154+ TimeTable 로 이동하기
155+ </ Typography >
156+ </ Link >
157+ ) }
150158
151159 < Flex direction = "column" gap = { 24 } style = { { marginTop : 32 } } >
152160 < Flex gap = { 24 } >
@@ -162,28 +170,29 @@ export const TimeTableManagementClient = ({ eventId }: Props) => {
162170 </ Flex >
163171 < Flex className = { cx ( "row" ) } direction = "column" gap = { 12 } >
164172 < Typography type = "body16" weight = "bold" >
165- TimeTable End Date
173+ Start Time
166174 </ Typography >
167- < Select
168- type = "calendar"
169- placeholder = "타임테이블 종료 날짜를 선택해주세요"
170- { ...timeTableEndDateField . selectProps }
175+ < TextField
176+ placeholder = "타임테이블 시작 시간을 입력해주세요 (HH:MM)"
177+ value = { timeTableStartTimeField . value }
178+ onChange = { timeTableStartTimeField . handleChange }
179+ error = { timeTableStartTimeField . error }
171180 />
172181 </ Flex >
173182 </ Flex >
174183
175184 < Flex gap = { 24 } >
176185 < Flex className = { cx ( "row" ) } direction = "column" gap = { 12 } >
177186 < Typography type = "body16" weight = "bold" >
178- Start Time
187+ TimeTable End Date
179188 </ Typography >
180- < TextField
181- placeholder = "타임테이블 시작 시간을 입력해주세요 (HH:MM)"
182- value = { timeTableStartTimeField . value }
183- onChange = { timeTableStartTimeField . handleChange }
184- error = { timeTableStartTimeField . error }
189+ < Select
190+ type = "calendar"
191+ placeholder = "타임테이블 종료 날짜를 선택해주세요"
192+ { ...timeTableEndDateField . selectProps }
185193 />
186194 </ Flex >
195+
187196 < Flex className = { cx ( "row" ) } direction = "column" gap = { 12 } >
188197 < Typography type = "body16" weight = "bold" >
189198 End Time
0 commit comments