Skip to content

Commit

Permalink
Merge pull request #111 from PLADI-ALM/refactor/PDW-65-user-manage-list
Browse files Browse the repository at this point in the history
[PDW-65/fix] 빈 직원 목록 처리
  • Loading branch information
psyeon1120 authored Oct 27, 2023
2 parents 446af00 + 0a5c3bb commit 0a63d18
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
7 changes: 7 additions & 0 deletions src/pages/booking/bookedList/BookedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ export const BookedLineTr = styled.tr`
border-bottom: #E1E0E2 solid 1px;
`

export const NoLineTr = styled.tr`
color: #4c4c4c;
text-align: center;
height: 60px;
border-bottom: #E1E0E2 solid 1px;
`

const optionList = BookingCategoryList.map((category) => (<option>{category}</option>))

function BookedList(props) {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/manager/resourceManage/ResourceManage.js
Original file line number Diff line number Diff line change
@@ -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 ResourceManageTableCell from "./ResourceManageTableCell";
import ManageSearchBar from "components/searchBar/ManageSearchBar";
import { getToken } from "utils/IsLoginUtil";
Expand Down Expand Up @@ -57,9 +57,9 @@ function ResourceManage(props) {
</BookedThead>
<tbody>
{ resources.length === 0 ?
<ResourceManageTableCell>
<NoLineTr>
<td colSpan={5}>장비 내역이 없습니다.</td>
</ResourceManageTableCell>
</NoLineTr>
: resources.map((resource) =>
<ResourceManageTableCell
key={resource.resourceId}
Expand Down
15 changes: 8 additions & 7 deletions src/pages/manager/userManage/UserManage.js
Original file line number Diff line number Diff line change
@@ -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 UserManageLine from "pages/manager/userManage/UserManageLine"
import ManageSearchBar from "components/searchBar/ManageSearchBar";
import { AdminUsersAxios } from "api/AxiosApi";
Expand Down Expand Up @@ -45,7 +45,7 @@ function UserManage(props) {
<UserModal id={props.id} handler={openModalHandler} />
: null
}
<TitleText>{props.title}</TitleText>
<TitleText>직원 관리</TitleText>
<ManageSearchBar btnClick={openModalHandler} onEnter={searchUsers} buttonTitle="신규 직원 등록" />

<WhiteContainer>
Expand All @@ -54,7 +54,7 @@ function UserManage(props) {
<BookedTable>
<BookedThead>
<tr>
<th width="5%">성명</th>
<th width="10%">성명</th>
<th width="15%">이메일</th>
<th width="15%">연락처</th>
<th width="10%">부서</th>
Expand All @@ -64,11 +64,12 @@ function UserManage(props) {
</BookedThead>
<tbody>
{users.length === 0 ?
<UserManageLine>
<NoLineTr>
<td colSpan={6}>직원이 없습니다.</td>
</UserManageLine>
: users.map((user, index) =>
<UserManageLine key={index}
</NoLineTr>
: users.map((user) =>
<UserManageLine
key={user.id}
id={user.userId}
name={user.name}
email={user.email}
Expand Down

0 comments on commit 0a63d18

Please sign in to comment.