From 4d9adf8e8adae1bcb78de48d49f9100801d89d89 Mon Sep 17 00:00:00 2001 From: psyeon1120 Date: Wed, 1 Nov 2023 17:35:56 +0900 Subject: [PATCH 1/6] =?UTF-8?q?[PDW-67]=20fix:=20=EB=A9=94=EB=89=B4=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/Path.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/Path.js b/src/constants/Path.js index 759a4f7..62ad8de 100644 --- a/src/constants/Path.js +++ b/src/constants/Path.js @@ -32,7 +32,7 @@ export const ADMIN_MENUS = [ { name: '직원 관리', path: '/manage/users' }, { name: '회의실 관리', path: '/manage/offices' }, { name: '장비 관리', path: '/manage/resources' }, - { name: '회의실예약 관리', path: '/manage/officeBooking' }, + { name: '회의실 예약 관리', path: '/manage/officeBooking' }, { name: '장비 예약 관리', path: '/manage/resourceBooking' }, { name: '차량 예약 관리', path: '/manage/carBooking' } ] From b0168cdb8ce18bbbb4ac1020b80abccdc749a983 Mon Sep 17 00:00:00 2001 From: psyeon1120 Date: Fri, 3 Nov 2023 01:41:20 +0900 Subject: [PATCH 2/6] =?UTF-8?q?[PDW-67]=20rename:=20path=20manager=20->=20?= =?UTF-8?q?admin=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 22 +++++++++--------- src/constants/Path.js | 14 +++++------ .../OfficeBookingManageCell.js | 23 ++++++------------- .../manager/officeManage/OfficeManage.js | 2 +- .../officeManage/OfficeManageTableCell.js | 2 +- .../ResourceBookingManageCell.js | 6 +---- .../manager/resourceManage/ResourceManage.js | 2 +- .../resourceManage/ResourceManageAdd.js | 4 ++-- .../resourceManage/ResourceManageDetail.js | 2 +- .../resourceManage/ResourceManageTableCell.js | 2 +- 10 files changed, 33 insertions(+), 46 deletions(-) diff --git a/src/App.js b/src/App.js index d528c49..6f3eebb 100644 --- a/src/App.js +++ b/src/App.js @@ -39,17 +39,17 @@ function App() { } /> } /> } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> diff --git a/src/constants/Path.js b/src/constants/Path.js index 62ad8de..9270125 100644 --- a/src/constants/Path.js +++ b/src/constants/Path.js @@ -29,16 +29,16 @@ export const MAIN_MENUS = [ ] export const ADMIN_MENUS = [ - { name: '직원 관리', path: '/manage/users' }, - { name: '회의실 관리', path: '/manage/offices' }, - { name: '장비 관리', path: '/manage/resources' }, - { name: '회의실 예약 관리', path: '/manage/officeBooking' }, - { name: '장비 예약 관리', path: '/manage/resourceBooking' }, - { name: '차량 예약 관리', path: '/manage/carBooking' } + { name: '직원 관리', path: '/admin/users' }, + { name: '회의실 관리', path: '/admin/offices' }, + { name: '장비 관리', path: '/admin/resources' }, + { name: '회의실 예약 관리', path: '/admin/officeBooking' }, + { name: '장비 예약 관리', path: '/admin/resourceBooking' }, + { name: '차량 예약 관리', path: '/admin/carBooking' } ] export const ADMIN_MAIN_MENUS = [ - { name: '관리자', path: '/manage/users', subMenus: ADMIN_MENUS, icons: [AdminActiveIcon, AdminInactiveIcon] } + { name: '관리자', path: '/admin/users', subMenus: ADMIN_MENUS, icons: [AdminActiveIcon, AdminInactiveIcon] } ] export const MAIN_PATH = '/officeBooking' diff --git a/src/pages/manager/officeBookingManage/OfficeBookingManageCell.js b/src/pages/manager/officeBookingManage/OfficeBookingManageCell.js index 93e442d..94cf736 100644 --- a/src/pages/manager/officeBookingManage/OfficeBookingManageCell.js +++ b/src/pages/manager/officeBookingManage/OfficeBookingManageCell.js @@ -1,11 +1,11 @@ import React from 'react'; -import { BookedLineTr } from '../../booking/bookedList/BookedList'; -import { StatusCircle, StatusContainer, StatusText } from 'components/booking/StatusTag'; -import { USING, findStatus, BOOKED } from 'constants/BookingStatus'; -import { AdminBookingAxios } from 'api/AxiosApi'; +import {BookedLineTr} from '../../booking/bookedList/BookedList'; +import {StatusCircle, StatusContainer, StatusText} from 'components/booking/StatusTag'; +import {BOOKED, findStatus} from 'constants/BookingStatus'; +import {AdminBookingAxios} from 'api/AxiosApi'; import styled from 'styled-components'; -import { getToken } from 'utils/IsLoginUtil'; -import { basicError } from 'utils/ErrorHandlerUtil'; +import {getToken} from 'utils/IsLoginUtil'; +import {basicError} from 'utils/ErrorHandlerUtil'; export const SettingButtonContainer = styled.div` display: flex; @@ -24,13 +24,8 @@ export const SettingButton = styled.button` background: none; border: none; cursor: pointer; - ` - - - - function OfficeBookingManageCell(props) { const rejectResource = () => { if (window.confirm(`${props.name}의 예약을 반려하시겠습니까?`)) @@ -53,13 +48,9 @@ function OfficeBookingManageCell(props) { }; const moveToDetail = () => { - window.location.href = `/manage/officeBooking/${props.id}` + window.location.href = `/admin/officeBooking/${props.id}` }; - - - - var status = findStatus(props.status) var cancelButton = ( 상세보기) diff --git a/src/pages/manager/officeManage/OfficeManage.js b/src/pages/manager/officeManage/OfficeManage.js index 14128e8..5e35b39 100644 --- a/src/pages/manager/officeManage/OfficeManage.js +++ b/src/pages/manager/officeManage/OfficeManage.js @@ -31,7 +31,7 @@ function OfficeManage(props) { }, []) const moveToAdd = () => { - window.location.href = `/manage/offices/add` + window.location.href = `/admin/offices/add` } diff --git a/src/pages/manager/officeManage/OfficeManageTableCell.js b/src/pages/manager/officeManage/OfficeManageTableCell.js index 47ecc6c..2eee00a 100644 --- a/src/pages/manager/officeManage/OfficeManageTableCell.js +++ b/src/pages/manager/officeManage/OfficeManageTableCell.js @@ -21,7 +21,7 @@ function OfficeManageTableCell(props) { return ( - {props.name} + {props.name} {props.location} {props.capacity} {props.description} diff --git a/src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js b/src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js index a820cc5..e72461d 100644 --- a/src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js +++ b/src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js @@ -80,13 +80,9 @@ function ResourceBookingManageCell(props) { }; const moveToDetail = () => { - window.location.href = `/manage/resourceBooking/${props.id}` + window.location.href = `/admin/resourceBooking/${props.id}` }; - - - - var status = findStatus(props.status) var watingButton = ( diff --git a/src/pages/manager/resourceManage/ResourceManage.js b/src/pages/manager/resourceManage/ResourceManage.js index 302380f..0ca9377 100644 --- a/src/pages/manager/resourceManage/ResourceManage.js +++ b/src/pages/manager/resourceManage/ResourceManage.js @@ -33,7 +33,7 @@ function ResourceManage(props) { }, []) const moveToAdd = () => { - window.location.href = `/manage/resources/add` + window.location.href = `/admin/resources/add` } diff --git a/src/pages/manager/resourceManage/ResourceManageAdd.js b/src/pages/manager/resourceManage/ResourceManageAdd.js index d859e46..1cd6712 100644 --- a/src/pages/manager/resourceManage/ResourceManageAdd.js +++ b/src/pages/manager/resourceManage/ResourceManageAdd.js @@ -313,7 +313,7 @@ function ResourceManageAdd(props) { }) .then((Response) => { alert("장비 등록이 완료되었습니다."); - window.location.href = `/manage/resources` + window.location.href = `/admin/resources` }) .catch((error) => { basicError(error) @@ -337,7 +337,7 @@ function ResourceManageAdd(props) { }) .then((Response) => { alert("장비 수정이 완료되었습니다."); - window.location.href = `/manage/resources/${resourceId}` + window.location.href = `/admin/resources/${resourceId}` }) .catch((error) => { basicError(error) diff --git a/src/pages/manager/resourceManage/ResourceManageDetail.js b/src/pages/manager/resourceManage/ResourceManageDetail.js index 0f50277..1fee8b7 100644 --- a/src/pages/manager/resourceManage/ResourceManageDetail.js +++ b/src/pages/manager/resourceManage/ResourceManageDetail.js @@ -136,7 +136,7 @@ function ResourceManageDetail() { 더보기 - { window.location.href = `/manage/resources/edit/${resourceId}` }}>수정 + { window.location.href = `/admin/resources/edit/${resourceId}` }}>수정 삭제 diff --git a/src/pages/manager/resourceManage/ResourceManageTableCell.js b/src/pages/manager/resourceManage/ResourceManageTableCell.js index 50f0e7c..49c1413 100644 --- a/src/pages/manager/resourceManage/ResourceManageTableCell.js +++ b/src/pages/manager/resourceManage/ResourceManageTableCell.js @@ -21,7 +21,7 @@ function ResourceManageTableCell(props) { return ( - {props.name} + {props.name} {props.location} {props.user}({props.userPhone}) {props.description} From d0b41b11f0a720638e688bf1cced0b0466f6716e Mon Sep 17 00:00:00 2001 From: psyeon1120 Date: Fri, 3 Nov 2023 01:53:28 +0900 Subject: [PATCH 3/6] =?UTF-8?q?[PDW-67]=20refactor:=20=ED=8F=B4=EB=8D=94?= =?UTF-8?q?=20=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 32 ++-- .../officeBooking/BookingTimeBar.js | 2 +- .../office}/OfficeBookingManageDetail.js | 4 +- .../office}/OfficeManage.js | 2 +- .../office}/OfficeManageTableCell.js | 2 +- .../officeBookings}/OfficeBookingManage.js | 2 +- .../OfficeBookingManageCell.js | 2 +- .../resource}/ResourceManage.js | 2 +- .../resource}/ResourceManageAdd.js | 2 +- .../resource}/ResourceManageDetail.js | 2 +- .../resource}/ResourceManageTableCell.js | 2 +- .../ResourceBookingManage.js | 2 +- .../ResourceBookingManageCell.js | 4 +- .../userManage => admin/user}/UserManage.js | 4 +- .../user}/UserManageLine.js | 2 +- .../userManage => admin/user}/UserModal.js | 0 .../user}/UserMoreModal.js | 0 .../booking/office}/OfficeBooking.js | 2 +- .../booking/office}/OfficeBookingCheck.js | 2 +- .../booking/office}/SelectOffice.js | 12 +- .../booking/resource}/CustomCalendar.css | 0 .../booking/resource}/ResourceBooking.js | 4 +- .../booking/resource}/ResourceBookingCheck.js | 2 +- .../basic/booking/resource/SelectResource.js | 153 ++++++++++++++++++ .../myBookings}/BookedLine.js | 0 .../myBookings}/BookedList.js | 0 src/pages/{ => basic}/user/Login.js | 0 .../booking/selectResource/SelectResource.js | 136 ---------------- 28 files changed, 197 insertions(+), 180 deletions(-) rename src/pages/{manager/officeManage => admin/office}/OfficeBookingManageDetail.js (97%) rename src/pages/{manager/officeManage => admin/office}/OfficeManage.js (98%) rename src/pages/{manager/officeManage => admin/office}/OfficeManageTableCell.js (94%) rename src/pages/{manager/officeBookingManage => admin/officeBookings}/OfficeBookingManage.js (98%) rename src/pages/{manager/officeBookingManage => admin/officeBookings}/OfficeBookingManageCell.js (97%) rename src/pages/{manager/resourceManage => admin/resource}/ResourceManage.js (98%) rename src/pages/{manager/resourceManage => admin/resource}/ResourceManageAdd.js (99%) rename src/pages/{manager/resourceManage => admin/resource}/ResourceManageDetail.js (99%) rename src/pages/{manager/resourceManage => admin/resource}/ResourceManageTableCell.js (94%) rename src/pages/{manager/resourceBookingManage => admin/resourceBookings}/ResourceBookingManage.js (98%) rename src/pages/{manager/resourceBookingManage => admin/resourceBookings}/ResourceBookingManageCell.js (97%) rename src/pages/{manager/userManage => admin/user}/UserManage.js (97%) rename src/pages/{manager/userManage => admin/user}/UserManageLine.js (93%) rename src/pages/{manager/userManage => admin/user}/UserModal.js (100%) rename src/pages/{manager/userManage => admin/user}/UserMoreModal.js (100%) rename src/pages/{booking/officeBooking => basic/booking/office}/OfficeBooking.js (99%) rename src/pages/{booking/officeBooking => basic/booking/office}/OfficeBookingCheck.js (99%) rename src/pages/{booking/selectOffice => basic/booking/office}/SelectOffice.js (90%) rename src/pages/{booking/resourceBooking => basic/booking/resource}/CustomCalendar.css (100%) rename src/pages/{booking/resourceBooking => basic/booking/resource}/ResourceBooking.js (98%) rename src/pages/{booking/resourceBooking => basic/booking/resource}/ResourceBookingCheck.js (99%) create mode 100644 src/pages/basic/booking/resource/SelectResource.js rename src/pages/{booking/bookedList => basic/myBookings}/BookedLine.js (100%) rename src/pages/{booking/bookedList => basic/myBookings}/BookedList.js (100%) rename src/pages/{ => basic}/user/Login.js (100%) delete mode 100644 src/pages/booking/selectResource/SelectResource.js diff --git a/src/App.js b/src/App.js index 6f3eebb..4399856 100644 --- a/src/App.js +++ b/src/App.js @@ -1,22 +1,22 @@ import 'App.css'; import {Outlet, Route, Routes} from 'react-router-dom'; import Sidebar from 'components/sidebar/Sidebar'; -import Login from 'pages/user/Login'; -import SelectOffice from 'pages/booking/selectOffice/SelectOffice'; -import BookedList from 'pages/booking/bookedList/BookedList'; -import OfficeBooking from 'pages/booking/officeBooking/OfficeBooking'; -import SelectResource from 'pages/booking/selectResource/SelectResource'; -import ResourceBooking from 'pages/booking/resourceBooking/ResourceBooking'; -import OfficeManage from 'pages/manager/officeManage/OfficeManage'; -import OfficeBookingCheck from 'pages/booking/officeBooking/OfficeBookingCheck'; -import ResourceBookingManage from 'pages/manager/resourceBookingManage/ResourceBookingManage'; -import ResourceBookingCheck from 'pages/booking/resourceBooking/ResourceBookingCheck' -import OfficeBookingManage from 'pages/manager/officeBookingManage/OfficeBookingManage'; -import UserManage from 'pages/manager/userManage/UserManage'; -import ResourceManage from 'pages/manager/resourceManage/ResourceManage'; -import ResourceManageAdd from "./pages/manager/resourceManage/ResourceManageAdd"; -import ResourceManageDetail from 'pages/manager/resourceManage/ResourceManageDetail'; -import OfficeManageDetail from 'pages/manager/officeManage/OfficeBookingManageDetail'; +import Login from 'pages/basic/user/Login'; +import SelectOffice from 'pages/basic/booking/office/SelectOffice'; +import BookedList from 'pages/basic/myBookings/BookedList'; +import OfficeBooking from 'pages/basic/booking/office/OfficeBooking'; +import SelectResource from 'pages/basic/booking/resource/SelectResource'; +import ResourceBooking from 'pages/basic/booking/resource/ResourceBooking'; +import OfficeManage from 'pages/admin/office/OfficeManage'; +import OfficeBookingCheck from 'pages/basic/booking/office/OfficeBookingCheck'; +import ResourceBookingManage from 'pages/admin/resourceBookings/ResourceBookingManage'; +import ResourceBookingCheck from 'pages/basic/booking/resource/ResourceBookingCheck' +import OfficeBookingManage from 'pages/admin/officeBookings/OfficeBookingManage'; +import UserManage from 'pages/admin/user/UserManage'; +import ResourceManage from 'pages/admin/resource/ResourceManage'; +import ResourceManageAdd from "./pages/admin/resource/ResourceManageAdd"; +import ResourceManageDetail from 'pages/admin/resource/ResourceManageDetail'; +import OfficeManageDetail from 'pages/admin/office/OfficeBookingManageDetail'; function App() { diff --git a/src/components/officeBooking/BookingTimeBar.js b/src/components/officeBooking/BookingTimeBar.js index f61bc52..96cb687 100644 --- a/src/components/officeBooking/BookingTimeBar.js +++ b/src/components/officeBooking/BookingTimeBar.js @@ -1,7 +1,7 @@ import React from 'react'; import { useState } from 'react' import styled from "styled-components" -import { setStartTimeStr, setEndTimeStr } from 'pages/booking/officeBooking/OfficeBooking'; +import { setStartTimeStr, setEndTimeStr } from 'pages/basic/booking/office/OfficeBooking'; var bookingState = [ false, false, false, false, false, false, false, false, false, false, false, false, diff --git a/src/pages/manager/officeManage/OfficeBookingManageDetail.js b/src/pages/admin/office/OfficeBookingManageDetail.js similarity index 97% rename from src/pages/manager/officeManage/OfficeBookingManageDetail.js rename to src/pages/admin/office/OfficeBookingManageDetail.js index 462fa9c..209082f 100644 --- a/src/pages/manager/officeManage/OfficeBookingManageDetail.js +++ b/src/pages/admin/office/OfficeBookingManageDetail.js @@ -4,12 +4,12 @@ import { useState, useEffect } from "react"; import { useParams } from 'react-router-dom'; import Capsule from 'components/capsule/Capsule'; import { basicError } from 'utils/ErrorHandlerUtil'; -import { Bar } from 'pages/booking/bookedList/BookedList'; +import { Bar } from 'pages/basic/myBookings/BookedList'; import { RightContainer, WhiteContainer,TitleText } from 'components/rightContainer/RightContainer'; import { MainTextContainer, SubTextContainer, SelectedSubTitleText, UnselectedSubTitleText } from 'components/officeBooking/SubTitleBar'; import { getToken } from 'utils/IsLoginUtil'; import MoreButtonIcon from "../../../assets/images/button/triple_dot_icon.svg" -import { MoreButton, OptionButton, OptionsView, InfoTable, InfoTableData } from '../resourceManage/ResourceManageDetail'; +import { MoreButton, OptionButton, OptionsView, InfoTable, InfoTableData } from '../resource/ResourceManageDetail'; import OfficeInfo from 'components/officeInfo/OfficeInfo'; function OfficeManageDetail() { diff --git a/src/pages/manager/officeManage/OfficeManage.js b/src/pages/admin/office/OfficeManage.js similarity index 98% rename from src/pages/manager/officeManage/OfficeManage.js rename to src/pages/admin/office/OfficeManage.js index 5e35b39..f2329e5 100644 --- a/src/pages/manager/officeManage/OfficeManage.js +++ b/src/pages/admin/office/OfficeManage.js @@ -1,6 +1,6 @@ import React, {useEffect, useState} from "react"; import {RightContainer, TitleText, WhiteContainer} from "components/rightContainer/RightContainer"; -import {Bar, BookedTable, BookedThead, NoLineTr, TableContainer} from "../../booking/bookedList/BookedList"; +import {Bar, BookedTable, BookedThead, NoLineTr, TableContainer} from "../../basic/myBookings/BookedList"; import OfficeManageTableCell from "./OfficeManageTableCell"; import ManageSearchBar from "components/searchBar/ManageSearchBar"; import {getToken} from "utils/IsLoginUtil"; diff --git a/src/pages/manager/officeManage/OfficeManageTableCell.js b/src/pages/admin/office/OfficeManageTableCell.js similarity index 94% rename from src/pages/manager/officeManage/OfficeManageTableCell.js rename to src/pages/admin/office/OfficeManageTableCell.js index 2eee00a..03ceaca 100644 --- a/src/pages/manager/officeManage/OfficeManageTableCell.js +++ b/src/pages/admin/office/OfficeManageTableCell.js @@ -1,6 +1,6 @@ import React from 'react'; import {Link} from 'react-router-dom'; -import {BookedLineTr} from '../../booking/bookedList/BookedList'; +import {BookedLineTr} from '../../basic/myBookings/BookedList'; import {Toggle} from "../../../components/toggle/Toggle"; import {AdminBookingOfficeAxios} from "../../../api/AxiosApi"; import {getToken} from "../../../utils/IsLoginUtil"; diff --git a/src/pages/manager/officeBookingManage/OfficeBookingManage.js b/src/pages/admin/officeBookings/OfficeBookingManage.js similarity index 98% rename from src/pages/manager/officeBookingManage/OfficeBookingManage.js rename to src/pages/admin/officeBookings/OfficeBookingManage.js index 015b43b..1857d45 100644 --- a/src/pages/manager/officeBookingManage/OfficeBookingManage.js +++ b/src/pages/admin/officeBookings/OfficeBookingManage.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, TableContainer } from "../../basic/myBookings/BookedList"; import OfficeBookingManageCell from "./OfficeBookingManageCell"; import { AdminBookingAxios } from "api/AxiosApi"; import styled from "styled-components"; diff --git a/src/pages/manager/officeBookingManage/OfficeBookingManageCell.js b/src/pages/admin/officeBookings/OfficeBookingManageCell.js similarity index 97% rename from src/pages/manager/officeBookingManage/OfficeBookingManageCell.js rename to src/pages/admin/officeBookings/OfficeBookingManageCell.js index 94cf736..d0285cf 100644 --- a/src/pages/manager/officeBookingManage/OfficeBookingManageCell.js +++ b/src/pages/admin/officeBookings/OfficeBookingManageCell.js @@ -1,5 +1,5 @@ import React from 'react'; -import {BookedLineTr} from '../../booking/bookedList/BookedList'; +import {BookedLineTr} from '../../basic/myBookings/BookedList'; import {StatusCircle, StatusContainer, StatusText} from 'components/booking/StatusTag'; import {BOOKED, findStatus} from 'constants/BookingStatus'; import {AdminBookingAxios} from 'api/AxiosApi'; diff --git a/src/pages/manager/resourceManage/ResourceManage.js b/src/pages/admin/resource/ResourceManage.js similarity index 98% rename from src/pages/manager/resourceManage/ResourceManage.js rename to src/pages/admin/resource/ResourceManage.js index 0ca9377..fa8bab1 100644 --- a/src/pages/manager/resourceManage/ResourceManage.js +++ b/src/pages/admin/resource/ResourceManage.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, NoLineTr, TableContainer} from "../../booking/bookedList/BookedList"; +import {Bar, BookedTable, BookedThead, NoLineTr, TableContainer} from "../../basic/myBookings/BookedList"; import ResourceManageTableCell from "./ResourceManageTableCell"; import ManageSearchBar from "components/searchBar/ManageSearchBar"; import { getToken } from "utils/IsLoginUtil"; diff --git a/src/pages/manager/resourceManage/ResourceManageAdd.js b/src/pages/admin/resource/ResourceManageAdd.js similarity index 99% rename from src/pages/manager/resourceManage/ResourceManageAdd.js rename to src/pages/admin/resource/ResourceManageAdd.js index 1cd6712..2aaa7b4 100644 --- a/src/pages/manager/resourceManage/ResourceManageAdd.js +++ b/src/pages/admin/resource/ResourceManageAdd.js @@ -2,7 +2,7 @@ import React,{ useState, useEffect, useRef } from "react"; import styled from "styled-components"; import { RightContainer, TitleText, WhiteContainer } from "components/rightContainer/RightContainer"; -import { Bar } from "../../booking/bookedList/BookedList"; +import { Bar } from "../../basic/myBookings/BookedList"; import { ManageAddButton, ManageAddButtonImage, ManageAddButtonLabel } from "components/searchBar/ManageSearchBar"; import { getToken } from "utils/IsLoginUtil"; diff --git a/src/pages/manager/resourceManage/ResourceManageDetail.js b/src/pages/admin/resource/ResourceManageDetail.js similarity index 99% rename from src/pages/manager/resourceManage/ResourceManageDetail.js rename to src/pages/admin/resource/ResourceManageDetail.js index 1fee8b7..f68b750 100644 --- a/src/pages/manager/resourceManage/ResourceManageDetail.js +++ b/src/pages/admin/resource/ResourceManageDetail.js @@ -5,7 +5,7 @@ import { useState, useEffect } from "react"; import { useParams } from 'react-router-dom'; import Capsule from 'components/capsule/Capsule'; import { basicError } from 'utils/ErrorHandlerUtil'; -import { Bar } from 'pages/booking/bookedList/BookedList'; +import { Bar } from 'pages/basic/myBookings/BookedList'; import { RightContainer, WhiteContainer,TitleText } from 'components/rightContainer/RightContainer'; import { MainTextContainer, SubTextContainer, SelectedSubTitleText, UnselectedSubTitleText } from 'components/officeBooking/SubTitleBar'; import ResourceInfo from 'components/resourceInfo/ResourceInfo'; diff --git a/src/pages/manager/resourceManage/ResourceManageTableCell.js b/src/pages/admin/resource/ResourceManageTableCell.js similarity index 94% rename from src/pages/manager/resourceManage/ResourceManageTableCell.js rename to src/pages/admin/resource/ResourceManageTableCell.js index 49c1413..ac5c9a1 100644 --- a/src/pages/manager/resourceManage/ResourceManageTableCell.js +++ b/src/pages/admin/resource/ResourceManageTableCell.js @@ -1,5 +1,5 @@ import React from 'react'; -import { BookedLineTr } from '../../booking/bookedList/BookedList'; +import { BookedLineTr } from '../../basic/myBookings/BookedList'; import {Toggle} from "../../../components/toggle/Toggle"; import {Link} from "react-router-dom"; import {AdminBookingResourceAxios} from "../../../api/AxiosApi"; diff --git a/src/pages/manager/resourceBookingManage/ResourceBookingManage.js b/src/pages/admin/resourceBookings/ResourceBookingManage.js similarity index 98% rename from src/pages/manager/resourceBookingManage/ResourceBookingManage.js rename to src/pages/admin/resourceBookings/ResourceBookingManage.js index 93beb50..77b6a7e 100644 --- a/src/pages/manager/resourceBookingManage/ResourceBookingManage.js +++ b/src/pages/admin/resourceBookings/ResourceBookingManage.js @@ -2,7 +2,7 @@ import React from "react"; import { useState, useEffect } from "react"; import axios from "axios"; import { RightContainer, TitleText, WhiteContainer } from "components/rightContainer/RightContainer"; -import { Bar, BookedTable, BookedThead, TableContainer } from "../../booking/bookedList/BookedList"; +import { Bar, BookedTable, BookedThead, TableContainer } from "../../basic/myBookings/BookedList"; import ManageSearchBar from "components/searchBar/ManageSearchBar"; import ResourceBookingManageCell from "./ResourceBookingManageCell"; import { AdminBookingAxios } from "api/AxiosApi"; diff --git a/src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js b/src/pages/admin/resourceBookings/ResourceBookingManageCell.js similarity index 97% rename from src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js rename to src/pages/admin/resourceBookings/ResourceBookingManageCell.js index e72461d..9b18f04 100644 --- a/src/pages/manager/resourceBookingManage/ResourceBookingManageCell.js +++ b/src/pages/admin/resourceBookings/ResourceBookingManageCell.js @@ -1,13 +1,13 @@ import React from 'react'; import { Link } from 'react-router-dom'; -import { BookedLineTr } from '../../booking/bookedList/BookedList'; +import { BookedLineTr } from '../../basic/myBookings/BookedList'; import { StatusCircle, StatusContainer, StatusText } from 'components/booking/StatusTag'; import {CANCELED, USING, WAITING, findStatus, BOOKED} from 'constants/BookingStatus'; import { AdminBookingAxios } from 'api/AxiosApi'; import styled from 'styled-components'; import { getToken } from 'utils/IsLoginUtil'; import { basicError } from 'utils/ErrorHandlerUtil'; -import {SettingButton, SettingButtonContainer} from "../officeBookingManage/OfficeBookingManageCell"; +import {SettingButton, SettingButtonContainer} from "../officeBookings/OfficeBookingManageCell"; function ResourceBookingManageCell(props) { diff --git a/src/pages/manager/userManage/UserManage.js b/src/pages/admin/user/UserManage.js similarity index 97% rename from src/pages/manager/userManage/UserManage.js rename to src/pages/admin/user/UserManage.js index 23ff4da..a025178 100644 --- a/src/pages/manager/userManage/UserManage.js +++ b/src/pages/admin/user/UserManage.js @@ -1,8 +1,8 @@ import React, {useRef} from "react"; import { useState, useEffect } from "react"; import { RightContainer, TitleText, WhiteContainer } from "components/rightContainer/RightContainer"; -import {Bar, BookedTable, BookedThead, NoLineTr, TableContainer} from "../../booking/bookedList/BookedList"; -import UserManageLine from "pages/manager/userManage/UserManageLine" +import {Bar, BookedTable, BookedThead, NoLineTr, TableContainer} from "../../basic/myBookings/BookedList"; +import UserManageLine from "pages/admin/user/UserManageLine" import ManageSearchBar from "components/searchBar/ManageSearchBar"; import { AdminUsersAxios } from "api/AxiosApi"; import { basicError } from "utils/ErrorHandlerUtil"; diff --git a/src/pages/manager/userManage/UserManageLine.js b/src/pages/admin/user/UserManageLine.js similarity index 93% rename from src/pages/manager/userManage/UserManageLine.js rename to src/pages/admin/user/UserManageLine.js index b2d52ec..439962b 100644 --- a/src/pages/manager/userManage/UserManageLine.js +++ b/src/pages/admin/user/UserManageLine.js @@ -1,5 +1,5 @@ import React, {useState} from 'react'; -import {BookedLineTr} from 'pages/booking/bookedList/BookedList'; +import {BookedLineTr} from 'pages/basic/myBookings/BookedList'; import {RoleCapsule} from 'components/capsule/RoleCapsule'; import MoreIcon from 'assets/images/moreIcon.svg' import {UserMoreModal} from "./UserMoreModal"; diff --git a/src/pages/manager/userManage/UserModal.js b/src/pages/admin/user/UserModal.js similarity index 100% rename from src/pages/manager/userManage/UserModal.js rename to src/pages/admin/user/UserModal.js diff --git a/src/pages/manager/userManage/UserMoreModal.js b/src/pages/admin/user/UserMoreModal.js similarity index 100% rename from src/pages/manager/userManage/UserMoreModal.js rename to src/pages/admin/user/UserMoreModal.js diff --git a/src/pages/booking/officeBooking/OfficeBooking.js b/src/pages/basic/booking/office/OfficeBooking.js similarity index 99% rename from src/pages/booking/officeBooking/OfficeBooking.js rename to src/pages/basic/booking/office/OfficeBooking.js index 26fa380..72752bd 100644 --- a/src/pages/booking/officeBooking/OfficeBooking.js +++ b/src/pages/basic/booking/office/OfficeBooking.js @@ -15,7 +15,7 @@ import { BookingPurposeContainer, BookingCapsuleContainer, BookingPurposeTextFie import { RightContainer, WhiteContainer, TitleText } from 'components/rightContainer/RightContainer'; import { basicError } from 'utils/ErrorHandlerUtil'; import SmallButton from 'components/button/SmallButton'; -import { Bar } from '../bookedList/BookedList'; +import { Bar } from '../../myBookings/BookedList'; import { getToken } from 'utils/IsLoginUtil'; import moment from 'moment'; diff --git a/src/pages/booking/officeBooking/OfficeBookingCheck.js b/src/pages/basic/booking/office/OfficeBookingCheck.js similarity index 99% rename from src/pages/booking/officeBooking/OfficeBookingCheck.js rename to src/pages/basic/booking/office/OfficeBookingCheck.js index 906cab2..41c6f3e 100644 --- a/src/pages/booking/officeBooking/OfficeBookingCheck.js +++ b/src/pages/basic/booking/office/OfficeBookingCheck.js @@ -14,7 +14,7 @@ import { BookingDateText } from './OfficeBooking'; import { RightContainer, WhiteContainer, TitleText } from 'components/rightContainer/RightContainer'; import { getToken } from 'utils/IsLoginUtil'; import { basicError } from 'utils/ErrorHandlerUtil'; -import { Bar } from '../bookedList/BookedList'; +import { Bar } from '../../myBookings/BookedList'; import { StatusContainer } from 'components/booking/StatusTag'; import { PurposeContainer } from 'components/officeBooking/BookingPurpose'; diff --git a/src/pages/booking/selectOffice/SelectOffice.js b/src/pages/basic/booking/office/SelectOffice.js similarity index 90% rename from src/pages/booking/selectOffice/SelectOffice.js rename to src/pages/basic/booking/office/SelectOffice.js index b64bb58..a8b0a55 100644 --- a/src/pages/booking/selectOffice/SelectOffice.js +++ b/src/pages/basic/booking/office/SelectOffice.js @@ -11,12 +11,12 @@ import { SearchTextInput, SearchTitleContainer, SearchTitleText -} from "../selectResource/SelectResource"; -import SearchButtonImg from "../../../assets/images/button/searchButton.png"; -import ImageButton from "../../../components/button/ImageButton"; -import {SelectToggle} from "../../../components/capsule/SelectToggle"; -import {TimeList} from "../../../constants/ToggleList"; -import {getToken} from "../../../utils/IsLoginUtil"; +} from "../resource/SelectResource"; +import SearchButtonImg from "../../../../assets/images/button/searchButton.png"; +import ImageButton from "../../../../components/button/ImageButton"; +import {SelectToggle} from "../../../../components/capsule/SelectToggle"; +import {TimeList} from "../../../../constants/ToggleList"; +import {getToken} from "../../../../utils/IsLoginUtil"; function SelectOffice(props) { diff --git a/src/pages/booking/resourceBooking/CustomCalendar.css b/src/pages/basic/booking/resource/CustomCalendar.css similarity index 100% rename from src/pages/booking/resourceBooking/CustomCalendar.css rename to src/pages/basic/booking/resource/CustomCalendar.css diff --git a/src/pages/booking/resourceBooking/ResourceBooking.js b/src/pages/basic/booking/resource/ResourceBooking.js similarity index 98% rename from src/pages/booking/resourceBooking/ResourceBooking.js rename to src/pages/basic/booking/resource/ResourceBooking.js index 29efb2b..4bfbd90 100644 --- a/src/pages/booking/resourceBooking/ResourceBooking.js +++ b/src/pages/basic/booking/resource/ResourceBooking.js @@ -13,10 +13,10 @@ import ResourceInfo from 'components/resourceInfo/ResourceInfo'; import { BookingContentContainer, RequestButtonContainer, RequestBookingButton } from 'components/officeBooking/BookingTimeBar'; import { RightContainer, WhiteContainer, TitleText } from 'components/rightContainer/RightContainer'; import 'react-calendar/dist/Calendar.css'; -import styles from "../resourceBooking/CustomCalendar.css"; +import styles from "./CustomCalendar.css"; import { basicError } from 'utils/ErrorHandlerUtil'; import SmallButton from 'components/button/SmallButton'; -import { Bar } from '../bookedList/BookedList'; +import { Bar } from '../../myBookings/BookedList'; import { getToken } from 'utils/IsLoginUtil'; var startDate = ''; diff --git a/src/pages/booking/resourceBooking/ResourceBookingCheck.js b/src/pages/basic/booking/resource/ResourceBookingCheck.js similarity index 99% rename from src/pages/booking/resourceBooking/ResourceBookingCheck.js rename to src/pages/basic/booking/resource/ResourceBookingCheck.js index 322e11f..399a6e1 100644 --- a/src/pages/booking/resourceBooking/ResourceBookingCheck.js +++ b/src/pages/basic/booking/resource/ResourceBookingCheck.js @@ -13,7 +13,7 @@ import { RightContainer, WhiteContainer,TitleText } from 'components/rightContai import { BookingDateText } from './ResourceBooking'; import { getToken } from 'utils/IsLoginUtil'; import { basicError } from 'utils/ErrorHandlerUtil'; -import { Bar } from '../bookedList/BookedList'; +import { Bar } from '../../myBookings/BookedList'; import { PurposeContainer } from 'components/officeBooking/BookingPurpose'; var resourceId = 1; diff --git a/src/pages/basic/booking/resource/SelectResource.js b/src/pages/basic/booking/resource/SelectResource.js new file mode 100644 index 0000000..d5eabde --- /dev/null +++ b/src/pages/basic/booking/resource/SelectResource.js @@ -0,0 +1,153 @@ +import ImageButton from "components/button/ImageButton"; +import {ResourceSearchBar, RightContainer, TitleText, WhiteContainer} from "components/rightContainer/RightContainer"; +import SearchButtonImg from '../../../../assets/images/button/searchButton.png' +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"; +import {basicError} from 'utils/ErrorHandlerUtil'; +import {getToken} from "../../../../utils/IsLoginUtil"; + + +export const SearchTitleContainer = styled.div` + width: 15%; + height: 40px; + display: flex; + border-radius: 8px; + border: 1px solid #FFF; + background: #FFF; + align-items: center; + justify-content: center; + box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); +` + +export const SearchTitleText = styled.text` + color: #000; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 16px; + text-align: center; +` + +export const SearchTextInput = styled.input` + width: 46%; + height: 40px; + flex-shrink: 0; + font-size: 16px; + border-radius: 8px; + border: 1px solid #FFF; + box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); + background: #FFF; + padding-left: 10px; +` + +export const SearchDateContainer = styled.div` + width: 30%; + height: 40px; + flex-shrink: 0; + border-radius: 8px; + border: 1px solid #FFF; + background: #FFF; + box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); + display: flex; + align-items: center; +` +export const SearchDateInput = styled.input` + background: none; + font-family: NanumSquare_ac; + font-size: 18px; + padding: 0 10px; + border: none; + width: 45%; +` + +function SelectResource(props) { + const navigate = useNavigate(); + + const [resourceList, setResourceList] = useState([]); + const [resourceName, setResourceName] = useState(""); + const [startDate, setStartDate] = useState(""); + const [endDate, setEndDate] = useState(""); + + const getResourceList = () => { + ResourcesAxios.get("?size=200", { + headers: { + Authorization: getToken() + } + }) + .then((Response) => { + setResourceList(Response.data.data.content) + }) + .catch((error) => { + basicError(error) + }) + }; + + + useEffect(() => { + getResourceList(); + }, []); + + const changeResourceName = (e) => { + setResourceName(e.target.value) + } + + const changeStartDate = (e) => { + setStartDate(e.target.value) + } + + const changeEndDate = (e) => { + setEndDate(e.target.value) + } + + const searchResource = () => { + ResourcesAxios.get(`?resourceName=${resourceName}&startDate=${startDate}&endDate=${endDate}`) + .then((Response) => { + setResourceList(Response.data.data.content) + }) + .catch((error) => { + basicError(error) + }) + } + + + return ( + + {props.title} + + + 예약 가능 장비 검색 + + + + + + + ~ + + + + + + + +
+ {resourceList.length === 0 ? + + : resourceList.map((resource, index) => + )} +
+
+
+ ); +} + +export default SelectResource; diff --git a/src/pages/booking/bookedList/BookedLine.js b/src/pages/basic/myBookings/BookedLine.js similarity index 100% rename from src/pages/booking/bookedList/BookedLine.js rename to src/pages/basic/myBookings/BookedLine.js diff --git a/src/pages/booking/bookedList/BookedList.js b/src/pages/basic/myBookings/BookedList.js similarity index 100% rename from src/pages/booking/bookedList/BookedList.js rename to src/pages/basic/myBookings/BookedList.js diff --git a/src/pages/user/Login.js b/src/pages/basic/user/Login.js similarity index 100% rename from src/pages/user/Login.js rename to src/pages/basic/user/Login.js diff --git a/src/pages/booking/selectResource/SelectResource.js b/src/pages/booking/selectResource/SelectResource.js deleted file mode 100644 index 81f281b..0000000 --- a/src/pages/booking/selectResource/SelectResource.js +++ /dev/null @@ -1,136 +0,0 @@ -import ImageButton from "components/button/ImageButton"; -import { ResourceSearchBar, RightContainer, TitleText, WhiteContainer } from "components/rightContainer/RightContainer"; -import SearchButtonImg from '../../../assets/images/button/searchButton.png' -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"; -import { basicError } from 'utils/ErrorHandlerUtil'; -import {getToken} from "../../../utils/IsLoginUtil"; - - -export const SearchTitleContainer = styled.div` - width: 15%; - height: 40px; - display: flex; - border-radius: 8px; - border: 1px solid #FFF; - background: #FFF; - align-items: center; - justify-content: center; - box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); -` - -export const SearchTitleText = styled.text` - color: #000; - font-size: 16px; - font-style: normal; - font-weight: 400; - line-height: 16px; - text-align: center; -` - -export const SearchTextInput = styled.input` - width: 46%; - height: 40px; - flex-shrink: 0; - font-size: 16px; - border-radius: 8px; - border: 1px solid #FFF; - box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); - background: #FFF; - padding-left: 10px; -` - -export const SearchDateContainer = styled.div` - width: 30%; - height: 40px; - flex-shrink: 0; - border-radius: 8px; - border: 1px solid #FFF; - background: #FFF; - box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); - display: flex; - align-items: center; -` -export const SearchDateInput = styled.input` - background: none; - font-family: NanumSquare_ac; - font-size: 18px; - padding: 0 10px; - border: none; - width: 45%; -` - -function SelectResource(props) { - const navigate = useNavigate(); - - const [resourceList, setResourceList] = useState([]); - const [resourceName, setResourceName] = useState(""); - const [startDate, setStartDate] = useState(""); - const [endDate, setEndDate] = useState(""); - - const getResourceList = () => { - ResourcesAxios.get("?size=200", { - headers: { - Authorization: getToken() - } - }) - .then((Response) => { setResourceList(Response.data.data.content) }) - .catch((error) => {basicError(error)}) - }; - - - useEffect(() => { - getResourceList(); - }, []); - - const changeResourceName = (e) => { - setResourceName(e.target.value) - } - - const changeStartDate = (e) => { - setStartDate(e.target.value) - } - - const changeEndDate = (e) => { - setEndDate(e.target.value) - } - - const searchResource = () => { - ResourcesAxios.get(`?resourceName=${resourceName}&startDate=${startDate}&endDate=${endDate}`) - .then((Response) => { setResourceList(Response.data.data.content) }) - .catch((error) => {basicError(error)}) - } - - - return ( - - {props.title} - - - 예약 가능 장비 검색 - - - - - - - ~ - - - - - - - -
- {resourceList.length === 0 ? : resourceList.map((resource, index) => )} -
-
-
- ); -} - -export default SelectResource; From 20d504fb48d3926e1e891a65b3623ab1f018d88f Mon Sep 17 00:00:00 2001 From: psyeon1120 Date: Fri, 3 Nov 2023 01:59:51 +0900 Subject: [PATCH 4/6] =?UTF-8?q?[PDW-67]=20feat:=20API=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/AxiosApi.js | 16 ++++++++++++---- .../admin/office/OfficeBookingManageDetail.js | 6 +++--- src/pages/admin/office/OfficeManage.js | 4 ++-- src/pages/admin/office/OfficeManageTableCell.js | 4 ++-- src/pages/admin/resource/ResourceManage.js | 4 ++-- src/pages/admin/resource/ResourceManageAdd.js | 6 +++--- src/pages/admin/resource/ResourceManageDetail.js | 6 +++--- .../admin/resource/ResourceManageTableCell.js | 4 ++-- 8 files changed, 29 insertions(+), 21 deletions(-) diff --git a/src/api/AxiosApi.js b/src/api/AxiosApi.js index 8fe0451..8674ce0 100644 --- a/src/api/AxiosApi.js +++ b/src/api/AxiosApi.js @@ -19,12 +19,16 @@ export const ResourcesAxios = axios.create({ baseURL: `${host}/resources`, }); +export const CarsAxios = axios.create({ + baseURL: `${host}/cars`, +}); + export const EquipmentsAxios = axios.create({ baseURL: `${host}/equipments`, }); -export const ArchivingssAxios = axios.create({ - baseURL: `${host}/archivings`, +export const ArchivingAxios = axios.create({ + baseURL: `${host}/archives`, }); export const AdminUsersAxios = axios.create({ @@ -35,11 +39,15 @@ export const AdminBookingAxios = axios.create({ baseURL: `${host}/admin/bookings`, }); -export const AdminBookingResourceAxios = axios.create({ +export const AdminCarsAxios = axios.create({ + baseURL: `${host}/admin/cars`, +}); + +export const AdminResourcesAxios = axios.create({ baseURL: `${host}/admin/resources`, }); -export const AdminBookingOfficeAxios = axios.create({ +export const AdminOfficesAxios = axios.create({ baseURL: `${host}/admin/offices`, }); diff --git a/src/pages/admin/office/OfficeBookingManageDetail.js b/src/pages/admin/office/OfficeBookingManageDetail.js index 209082f..53ff18d 100644 --- a/src/pages/admin/office/OfficeBookingManageDetail.js +++ b/src/pages/admin/office/OfficeBookingManageDetail.js @@ -1,5 +1,5 @@ import React from 'react'; -import { OfficesAxios, AdminBookingOfficeAxios } from 'api/AxiosApi'; +import { OfficesAxios, AdminOfficesAxios } from 'api/AxiosApi'; import { useState, useEffect } from "react"; import { useParams } from 'react-router-dom'; import Capsule from 'components/capsule/Capsule'; @@ -35,7 +35,7 @@ function OfficeManageDetail() { } const getOfficeBookingListInfo = () => { - AdminBookingOfficeAxios.get(`offices/${officeId}`, { + AdminOfficesAxios.get(`offices/${officeId}`, { headers: { Authorization: getToken() } @@ -53,7 +53,7 @@ function OfficeManageDetail() { const deleteResource = () => { if (window.confirm("회의실을 삭제하시겠습니까?")) { - AdminBookingOfficeAxios.delete(`${officeId}`, { + AdminOfficesAxios.delete(`${officeId}`, { headers: { Authorization: getToken() } diff --git a/src/pages/admin/office/OfficeManage.js b/src/pages/admin/office/OfficeManage.js index f2329e5..eaf34fd 100644 --- a/src/pages/admin/office/OfficeManage.js +++ b/src/pages/admin/office/OfficeManage.js @@ -5,7 +5,7 @@ import OfficeManageTableCell from "./OfficeManageTableCell"; import ManageSearchBar from "components/searchBar/ManageSearchBar"; import {getToken} from "utils/IsLoginUtil"; import {basicError} from "utils/ErrorHandlerUtil"; -import {AdminBookingOfficeAxios} from "api/AxiosApi"; +import {AdminOfficesAxios} from "api/AxiosApi"; function OfficeManage(props) { @@ -13,7 +13,7 @@ function OfficeManage(props) { const getOffices = (name) => { const max = Int32Array.max; - AdminBookingOfficeAxios.get(`?facilityName=${name}&size=200`,{ + AdminOfficesAxios.get(`?facilityName=${name}&size=200`,{ headers: { Authorization: getToken() } diff --git a/src/pages/admin/office/OfficeManageTableCell.js b/src/pages/admin/office/OfficeManageTableCell.js index 03ceaca..1cdb2a3 100644 --- a/src/pages/admin/office/OfficeManageTableCell.js +++ b/src/pages/admin/office/OfficeManageTableCell.js @@ -2,14 +2,14 @@ import React from 'react'; import {Link} from 'react-router-dom'; import {BookedLineTr} from '../../basic/myBookings/BookedList'; import {Toggle} from "../../../components/toggle/Toggle"; -import {AdminBookingOfficeAxios} from "../../../api/AxiosApi"; +import {AdminOfficesAxios} 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, { + AdminOfficesAxios.patch(`/${props.id}/activation`, null, { headers: { Authorization: getToken() } diff --git a/src/pages/admin/resource/ResourceManage.js b/src/pages/admin/resource/ResourceManage.js index fa8bab1..1a99608 100644 --- a/src/pages/admin/resource/ResourceManage.js +++ b/src/pages/admin/resource/ResourceManage.js @@ -6,7 +6,7 @@ import ResourceManageTableCell from "./ResourceManageTableCell"; import ManageSearchBar from "components/searchBar/ManageSearchBar"; import { getToken } from "utils/IsLoginUtil"; import { basicError } from "utils/ErrorHandlerUtil"; -import { AdminBookingResourceAxios } from "api/AxiosApi"; +import { AdminResourcesAxios } from "api/AxiosApi"; function ResourceManage(props) { @@ -15,7 +15,7 @@ function ResourceManage(props) { const getResources = (name) => { const max = Int32Array.max; - AdminBookingResourceAxios.get(`?keyword=${name}&size=200`, { + AdminResourcesAxios.get(`?keyword=${name}&size=200`, { headers: { Authorization: getToken() } diff --git a/src/pages/admin/resource/ResourceManageAdd.js b/src/pages/admin/resource/ResourceManageAdd.js index 2aaa7b4..a3e92d9 100644 --- a/src/pages/admin/resource/ResourceManageAdd.js +++ b/src/pages/admin/resource/ResourceManageAdd.js @@ -7,7 +7,7 @@ import { ManageAddButton, ManageAddButtonImage, ManageAddButtonLabel } from "com import { getToken } from "utils/IsLoginUtil"; import { basicError } from "utils/ErrorHandlerUtil"; -import {AdminBookingResourceAxios, ImageUrlAxios, ResourcesAxios, UsersAxios} from "api/AxiosApi"; +import {AdminResourcesAxios, ImageUrlAxios, ResourcesAxios, UsersAxios} from "api/AxiosApi"; import AddImageImage from "../../../assets/images/AddImage.svg" import SearchButtonImage from "../../../assets/images/SearchPlus.svg" @@ -299,7 +299,7 @@ function ResourceManageAdd(props) { } const addResource = () => { - AdminBookingResourceAxios.post(``, { + AdminResourcesAxios.post(``, { responsibility: staff.userId, description: description, location: place, @@ -323,7 +323,7 @@ function ResourceManageAdd(props) { const editResource = () => { - AdminBookingResourceAxios.patch(`/${resourceId}`, { + AdminResourcesAxios.patch(`/${resourceId}`, { responsibility: staff.userId, description: description, location: place, diff --git a/src/pages/admin/resource/ResourceManageDetail.js b/src/pages/admin/resource/ResourceManageDetail.js index f68b750..0b6ed4a 100644 --- a/src/pages/admin/resource/ResourceManageDetail.js +++ b/src/pages/admin/resource/ResourceManageDetail.js @@ -1,6 +1,6 @@ import React from 'react'; import styled from "styled-components" -import { ResourcesAxios, AdminBookingResourceAxios } from 'api/AxiosApi'; +import { ResourcesAxios, AdminResourcesAxios } from 'api/AxiosApi'; import { useState, useEffect } from "react"; import { useParams } from 'react-router-dom'; import Capsule from 'components/capsule/Capsule'; @@ -79,7 +79,7 @@ function ResourceManageDetail() { } const getResourceBookingListInfo = () => { - AdminBookingResourceAxios.get(`${resourceId}`, { + AdminResourcesAxios.get(`${resourceId}`, { headers: { Authorization: getToken() } @@ -97,7 +97,7 @@ function ResourceManageDetail() { const deleteResource = () => { if (window.confirm("장비을 삭제하시겠습니까?")) { - AdminBookingResourceAxios.delete(`${resourceId}`, { + AdminResourcesAxios.delete(`${resourceId}`, { headers: { Authorization: getToken() } diff --git a/src/pages/admin/resource/ResourceManageTableCell.js b/src/pages/admin/resource/ResourceManageTableCell.js index ac5c9a1..d77d0ec 100644 --- a/src/pages/admin/resource/ResourceManageTableCell.js +++ b/src/pages/admin/resource/ResourceManageTableCell.js @@ -2,14 +2,14 @@ import React from 'react'; import { BookedLineTr } from '../../basic/myBookings/BookedList'; import {Toggle} from "../../../components/toggle/Toggle"; import {Link} from "react-router-dom"; -import {AdminBookingResourceAxios} from "../../../api/AxiosApi"; +import {AdminResourcesAxios} from "../../../api/AxiosApi"; import {getToken} from "../../../utils/IsLoginUtil"; import {basicError} from "../../../utils/ErrorHandlerUtil"; function ResourceManageTableCell(props) { const changeToggle = (isEnable) => { - AdminBookingResourceAxios.patch(`/${props.id}/activation`, null, { + AdminResourcesAxios.patch(`/${props.id}/activation`, null, { headers: { Authorization: getToken() } From 5a3ce4e309cd799c8cc4faf09619b3aff342b06b Mon Sep 17 00:00:00 2001 From: psyeon1120 Date: Fri, 3 Nov 2023 02:10:21 +0900 Subject: [PATCH 5/6] =?UTF-8?q?[PDW-67]=20fix:=20=EC=A0=84=EC=B2=B4=20API?= =?UTF-8?q?=20=ED=86=A0=ED=81=B0=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/booking/office/OfficeBooking.js | 50 +++-- .../booking/office/OfficeBookingCheck.js | 12 +- .../basic/booking/resource/ResourceBooking.js | 210 ++++++++++-------- .../booking/resource/ResourceBookingCheck.js | 14 +- .../basic/booking/resource/SelectResource.js | 8 +- src/pages/basic/myBookings/BookedLine.js | 15 +- src/pages/basic/myBookings/BookedList.js | 4 +- 7 files changed, 198 insertions(+), 115 deletions(-) diff --git a/src/pages/basic/booking/office/OfficeBooking.js b/src/pages/basic/booking/office/OfficeBooking.js index 72752bd..1479533 100644 --- a/src/pages/basic/booking/office/OfficeBooking.js +++ b/src/pages/basic/booking/office/OfficeBooking.js @@ -1,22 +1,35 @@ -import React from 'react'; +import React, {useEffect, useState} from 'react'; import styled from "styled-components" -import { OfficesAxios, BookingsAxios } from 'api/AxiosApi'; -import { useState, useEffect } from "react"; -import { useParams } from 'react-router-dom'; +import {OfficesAxios} from 'api/AxiosApi'; +import {useParams} from 'react-router-dom'; import Capsule from 'components/capsule/Capsule'; import OfficeInfo from "components/officeInfo/OfficeInfo"; -import { MainTextContainer, SubTextContainer, SelectedSubTitleText, UnselectedSubTitleText } from 'components/officeBooking/SubTitleBar'; -import { DatePicker } from 'components/searchBar/SearchBar'; import { - BookingContentContainer, BookingTimeContainer, renderBookingTimeBar, BookingDateTextContainer, setBookingState, RequestButtonContainer, requestBookingOffice + MainTextContainer, + SelectedSubTitleText, + SubTextContainer, + UnselectedSubTitleText +} from 'components/officeBooking/SubTitleBar'; +import {DatePicker} from 'components/searchBar/SearchBar'; +import { + BookingContentContainer, + BookingDateTextContainer, + BookingTimeContainer, + renderBookingTimeBar, + RequestButtonContainer, + setBookingState } from 'components/officeBooking/BookingTimeBar'; -import { BookingPurposeContainer, BookingCapsuleContainer, BookingPurposeTextFieldContainer } from 'components/officeBooking/BookingPurpose'; -import { RightContainer, WhiteContainer, TitleText } from 'components/rightContainer/RightContainer'; -import { basicError } from 'utils/ErrorHandlerUtil'; +import { + BookingCapsuleContainer, + BookingPurposeContainer, + BookingPurposeTextFieldContainer +} from 'components/officeBooking/BookingPurpose'; +import {RightContainer, TitleText, WhiteContainer} from 'components/rightContainer/RightContainer'; +import {basicError} from 'utils/ErrorHandlerUtil'; import SmallButton from 'components/button/SmallButton'; -import { Bar } from '../../myBookings/BookedList'; -import { getToken } from 'utils/IsLoginUtil'; +import {Bar} from '../../myBookings/BookedList'; +import {getToken} from 'utils/IsLoginUtil'; import moment from 'moment'; var bookingDate = ''; @@ -51,7 +64,6 @@ export const PurposeTextarea = styled.textarea` margin: 0 10px 0 10px; ` - function OfficeBooking(props) { let { officeId } = useParams(); @@ -74,7 +86,11 @@ function OfficeBooking(props) { // 일자별 예약 현황 받아오기 const getBookingTimeState = () => { - OfficesAxios.get(`/${officeId}/booking-state?date=${bookingDate}`) + OfficesAxios.get(`/${officeId}/booking-state?date=${bookingDate}`, { + headers: { + Authorization: getToken() + } + }) .then((Response) => { setBookingDetail(Response.data.data.bookedTimes) setBookingState(Response.data.data.bookedTimes) @@ -89,7 +105,11 @@ function OfficeBooking(props) { // 회의실 정보 받아오기 const getOfficeInfoForBooking = (id) => { - OfficesAxios.get(`/${officeId}`) + OfficesAxios.get(`/${officeId}`, { + headers: { + Authorization: getToken() + } + }) .then((Response) => { setOfficeInfo(Response.data.data) }) diff --git a/src/pages/basic/booking/office/OfficeBookingCheck.js b/src/pages/basic/booking/office/OfficeBookingCheck.js index 41c6f3e..c459b15 100644 --- a/src/pages/basic/booking/office/OfficeBookingCheck.js +++ b/src/pages/basic/booking/office/OfficeBookingCheck.js @@ -40,7 +40,11 @@ function OfficeBookingCheck(props) { Authorization: getToken() } }) - : BookingsAxios.get(`/offices/${bookingId}`)) + : BookingsAxios.get(`/offices/${bookingId}`, { + headers: { + Authorization: getToken() + } + })) .then((Response) => { setBookingDetail(Response.data.data) setStatus(findStatus(Response.data.data.bookingStatus)) @@ -57,7 +61,11 @@ function OfficeBookingCheck(props) { }; const getOfficeInfo = () => { - OfficesAxios.get(`/${officeId}`) + OfficesAxios.get(`/${officeId}`, { + headers: { + Authorization: getToken() + } + }) .then((Response) => { setOfficeInfo(Response.data.data) }) diff --git a/src/pages/basic/booking/resource/ResourceBooking.js b/src/pages/basic/booking/resource/ResourceBooking.js index 4bfbd90..1e2812d 100644 --- a/src/pages/basic/booking/resource/ResourceBooking.js +++ b/src/pages/basic/booking/resource/ResourceBooking.js @@ -2,75 +2,88 @@ import React from 'react'; import styled from "styled-components" import Calendar from 'react-calendar'; import 'react-calendar/dist/Calendar.css'; -import moment, { locale } from 'moment'; -import { ResourcesAxios, BookingsAxios } from 'api/AxiosApi'; -import { useState, useEffect } from "react"; -import { useParams } from 'react-router-dom'; +import moment, {locale} from 'moment'; +import {ResourcesAxios, BookingsAxios} from 'api/AxiosApi'; +import {useState, useEffect} from "react"; +import {useParams} from 'react-router-dom'; import Capsule from 'components/capsule/Capsule'; -import { MainTextContainer, SubTextContainer, SelectedSubTitleText, UnselectedSubTitleText } from 'components/officeBooking/SubTitleBar'; -import { BookingPurposeContainer, BookingCapsuleContainer, BookingPurposeTextFieldContainer } from 'components/officeBooking/BookingPurpose'; +import { + MainTextContainer, + SubTextContainer, + SelectedSubTitleText, + UnselectedSubTitleText +} from 'components/officeBooking/SubTitleBar'; +import { + BookingPurposeContainer, + BookingCapsuleContainer, + BookingPurposeTextFieldContainer +} from 'components/officeBooking/BookingPurpose'; import ResourceInfo from 'components/resourceInfo/ResourceInfo'; -import { BookingContentContainer, RequestButtonContainer, RequestBookingButton } from 'components/officeBooking/BookingTimeBar'; -import { RightContainer, WhiteContainer, TitleText } from 'components/rightContainer/RightContainer'; +import { + BookingContentContainer, + RequestButtonContainer, + RequestBookingButton +} from 'components/officeBooking/BookingTimeBar'; +import {RightContainer, WhiteContainer, TitleText} from 'components/rightContainer/RightContainer'; import 'react-calendar/dist/Calendar.css'; import styles from "./CustomCalendar.css"; -import { basicError } from 'utils/ErrorHandlerUtil'; +import {basicError} from 'utils/ErrorHandlerUtil'; import SmallButton from 'components/button/SmallButton'; -import { Bar } from '../../myBookings/BookedList'; -import { getToken } from 'utils/IsLoginUtil'; +import {Bar} from '../../myBookings/BookedList'; +import {getToken} from 'utils/IsLoginUtil'; var startDate = ''; var endDate = ''; export const ContentContainer = styled.div` - width: 90%; - border-radius: 12px; - background: #FFF; - box-shadow: 0px 4px 14px 0px rgba(0, 0, 0, 0.25); - margin-top: 20px; + width: 90%; + border-radius: 12px; + background: #FFF; + box-shadow: 0px 4px 14px 0px rgba(0, 0, 0, 0.25); + margin-top: 20px; ` export const BookingDateText = styled.text` - margin: 5px 0 0 0; - padding-left: 10px; - color: #575757; - background-color: ${props => props.isSelected != 'true' ? 'red' : 'white'} - font-family: NanumSquare_ac; - font-size: 22px; - font-weight: 400; - letter-spacing: 0em; - text-align: left; + margin: 5px 0 0 0; + padding-left: 10px; + color: #575757; + background-color: ${props => props.isSelected != 'true' ? 'red' : 'white'} + font-family: NanumSquare_ac; + font-size: 22px; + font-weight: 400; + letter-spacing: 0em; + text-align: left; ` export const PurposeTextarea = styled.textarea` - width: 100%; - padding: 6px 0 0 18px; - border-radius: 12px; - border-width:1; - border-style:solid; - border-color:black; - background-color: #ffffff; - font-family: NanumSquare_ac; - font-size: 20px; - font-weight: 400; - line-height: 25px; - letter-spacing: 0em; - text-align: left; - margin: 0 10px; + width: 100%; + padding: 6px 0 0 18px; + border-radius: 12px; + border-width: 1; + border-style: solid; + border-color: black; + background-color: #ffffff; + font-family: NanumSquare_ac; + font-size: 20px; + font-weight: 400; + line-height: 25px; + letter-spacing: 0em; + text-align: left; + margin: 0 10px; ` export const BookingDateContainer = styled.div` - padding-top: 7%; + padding-top: 7%; ` export const DateContainer = styled.div` - padding-left: 1%; + padding-left: 1%; ` var currentMonth = moment(new Date()).format('YYYY-MM') function ResourceBooking(props) { - let { resourceId } = useParams(); + let {resourceId} = useParams(); const [resourceInfo, setResourceInfo] = useState([]); const [dates, setBookedDates] = useState([]); @@ -79,30 +92,42 @@ function ResourceBooking(props) { const [changed, setCurrentMonth] = useState(); const getResourceInfo = () => { - ResourcesAxios.get(`/${resourceId}`) - .then((Response) => { setResourceInfo(Response.data.data) }) - .catch((Error)=>{ - basicError(Error) + ResourcesAxios.get(`/${resourceId}`, { + headers: { + Authorization: getToken() + } + }) + .then((Response) => { + setResourceInfo(Response.data.data) + }) + .catch((Error) => { + basicError(Error) console.log(Error) window.alert("장비 정보를 불러올 수 없습니댜.") window.history.back() - }); + }); }; const getBookedDates = () => { - const params = { month: currentMonth }; - ResourcesAxios.get(`/${resourceId}/booking-state`, { params }) + const params = {month: currentMonth}; + ResourcesAxios.get(`/${resourceId}/booking-state`, { + params, headers: { + Authorization: getToken() + } + }) .then((Response) => { var temp = []; - Response.data.data.map(function (date) { temp.push(new Date(date)) }) + Response.data.data.map(function (date) { + temp.push(new Date(date)) + }) setBookedDates(temp) }) - .catch((Error)=>{ - basicError(Error) + .catch((Error) => { + basicError(Error) console.log(Error) - window.alert("예약 정보를 불러올 수 없습니댜.") + window.alert("예약 정보를 불러올 수 없습니댜.") window.history.back() - }); + }); } const changeDate = e => { @@ -115,13 +140,14 @@ function ResourceBooking(props) { startDate = startDateFormat endDate = endDateFormat - for(var i=0; i= temp) { alert('예약된 일자를 포함한 날짜는 선택할 수 없습니다.') - startDate = ''; endDate = ''; + startDate = ''; + endDate = ''; setStartDate(startDate) setEndDate(endDate) window.location.reload() @@ -141,27 +167,30 @@ function ResourceBooking(props) { var bookingPurpose = document.getElementById("bookingPurpose").value; if (window.confirm("예약하시겠습니까?")) { - ResourcesAxios.post(`/${resourceId}`, + ResourcesAxios.post(`/${resourceId}`, { "endDate": endDate, "memo": bookingPurpose, "startDate": startDate }, { - headers: { Authorization: getToken() } + headers: {Authorization: getToken()} }, ) .then(function (response) { - if (response.data.status === '200') { alert('예약에 성공하였습니다!') } - else { alert(response.data.message); } + if (response.data.status === '200') { + alert('예약에 성공하였습니다!') + } else { + alert(response.data.message); + } window.location.reload() }) - .catch((Error)=>{ - basicError(Error) + .catch((Error) => { + basicError(Error) console.log(Error) window.alert("장비 예약에 실패하였습니다.") window.history.back() - }); + }); } } @@ -174,8 +203,8 @@ function ResourceBooking(props) { 장비 예약 - -
+ +
{resourceInfo.name} @@ -185,12 +214,12 @@ function ResourceBooking(props) {
+ description={resourceInfo.description} + imgUrl={resourceInfo.imgUrl}/> - + {start || "시작일"} @@ -199,24 +228,24 @@ function ResourceBooking(props) { moment(date).format("D")} - minDate={new Date()} - showNeighboringMonth={false} - next2Label={null} - prev2Label={null} - formatShortWeekday={(locale, date) => - ["S", "M", "T", "W", "T", "F", "S"][date.getDay()] - } - tileDisabled={({ date, view }) => - (view === 'month') && - dates.some(disabledDate => - date.getFullYear() === disabledDate.getFullYear() && - date.getMonth() === disabledDate.getMonth() && - date.getDate() === disabledDate.getDate() - )} - onActiveStartDateChange={onActiveStartDateChange} + onChange={changeDate} + selectRange={true} + formatDay={(locale, date) => moment(date).format("D")} + minDate={new Date()} + showNeighboringMonth={false} + next2Label={null} + prev2Label={null} + formatShortWeekday={(locale, date) => + ["S", "M", "T", "W", "T", "F", "S"][date.getDay()] + } + tileDisabled={({date, view}) => + (view === 'month') && + dates.some(disabledDate => + date.getFullYear() === disabledDate.getFullYear() && + date.getMonth() === disabledDate.getMonth() && + date.getDate() === disabledDate.getDate() + )} + onActiveStartDateChange={onActiveStartDateChange} /> @@ -225,14 +254,14 @@ function ResourceBooking(props) { - + + cols='135' + rows='4' + maxLength='100'/> @@ -245,4 +274,5 @@ function ResourceBooking(props) { } + export default ResourceBooking; \ No newline at end of file diff --git a/src/pages/basic/booking/resource/ResourceBookingCheck.js b/src/pages/basic/booking/resource/ResourceBookingCheck.js index 399a6e1..3553132 100644 --- a/src/pages/basic/booking/resource/ResourceBookingCheck.js +++ b/src/pages/basic/booking/resource/ResourceBookingCheck.js @@ -26,7 +26,12 @@ function ResourceBookingCheck(props) { const [bookingStatus, setStatus] = useState([]); const getResourceInfo = () => { - ResourcesAxios.get(`/${resourceId}`) + ResourcesAxios.get(`/${resourceId}`, + { + headers: { + Authorization: getToken() + } + }) .then((Response)=>{ setResourceInfo(Response.data.data) }) .catch((Error)=>{ basicError(Error) @@ -42,7 +47,12 @@ function ResourceBookingCheck(props) { Authorization: getToken() } }) - : BookingsAxios.get(`/resources/${bookingId}`)) + : BookingsAxios.get(`/resources/${bookingId}`, + { + headers: { + Authorization: getToken() + } + })) .then((Response)=>{ setBookingDetail(Response.data.data) setStatus(findStatus(Response.data.data.status)) diff --git a/src/pages/basic/booking/resource/SelectResource.js b/src/pages/basic/booking/resource/SelectResource.js index d5eabde..440bca4 100644 --- a/src/pages/basic/booking/resource/SelectResource.js +++ b/src/pages/basic/booking/resource/SelectResource.js @@ -9,7 +9,6 @@ import {useNavigate} from "react-router-dom"; import {basicError} from 'utils/ErrorHandlerUtil'; import {getToken} from "../../../../utils/IsLoginUtil"; - export const SearchTitleContainer = styled.div` width: 15%; height: 40px; @@ -103,7 +102,12 @@ function SelectResource(props) { } const searchResource = () => { - ResourcesAxios.get(`?resourceName=${resourceName}&startDate=${startDate}&endDate=${endDate}`) + ResourcesAxios.get(`?resourceName=${resourceName}&startDate=${startDate}&endDate=${endDate}`, + { + headers: { + Authorization: getToken() + } + }) .then((Response) => { setResourceList(Response.data.data.content) }) diff --git a/src/pages/basic/myBookings/BookedLine.js b/src/pages/basic/myBookings/BookedLine.js index 7214fea..a1bbe43 100644 --- a/src/pages/basic/myBookings/BookedLine.js +++ b/src/pages/basic/myBookings/BookedLine.js @@ -7,10 +7,16 @@ import { BookedLineTr } from './BookedList'; import { BookingCategoryPathList } from 'constants/Path'; import { StatusText, StatusContainer, StatusCircle } from 'components/booking/StatusTag'; import { basicError } from 'utils/ErrorHandlerUtil'; +import {getToken} from "../../../utils/IsLoginUtil"; function cancelBooking(bookingId, name, info, start, end, type) { if (window.confirm(`${name}(${info}) ${start} ~ ${end}\n예약을 취소하시겠습니까?`)) { - BookingsAxios.patch(`/${type}/${bookingId}/cancel`) + BookingsAxios.patch(`/${type}/${bookingId}/cancel`, + { + headers: { + Authorization: getToken() + } + }) .catch((error) => { basicError(error) }) @@ -21,7 +27,12 @@ function cancelBooking(bookingId, name, info, start, end, type) { function returnBooking(bookingId, name, info, start, end) { if (window.confirm(`${name}(${info}) ${start} ~ ${end}\n장비를 반납하시겠습니까?`)) { - BookingsAxios.patch(`/resources/${bookingId}/return`) + BookingsAxios.patch(`/resources/${bookingId}/return`, + { + headers: { + Authorization: getToken() + } + }) .catch((error) => { basicError(error) }) diff --git a/src/pages/basic/myBookings/BookedList.js b/src/pages/basic/myBookings/BookedList.js index 9460bef..8c1fa98 100644 --- a/src/pages/basic/myBookings/BookedList.js +++ b/src/pages/basic/myBookings/BookedList.js @@ -132,9 +132,9 @@ function BookedList(props) { {bookings.length === 0 ? - + 예약 내역이 없습니다. - + : bookings.map((booking) => Date: Fri, 3 Nov 2023 02:32:40 +0900 Subject: [PATCH 6/6] =?UTF-8?q?[PDW-67]=20fix:=20path=20=EC=98=A4=EB=A5=98?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App.js b/src/App.js index 4399856..27de54c 100644 --- a/src/App.js +++ b/src/App.js @@ -36,6 +36,7 @@ function App() { } /> } /> } /> + } /> } /> } /> } />