
--- client/resources/css/main.css
+++ client/resources/css/main.css
... | ... | @@ -1616,4 +1616,30 @@ |
1616 | 1616 |
|
1617 | 1617 |
.radio-tab .flex-start input { |
1618 | 1618 |
width: auto; |
1619 |
+} |
|
1620 |
+ |
|
1621 |
+.no-data { |
|
1622 |
+ display: flex; |
|
1623 |
+ align-items: center; |
|
1624 |
+ justify-content: center; |
|
1625 |
+ height: 100%; |
|
1626 |
+} |
|
1627 |
+ |
|
1628 |
+.no-data p { |
|
1629 |
+ font-size: 1.6rem; |
|
1630 |
+} |
|
1631 |
+ |
|
1632 |
+.logo .bo { |
|
1633 |
+ position: absolute; |
|
1634 |
+ left: 60px; |
|
1635 |
+ z-index: 2; |
|
1636 |
+ font-family: var(--font-AuctionGothicBold); |
|
1637 |
+} |
|
1638 |
+ |
|
1639 |
+header .logo .bo { |
|
1640 |
+ top: 10px; |
|
1641 |
+} |
|
1642 |
+ |
|
1643 |
+.nav .logo .bo { |
|
1644 |
+ top: 15px; |
|
1619 | 1645 |
}(파일 끝에 줄바꿈 문자 없음) |
--- client/views/component/chart/Chart5.jsx
+++ client/views/component/chart/Chart5.jsx
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 |
const createChart = () => { |
10 | 10 |
console.log('createChart data : ', data); |
11 | 11 |
let root = am5.Root.new("Chart5"); |
12 |
+ root._logo.dispose(); |
|
12 | 13 |
|
13 | 14 |
// Set themes |
14 | 15 |
// https://www.amcharts.com/docs/v5/concepts/themes/ |
--- client/views/component/chart/Chart5_agencyadmin.jsx
+++ client/views/component/chart/Chart5_agencyadmin.jsx
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 |
const createChart = () => { |
10 | 10 |
console.log('createChart data : ', data); |
11 | 11 |
let root = am5.Root.new("Chart5"); |
12 |
+ root._logo.dispose(); |
|
12 | 13 |
|
13 | 14 |
// Set themes |
14 | 15 |
// https://www.amcharts.com/docs/v5/concepts/themes/ |
--- client/views/layout/Header.jsx
+++ client/views/layout/Header.jsx
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 |
const navigate = useNavigate(); |
12 | 12 |
|
13 | 13 |
//전역 변수 저장 객체 |
14 |
- const state = useSelector((state) => {return state}); |
|
14 |
+ const state = useSelector((state) => { return state }); |
|
15 | 15 |
|
16 | 16 |
//App Title |
17 | 17 |
const [title, setTitle] = React.useState(''); |
... | ... | @@ -33,15 +33,20 @@ |
33 | 33 |
return ( |
34 | 34 |
<header> |
35 | 35 |
<div className="header-flex flex flex-align"> |
36 |
- <h1 className="logo"><img src={logo} alt="" /></h1> |
|
36 |
+ <h1 className="logo"> |
|
37 |
+ {state.loginUser['government_id'] == "G2" ? |
|
38 |
+ <span className="bo">보훈</span> |
|
39 |
+ : null} |
|
40 |
+ <img src={logo} alt="" /> |
|
41 |
+ </h1> |
|
37 | 42 |
<span className="page-title-span">{title}</span> |
38 | 43 |
<div className="page-title flex flex-align"> |
39 | 44 |
{/* <MenuIcon /> */} |
40 | 45 |
<div className="info-wrap flex"> |
41 | 46 |
{/* <div className="usericon"><PersonIcon sx={{ width:48, height:48,}} /></div> */} |
42 |
- <p className="header-info-id">{state.loginUser['user_name']}({state.loginUser['user_id']})</p> |
|
47 |
+ <p className="header-info-id">{state.loginUser['user_name']}({state.loginUser['user_id']})</p> |
|
43 | 48 |
</div> |
44 |
- <Weather /> |
|
49 |
+ <Weather /> |
|
45 | 50 |
</div> |
46 | 51 |
</div> |
47 | 52 |
</header> |
--- client/views/layout/Menu.jsx
+++ client/views/layout/Menu.jsx
... | ... | @@ -47,7 +47,12 @@ |
47 | 47 |
<div className="menuicon" onClick={() => { onClickshow(); handleClick(); }}> |
48 | 48 |
{icons[iconIndex]} |
49 | 49 |
</div> |
50 |
- <h1 className="logo"><img src={logo} alt="" /></h1> |
|
50 |
+ <h1 className="logo"> |
|
51 |
+ {state.loginUser['government_id'] == "G2" ? |
|
52 |
+ <span className="bo">보훈</span> |
|
53 |
+ : null} |
|
54 |
+ <img src={logo} alt="" /> |
|
55 |
+ </h1> |
|
51 | 56 |
<div className="flex-align-column" style={{ marginTop: `3rem` }}> |
52 | 57 |
<ul > |
53 | 58 |
{ |
--- client/views/pages/equipment/AgencyEquipmentSelect.jsx
+++ client/views/pages/equipment/AgencyEquipmentSelect.jsx
... | ... | @@ -22,27 +22,6 @@ |
22 | 22 |
const defaultAgencyId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['agency_id']; |
23 | 23 |
|
24 | 24 |
|
25 |
- //기관 계층 구조 목록 |
|
26 |
- const [orgListOfHierarchy, setOrgListOfHierarchy] = React.useState([]); |
|
27 |
- //기관(관리, 시행) 계층 구조 목록 조회 |
|
28 |
- const orgSelectListOfHierarchy = () => { |
|
29 |
- fetch("/org/orgSelectListOfHierarchy.json", { |
|
30 |
- method: "POST", |
|
31 |
- headers: { |
|
32 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
33 |
- }, |
|
34 |
- body: JSON.stringify({ |
|
35 |
- 'government_id': defaultGovernmentId, |
|
36 |
- 'agency_id': defaultAgencyId |
|
37 |
- }), |
|
38 |
- }).then((response) => response.json()).then((data) => { |
|
39 |
- console.log("기관(관리, 시행) 계층 구조 목록 조회 : ", data); |
|
40 |
- setOrgListOfHierarchy(data); |
|
41 |
- }).catch((error) => { |
|
42 |
- console.log('orgSelectListOfHierarchy() /org/orgSelectListOfHierarchy.json error : ', error); |
|
43 |
- }); |
|
44 |
- }; |
|
45 |
- |
|
46 | 25 |
// 시스템 코드 - 장비 상태 |
47 | 26 |
const [equipmentStates, setEquipmentStates] = React.useState({}); |
48 | 27 |
// 시스템 코드 - 장비 상태 조회 |
... | ... | @@ -96,7 +75,6 @@ |
96 | 75 |
const [rentalEquipmentSearch, setRentalEquipmentSearch] = React.useState({ |
97 | 76 |
'government_id': defaultGovernmentId, |
98 | 77 |
'agency_id': defaultAgencyId, |
99 |
- // 'senior_id': 'IS_NOT_NULL', |
|
100 | 78 |
'currentPage': 1, |
101 | 79 |
'perPage': 10, |
102 | 80 |
}); |
... | ... | @@ -122,36 +100,87 @@ |
122 | 100 |
}); |
123 | 101 |
} |
124 | 102 |
|
125 |
- //장비 초기값 |
|
126 |
- const equipmentInit = { |
|
127 |
- 'equipment_serial_number': null, |
|
128 |
- 'equipment_type': 'SMART_PILLBOX', |
|
129 |
- 'equipment_name': null, |
|
130 |
- 'equipment_state': null, |
|
131 |
- 'equipment_product_date': null, |
|
132 |
- 'equipment_stock_date': null, |
|
133 |
- 'equipment_insert_datetime': null, |
|
134 |
- 'equipment_insert_user_id': null, |
|
135 |
- 'equipment_update_datetime': null, |
|
136 |
- 'equipment_update_user_id': null, |
|
137 |
- 'government_id': defaultGovernmentId, |
|
138 |
- 'agency_id': defaultAgencyId, |
|
139 |
- 'senior_id': null |
|
140 |
- } |
|
141 |
- //장비 |
|
142 |
- const [equipment, setEquipment] = useStateWithCallbackLazy({ ...equipmentInit }); |
|
143 |
- //각 데이터별로 Dom 정보 담을 Ref 생성 |
|
144 |
- const equipmentRef = React.useRef({ ...equipmentInit }); |
|
145 |
- //장비 정보 변경 |
|
146 |
- const equipmentValueChange = (targetKey, value) => { |
|
147 |
- let newEquipment = { ...equipment }; |
|
148 |
- newEquipment[targetKey] = value; |
|
149 |
- setEquipment(newEquipment); |
|
103 |
+ //장비 대여 모달 여부 |
|
104 |
+ const [modalRentalIsOpen, setModalRentalIsOpen] = React.useState(false); |
|
105 |
+ //장비 대여 오픈 |
|
106 |
+ const modalRentalOpen = (item) => { |
|
107 |
+ setSelectEquipment(item); |
|
108 |
+ mySenior['search']['agency_id'] = item['agency_id']; |
|
109 |
+ mySeniorSelectList(1); |
|
110 |
+ setModalRentalIsOpen(true); |
|
111 |
+ }; |
|
112 |
+ //장비 대여 닫기 |
|
113 |
+ const modalRentalClose = () => { |
|
114 |
+ setModalRentalIsOpen(false); |
|
115 |
+ }; |
|
116 |
+ |
|
117 |
+ //장비 대여 등록 정보 |
|
118 |
+ const [selectEquipment, setSelectEquipment] = React.useState() |
|
119 |
+ |
|
120 |
+ //장비 대여 등록 |
|
121 |
+ const equipmentRentalInsert = (senior) => { |
|
122 |
+ if (confirm('해당 장비를 추가하시겠습니까?') == false) { |
|
123 |
+ return; |
|
124 |
+ } |
|
125 |
+ |
|
126 |
+ selectEquipment['agency_id'] = senior['agency_id']; // 장비에 시행기관이 '없음'일 경우 배포한 시니어의 시행기관을 등록 |
|
127 |
+ selectEquipment['senior_id'] = senior['senior_id']; |
|
128 |
+ selectEquipment['rental_start_date'] = new Date(); |
|
129 |
+ |
|
130 |
+ fetch("/equipment/equipmentRentalInsert.json", { |
|
131 |
+ method: "POST", |
|
132 |
+ headers: { |
|
133 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
134 |
+ }, |
|
135 |
+ body: JSON.stringify(selectEquipment), |
|
136 |
+ }).then((response) => response.json()).then((data) => { |
|
137 |
+ console.log("장비 대여 등록 결과(건수) : ", data); |
|
138 |
+ if (data > 0) { |
|
139 |
+ alert("추가완료"); |
|
140 |
+ rentalEquipmentSelectList(); |
|
141 |
+ modalRentalClose(); |
|
142 |
+ } else { |
|
143 |
+ alert("장비추가에 실패하였습니다. 관리자에게 문의바랍니다."); |
|
144 |
+ } |
|
145 |
+ }).catch((error) => { |
|
146 |
+ console.log('seniorSelectOne() /user/seniorSelectOne.json error : ', error); |
|
147 |
+ }); |
|
148 |
+ }; |
|
149 |
+ |
|
150 |
+ // 소속기관 내 시니어 |
|
151 |
+ const [mySenior, setMySenior] = React.useState({ |
|
152 |
+ seniorList: [], |
|
153 |
+ seniorListCount: 0, |
|
154 |
+ search: { |
|
155 |
+ 'government_id': defaultGovernmentId, |
|
156 |
+ 'agency_id': defaultAgencyId, |
|
157 |
+ 'user_use': true, |
|
158 |
+ 'equipment_search': 'IS_NULL', |
|
159 |
+ 'currentPage': 1, |
|
160 |
+ 'perPage': 5, |
|
161 |
+ } |
|
162 |
+ }); |
|
163 |
+ // 소속기관 내 시니어 목록 조회 |
|
164 |
+ const mySeniorSelectList = (currentPage) => { |
|
165 |
+ mySenior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
166 |
+ |
|
167 |
+ fetch("/user/seniorSelectList.json", { |
|
168 |
+ method: "POST", |
|
169 |
+ headers: { |
|
170 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
171 |
+ }, |
|
172 |
+ body: JSON.stringify(mySenior.search), |
|
173 |
+ }).then((response) => response.json()).then((data) => { |
|
174 |
+ data.search = mySenior.search; |
|
175 |
+ console.log(" 소속기관 내 시니어 목록 조회 : ", data); |
|
176 |
+ setMySenior(data); |
|
177 |
+ }).catch((error) => { |
|
178 |
+ console.log('seniorSelectList() /user/seniorSelectList.json error : ', error); |
|
179 |
+ }); |
|
150 | 180 |
} |
151 | 181 |
|
152 | 182 |
//Mounted |
153 | 183 |
React.useEffect(() => { |
154 |
- orgSelectListOfHierarchy(); |
|
155 | 184 |
equipmentStatesSelect(); |
156 | 185 |
equipmentSearching(); |
157 | 186 |
}, []); |
... | ... | @@ -173,6 +202,7 @@ |
173 | 202 |
<th>대여일</th> |
174 | 203 |
<th>대여여부</th> |
175 | 204 |
<th>장비사용대상자</th> |
205 |
+ <th>장비대여</th> |
|
176 | 206 |
</tr> |
177 | 207 |
</thead> |
178 | 208 |
<tbody> |
... | ... | @@ -193,12 +223,16 @@ |
193 | 223 |
<td data-label="대여일">{CommonUtil.isEmpty(item['rental_start_date']) == false ? item['rental_start_date'] : '-'}</td> |
194 | 224 |
<td data-label="대여여부">{CommonUtil.isEmpty(item['user_name']) == false ? '대여중' : '미대여'}</td> |
195 | 225 |
<td data-label="장비사용대상자">{CommonUtil.isEmpty(item['user_name']) == false ? item['user_name'] : '-'}</td> |
226 |
+ <td cata-label="장비대여"> |
|
227 |
+ {CommonUtil.isEmpty(item['user_name']) == false ? '-' |
|
228 |
+ : (<button className={"btn-small gray-btn"} onClick={() => modalRentalOpen(item)}>장비대여</button>)} |
|
229 |
+ </td> |
|
196 | 230 |
</tr> |
197 | 231 |
) |
198 | 232 |
})} |
199 | 233 |
{CommonUtil.isEmpty(rentalEquipment.equipmentList) ? |
200 | 234 |
<tr> |
201 |
- <td colSpan={10}>조회된 데이터가 없습니다</td> |
|
235 |
+ <td colSpan={11}>조회된 데이터가 없습니다</td> |
|
202 | 236 |
</tr> |
203 | 237 |
: null} |
204 | 238 |
</tbody> |
... | ... | @@ -257,6 +291,51 @@ |
257 | 291 |
</div> |
258 | 292 |
</div> |
259 | 293 |
</div> |
294 |
+ |
|
295 |
+ <Modal open={modalRentalIsOpen} close={modalRentalClose} header="장비 배포 시니어 선택"> |
|
296 |
+ <div className="board-wrap"> |
|
297 |
+ <table className={"protector-user"}> |
|
298 |
+ <thead> |
|
299 |
+ <tr> |
|
300 |
+ <th>No</th> |
|
301 |
+ <th>소속기관명</th> |
|
302 |
+ <th>이름</th> |
|
303 |
+ <th>생년월일</th> |
|
304 |
+ <th>성별</th> |
|
305 |
+ <th>배포</th> |
|
306 |
+ </tr> |
|
307 |
+ </thead> |
|
308 |
+ <tbody> |
|
309 |
+ {mySenior.seniorList.map((item, idx) => { |
|
310 |
+ return ( |
|
311 |
+ <tr key={idx}> |
|
312 |
+ <td data-label="No">{mySenior.seniorListCount - idx - (mySenior.search.currentPage - 1) * mySenior.search.perPage}</td> |
|
313 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
314 |
+ <td data-label="이름">{item['user_name']}</td> |
|
315 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
316 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
317 |
+ <td data-label="배포"> |
|
318 |
+ <button className="btn-small gray-btn" onClick={() => { equipmentRentalInsert(item) }}>배포하기</button> |
|
319 |
+ </td> |
|
320 |
+ </tr> |
|
321 |
+ ) |
|
322 |
+ })} |
|
323 |
+ {CommonUtil.isEmpty(mySenior.seniorList) ? |
|
324 |
+ <tr> |
|
325 |
+ <td colSpan={8}>조회된 데이터가 없습니다</td> |
|
326 |
+ </tr> |
|
327 |
+ : null} |
|
328 |
+ </tbody> |
|
329 |
+ </table> |
|
330 |
+ <Pagination |
|
331 |
+ currentPage={mySenior.search.currentPage} |
|
332 |
+ perPage={mySenior.search.perPage} |
|
333 |
+ totalCount={mySenior.seniorListCount} |
|
334 |
+ maxRange={5} |
|
335 |
+ click={mySeniorSelectList} |
|
336 |
+ /> |
|
337 |
+ </div> |
|
338 |
+ </Modal> |
|
260 | 339 |
</main > |
261 | 340 |
); |
262 | 341 |
} |
--- client/views/pages/main/Main_agency.jsx
+++ client/views/pages/main/Main_agency.jsx
... | ... | @@ -293,7 +293,11 @@ |
293 | 293 |
<div className="main-grid-agency margin-bottom2"> |
294 | 294 |
<div className="content-box combine-left-government3"> |
295 | 295 |
<div className="height-50"> |
296 |
- <Chart10 data={medicationSelectListByMonth} /> |
|
296 |
+ { |
|
297 |
+ medicationSelectListByNew.length > 0 ? |
|
298 |
+ <Chart10 data={medicationSelectListByMonth} /> |
|
299 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
300 |
+ } |
|
297 | 301 |
</div> |
298 | 302 |
<div> |
299 | 303 |
<table className="visit-data-table"> |
... | ... | @@ -316,23 +320,29 @@ |
316 | 320 |
</tr> |
317 | 321 |
</thead> |
318 | 322 |
<tbody> |
319 |
- {medicationSelectListByYear.map((item, idx) => { |
|
320 |
- return ( |
|
321 |
- <tr> |
|
322 |
- <td>{item['year']}</td> |
|
323 |
- <td>{item['average'] == '-' ? '-' : item['average'] + '%'}</td> |
|
324 |
- {CommonUtil.isEmpty(item['data']) == false ? ( |
|
325 |
- item['data'].map((item1, idx1) => { |
|
326 |
- return ( |
|
327 |
- <> |
|
328 |
- <td>{item1 == '-' ? '-' : item1 + '%'}</td> |
|
329 |
- </> |
|
330 |
- ) |
|
331 |
- }) |
|
332 |
- ) : null} |
|
333 |
- </tr> |
|
334 |
- ) |
|
335 |
- })} |
|
323 |
+ {medicationSelectListByYear.length > 0 ? ( |
|
324 |
+ medicationSelectListByYear.map((item, idx) => { |
|
325 |
+ return ( |
|
326 |
+ <tr> |
|
327 |
+ <td>{item['year']}</td> |
|
328 |
+ <td>{item['average'] == '-' ? '-' : item['average'] + '%'}</td> |
|
329 |
+ {CommonUtil.isEmpty(item['data']) == false ? ( |
|
330 |
+ item['data'].map((item1, idx1) => { |
|
331 |
+ return ( |
|
332 |
+ <> |
|
333 |
+ <td>{item1 == '-' ? '-' : item1 + '%'}</td> |
|
334 |
+ </> |
|
335 |
+ ) |
|
336 |
+ }) |
|
337 |
+ ) : null} |
|
338 |
+ </tr> |
|
339 |
+ ) |
|
340 |
+ }) |
|
341 |
+ ) : |
|
342 |
+ <tr> |
|
343 |
+ <td colSpan={14}>데이터가 없습니다.</td> |
|
344 |
+ </tr> |
|
345 |
+ } |
|
336 | 346 |
</tbody> |
337 | 347 |
</table> |
338 | 348 |
</div> |
... | ... | @@ -353,13 +363,21 @@ |
353 | 363 |
<div> |
354 | 364 |
<div className="flex-start margin-bottom2"><img src={medicinebox} alt="" /><TitleSmall title={"시니어 복용률 순위"} /></div> |
355 | 365 |
<div className="content-box combine-left-government3 visitlist margin-bottom2"> |
356 |
- <Chart8 data={medicationSelectListByNew} /> |
|
366 |
+ { |
|
367 |
+ medicationSelectListByNew.length > 0 ? |
|
368 |
+ <Chart8 data={medicationSelectListByNew} /> |
|
369 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
370 |
+ } |
|
357 | 371 |
</div> |
358 | 372 |
</div> |
359 | 373 |
<div> |
360 | 374 |
<div className="flex-start margin-bottom2"><img src={medicinebox} alt="" /><TitleSmall title={"연령대별 통계"} /></div> |
361 | 375 |
<div className="content-box combine-left-government3 visitlist margin-bottom2"> |
362 |
- <Chart7 data={seniorGenderData} /> |
|
376 |
+ { |
|
377 |
+ seniorGenderData.length > 0 ? |
|
378 |
+ <Chart7 data={seniorGenderData} /> |
|
379 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
380 |
+ } |
|
363 | 381 |
</div> |
364 | 382 |
</div> |
365 | 383 |
</div> |
--- client/views/pages/main/Main_agencyAdmin.jsx
+++ client/views/pages/main/Main_agencyAdmin.jsx
... | ... | @@ -317,26 +317,48 @@ |
317 | 317 |
<Title title={`${cityName} 복용률 순위`} explanation={""} /> |
318 | 318 |
</div> |
319 | 319 |
<div style={{ height: 'calc(100% - 60px)' }}> |
320 |
- <Chart8 data={medicationSelectListByNew} /> |
|
320 |
+ { |
|
321 |
+ visit.length > 0 ? |
|
322 |
+ <Chart8 data={medicationSelectListByNew} /> |
|
323 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
324 |
+ } |
|
321 | 325 |
</div> |
322 | 326 |
</div> |
323 | 327 |
<div className="content-box combine-left-government2"> |
324 | 328 |
<div className="flex"> |
325 | 329 |
<Title title={`${cityName} 복용률 평균`} explanation={"해당 지역의 대상자 복용률이 그래프로 보여집니다."} /> |
326 | 330 |
</div> |
327 |
- <Chart2_govern data={medicationSelectListByMonth} /> |
|
331 |
+ <div style={{ height: 'calc(100% - 60px)' }}> |
|
332 |
+ { |
|
333 |
+ visit.length > 0 ? |
|
334 |
+ <Chart2_govern data={medicationSelectListByMonth} /> |
|
335 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
336 |
+ } |
|
337 |
+ </div> |
|
328 | 338 |
</div> |
329 | 339 |
<div className="content-box combine-right-government2"> |
330 | 340 |
<div className="flex"> |
331 | 341 |
<Title title={`${cityName} 월별 방문 횟수`} explanation={"최근 6개월간 방문 횟수의 변화를 확인할 수 있습니다."} /> |
332 | 342 |
</div> |
333 |
- <RowChart_govern data={visit} /> |
|
343 |
+ <div style={{ height: 'calc(100% - 60px)' }}> |
|
344 |
+ { |
|
345 |
+ visit.length > 0 ? |
|
346 |
+ <RowChart_govern data={visit} /> |
|
347 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
348 |
+ } |
|
349 |
+ </div> |
|
334 | 350 |
</div> |
335 | 351 |
<div className="content-box combine-right-government"> |
336 | 352 |
<div className="flex"> |
337 | 353 |
<Title title={`생활보호사별 대상자 등록 현황`} explanation={"약상자 사용자의 데이터 차트가 보여집니다."} /> |
338 | 354 |
</div> |
339 |
- <Chart5_agencyadmin data={seniorEnroll} /> |
|
355 |
+ <div style={{ height: 'calc(100% - 60px)' }}> |
|
356 |
+ { |
|
357 |
+ seniorEnroll.length > 0 ? |
|
358 |
+ <Chart5_agencyadmin data={seniorEnroll} /> |
|
359 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
360 |
+ } |
|
361 |
+ </div> |
|
340 | 362 |
</div> |
341 | 363 |
<div className="content-box span4"> |
342 | 364 |
<table className="visit-data-table"> |
... | ... | @@ -359,23 +381,29 @@ |
359 | 381 |
</tr> |
360 | 382 |
</thead> |
361 | 383 |
<tbody> |
362 |
- {medicationSelectListByYear.map((item, idx) => { |
|
363 |
- return ( |
|
364 |
- <tr> |
|
365 |
- <td>{item['year']}</td> |
|
366 |
- <td>{item['average'] == '-' ? '-' : item['average'] + '%'}</td> |
|
367 |
- {CommonUtil.isEmpty(item['data']) == false ? ( |
|
368 |
- item['data'].map((item1, idx1) => { |
|
369 |
- return ( |
|
370 |
- <> |
|
371 |
- <td>{item1 == '-' ? '-' : item1 + '%'}</td> |
|
372 |
- </> |
|
373 |
- ) |
|
374 |
- }) |
|
375 |
- ) : null} |
|
376 |
- </tr> |
|
377 |
- ) |
|
378 |
- })} |
|
384 |
+ {medicationSelectListByYear.length > 0 ? ( |
|
385 |
+ medicationSelectListByYear.map((item, idx) => { |
|
386 |
+ return ( |
|
387 |
+ <tr> |
|
388 |
+ <td>{item['year']}</td> |
|
389 |
+ <td>{item['average'] == '-' ? '-' : item['average'] + '%'}</td> |
|
390 |
+ {CommonUtil.isEmpty(item['data']) == false ? ( |
|
391 |
+ item['data'].map((item1, idx1) => { |
|
392 |
+ return ( |
|
393 |
+ <> |
|
394 |
+ <td>{item1 == '-' ? '-' : item1 + '%'}</td> |
|
395 |
+ </> |
|
396 |
+ ) |
|
397 |
+ }) |
|
398 |
+ ) : null} |
|
399 |
+ </tr> |
|
400 |
+ ) |
|
401 |
+ }) |
|
402 |
+ ) : |
|
403 |
+ <tr> |
|
404 |
+ <td colSpan={14}>데이터가 없습니다.</td> |
|
405 |
+ </tr> |
|
406 |
+ } |
|
379 | 407 |
</tbody> |
380 | 408 |
</table> |
381 | 409 |
</div> |
--- client/views/pages/main/Main_government.jsx
+++ client/views/pages/main/Main_government.jsx
... | ... | @@ -357,26 +357,48 @@ |
357 | 357 |
<Title title={`${cityName} 복용률 순위`} /> |
358 | 358 |
</div> |
359 | 359 |
<div style={{ height: 'calc(100% - 60px)' }}> |
360 |
- <Chart8 data={medicationSelectListByNew} /> |
|
360 |
+ { |
|
361 |
+ medicationSelectListByNew.length > 0 ? |
|
362 |
+ <Chart8 data={medicationSelectListByNew} /> |
|
363 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
364 |
+ } |
|
361 | 365 |
</div> |
362 | 366 |
</div> |
363 | 367 |
<div className="content-box combine-left-government2"> |
364 | 368 |
<div className="flex"> |
365 | 369 |
<Title title={`${cityName} 복용률 평균`} explanation={"해당 지역의 대상자 복용률이 그래프로 보여집니다."} /> |
366 | 370 |
</div> |
367 |
- <Chart2_govern data={medicationSelectListByMonth} /> |
|
371 |
+ <div style={{ height: 'calc(100% - 60px)' }}> |
|
372 |
+ { |
|
373 |
+ medicationSelectListByMonth.length > 0 ? |
|
374 |
+ <Chart2_govern data={medicationSelectListByMonth} /> |
|
375 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
376 |
+ } |
|
377 |
+ </div> |
|
368 | 378 |
</div> |
369 | 379 |
<div className="content-box combine-right-government2"> |
370 | 380 |
<div className="flex"> |
371 | 381 |
<Title title={`기관별 대상자 등록 현황`} explanation={"약상자 사용자의 데이터 차트가 보여집니다."} /> |
372 | 382 |
</div> |
373 |
- <Chart5 data={seniorEnroll} /> |
|
383 |
+ <div style={{ height: 'calc(100% - 60px)' }}> |
|
384 |
+ { |
|
385 |
+ seniorEnroll.length > 0 ? |
|
386 |
+ <Chart5 data={seniorEnroll} /> |
|
387 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
388 |
+ } |
|
389 |
+ </div> |
|
374 | 390 |
</div> |
375 | 391 |
<div className="content-box combine-right-government"> |
376 | 392 |
<div className="flex"> |
377 | 393 |
<Title title={`기관별 약상자 사용 현황`} explanation={""} /> |
378 | 394 |
</div> |
379 |
- <Donut1_govern data={equipmentUsage} /> |
|
395 |
+ <div style={{ height: 'calc(100% - 60px)' }}> |
|
396 |
+ { |
|
397 |
+ equipmentUsage.length > 0 ? |
|
398 |
+ <Donut1_govern data={equipmentUsage} /> |
|
399 |
+ : <div className="no-data"><p>데이터가 없습니다.</p></div> |
|
400 |
+ } |
|
401 |
+ </div> |
|
380 | 402 |
</div> |
381 | 403 |
<div className="content-box span4 table-size-fix"> |
382 | 404 |
<table className="visit-data-table"> |
+++ client/views/pages/user_management/230712_backup_UserSelect.jsx
... | ... | @@ -0,0 +1,918 @@ |
1 | +import React from "react"; | |
2 | +import { useNavigate, useLocation } from "react-router"; | |
3 | +import { useSelector } from "react-redux"; | |
4 | + | |
5 | +import ContentTitle from "../../component/ContentTitle.jsx"; | |
6 | +import SubTitle from "../../component/SubTitle.jsx"; | |
7 | +import Modal_SeniorInsert from "../../component/Modal_SeniorInsert.jsx"; | |
8 | +import Modal_Guardian from "../../component/Modal_Guardian.jsx"; | |
9 | +import Pagination from "../../component/Pagination.jsx"; | |
10 | +import House from "../../../resources/files/icon/house.png"; | |
11 | +import Arrow from "../../../resources/files/icon/arrow.png"; | |
12 | + | |
13 | +import CommonUtil from "../../../resources/js/CommonUtil.js"; | |
14 | + | |
15 | +export default function UserAuthoriySelect() { | |
16 | + const navigate = useNavigate(); | |
17 | + const location = useLocation(); | |
18 | + | |
19 | + //전역 변수 저장 객체 | |
20 | + const state = useSelector((state) => { return state }); | |
21 | + const defaultGovernmentId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id']; | |
22 | + | |
23 | + //활성화 탭 (시스템 업무 역할별) | |
24 | + const [tabActiveByRoleType, setTabActiveByRoleType] = React.useState('ROLE_AGENCY'); | |
25 | + | |
26 | + //보호자 모달 오픈 여부 | |
27 | + const [modalGuardianIsOpen, setModalGuardianIsOpen] = React.useState(false); | |
28 | + //보호자 모달 오픈 | |
29 | + const modalGuardianOpen = () => { | |
30 | + setModalGuardianIsOpen(true); | |
31 | + }; | |
32 | + //보호자 모달 닫기 | |
33 | + const modalGuardianClose = () => { | |
34 | + setModalGuardianIsOpen(false); | |
35 | + }; | |
36 | + | |
37 | + //대상자(시니어) 등록 모달 오픈 여부 | |
38 | + const [modalSeniorInsertIsOpen, setModalSeniorInsertIsOpen] = React.useState(false); | |
39 | + //대상자(시니어) 등록 모달 오픈 | |
40 | + const modalSeniorInsertOpen = () => { | |
41 | + setModalSeniorInsertIsOpen(true); | |
42 | + }; | |
43 | + //대상자(시니어) 등록 모달 닫기 | |
44 | + const modalSeniorInsertClose = () => { | |
45 | + setModalSeniorInsertIsOpen(false); | |
46 | + }; | |
47 | + | |
48 | + //기관 계층 구조 목록 | |
49 | + const [orgListOfHierarchy, setOrgListOfHierarchy] = React.useState([]); | |
50 | + //기관(관리, 시행) 계층 구조 목록 조회 | |
51 | + const orgSelectListOfHierarchy = () => { | |
52 | + fetch("/org/orgSelectListOfHierarchy.json", { | |
53 | + method: "POST", | |
54 | + headers: { | |
55 | + 'Content-Type': 'application/json; charset=UTF-8' | |
56 | + }, | |
57 | + body: JSON.stringify({ 'government_id': defaultGovernmentId }), | |
58 | + }).then((response) => response.json()).then((data) => { | |
59 | + console.log("기관(관리, 시행) 계층 구조 목록 조회 : ", data); | |
60 | + setOrgListOfHierarchy(data); | |
61 | + }).catch((error) => { | |
62 | + console.log('orgSelectListOfHierarchy() /org/orgSelectListOfHierarchy.json error : ', error); | |
63 | + }); | |
64 | + }; | |
65 | + | |
66 | + | |
67 | + // user_state | |
68 | + const [isViewType, setIsViewType] = React.useState(true); | |
69 | + //검색 변수 (초기화값) | |
70 | + const [userSearch, setUserSearch] = React.useState({ | |
71 | + 'government_id': state.loginUser['government_id'], | |
72 | + 'agency_id': state.loginUser['agency_id'], | |
73 | + 'authority': null, | |
74 | + 'user_use': isViewType, | |
75 | + | |
76 | + 'searchType': null, | |
77 | + 'searchText': null, | |
78 | + 'currentPage': 1, | |
79 | + 'perPage': 10, | |
80 | + }); | |
81 | + | |
82 | + //대상자(시니어) 목록 및 페이징 정보 | |
83 | + userSearch['authority'] = 'ROLE_SENIOR'; | |
84 | + const [senior, setSenior] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); | |
85 | + const seniorSearchChange = (targetKey, value) => { | |
86 | + let newSenior = JSON.parse(JSON.stringify(senior)); | |
87 | + newSenior.search[targetKey] = value; | |
88 | + setSenior(newSenior); | |
89 | + } | |
90 | + const seniorSelectListEnter = (key) => { | |
91 | + if (key == 'Enter') { | |
92 | + seniorSelectList(); | |
93 | + } else { | |
94 | + return; | |
95 | + } | |
96 | + } | |
97 | + //대상자(시니어) 목록 조회 | |
98 | + const seniorSelectList = (currentPage) => { | |
99 | + senior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; | |
100 | + | |
101 | + fetch("/user/userSelectList.json", { | |
102 | + method: "POST", | |
103 | + headers: { | |
104 | + 'Content-Type': 'application/json; charset=UTF-8' | |
105 | + }, | |
106 | + body: JSON.stringify(senior.search), | |
107 | + }).then((response) => response.json()).then((data) => { | |
108 | + data.search = senior.search; | |
109 | + console.log("대상자(시니어) 목록 조회 : ", data); | |
110 | + setSenior(data); | |
111 | + }).catch((error) => { | |
112 | + console.log('seniorSelectList() /user/userSelectList.json error : ', error); | |
113 | + }); | |
114 | + } | |
115 | + | |
116 | + //시행기관 담당자 목록 및 페이징 정보 | |
117 | + userSearch['authority'] = 'ROLE_AGENCY'; | |
118 | + const [agent, setAgent] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); | |
119 | + const agentSearchChange = (targetKey, value) => { | |
120 | + let newAgent = JSON.parse(JSON.stringify(agent)); | |
121 | + newAgent.search[targetKey] = value; | |
122 | + setAgent(newAgent); | |
123 | + } | |
124 | + const agentSelectListEnter = (key) => { | |
125 | + if (key == 'Enter') { | |
126 | + agentSelectList(); | |
127 | + } else { | |
128 | + return; | |
129 | + } | |
130 | + } | |
131 | + //시행기관 담당자 목록 조회 | |
132 | + const agentSelectList = (currentPage) => { | |
133 | + agent.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; | |
134 | + | |
135 | + fetch("/user/userSelectList.json", { | |
136 | + method: "POST", | |
137 | + headers: { | |
138 | + 'Content-Type': 'application/json; charset=UTF-8' | |
139 | + }, | |
140 | + body: JSON.stringify(agent.search), | |
141 | + }).then((response) => response.json()).then((data) => { | |
142 | + data.search = agent.search; | |
143 | + console.log("시행기관 담당자 목록 조회 : ", data); | |
144 | + setAgent(data); | |
145 | + }).catch((error) => { | |
146 | + console.log('agentSelectList() /user/userSelectList.json error : ', error); | |
147 | + }); | |
148 | + } | |
149 | + | |
150 | + //시행기관 관리자 목록 및 페이징 정보 | |
151 | + userSearch['authority'] = 'ROLE_AGENCYADMIN'; | |
152 | + const [agentAdmin, setAgentAdmin] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); | |
153 | + const agentAdminSearchChange = (targetKey, value) => { | |
154 | + let newAgent = JSON.parse(JSON.stringify(agentAdmin)); | |
155 | + newAgent.search[targetKey] = value; | |
156 | + setAgentAdmin(newAgent); | |
157 | + } | |
158 | + const agentAdminSelectListEnter = (key) => { | |
159 | + if (key == 'Enter') { | |
160 | + agentAdminSelectList(); | |
161 | + } else { | |
162 | + return; | |
163 | + } | |
164 | + } | |
165 | + //시행기관 관리자 목록 조회 | |
166 | + const agentAdminSelectList = (currentPage) => { | |
167 | + agentAdmin.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; | |
168 | + | |
169 | + fetch("/user/userSelectList.json", { | |
170 | + method: "POST", | |
171 | + headers: { | |
172 | + 'Content-Type': 'application/json; charset=UTF-8' | |
173 | + }, | |
174 | + body: JSON.stringify(agentAdmin.search), | |
175 | + }).then((response) => response.json()).then((data) => { | |
176 | + data.search = agentAdmin.search; | |
177 | + console.log("시행기관 관리자 목록 조회 : ", data); | |
178 | + setAgentAdmin(data); | |
179 | + }).catch((error) => { | |
180 | + console.log('agentSelectList() /user/userSelectList.json error : ', error); | |
181 | + }); | |
182 | + } | |
183 | + | |
184 | + //관리기관 관리자 목록 및 페이징 정보 | |
185 | + userSearch['authority'] = 'ROLE_GOVERNMENT'; | |
186 | + const [government, setGovernment] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); | |
187 | + const governmentSearchChange = (targetKey, value) => { | |
188 | + let newGovernment = JSON.parse(JSON.stringify(government)); | |
189 | + newGovernment.search[targetKey] = value; | |
190 | + setGovernment(newGovernment); | |
191 | + } | |
192 | + const governmentSelectListEnter = (key) => { | |
193 | + if (key == 'Enter') { | |
194 | + governmentSelectList(); | |
195 | + } else { | |
196 | + return; | |
197 | + } | |
198 | + } | |
199 | + //관리기관 담당자 목록 조회 | |
200 | + const governmentSelectList = (currentPage) => { | |
201 | + government.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; | |
202 | + | |
203 | + fetch("/user/userSelectList.json", { | |
204 | + method: "POST", | |
205 | + headers: { | |
206 | + 'Content-Type': 'application/json; charset=UTF-8' | |
207 | + }, | |
208 | + body: JSON.stringify(government.search), | |
209 | + }).then((response) => response.json()).then((data) => { | |
210 | + data.search = government.search; | |
211 | + console.log("관리기관 담당자 목록 조회 : ", data); | |
212 | + setGovernment(data); | |
213 | + }).catch((error) => { | |
214 | + console.log('governmentSelectList() /user/userSelectList.json error : ', error); | |
215 | + }); | |
216 | + } | |
217 | + | |
218 | + //시스템 관리자 목록 및 페이징 정보 | |
219 | + userSearch['authority'] = 'ROLE_ADMIN'; | |
220 | + const [admin, setAdmin] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); | |
221 | + const adminSearchChange = (targetKey, value) => { | |
222 | + let newAdmin = JSON.parse(JSON.stringify(admin)); | |
223 | + newAdmin.search[targetKey] = value; | |
224 | + setAdmin(newAdmin); | |
225 | + } | |
226 | + const adminSelectListEnter = (key) => { | |
227 | + if (key == 'Enter') { | |
228 | + adminSelectList(); | |
229 | + } else { | |
230 | + return; | |
231 | + } | |
232 | + } | |
233 | + //시스템 관리자 목록 조회 | |
234 | + const adminSelectList = (currentPage) => { | |
235 | + admin.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; | |
236 | + | |
237 | + fetch("/user/userSelectList.json", { | |
238 | + method: "POST", | |
239 | + headers: { | |
240 | + 'Content-Type': 'application/json; charset=UTF-8' | |
241 | + }, | |
242 | + body: JSON.stringify(admin.search), | |
243 | + }).then((response) => response.json()).then((data) => { | |
244 | + data.search = admin.search; | |
245 | + console.log("시스템 관리자 목록 조회 : ", data); | |
246 | + setAdmin(data); | |
247 | + }).catch((error) => { | |
248 | + console.log('adminSelectList() /user/userSelectList.json error : ', error); | |
249 | + }); | |
250 | + } | |
251 | + | |
252 | + | |
253 | + //올잇메디 선택 | |
254 | + const adminChange = () => { | |
255 | + const newUserSearch = JSON.parse(JSON.stringify(userSearch)); | |
256 | + newUserSearch['government_id'] = null; | |
257 | + newUserSearch['agency_id'] = null; | |
258 | + setUserSearch(newUserSearch); | |
259 | + | |
260 | + senior.search['government_id'] = null; | |
261 | + senior.search['agency_id'] = null; | |
262 | + senior.search['user_use'] = isViewType; | |
263 | + seniorSelectList(); | |
264 | + agent.search['government_id'] = null; | |
265 | + agent.search['agency_id'] = null; | |
266 | + agent.search['user_use'] = isViewType; | |
267 | + agentSelectList(); | |
268 | + agent.search['government_id'] = null; | |
269 | + agent.search['agency_id'] = null; | |
270 | + agent.search['user_use'] = isViewType; | |
271 | + agentAdminSelectList(); | |
272 | + if (state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT') { | |
273 | + government.search['government_id'] = null; | |
274 | + government.search['agency_id'] = null; | |
275 | + governmentSelectList(); | |
276 | + } | |
277 | + } | |
278 | + | |
279 | + //관리 기관 선택 | |
280 | + const governmentChange = (government_id) => { | |
281 | + const newUserSearch = JSON.parse(JSON.stringify(userSearch)); | |
282 | + newUserSearch['government_id'] = government_id; | |
283 | + newUserSearch['agency_id'] = null; | |
284 | + setUserSearch(newUserSearch); | |
285 | + | |
286 | + senior.search['government_id'] = government_id; | |
287 | + senior.search['agency_id'] = null; | |
288 | + senior.search['user_use'] = isViewType; | |
289 | + seniorSelectList(); | |
290 | + agent.search['government_id'] = government_id; | |
291 | + agent.search['agency_id'] = null; | |
292 | + agent.search['user_use'] = isViewType; | |
293 | + agentSelectList(); | |
294 | + agent.search['government_id'] = government_id; | |
295 | + agent.search['agency_id'] = null; | |
296 | + agent.search['user_use'] = isViewType; | |
297 | + agentAdminSelectList(); | |
298 | + if (state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT') { | |
299 | + government.search['government_id'] = government_id; | |
300 | + government.search['agency_id'] = null; | |
301 | + governmentSelectList(); | |
302 | + } | |
303 | + } | |
304 | + | |
305 | + //시행 기관 선택 | |
306 | + const agencyChange = (government_id, agency_id) => { | |
307 | + const newUserSearch = JSON.parse(JSON.stringify(userSearch)); | |
308 | + newUserSearch['government_id'] = government_id; | |
309 | + newUserSearch['agency_id'] = agency_id; | |
310 | + setUserSearch(newUserSearch); | |
311 | + | |
312 | + senior.search['government_id'] = government_id; | |
313 | + senior.search['agency_id'] = agency_id; | |
314 | + console.log('senior.search : ', senior.search); | |
315 | + senior.search['user_use'] = isViewType; | |
316 | + seniorSelectList(); | |
317 | + agent.search['government_id'] = government_id; | |
318 | + agent.search['agency_id'] = agency_id; | |
319 | + agent.search['user_use'] = isViewType; | |
320 | + agentSelectList(); | |
321 | + agent.search['government_id'] = government_id; | |
322 | + agent.search['agency_id'] = agency_id; | |
323 | + agent.search['user_use'] = isViewType; | |
324 | + agentAdminSelectList(); | |
325 | + } | |
326 | + | |
327 | + | |
328 | + | |
329 | + //사용자 등록 페이지 이동 | |
330 | + const join = () => { | |
331 | + navigate("/Join", { | |
332 | + state: { | |
333 | + 'government_id': userSearch['government_id'], | |
334 | + 'agency_id': userSearch['agency_id'], | |
335 | + 'authority': tabActiveByRoleType, | |
336 | + } | |
337 | + }); | |
338 | + } | |
339 | + | |
340 | + //가입승인 | |
341 | + const userUpdate = (user, callback) => { | |
342 | + user['is_accept'] = true; | |
343 | + | |
344 | + fetch("/user/userUpdate.json", { | |
345 | + method: "POST", | |
346 | + headers: { | |
347 | + 'Content-Type': 'application/json; charset=UTF-8' | |
348 | + }, | |
349 | + body: JSON.stringify(user), | |
350 | + }).then((response) => response.json()).then((data) => { | |
351 | + console.log("시니어 등록 결과(건수) : ", data); | |
352 | + if (data > 0) { | |
353 | + callback(); | |
354 | + alert("승인완료"); | |
355 | + } else { | |
356 | + alert("승인에 실패하였습니다. 관리자에게 문의바랍니다."); | |
357 | + } | |
358 | + }).catch((error) => { | |
359 | + console.log('userUpdate() /user/userUpdate.json error : ', error); | |
360 | + }); | |
361 | + } | |
362 | + | |
363 | + | |
364 | + //Mounted | |
365 | + React.useEffect(() => { | |
366 | + console.log("isViewType: ", isViewType) | |
367 | + orgSelectListOfHierarchy(); | |
368 | + | |
369 | + if (CommonUtil.isEmpty(location.state) == false) { | |
370 | + const param = location.state; | |
371 | + if (CommonUtil.isEmpty(param['tabActiveByRoleType']) == false) { | |
372 | + setTabActiveByRoleType(param['tabActiveByRoleType']); | |
373 | + } | |
374 | + governmentChange(param['government_id']); | |
375 | + agencyChange(param['government_id'], param['agency_id']); | |
376 | + } else { | |
377 | + seniorSelectList(); | |
378 | + agentSelectList(); | |
379 | + agentAdminSelectList(); | |
380 | + if (state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT') { | |
381 | + governmentSelectList(); | |
382 | + } | |
383 | + } | |
384 | + | |
385 | + if (state.loginUser['authority'] == 'ROLE_ADMIN') { | |
386 | + adminSelectList(); | |
387 | + } | |
388 | + }, [isViewType]); | |
389 | + | |
390 | + | |
391 | + return ( | |
392 | + <main> | |
393 | + <Modal_Guardian open={modalGuardianIsOpen} close={modalGuardianClose} /> | |
394 | + <Modal_SeniorInsert | |
395 | + open={modalSeniorInsertIsOpen} | |
396 | + close={modalSeniorInsertClose} | |
397 | + seniorInsertCallback={() => { seniorSelectList(); modalSeniorInsertClose(); }} | |
398 | + defaultAgencyId={userSearch['agency_id']} | |
399 | + defaultGovernmentId={userSearch['government_id']} | |
400 | + /> | |
401 | + | |
402 | + {/* <ContentTitle explanation={"사용자 관리"} /> */} | |
403 | + <div className="content-wrap"> | |
404 | + <div className="flex-align-start userauthoriylist gap5" style={{ height: "calc(100% - 61px)" }}> | |
405 | + <div className="left" style={{ height: "100%", }}> | |
406 | + <div style={{ height: "100%" }}> | |
407 | + <SubTitle | |
408 | + explanation={"기관 리스트"} | |
409 | + className="margin-bottom" | |
410 | + /> | |
411 | + {/* 카테고리 디자인 필요 (a.active 클래스 필요) */} | |
412 | + <div style={{ fontSize: '16px' }} className="category"> | |
413 | + {state.loginUser['authority'] == 'ROLE_ADMIN' ? | |
414 | + <a onClick={adminChange} | |
415 | + className={userSearch['government_id'] == null && userSearch['agency_id'] == null ? "active" : ""}> | |
416 | + 올잇메디 | |
417 | + </a> | |
418 | + : null} | |
419 | + <ul style={{ marginLeft: '15px' }}> | |
420 | + {orgListOfHierarchy.map((item, idx) => { | |
421 | + return ( | |
422 | + <li style={{ margin: '10px 0px' }} key={idx}> | |
423 | + <span style={{ marginRight: '5px' }}><img src={House} alt="" /></span> | |
424 | + <a onClick={() => { governmentChange(item['government_id']) }} | |
425 | + className={item['government_id'] == userSearch['government_id'] ? "active" : ""}> | |
426 | + {item['government_name']} | |
427 | + </a> | |
428 | + {item['agencyList'] != undefined && item['agencyList'] != null ? | |
429 | + <ul style={{ marginLeft: '15px' }}> | |
430 | + {item['agencyList'].map((item2, idx2) => { | |
431 | + return ( | |
432 | + <li style={{ margin: '10px 0px' }} key={idx2}> | |
433 | + <span style={{ marginRight: '5px' }}><img src={Arrow} alt="" /></span> | |
434 | + <a onClick={() => { agencyChange(item['government_id'], item2['agency_id']) }} | |
435 | + className={item2['agency_id'] == userSearch['agency_id'] ? "active" : ""}> | |
436 | + {item2['agency_name']} | |
437 | + </a> | |
438 | + </li> | |
439 | + ) | |
440 | + })} | |
441 | + </ul> | |
442 | + : null | |
443 | + } | |
444 | + </li> | |
445 | + ) | |
446 | + })} | |
447 | + </ul> | |
448 | + </div> | |
449 | + {/* 카테고리 디자인 필요 */} | |
450 | + </div> | |
451 | + </div> | |
452 | + <div className="right" style={{ height: "100%", }}> | |
453 | + <div style={{ height: "100%" }}> | |
454 | + <SubTitle explanation={`사용자 리스트`} className="margin-bottom" /> | |
455 | + <div className="tab-container"> | |
456 | + | |
457 | + {/* 탭 제목 */} | |
458 | + <ul className="tab-menu flex-end" > | |
459 | + {/* <li onClick={() => setTabActiveByRoleType('ROLE_SENIOR')} className={tabActiveByRoleType == 'ROLE_SENIOR' ? "active" : null}>대상자(어르신) ({senior.userListCount})</li> */} | |
460 | + <li onClick={() => setTabActiveByRoleType('ROLE_AGENCY')} className={tabActiveByRoleType == 'ROLE_AGENCY' ? "active" : null}>생활보호사 ({agent.userListCount})</li> | |
461 | + {state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_AGENCYADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT' ? | |
462 | + <li onClick={() => setTabActiveByRoleType('ROLE_AGENCYADMIN')} className={tabActiveByRoleType == 'ROLE_AGENCYADMIN' ? "active" : null}>센터 관리자 ({agentAdmin.userListCount})</li> | |
463 | + : null} | |
464 | + {state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT' ? | |
465 | + <li onClick={() => setTabActiveByRoleType('ROLE_GOVERNMENT')} className={tabActiveByRoleType == 'ROLE_GOVERNMENT' ? "active" : null}>기관 관리자 ({government.userListCount})</li> | |
466 | + : null} | |
467 | + {state.loginUser['authority'] == 'ROLE_ADMIN' ? | |
468 | + <li onClick={() => setTabActiveByRoleType('ROLE_ADMIN')} className={tabActiveByRoleType == 'ROLE_ADMIN' ? "active" : null}>시스템 관리자 ({admin.userListCount})</li> | |
469 | + : null} | |
470 | + </ul> | |
471 | + | |
472 | + {/* 탭 내용 */} | |
473 | + <div className="content-wrap userlist"> | |
474 | + {{ | |
475 | + /* 대상자(시니어) (시작) */ | |
476 | + ROLE_SENIOR: ( | |
477 | + <ul className="tab-content"> | |
478 | + <div> | |
479 | + <div className="search-management flex-start margin-bottom2"> | |
480 | + <select id="searchType1" style={{ maxWidth: 'fit-content' }} onChange={(e) => { seniorSearchChange("searchType", e.target.value) }}> | |
481 | + <option value="" selected={senior.search.searchText == ""}>전체</option> | |
482 | + <option value="user_name" selected={senior.search.searchText == "user_name"}>이름</option> | |
483 | + <option value="user_phonenumber" selected={senior.search.searchText == "user_phonenumber"}>연락처</option> | |
484 | + <option value="user_id" selected={senior.search.searchText == "user_id"}>아이디</option> | |
485 | + </select> | |
486 | + <input type="text" id="searchText1" | |
487 | + value={senior.search.searchText} | |
488 | + onChange={(e) => { seniorSearchChange("searchText", e.target.value) }} | |
489 | + onKeyUp={(e) => { seniorSelectListEnter(e.key) }} | |
490 | + /> | |
491 | + <button className={"btn-small gray-btn"} onClick={() => { seniorSelectList() }}>검색</button> | |
492 | + </div> | |
493 | + | |
494 | + <div className="btn-wrap flex margin-bottom"> | |
495 | + <SubTitle explanation={"대상자 클릭 시 상세페이지로 이동합니다."} /> | |
496 | + {/* <button className={"btn-small gray-btn"} onClick={() => modalSeniorInsertOpen()}>등록</button> */} | |
497 | + </div> | |
498 | + | |
499 | + <table className={"protector-user"}> | |
500 | + <thead> | |
501 | + <tr> | |
502 | + <th>No</th> | |
503 | + <th>소속기관명</th> | |
504 | + <th>이름</th> | |
505 | + <th>생년월일</th> | |
506 | + <th>성별</th> | |
507 | + <th>연락처</th> | |
508 | + <th>주소</th> | |
509 | + </tr> | |
510 | + </thead> | |
511 | + <tbody> | |
512 | + {senior.userList.map((item, idx) => { | |
513 | + return ( | |
514 | + <tr key={idx} onClick={() => { | |
515 | + navigate("/SeniorSelectOne", { | |
516 | + state: { | |
517 | + 'senior_id': item['user_id'], | |
518 | + 'agency_id': item['agency_id'], | |
519 | + 'government_id': item['government_id'] | |
520 | + } | |
521 | + }) | |
522 | + }}> | |
523 | + <td data-label="No">{senior.userListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> | |
524 | + <td data-label="No">{item['agency_name']}</td> | |
525 | + <td data-label="소속기관명">{item['user_name']}</td> | |
526 | + <td data-label="생년월일">{item['user_birth']}</td> | |
527 | + <td data-label="성별">{item['user_gender']}</td> | |
528 | + <td data-label="연락처">{item['user_phonenumber']}</td> | |
529 | + <td data-label="주소">{item['user_address']}</td> | |
530 | + </tr> | |
531 | + ) | |
532 | + })} | |
533 | + {senior.userList == null || senior.userList.length == 0 ? | |
534 | + <tr> | |
535 | + <td colSpan={7}>조회된 데이터가 없습니다</td> | |
536 | + </tr> | |
537 | + : null} | |
538 | + </tbody> | |
539 | + </table> | |
540 | + <Pagination | |
541 | + currentPage={senior.search.currentPage} | |
542 | + perPage={senior.search.perPage} | |
543 | + totalCount={senior.userListCount} | |
544 | + maxRange={5} | |
545 | + click={seniorSelectList} | |
546 | + /> | |
547 | + </div> | |
548 | + </ul> | |
549 | + ), | |
550 | + /* 대상자(시니어) (종료) */ | |
551 | + | |
552 | + /* 시행기관(복지사, 간호사) 사용자 (시작) */ | |
553 | + ROLE_AGENCY: ( | |
554 | + <ul className="tab-content"> | |
555 | + <div> | |
556 | + | |
557 | + <div className="search-management flex-start margin-bottom2"> | |
558 | + <select id="searchType2" style={{ maxWidth: 'fit-content' }} onChange={(e) => { agentSearchChange("searchType", e.target.value) }}> | |
559 | + <option value="" selected={agent.search.searchText == ""}>전체</option> | |
560 | + <option value="user_name" selected={agent.search.searchText == "user_name"}>이름</option> | |
561 | + <option value="user_phonenumber" selected={agent.search.searchText == "user_phonenumber"}>연락처</option> | |
562 | + <option value="user_id" selected={agent.search.searchText == "user_id"}>아이디</option> | |
563 | + </select> | |
564 | + <input id="searchText2" type="text" | |
565 | + value={agent.search.searchText} | |
566 | + onChange={(e) => { agentSearchChange("searchText", e.target.value) }} | |
567 | + onKeyUp={(e) => { agentSelectListEnter(e.key) }} | |
568 | + /> | |
569 | + <button className={"btn-small gray-btn"} onClick={() => { agentSelectList() }}>검색</button> | |
570 | + </div> | |
571 | + | |
572 | + <div className="radio-tab btn-wrap flex-end margin-bottom"> | |
573 | + <div className="flex-start"> | |
574 | + <div> | |
575 | + <input type="radio" name="viewType" id="useTrue" | |
576 | + checked={isViewType} | |
577 | + onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> | |
578 | + <label htmlFor="useTrue">활성화</label> | |
579 | + </div> | |
580 | + <div> | |
581 | + <input type="radio" name="viewType" id="useFalse" | |
582 | + checked={!isViewType} | |
583 | + onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> | |
584 | + <label htmlFor="useFalse">미활성화</label> | |
585 | + </div> | |
586 | + </div> | |
587 | + <button className={"btn-small gray-btn"} onClick={join}>등록</button> | |
588 | + </div> | |
589 | + | |
590 | + <table className={"senior-user protector-user"}> | |
591 | + <thead> | |
592 | + <tr> | |
593 | + <th>No</th> | |
594 | + <th>관리기관명</th> | |
595 | + <th>소속기관명</th> | |
596 | + <th>이름</th> | |
597 | + <th>연락처</th> | |
598 | + <th>이메일</th> | |
599 | + <th>가입승인</th> | |
600 | + <th>상세보기</th> | |
601 | + </tr> | |
602 | + </thead> | |
603 | + <tbody> | |
604 | + {agent.userList.map((item, idx) => { | |
605 | + return ( | |
606 | + <tr key={idx}> | |
607 | + <td data-label="No">{agent.userListCount - idx - (agent.search.currentPage - 1) * agent.search.perPage}</td> | |
608 | + <td data-label="관리기관명">{item['government_name']}</td> | |
609 | + <td data-label="소속기관명">{item['agency_name']}</td> | |
610 | + <td data-label="이름">{item['user_name']}</td> | |
611 | + <td data-label="연락처">{item['user_phonenumber']}</td> | |
612 | + <td data-label="이메일">{item['user_email']}</td> | |
613 | + <td data-label="가입승인"> | |
614 | + {item['is_accept'] ? "승인완료" : | |
615 | + <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, agentSelectList) }}>가입승인</button> | |
616 | + } | |
617 | + </td> | |
618 | + <td data-label="상세보기"> | |
619 | + <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/AgentSelectOne", { state: { 'agent_id': item['user_id'] } }) }}>상세 페이지 이동</button> | |
620 | + </td> | |
621 | + </tr> | |
622 | + ) | |
623 | + })} | |
624 | + {agent.userList == null || agent.userList.length == 0 ? | |
625 | + <tr> | |
626 | + <td colSpan={8}>조회된 데이터가 없습니다</td> | |
627 | + </tr> | |
628 | + : null} | |
629 | + </tbody> | |
630 | + </table> | |
631 | + <Pagination | |
632 | + currentPage={agent.search.currentPage} | |
633 | + perPage={agent.search.perPage} | |
634 | + totalCount={agent.userListCount} | |
635 | + maxRange={5} | |
636 | + click={agentSelectList} | |
637 | + /> | |
638 | + </div> | |
639 | + </ul> | |
640 | + ), | |
641 | + /* 시행기관(복지사, 간호사) 사용자 (종료) */ | |
642 | + | |
643 | + /* 시행기관(복지사, 간호사) 관리자 (시작) */ | |
644 | + ROLE_AGENCYADMIN: ( | |
645 | + <ul className="tab-content"> | |
646 | + <div> | |
647 | + <div className="search-management flex-start margin-bottom2"> | |
648 | + <select id="searchType2" style={{ maxWidth: 'fit-content' }} onChange={(e) => { agentAdminSearchChange("searchType", e.target.value) }}> | |
649 | + <option value="" selected={agentAdmin.search.searchText == ""}>전체</option> | |
650 | + <option value="user_name" selected={agentAdmin.search.searchText == "user_name"}>이름</option> | |
651 | + <option value="user_phonenumber" selected={agentAdmin.search.searchText == "user_phonenumber"}>연락처</option> | |
652 | + <option value="user_id" selected={agentAdmin.search.searchText == "user_id"}>아이디</option> | |
653 | + </select> | |
654 | + <input id="searchText2" type="text" | |
655 | + value={agentAdmin.search.searchText} | |
656 | + onChange={(e) => { agentAdminSearchChange("searchText", e.target.value) }} | |
657 | + onKeyUp={(e) => { agentAdminSelectListEnter(e.key) }} | |
658 | + /> | |
659 | + <button className={"btn-small gray-btn"} onClick={() => { agentAdminSelectList() }}>검색</button> | |
660 | + </div> | |
661 | + | |
662 | + <div className="radio-tab btn-wrap flex-end margin-bottom"> | |
663 | + <div className="flex-start"> | |
664 | + <div> | |
665 | + <input type="radio" name="viewType" id="useTrue" | |
666 | + checked={isViewType} | |
667 | + onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> | |
668 | + <label htmlFor="useTrue">활성화</label> | |
669 | + </div> | |
670 | + <div> | |
671 | + <input type="radio" name="viewType" id="useFalse" | |
672 | + checked={!isViewType} | |
673 | + onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> | |
674 | + <label htmlFor="useFalse">미활성화</label> | |
675 | + </div> | |
676 | + </div> | |
677 | + <button className={"btn-small gray-btn"} onClick={join}>등록</button> | |
678 | + </div> | |
679 | + | |
680 | + <table className={"senior-user protector-user"}> | |
681 | + <thead> | |
682 | + <tr> | |
683 | + <th>No</th> | |
684 | + <th>관리기관명</th> | |
685 | + <th>소속기관명</th> | |
686 | + <th>이름</th> | |
687 | + <th>연락처</th> | |
688 | + <th>이메일</th> | |
689 | + <th>가입승인</th> | |
690 | + <th>상세보기</th> | |
691 | + </tr> | |
692 | + </thead> | |
693 | + <tbody> | |
694 | + {agentAdmin.userList.map((item, idx) => { | |
695 | + return ( | |
696 | + <tr key={idx}> | |
697 | + <td data-label="No">{agentAdmin.userListCount - idx - (agentAdmin.search.currentPage - 1) * agentAdmin.search.perPage}</td> | |
698 | + <td data-label="관리기관명">{item['government_name']}</td> | |
699 | + <td data-label="소속기관명">{item['agency_name']}</td> | |
700 | + <td data-label="이름">{item['user_name']}</td> | |
701 | + <td data-label="연락처">{item['user_phonenumber']}</td> | |
702 | + <td data-label="이메일">{item['user_email']}</td> | |
703 | + <td data-label="가입승인"> | |
704 | + {item['is_accept'] ? "승인완료" : | |
705 | + <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, agentAdminSelectList) }}>가입승인</button> | |
706 | + } | |
707 | + </td> | |
708 | + <td data-label="상세보기"> | |
709 | + <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/AgentSelectOne", { state: { 'agent_id': item['user_id'] } }) }}>상세 페이지 이동</button> | |
710 | + </td> | |
711 | + </tr> | |
712 | + ) | |
713 | + })} | |
714 | + {agentAdmin.userList == null || agentAdmin.userList.length == 0 ? | |
715 | + <tr> | |
716 | + <td colSpan={8}>조회된 데이터가 없습니다</td> | |
717 | + </tr> | |
718 | + : null} | |
719 | + </tbody> | |
720 | + </table> | |
721 | + <Pagination | |
722 | + currentPage={agentAdmin.search.currentPage} | |
723 | + perPage={agentAdmin.search.perPage} | |
724 | + totalCount={agentAdmin.userListCount} | |
725 | + maxRange={5} | |
726 | + click={agentAdminSelectList} | |
727 | + /> | |
728 | + </div> | |
729 | + </ul> | |
730 | + ), | |
731 | + /* 시행기관(복지사, 간호사) 관리자 (종료) */ | |
732 | + | |
733 | + /* 관리기관(지자체, 병원) 사용자 (시작) */ | |
734 | + ROLE_GOVERNMENT: ( | |
735 | + <ul className="tab-content"> | |
736 | + <div> | |
737 | + | |
738 | + <div className="search-management flex-start margin-bottom2"> | |
739 | + <select style={{ maxWidth: 'fit-content' }} onChange={(e) => { governmentSearchChange("searchType", e.target.value) }}> | |
740 | + <option value="" selected={government.search.searchText == ""}>전체</option> | |
741 | + <option value="user_name" selected={government.search.searchText == "user_name"}>이름</option> | |
742 | + <option value="user_phonenumber" selected={government.search.searchText == "user_phonenumber"}>연락처</option> | |
743 | + <option value="user_id" selected={government.search.searchText == "user_id"}>아이디</option> | |
744 | + </select> | |
745 | + <input type="text" | |
746 | + value={government.search.searchText} | |
747 | + onChange={(e) => { governmentSearchChange("searchText", e.target.value) }} | |
748 | + onKeyUp={(e) => { governmentSelectListEnter(e.key) }} | |
749 | + /> | |
750 | + <button className={"btn-small gray-btn"} onClick={() => { governmentSelectList() }}>검색</button> | |
751 | + </div> | |
752 | + | |
753 | + <div className="radio-tab btn-wrap flex-end margin-bottom"> | |
754 | + <div className="flex-start"> | |
755 | + <div> | |
756 | + <input type="radio" name="viewType" id="useTrue" | |
757 | + checked={isViewType} | |
758 | + onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> | |
759 | + <label htmlFor="useTrue">활성화</label> | |
760 | + </div> | |
761 | + <div> | |
762 | + <input type="radio" name="viewType" id="useFalse" | |
763 | + checked={!isViewType} | |
764 | + onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> | |
765 | + <label htmlFor="useFalse">미활성화</label> | |
766 | + </div> | |
767 | + </div> | |
768 | + <button className={"btn-small gray-btn"} onClick={join}>등록</button> | |
769 | + </div> | |
770 | + | |
771 | + <table className={"senior-user protector-user"}> | |
772 | + <thead> | |
773 | + <tr> | |
774 | + <th>No</th> | |
775 | + <th>소속기관명</th> | |
776 | + <th>이름</th> | |
777 | + <th>연락처</th> | |
778 | + <th>이메일</th> | |
779 | + <th>가입승인</th> | |
780 | + <th>관리</th> | |
781 | + </tr> | |
782 | + </thead> | |
783 | + <tbody> | |
784 | + {government.userList.map((item, idx) => { | |
785 | + return ( | |
786 | + <tr key={idx}> | |
787 | + <td data-label="No">{government.userListCount - idx - (government.search.currentPage - 1) * government.search.perPage}</td> | |
788 | + <td data-label="소속기관명">{item['government_name']}</td> | |
789 | + <td data-label="이름">{item['user_name']}</td> | |
790 | + <td data-label="연락처">{item['user_phonenumber']}</td> | |
791 | + <td data-label="이메일">{item['user_email']}</td> | |
792 | + <td data-label="가입승인"> | |
793 | + {item['is_accept'] ? "승인완료" : | |
794 | + <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, governmentSelectList) }}>가입승인</button> | |
795 | + } | |
796 | + </td> | |
797 | + <td data-label="관리"> | |
798 | + <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/UserEdit", { state: { 'user_id': item['user_id'] } }) }}>정보 수정</button> | |
799 | + </td> | |
800 | + </tr> | |
801 | + ) | |
802 | + })} | |
803 | + {government.userList == null || government.userList.length == 0 ? | |
804 | + <tr> | |
805 | + <td colSpan={7}>조회된 데이터가 없습니다</td> | |
806 | + </tr> | |
807 | + : null} | |
808 | + </tbody> | |
809 | + </table> | |
810 | + <Pagination | |
811 | + currentPage={government.search.currentPage} | |
812 | + perPage={government.search.perPage} | |
813 | + totalCount={government.userListCount} | |
814 | + maxRange={5} | |
815 | + click={governmentSelectList} | |
816 | + /> | |
817 | + </div> | |
818 | + </ul> | |
819 | + ), | |
820 | + /* 관리기관(지자체, 병원) 사용자 (종료) */ | |
821 | + | |
822 | + /* 시스템 관리자 (시작) */ | |
823 | + ROLE_ADMIN: ( | |
824 | + <ul className="tab-content"> | |
825 | + <div> | |
826 | + | |
827 | + <div className="search-management flex-start margin-bottom2"> | |
828 | + <select style={{ maxWidth: 'fit-content' }} onChange={(e) => { adminSearchChange("searchType", e.target.value) }}> | |
829 | + <option value="" selected={admin.search.searchText == ""}>전체</option> | |
830 | + <option value="user_name" selected={admin.search.searchText == "user_name"}>이름</option> | |
831 | + <option value="user_phonenumber" selected={admin.search.searchText == "user_phonenumber"}>연락처</option> | |
832 | + <option value="user_id" selected={admin.search.searchText == "user_id"}>아이디</option> | |
833 | + </select> | |
834 | + <input type="text" | |
835 | + value={admin.search.searchText} | |
836 | + onChange={(e) => { adminSearchChange("searchText", e.target.value) }} | |
837 | + onKeyUp={(e) => { adminSelectListEnter(e.key) }} | |
838 | + /> | |
839 | + <button className={"btn-small gray-btn"} onClick={() => { adminSelectList() }}>검색</button> | |
840 | + </div> | |
841 | + | |
842 | + <div className="radio-tab btn-wrap flex-end margin-bottom"> | |
843 | + <div className="flex-start"> | |
844 | + <div> | |
845 | + <input type="radio" name="viewType" id="useTrue" | |
846 | + checked={isViewType} | |
847 | + onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> | |
848 | + <label htmlFor="useTrue">활성화</label> | |
849 | + </div> | |
850 | + <div> | |
851 | + <input type="radio" name="viewType" id="useFalse" | |
852 | + checked={!isViewType} | |
853 | + onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> | |
854 | + <label htmlFor="useFalse">미활성화</label> | |
855 | + </div> | |
856 | + </div> | |
857 | + <button className={"btn-small gray-btn"} onClick={join}>등록</button> | |
858 | + </div> | |
859 | + | |
860 | + <table className={"senior-user protector-user"}> | |
861 | + <thead> | |
862 | + <tr> | |
863 | + <th>No</th> | |
864 | + <th>이름</th> | |
865 | + <th>연락처</th> | |
866 | + <th>이메일</th> | |
867 | + <th>가입승인</th> | |
868 | + <th>관리</th> | |
869 | + </tr> | |
870 | + </thead> | |
871 | + <tbody> | |
872 | + {admin.userList.map((item, idx) => { | |
873 | + return ( | |
874 | + <tr key={idx}> | |
875 | + <td data-label="No">{admin.userListCount - idx - (admin.search.currentPage - 1) * admin.search.perPage}</td> | |
876 | + <td data-label="이름">{item['user_name']}</td> | |
877 | + <td data-label="연락처">{item['user_phonenumber']}</td> | |
878 | + <td data-label="이메일">{item['user_email']}</td> | |
879 | + <td data-label="가입승인"> | |
880 | + {item['is_accept'] ? "승인완료" : | |
881 | + <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, adminSelectList) }}>가입승인</button> | |
882 | + } | |
883 | + </td> | |
884 | + <td data-label="관리"> | |
885 | + <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/UserEdit", { state: { 'user_id': item['user_id'] } }) }}>정보 수정</button> | |
886 | + </td> | |
887 | + </tr> | |
888 | + ) | |
889 | + })} | |
890 | + {admin.userList == null || admin.userList.length == 0 ? | |
891 | + <tr> | |
892 | + <td colSpan={6}>조회된 데이터가 없습니다</td> | |
893 | + </tr> | |
894 | + : null} | |
895 | + </tbody> | |
896 | + </table> | |
897 | + <Pagination | |
898 | + currentPage={admin.search.currentPage} | |
899 | + perPage={admin.search.perPage} | |
900 | + totalCount={admin.userListCount} | |
901 | + maxRange={5} | |
902 | + click={adminSelectList} | |
903 | + /> | |
904 | + </div> | |
905 | + </ul> | |
906 | + ) | |
907 | + /* 시스템 관리자 (종료) */ | |
908 | + }[tabActiveByRoleType]} | |
909 | + </div> | |
910 | + | |
911 | + </div> | |
912 | + </div> | |
913 | + </div> | |
914 | + </div> | |
915 | + </div> | |
916 | + </main> | |
917 | + ); | |
918 | +} |
--- client/views/pages/user_management/AgentSelectOne.jsx
+++ client/views/pages/user_management/AgentSelectOne.jsx
... | ... | @@ -131,6 +131,40 @@ |
131 | 131 |
}); |
132 | 132 |
} |
133 | 133 |
|
134 |
+ // 생활보호사 삭제 |
|
135 |
+ const agentDelete = (agent) => { |
|
136 |
+ let insertBtn = confirm("삭제하시겠습니까?"); |
|
137 |
+ if (insertBtn) { |
|
138 |
+ // 생활보호사 매칭 종료 |
|
139 |
+ seniorByAgent.seniorListByAgent.map((item, idx) => { |
|
140 |
+ agentSeniorDelete(item); |
|
141 |
+ console.log("삭제 대상 시니어 : ", item) |
|
142 |
+ }) |
|
143 |
+ |
|
144 |
+ agent['user_use'] = false; |
|
145 |
+ |
|
146 |
+ fetch("/user/userUpdate.json", { |
|
147 |
+ method: "POST", |
|
148 |
+ headers: { |
|
149 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
150 |
+ }, |
|
151 |
+ body: JSON.stringify(agent), |
|
152 |
+ }).then((response) => response.json()).then((data) => { |
|
153 |
+ console.log("사용자 등록 결과(건수) : ", data); |
|
154 |
+ if (data > 0) { |
|
155 |
+ alert("삭제 되었습니다."); |
|
156 |
+ navigate(-1); |
|
157 |
+ } else { |
|
158 |
+ alert("삭제에 실패하였습니다."); |
|
159 |
+ } |
|
160 |
+ }).catch((error) => { |
|
161 |
+ console.log('agentDelete() /user/userUpdate.json error : ', error); |
|
162 |
+ }); |
|
163 |
+ } else { |
|
164 |
+ return; |
|
165 |
+ } |
|
166 |
+ } |
|
167 |
+ |
|
134 | 168 |
React.useEffect(() => { |
135 | 169 |
agentSelectOne(); |
136 | 170 |
seniorSelectListByAgent(); |
... | ... | @@ -199,7 +233,7 @@ |
199 | 233 |
</table> |
200 | 234 |
<div className="btn-wrap flex-center"> |
201 | 235 |
<button className={"btn-large gray-btn"} onClick={() => { navigate("/UserEdit", { state: { 'user_id': agent['user_id'] } }) }}>수정</button> |
202 |
- <button className={"btn-large red-btn"} onClick={() => alert("삭제할 수 없습니다.")}>삭제</button> |
|
236 |
+ <button className={"btn-large red-btn"} onClick={() => agentDelete(agent)}>삭제</button> |
|
203 | 237 |
</div> |
204 | 238 |
</div> |
205 | 239 |
|
... | ... | @@ -264,9 +298,7 @@ |
264 | 298 |
<div className="btn-wrap flex-center"> |
265 | 299 |
<button className={"btn-large gray-btn"} onClick={() => navigate(-1)}>이전</button> |
266 | 300 |
</div> |
267 |
- |
|
268 | 301 |
</div> |
269 |
- |
|
270 | 302 |
</main> |
271 | 303 |
); |
272 | 304 |
} |
--- client/views/pages/user_management/UserSelect.jsx
+++ client/views/pages/user_management/UserSelect.jsx
... | ... | @@ -65,57 +65,46 @@ |
65 | 65 |
|
66 | 66 |
|
67 | 67 |
// user_state |
68 |
- const [isViewType, setIsViewType] = React.useState(true); |
|
68 |
+ const [isAdminType, setIsAdminType] = React.useState(true); |
|
69 |
+ const changeAdminType = (userType) => { |
|
70 |
+ setIsAdminType(userType); |
|
71 |
+ admin.search.user_use = userType; |
|
72 |
+ adminSelectList(); |
|
73 |
+ } |
|
74 |
+ |
|
75 |
+ const [isGovType, setIsGovType] = React.useState(true); |
|
76 |
+ const changeGovType = (userType) => { |
|
77 |
+ setIsGovType(userType); |
|
78 |
+ government.search.user_use = userType; |
|
79 |
+ governmentSelectList(); |
|
80 |
+ } |
|
81 |
+ |
|
82 |
+ const [isAgentAdminType, setIsAgentAdminType] = React.useState(true); |
|
83 |
+ const changeAgentAdminType = (userType) => { |
|
84 |
+ setIsAgentAdminType(userType); |
|
85 |
+ agentAdmin.search.user_use = userType; |
|
86 |
+ agentAdminSelectList(); |
|
87 |
+ } |
|
88 |
+ |
|
89 |
+ const [isAgentType, setIsAgentType] = React.useState(true); |
|
90 |
+ const changeAgentType = (userType) => { |
|
91 |
+ setIsAgentType(userType); |
|
92 |
+ agent.search.user_use = userType; |
|
93 |
+ agentSelectList(); |
|
94 |
+ } |
|
95 |
+ |
|
69 | 96 |
//검색 변수 (초기화값) |
70 | 97 |
const [userSearch, setUserSearch] = React.useState({ |
71 | 98 |
'government_id': state.loginUser['government_id'], |
72 | 99 |
'agency_id': state.loginUser['agency_id'], |
73 | 100 |
'authority': null, |
74 |
- 'user_use': null, |
|
101 |
+ 'user_use': true, |
|
75 | 102 |
|
76 | 103 |
'searchType': null, |
77 | 104 |
'searchText': null, |
78 | 105 |
'currentPage': 1, |
79 | 106 |
'perPage': 10, |
80 | 107 |
}); |
81 |
- |
|
82 |
- const useStateChange = () => { |
|
83 |
- senior.search.user_use = isViewType ? null : false; |
|
84 |
- } |
|
85 |
- |
|
86 |
- //대상자(시니어) 목록 및 페이징 정보 |
|
87 |
- userSearch['authority'] = 'ROLE_SENIOR'; |
|
88 |
- const [senior, setSenior] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); |
|
89 |
- const seniorSearchChange = (targetKey, value) => { |
|
90 |
- let newSenior = JSON.parse(JSON.stringify(senior)); |
|
91 |
- newSenior.search[targetKey] = value; |
|
92 |
- setSenior(newSenior); |
|
93 |
- } |
|
94 |
- const seniorSelectListEnter = (key) => { |
|
95 |
- if (key == 'Enter') { |
|
96 |
- seniorSelectList(); |
|
97 |
- } else { |
|
98 |
- return; |
|
99 |
- } |
|
100 |
- } |
|
101 |
- //대상자(시니어) 목록 조회 |
|
102 |
- const seniorSelectList = (currentPage) => { |
|
103 |
- senior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
|
104 |
- |
|
105 |
- fetch("/user/userSelectList.json", { |
|
106 |
- method: "POST", |
|
107 |
- headers: { |
|
108 |
- 'Content-Type': 'application/json; charset=UTF-8' |
|
109 |
- }, |
|
110 |
- body: JSON.stringify(senior.search), |
|
111 |
- }).then((response) => response.json()).then((data) => { |
|
112 |
- data.search = senior.search; |
|
113 |
- console.log("대상자(시니어) 목록 조회 : ", data); |
|
114 |
- setSenior(data); |
|
115 |
- }).catch((error) => { |
|
116 |
- console.log('seniorSelectList() /user/userSelectList.json error : ', error); |
|
117 |
- }); |
|
118 |
- } |
|
119 | 108 |
|
120 | 109 |
//시행기관 담당자 목록 및 페이징 정보 |
121 | 110 |
userSearch['authority'] = 'ROLE_AGENCY'; |
... | ... | @@ -261,9 +250,6 @@ |
261 | 250 |
newUserSearch['agency_id'] = null; |
262 | 251 |
setUserSearch(newUserSearch); |
263 | 252 |
|
264 |
- senior.search['government_id'] = null; |
|
265 |
- senior.search['agency_id'] = null; |
|
266 |
- seniorSelectList(); |
|
267 | 253 |
agent.search['government_id'] = null; |
268 | 254 |
agent.search['agency_id'] = null; |
269 | 255 |
agentSelectList(); |
... | ... | @@ -284,9 +270,6 @@ |
284 | 270 |
newUserSearch['agency_id'] = null; |
285 | 271 |
setUserSearch(newUserSearch); |
286 | 272 |
|
287 |
- senior.search['government_id'] = government_id; |
|
288 |
- senior.search['agency_id'] = null; |
|
289 |
- seniorSelectList(); |
|
290 | 273 |
agent.search['government_id'] = government_id; |
291 | 274 |
agent.search['agency_id'] = null; |
292 | 275 |
agentSelectList(); |
... | ... | @@ -307,10 +290,6 @@ |
307 | 290 |
newUserSearch['agency_id'] = agency_id; |
308 | 291 |
setUserSearch(newUserSearch); |
309 | 292 |
|
310 |
- senior.search['government_id'] = government_id; |
|
311 |
- senior.search['agency_id'] = agency_id; |
|
312 |
- console.log('senior.search : ', senior.search); |
|
313 |
- seniorSelectList(); |
|
314 | 293 |
agent.search['government_id'] = government_id; |
315 | 294 |
agent.search['agency_id'] = agency_id; |
316 | 295 |
agentSelectList(); |
... | ... | @@ -368,7 +347,6 @@ |
368 | 347 |
governmentChange(param['government_id']); |
369 | 348 |
agencyChange(param['government_id'], param['agency_id']); |
370 | 349 |
} else { |
371 |
- seniorSelectList(); |
|
372 | 350 |
agentSelectList(); |
373 | 351 |
agentAdminSelectList(); |
374 | 352 |
if (state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT') { |
... | ... | @@ -379,19 +357,12 @@ |
379 | 357 |
if (state.loginUser['authority'] == 'ROLE_ADMIN') { |
380 | 358 |
adminSelectList(); |
381 | 359 |
} |
382 |
- }, [isViewType]); |
|
360 |
+ }, []); |
|
383 | 361 |
|
384 | 362 |
|
385 | 363 |
return ( |
386 | 364 |
<main> |
387 | 365 |
<Modal_Guardian open={modalGuardianIsOpen} close={modalGuardianClose} /> |
388 |
- <Modal_SeniorInsert |
|
389 |
- open={modalSeniorInsertIsOpen} |
|
390 |
- close={modalSeniorInsertClose} |
|
391 |
- seniorInsertCallback={() => { seniorSelectList(); modalSeniorInsertClose(); }} |
|
392 |
- defaultAgencyId={userSearch['agency_id']} |
|
393 |
- defaultGovernmentId={userSearch['government_id']} |
|
394 |
- /> |
|
395 | 366 |
|
396 | 367 |
{/* <ContentTitle explanation={"사용자 관리"} /> */} |
397 | 368 |
<div className="content-wrap"> |
... | ... | @@ -450,7 +421,6 @@ |
450 | 421 |
|
451 | 422 |
{/* 탭 제목 */} |
452 | 423 |
<ul className="tab-menu flex-end" > |
453 |
- {/* <li onClick={() => setTabActiveByRoleType('ROLE_SENIOR')} className={tabActiveByRoleType == 'ROLE_SENIOR' ? "active" : null}>대상자(어르신) ({senior.userListCount})</li> */} |
|
454 | 424 |
<li onClick={() => setTabActiveByRoleType('ROLE_AGENCY')} className={tabActiveByRoleType == 'ROLE_AGENCY' ? "active" : null}>생활보호사 ({agent.userListCount})</li> |
455 | 425 |
{state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_AGENCYADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT' ? |
456 | 426 |
<li onClick={() => setTabActiveByRoleType('ROLE_AGENCYADMIN')} className={tabActiveByRoleType == 'ROLE_AGENCYADMIN' ? "active" : null}>센터 관리자 ({agentAdmin.userListCount})</li> |
... | ... | @@ -466,88 +436,10 @@ |
466 | 436 |
{/* 탭 내용 */} |
467 | 437 |
<div className="content-wrap userlist"> |
468 | 438 |
{{ |
469 |
- /* 대상자(시니어) (시작) */ |
|
470 |
- ROLE_SENIOR: ( |
|
471 |
- <ul className="tab-content"> |
|
472 |
- <div> |
|
473 |
- <div className="search-management flex-start margin-bottom2"> |
|
474 |
- <select id="searchType1" style={{ maxWidth: 'fit-content' }} onChange={(e) => { seniorSearchChange("searchType", e.target.value) }}> |
|
475 |
- <option value="" selected={senior.search.searchText == ""}>전체</option> |
|
476 |
- <option value="user_name" selected={senior.search.searchText == "user_name"}>이름</option> |
|
477 |
- <option value="user_phonenumber" selected={senior.search.searchText == "user_phonenumber"}>연락처</option> |
|
478 |
- <option value="user_id" selected={senior.search.searchText == "user_id"}>아이디</option> |
|
479 |
- </select> |
|
480 |
- <input type="text" id="searchText1" |
|
481 |
- value={senior.search.searchText} |
|
482 |
- onChange={(e) => { seniorSearchChange("searchText", e.target.value) }} |
|
483 |
- onKeyUp={(e) => { seniorSelectListEnter(e.key) }} |
|
484 |
- /> |
|
485 |
- <button className={"btn-small gray-btn"} onClick={() => { seniorSelectList() }}>검색</button> |
|
486 |
- </div> |
|
487 |
- |
|
488 |
- <div className="btn-wrap flex margin-bottom"> |
|
489 |
- <SubTitle explanation={"대상자 클릭 시 상세페이지로 이동합니다."} /> |
|
490 |
- {/* <button className={"btn-small gray-btn"} onClick={() => modalSeniorInsertOpen()}>등록</button> */} |
|
491 |
- </div> |
|
492 |
- |
|
493 |
- <table className={"protector-user"}> |
|
494 |
- <thead> |
|
495 |
- <tr> |
|
496 |
- <th>No</th> |
|
497 |
- <th>소속기관명</th> |
|
498 |
- <th>이름</th> |
|
499 |
- <th>생년월일</th> |
|
500 |
- <th>성별</th> |
|
501 |
- <th>연락처</th> |
|
502 |
- <th>주소</th> |
|
503 |
- </tr> |
|
504 |
- </thead> |
|
505 |
- <tbody> |
|
506 |
- {senior.userList.map((item, idx) => { |
|
507 |
- return ( |
|
508 |
- <tr key={idx} onClick={() => { |
|
509 |
- navigate("/SeniorSelectOne", { |
|
510 |
- state: { |
|
511 |
- 'senior_id': item['user_id'], |
|
512 |
- 'agency_id': item['agency_id'], |
|
513 |
- 'government_id': item['government_id'] |
|
514 |
- } |
|
515 |
- }) |
|
516 |
- }}> |
|
517 |
- <td data-label="No">{senior.userListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
518 |
- <td data-label="No">{item['agency_name']}</td> |
|
519 |
- <td data-label="소속기관명">{item['user_name']}</td> |
|
520 |
- <td data-label="생년월일">{item['user_birth']}</td> |
|
521 |
- <td data-label="성별">{item['user_gender']}</td> |
|
522 |
- <td data-label="연락처">{item['user_phonenumber']}</td> |
|
523 |
- <td data-label="주소">{item['user_address']}</td> |
|
524 |
- </tr> |
|
525 |
- ) |
|
526 |
- })} |
|
527 |
- {senior.userList == null || senior.userList.length == 0 ? |
|
528 |
- <tr> |
|
529 |
- <td colSpan={7}>조회된 데이터가 없습니다</td> |
|
530 |
- </tr> |
|
531 |
- : null} |
|
532 |
- </tbody> |
|
533 |
- </table> |
|
534 |
- <Pagination |
|
535 |
- currentPage={senior.search.currentPage} |
|
536 |
- perPage={senior.search.perPage} |
|
537 |
- totalCount={senior.userListCount} |
|
538 |
- maxRange={5} |
|
539 |
- click={seniorSelectList} |
|
540 |
- /> |
|
541 |
- </div> |
|
542 |
- </ul> |
|
543 |
- ), |
|
544 |
- /* 대상자(시니어) (종료) */ |
|
545 |
- |
|
546 | 439 |
/* 시행기관(복지사, 간호사) 사용자 (시작) */ |
547 | 440 |
ROLE_AGENCY: ( |
548 | 441 |
<ul className="tab-content"> |
549 | 442 |
<div> |
550 |
- |
|
551 | 443 |
<div className="search-management flex-start margin-bottom2"> |
552 | 444 |
<select id="searchType2" style={{ maxWidth: 'fit-content' }} onChange={(e) => { agentSearchChange("searchType", e.target.value) }}> |
553 | 445 |
<option value="" selected={agent.search.searchText == ""}>전체</option> |
... | ... | @@ -566,16 +458,16 @@ |
566 | 458 |
<div className="radio-tab btn-wrap flex-end margin-bottom"> |
567 | 459 |
<div className="flex-start"> |
568 | 460 |
<div> |
569 |
- <input type="radio" name="viewType" id="useTrue" |
|
570 |
- checked={isViewType} |
|
571 |
- onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> |
|
572 |
- <label htmlFor="useTrue">활성화</label> |
|
461 |
+ <input type="radio" name="viewAgentType" id="useAgentTrue" |
|
462 |
+ checked={isAgentType} |
|
463 |
+ onChange={(e) => { e.target.checked ? changeAgentType(true) : changeAgentType(false) }} /> |
|
464 |
+ <label htmlFor="useAgentTrue">활성화</label> |
|
573 | 465 |
</div> |
574 | 466 |
<div> |
575 |
- <input type="radio" name="viewType" id="useFalse" |
|
576 |
- checked={!isViewType} |
|
577 |
- onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> |
|
578 |
- <label htmlFor="useFalse">미활성화</label> |
|
467 |
+ <input type="radio" name="viewAgentType" id="useAgentFalse" |
|
468 |
+ checked={!isAgentType} |
|
469 |
+ onChange={(e) => { e.target.checked ? changeAgentType(false) : changeAgentType(true) }} /> |
|
470 |
+ <label htmlFor="useAgentFalse">미활성화</label> |
|
579 | 471 |
</div> |
580 | 472 |
</div> |
581 | 473 |
<button className={"btn-small gray-btn"} onClick={join}>등록</button> |
... | ... | @@ -638,7 +530,6 @@ |
638 | 530 |
ROLE_AGENCYADMIN: ( |
639 | 531 |
<ul className="tab-content"> |
640 | 532 |
<div> |
641 |
- |
|
642 | 533 |
<div className="search-management flex-start margin-bottom2"> |
643 | 534 |
<select id="searchType2" style={{ maxWidth: 'fit-content' }} onChange={(e) => { agentAdminSearchChange("searchType", e.target.value) }}> |
644 | 535 |
<option value="" selected={agentAdmin.search.searchText == ""}>전체</option> |
... | ... | @@ -657,16 +548,16 @@ |
657 | 548 |
<div className="radio-tab btn-wrap flex-end margin-bottom"> |
658 | 549 |
<div className="flex-start"> |
659 | 550 |
<div> |
660 |
- <input type="radio" name="viewType" id="useTrue" |
|
661 |
- checked={isViewType} |
|
662 |
- onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> |
|
663 |
- <label htmlFor="useTrue">활성화</label> |
|
551 |
+ <input type="radio" name="viewAgentAdminType" id="useAgentAdminTrue" |
|
552 |
+ checked={isAgentAdminType} |
|
553 |
+ onChange={(e) => { e.target.checked ? changeAgentAdminType(true) : null }} /> |
|
554 |
+ <label htmlFor="useAgentAdminTrue">활성화</label> |
|
664 | 555 |
</div> |
665 | 556 |
<div> |
666 |
- <input type="radio" name="viewType" id="useFalse" |
|
667 |
- checked={!isViewType} |
|
668 |
- onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> |
|
669 |
- <label htmlFor="useFalse">미활성화</label> |
|
557 |
+ <input type="radio" name="viewAgentAdminType" id="useAgentAdminFalse" |
|
558 |
+ checked={!isAgentAdminType} |
|
559 |
+ onChange={(e) => { e.target.checked ? changeAgentAdminType(false) : null }} /> |
|
560 |
+ <label htmlFor="useAgentAdminFalse">미활성화</label> |
|
670 | 561 |
</div> |
671 | 562 |
</div> |
672 | 563 |
<button className={"btn-small gray-btn"} onClick={join}>등록</button> |
... | ... | @@ -748,16 +639,16 @@ |
748 | 639 |
<div className="radio-tab btn-wrap flex-end margin-bottom"> |
749 | 640 |
<div className="flex-start"> |
750 | 641 |
<div> |
751 |
- <input type="radio" name="viewType" id="useTrue" |
|
752 |
- checked={isViewType} |
|
753 |
- onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> |
|
754 |
- <label htmlFor="useTrue">활성화</label> |
|
642 |
+ <input type="radio" name="viewGovType" id="useGovTrue" |
|
643 |
+ checked={isGovType} |
|
644 |
+ onChange={(e) => { e.target.checked ? changeGovType(true) : null }} /> |
|
645 |
+ <label htmlFor="useGovTrue">활성화</label> |
|
755 | 646 |
</div> |
756 | 647 |
<div> |
757 |
- <input type="radio" name="viewType" id="useFalse" |
|
758 |
- checked={!isViewType} |
|
759 |
- onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> |
|
760 |
- <label htmlFor="useFalse">미활성화</label> |
|
648 |
+ <input type="radio" name="viewGovType" id="useGovFalse" |
|
649 |
+ checked={!isGovType} |
|
650 |
+ onChange={(e) => { e.target.checked ? changeGovType(false) : null }} /> |
|
651 |
+ <label htmlFor="useGovFalse">미활성화</label> |
|
761 | 652 |
</div> |
762 | 653 |
</div> |
763 | 654 |
<button className={"btn-small gray-btn"} onClick={join}>등록</button> |
... | ... | @@ -838,14 +729,14 @@ |
838 | 729 |
<div className="flex-start"> |
839 | 730 |
<div> |
840 | 731 |
<input type="radio" name="viewType" id="useTrue" |
841 |
- checked={isViewType} |
|
842 |
- onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> |
|
732 |
+ checked={isAdminType} |
|
733 |
+ onChange={(e) => { e.target.checked ? changeAdminType(true) : null }} /> |
|
843 | 734 |
<label htmlFor="useTrue">활성화</label> |
844 | 735 |
</div> |
845 | 736 |
<div> |
846 | 737 |
<input type="radio" name="viewType" id="useFalse" |
847 |
- checked={!isViewType} |
|
848 |
- onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> |
|
738 |
+ checked={!isAdminType} |
|
739 |
+ onChange={(e) => { e.target.checked ? changeAdminType(false) : null }} /> |
|
849 | 740 |
<label htmlFor="useFalse">미활성화</label> |
850 | 741 |
</div> |
851 | 742 |
</div> |
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?