최정우 최정우 2023-04-13
230413 최정우 사용자 및 장비 관리 완료
@bf10a761b06080296586e70afb229df537a597aa
client/views/layout/Menu.jsx
--- client/views/layout/Menu.jsx
+++ client/views/layout/Menu.jsx
@@ -56,7 +56,9 @@
           </ul>
         </div>
         <div className="bottom-section flex-center" style={{width: '100%'}}>
-            {state.loginUser['authority'] == 'ROLE_ADMIN' ? 
+            {state.loginUser['authority'] == 'ROLE_ADMIN'
+              || state.loginUser['authority'] == 'ROLE_GOVERNMENT'
+              || state.loginUser['authority'] == 'ROLE_AGENCY' ? 
               <div className="info-id" >
                 <span onClick={() => {
                   navigate("/Join");
client/views/pages/AppRoute.jsx
--- client/views/pages/AppRoute.jsx
+++ client/views/pages/AppRoute.jsx
@@ -33,7 +33,8 @@
 import VisitInsert from "./visit/visit/VisitInsert.jsx";
 import VisitSelectOne from "./visit/visit/VisitSelectOne.jsx";
 import EquipmentRentalInsert from "./equipment/EquipmentRentalInsert.jsx";
-import EquipmentManagementSelect from "./equipment/EquipmentManagementSelect.jsx";
+import EquipmentSelect from "./equipment/EquipmentSelect.jsx";
+import GovernmentEquipmentSelect from "./equipment/GovernmentEquipmentSelect.jsx";
 import EquipmentManagementSelectOne from "./equipment/EquipmentManagementSelectOne.jsx";
 import UserSelect from "./user_management/UserSelect.jsx";
 import AgencySeniorSelect from "./user_management/AgencySeniorSelect.jsx";
@@ -86,7 +87,7 @@
   },
   {
     title: "장비 관리",
-    path: "/EquipmentManagementSelect",
+    path: "/EquipmentSelect",
     icon: (
       <SpeakerPhoneIcon
         sx={{ fontSize: 20, marginRight: 1 }}
@@ -132,7 +133,7 @@
       <Route path="/Main" element={<Main />}></Route>
       <Route path="/EquipmentRentalInsert" element={<EquipmentRentalInsert />}></Route>
       <Route path="/EquipmentManagementInsert" element={<EquipmentManagementInsert />}></Route>
-      <Route path="/EquipmentManagementSelect" element={<EquipmentManagementSelect />}></Route>
+      <Route path="/EquipmentSelect" element={<EquipmentSelect />}></Route>
       <Route path="/EquipmentManagementSelectOne" element={<EquipmentManagementSelectOne />}></Route>
       <Route path="/MedicineCareSelectOne" element={<MedicineCareSelectOne />}></Route>
       <Route path="/TemperatureManagementSelectOne" element={<TemperatureManagementSelectOne />}></Route>      
@@ -180,14 +181,15 @@
     ],
   },
   {
-    title: "문의 현황 관리",
+    title: "장비 관리",
+    path: "/GovernmentEquipmentSelect",
     icon: (
-      <ContactSupportIcon
+      <SpeakerPhoneIcon
         sx={{ fontSize: 20, marginRight: 1 }}
       />
     ),
   },
-  {
+  /* {
     title: "대상자 관리",
     icon: (
       <Diversity1Icon
@@ -204,8 +206,8 @@
         path:"/Medicalcare",
       },
     ],
-  },
-  {
+  }, */
+  /* {
     title: "설정 관리",
     icon: (
       <SettingsIcon sx={{ fontSize: 20, marginRight: 1 }} />
@@ -215,12 +217,27 @@
         title: "위험 기준 관리",
         path: "/RiskSet",
       },
-      /* {
+      {
         title: "사용자 권한 관리",
         path: "/AuthorityManagement",
-      }, */
+      },
     ],
+  }, */
+  {
+    title: "위험 기준 관리",
+    icon: (
+      <SettingsIcon sx={{ fontSize: 20, marginRight: 1 }} />
+    ),
+    path: "/RiskSet"
   },
+  {
+    title: "문의 현황 관리",
+    icon: (
+      <ContactSupportIcon
+        sx={{ fontSize: 20, marginRight: 1 }}
+      />
+    ),
+  }
 ];
 function GovernmentAppRoute() {
   return (
@@ -250,6 +267,7 @@
       <Route path="/UserEdit" element={<UserEdit />}></Route>
       <Route path="/AgentSelectOne" element={<AgentSelectOne />}></Route>
       <Route path="/OrgSelect" element={<OrgSelect />}></Route>
+      <Route path="/GovernmentEquipmentSelect" element={<GovernmentEquipmentSelect />}></Route>
     </Routes>
   );
 }
