
--- client/views/layout/Menu.jsx
+++ client/views/layout/Menu.jsx
... | ... | @@ -1,13 +1,18 @@ |
1 | 1 |
import React from "react"; |
2 |
-import SidebarItem from "./SidebarItem.jsx"; |
|
3 |
-import Button from "../component/Button.jsx"; |
|
4 | 2 |
import { useNavigate } from "react-router"; |
3 |
+import { useSelector } from "react-redux"; |
|
4 |
+ |
|
5 |
+import SidebarItem from "./SidebarItem.jsx"; |
|
5 | 6 |
import logo from "../../resources/files/images/logo.png"; |
6 | 7 |
import MenuIcon from "@mui/icons-material/Menu"; |
7 | 8 |
import CloseIcon from '@mui/icons-material/Close'; |
8 | 9 |
|
9 | 10 |
export default function Sidebar({items}) { |
11 |
+ //전역 변수 저장 객체 |
|
12 |
+ const state = useSelector((state) => {return state}); |
|
13 |
+ |
|
10 | 14 |
const [menuToggle, setMenuToggle] = React.useState(false); |
15 |
+ |
|
11 | 16 |
const onClickshow=()=>{ |
12 | 17 |
setMenuToggle(!menuToggle) |
13 | 18 |
} |
... | ... | @@ -38,17 +43,10 @@ |
38 | 43 |
}; |
39 | 44 |
return ( |
40 | 45 |
<> |
41 |
- <nav |
|
42 |
- className={menuToggle? "nav on" : "nav"} |
|
43 |
- > |
|
44 |
- <div className="menuicon" onClick={() => { |
|
45 |
- onClickshow(); |
|
46 |
- // count(); |
|
47 |
- handleClick(); |
|
48 |
- }}> |
|
49 |
- {icons[iconIndex]} |
|
50 |
- {/* <MenuIcon sx={{ width:35, height:35,color:"#7a7f87"}}/> */} |
|
51 |
- </div > |
|
46 |
+ <nav className={menuToggle? "nav on" : "nav"}> |
|
47 |
+ <div className="menuicon" onClick={() => {onClickshow(); handleClick();}}> |
|
48 |
+ {icons[iconIndex]} |
|
49 |
+ </div> |
|
52 | 50 |
<h1 className="logo"><img src={logo} alt="" /></h1> |
53 | 51 |
<div className="flex-align-column" style={{ marginTop: `3rem` }}> |
54 | 52 |
<ul > |
... | ... | @@ -57,10 +55,14 @@ |
57 | 55 |
))} |
58 | 56 |
</ul> |
59 | 57 |
</div> |
60 |
- <div className="bottom-section flex-center"> |
|
61 |
- <div className="info-id" ><span onClick={() => { |
|
62 |
- navigate("/Join"); |
|
63 |
- }}>계정추가</span></div> |
|
58 |
+ <div className="bottom-section flex-center" style={{width: '100%'}}> |
|
59 |
+ {state.loginUser['authority'] == 'ROLE_ADMIN' ? |
|
60 |
+ <div className="info-id" > |
|
61 |
+ <span onClick={() => { |
|
62 |
+ navigate("/Join"); |
|
63 |
+ }}>계정추가</span> |
|
64 |
+ </div> |
|
65 |
+ : null} |
|
64 | 66 |
<div className="logout" onClick={logout}><span>로그아웃</span></div> |
65 | 67 |
</div> |
66 | 68 |
</nav> |
--- client/views/pages/AppRoute.jsx
+++ client/views/pages/AppRoute.jsx
... | ... | @@ -35,8 +35,8 @@ |
35 | 35 |
import EquipmentRentalInsert from "./equipment/EquipmentRentalInsert.jsx"; |
36 | 36 |
import EquipmentManagementSelect from "./equipment/EquipmentManagementSelect.jsx"; |
37 | 37 |
import EquipmentManagementSelectOne from "./equipment/EquipmentManagementSelectOne.jsx"; |
38 |
-import UserAuthoriySelect from "./user_management/UserAuthoriySelect.jsx"; |
|
39 |
-import UserAuthoriySelect_agency from "./user_management/UserAuthoriySelect_agency.jsx"; |
|
38 |
+import UserSelect from "./user_management/UserSelect.jsx"; |
|
39 |
+import AgencySeniorSelect from "./user_management/AgencySeniorSelect.jsx"; |
|
40 | 40 |
import QandASelect from "./callcenter/QandASelect.jsx"; |
41 | 41 |
import QandAConfirm from "./callcenter/QandAConfirm.jsx"; |
42 | 42 |
import EquipmentManagementInsert from "./equipment/EquipmentManagementInsert.jsx"; |
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 |
}, |
81 | 81 |
{ |
82 | 82 |
title: "사용자 관리", |
83 |
- path: "/UserAuthoriySelect", |
|
83 |
+ path: "/UserSelect", |
|
84 | 84 |
}, |
85 | 85 |
], |
86 | 86 |
}, |
... | ... | @@ -140,7 +140,7 @@ |
140 | 140 |
<Route path="/QandAInsert" element={<QandAInsert />}></Route> |
141 | 141 |
<Route path="/QandASelect" element={<QandASelect />}></Route> |
142 | 142 |
<Route path="/EquipmentManagementSelectAdd" element={<EquipmentManagementSelectAdd />}></Route> |
143 |
- <Route path="/UserAuthoriySelect" element={<UserAuthoriySelect />}></Route> |
|
143 |
+ <Route path="/UserSelect" element={<UserSelect />}></Route> |
|
144 | 144 |
<Route path="/QandAConfirm" element={<QandAConfirm />}></Route> |
145 | 145 |
<Route path="/Join" element={<Join />}></Route> |
146 | 146 |
<Route path="/SeniorEdit" element={<SeniorEdit />}></Route> |
... | ... | @@ -175,7 +175,7 @@ |
175 | 175 |
}, |
176 | 176 |
{ |
177 | 177 |
title: "사용자 관리", |
178 |
- path: "/UserAuthoriySelect", |
|
178 |
+ path: "/UserSelect", |
|
179 | 179 |
}, |
180 | 180 |
], |
181 | 181 |
}, |
... | ... | @@ -236,7 +236,7 @@ |
236 | 236 |
<Route path="/MedicineStatistics" element={<MedicineStatistics />} ></Route> |
237 | 237 |
<Route path="/VisitInsert" element={<VisitInsert />}></Route> |
238 | 238 |
<Route path="/VisitSelectOne" element={<VisitSelectOne />}></Route> |
239 |
- <Route path="/UserAuthoriySelect" element={<UserAuthoriySelect />}></Route> |
|
239 |
+ <Route path="/UserSelect" element={<UserSelect />}></Route> |
|
240 | 240 |
<Route path="/RiskSet" element={<RiskSet />}></Route> |
241 | 241 |
{/* <Route path="/AuthorityManagement" element={<AuthorityManagement />}></Route> */} |
242 | 242 |
<Route path="/QandASelect" element={<QandASelect />}></Route> |
... | ... | @@ -250,7 +250,6 @@ |
250 | 250 |
<Route path="/UserEdit" element={<UserEdit />}></Route> |
251 | 251 |
<Route path="/AgentSelectOne" element={<AgentSelectOne />}></Route> |
252 | 252 |
<Route path="/OrgSelect" element={<OrgSelect />}></Route> |
253 |
- <Route path="/UserAuthoriySelect" element={<UserAuthoriySelect />}></Route> |
|
254 | 253 |
</Routes> |
255 | 254 |
); |
256 | 255 |
} |
... | ... | @@ -262,7 +261,7 @@ |
262 | 261 |
}, |
263 | 262 |
{ |
264 | 263 |
title: "대상자 관리", |
265 |
- path: "/UserAuthoriySelect_agency", |
|
264 |
+ path: "/AgencySeniorSelect", |
|
266 | 265 |
icon: ( |
267 | 266 |
<PersonIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} /> |
268 | 267 |
), |
... | ... | @@ -283,25 +282,16 @@ |
283 | 282 |
}, |
284 | 283 |
{ |
285 | 284 |
title: "장비 관리", |
285 |
+ path: "/EquipmentManagementSelect", |
|
286 | 286 |
icon: ( |
287 |
- <ConstructionIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} /> |
|
287 |
+ <SpeakerPhoneIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} /> |
|
288 | 288 |
), |
289 |
- childrens: [ |
|
290 |
- { |
|
291 |
- title: "장비 대여 관리", |
|
292 |
- path: "/EquipmentManagementSelect", |
|
293 |
- }, |
|
294 |
- { |
|
295 |
- title: "문의게시판", |
|
296 |
- path: "/QandASelect", |
|
297 |
- }, |
|
298 |
- ] |
|
299 | 289 |
}, |
300 | 290 |
{ |
301 | 291 |
title: "Q&A", |
302 |
- path: "/QuestionSelect", |
|
292 |
+ path: "/QandASelect", |
|
303 | 293 |
icon: ( |
304 |
- <SpeakerPhoneIcon |
|
294 |
+ <ContactSupportIcon |
|
305 | 295 |
sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} |
306 | 296 |
/> |
307 | 297 |
), |
... | ... | @@ -317,7 +307,7 @@ |
317 | 307 |
<Route path="/QuestionSelect" element={<QuestionSelect />}></Route> |
318 | 308 |
|
319 | 309 |
<Route path="/Main" element={<Main_agency />}></Route> |
320 |
- <Route path="/UserAuthoriySelect_agency" element={<UserAuthoriySelect_agency />}></Route> |
|
310 |
+ <Route path="/AgencySeniorSelect" element={<AgencySeniorSelect />}></Route> |
|
321 | 311 |
<Route path="/SeniorEdit" element={<SeniorEdit />}></Route> |
322 | 312 |
<Route path="/SeniorSelectOne" element={<SeniorSelectOne />}></Route> |
323 | 313 |
<Route path="/UserEdit" element={<UserEdit />}></Route> |
... | ... | @@ -363,19 +353,19 @@ |
363 | 353 |
{ |
364 | 354 |
title: "Home", |
365 | 355 |
path: "/Main", |
366 |
- icon: <HouseIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />, |
|
356 |
+ icon: <HouseIcon sx={{ fontSize: 20, marginRight: 1 }} />, |
|
367 | 357 |
}, |
368 | 358 |
{ |
369 | 359 |
title: "그래프로 보기", |
370 | 360 |
path: "/GuardianStatistics", |
371 |
- icon: <EqualizerIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />, |
|
361 |
+ icon: <EqualizerIcon sx={{ fontSize: 20, marginRight: 1 }} />, |
|
372 | 362 |
}, |
373 | 363 |
{ |
374 | 364 |
title: "Q&A", |
375 |
- path: "/QuestionSelect", |
|
365 |
+ path: "/QandASelect", |
|
376 | 366 |
icon: ( |
377 |
- <SpeakerPhoneIcon |
|
378 |
- sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} |
|
367 |
+ <ContactSupportIcon |
|
368 |
+ sx={{ fontSize: 20, marginRight: 1 }} |
|
379 | 369 |
/> |
380 | 370 |
), |
381 | 371 |
}, |
... | ... | @@ -385,8 +375,7 @@ |
385 | 375 |
<Routes> |
386 | 376 |
<Route path="/GuardianStatistics" element={<GuardianStatistics />}></Route> |
387 | 377 |
<Route path="/Main" element={<Main_guardian />}></Route> |
388 |
- <Route path="/QuestionSelect" element={<QuestionSelect />}></Route> |
|
389 |
- <Route path="/QuestionConfirm/:qnaIdx" element={<QuestionConfirm />}></Route> |
|
378 |
+ <Route path="/QandASelect" element={<QandASelect />}></Route> |
|
390 | 379 |
|
391 | 380 |
</Routes> |
392 | 381 |
); |
--- client/views/pages/equipment/EquipmentManagementSelect.jsx
+++ client/views/pages/equipment/EquipmentManagementSelect.jsx
... | ... | @@ -498,7 +498,7 @@ |
498 | 498 |
content: ( |
499 | 499 |
<div> |
500 | 500 |
<div className="flex equip-tab"> |
501 |
- <SubTitle explanation={"장비 클릭 시 지난 매칭이력을 확인할 수 있습니다."} /> |
|
501 |
+ <SubTitle explanation={"납품 가능한 장비 목록입니다."} /> |
|
502 | 502 |
<div className="btn-wrap flex-end margin-bottom "> |
503 | 503 |
{isEquipmentDelivery |
504 | 504 |
? <> |
... | ... | @@ -597,7 +597,7 @@ |
597 | 597 |
className={item['government_id'] == org['government_id'] ? "active" : ""}> |
598 | 598 |
{item['government_name']} |
599 | 599 |
</a> |
600 |
- {item['agencyList'] != undefined && item['agencyList'] != null ? |
|
600 |
+ {/* {item['agencyList'] != undefined && item['agencyList'] != null ? |
|
601 | 601 |
<ul style={{marginLeft: '15px'}}> |
602 | 602 |
{item['agencyList'].map((item2, idx2) => { return ( |
603 | 603 |
<li style={{margin: '10px 0px'}} key={idx2}> |
... | ... | @@ -610,7 +610,7 @@ |
610 | 610 |
)})} |
611 | 611 |
</ul> |
612 | 612 |
: null |
613 |
- } |
|
613 |
+ } */} |
|
614 | 614 |
</li> |
615 | 615 |
)})} |
616 | 616 |
</ul> |
... | ... | @@ -618,7 +618,7 @@ |
618 | 618 |
</div> |
619 | 619 |
<div className="right"> |
620 | 620 |
<div className="flex equip-tab"> |
621 |
- <SubTitle explanation={"장비 클릭 시 지난 매칭이력을 확인할 수 있습니다."} /> |
|
621 |
+ <SubTitle explanation={"선택한 기관에 납품된 장비 목록입니다."} /> |
|
622 | 622 |
<div className="btn-wrap flex-end margin-bottom "> |
623 | 623 |
{/* <button className={"btn-small gray-btn"} onClick={() => {modalEquipmentOpen()}}>등록</button> */} |
624 | 624 |
</div> |
--- client/views/pages/org/OrgSelect.jsx
+++ client/views/pages/org/OrgSelect.jsx
... | ... | @@ -583,7 +583,9 @@ |
583 | 583 |
<th>관리대상자(명)</th> |
584 | 584 |
<th>주소</th> |
585 | 585 |
<th>대표연락처</th> |
586 |
- <th>시행기관조회</th> |
|
586 |
+ {state.loginUser['authority'] == 'ROLE_ADMIN' ? |
|
587 |
+ <th>시행기관조회</th> |
|
588 |
+ : null} |
|
587 | 589 |
{/* <th>장비관리</th> */} |
588 | 590 |
<th>사용자관리</th> |
589 | 591 |
<th>관리</th> |
... | ... | @@ -601,16 +603,18 @@ |
601 | 603 |
<td data-label="관리 대상자(명)">{item['senior_user_count']}</td> |
602 | 604 |
<td data-label="주소">{item['government_address']}</td> |
603 | 605 |
<td data-label="대표 연락처">{item['government_phonenumber']}</td> |
604 |
- <td> |
|
605 |
- <button className={"btn-small lightgray-btn"} onClick={() => { |
|
606 |
- government.government = item; |
|
607 |
- setGovernment({...government}); |
|
608 |
- agency.search['government_id'] = item['government_id']; |
|
609 |
- agency.search['ageny_id'] = null; |
|
610 |
- setAgency({...agency}); |
|
611 |
- agencySelectList(); |
|
612 |
- }}>시행기관조회</button> |
|
613 |
- </td> |
|
606 |
+ {state.loginUser['authority'] == 'ROLE_ADMIN' ? |
|
607 |
+ <td> |
|
608 |
+ <button className={"btn-small lightgray-btn"} onClick={() => { |
|
609 |
+ government.government = item; |
|
610 |
+ setGovernment({...government}); |
|
611 |
+ agency.search['government_id'] = item['government_id']; |
|
612 |
+ agency.search['ageny_id'] = null; |
|
613 |
+ setAgency({...agency}); |
|
614 |
+ agencySelectList(); |
|
615 |
+ }}>시행기관조회</button> |
|
616 |
+ </td> |
|
617 |
+ : null} |
|
614 | 618 |
{/* <td> |
615 | 619 |
<button className={"btn-small gray-btn"} onClick={() => {userManagementPage(item['government_id'], null, 'ROLE_GOVERNMENT')}}>장비관리</button> |
616 | 620 |
</td> */} |
... | ... | @@ -627,7 +631,7 @@ |
627 | 631 |
)})} |
628 | 632 |
{CommonUtil.isEmpty(government.governmentList) ? |
629 | 633 |
<tr> |
630 |
- <td colSpan={12}>조회된 데이터가 없습니다</td> |
|
634 |
+ <td colSpan={state.loginUser['authority'] == 'ROLE_ADMIN' ? 12 : 11}>조회된 데이터가 없습니다</td> |
|
631 | 635 |
</tr> |
632 | 636 |
: null} |
633 | 637 |
</tbody> |
--- client/views/pages/user_management/UserAuthoriySelect_agency.jsx
... | ... | @@ -1,246 +0,0 @@ |
1 | -import React from "react"; | |
2 | -import Table from "../../component/Table.jsx"; | |
3 | -import Button from "../../component/Button.jsx"; | |
4 | -import SubTitle from "../../component/SubTitle.jsx"; | |
5 | -import Modal_SeniorInsert from "../../component/Modal_SeniorInsert.jsx"; | |
6 | -import { useNavigate } from "react-router"; | |
7 | -import Pagination from "../../component/Pagination.jsx"; | |
8 | - | |
9 | -export default function UserAuthoriySelect_agency() { | |
10 | - // 화면 진입 시 탭 별 노출될 리스트 초기화 | |
11 | - const [seniortList, setSeniorList] = React.useState([]); | |
12 | - const [seniorMyList, setSeniorMyList] = React.useState([]); | |
13 | - const [addSenior, setAddSenior] = React.useState(true); //추가된 시니어가 있는지 확인 | |
14 | - | |
15 | - //category 설정 초기화 | |
16 | - const [selectUserCode, setSelectUserCode] = React.useState("전체"); | |
17 | - const [selectUserData, setSelectUserData] = React.useState("이름"); | |
18 | - | |
19 | - //-------- 페이징 작업 설정 시작 --------// | |
20 | - const limit = 15; // 페이지당 보여줄 공지 개수 | |
21 | - const [page, setPage] = React.useState(1); //page index | |
22 | - const offset = (page - 1) * limit; //게시물 위치 계산 | |
23 | - const [myUserTotal, setMyUserTotal] = React.useState(0); //최대길이 넣을 변수 | |
24 | - const [userTotal, setUserTotal] = React.useState(0); //최대길이 넣을 변수 | |
25 | - //-------- 페이징 작업 설정 끝 --------// | |
26 | - | |
27 | - // ------ 대상자 영역 클릭시 저장될 데이터 handler ------// | |
28 | - const handleSelectUserCode = (e) => { | |
29 | - console.log("e.target.value : ", e.target.value) | |
30 | - setSelectUserCode(e.target.value); | |
31 | - }; | |
32 | - const handleSelectUserData = (e) => { | |
33 | - console.log("e.target.value : ", e.target.value) | |
34 | - setSelectUserData(e.target.value); | |
35 | - }; | |
36 | - | |
37 | - // 자신이 속한 기관 시니어 보기 | |
38 | - const getSelectSeniorList = () => { | |
39 | - fetch("/user/selectUserList.json", { | |
40 | - method: "POST", | |
41 | - headers: { | |
42 | - 'Content-Type': 'application/json; charset=UTF-8' | |
43 | - }, | |
44 | - body: JSON.stringify({ | |
45 | - agency_id: 'AGENCY01', | |
46 | - authority: 'SENIOR01', | |
47 | - }), | |
48 | - }).then((response) => response.json()).then((data) => { | |
49 | - const rowData = data; | |
50 | - | |
51 | - console.log(data); | |
52 | - setSeniorList(rowData); | |
53 | - setUserTotal(rowData.length); | |
54 | - setAddSenior(false); | |
55 | - | |
56 | - | |
57 | - }).catch((error) => { | |
58 | - console.log('getSelectSeniorList() /user/selectUserList.json error : ', error); | |
59 | - }); | |
60 | - }; | |
61 | - // 내 시니어 리스트 보기 | |
62 | - const getSelectMySeniorList = () => { | |
63 | - fetch("/user/selectMyUserList.json", { | |
64 | - method: "POST", | |
65 | - headers: { | |
66 | - 'Content-Type': 'application/json; charset=UTF-8' | |
67 | - }, | |
68 | - body: JSON.stringify({ | |
69 | - user_id : 'agency_user', | |
70 | - agency_id : 'AGENCY01', | |
71 | - authority : 'SENIOR01', | |
72 | - }), | |
73 | - }).then((response) => response.json()).then((data) => { | |
74 | - const rowData = data; | |
75 | - if(addSenior || rowData.length !=data.length){ | |
76 | - console.log(data); | |
77 | - setSeniorMyList(rowData); | |
78 | - setMyUserTotal(rowData.length); | |
79 | - setAddSenior(false); | |
80 | - } | |
81 | - }).catch((error) => { | |
82 | - console.log('getSubjectMySelect() /user/selectMyUserList.json error : ', error); | |
83 | - }); | |
84 | - }; | |
85 | - | |
86 | - const navigate = useNavigate(); | |
87 | - const [modalOpen, setModalOpen] = React.useState(false); | |
88 | - const openModal = () => { | |
89 | - setModalOpen(true); | |
90 | - }; | |
91 | - const [modalOpen2, setModalOpen2] = React.useState(false); | |
92 | - const openModal2 = () => { | |
93 | - setModalOpen2(true); | |
94 | - }; | |
95 | - const [modalOpen3, setModalOpen3] = React.useState(false); | |
96 | - const openModal3 = () => { | |
97 | - setModalOpen3(true); | |
98 | - }; | |
99 | - | |
100 | - // const insertBtn = (id) => { | |
101 | - // if (id == 2) { | |
102 | - // return ( | |
103 | - // <Button | |
104 | - // className={"btn-small gray-btn"} | |
105 | - // btnName={"등록"} | |
106 | - // onClick={() => { | |
107 | - // navigate("/SeniorInsert"); | |
108 | - // }} | |
109 | - // /> | |
110 | - // ) | |
111 | - // } | |
112 | - // }; | |
113 | - | |
114 | - const thead1 = [ | |
115 | - "No", | |
116 | - "대상자 이름", | |
117 | - "대상자 연락처", | |
118 | - "성별", | |
119 | - "생년월일", | |
120 | - "주소", | |
121 | - "보호자", | |
122 | - | |
123 | - ]; | |
124 | - const key1 = [ | |
125 | - // "No", "name", "Id", "call", "gender", "birth", "address", "management" | |
126 | - "rn", | |
127 | - "user_name", | |
128 | - "user_phonenumber", | |
129 | - "user_gender", | |
130 | - "user_birth", | |
131 | - "user_address", | |
132 | - ]; | |
133 | - | |
134 | - const thead2 = [ | |
135 | - "No", | |
136 | - "대상자 이름", | |
137 | - "대상자 연락처", | |
138 | - "성별", | |
139 | - "생년월일", | |
140 | - "주소", | |
141 | - "담당자", | |
142 | - "보호자", | |
143 | - ]; | |
144 | - | |
145 | - const key2 = [ | |
146 | - "rn", | |
147 | - "user_name", | |
148 | - "user_phonenumber", | |
149 | - "user_gender", | |
150 | - "user_birth", | |
151 | - "user_address", | |
152 | - ]; | |
153 | - | |
154 | - const data = [ | |
155 | - { | |
156 | - id: 1, | |
157 | - title: "내가 관리하는 대상자", | |
158 | - description: ( | |
159 | - | |
160 | - <Table | |
161 | - className={"protector-user"} | |
162 | - head={thead1} | |
163 | - contents={seniorMyList} | |
164 | - contentKey={key1} | |
165 | - view={"mySenior"} | |
166 | - offset={offset} | |
167 | - limit={limit} | |
168 | - /> | |
169 | - ), | |
170 | - }, | |
171 | - { | |
172 | - id: 2, | |
173 | - title: "전체 대상자", | |
174 | - description: ( | |
175 | - <Table | |
176 | - className={"caregiver-user"} | |
177 | - head={thead2} | |
178 | - contents={seniortList} | |
179 | - contentKey={key2} | |
180 | - view={"allSenior"} | |
181 | - offset={offset} | |
182 | - limit={limit} | |
183 | - /> | |
184 | - ), | |
185 | - }, | |
186 | - ]; | |
187 | - | |
188 | - const [index, setIndex] = React.useState(1); | |
189 | - | |
190 | - | |
191 | - React.useEffect(() => { | |
192 | - getSelectSeniorList(); | |
193 | - getSelectMySeniorList(); | |
194 | - | |
195 | - }, [addSenior]) | |
196 | - return ( | |
197 | - <main> | |
198 | - <Modal_SeniorInsert open={modalOpen3} setModalOpen3={setModalOpen3} setAddSenior={setAddSenior} header="대상자 등록"/> | |
199 | - <div className="tab-container"> | |
200 | - <ul className="tab-menu flex-start"> | |
201 | - {data.map((item) => ( | |
202 | - <li | |
203 | - key={item.id} | |
204 | - className={index === item.id ? "active" : null} | |
205 | - onClick={() => {setIndex(item.id); setPage(1)}} | |
206 | - > | |
207 | - {item.title} | |
208 | - </li> | |
209 | - ))} | |
210 | - </ul> | |
211 | - <div className="content-wrap"> | |
212 | - <div className="search-management flex-start margin-bottom2"> | |
213 | - <select name="management-agency" onChange={handleSelectUserCode} value={selectUserCode}> | |
214 | - <option value="기관전체">전체</option> | |
215 | - <option value="대상자">대상자</option> | |
216 | - <option value="담당자">담당자</option> | |
217 | - <option value="보호자">보호자</option> | |
218 | - </select> | |
219 | - <select onChange={handleSelectUserData} value={selectUserData}> | |
220 | - <option value="이름">이름</option> | |
221 | - <option value="아이디">아이디</option> | |
222 | - </select> | |
223 | - <input type="text" className="senior-search"/> | |
224 | - <Button | |
225 | - className={"btn-small gray-btn"} | |
226 | - btnName={"검색"} | |
227 | - /> | |
228 | - </div> | |
229 | - <div className="btn-wrap flex-end"> | |
230 | - <Button className={"btn-small gray-btn"} btnName={"등록"} onClick={openModal3} /> | |
231 | - </div> | |
232 | - <ul className="tab-content"> | |
233 | - {data | |
234 | - .filter((item) => index === item.id) | |
235 | - .map((item) => ( | |
236 | - <li>{item.description}</li> | |
237 | - ))} | |
238 | - </ul> | |
239 | - <div> | |
240 | - <Pagination total={index === 1 ? myUserTotal:userTotal} limit={limit} page={page} setPage={setPage} /> | |
241 | - </div> | |
242 | - </div> | |
243 | - </div> | |
244 | - </main> | |
245 | - ); | |
246 | -} |
--- client/views/pages/user_management/UserAuthoriySelect.jsx
+++ client/views/pages/user_management/UserSelect.jsx
... | ... | @@ -1,18 +1,12 @@ |
1 |
-import React, { useState } from "react"; |
|
1 |
+import React from "react"; |
|
2 | 2 |
import { useNavigate, useLocation } from "react-router"; |
3 | 3 |
import { useSelector } from "react-redux"; |
4 | 4 |
|
5 | 5 |
import ContentTitle from "../../component/ContentTitle.jsx"; |
6 | 6 |
import SubTitle from "../../component/SubTitle.jsx"; |
7 |
-import Modal from "../../component/Modal.jsx"; |
|
8 |
-import Table from "../../component/Table.jsx"; |
|
9 |
-import Button from "../../component/Button.jsx"; |
|
10 |
-import Category from "../../component/Category.jsx"; |
|
11 | 7 |
import Modal_SeniorInsert from "../../component/Modal_SeniorInsert.jsx"; |
12 |
-import { width } from "@mui/system"; |
|
13 | 8 |
import Modal_Guardian from "../../component/Modal_Guardian.jsx"; |
14 | 9 |
import Pagination from "../../component/Pagination.jsx"; |
15 |
-import Dot from "../../../resources/files/icon/dot.png"; |
|
16 | 10 |
import House from "../../../resources/files/icon/house.png"; |
17 | 11 |
import Arrow from "../../../resources/files/icon/arrow.png"; |
18 | 12 |
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?