From 13dcb7f8c41d91e37a5ba42e2de247edeb4f9858 Mon Sep 17 00:00:00 2001 From: Yejiin21 <101397075+Yejiin21@users.noreply.github.com> Date: Sun, 1 Jun 2025 21:18:27 +0900 Subject: [PATCH 1/5] =?UTF-8?q?refac:=20=EC=82=AC=EC=9A=A9=ED=95=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20=ED=83=80=EC=9E=85=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/types/responseType.ts | 203 ++----------------------------- 1 file changed, 9 insertions(+), 194 deletions(-) diff --git a/src/shared/types/responseType.ts b/src/shared/types/responseType.ts index 692ff096..b827e107 100644 --- a/src/shared/types/responseType.ts +++ b/src/shared/types/responseType.ts @@ -1,199 +1,14 @@ export interface Option { - optionName: string; - choices: string[]; + optionName: string; + choices: string[]; } -export const options: Option[] = [ - { - optionName: '티셔츠 사이즈', - choices: ['XS', 'S', 'M', 'L', 'XL'], - }, - ]; export interface responsesData { - id: string; - name: string; - email: string; - phone: string; - grade: string; - num: string; - selectedOptions: { [key: string]: string }; + id: string; + name: string; + email: string; + phone: string; + grade: string; + num: string; + selectedOptions: { [key: string]: string }; } - -export const responsesInfo: responsesData[] = [ - { - id: '1', - name: '고에진', - email: 'qwe@naver.com', - phone: '000-1234-5678', - grade: '1', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "S", - }, - }, - { - id: '2', - name: '조히은', - email: 'asd@naver.com', - phone: '000-1212-3232', - grade: '2', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "M", - }, - }, - { - id: '3', - name: '한승철', - email: 'qaz@naver.com', - phone: '000-3456-1234', - grade: '2', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '4', - name: '민정준', - email: 'poi@naver.com', - phone: '000-1345-2346', - grade: '2', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '5', - name: '고에진', - email: 'ghj@naver.com', - phone: '000-1234-5678', - grade: '4', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '6', - name: '조히은', - email: 'jhe@naver.com', - phone: '000-1212-3232', - grade: '3', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '7', - name: '한승철', - email: 'hsc@naver.com', - phone: '000-3456-1234', - grade: '1', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '8', - name: '민정준', - email: 'mjj@naver.com', - phone: '000-1345-2346', - grade: '3', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '1', - name: '고에진', - email: 'qwe@naver.com', - phone: '000-1234-5678', - grade: '1', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "S", - }, - }, - { - id: '2', - name: '조히은', - email: 'asd@naver.com', - phone: '000-1212-3232', - grade: '2', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "M", - }, - }, - { - id: '3', - name: '한승철', - email: 'qaz@naver.com', - phone: '000-3456-1234', - grade: '2', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '4', - name: '민정준', - email: 'poi@naver.com', - phone: '000-1345-2346', - grade: '2', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '5', - name: '고에진', - email: 'ghj@naver.com', - phone: '000-1234-5678', - grade: '4', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '6', - name: '조히은', - email: 'jhe@naver.com', - phone: '000-1212-3232', - grade: '3', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '7', - name: '한승철', - email: 'hsc@naver.com', - phone: '000-3456-1234', - grade: '1', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, - { - id: '8', - name: '민정준', - email: 'mjj@naver.com', - phone: '000-1345-2346', - grade: '3', - num: '20211234', - selectedOptions: { - "티셔츠 사이즈": "L", - }, - }, -]; From 9f10b9671e4741bf7ae54930a699aa232940adc9 Mon Sep 17 00:00:00 2001 From: Yejiin21 <101397075+Yejiin21@users.noreply.github.com> Date: Sun, 1 Jun 2025 21:19:56 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=ED=8B=B0=EC=BC=93=20=EC=98=B5?= =?UTF-8?q?=EC=85=98=20=ED=83=80=EC=9E=85=20enum=20=EA=B0=92=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/ticket/ui/TicketOptionFormSection.tsx | 11 ++++++----- src/shared/types/ticketType.ts | 5 +++++ 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 src/shared/types/ticketType.ts diff --git a/src/features/ticket/ui/TicketOptionFormSection.tsx b/src/features/ticket/ui/TicketOptionFormSection.tsx index 49eea9f7..7c9ae123 100644 --- a/src/features/ticket/ui/TicketOptionFormSection.tsx +++ b/src/features/ticket/ui/TicketOptionFormSection.tsx @@ -2,6 +2,7 @@ import { useTicketOptionForm } from '../hooks/useTicketOptionForm'; import DefaultTextField from '../../../../design-system/ui/textFields/DefaultTextField'; import ToggleButton from '../../../../design-system/ui/buttons/ToggleButton'; import ChoiceChip from '../../../../design-system/ui/ChoiceChip'; +import { TicketOptionType } from '../../../shared/types/ticketType'; export const TicketOptionFormSection = ({ form }: { form: ReturnType }) => { const { state, dispatch, handleAnswerToggled } = form; @@ -31,7 +32,7 @@ export const TicketOptionFormSection = ({ form }: { form: ReturnType dispatch({ type: 'SET_DESCRIPTION', payload: e.target.value })} /> @@ -44,12 +45,12 @@ export const TicketOptionFormSection = ({ form }: { form: ReturnType { - dispatch({ type: 'SET_RESPONSE_TOGGLE', payload: selected }); + dispatch({ type: 'SET_RESPONSE_TOGGLE', payload: selected as TicketOptionType }); dispatch({ type: 'SET_WARNING', payload: { field: 'optionWarning', value: '' } }); dispatch({ type: 'SET_FOCUSED_INDEX', payload: null }); }} diff --git a/src/shared/types/ticketType.ts b/src/shared/types/ticketType.ts new file mode 100644 index 00000000..9958795c --- /dev/null +++ b/src/shared/types/ticketType.ts @@ -0,0 +1,5 @@ +export enum TicketOptionType { + SINGLE = 'SINGLE', + MULTIPLE = 'MULTIPLE', + TEXT = 'TEXT', +} From 6867f98d086be30ecb732022d517077cb9c1f0b4 Mon Sep 17 00:00:00 2001 From: Yejiin21 <101397075+Yejiin21@users.noreply.github.com> Date: Sun, 1 Jun 2025 21:20:38 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=ED=8C=8C=EC=9D=BC=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/dashboard/ui/mail/EmailEditPage.tsx | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/pages/dashboard/ui/mail/EmailEditPage.tsx b/src/pages/dashboard/ui/mail/EmailEditPage.tsx index 9ab17a47..24b15fb4 100644 --- a/src/pages/dashboard/ui/mail/EmailEditPage.tsx +++ b/src/pages/dashboard/ui/mail/EmailEditPage.tsx @@ -8,23 +8,16 @@ import SelectTicketModal from '../../../../widgets/dashboard/ui/email/SelectTick import { useParticipants } from '../../../../features/dashboard/hook/useParticipants'; import { useEmailStore } from '../../../../features/dashboard/model/store/EmailStore'; import { useEditEmail } from '../../../../features/dashboard/hook/useEmailHook'; -import { EmailRequest } from '../../../../features/dashboard/model/emailInformation'; +import { EmailRequest } from '../../../../features/dashboard/model/email'; + const EmailEditPage = () => { const [ticketModalOpen, setTicketModalOpen] = useState(false); const { participants } = useParticipants(); const { id } = useParams(); const { mutate: editEmail } = useEditEmail(); - const { - reservationEmailId, - title, - content, - recipients, - reservationDate, - setReservationDate, - ticketId, - targetType - } = useEmailStore(); + const { reservationEmailId, title, content, recipients, reservationDate, setReservationDate, ticketId, targetType } = + useEmailStore(); const handleEdit = () => { const eventId = id ? parseInt(id) : 0; @@ -34,12 +27,12 @@ const EmailEditPage = () => { content, recipients, reservationDate, - targetType + targetType, }; if (targetType === 'TICKET') { emailData.ticketId = ticketId; } - editEmail({ reservationEmailId: reservationEmailId, data: emailData,}); + editEmail({ reservationEmailId: reservationEmailId, data: emailData }); }; return ( @@ -53,7 +46,9 @@ const EmailEditPage = () => { /> {/*시간 선택 컴포넌트*/} { setReservationDate(isoString); }} + onChange={isoString => { + setReservationDate(isoString); + }} />