Skip to content

Commit

Permalink
Merge pull request #101 from PLADI-ALM/fix/PDW-61-resource-list-2
Browse files Browse the repository at this point in the history
[PDW-61/fix] 관리자 장비 목록 API 연결
  • Loading branch information
psyeon1120 authored Oct 23, 2023
2 parents c8f19d6 + 4186d21 commit 2757d10
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ function App() {
<Route path="/my/bookings/offices" element={<BookedList title="회의실 예약 내역" />} />
<Route path="/my/bookings/offices/:bookingId" element={<OfficeBookingCheck isAdmin={false} />} />
<Route path='/my/bookings/resources/:bookingId' element={<ResourceBookingCheck />} />
<Route path='/resourceBooking' element={<SelectResource title="자원 예약" />} />
<Route path='/resourceBooking' element={<SelectResource title="장비 예약" />} />
<Route path='/resourceBooking/:resourceId' element={<ResourceBooking />} />
<Route path='/manage/offices' element={<OfficeManage title="회의실 관리" />} />
<Route path='/manage/offices/:officeId' element={<OfficeManageDetail />} />
<Route path='/manage/officeBooking' element={<OfficeBookingManage title="회의실 예약 내역" />} />
<Route path='/manage/officeBooking/:bookingId' element={<OfficeBookingCheck isAdmin={true} />} />
<Route path='/manage/resources' element={<ResourceManage title="자원 관리" />} />
<Route path='/manage/resources/add' element={<ResourceManageAdd title="자원 관리" />} />
<Route path='/manage/resources/edit/:resourceId' element={<ResourceManageAdd title="자원 관리" />} />
<Route path='/manage/resources' element={<ResourceManage title="장비 관리" />} />
<Route path='/manage/resources/add' element={<ResourceManageAdd title="장비 관리" />} />
<Route path='/manage/resources/edit/:resourceId' element={<ResourceManageAdd title="장비 관리" />} />
<Route path='/manage/resources/:resourceId' element={<ResourceManageDetail/>} />
<Route path='/manage/resourceBooking' element={<ResourceBookingManage title="자원 예약 관리" />} />
<Route path='/manage/resourceBooking' element={<ResourceBookingManage title="장비 예약 관리" />} />
<Route path='/manage/resourceBooking/:bookingId' element={<ResourceBookingCheck isAdmin={true} />} />
<Route path='/manage/users' element={<UserManage title="직원 관리" />} />
</Route>
Expand Down
2 changes: 1 addition & 1 deletion src/components/toggle/Toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Circle = styled.div`
`;

export function Toggle(props) {
const [toggle, setToggle] = useState(false);
const [toggle, setToggle] = useState(props.isEnable);
const clickedToggle = () => {
setToggle((prev) => !prev);
props.click(!toggle);
Expand Down
6 changes: 3 additions & 3 deletions src/constants/Path.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export const MAIN_MENUS = [
export const ADMIN_MENUS = [
{ name: '직원 관리', path: '/manage/users' },
{ name: '회의실 관리', path: '/manage/offices' },
{ name: '자원 관리', path: '/manage/resources' },
{ name: '장비 관리', path: '/manage/resources' },
{ name: '회의실예약 관리', path: '/manage/officeBooking' },
{ name: '자원 예약 관리', path: '/manage/resourceBooking' },
{ name: '장비 예약 관리', path: '/manage/resourceBooking' },
{ name: '차량 예약 관리', path: '/manage/carBooking' }
]

Expand All @@ -50,7 +50,7 @@ export const BookingCategoryPathList = [
export function getBookingCategoryPath(koreanName) {
if (koreanName === '회의실') {
return BookingCategoryPathList[0]
} else if (koreanName === '자원') {
} else if (koreanName === '장비') {
return BookingCategoryPathList[1]
}
}
16 changes: 8 additions & 8 deletions src/pages/manager/resourceManage/ResourceManage.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function ResourceManage(props) {
return (
<RightContainer>
<TitleText>{props.title}</TitleText>
<ManageSearchBar buttonTitle="자원 추가" onEnter={getSearchResources} btnClick={moveToAdd}/>
<ManageSearchBar buttonTitle="장비 추가" onEnter={getSearchResources} btnClick={moveToAdd}/>
<WhiteContainer>
<Bar />
<TableContainer>
Expand All @@ -50,26 +50,26 @@ function ResourceManage(props) {
<tr>
<th width="20%">장비명</th>
<th width="15%">보관장소</th>
<th width="15%">책임자</th>
<th width="40%">설명</th>
<th width="20%">책임자</th>
<th width="30%">설명</th>
<th width="8%"></th>
</tr>
</BookedThead>
<tbody>
{ resources.length === 0 ?
<ResourceManageTableCell>
<td colSpan={5}>자원 내역이 없습니다.</td>
<td colSpan={5}>장비 내역이 없습니다.</td>
</ResourceManageTableCell>
: resources.map((resource) =>
<ResourceManageTableCell
key={resource.resourceId}
id={resource.resourceId}
name={resource.name}
location={resource.category}
user={resource.name}
userPhone={resource.category}
location={resource.location}
user={resource.responsibilityName}
userPhone={resource.responsibilityPhone}
description={resource.description}
isEnable={true}
isEnable={resource.isActive}
/>
)}
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/manager/resourceManage/ResourceManageTableCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function ResourceManageTableCell(props) {
<BookedLineTr >
<td width="20%"><Link to={`/manage/resources/${props.id}`}>{props.name}</Link></td>
<td width="15%">{props.location}</td>
<td width="15%">{props.user}({props.userPhone})</td>
<td width="40%">{props.description}</td>
<td width="20%">{props.user}({props.userPhone})</td>
<td width="30%">{props.description}</td>
<td width="8%"><Toggle click={changeToggle} isEnable={props.isEnable}/></td>
</BookedLineTr>
)
Expand Down

0 comments on commit 2757d10

Please sign in to comment.