Skip to content

Commit

Permalink
feat: 공연 수정 페이지 TimePicker DateTimePicker로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
pepperdad committed Nov 22, 2024
1 parent 17adbb7 commit 5ccdf37
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pages/modifyManage/ModifyManage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
useGetScheduleAvailable,
usePerformanceDelete,
usePerformanceEdit,
usePostPerformance,
Expand All @@ -17,7 +16,6 @@ import {
Stepper,
TextArea,
TextField,
TimePicker,
} from "@components/commons";

import { PresignedResponse } from "@apis/domains/files/api";
Expand All @@ -29,6 +27,7 @@ import { useHeader, useModal } from "@hooks";
import Content from "@pages/gig/components/content/Content";
import ShowInfo, { SchelduleListType } from "@pages/gig/components/showInfo/ShowInfo";
import { SHOW_TYPE_KEY } from "@pages/gig/constants";
import DateTimePicker from "@pages/register/components/DateTimePicker";
import { numericFilter, phoneNumberFilter, priceFilter } from "@utils/useInputFilter";
import dayjs, { Dayjs } from "dayjs";
import { ChangeEvent, useEffect, useReducer, useState } from "react";
Expand Down Expand Up @@ -175,6 +174,7 @@ const ModifyManage = () => {
const scheduleNumber = SCHEDULE_NUMBER[index + 1];
return { ...existingSchedule, totalTicketCount, scheduleNumber };
});

dispatch({ type: "SET_FIELD", field: "scheduleModifyRequests", value: updatedScheduleList });
}, [dataState.totalScheduleCount]);

Expand Down Expand Up @@ -643,12 +643,12 @@ const ModifyManage = () => {
<div key={index}>
<S.InputDescription>{index + 1}회차</S.InputDescription>
<Spacing marginBottom={"1"} />
<TimePicker
value={dayjs(schedule.performanceDate)}
disabled={isExpired(schedule.performanceDate)}
onChangeValue={(date) => {
<DateTimePicker
value={schedule.performanceDate ? dayjs(schedule.performanceDate) : null}
onChangeDateTime={(date) => {
const updatedSchedules = [...dataState.scheduleModifyRequests];
updatedSchedules[index].performanceDate = date;

handleInputChange("scheduleModifyRequests", updatedSchedules);
}}
/>
Expand Down

0 comments on commit 5ccdf37

Please sign in to comment.