From a6926476b48e77c0bf4762352f3c53a730cce322 Mon Sep 17 00:00:00 2001 From: psyeon1120 Date: Wed, 1 Nov 2023 03:30:13 +0900 Subject: [PATCH] =?UTF-8?q?[PDW-66]=20feat:=20=ED=9A=8C=EC=9D=98=EC=8B=A4?= =?UTF-8?q?=20=ED=99=9C=EC=84=B1/=EB=B9=84=ED=99=9C=EC=84=B1=20API=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manager/officeManage/OfficeManage.js | 10 +++++--- .../officeManage/OfficeManageTableCell.js | 25 ++++++++++++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/pages/manager/officeManage/OfficeManage.js b/src/pages/manager/officeManage/OfficeManage.js index 2b51f47..44b0464 100644 --- a/src/pages/manager/officeManage/OfficeManage.js +++ b/src/pages/manager/officeManage/OfficeManage.js @@ -1,7 +1,7 @@ import React from "react"; import { useState, useEffect } from "react"; import { RightContainer, TitleText, WhiteContainer } from "components/rightContainer/RightContainer"; -import { Bar, BookedTable, BookedThead, TableContainer } from "../../booking/bookedList/BookedList"; +import {Bar, BookedTable, BookedThead, NoLineTr, TableContainer} from "../../booking/bookedList/BookedList"; import OfficeManageTableCell from "./OfficeManageTableCell"; import ManageSearchBar from "components/searchBar/ManageSearchBar"; import { getToken } from "utils/IsLoginUtil"; @@ -49,15 +49,16 @@ function OfficeManage(props) { 회의실명 위치 - 수용인원 + 수용인원 설명 + { offices.length === 0 ? - + 회의실 내역이 없습니다. - + : offices.map((office) => )} diff --git a/src/pages/manager/officeManage/OfficeManageTableCell.js b/src/pages/manager/officeManage/OfficeManageTableCell.js index b8da2d6..47ecc6c 100644 --- a/src/pages/manager/officeManage/OfficeManageTableCell.js +++ b/src/pages/manager/officeManage/OfficeManageTableCell.js @@ -1,18 +1,31 @@ import React from 'react'; -import { Link } from 'react-router-dom'; -import { BookedLineTr } from '../../booking/bookedList/BookedList'; - - - +import {Link} from 'react-router-dom'; +import {BookedLineTr} from '../../booking/bookedList/BookedList'; +import {Toggle} from "../../../components/toggle/Toggle"; +import {AdminBookingOfficeAxios} from "../../../api/AxiosApi"; +import {getToken} from "../../../utils/IsLoginUtil"; +import {basicError} from "../../../utils/ErrorHandlerUtil"; function OfficeManageTableCell(props) { + const changeToggle = (isEnable) => { + AdminBookingOfficeAxios.patch(`/${props.id}/activation`, null, { + headers: { + Authorization: getToken() + } + }) + .then((Response) => { }) + .catch((error) => {basicError(error)}) + console.log(isEnable) + } + return ( {props.name} {props.location} - {props.capacity} + {props.capacity} {props.description} + ) }