From 16feeb9d18fefad03171fd88aeebc0d420dc2a11 Mon Sep 17 00:00:00 2001 From: SuJin Date: Thu, 4 Jan 2024 14:52:39 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EC=98=88=EC=95=BD=EC=9E=90=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EB=9C=A8=EB=8F=84=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReservationCheck/ReservationItem.tsx | 15 ++++++++++++++- client/src/components/ReservationCheck/index.tsx | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/client/src/components/ReservationCheck/ReservationItem.tsx b/client/src/components/ReservationCheck/ReservationItem.tsx index 031f960..ae02a24 100644 --- a/client/src/components/ReservationCheck/ReservationItem.tsx +++ b/client/src/components/ReservationCheck/ReservationItem.tsx @@ -19,6 +19,8 @@ interface Props { endTime: string; room: string; patrons: PatronInfo[]; + patron: string; + authName: string; reserveId: number; } @@ -28,6 +30,8 @@ const ReservationItem = ({ endTime, room, patrons, + patron, + authName, reserveId, }: Props) => { const { isMount, handleOpen, handleClose, isTransition } = useTransition(); @@ -80,7 +84,14 @@ const ReservationItem = ({
{formatDateRange(beginTime, endTime)} - {room} + + {room} + {patron !== authName && ( + + {' 예약자: ' + patron} + + )} + {patrons.map((el, idx) => { return ( @@ -143,6 +154,8 @@ const DateBox = styled.div` const PlaceBox = styled.div` margin-top: 5px; ${TYPO.text3.Reg}; + display: flex; + align-items: center; `; const PeopleBox = styled.div` diff --git a/client/src/components/ReservationCheck/index.tsx b/client/src/components/ReservationCheck/index.tsx index d7c9a03..d958d91 100644 --- a/client/src/components/ReservationCheck/index.tsx +++ b/client/src/components/ReservationCheck/index.tsx @@ -45,7 +45,9 @@ const ReservationCheck = () => { endTime={el.endTime} room={el.room.name} patrons={el.patrons} + patron={el.patron.name} reserveId={el.id} + authName={authInfo?.name} /> )) From 17e93b845913511ddd02309236a6ab6d2499aef8 Mon Sep 17 00:00:00 2001 From: SuJin Date: Thu, 4 Jan 2024 15:01:01 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20api=20=ED=8C=8C=EB=9D=BC=EB=AF=B8?= =?UTF-8?q?=ED=84=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/apis/ReserveData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/apis/ReserveData.ts b/client/src/apis/ReserveData.ts index f4b9736..f1ecf6e 100644 --- a/client/src/apis/ReserveData.ts +++ b/client/src/apis/ReserveData.ts @@ -2,7 +2,7 @@ import { ReservationData } from '@/@types/ReservationList'; import axios from 'axios'; export const getReservationData = async (AccessToken?: string) => { - const apiUrl = `${process.env.NEXT_PUBLIC_RESERVATION_CHECK}`; + const apiUrl = `${process.env.NEXT_PUBLIC_RESERVATION_CHECK}?includeCompanion=true`; const headers = { Accept: 'application/json, text/plain, */*', 'pyxis-auth-token': `${AccessToken}`, //로그인 후 발급받은 토큰