From 3b03b5cbeccae0a8f635875b251f00f9b8e4f0bb Mon Sep 17 00:00:00 2001 From: seoyeon Moon <66253833+seoyeon08@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:27:30 +0900 Subject: [PATCH] =?UTF-8?q?[Feat/#38]=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=B6=9C=EB=A0=A5,=20=EB=82=98=EC=9D=98?= =?UTF-8?q?=20=EC=8B=A0=EC=B2=AD=20=ED=81=B4=EB=9E=98=EC=8A=A4=20=EC=B6=9C?= =?UTF-8?q?=EB=A0=A5,=20=ED=81=B4=EB=9E=98=EC=8A=A4=20=EC=98=88=EC=95=BD?= =?UTF-8?q?=20=EC=B7=A8=EC=86=8C,=20=EC=8B=A0=EC=B2=AD=20=ED=81=B4?= =?UTF-8?q?=EB=9E=98=EC=8A=A4=20=EC=9D=BC=EC=A0=95,=20=EC=98=88=EC=95=BD?= =?UTF-8?q?=EC=9E=90=20=EC=A0=95=EB=B3=B4,=20=ED=99=98=EB=B6=88=20api=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0=20(#42)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: update token * feat: 마이페이지 출력 api 연결 * feat: 나의 신청 클래스 출력 api 연결 * fix: 마이페이지 출력 api 오류 수정 * feat: 클래스 예약 취소(환불제외) api 연결 * fix: 나의 신청 클래스 출력 api 오류 해결 * chore: 신청 클래스 일정 req 관련 코드 수정 * feat: 예약자 정보 api 연결 완료 * feat: 환불 api 연결 완료 * feat: 예약 취소 api 연결 완료 및 lessonSlider UI 수정 --- src/apis/apiClient.ts | 87 ++++++++++++++++++---- src/apis/interfaces/reservationApi.ts | 12 +++ src/apis/interfaces/transactionApi.ts | 6 +- src/apis/url.ts | 4 +- src/components/molecules/ApplicantInfo.tsx | 14 ++-- src/components/molecules/LessonDetail.tsx | 2 +- src/components/molecules/LessonList.tsx | 8 +- src/components/organisms/ApplicantList.tsx | 18 +++-- src/components/organisms/LessonSlider.tsx | 56 +++++++++++--- src/pages/main/HanaFunMain.tsx | 8 +- src/pages/mypage/HostLessonCalendar.tsx | 26 ++++++- src/pages/mypage/LessonCalendar.tsx | 40 ++++++---- src/pages/mypage/MyLessonList.tsx | 9 ++- src/pages/mypage/MyPage.tsx | 20 +++-- src/types/commonLesson.d.ts | 5 -- src/types/lesson.d.ts | 6 +- src/types/myLesson.d.ts | 14 ---- src/types/reservation.d.ts | 55 +++++++++++++- src/types/transaction.d.ts | 4 + 19 files changed, 293 insertions(+), 101 deletions(-) delete mode 100644 src/types/commonLesson.d.ts delete mode 100644 src/types/myLesson.d.ts diff --git a/src/apis/apiClient.ts b/src/apis/apiClient.ts index f948c61..34d710e 100644 --- a/src/apis/apiClient.ts +++ b/src/apis/apiClient.ts @@ -13,9 +13,8 @@ import { CreateHostResType, HostInfoType, } from '../types/host'; -import { LessonDetailType } from '../types/lesson'; import { transactionApi } from './interfaces/transactionApi'; -import { QrPayReqType } from '../types/transaction'; +import { PaybackReqType, QrPayReqType } from '../types/transaction'; export class ApiClient implements userApi, accountApi, hostApi, categoryApi, transactionApi @@ -145,6 +144,20 @@ export class ApiClient return response.data; } + // 환불 + async postPayback(reqData: PaybackReqType) { + const response = await this.axiosInstance.request< + BaseResponseType<{ + transactionId: number; + }> + >({ + method: 'post', + url: '/transaction/payback', + data: reqData, + }); + return response.data; + } + //---------category--------- //---------lesson--------- @@ -163,6 +176,50 @@ export class ApiClient //---------reservation--------- + // 마이페이지 출력 + async getMyLesson() { + const response = await this.axiosInstance.request< + BaseResponseType + >({ + method: 'get', + url: '/reservation/my', + }); + return response.data; + } + + // 나의 신청 클래스 출력 + async getMyLessonAll() { + const response = await this.axiosInstance.request< + BaseResponseType + >({ + method: 'get', + url: '/reservation/my/lessons', + }); + console.log('신청클래스 싹다', response.data); + return response.data; + } + + // 클래스 예약 취소 + async cancelLesson(reservationId: CancelLessonReqType) { + const response = await this.axiosInstance.request({ + method: 'post', + url: '/reservation/cancel', + data: reservationId, + }); + return response.data; + } + + // 신청 클래스 일정 + async getMySchedule(reqData: MyScheduleReqType) { + const response = await this.axiosInstance.request< + BaseResponseType + >({ + method: 'get', + url: `/reservation/my/schedule?year=${reqData.year}&month=${reqData.month}`, + }); + return response.data; + } + // 개설 클래스 관리 (전체 목록) async getHostLessonList() { const response = await this.axiosInstance.request< @@ -188,23 +245,21 @@ export class ApiClient return response.data; } - //---------revenue--------- + // 예약자 정보 + async peopleList(lessondateId: PeopleListReqType) { + console.log('전달된 lessondate_id: ', lessondateId); + const response = await this.axiosInstance.request< + BaseResponseType + >({ + method: 'post', + url: '/reservation/my/opened/people', + data: lessondateId, + }); - // 임의 데이터. 마이페이지 홈 화면 호출 - public static async getMyLesson(): Promise { - const apiUrl = '/data/myLesson.json'; - const response = await fetch(apiUrl); - const data = await response.json(); - return data; + return response.data; } - // 임의 데이터. 신청 클래스 목록 페이지 호출 - public static async getMyLessonAll(): Promise { - const apiUrl = '/data/myLessonAll.json'; - const response = await fetch(apiUrl); - const data = await response.json(); - return data; - } + //---------revenue--------- // 임의 데이터. 클래스 년/월 별 매출액 public static async getMonthSales(): Promise { diff --git a/src/apis/interfaces/reservationApi.ts b/src/apis/interfaces/reservationApi.ts index 85e5844..7c51aa9 100644 --- a/src/apis/interfaces/reservationApi.ts +++ b/src/apis/interfaces/reservationApi.ts @@ -4,4 +4,16 @@ export interface reservationApi { getHostLessonDetailList( lesson_id: number ): Promise>; + + getMyLesson(): Promise>; + + getMyLessonAll(): Promise>; + + getMyLessonCalendar(): Promise>; + + cancelLesson(): Promise>; + + peopleList( + lessondate_id: PeopleListReqType + ): Promise>; } diff --git a/src/apis/interfaces/transactionApi.ts b/src/apis/interfaces/transactionApi.ts index b212be5..1ad8a91 100644 --- a/src/apis/interfaces/transactionApi.ts +++ b/src/apis/interfaces/transactionApi.ts @@ -1,4 +1,4 @@ -import { QrPayReqType } from '../../types/transaction'; +import { PaybackReqType, QrPayReqType } from '../../types/transaction'; export interface transactionApi { postQrPay(reqData: QrPayReqType): Promise< @@ -6,4 +6,8 @@ export interface transactionApi { transactionId: number; }> >; + + postPayback( + reqData: PaybackReqType + ): Promise>; } diff --git a/src/apis/url.ts b/src/apis/url.ts index 101ec6a..6aa63f3 100644 --- a/src/apis/url.ts +++ b/src/apis/url.ts @@ -1,2 +1,2 @@ -// export const API_BASE_URL = 'http://43.200.46.175:8080'; -export const API_BASE_URL = 'http://localhost:8080'; +export const API_BASE_URL = 'http://43.200.46.175:8080'; +// export const API_BASE_URL = 'http://localhost:8080'; diff --git a/src/components/molecules/ApplicantInfo.tsx b/src/components/molecules/ApplicantInfo.tsx index a528aa2..5053d5d 100644 --- a/src/components/molecules/ApplicantInfo.tsx +++ b/src/components/molecules/ApplicantInfo.tsx @@ -1,15 +1,17 @@ -export const ApplicantInfo = () => { - const time = '13:00'; - const name = '기쁨이'; - const email = 'alpaco1@naver.com'; +interface IProps { + applicant: PeopleType; +} + +export const ApplicantInfo = ({ applicant }: IProps) => { + const time = applicant.startTime.substring(11, 16); return (

{time}

-

{name}

+

{applicant.userName}

-

{email}

+

{applicant.email}

); diff --git a/src/components/molecules/LessonDetail.tsx b/src/components/molecules/LessonDetail.tsx index a8d02f6..a92bc3b 100644 --- a/src/components/molecules/LessonDetail.tsx +++ b/src/components/molecules/LessonDetail.tsx @@ -3,7 +3,7 @@ interface Iprops { } export const LessonDetail = ({ lessonDetail }: Iprops) => { - const category = lessonDetail?.data?.category_name; + const category = lessonDetail?.data?.categoryName; const people = lessonDetail?.data?.capacity; const price = lessonDetail?.data?.price; const place = lessonDetail?.data?.location; diff --git a/src/components/molecules/LessonList.tsx b/src/components/molecules/LessonList.tsx index fa0ce60..5757068 100644 --- a/src/components/molecules/LessonList.tsx +++ b/src/components/molecules/LessonList.tsx @@ -1,6 +1,6 @@ interface LessonListProps { - selectedLesson: HostLessonDetailType[]; - handleLessonDetail: (lesson_id: number) => void; + selectedLesson: HostLessonDetailType[] | MyScheduleType[]; + handleLessonDetail: (lessonId: number) => void; } export const LessonList = ({ @@ -12,9 +12,9 @@ export const LessonList = ({ {selectedLesson.length > 0 ? ( selectedLesson.map((lesson, idx) => (

handleLessonDetail(lesson.lesson_id)} + onClick={() => handleLessonDetail(lesson.lessonId)} > {lesson.title}

diff --git a/src/components/organisms/ApplicantList.tsx b/src/components/organisms/ApplicantList.tsx index 416230a..015cfeb 100644 --- a/src/components/organisms/ApplicantList.tsx +++ b/src/components/organisms/ApplicantList.tsx @@ -1,19 +1,23 @@ import { ApplicantInfo } from '../molecules/ApplicantInfo'; +interface IProps { + applicants: PeopleListType | null; +} -export const ApplicantList = () => { - const capacity = 3; +export const ApplicantList = ({ applicants }: IProps) => { + console.log('신청자list: ', applicants); return (

예약자 정보

-

{capacity} 명

+

+ {applicants?.people.length}/{applicants?.capacity} 명 +

- - - - + {applicants?.people?.map((applicant, index) => ( + + ))}
); diff --git a/src/components/organisms/LessonSlider.tsx b/src/components/organisms/LessonSlider.tsx index 721902b..ad65e04 100644 --- a/src/components/organisms/LessonSlider.tsx +++ b/src/components/organisms/LessonSlider.tsx @@ -4,6 +4,8 @@ import DropdownSingle from '../common/DropdownSingle'; import DropdownDouble from '../common/DropdownDouble'; import { useNavigate } from 'react-router-dom'; import { useModal } from '../../context/ModalContext'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { ApiClient } from '../../apis/apiClient'; interface IProps { data: Array | undefined; @@ -15,25 +17,55 @@ export const LessonSlider = ({ data, show, option }: IProps) => { const navigate = useNavigate(); const { openModal, closeModal } = useModal(); const [activeCard, setActiveCard] = useState(null); + const queryClient = useQueryClient(); + + const cancelLesson = async (reservationId: number) => { + try { + const paybackResponse = await ApiClient.getInstance().postPayback({ + reservationId: reservationId, + }); + + console.log('응답 :', paybackResponse); + + if (paybackResponse.isSuccess) { + const cancelResponse = await ApiClient.getInstance().cancelLesson({ + reservationId: reservationId, + }); + console.log('cancleResponse', cancelResponse); + if (cancelResponse.success) { + openModal('예약이 취소되었습니다', () => + navigate('/mypage/my-lesson-list') + ); + queryClient.invalidateQueries(); + } else { + openModal('예약 취소에 실패하였습니다', closeModal); + } + } else { + openModal('예약 취소에 실패하였습니다', closeModal); + } + } catch (error) { + openModal('예약 취소에 실패하였습니다', closeModal); + } + }; + + const cancelLessonMutation = useMutation({ + mutationFn: (reservationId: number) => cancelLesson(reservationId), + }); const handleModalOpen = (index: number) => { setActiveCard(activeCard === index ? null : index); }; - const handleConfirm = (reservation_id: number) => { - console.log(reservation_id); - // reservation_id 값으로 예약 취소 api 요청 - openModal('예약이 취소되었습니다', () => - navigate('/mypage/my-lesson-list') - ); + const handleConfirm = (reservationId: number) => { + cancelLessonMutation.mutate(reservationId); }; const handleReportConfirm = () => { openModal('신고가 접수되었습니다', closeModal); }; - const handleDelete = (reservation_id: number) => { - openModal('예약을 취소하시겠습니까?', () => handleConfirm(reservation_id)); + const handleDelete = (reservationId: number) => { + openModal('예약을 취소하시겠습니까?', () => handleConfirm(reservationId)); }; const handleReport = () => { @@ -55,14 +87,14 @@ export const LessonSlider = ({ data, show, option }: IProps) => { }, [activeCard]); return ( -
+
{data?.map((myLesson, index) => ( -
+
handleModalOpen(index)} @@ -86,7 +118,7 @@ export const LessonSlider = ({ data, show, option }: IProps) => { text1='예약취소' text2='신고하기' handleClick1={() => { - handleDelete(myLesson.reservation_id); + handleDelete(myLesson.reservationId); }} handleClick2={() => handleReport()} /> diff --git a/src/pages/main/HanaFunMain.tsx b/src/pages/main/HanaFunMain.tsx index baf9792..f209893 100644 --- a/src/pages/main/HanaFunMain.tsx +++ b/src/pages/main/HanaFunMain.tsx @@ -12,7 +12,7 @@ import { AccountPwKeypad } from '../../components/organisms/AccountPwKeypad'; import { Slide } from '../../components/organisms/Slide'; import { QR } from '../../components/molecules/QR'; import { RiQrScan2Line } from 'react-icons/ri'; -import { getCookie } from '../../utils/cookie'; +import { getCookie, setCookie } from '../../utils/cookie'; import { useNavigate } from 'react-router-dom'; import { QRScanner } from '../../components/molecules/QRScanner'; import { useMutation, useQuery } from '@tanstack/react-query'; @@ -30,6 +30,12 @@ export const HanaFunMain = () => { const [showQr, setShowQr] = useState(false); const [isScan, setIsScan] = useState(false); const [active, setActive] = useState(null); + + setCookie( + 'token', + 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiLrrLjshJzsl7AiLCJ1c2VySWQiOjMsImlhdCI6MTcxOTk5MjE3NiwiZXhwIjoxNzE5OTk1Nzc2fQ.pN20QiVk3gAB-5N3a1ffWe7WeKc-ay3Yz7T1ecx7TFY' + ); + const [selectedAccount, setSelectedAccount] = useState({ accountId: -1, accountName: '', diff --git a/src/pages/mypage/HostLessonCalendar.tsx b/src/pages/mypage/HostLessonCalendar.tsx index 7177c00..9d980ed 100644 --- a/src/pages/mypage/HostLessonCalendar.tsx +++ b/src/pages/mypage/HostLessonCalendar.tsx @@ -15,6 +15,7 @@ export const HostLessonCalendar = () => { [] ); const [calendarData, setCalendarData] = useState([]); + const [applicants, setApplicants] = useState(null); // 개설 클래스 상세 api const { data: hostLessonDetail } = useQuery({ @@ -62,12 +63,33 @@ export const HostLessonCalendar = () => { } }, [lesson_id, hostLessonDetail]); - const handleLessonDetail = (lesson_id: number) => { + const handleLessonDetail = async (lesson_id: number) => { const selectedLessonDetail = hostLessonDetail?.data?.find( (lesson: HostLessonDetailType) => lesson.lesson_id === lesson_id ); + if (selectedLessonDetail) { setSelectedLesson([selectedLessonDetail]); + // 예약자 정보 가져오기 + const { lessondateId } = selectedLessonDetail; + try { + console.log('Fetching applicants for lessondate_id:', lessondateId); + console.log; + const response = await ApiClient.getInstance().peopleList({ + lessondateId: lessondateId, + }); + if (response && response.data) { + setApplicants(response.data); + } else { + setApplicants(null); + } + } catch (error) { + console.error('예약자 정보를 가져오는 데 실패했습니다.', error); + setApplicants(null); + } + } else { + console.error('선택한 수업의 세부 정보를 찾을 수 없습니다.'); + setApplicants(null); } }; @@ -102,7 +124,7 @@ export const HostLessonCalendar = () => { selectedLesson={selectedLesson} handleLessonDetail={handleLessonDetail} /> - +

클래스 상세 정보

diff --git a/src/pages/mypage/LessonCalendar.tsx b/src/pages/mypage/LessonCalendar.tsx index 6b44f6c..615df08 100644 --- a/src/pages/mypage/LessonCalendar.tsx +++ b/src/pages/mypage/LessonCalendar.tsx @@ -11,21 +11,30 @@ import { ErrorPage } from '../ErrorPage'; export const LessonCalendar = () => { const navigate = useNavigate(); + const currDate = new Date(); + const currYear = Number(currDate.getFullYear()); + const currMonth = Number(currDate.getMonth()); - const [selectedLesson, setSelectedLesson] = useState([]); + const [selectedLesson, setSelectedLesson] = useState([]); const [selectedLessonId, setSelectedLessonId] = useState(null); const [calendarData, setCalendarData] = useState([]); + // 나의 신청 클래스 api 호출 const { - data: allLessons, + data: mySchedule, isLoading: isLoadingLessons, error: errorLessons, } = useQuery({ - queryKey: ['allLessons'], + queryKey: ['mySchedule', currYear, currMonth], queryFn: async () => { - const response = await ApiClient.getMyLessonAll(); - return response; + const reqData = { + year: currYear, + month: currMonth, + }; + const response = await ApiClient.getInstance().getMySchedule(reqData); + return response.data; }, + retry: 1, }); // lesson 상세 정보 api 호출 @@ -42,23 +51,24 @@ export const LessonCalendar = () => { return response; }, enabled: selectedLessonId !== null, + retry: 1, }); useEffect(() => { - if (allLessons) { - const formattedData = allLessons.map((lesson: LessonType) => ({ - lesson_id: lesson.lesson_id, + if (mySchedule) { + const formattedData = mySchedule.map((lesson: MyScheduleType) => ({ + lesson_id: lesson.lessonId, date: lesson.date, })); setCalendarData(formattedData); } - }, [allLessons]); + }, [mySchedule]); - if (isLoadingLessons) { + if (isLoadingLessons || isLoadingDetail) { return ; } - if (errorLessons) { + if (errorLessons || errorDetail) { return ; } @@ -68,9 +78,9 @@ export const LessonCalendar = () => { { - const selectedLessons = allLessons?.filter((lesson: LessonType) => + const selectedLessons = mySchedule?.filter((lesson: MyScheduleType) => lessons.some( - (selectedLesson) => selectedLesson.lesson_id === lesson.lesson_id + (selectedLesson) => selectedLesson.lesson_id === lesson.lessonId ) ); setSelectedLesson(selectedLessons || []); @@ -80,8 +90,8 @@ export const LessonCalendar = () => {

나의 일정 모아보기

- setSelectedLessonId(lesson_id) + handleLessonDetail={(lessonId: number) => + setSelectedLessonId(lessonId) } />

클래스 상세 정보

diff --git a/src/pages/mypage/MyLessonList.tsx b/src/pages/mypage/MyLessonList.tsx index 3859f4d..28a81c9 100644 --- a/src/pages/mypage/MyLessonList.tsx +++ b/src/pages/mypage/MyLessonList.tsx @@ -8,12 +8,15 @@ import moment from 'moment'; export const MyLessonList = () => { const navigate = useNavigate(); + // 나의 신청 클래스 출력 api 연결 const { data: allLessons } = useQuery({ queryKey: ['allLessons'], queryFn: async () => { - const response = await ApiClient.getMyLessonAll(); - return response; + const response = await ApiClient.getInstance().getMyLessonAll(); + console.log('신청 클래스 api 호출 : ', response.data); + return response.data; }, + retry: 1, }); const today = moment().format('YYYY-MM-DD'); @@ -38,7 +41,7 @@ export const MyLessonList = () => {

수강한 클래스

- +
diff --git a/src/pages/mypage/MyPage.tsx b/src/pages/mypage/MyPage.tsx index abb9396..b639d88 100644 --- a/src/pages/mypage/MyPage.tsx +++ b/src/pages/mypage/MyPage.tsx @@ -20,21 +20,25 @@ const MyPage = () => { return new Intl.NumberFormat('ko-KR').format(value); }; - // data 가져오기 - const { data: myLessons } = useQuery({ + // 마이페이지 출력 api + const { + data: myLessons, + isLoading: listLoading, + error: listError, + } = useQuery({ queryKey: ['myLessons'], queryFn: async () => { - const response = await ApiClient.getMyLesson(); + const response = await ApiClient.getInstance().getMyLesson(); return response; }, }); - const lessons = myLessons?.lessons; + const lessons = myLessons?.data?.lessons; // 하나머니 호출 api const { data: point, - isLoading, - error, + isLoading: moneyLoading, + error: moneyError, } = useQuery({ queryKey: ['point'], queryFn: async () => { @@ -43,11 +47,11 @@ const MyPage = () => { }, }); - if (isLoading) { + if (listLoading || moneyLoading) { return ; } - if (error) { + if (listError || moneyError) { console.log('point error', point); return ; } diff --git a/src/types/commonLesson.d.ts b/src/types/commonLesson.d.ts deleted file mode 100644 index ef0c7af..0000000 --- a/src/types/commonLesson.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -interface CommonLessonType { - lesson_id: number; - title: string; - date: string; -} diff --git a/src/types/lesson.d.ts b/src/types/lesson.d.ts index c6b8a7a..3967ba9 100644 --- a/src/types/lesson.d.ts +++ b/src/types/lesson.d.ts @@ -1,7 +1,7 @@ -export type LessonType = { +interface LessonType { lessonId: number; title: string; -}; +} interface LessonDetailType { lesson_id: number; @@ -12,5 +12,5 @@ interface LessonDetailType { location: string; materials: string; capacity: number; - category_name: string; + categoryName: string; } diff --git a/src/types/myLesson.d.ts b/src/types/myLesson.d.ts deleted file mode 100644 index 72047b5..0000000 --- a/src/types/myLesson.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -interface LessonType extends CommonLessonType { - reservation_id: number; - lessondate_id: number; - lesson_id: number; - image: string; - title: string; - location: string; - date: string; -} - -interface MyLessonType extends LessonType { - point: number; - lessons: LessonType[]; -} diff --git a/src/types/reservation.d.ts b/src/types/reservation.d.ts index c4c70d3..efd0c1c 100644 --- a/src/types/reservation.d.ts +++ b/src/types/reservation.d.ts @@ -4,9 +4,62 @@ interface HostLessonType { title: string; } -interface HostLessonDetailType { +interface HostLessonDetailType extends MyScheduleType { lessondateId: number; date: string; lessonId: number; title: string; } + +interface LessonType { + reservationId: number; + lessondate_id: number; + lessonId: number; + image: string; + title: string; + location: string; + date: string; + categoryName: string; +} + +interface MyLessonType extends LessonType { + point: number; + lessons: LessonType[]; +} + +interface MyScheduleType { + reservation_id: number; + lessonId: number; + date: string; + title: string; +} + +interface CancelLessonReqType { + reservationId: number; +} + +interface MyScheduleReqType { + year: number; + month: number; +} + +interface PeopleType { + startTime: string; + userName: string; + email: string; +} + +interface PeopleListType extends PeopleType { + applicant: number; + capacity: number; + people: PeopleType[]; +} + +interface PeopleListReqType { + lessondateId: number; +} + +interface CancleLessonResType { + message: string; + success: boolean; +} diff --git a/src/types/transaction.d.ts b/src/types/transaction.d.ts index c9f2538..a9bc2cb 100644 --- a/src/types/transaction.d.ts +++ b/src/types/transaction.d.ts @@ -5,3 +5,7 @@ export type QrPayReqType = { lessondateId: number; payment: number; }; + +interface PaybackReqType { + reservationId: number; +}