From 2e0328f3f22dfbdc89612dfee69b5e8069eae5ee Mon Sep 17 00:00:00 2001 From: chayoosang Date: Wed, 11 Oct 2023 14:52:05 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[PDW-54]=20fix:=20=EC=9E=90=EC=9B=90=20?= =?UTF-8?q?=EC=98=88=EC=95=BD=20=EC=B9=B4=EB=93=9C=20=ED=81=B4=EB=A6=AD?= =?UTF-8?q?=EC=8B=9C=20=EC=83=81=EC=84=B8=20=EC=98=88=EC=95=BD=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EB=A1=9C=20=EB=84=98=EC=96=B4=EA=B0=80?= =?UTF-8?q?=EA=B2=8C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/resourceInfo/ResourceInfo.js | 11 ++++++++++- src/pages/booking/selectResource/SelectResource.js | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/resourceInfo/ResourceInfo.js b/src/components/resourceInfo/ResourceInfo.js index f8769fa..5aa85c1 100644 --- a/src/components/resourceInfo/ResourceInfo.js +++ b/src/components/resourceInfo/ResourceInfo.js @@ -3,6 +3,7 @@ import styled from "styled-components" import Example from '../../assets/images/example.png' import Capsule from "components/capsule/Capsule"; import { ResourceCard, CardText, DetailContainer, ResourceCardImage, InfoContainer, DescriptionContainer, OfficeContentText, ResourceTitle } from "components/card/Card"; +import { useNavigate } from "react-router-dom"; // 자원명 컨테이너 const ResourceTitleContainer = styled.div` @@ -12,9 +13,17 @@ const ResourceTitleContainer = styled.div` ` + + + function ResourceInfo(props) { + const moveToDetail = () => { + window.location.href = "/resourceBooking/"+props.resourceId + } + + return ( - + diff --git a/src/pages/booking/selectResource/SelectResource.js b/src/pages/booking/selectResource/SelectResource.js index e612e42..87150fc 100644 --- a/src/pages/booking/selectResource/SelectResource.js +++ b/src/pages/booking/selectResource/SelectResource.js @@ -5,6 +5,7 @@ import React, { useState, useEffect } from "react"; import styled from "styled-components"; import ResourceInfo from "components/resourceInfo/ResourceInfo"; import { ResourcesAxios } from "api/AxiosApi"; +import { useNavigate } from "react-router-dom"; export const SearchTitleContainer = styled.div` @@ -61,6 +62,7 @@ export const SearchDateInput = styled.input` ` function SelectResource(props) { + const navigate = useNavigate(); const [resourceList, setResourceList] = useState([]); const [resourceName, setResourceName] = useState(""); @@ -118,7 +120,7 @@ function SelectResource(props) {
- {resourceList.length === 0 ? : resourceList.map((resource) => )} + {resourceList.length === 0 ? : resourceList.map((resource, index) => )}
From 384504694677d233c2e79969739ed6e153350bdf Mon Sep 17 00:00:00 2001 From: chayoosang Date: Wed, 11 Oct 2023 15:00:09 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[PDW-54]=20fix:=20Link=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=20=ED=9B=84=20window.location.href=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OfficeBookingManageCell.js | 26 ++++------- .../ResourceBookingManageCell.js | 45 ++++--------------- 2 files changed, 16 insertions(+), 55 deletions(-) diff --git a/src/pages/manager/officeBookingManage/OfficeBookingManageCell.js b/src/pages/manager/officeBookingManage/OfficeBookingManageCell.js index 97150e9..346ea44 100644 --- a/src/pages/manager/officeBookingManage/OfficeBookingManageCell.js +++ b/src/pages/manager/officeBookingManage/OfficeBookingManageCell.js @@ -49,31 +49,21 @@ function OfficeBookingManageCell(props) { } }; + const moveToDetail = () => { + window.location.href = `/manage/officeBooking/${props.id}` + }; + + var status = findStatus(props.status) var cancelButton = ( - - 상세보기 - ) + 상세보기) + var usingButton = ( - 반려 | 상세보기 + 반려 |상세보기 ) return ( diff --git a/src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js b/src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js index 897c07c..d8ec5a7 100644 --- a/src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js +++ b/src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js @@ -96,53 +96,24 @@ function ResourceBookingManageCell(props) { } }; + const moveToDetail = () => { + window.location.href = `/manage/resourceBooking/${props.id}` + }; var status = findStatus(props.status) var watingButton = ( - 허가 | 반려 | - - - 상세보기 - - + 허가 | 반려 | 상세보기 ) + var cancelButton = ( - - - - 상세보기 - - - ) + 상세보기) + var usingButton = ( - 반납 | - - - 상세보기 - - + 반납 | 상세보기 ) return (