@@ -267,6 +285,13 @@
     ),
   },
   {
+    title: "장비 사용 현황",
+    path: "/GovernmentEquipmentSelect",
+    icon: (
+      <SpeakerPhoneIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
+    ),
+  },
+  {
     title: "건강 관리",
     path:"/Healthcare",
     icon: (
@@ -278,13 +303,6 @@
     path:"/Medicalcare",
     icon: (
       <LocalHospitalIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
-    ),
-  },
-  {
-    title: "장비 관리",
-    path: "/EquipmentManagementSelect",
-    icon: (
-      <SpeakerPhoneIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} />
     ),
   },
   {
@@ -327,12 +345,8 @@
         element={<EquipmentRentalInsert />}
       ></Route>
       <Route
-        path="/EquipmentManagementSelect"
-        element={<EquipmentManagementSelect />}
-      ></Route>
-      <Route
-        path="/EquipmentManagementSelectOne"
-        element={<EquipmentManagementSelectOne />}
+        path="/GovernmentEquipmentSelect"
+        element={<GovernmentEquipmentSelect />}
       ></Route>
       <Route
         path="/QandASelect"
client/views/pages/equipment/EquipmentSelect.jsx (Renamed from client/views/pages/equipment/EquipmentManagementSelect.jsx)
--- client/views/pages/equipment/EquipmentManagementSelect.jsx
+++ client/views/pages/equipment/EquipmentSelect.jsx
@@ -11,7 +11,7 @@
 
 import CommonUtil from "../../../resources/js/CommonUtil.js";
 
-export default function EquipmentManagementSelect() {
+export default function EquipmentSelect() {
 	
 	const navigate = useNavigate();
 
@@ -358,8 +358,8 @@
 		}).then((response) => response.json()).then((data) => {
 			console.log("장비 납품 결과(건수) : ", data);
 			if (data > 0) {
-				modalDeliveryClose()
 				alert("납품완료");
+				modalDeliveryClose()
 				equipmentSearching();
 				setIsEquipmentDelivery(false);
 				setTabIndex(1);
@@ -417,13 +417,11 @@
 			stockEquipmentSearch[key] = equipmentSearch[key];
 			deliveryEquipmentSearch[key] = equipmentSearch[key];
 		}
+		setStockEquipmentSearch({...stockEquipmentSearch});
+		setDeliveryEquipmentSearch({...deliveryEquipmentSearch});
+
 		stockEquipmentSelectList(1);
 		deliveryEquipmentSelectList(1);
-
-		const newStockEquipmentSearch = {...stockEquipmentSearch};
-		setStockEquipmentSearch(newStockEquipmentSearch);
-		const newDeliveryEquipmentSearch = {...deliveryEquipmentSearch};
-		setDeliveryEquipmentSearch(newDeliveryEquipmentSearch);
 	}
 	const equipmentSearchingEnter = (key) => {
 		if (key == 'Enter') {
 
client/views/pages/equipment/GovernmentEquipmentSelect.jsx (added)
+++ client/views/pages/equipment/GovernmentEquipmentSelect.jsx
@@ -0,0 +1,452 @@
+import React from "react";
+import { useNavigate } from "react-router";
+import { useSelector } from "react-redux";
+import DetailTitle from "../../component/DetailTitle.jsx";
+import SubTitle from "../../component/SubTitle.jsx";
+import Modal from "../../component/Modal.jsx";
+
+import House from "../../../resources/files/icon/house.png";
+import Arrow from "../../../resources/files/icon/arrow.png";
+import Pagination from "../../component/Pagination.jsx";
+
+import CommonUtil from "../../../resources/js/CommonUtil.js";
+
+export default function GovernmentEquipmentSelect() {
+	
+	const navigate = useNavigate();
+
+	//전역 변수 저장 객체
+	const state = useSelector((state) => {return state});
+	const defaultGovernmentId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id'];
+	const defaultAgencyId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id'];
+
+
+	//기관 계층 구조 목록
+	const [orgListOfHierarchy, setOrgListOfHierarchy] = React.useState([]);
+	//기관(관리, 시행) 계층 구조 목록 조회
+	const orgSelectListOfHierarchy = () => {
+		fetch("/org/orgSelectListOfHierarchy.json", {
+			method: "POST",
+			headers: {
+			'Content-Type': 'application/json; charset=UTF-8'
+			},
+			body: JSON.stringify({
+				'government_id': defaultGovernmentId,
+				'agency_id': defaultAgencyId
+			}),
+		}).then((response) => response.json()).then((data) => {
+			console.log("기관(관리, 시행) 계층 구조 목록 조회 : ", data);
+			setOrgListOfHierarchy(data);
+		}).catch((error) => {
+			console.log('orgSelectListOfHierarchy() /org/orgSelectListOfHierarchy.json error : ', error);
+		});
+	};
+	//검색 변수 (초기화값)
+	const [org, setOrg] = React.useState({
+		'government_id': defaultGovernmentId,
+		'agency_id': defaultAgencyId,
+	});
+	//올잇메디 선택
+	const adminChange = () => {
+		org['government_id'] = null;
+		org['agency_id'] = null;
+		setOrg({...org});
+	}
+	//관리 기관 선택
+	const governmentChange = (government_id) => {
+		org['government_id'] = government_id;
+		org['agency_id'] = null;
+		setOrg({...org});
+		rentalEquipmentSelectList(1);
+	}
+	//시행 기관 선택
+	const agencyChange = (government_id, agency_id) => {
+		org['government_id'] = government_id;
+		org['agency_id'] = agency_id;
+		setOrg({...org});
+		rentalEquipmentSelectList(1);
+	}
+
+
+	
+	// 시스템 코드 - 장비 상태
+	const [equipmentStates, setEquipmentStates] = React.useState({});
+	// 시스템 코드 - 장비 상태 조회
+	const equipmentStatesSelect = () => {
+		console.log('equipmentStatesSelect Function Run');
+
+		//fetch post
+		fetch("/common/systemCode/equipmentStatesSelect.json", {
+			method: "POST",
+			headers: {
+				'Content-Type': 'application/json; charset=UTF-8'
+			},
+			body: JSON.stringify({})
+		}).then((response) => response.json()).then((data) => {
+			console.log('equipmentStatesSelect response : ', data);
+			setEquipmentStates(data);
+		}).catch((error) => {
+			console.log('equipmentStatesSelect error : ', error);
+		});
+	}
+	
+
+
+	
+	//공통 검색 정보
+	const [equipmentSearch, setEquipmentSearch] = React.useState({
+		'equipment_state': null,
+
+		'searchType': null,
+		'searchText': null,
+	});
+	//장비 정보 변경
+	const equipmentSearchChange = (targetKey, value) => {
+		equipmentSearch[targetKey] = value;
+		setEquipmentSearch({...equipmentSearch});
+	}
+	//장비 검색
+	const equipmentSearching = () => {
+		for (const key in equipmentSearch) {
+			deliveryEquipmentSearch[key] = equipmentSearch[key];
+			rentalEquipmentSearch[key] = equipmentSearch[key];
+		}
+		setDeliveryEquipmentSearch({...deliveryEquipmentSearch});
+		setRentalEquipmentSearch({...rentalEquipmentSearch});
+
+		deliveryEquipmentSelectList(1);
+		rentalEquipmentSelectList(1);
+	}
+	const equipmentSearchingEnter = (key) => {
+		if (key == 'Enter') {
+			equipmentSearching();
+		} else {
+			return;
+		}
+	}
+
+	//입고 및 미대여 장비 검색 정보
+	const [deliveryEquipmentSearch, setDeliveryEquipmentSearch] = React.useState({
+		'government_id': defaultGovernmentId,
+		'senior_id': 'IS_NULL',
+		'currentPage': 1,
+		'perPage': 10,
+	});
+	//입고 및 미대여 목록
+	const [deliveryEquipment, setDeliveryEquipment] = React.useState({equipmentList: [], equipmentListCount: 0});
+	//입고 및 미대여 목록 조회
+	const deliveryEquipmentSelectList = (currentPage) => {
+		deliveryEquipmentSearch.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
+		setDeliveryEquipmentSearch({...deliveryEquipmentSearch});
+
+		fetch("/equipment/equipmentSelectList.json", {
+			method: "POST",
+			headers: {
+				'Content-Type': 'application/json; charset=UTF-8'
+			},
+			body: JSON.stringify(deliveryEquipmentSearch)
+		}).then((response) => response.json()).then((data) => {
+			console.log('deliveryEquipmentSelectList response : ', data);
+			setDeliveryEquipment(data);
+		}).catch((error) => {
+			console.log('deliveryEquipmentSelectList error : ', error);
+		});
+	}
+
+
+	//입고 및 미대여 장비 검색 정보
+	const [rentalEquipmentSearch, setRentalEquipmentSearch] = React.useState({
+		'government_id': defaultGovernmentId,
+		'agency_id': org['agency_id'],
+		'senior_id': 'IS_NOT_NULL',
+		'currentPage': 1,
+		'perPage': 10,
+	});
+	//입고 및 미대여 목록
+	const [rentalEquipment, setRentalEquipment] = React.useState({equipmentList: [], equipmentListCount: 0});
+	//입고 및 미대여 목록 조회
+	const rentalEquipmentSelectList = (currentPage) => {
+		rentalEquipmentSearch.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
+		rentalEquipmentSearch['agency_id'] = org['agency_id'];
+		setRentalEquipmentSearch({...rentalEquipmentSearch});
+
+		fetch("/equipment/equipmentSelectList.json", {
+			method: "POST",
+			headers: {
+				'Content-Type': 'application/json; charset=UTF-8'
+			},
+			body: JSON.stringify(rentalEquipmentSearch)
+		}).then((response) => response.json()).then((data) => {
+			console.log('rentalEquipmentSelectList response : ', data);
+			setRentalEquipment(data);
+		}).catch((error) => {
+			console.log('rentalEquipmentSelectList error : ', error);
+		});
+	}
+
+	
+	//Mounted
+	React.useEffect(() => {
+		orgSelectListOfHierarchy();
+		equipmentStatesSelect();
+		equipmentSearching();
+	}, []);
+
+
+	//대여(사용) 중 장비 목록 내용
+	const rentalContent = (
+		<>
+			<table class="caregiver-user protector-user">
+				<thead>
+					<tr>
+						<th>No </th>
+						<th>모델명</th>
+						<th>시리얼넘버</th>
+						<th>입고일자</th>
+						<th>장비상태</th>
+						<th>기관</th>
+						<th>대여시행자</th>
+						<th>대여일</th>
+						<th>장비사용대상자</th>
+					</tr>
+				</thead>
+				<tbody>
+					{rentalEquipment.equipmentList.map((item, idx) => { return (
+						<tr>
+							<td data-label="No">{rentalEquipment.equipmentListCount - idx - (rentalEquipmentSearch.currentPage - 1) * rentalEquipmentSearch.perPage}</td>
+							<td data-label="모델명">{item['equipment_name']}</td>
+							<td data-label="시리얼넘버">{item['equipment_serial_number']}</td>
+							<td data-label="입고일자">{item['equipment_stock_date']}</td>
+							<td data-label="장비상태">{equipmentStates[item['equipment_state']]}</td>
+							<td>{item['agency_name']}</td>
+							<td data-label="대여시행자">
+								{item['rental_detail_insert_user_name']}
+								({item['rental_detail_insert_user_id']})
+							</td>
+							<td data-label="대여일">{item['rental_start_date']}</td>
+							<td data-label="장비사용대상자">{item['user_name']}</td>
+						</tr>
+					)})}
+					{CommonUtil.isEmpty(rentalEquipment.equipmentList) ?
+						<tr>
+							<td colSpan={9}>조회된 데이터가 없습니다</td>
+						</tr>
+					: null}
+				</tbody>
+			</table>
+			<Pagination
+				currentPage={rentalEquipmentSearch.currentPage}
+				perPage={rentalEquipmentSearch.perPage}
+				totalCount={rentalEquipment.equipmentListCount}
+				maxRange={5}
+				click={rentalEquipmentSelectList}
+			/>
+		</>
+	);
+	//현재 탭 Index
+	const [tabIndex, setTabIndex] = React.useState(0);
+	//탭 초기화
+	const tab = [{
+		title: `사용가능 장비 (${deliveryEquipment.equipmentListCount})`,
+		content: (
+			<div>
+				<div className="flex equip-tab">
+					<SubTitle explanation={"현재 기관에 입고된 장비 중 돌봄 대상자에게 대여하지 않은 장비 목록입니다."} />
+					<div className="btn-wrap flex-end margin-bottom ">
+						<button className={"btn-small gray-btn"}
+							onClick={() => navigate("/UserSelect", {state: {
+								'government_id': defaultGovernmentId,
+								'agency_id': null,
+								'tabActiveByRoleType': 'ROLE_SENIOR',
+							}})}>대상자에게 장비대여</button>
+					</div>
+				</div>
+				<table class="caregiver-user protector-user">
+					<thead>
+						<tr>
+							<th>No </th>
+							<th>모델명</th>
+							<th>시리얼넘버</th>
+							<th>입고일자</th>
+							<th>장비상태</th>
+						</tr>
+					</thead>
+					<tbody>
+						{deliveryEquipment.equipmentList.map((item, idx) => { return (
+							<tr>
+								<td data-label="No">{deliveryEquipment.equipmentListCount - idx - (deliveryEquipmentSearch.currentPage - 1) * deliveryEquipmentSearch.perPage}</td>
+								<td data-label="모델명">{item['equipment_name']}</td>
+								<td data-label="시리얼넘버">{item['equipment_serial_number']}</td>
+								<td data-label="입고일자">{item['equipment_stock_date']}</td>
+								<td data-label="장비상태">{equipmentStates[item['equipment_state']]}</td>
+							</tr>
+						)})}
+						{CommonUtil.isEmpty(deliveryEquipment.equipmentList) ?
+							<tr>
+								<td colSpan={5}>조회된 데이터가 없습니다</td>
+							</tr>
+						: null}
+					</tbody>
+				</table>
+				<Pagination
+					currentPage={deliveryEquipmentSearch.currentPage}
+					perPage={deliveryEquipmentSearch.perPage}
+					totalCount={deliveryEquipment.equipmentListCount}
+					maxRange={5}
+					click={deliveryEquipmentSelectList}
+				/>
+			</div>
+		)
+	}, {
+		title: `사용중인 장비 (${rentalEquipment.equipmentListCount})`,
+		content: (
+			<div>
+
+				<div className="flex-align-start userauthoriylist gap5">
+					<div className="left">
+						<SubTitle explanation={"기관 리스트"}/>
+						<div style={{fontSize: '16px', marginTop: '0px'}} className="category">
+							{/* {state.loginUser['authority'] == 'ROLE_ADMIN' ?
+								<a onClick={adminChange}
+									className={org['government_id'] == null && org['agency_id'] == null ? "active" : ""}>
+									올잇메디
+								</a>
+							: null} */}
+							<ul style={{marginLeft: '15px'}}>
+							{orgListOfHierarchy.map((item, idx) => { return (
+								<li style={{margin: '10px 0px'}} key={idx}>
+									<span style={{marginRight: '5px'}}><img src={House} alt="" /></span>
+									<a onClick={() => {governmentChange(item['government_id'])}}
+										className={item['government_id'] == org['government_id'] ? "active" : ""}>
+										{item['government_name']}
+									</a>
+									{item['agencyList'] != undefined && item['agencyList'] != null ?
+										<ul style={{marginLeft: '15px'}}>
+										{item['agencyList'].map((item2, idx2) => { return (
+											<li style={{margin: '10px 0px'}} key={idx2}>
+												<span style={{marginRight: '5px'}}><img src={Arrow} alt="" /></span>
+												<a onClick={() => {agencyChange(item['government_id'], item2['agency_id'])}}
+													className={item2['agency_id'] == org['agency_id'] ? "active" : ""}>
+													{item2['agency_name']}
+												</a>
+											</li>
+										)})}
+										</ul>
+										: null
+									}
+								</li>
+							)})}
+							</ul>
+						</div>
+					</div>
+					<div className="right">
+						<div className="flex equip-tab">
+							<SubTitle explanation={"선택한 기관의 돌봄 대상자가 사용중인 장비 목록입니다."} />
+							<div className="btn-wrap flex-end margin-bottom ">
+								{/* <button className={"btn-small gray-btn"} onClick={() => {modalEquipmentOpen()}}>등록</button> */}
+							</div>
+						</div>
+						{rentalContent}
+					</div>
+				</div>
+			</div>
+		)
+	}];
+	
+	
+	return (
+		<main>
+
+			{/* <Modal open={modalDeliveryIsOpen} close={modalDeliveryClose} header="납품 기관 선택">
+				<div className="board-wrap">
+					<div>
+						<div style={{textAlign:'left', fontSize: '16px',margin:'2rem 0'}} className="category">
+							<div className="search-management flex-end margin-bottom2 margin-top">						
+								<div style={{width: '90px', fontWeight: '600'}}>납품일자</div>
+								<input type="date"
+									value={equipmentDelivery['delivery_date']}
+									onChange={(e) => {
+										equipmentDelivery['delivery_date'] = e.target.value;
+										setEquipmentDelivery({...equipmentDelivery})}
+									}/>	
+							</div>
+							<ul style={{marginLeft: '15px'}}>
+							{orgListOfHierarchy.map((item, idx) => { return (
+								<li style={{margin: '10px 0px'}} key={idx}>
+									<span style={{marginRight: '5px'}}><img src={House} alt="" /></span>
+									<a>{item['government_name']}</a>
+									<button onClick={() => {
+										if (confirm(`'${item['government_name']}'에 장비를 납품하시겠습니까?`)) {
+											equipmentDeliveryInsert(item['government_id'])
+										} else {
+											return;
+										}
+									}}>선택</button>
+								</li>
+							)})}
+							</ul>
+						</div>
+					</div>
+				</div>
+			</Modal> */}
+
+
+			<div className="search-management flex-end margin-bottom2 margin-top gap">						
+				<select style={{maxWidth: '150px'}}
+					onChange={(e) => equipmentSearchChange('equipment_state', e.target.value)}>
+					<option value="">상태</option>
+					{Object.keys(equipmentStates).map((key, idx) => { return ( 
+						<option key={key} value={key}>
+							{equipmentStates[key]}
+						</option>
+					)})}
+				</select>
+				<select style={{maxWidth: '150px'}}
+					onChange={(e) => equipmentSearchChange('searchType', e.target.value)}>
+					<option value="">전체</option>
+					<option value="equipment_name">모델명</option>
+					<option value="equipment_serial_number">시리얼넘버</option>
+				</select>
+				<input type="text"
+					value={equipmentSearch.searchText}
+					onChange={(e) => equipmentSearchChange('searchText', e.target.value)}
+					onKeyUp={(e) => equipmentSearchingEnter(e.key)}
+				/>
+				<button className={"btn-small gray-btn"} style={{maxWidth: '150px'}} onClick={equipmentSearching}>검색</button>
+			</div>
+			
+			{CommonUtil.isEmpty(state.loginUser) == false && (state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT')
+				? (
+					<div className="tab-container">
+						<ul className="tab-menu flex-start">
+							{tab.map((item, idx) => { return (
+								<li onClick={() => setTabIndex(idx)} className={idx == tabIndex ? 'active' : null}>
+									{item.title}
+								</li>
+							)})}
+						</ul>
+						<div className="content-wrap">
+							<ul className="tab-content">
+								<li>
+									{tab[tabIndex].content}
+								</li>
+							</ul>
+						</div>
+					</div>
+				) : (
+					<div className="content-wrap">
+						<DetailTitle contentTitle={"장비 사용 현황"} />
+						<div className="board-wrap" style={{ marginTop: "3rem" }} >
+							<div className="btn-wrap margin-bottom">
+								<div className="btn-wrap flex-end margin-bottom ">
+									<button className={"btn-small gray-btn"} onClick={() => navigate("/AgencySeniorSelect")}>대상자 관리</button>
+								</div>
+								{rentalContent}
+							</div>
+						</div>
+					</div>
+				)
+			}
+		</main>
+	);
+}
client/views/pages/join/Join.jsx
--- client/views/pages/join/Join.jsx
+++ client/views/pages/join/Join.jsx
@@ -8,20 +8,30 @@
 export default function Join() {
   const navigate = useNavigate();
   const location = useLocation();
-  let defaultAuthority = CommonUtil.isEmpty(location.state) ? null : location.state['authority'];
-  let defaultAgencyId = CommonUtil.isEmpty(location.state) ? null : location.state['agency_id'];
-  let defaultGovernmentId = CommonUtil.isEmpty(location.state) ? null :location.state['government_id'];
+  const state = useSelector((state) => {return state});
+
+  let defaultAuthority = null;
+  let defaultAgencyId = null;
+  let defaultGovernmentId = null;
+  console.log('location.state : ', location.state);
+  console.log('state.loginUser : ', state.loginUser);
+  if (CommonUtil.isEmpty(location.state) == false) {
+    defaultAuthority = location.state['authority'];
+    defaultAgencyId = location.state['agency_id'];
+    defaultGovernmentId = location.state['government_id'];
+  } else if (CommonUtil.isEmpty(state.loginUser) == false) {
+    defaultAuthority = state.loginUser['authority'];
+    defaultAgencyId = state.loginUser['agency_id'];
+    defaultGovernmentId = state.loginUser['government_id'];
+  } else {
+    defaultAuthority = null;
+    defaultAgencyId = null;
+    defaultGovernmentId = null;
+  }
 
 
 
   /**** 기본 조회 데이터 (시작) ****/
-  //전역 변수 저장 객체
-  const state = useSelector((state) => {return state});
-  defaultAuthority = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['authority'];
-  defaultAgencyId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id'];
-  defaultGovernmentId = CommonUtil.isEmpty(state.loginUser) ? null :state.loginUser['government_id'];
-  
-
   //권한 타입 종류
   const [authorities, setAuthorities] = React.useState([]);
   //권한 타입 종류 목록 조회
@@ -43,12 +53,20 @@
   const [orgListOfHierarchy, setOrgListOfHierarchy] = React.useState([]);
   //기관(관리, 시행) 계층 구조 목록 조회
   const orgSelectListOfHierarchy = () => {
+    const param = {
+      'government_id': defaultGovernmentId,
+      'agency_id': defaultAgencyId
+    };
+    if (CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] == 'ROLE_ADMIN') {
+      param['government_id'] = null;
+      param['agency_id'] = null;
+    }
     fetch("/org/orgSelectListOfHierarchy.json", {
       method: "POST",
       headers: {
         'Content-Type': 'application/json; charset=UTF-8'
       },
-      body: JSON.stringify({'government_id': defaultGovernmentId}),
+      body: JSON.stringify(param),
     }).then((response) => response.json()).then((data) => {
       console.log("기관(관리, 시행) 계층 구조 목록 조회 : ", data);
       setOrgListOfHierarchy(data);
@@ -275,11 +293,17 @@
             <div>
               <div className="flex-start margin-bottom2">
                 <label className="flex25"><span style={{color : "red"}}>*</span>사용자구분</label>
-                <select name="division" id="section" onChange={(e) => {userAuthorityChange(e.target.value)}}>
-                    {CommonUtil.isEmpty(defaultAuthority) == true || defaultAuthority == 'ROLE_ADMIN' ?
+                <select name="division" id="section"
+                  disabled={
+                    CommonUtil.isEmpty(state.loginUser) == false
+                    && state.loginUser['authority'] != 'ROLE_ADMIN'
+                    && state.loginUser['authority'] != 'ROLE_GOVERNMENT'
+                  }
+                  onChange={(e) => {userAuthorityChange(e.target.value)}}>
+                    {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] == 'ROLE_ADMIN' ?
                       <option value="ROLE_ADMIN" selected={user['authority'] == "ROLE_ADMIN"}>시스템 관리자</option>
                     : null}
-                    {CommonUtil.isEmpty(defaultAuthority) == true || defaultAuthority == 'ROLE_ADMIN' || defaultAuthority == 'ROLE_GOVERNMENT' ?
+                    {CommonUtil.isEmpty(state.loginUser) == false && (state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT') ?
                       <option value="ROLE_GOVERNMENT" selected={user['authority'] == "ROLE_GOVERNMENT"}>기관 관리자</option>
                     : null}
                     <option value="ROLE_AGENCY" selected={user['authority'] == "ROLE_AGENCY"}>보호사</option>
@@ -291,7 +315,14 @@
               <div>
                 <div className="flex-start margin-bottom2">
                   <label className="flex25" htmlFor="name"><span style={{color : "red"}}>*</span>관리기관</label>
-                  <select onChange={(e) => {userGovernmentIdChange(e.target.value)}} ref={el => userRef.current['government_id'] = el}>
+                  <select
+                    disabled={
+                      CommonUtil.isEmpty(state.loginUser) == false
+                      && state.loginUser['authority'] != 'ROLE_ADMIN'
+                      && state.loginUser['authority'] != 'ROLE_GOVERNMENT'
+                    }
+                    onChange={(e) => {userGovernmentIdChange(e.target.value)}}
+                    ref={el => userRef.current['government_id'] = el}>
                     <option value={''} selected={user['government_id'] == null}>관리기관선택</option>
                     {orgListOfHierarchy.map((item, idx) => { return (
                       <option key={idx} value={item['government_id']} selected={user['government_id'] == item['government_id']}>
@@ -307,7 +338,14 @@
               <div>
                 <div className="flex-start margin-bottom2">
                   <label className="flex25" htmlFor="name"><span style={{color : "red"}}>*</span>시행기관</label>
-                  <select onChange={(e) => {userAgencyIdChange(e.target.value)}} ref={el => userRef.current['agency_id'] = el}>
+                  <select
+                    disabled={
+                      CommonUtil.isEmpty(state.loginUser['authority']) == false
+                      && state.loginUser['authority'] != 'ROLE_ADMIN'
+                      && state.loginUser['authority'] != 'ROLE_GOVERNMENT'
+                    }
+                    onChange={(e) => {userAgencyIdChange(e.target.value)}}
+                    ref={el => userRef.current['agency_id'] = el}>
                     <option value={''} selected={user['agency_id'] == null}>시행기관선택</option>
                     {getAgencyList().map((item, idx) => { return (
                       <option key={idx} value={item['agency_id']} selected={user['agency_id'] == item['agency_id']}>
client/views/pages/main/Main_agency.jsx
--- client/views/pages/main/Main_agency.jsx
+++ client/views/pages/main/Main_agency.jsx
@@ -49,7 +49,7 @@
           <li className="flex-start">
             <img src={box} alt="" />
             <div className="text">
-              <p>나의 관리 대상자</p>
+              <p>나의 돌봄 대상자</p>
               <p className="peoplecount">40</p>
             </div>
           </li>
client/views/pages/org/OrgSelect.jsx
--- client/views/pages/org/OrgSelect.jsx
+++ client/views/pages/org/OrgSelect.jsx
@@ -403,7 +403,7 @@
 
     //사용자 관리 페이지 이동
     const userManagementPage = (governmentId, agencyId, auth) => {
-        navigate("/UserAuthoriySelect", {state: {
+        navigate("/UserSelect", {state: {
             'government_id': governmentId,
             'agency_id': agencyId,
             'tabActiveByRoleType': auth,
@@ -580,7 +580,7 @@
                                     <th>관리장비개수</th>
                                     <th>관리자(명)</th>
                                     <th>보호사(명)</th>
-                                    <th>관리대상자(명)</th>
+                                    <th>돌봄 대상자(명)</th>
                                     <th>주소</th>
                                     <th>대표연락처</th>
                                     {state.loginUser['authority'] == 'ROLE_ADMIN' ?
@@ -600,7 +600,7 @@
                                     <td data-label="관리 장비 개수">{item['equipment_count']}</td>
                                     <td data-label="관리자(명)">{item['government_user_count']}</td>
                                     <td data-label="보호사(명)">{item['agent_user_count']}</td>
-                                    <td data-label="관리 대상자(명)">{item['senior_user_count']}</td>
+                                    <td data-label="돌봄 대상자(명)">{item['senior_user_count']}</td>
                                     <td data-label="주소">{item['government_address']}</td>
                                     <td data-label="대표 연락처">{item['government_phonenumber']}</td>
                                     {state.loginUser['authority'] == 'ROLE_ADMIN' ?
@@ -687,7 +687,7 @@
                                     <th>관리기관명</th>
                                     <th>기관명</th>
                                     <th>보호사(명)</th>
-                                    <th>관리대상자(명)</th>
+                                    <th>돌봄 대상자(명)</th>
                                     <th>주소</th>
                                     <th>대표연락처</th>
                                     {/* <th>장비관리</th> */}
@@ -703,7 +703,7 @@
                                     <td data-label="관리기관명">{item['government_name']}</td>
                                     <td data-label="기관명">{item['agency_name']}</td>
                                     <td data-label="보호사(명)">{item['agent_user_count']}</td>
-                                    <td data-label="관리 대상자(명)">{item['senior_user_count']}</td>
+                                    <td data-label="돌봄 대상자(명)">{item['senior_user_count']}</td>
                                     <td data-label="주소">{item['agency_address']}</td>
                                     <td data-label="대표 연락처">{item['agency_phonenumber']}</td>
                                     {/* <td>
client/views/pages/senior_management/SeniorSelectOne.jsx
--- client/views/pages/senior_management/SeniorSelectOne.jsx
+++ client/views/pages/senior_management/SeniorSelectOne.jsx
@@ -1,8 +1,12 @@
 import React from "react";
 import { useNavigate, useLocation } from "react-router";
 
+import Modal from "../../component/Modal.jsx";
 import SubTitle from "../../component/SubTitle.jsx";
 import Modal_Guardian from "../../component/Modal_Guardian.jsx";
+import Pagination from "../../component/Pagination.jsx";
+
+import CommonUtil from "../../../resources/js/CommonUtil.js";
 
 
 export default function SeniorSelectOne() {
@@ -39,6 +43,114 @@
   }
 
 
+  //장비 대여 모달 여부
+  const [modalRentalIsOpen, setModalRentalIsOpen] = React.useState(false);
+  //장비 대여 오픈
+  const modalRentalOpen = () => {
+    setModalRentalIsOpen(true);
+  };
+  //장비 대여 닫기
+  const modalRentalClose = () => {
+    setModalRentalIsOpen(false);
+  };
+
+  // 시스템 코드 - 장비 상태
+	const [equipmentStates, setEquipmentStates] = React.useState({});
+	// 시스템 코드 - 장비 상태 조회
+	const equipmentStatesSelect = () => {
+		console.log('equipmentStatesSelect Function Run');
+
+		//fetch post
+		fetch("/common/systemCode/equipmentStatesSelect.json", {
+			method: "POST",
+			headers: {
+				'Content-Type': 'application/json; charset=UTF-8'
+			},
+			body: JSON.stringify({})
+		}).then((response) => response.json()).then((data) => {
+			console.log('equipmentStatesSelect response : ', data);
+			setEquipmentStates(data);
+		}).catch((error) => {
+			console.log('equipmentStatesSelect error : ', error);
+		});
+	}
+  
+  //입고 및 미대여 장비 검색 정보
+	const [deliveryEquipmentSearch, setDeliveryEquipmentSearch] = React.useState({
+		'government_id': location.state['government_id'],
+		'senior_id': 'IS_NULL',
+		'currentPage': 1,
+		'perPage': 10,
+	});
+	//입고 및 미대여 목록
+	const [deliveryEquipment, setDeliveryEquipment] = React.useState({equipmentList: [], equipmentListCount: 0});
+	//입고 및 미대여 목록 조회
+	const deliveryEquipmentSelectList = (currentPage) => {
+		deliveryEquipmentSearch.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
+		setDeliveryEquipmentSearch({...deliveryEquipmentSearch});
+
+		fetch("/equipment/equipmentSelectList.json", {
+			method: "POST",
+			headers: {
+				'Content-Type': 'application/json; charset=UTF-8'
+			},
+			body: JSON.stringify(deliveryEquipmentSearch)
+		}).then((response) => response.json()).then((data) => {
+			console.log('deliveryEquipmentSelectList response : ', data);
+			setDeliveryEquipment(data);
+		}).catch((error) => {
+			console.log('deliveryEquipmentSelectList error : ', error);
+		});
+	}
+
+
+  //장비 대여 등록 정보
+  const [equipmentRental, setEquipmentRental] = React.useState({
+    'senior_id': location.state['senior_id'],
+    'rental_idx': 0,
+    'rental_start_date': CommonUtil.getDate(),
+    'rental_end_date': null,
+    'rental_return_date': null 
+  });
+
+  //장비 대여 등록
+  const equipmentRentalInsert = (equipment) => {
+    if (CommonUtil.isEmpty(equipmentRental['rental_start_date'])) {
+			alert("대여 시작일을 선택해 주세요.");
+			return;
+		}
+    if (confirm('해당 장비를 추가하시겠습니까?') == false) {
+      return;
+    }
+
+    equipment['senior_id'] = location.state['senior_id'];
+    equipment['rental_start_date'] = equipmentRental['rental_start_date'];
+    
+    fetch("/equipment/equipmentRentalInsert.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify(equipment),
+    }).then((response) => response.json()).then((data) => {
+      console.log("장비 대여 등록 결과(건수) : ", data);
+			if (data > 0) {
+        alert("추가완료");
+				modalRentalClose();
+        equipmentSelectListBySenior();
+        deliveryEquipmentSelectList(1);
+			} else {
+				alert("장비추가에 실패하였습니다. 관리자에게 문의바랍니다.");
+			}
+    }).catch((error) => {
+      console.log('seniorSelectOne() /user/seniorSelectOne.json error : ', error);
+    });
+  };
+
+
+
+
+
   //시니어 정보
   const [senior, setSenior] = React.useState({
     'user_id': location.state['senior_id'],
@@ -50,8 +162,8 @@
     'user_address': null,
     'user_email': null,
     'authority': 'ROLE_SENIOR',
-    'agency_id': null,
-    'government_id': null,
+    'agency_id': location.state['agency_id'],
+    'government_id': location.state['government_id'],
 
     'senior_id': location.state['senior_id'],
     'care_grade': null,
@@ -76,6 +188,8 @@
       console.log('seniorSelectOne() /user/seniorSelectOne.json error : ', error);
     });
   };
+
+
 
   //대상자의 보호자 목록
   const [guardianListBySenior, setGuardianListBySenior] = React.useState([]);
@@ -123,6 +237,25 @@
   }
 
 
+	//대상자 장비 목록
+	const [equipmentBySenior, setEquipmentBySenior] = React.useState({equipmentList: [], equipmentListCount: 0});
+	//대상자 장비 목록 조회
+	const equipmentSelectListBySenior = () => {
+		fetch("/equipment/equipmentSelectList.json", {
+			method: "POST",
+			headers: {
+				'Content-Type': 'application/json; charset=UTF-8'
+			},
+			body: JSON.stringify(senior)
+		}).then((response) => response.json()).then((data) => {
+			console.log('equipmentSelectListBySenior response : ', data);
+			setEquipmentBySenior(data);
+		}).catch((error) => {
+			console.log('equipmentSelectListBySenior error : ', error);
+		});
+	}
+
+
 
   //가입승인
   const userUpdate = (user, callback) => {
@@ -149,17 +282,80 @@
 
   React.useEffect(() => {
     medicationTimeCodeSelectList();
+    equipmentStatesSelect();
+    deliveryEquipmentSelectList();
+    
     seniorSelectOne();
     guardianSelectListBySenior();
     agentSelectListBySenior();
+    equipmentSelectListBySenior();
   }, [])
 
 
   return (
-    <main>
+  <main>
     <Modal_Guardian open={modalGuardianIsOpen} close={modalGuardianClose} seniorId={location.state['senior_id']}
       guardianBySenior={guardianBySenior}
       guardianManagementCallback={() => {guardianSelectListBySenior(); modalGuardianClose(); setGuardianBySenior({})}}/>
+
+
+    <Modal open={modalRentalIsOpen} close={modalRentalClose} header="사용가능 장비 선택">
+      <div className="board-wrap">
+        <div>
+          <div className="search-management flex-end margin-bottom2 margin-top">						
+            <div style={{width: '120px', fontWeight: '600', fontSize: '16px'}}>대여 시작일</div>
+            <input type="date"
+              value={equipmentRental['rental_start_date']}
+              onChange={(e) => {
+                equipmentRental['rental_start_date'] = e.target.value;
+                setEquipmentRental({...equipmentRental})}
+              }/>	
+          </div>
+          
+          <table class="caregiver-user protector-user">
+            <thead>
+              <tr>
+                <th>No </th>
+                <th>모델명</th>
+                <th>시리얼넘버</th>
+                <th>입고일자</th>
+                <th>장비상태</th>
+                <th>장비선택</th>
+              </tr>
+            </thead>
+            <tbody>
+              {deliveryEquipment.equipmentList.map((item, idx) => { return (
+                <tr>
+                  <td data-label="No">{deliveryEquipment.equipmentListCount - idx - (deliveryEquipmentSearch.currentPage - 1) * deliveryEquipmentSearch.perPage}</td>
+                  <td data-label="모델명">{item['equipment_name']}</td>
+                  <td data-label="시리얼넘버">{item['equipment_serial_number']}</td>
+                  <td data-label="입고일자">{item['equipment_stock_date']}</td>
+                  <td data-label="장비상태">{equipmentStates[item['equipment_state']]}</td>
+                  <td data-label="장비선택">
+                    <button className={"btn-small gray-btn"} onClick={() => {equipmentRentalInsert(item)}}>추가</button>
+                  </td>
+                  
+                </tr>
+              )})}
+              {CommonUtil.isEmpty(deliveryEquipment.equipmentList) ?
+                <tr>
+                  <td colSpan={6}>조회된 데이터가 없습니다</td>
+                </tr>
+              : null}
+            </tbody>
+            </table>
+            <Pagination
+              currentPage={deliveryEquipmentSearch.currentPage}
+              perPage={deliveryEquipmentSearch.perPage}
+              totalCount={deliveryEquipment.equipmentListCount}
+              maxRange={5}
+              click={deliveryEquipmentSelectList}
+            />
+        </div>
+      </div>
+    </Modal>
+
+
     <div className="content-wrap row">
       <SubTitle explanation={"대상자 상세 프로필"} className="margin-bottom" />
       <div className="margin-bottom5">
@@ -279,9 +475,9 @@
                 </td>
               </tr>
             )})}
-            {guardianListBySenior == null || guardianListBySenior.length == 0 ?
+            {CommonUtil.isEmpty(guardianListBySenior) ?
               <tr>
-                <td colSpan={7}>조회된 데이터가 없습니다</td>
+                <td colSpan={8}>조회된 데이터가 없습니다</td>
               </tr>  
             : null}
           </tbody>
@@ -323,7 +519,7 @@
                 </td>
               </tr>
             )})}
-            {agent.agentListBySenior == null || agent.agentListBySenior.length == 0 ?
+            {CommonUtil.isEmpty(agent.agentListBySenior) ?
               <tr>
                 <td colSpan={10}>조회된 데이터가 없습니다</td>
               </tr>
@@ -332,6 +528,43 @@
         </table>
       </div>
 
+
+
+      <SubTitle explanation={"대상자의 장비"} className="margin-bottom display-inline-block" />
+      <button className={"btn-small gray-btn display-inline-block float-right"} onClick={modalRentalOpen}>장비 추가</button>
+      <div className="margin-bottom5">
+        <table className={"senior-user protector-user"}>
+          <thead>
+            <tr>
+              <th>No </th>
+              <th>모델명</th>
+              <th>시리얼넘버</th>
+              <th>장비상태</th>
+              <th>관리</th>
+            </tr>
+          </thead>
+          <tbody>
+            {equipmentBySenior.equipmentList.map((item, idx) => { return (
+              <tr key={idx}>
+                <td data-label="No">{idx + 1}</td>
+                <td data-label="모델명">{item['equipment_name']}</td>
+                <td data-label="시리얼넘버">{item['equipment_serial_number']}</td>
+                <td data-label="장비상태">{equipmentStates[item['equipment_state']]}</td>
+                <td data-label="관리">
+                  <button className={"btn-small lightgray-btn"} onClick={() => guardianBySeniorManagement(item)}>정보 수정</button>
+                </td>
+              </tr>
+            )})}
+            {CommonUtil.isEmpty(equipmentBySenior.equipmentList) ?
+              <tr>
+                <td colSpan={5}>조회된 데이터가 없습니다</td>
+              </tr>
+            : null}
+          </tbody>
+        </table>
+      </div>
+
+
       <div className="btn-wrap flex-center">
         <button className={"btn-large gray-btn"} onClick={() => navigate(-1)}>이전</button>
       </div>
client/views/pages/user_management/AgencySelect.jsx
--- client/views/pages/user_management/AgencySelect.jsx
+++ client/views/pages/user_management/AgencySelect.jsx
@@ -25,7 +25,7 @@
     "기관명",
     "담당 부서 연락처(담당자)",
     "관리 장비 개수",
-    "관리 대상자 인원",
+    "돌봄 대상자 인원",
     "주소",
     "사용자관리",
     "기관통계보기",
client/views/pages/user_management/AgencySeniorSelect.jsx
--- client/views/pages/user_management/AgencySeniorSelect.jsx
+++ client/views/pages/user_management/AgencySeniorSelect.jsx
@@ -87,9 +87,9 @@
 	}
 	
 
-	//보호사(간호사)의 관리 대상자(시니어)
+	//보호사(간호사)의 돌봄 대상자(시니어)
 	const [mySenior, setMySenior] = React.useState({seniorList: [], seniorListCount: 0, search: JSON.parse(JSON.stringify(search))});
-	//보호사(간호사)의 관리 대상자(시니어) 목록 조회
+	//보호사(간호사)의 돌봄 대상자(시니어) 목록 조회
 	const mySeniorSelectList = (currentPage) => {
 		mySenior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage;
 
@@ -101,7 +101,7 @@
 			body: JSON.stringify(mySenior.search),
 		}).then((response) => response.json()).then((data) => {
 			data.search = mySenior.search;
-			console.log("보호사(간호사)의 관리 대상자(시니어) 목록 조회 : ", data);
+			console.log("보호사(간호사)의 돌봄 대상자(시니어) 목록 조회 : ", data);
 			setMySenior(data);
 		}).catch((error) => {
 			console.log('seniorSelectList() /user/seniorSelectList.json error : ', error);
@@ -131,10 +131,49 @@
 		});
 	}
 	//보호사 선택 -> 시행기관의 대상자(시니어) 목록 조회
-	const agentChange = (agentId) => {
-		agencySenior.search['agent_id'] = agentId;
+	const agentChange = (userId) => {
+		agencySenior.search['agent_id'] = userId;
 		setAgencySenior({...agencySenior});
 		agencySeniorSelectList(1);
+	}
+	//선택한 보호사의 이름
+	const getSearchAgentName = () => {
+		for (let i = 0; i < agent.userList.length; i++) {
+			if (agent.userList[i]['user_id'] == agencySenior.search['agent_id']) {
+				return agent.userList[i]['user_name'];
+			}
+		}
+		return '보호사';
+	}
+
+
+
+	//보호사의 대상자 등록
+	const agentSeniorInsert = (senior, agentId) => {
+		if (confirm(`${senior['user_name']}님을 돌봄 대상자로 추가하시겠습니까?`) == false) {
+			return;
+		} else {
+			senior['agent_id'] = state.loginUser['user_id'];
+		}
+		fetch("/user/agentSeniorInsert.json", {
+			method: "POST",
+			headers: {
+				'Content-Type': 'application/json; charset=UTF-8'
+			},
+			body: JSON.stringify(senior),
+		}).then((response) => response.json()).then((data) => {
+			if (data > 0) {
+				setTabIndex(0);
+				search.searchText = '';
+				search.searchType = '';
+				searching();
+				alert("추가완료");
+			  } else {
+				alert("추가에 실패하였습니다. 관리자에게 문의바랍니다.");
+			  }
+		}).catch((error) => {
+			console.log('agencySeniorSelectList() /user/seniorSelectList.json error : ', error);
+		});
 	}
 
 
@@ -148,11 +187,11 @@
 	const [tabIndex, setTabIndex] = React.useState(0);
 	//탭 초기화
 	const tab = [{
-		title: `내 관리 대상자 (${mySenior.seniorListCount})`,
+		title: `내 돌봄 대상자 (${mySenior.seniorListCount})`,
 		content: (
 			<div>
 				<div className="flex equip-tab">
-					<SubTitle explanation={"접속하신 보호사(간호사)분의 관리 대상자 목록입니다."} />
+					<SubTitle explanation={"접속하신 보호사(간호사)분의 돌봄 대상자 목록입니다."} />
 					<div className="btn-wrap flex-end margin-bottom ">
                         <button className={"btn-small gray-btn"} onClick={modalSeniorInsertOpen}>신규등록</button>
 					</div>
@@ -166,21 +205,34 @@
 							<th>생년월일</th>
 							<th>성별</th>
 							<th>연락처</th>
-							<th>주소</th>
 							<th>보호자</th>
+							<th>대상자관리</th>
 						</tr>
 					</thead>
 					<tbody>
 						{mySenior.seniorList.map((item, idx) => { return (
-						<tr key={idx} onClick={() => {navigate("/SeniorSelectOne", {state: {'senior_id': item['senior_id']}})}}>
+						<tr key={idx}>
 							<td data-label="No">{mySenior.seniorListCount - idx - (mySenior.search.currentPage - 1) * mySenior.search.perPage}</td>
 							<td data-label="소속기관명">{item['agency_name']}</td>
 							<td data-label="이름">{item['user_name']}</td>
 							<td data-label="생년월일">{item['user_birth']}</td>
 							<td data-label="성별">{item['user_gender']}</td>
 							<td data-label="연락처">{item['user_phonenumber']}</td>
-							<td data-label="주소">{item['user_address']}</td>
-							<td data-label="보호자">{item['guardian_user_names']}</td>
+							<td data-label="보호자">
+								{CommonUtil.isEmpty(item['guardian_user_names']) 
+									? '없음'
+									: item['guardian_user_names']
+								}
+							</td>
+							<td data-label="대상자관리">
+								<button className="btn-small gray-btn" onClick={() => {
+									navigate("/SeniorSelectOne", {state: {
+										'senior_id': item['senior_id'],
+										'agency_id': item['agency_id'],
+										'government_id': item['government_id']
+									}})
+								}}>대상자관리</button>
+							</td>
 						</tr>
 						)})}
 						{CommonUtil.isEmpty(mySenior.seniorList) ?
@@ -200,18 +252,22 @@
 			</div>
 		)
 	}, {
-		title: `우리기관 관리 대상자 (${agencySenior.seniorListCount})`,
+		title: `우리기관 돌봄 대상자 (${agencySenior.seniorListCount})`,
 		content: (
 			<div>
 				<div className="flex-align-start userauthoriylist gap5">
 					<div className="left">
 						<SubTitle explanation={"우리기관 보호사"}/>
 						<div style={{fontSize: '16px', marginTop: '0px'}} className="category">
-							<a className="active">{state.loginUser['government_name']}</a>
+							<a className="active" onClick={() => {agentChange(null)}}>
+								{state.loginUser['government_name']}
+							</a>
 							<ul style={{marginLeft: '15px'}}>
 								<li style={{margin: '10px 0px'}}>
 									<span style={{marginRight: '5px'}}><img src={House} alt="" /></span>
-									<a className="active">{state.loginUser['agency_name']}</a>
+									<a className="active" onClick={() => {agentChange(null)}}>
+										{state.loginUser['agency_name']}
+									</a>
 									<ul style={{marginLeft: '15px'}}>
 										{agent.userList.map((user, idx) => { return (
 										<li style={{margin: '10px 0px'}} key={idx}>
@@ -219,6 +275,10 @@
 											<a className={user['user_id'] == agencySenior.search['agent_id'] ? "active" : ""}
 												onClick={() => {agentChange(user['user_id'])}}>
 												{user['user_name']}
+												{state.loginUser['user_id'] == user['user_id']
+													? '(나)'
+													: `(${user['user_id']})`
+												}
 											</a>
 										</li>
 										)})}
@@ -226,7 +286,7 @@
 											<span style={{marginRight: '5px'}}><img src={Arrow} alt="" /></span>
 											<a className={'IS_NULL' == agencySenior.search['agent_id'] ? "active" : ""}
 												onClick={() => {agentChange('IS_NULL')}}>
-												미지정
+												미배정
 											</a>
 										</li>
 									</ul>
@@ -236,7 +296,13 @@
 					</div>
 					<div className="right">
 						<div className="flex equip-tab">
-							<SubTitle explanation={"현재 기관에서 관리중인 대상자 목록입니다."} />
+							<SubTitle explanation={CommonUtil.isEmpty(agencySenior.search['agent_id'])
+								? '현재 기관에서 관리중인 돌봄 대상자 목록입니다.'
+								: (agencySenior.search['agent_id'] == 'IS_NULL'
+									? '담당자가 배정되지 않은 돌봄 대상자 목록입니다.'
+									: `${getSearchAgentName()}님의 돌봄 대상자 목록입니다.`
+								)
+							} />
 							<div className="btn-wrap flex-end margin-bottom ">
 								{/* <button className={"btn-small gray-btn"} onClick={() => {modalEquipmentOpen()}}>등록</button> */}
 							</div>
@@ -250,23 +316,41 @@
 									<th>생년월일</th>
 									<th>성별</th>
 									<th>연락처</th>
-									<th>주소</th>
 									<th>보호자</th>
 									<th>보호사</th>
+									<th>대상자관리</th>
 								</tr>
 							</thead>
 							<tbody>
 								{agencySenior.seniorList.map((item, idx) => { return (
-								<tr key={idx} onClick={() => {navigate("/SeniorSelectOne", {state: {'senior_id': item['senior_id']}})}}>
+								<tr key={idx}>
 									<td data-label="No">{agencySenior.seniorListCount - idx - (agencySenior.search.currentPage - 1) * agencySenior.search.perPage}</td>
 									<td data-label="소속기관명">{item['agency_name']}</td>
 									<td data-label="이름">{item['user_name']}</td>
 									<td data-label="생년월일">{item['user_birth']}</td>
 									<td data-label="성별">{item['user_gender']}</td>
 									<td data-label="연락처">{item['user_phonenumber']}</td>
-									<td data-label="주소">{item['user_address']}</td>
-									<td data-label="보호자">{item['guardian_user_names']}</td>
-									<td data-label="보호사">{item['agent_user_names']}</td>
+									<td data-label="보호자">
+										{CommonUtil.isEmpty(item['guardian_user_names']) 
+											? '없음'
+											: item['guardian_user_names']
+										}
+									</td>
+									<td data-label="보호사">
+										{CommonUtil.isEmpty(item['agent_user_names']) 
+											? <button className="btn-small gray-btn" onClick={() => agentSeniorInsert(item)}>내 돌봄 대상자로 추가</button>
+											: item['agent_user_names']
+										}
+									</td>
+									<td data-label="대상자관리">
+										<button className="btn-small gray-btn" onClick={() => {
+											navigate("/SeniorSelectOne", {state: {
+												'senior_id': item['senior_id'],
+												'agency_id': item['agency_id'],
+												'government_id': item['government_id']
+											}})
+										}}>대상자관리</button>
+									</td>
 								</tr>
 								)})}
 								{CommonUtil.isEmpty(agencySenior.seniorList) ?
@@ -296,11 +380,12 @@
 				open={modalSeniorInsertIsOpen}
 				close={modalSeniorInsertClose}
 				seniorInsertCallback={() => {
-					agencySenior.searchText = '';
-					agencySenior.searchType = '';
-					mySeniorSelectList();
+					search.searchText = '';
+					search.searchType = '';
+					searching();
 					modalSeniorInsertClose();
 				}}
+				defaultAgentId={state.loginUser['user_id']}
 				defaultAgencyId={state.loginUser['agency_id']}
 				defaultGovernmentId={state.loginUser['government_id']}
 			/>
client/views/pages/user_management/UserSelect.jsx
--- client/views/pages/user_management/UserSelect.jsx
+++ client/views/pages/user_management/UserSelect.jsx
@@ -294,8 +294,8 @@
     }).then((response) => response.json()).then((data) => {
       console.log("시니어 등록 결과(건수) : ", data);
       if (data > 0) {
-        alert("승인완료");
         callback();
+        alert("승인완료");
       } else {
         alert("승인에 실패하였습니다. 관리자에게 문의바랍니다.");
       }
@@ -445,7 +445,13 @@
                             </thead>
                             <tbody>
                               {senior.userList.map((item, idx) => { return (
-                                <tr key={idx} onClick={() => {navigate("/SeniorSelectOne", {state: {'senior_id': item['user_id']}})}}>
+                                <tr key={idx} onClick={() => {navigate("/SeniorSelectOne", {
+                                  state: {
+                                    'senior_id': item['user_id'],
+                                    'agency_id': item['agency_id'],
+												            'government_id': item['government_id']
+                                  }
+                                })}}>
                                   <td data-label="No">{senior.userListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td>
                                   <td data-label="No">{item['agency_name']}</td>
                                   <td data-label="소속기관명">{item['user_name']}</td>
Add a comment
List