![](/assets/images/project_default_logo.png)
--- client/resources/css/main.css
+++ client/resources/css/main.css
... | ... | @@ -1167,6 +1167,10 @@ |
1167 | 1167 |
height: 100px; |
1168 | 1168 |
} |
1169 | 1169 |
|
1170 |
+.senior-detail .gender { |
|
1171 |
+ gap: 2rem; |
|
1172 |
+} |
|
1173 |
+ |
|
1170 | 1174 |
.senior-insert .gender { |
1171 | 1175 |
padding-left: 2rem; |
1172 | 1176 |
gap: 2rem; |
... | ... | @@ -1187,10 +1191,10 @@ |
1187 | 1191 |
border: #d8d3c7 1px solid; |
1188 | 1192 |
} |
1189 | 1193 |
|
1190 |
-.senior-detail input[type='checkbox'], |
|
1194 |
+/* .senior-detail input[type='checkbox'], |
|
1191 | 1195 |
.senior-detail input[type='checkbox']:checked { |
1192 | 1196 |
width: 10%; |
1193 |
-} |
|
1197 |
+} */ |
|
1194 | 1198 |
|
1195 | 1199 |
.senior-edit th { |
1196 | 1200 |
font-size: 1.8rem |
... | ... | @@ -1599,4 +1603,17 @@ |
1599 | 1603 |
.table-size-fix { |
1600 | 1604 |
max-height: 220px; |
1601 | 1605 |
overflow-y: auto; |
1606 |
+} |
|
1607 |
+ |
|
1608 |
+.radio-tab { |
|
1609 |
+ gap: 2rem; |
|
1610 |
+} |
|
1611 |
+ |
|
1612 |
+.radio-tab .flex-start { |
|
1613 |
+ padding-right: 2rem; |
|
1614 |
+ gap: 2rem; |
|
1615 |
+} |
|
1616 |
+ |
|
1617 |
+.radio-tab .flex-start input { |
|
1618 |
+ width: auto; |
|
1602 | 1619 |
}(No newline at end of file) |
--- client/views/component/Modal_Guardian.jsx
+++ client/views/component/Modal_Guardian.jsx
... | ... | @@ -122,7 +122,8 @@ |
122 | 122 |
} else { |
123 | 123 |
setIsPhoneCheck(false); |
124 | 124 |
guardianRef.current['gardian_phonenumber'].focus(); |
125 |
- alert("보호자의 연락처가 아닙니다."); |
|
125 |
+ let alertMsg = "해당 사람은 보호자가 아닙니다.\n(해당 사람은 보호 대상자이므로 보호자로 등록할 수 없습니다.)" |
|
126 |
+ alert(alertMsg); |
|
126 | 127 |
} |
127 | 128 |
} |
128 | 129 |
}).catch((error) => { |
... | ... | @@ -470,8 +471,8 @@ |
470 | 471 |
</tr> |
471 | 472 |
</table> |
472 | 473 |
|
473 |
- <div className="btn-wrap flex-center margin-bottom5"> |
|
474 |
- <button className={"btn-small gray-btn"} onClick={guardianNewInsert}>기존추가</button> |
|
474 |
+ <div className="btn-wrap flex-center"> |
|
475 |
+ <button className={"btn-small gray-btn"} onClick={guardianNewInsert}>추가</button> |
|
475 | 476 |
</div> |
476 | 477 |
</> |
477 | 478 |
) : ( |
... | ... | @@ -612,7 +613,7 @@ |
612 | 613 |
</tr> |
613 | 614 |
</table> |
614 | 615 |
|
615 |
- <div className="btn-wrap flex-center margin-bottom5"> |
|
616 |
+ <div className="btn-wrap flex-center"> |
|
616 | 617 |
{CommonUtil.isEmpty(guardian['guardian_id']) |
617 | 618 |
? <button className={"btn-small gray-btn"} onClick={guardianInsert}>추가</button> |
618 | 619 |
: <> |
--- client/views/pages/AppRoute.jsx
+++ client/views/pages/AppRoute.jsx
... | ... | @@ -398,13 +398,13 @@ |
398 | 398 |
<PersonIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} /> |
399 | 399 |
), |
400 | 400 |
}, |
401 |
- /* { |
|
401 |
+ { |
|
402 | 402 |
title: "장비 사용 현황", |
403 |
- path: "/GovernmentEquipmentSelect", |
|
403 |
+ path: "/AgencyEquipmentSelect", |
|
404 | 404 |
icon: ( |
405 | 405 |
<SpeakerPhoneIcon sx={{ fontSize: 20, color: "#333333", marginRight: 1 }} /> |
406 | 406 |
), |
407 |
- }, */ |
|
407 |
+ }, |
|
408 | 408 |
{ |
409 | 409 |
title: "생활 복지 관리", |
410 | 410 |
path: "/Healthcare", |
... | ... | @@ -463,8 +463,8 @@ |
463 | 463 |
element={<EquipmentRentalInsert />} |
464 | 464 |
></Route> |
465 | 465 |
<Route |
466 |
- path="/GovernmentEquipmentSelect" |
|
467 |
- element={<GovernmentEquipmentSelect />} |
|
466 |
+ path="/AgencyEquipmentSelect" |
|
467 |
+ element={<AgencyEquipmentSelect />} |
|
468 | 468 |
></Route> |
469 | 469 |
<Route |
470 | 470 |
path="/QandASelect" |
--- client/views/pages/equipment/GovernmentEquipmentSelect.jsx
+++ client/views/pages/equipment/GovernmentEquipmentSelect.jsx
... | ... | @@ -579,8 +579,8 @@ |
579 | 579 |
<th>시리얼넘버</th> |
580 | 580 |
<th>입고일자</th> |
581 | 581 |
<th>장비상태</th> |
582 |
- <th>기관</th> |
|
583 |
- <th>장비대여</th> |
|
582 |
+ <th>대여기관</th> |
|
583 |
+ {/* <th>장비대여</th> */} |
|
584 | 584 |
<th>관리</th> |
585 | 585 |
</tr> |
586 | 586 |
</thead> |
... | ... | @@ -594,9 +594,9 @@ |
594 | 594 |
<td data-label="입고일자">{item['equipment_stock_date']}</td> |
595 | 595 |
<td data-label="장비상태">{equipmentStates[item['equipment_state']]}</td> |
596 | 596 |
<td data-label="기관">{item['agency_name'] != null ? item['agency_name'] : '없음'}</td> |
597 |
- <td cata-label="장비대여"> |
|
597 |
+ {/* <td cata-label="장비대여"> |
|
598 | 598 |
<button className={"btn-small gray-btn"} onClick={() => modalRentalOpen(item)}>장비 배포</button> |
599 |
- </td> |
|
599 |
+ </td> */} |
|
600 | 600 |
<td data-label="관리"> |
601 | 601 |
<button className={"btn-small gray-btn"} onClick={() => modalEquipmentOpen(item)}>정보 수정</button> |
602 | 602 |
</td> |
... | ... | @@ -766,7 +766,7 @@ |
766 | 766 |
</tr> |
767 | 767 |
: null} |
768 | 768 |
<tr> |
769 |
- <th>시행기관 선택</th> |
|
769 |
+ <th>대여기관 선택</th> |
|
770 | 770 |
{/* <td> |
771 | 771 |
{orgListOfHierarchy.map((item, idx) => { |
772 | 772 |
return ( |
... | ... | @@ -795,7 +795,7 @@ |
795 | 795 |
console.log('e.target.value : ', e.target.value); |
796 | 796 |
equipmentValueChange('agency_id', e.target.value); |
797 | 797 |
}}> |
798 |
- <option value="">시행기관을 선택해주세요.</option> |
|
798 |
+ <option value="">대여기관을 선택해주세요.</option> |
|
799 | 799 |
{orgListOfHierarchy && orgListOfHierarchy[0] && orgListOfHierarchy[0]['agencyList'] != undefined ? |
800 | 800 |
orgListOfHierarchy[0]['agencyList'].map((item2, idx2) => { |
801 | 801 |
return ( |
--- client/views/pages/healthcare/HealthcareSelectOne.jsx
+++ client/views/pages/healthcare/HealthcareSelectOne.jsx
... | ... | @@ -382,29 +382,29 @@ |
382 | 382 |
}) |
383 | 383 |
} |
384 | 384 |
}) |
385 |
- if (clickDayMedication.length > 0) { |
|
386 |
- return ( |
|
387 |
- <> |
|
388 |
- <tr> |
|
389 |
- <th rowSpan={2}>복약량</th> |
|
390 |
- {seniorMedicationList.map((item, idx) => { |
|
391 |
- return ( |
|
392 |
- <th> |
|
393 |
- {item == 'DAWN' ? '식전' : item == 'MORNING' ? '아침' : item == 'AFTERNOON' ? '점심' : item == 'NIGHT' ? '저녁' : item == 'MIDNIGHT' ? '취침' : null} |
|
394 |
- </th> |
|
395 |
- ) |
|
396 |
- })} |
|
397 |
- </tr> |
|
398 |
- <tr> |
|
399 |
- {clickDayMedication.map((item) => { |
|
385 |
+ return ( |
|
386 |
+ <> |
|
387 |
+ <tr> |
|
388 |
+ <th rowSpan={2}>복약량</th> |
|
389 |
+ {seniorMedicationList.map((item, idx) => { |
|
390 |
+ return ( |
|
391 |
+ <th> |
|
392 |
+ {item == 'DAWN' ? '식전' : item == 'MORNING' ? '아침' : item == 'AFTERNOON' ? '점심' : item == 'NIGHT' ? '저녁' : item == 'MIDNIGHT' ? '취침' : null} |
|
393 |
+ </th> |
|
394 |
+ ) |
|
395 |
+ })} |
|
396 |
+ </tr> |
|
397 |
+ <tr> |
|
398 |
+ {clickDayMedication.length > 0 ? ( |
|
399 |
+ clickDayMedication.map((item) => { |
|
400 | 400 |
return ( |
401 | 401 |
<td>{item}</td> |
402 | 402 |
) |
403 |
- })} |
|
404 |
- </tr> |
|
405 |
- </> |
|
406 |
- ) |
|
407 |
- } |
|
403 |
+ }) |
|
404 |
+ ) : <td colSpan={seniorMedicationList.length}>정보가 없습니다.</td>} |
|
405 |
+ </tr> |
|
406 |
+ </> |
|
407 |
+ ) |
|
408 | 408 |
} |
409 | 409 |
|
410 | 410 |
const DateTemperature = () => { |
... | ... | @@ -423,25 +423,52 @@ |
423 | 423 |
} |
424 | 424 |
}) |
425 | 425 |
|
426 |
- if (clickDayTemperature.length > 0) { |
|
427 |
- return ( |
|
428 |
- <> |
|
429 |
- <tr> |
|
430 |
- <th rowSpan={2}>온도</th> |
|
431 |
- <th>02:00</th> |
|
432 |
- <th>10:00</th> |
|
433 |
- <th>12:00</th> |
|
434 |
- <th>23:00</th> |
|
435 |
- </tr> |
|
436 |
- <tr> |
|
437 |
- <td>{clickDayTemperature[0]}</td> |
|
438 |
- <td>{clickDayTemperature[1]}</td> |
|
439 |
- <td>{clickDayTemperature[2]}</td> |
|
440 |
- <td>{clickDayTemperature[3]}</td> |
|
441 |
- </tr> |
|
442 |
- </> |
|
443 |
- ) |
|
426 |
+ return ( |
|
427 |
+ <> |
|
428 |
+ <tr> |
|
429 |
+ <th rowSpan={2}>온도</th> |
|
430 |
+ <th>02:00</th> |
|
431 |
+ <th>10:00</th> |
|
432 |
+ <th>14:00</th> |
|
433 |
+ <th>23:00</th> |
|
434 |
+ </tr> |
|
435 |
+ <tr> |
|
436 |
+ {clickDayTemperature.length > 0 ? ( |
|
437 |
+ <> |
|
438 |
+ <td>{clickDayTemperature[0]}</td> |
|
439 |
+ <td>{clickDayTemperature[1]}</td> |
|
440 |
+ <td>{clickDayTemperature[2]}</td> |
|
441 |
+ <td>{clickDayTemperature[3]}</td> |
|
442 |
+ </> |
|
443 |
+ ) : <td colSpan={4}>정보가 없습니다.</td>} |
|
444 |
+ </tr> |
|
445 |
+ </> |
|
446 |
+ ) |
|
447 |
+ } |
|
448 |
+ |
|
449 |
+ const DateBattery = () => { |
|
450 |
+ var clcickDayBattery = '정보가 없습니다.'; |
|
451 |
+ var cellLength = 4; |
|
452 |
+ if (seniorMedicationList.length == 5) { |
|
453 |
+ cellLength = 5; |
|
444 | 454 |
} |
455 |
+ |
|
456 |
+ seniorBatteryListByDay.map((item, idx) => { |
|
457 |
+ if (item['battery_date'] == visitDate) { |
|
458 |
+ clcickDayBattery = item['battery_power_data']; |
|
459 |
+ } else { |
|
460 |
+ return |
|
461 |
+ } |
|
462 |
+ }) |
|
463 |
+ |
|
464 |
+ return ( |
|
465 |
+ <tr> |
|
466 |
+ <th>배터리</th> |
|
467 |
+ <td colSpan={cellLength}> |
|
468 |
+ {clcickDayBattery} |
|
469 |
+ </td> |
|
470 |
+ </tr> |
|
471 |
+ ) |
|
445 | 472 |
} |
446 | 473 |
|
447 | 474 |
React.useEffect(() => { |
... | ... | @@ -482,18 +509,7 @@ |
482 | 509 |
<tbody> |
483 | 510 |
<DateMedication /> |
484 | 511 |
<DateTemperature /> |
485 |
- {seniorBatteryListByDay.map((item, idx) => { |
|
486 |
- return ( |
|
487 |
- item['battery_date'] == visitDate ? ( |
|
488 |
- <tr> |
|
489 |
- <th>배터리</th> |
|
490 |
- <td colSpan={5}> |
|
491 |
- {item['battery_power_data']} |
|
492 |
- </td> |
|
493 |
- </tr> |
|
494 |
- ) : null |
|
495 |
- ) |
|
496 |
- })} |
|
512 |
+ <DateBattery /> |
|
497 | 513 |
</tbody> |
498 | 514 |
</table> |
499 | 515 |
|
... | ... | @@ -555,7 +571,26 @@ |
555 | 571 |
</>} |
556 | 572 |
</div> |
557 | 573 |
</> |
558 |
- ) : null} |
|
574 |
+ ) : ( |
|
575 |
+ <> |
|
576 |
+ <table className="flex70 margin-bottom">{/* questionnaire-table */} |
|
577 |
+ <tbody> |
|
578 |
+ <tr> |
|
579 |
+ <th>방문날짜</th> |
|
580 |
+ <td rowSpan={3}> |
|
581 |
+ 정보가 없습니다. |
|
582 |
+ </td> |
|
583 |
+ </tr> |
|
584 |
+ <tr> |
|
585 |
+ <th>방문목적</th> |
|
586 |
+ </tr> |
|
587 |
+ <tr> |
|
588 |
+ <th>방문 상세 사유</th> |
|
589 |
+ </tr> |
|
590 |
+ </tbody> |
|
591 |
+ </table> |
|
592 |
+ </> |
|
593 |
+ )} |
|
559 | 594 |
</div> |
560 | 595 |
</Modal> |
561 | 596 |
</main> |
--- client/views/pages/login/Login.jsx
+++ client/views/pages/login/Login.jsx
... | ... | @@ -82,13 +82,13 @@ |
82 | 82 |
btnName={"로그인"} |
83 | 83 |
onClick={login} |
84 | 84 |
/> |
85 |
- <div className="flex-center btn-bottom"> |
|
85 |
+ {/* <div className="flex-center btn-bottom"> |
|
86 | 86 |
<Button |
87 | 87 |
className={"join-btn"} |
88 | 88 |
btnName={"회원가입"} |
89 | 89 |
onClick={() => { navigate('/Join') }} |
90 | 90 |
/> |
91 |
- </div> |
|
91 |
+ </div> */} |
|
92 | 92 |
</div> |
93 | 93 |
</div> |
94 | 94 |
</div> |
--- client/views/pages/main/Main_guardian.jsx
+++ client/views/pages/main/Main_guardian.jsx
... | ... | @@ -206,6 +206,25 @@ |
206 | 206 |
}); |
207 | 207 |
}; |
208 | 208 |
|
209 |
+ //특정 대상자의 일별 배터리 목록 |
|
210 |
+ const [seniorBatteryListByDay, setSeniorBatteryListByDay] = React.useState([]); |
|
211 |
+ //특정 대상자의 일별 배터리 목록 조회 |
|
212 |
+ const seniorBatterySelectListByDay = (seniorNum) => { |
|
213 |
+ fetch("/user/seniorBatterySelectListByDay.json", { |
|
214 |
+ method: "POST", |
|
215 |
+ headers: { |
|
216 |
+ 'Content-Type': 'application/json; charset=UTF-8' |
|
217 |
+ }, |
|
218 |
+ body: JSON.stringify(seniorNum), |
|
219 |
+ }).then((response) => response.json()).then((data) => { |
|
220 |
+ console.log("seniorBatteryListByDay data : ", data); |
|
221 |
+ setSeniorBatteryListByDay(data); |
|
222 |
+ console.log("seniorBatteryListByDay : ", seniorBatteryListByDay); |
|
223 |
+ }).catch((error) => { |
|
224 |
+ console.log('seniorBatterySelectListByDay() /user/seniorBatterySelectListByDay.json error : ', error); |
|
225 |
+ }); |
|
226 |
+ }; |
|
227 |
+ |
|
209 | 228 |
//방문 기록 정보 |
210 | 229 |
const [visitRecordList, setVisitRecordList] = React.useState({}); |
211 | 230 |
const visitRecordInit = { |
... | ... | @@ -257,6 +276,7 @@ |
257 | 276 |
openModal(); |
258 | 277 |
} |
259 | 278 |
|
279 |
+ |
|
260 | 280 |
const DateMedication = () => { |
261 | 281 |
var clickDayMedication = []; |
262 | 282 |
medicationData.map((item, idx) => { |
... | ... | @@ -266,30 +286,29 @@ |
266 | 286 |
}) |
267 | 287 |
} |
268 | 288 |
}) |
269 |
- if (clickDayMedication.length > 0) { |
|
270 |
- return ( |
|
271 |
- <> |
|
272 |
- <tr> |
|
273 |
- <th></th> |
|
274 |
- {seniorMedicationList.map((item, idx) => { |
|
275 |
- return ( |
|
276 |
- <th> |
|
277 |
- {item == 'DAWN' ? '식전' : item == 'MORNING' ? '아침' : item == 'AFTERNOON' ? '점심' : item == 'NIGHT' ? '저녁' : item == 'MIDNIGHT' ? '취침' : null} |
|
278 |
- </th> |
|
279 |
- ) |
|
280 |
- })} |
|
281 |
- </tr> |
|
282 |
- <tr> |
|
283 |
- <th>복약량</th> |
|
284 |
- {clickDayMedication.map((item) => { |
|
289 |
+ return ( |
|
290 |
+ <> |
|
291 |
+ <tr> |
|
292 |
+ <th rowSpan={2}>복약량</th> |
|
293 |
+ {seniorMedicationList.map((item, idx) => { |
|
294 |
+ return ( |
|
295 |
+ <th> |
|
296 |
+ {item == 'DAWN' ? '식전' : item == 'MORNING' ? '아침' : item == 'AFTERNOON' ? '점심' : item == 'NIGHT' ? '저녁' : item == 'MIDNIGHT' ? '취침' : null} |
|
297 |
+ </th> |
|
298 |
+ ) |
|
299 |
+ })} |
|
300 |
+ </tr> |
|
301 |
+ <tr> |
|
302 |
+ {clickDayMedication.length > 0 ? ( |
|
303 |
+ clickDayMedication.map((item) => { |
|
285 | 304 |
return ( |
286 | 305 |
<td>{item}</td> |
287 | 306 |
) |
288 |
- })} |
|
289 |
- </tr> |
|
290 |
- </> |
|
291 |
- ) |
|
292 |
- } |
|
307 |
+ }) |
|
308 |
+ ) : <td colSpan={seniorMedicationList.length}>정보가 없습니다.</td>} |
|
309 |
+ </tr> |
|
310 |
+ </> |
|
311 |
+ ) |
|
293 | 312 |
} |
294 | 313 |
|
295 | 314 |
const DateTemperature = () => { |
... | ... | @@ -308,26 +327,52 @@ |
308 | 327 |
} |
309 | 328 |
}) |
310 | 329 |
|
311 |
- if (clickDayTemperature.length > 0) { |
|
312 |
- return ( |
|
313 |
- <> |
|
314 |
- <tr> |
|
315 |
- <th></th> |
|
316 |
- <th>02:00</th> |
|
317 |
- <th>10:00</th> |
|
318 |
- <th>12:00</th> |
|
319 |
- <th>23:00</th> |
|
320 |
- </tr> |
|
321 |
- <tr> |
|
322 |
- <th>온도</th> |
|
323 |
- <td>{clickDayTemperature[0]}</td> |
|
324 |
- <td>{clickDayTemperature[1]}</td> |
|
325 |
- <td>{clickDayTemperature[2]}</td> |
|
326 |
- <td>{clickDayTemperature[3]}</td> |
|
327 |
- </tr> |
|
328 |
- </> |
|
329 |
- ) |
|
330 |
+ return ( |
|
331 |
+ <> |
|
332 |
+ <tr> |
|
333 |
+ <th rowSpan={2}>온도</th> |
|
334 |
+ <th>02:00</th> |
|
335 |
+ <th>10:00</th> |
|
336 |
+ <th>14:00</th> |
|
337 |
+ <th>23:00</th> |
|
338 |
+ </tr> |
|
339 |
+ <tr> |
|
340 |
+ {clickDayTemperature.length > 0 ? ( |
|
341 |
+ <> |
|
342 |
+ <td>{clickDayTemperature[0]}</td> |
|
343 |
+ <td>{clickDayTemperature[1]}</td> |
|
344 |
+ <td>{clickDayTemperature[2]}</td> |
|
345 |
+ <td>{clickDayTemperature[3]}</td> |
|
346 |
+ </> |
|
347 |
+ ) : <td colSpan={4}>정보가 없습니다.</td>} |
|
348 |
+ </tr> |
|
349 |
+ </> |
|
350 |
+ ) |
|
351 |
+ } |
|
352 |
+ |
|
353 |
+ const DateBattery = () => { |
|
354 |
+ var clcickDayBattery = '정보가 없습니다.'; |
|
355 |
+ var cellLength = 4; |
|
356 |
+ if (seniorMedicationList.length == 5) { |
|
357 |
+ cellLength = 5; |
|
330 | 358 |
} |
359 |
+ |
|
360 |
+ seniorBatteryListByDay.map((item, idx) => { |
|
361 |
+ if (item['battery_date'] == visitDate) { |
|
362 |
+ clcickDayBattery = item['battery_power_data']; |
|
363 |
+ } else { |
|
364 |
+ return |
|
365 |
+ } |
|
366 |
+ }) |
|
367 |
+ |
|
368 |
+ return ( |
|
369 |
+ <tr> |
|
370 |
+ <th>배터리</th> |
|
371 |
+ <td colSpan={cellLength}> |
|
372 |
+ {clcickDayBattery} |
|
373 |
+ </td> |
|
374 |
+ </tr> |
|
375 |
+ ) |
|
331 | 376 |
} |
332 | 377 |
|
333 | 378 |
React.useEffect(() => { |
... | ... | @@ -377,10 +422,7 @@ |
377 | 422 |
<tbody> |
378 | 423 |
<DateMedication /> |
379 | 424 |
<DateTemperature /> |
380 |
- <tr> |
|
381 |
- <th>배터리</th> |
|
382 |
- <td colSpan={5}>30%</td> |
|
383 |
- </tr> |
|
425 |
+ <DateBattery /> |
|
384 | 426 |
</tbody> |
385 | 427 |
</table> |
386 | 428 |
|
... | ... | @@ -434,7 +476,26 @@ |
434 | 476 |
</tr> |
435 | 477 |
</tbody> |
436 | 478 |
</table> |
437 |
- ) : null} |
|
479 |
+ ) : ( |
|
480 |
+ <> |
|
481 |
+ <table className="flex70 margin-bottom">{/* questionnaire-table */} |
|
482 |
+ <tbody> |
|
483 |
+ <tr> |
|
484 |
+ <th>방문날짜</th> |
|
485 |
+ <td rowSpan={3}> |
|
486 |
+ 정보가 없습니다. |
|
487 |
+ </td> |
|
488 |
+ </tr> |
|
489 |
+ <tr> |
|
490 |
+ <th>방문목적</th> |
|
491 |
+ </tr> |
|
492 |
+ <tr> |
|
493 |
+ <th>방문 상세 사유</th> |
|
494 |
+ </tr> |
|
495 |
+ </tbody> |
|
496 |
+ </table> |
|
497 |
+ </> |
|
498 |
+ )} |
|
438 | 499 |
</div> |
439 | 500 |
</Modal> |
440 | 501 |
</main> |
--- client/views/pages/senior_management/SeniorEdit.jsx
+++ client/views/pages/senior_management/SeniorEdit.jsx
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
import SubTitle from "../../component/SubTitle.jsx"; |
5 | 5 |
|
6 | 6 |
import CommonUtil from "../../../resources/js/CommonUtil.js"; |
7 |
-import {JUSO_API_KEY, JUSO_CORRD_API_KEY} from "../../../../Global.js"; |
|
7 |
+import { JUSO_API_KEY, JUSO_CORRD_API_KEY } from "../../../../Global.js"; |
|
8 | 8 |
|
9 | 9 |
import proj4 from "proj4"; |
10 | 10 |
|
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 |
|
15 | 15 |
/**** 기본 조회 데이터 (시작) ****/ |
16 | 16 |
//전역 변수 저장 객체 |
17 |
- const state = useSelector((state) => {return state}); |
|
17 |
+ const state = useSelector((state) => { return state }); |
|
18 | 18 |
|
19 | 19 |
//기관 계층 구조 목록 |
20 | 20 |
const [orgListOfHierarchy, setOrgListOfHierarchy] = React.useState([]); |
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
headers: { |
26 | 26 |
'Content-Type': 'application/json; charset=UTF-8' |
27 | 27 |
}, |
28 |
- body: JSON.stringify({'government_id': state.loginUser['government_id']}), |
|
28 |
+ body: JSON.stringify({ 'government_id': state.loginUser['government_id'] }), |
|
29 | 29 |
}).then((response) => response.json()).then((data) => { |
30 | 30 |
console.log("기관(관리, 시행) 계층 구조 목록 조회 : ", data); |
31 | 31 |
setOrgListOfHierarchy(data); |
... | ... | @@ -246,11 +246,11 @@ |
246 | 246 |
} |
247 | 247 |
// console.log("check done"); |
248 | 248 |
let url = 'https://business.juso.go.kr/addrlink/addrLinkApi.do' |
249 |
- url += `?currentPage=${CommonUtil.isEmpty(currentPage) ? 1 : currentPage}` |
|
250 |
- url += '&countPerPage=10' |
|
251 |
- url += '&resultType=json' |
|
252 |
- url += `&keyword=${senior['user_address']}` |
|
253 |
- url += `&confmKey=${JUSO_API_KEY}`; |
|
249 |
+ url += `?currentPage=${CommonUtil.isEmpty(currentPage) ? 1 : currentPage}` |
|
250 |
+ url += '&countPerPage=10' |
|
251 |
+ url += '&resultType=json' |
|
252 |
+ url += `&keyword=${senior['user_address']}` |
|
253 |
+ url += `&confmKey=${JUSO_API_KEY}`; |
|
254 | 254 |
fetch(url, { |
255 | 255 |
method: "GET", |
256 | 256 |
}).then((response) => response.json()).then((data) => { |
... | ... | @@ -275,13 +275,13 @@ |
275 | 275 |
console.log("check senior : ", senior); |
276 | 276 |
const vm = this; |
277 | 277 |
let url = 'https://business.juso.go.kr/addrlink/addrCoordApi.do' |
278 |
- url += `?admCd=${senior['adm_cd']}` |
|
279 |
- url += `&rnMgtSn=${senior['rn_mgt_sn']}` |
|
280 |
- url += `&udrtYn=${senior['udrt_yn']}` |
|
281 |
- url += `&buldMnnm=${senior['buld_mnnm']}` |
|
282 |
- url += `&buldSlno=${senior['buld_slno']}` |
|
283 |
- url += '&resultType=json' |
|
284 |
- url += `&confmKey=${JUSO_CORRD_API_KEY}`; |
|
278 |
+ url += `?admCd=${senior['adm_cd']}` |
|
279 |
+ url += `&rnMgtSn=${senior['rn_mgt_sn']}` |
|
280 |
+ url += `&udrtYn=${senior['udrt_yn']}` |
|
281 |
+ url += `&buldMnnm=${senior['buld_mnnm']}` |
|
282 |
+ url += `&buldSlno=${senior['buld_slno']}` |
|
283 |
+ url += '&resultType=json' |
|
284 |
+ url += `&confmKey=${JUSO_CORRD_API_KEY}`; |
|
285 | 285 |
fetch(url, { |
286 | 286 |
method: "GET", |
287 | 287 |
}).then((response) => response.json()).then((data) => { |
... | ... | @@ -292,7 +292,7 @@ |
292 | 292 |
let wgs84Point = proj4(grs80, wgs84).forward(grs80Point); |
293 | 293 |
senior['x'] = wgs84Point[0]; |
294 | 294 |
senior['y'] = wgs84Point[1]; |
295 |
- setSenior({...senior}); |
|
295 |
+ setSenior({ ...senior }); |
|
296 | 296 |
} |
297 | 297 |
}).catch((error) => { |
298 | 298 |
console.log('jusoSearch() : ', error); |
... | ... | @@ -316,78 +316,82 @@ |
316 | 316 |
<SubTitle explanation={"수정페이지"} className="margin-bottom" /> |
317 | 317 |
<table className="margin-bottom2 senior-detail"> |
318 | 318 |
<tr> |
319 |
- <th><span style={{color : "red"}}>*</span>관리기관</th> |
|
319 |
+ <th><span style={{ color: "red" }}>*</span>관리기관</th> |
|
320 | 320 |
<td> |
321 |
- <select onChange={(e) => {seniorGovernmentIdChange(e.target.value)}} |
|
321 |
+ <select onChange={(e) => { seniorGovernmentIdChange(e.target.value) }} |
|
322 | 322 |
ref={el => seniorRef.current['government_id'] = el}> |
323 | 323 |
<option value={''} selected={senior['government_id'] == null}>관리기관선택</option> |
324 |
- {orgListOfHierarchy.map((item, idx) => { return ( |
|
325 |
- <option key={idx} value={item['government_id']} selected={senior['government_id'] == item['government_id']}> |
|
326 |
- {item['government_name']} |
|
327 |
- </option> |
|
328 |
- )})} |
|
324 |
+ {orgListOfHierarchy.map((item, idx) => { |
|
325 |
+ return ( |
|
326 |
+ <option key={idx} value={item['government_id']} selected={senior['government_id'] == item['government_id']}> |
|
327 |
+ {item['government_name']} |
|
328 |
+ </option> |
|
329 |
+ ) |
|
330 |
+ })} |
|
329 | 331 |
</select> |
330 | 332 |
</td> |
331 |
- <th><span style={{color : "red"}}>*</span>시행기관</th> |
|
333 |
+ <th><span style={{ color: "red" }}>*</span>시행기관</th> |
|
332 | 334 |
<td> |
333 |
- <select onChange={(e) => {seniorAgencyIdChange(e.target.value)}} |
|
335 |
+ <select onChange={(e) => { seniorAgencyIdChange(e.target.value) }} |
|
334 | 336 |
ref={el => seniorRef.current['agency_id'] = el}> |
335 | 337 |
<option value={''} selected={senior['agency_id'] == null}>시행기관선택</option> |
336 |
- {getAgencyList().map((item, idx) => { return ( |
|
337 |
- <option key={idx} value={item['agency_id']} selected={senior['agency_id'] == item['agency_id']}> |
|
338 |
- {item['agency_name']} |
|
339 |
- </option> |
|
340 |
- )})} |
|
338 |
+ {getAgencyList().map((item, idx) => { |
|
339 |
+ return ( |
|
340 |
+ <option key={idx} value={item['agency_id']} selected={senior['agency_id'] == item['agency_id']}> |
|
341 |
+ {item['agency_name']} |
|
342 |
+ </option> |
|
343 |
+ ) |
|
344 |
+ })} |
|
341 | 345 |
</select> |
342 | 346 |
</td> |
343 | 347 |
</tr> |
344 | 348 |
<tr> |
345 |
- <th><span style={{color : "red"}}>*</span>이름</th> |
|
349 |
+ <th><span style={{ color: "red" }}>*</span>이름</th> |
|
346 | 350 |
<td> |
347 | 351 |
<input type="text" |
348 | 352 |
value={senior['user_name']} |
349 |
- onChange={(e) => {seniorValueChange('user_name', e.target.value)}} |
|
353 |
+ onChange={(e) => { seniorValueChange('user_name', e.target.value) }} |
|
350 | 354 |
ref={el => seniorRef.current['user_name'] = el} |
351 | 355 |
/> |
352 | 356 |
</td> |
353 |
- <th><span style={{color : "red"}}>*</span>성별</th> |
|
357 |
+ <th><span style={{ color: "red" }}>*</span>성별</th> |
|
354 | 358 |
<td className=""> |
355 | 359 |
<div className="gender flex-start"> |
356 |
- <div className="flex-start"> |
|
360 |
+ <div className="flex-start m-r"> |
|
357 | 361 |
<input type="radio" id="user_gender_m" name="user_gender" value="남" checked={senior['user_gender'] == '남'} |
358 |
- onChange={(e) => {e.target.checked ? seniorValueChange('user_gender', e.target.value) : null}} |
|
362 |
+ onChange={(e) => { e.target.checked ? seniorValueChange('user_gender', e.target.value) : null }} |
|
359 | 363 |
ref={el => seniorRef.current['user_gender']['m'] = el} |
360 |
- /> |
|
364 |
+ /> |
|
361 | 365 |
<label for="user_gender_m">남</label> |
362 | 366 |
</div> |
363 | 367 |
<div className="flex-start"> |
364 | 368 |
<input type="radio" id="user_gender_f" name="user_gender" value="여" checked={senior['user_gender'] == '여'} |
365 |
- onChange={(e) => {e.target.checked ? seniorValueChange('user_gender', e.target.value) : null}} |
|
369 |
+ onChange={(e) => { e.target.checked ? seniorValueChange('user_gender', e.target.value) : null }} |
|
366 | 370 |
ref={el => seniorRef.current['user_gender']['f'] = el} |
367 |
- /> |
|
371 |
+ /> |
|
368 | 372 |
<label for="user_gender_f">여</label> |
369 | 373 |
</div> |
370 | 374 |
</div > |
371 | 375 |
</td> |
372 | 376 |
</tr> |
373 | 377 |
<tr> |
374 |
- <th><span style={{color : "red"}}>*</span>생년월일</th> |
|
378 |
+ <th><span style={{ color: "red" }}>*</span>생년월일</th> |
|
375 | 379 |
<td> |
376 | 380 |
<div className="flex"> |
377 | 381 |
<input type='date' |
378 | 382 |
value={senior['user_birth']} |
379 |
- onChange={(e) => {seniorValueChange('user_birth', e.target.value)}} |
|
383 |
+ onChange={(e) => { seniorValueChange('user_birth', e.target.value) }} |
|
380 | 384 |
ref={el => seniorRef.current['user_birth'] = el} |
381 | 385 |
/> |
382 | 386 |
</div> |
383 | 387 |
</td> |
384 | 388 |
</tr> |
385 | 389 |
<tr> |
386 |
- <th><span style={{color : "red"}}>*</span>연락처</th> |
|
390 |
+ <th><span style={{ color: "red" }}>*</span>연락처</th> |
|
387 | 391 |
<td colSpan={3}> |
388 | 392 |
<input type="number" maxLength="11" disabled |
389 | 393 |
value={senior['user_phonenumber']} |
390 |
- onChange={(e) => {seniorValueChange('user_phonenumber', e.target.value)}} |
|
394 |
+ onChange={(e) => { seniorValueChange('user_phonenumber', e.target.value) }} |
|
391 | 395 |
ref={el => seniorRef.current['user_phonenumber'] = el} |
392 | 396 |
/> |
393 | 397 |
</td> |
... | ... | @@ -404,85 +408,89 @@ |
404 | 408 |
</td> |
405 | 409 |
</tr> */} |
406 | 410 |
<tr> |
407 |
- <th><span style={{color : "red"}}>*</span>주소</th> |
|
411 |
+ <th><span style={{ color: "red" }}>*</span>주소</th> |
|
408 | 412 |
<td colSpan={3}> |
409 | 413 |
<div> |
410 |
- <input type="text" style={{width: 'calc(100% - 160px)'}} |
|
414 |
+ <input type="text" style={{ width: 'calc(100% - 160px)' }} |
|
411 | 415 |
value={senior['user_address']} disabled={CommonUtil.isEmpty(senior['zip_no']) == false} |
412 |
- onChange={(e) => {seniorValueChange('user_address', e.target.value)}} |
|
413 |
- onKeyUp={(e) => {e.key == 'Enter' ? jusoSearch() : null}} |
|
416 |
+ onChange={(e) => { seniorValueChange('user_address', e.target.value) }} |
|
417 |
+ onKeyUp={(e) => { e.key == 'Enter' ? jusoSearch() : null }} |
|
414 | 418 |
ref={el => seniorRef.current['user_address'] = el} |
415 | 419 |
/> |
416 | 420 |
{CommonUtil.isEmpty(senior['zip_no']) |
417 |
- ? <button className={"red-btn btn-large"} onClick={() => {jusoSearch()}}>주소검색</button> |
|
418 |
- : <button className={"gray-btn btn-large"} onClick={() => {seniorValueChange('zip_no', null)}}>다시검색</button> |
|
421 |
+ ? <button className={"red-btn btn-large"} onClick={() => { jusoSearch() }}>주소검색</button> |
|
422 |
+ : <button className={"gray-btn btn-large"} onClick={() => { seniorValueChange('zip_no', null) }}>다시검색</button> |
|
419 | 423 |
} |
420 | 424 |
</div> |
421 | 425 |
{CommonUtil.isEmpty(jusoList.juso) == false && CommonUtil.isEmpty(senior['zip_no']) ? |
422 |
- <div> |
|
423 |
- <ul className="list-box" style={{width: '100%'}}> |
|
424 |
- {CommonUtil.isEmpty(jusoList.juso) == false ? jusoList.juso.map((item, idx) => {return ( |
|
425 |
- <li className={senior['zip_no'] == item['zipNo'] ? 'active' : null} onClick={() => { |
|
426 |
- senior['zip_no'] = item['zipNo']; senior['adm_cd'] = item['admCd']; |
|
427 |
- senior['rn_mgt_sn'] = item['rnMgtSn']; senior['bd_mgt_sn'] = item['bdMgtSn']; |
|
428 |
- senior['siNsi_nmm'] = item['siNm']; senior['sgg_nm'] = item['sggNm']; |
|
429 |
- senior['emd_nm'] = item['emdNm']; senior['li_nm'] = item['liNm']; |
|
430 |
- senior['rn'] = item['rn']; senior['emd_no'] = item['emdNo']; |
|
431 |
- senior['hemd_nm'] = item['hemdNm']; senior['road_addr'] = item['roadAddr']; |
|
432 |
- senior['buld_mnnm'] = item['buldMnnm']; senior['buld_slno'] = item['buldSlno']; |
|
433 |
- senior['user_address'] = item['roadAddr']; |
|
426 |
+ <div> |
|
427 |
+ <ul className="list-box" style={{ width: '100%' }}> |
|
428 |
+ {CommonUtil.isEmpty(jusoList.juso) == false ? jusoList.juso.map((item, idx) => { |
|
429 |
+ return ( |
|
430 |
+ <li className={senior['zip_no'] == item['zipNo'] ? 'active' : null} onClick={() => { |
|
431 |
+ senior['zip_no'] = item['zipNo']; senior['adm_cd'] = item['admCd']; |
|
432 |
+ senior['rn_mgt_sn'] = item['rnMgtSn']; senior['bd_mgt_sn'] = item['bdMgtSn']; |
|
433 |
+ senior['siNsi_nmm'] = item['siNm']; senior['sgg_nm'] = item['sggNm']; |
|
434 |
+ senior['emd_nm'] = item['emdNm']; senior['li_nm'] = item['liNm']; |
|
435 |
+ senior['rn'] = item['rn']; senior['emd_no'] = item['emdNo']; |
|
436 |
+ senior['hemd_nm'] = item['hemdNm']; senior['road_addr'] = item['roadAddr']; |
|
437 |
+ senior['buld_mnnm'] = item['buldMnnm']; senior['buld_slno'] = item['buldSlno']; |
|
438 |
+ senior['user_address'] = item['roadAddr']; |
|
434 | 439 |
|
435 |
- if (CommonUtil.isEmpty(item['udrtYn'])) { |
|
436 |
- senior['udrt_yn'] = null; |
|
437 |
- } else { |
|
438 |
- if (item['udrtYn'] == 1 || item['udrtYn'] == true || item['udrtYn'] == '1'|| item['udrtYn'].toLowerCase() == 'true') { |
|
439 |
- senior['udrt_yn'] = true; |
|
440 |
- } else { |
|
441 |
- senior['udrt_yn'] = false; |
|
442 |
- } |
|
443 |
- } |
|
440 |
+ if (CommonUtil.isEmpty(item['udrtYn'])) { |
|
441 |
+ senior['udrt_yn'] = null; |
|
442 |
+ } else { |
|
443 |
+ if (item['udrtYn'] == 1 || item['udrtYn'] == true || item['udrtYn'] == '1' || item['udrtYn'].toLowerCase() == 'true') { |
|
444 |
+ senior['udrt_yn'] = true; |
|
445 |
+ } else { |
|
446 |
+ senior['udrt_yn'] = false; |
|
447 |
+ } |
|
448 |
+ } |
|
444 | 449 |
|
445 |
- setSenior({...senior}); coordSearch(); |
|
446 |
- }}> |
|
447 |
- <span style={{fontWeight: 600}}>[지번]</span> {item['jibunAddr']} |
|
448 |
- <br/> |
|
449 |
- <span style={{fontWeight: 600}}>[도로명]</span> {item['roadAddr']} |
|
450 |
- </li> |
|
451 |
- )}): null} |
|
452 |
- </ul> |
|
453 |
- </div> |
|
454 |
- : null} |
|
450 |
+ setSenior({ ...senior }); coordSearch(); |
|
451 |
+ }}> |
|
452 |
+ <span style={{ fontWeight: 600 }}>[지번]</span> {item['jibunAddr']} |
|
453 |
+ <br /> |
|
454 |
+ <span style={{ fontWeight: 600 }}>[도로명]</span> {item['roadAddr']} |
|
455 |
+ </li> |
|
456 |
+ ) |
|
457 |
+ }) : null} |
|
458 |
+ </ul> |
|
459 |
+ </div> |
|
460 |
+ : null} |
|
455 | 461 |
</td> |
456 | 462 |
</tr> |
457 |
- |
|
463 |
+ |
|
458 | 464 |
<tr> |
459 | 465 |
<th>필요 복약</th> |
460 | 466 |
<td className="medicationTime-td"> |
461 | 467 |
<div className="flex"> |
462 |
- {medicationTimeCodeList.map((item, idx) => { return ( |
|
463 |
- <span key={idx}> |
|
464 |
- <input type="checkbox" |
|
465 |
- name="medicationTimeCodeList" |
|
466 |
- id={item['medication_time_code']} |
|
467 |
- value={item['medication_time_code']} |
|
468 |
- onChange={(e) => {seniorMedicationChange(e.target.value, e.target.checked)}} |
|
469 |
- checked={senior['seniorMedicationList'].indexOf(item['medication_time_code']) > -1}/> |
|
470 |
- <label for={item['medication_time_code']}>{item['medication_time_code_name']}</label> |
|
471 |
- </span> |
|
472 |
- )})} |
|
468 |
+ {medicationTimeCodeList.map((item, idx) => { |
|
469 |
+ return ( |
|
470 |
+ <span key={idx}> |
|
471 |
+ <input type="checkbox" |
|
472 |
+ name="medicationTimeCodeList" |
|
473 |
+ id={item['medication_time_code']} |
|
474 |
+ value={item['medication_time_code']} |
|
475 |
+ onChange={(e) => { seniorMedicationChange(e.target.value, e.target.checked) }} |
|
476 |
+ checked={senior['seniorMedicationList'].indexOf(item['medication_time_code']) > -1} /> |
|
477 |
+ <label for={item['medication_time_code']}>{item['medication_time_code_name']}</label> |
|
478 |
+ </span> |
|
479 |
+ ) |
|
480 |
+ })} |
|
473 | 481 |
</div> |
474 | 482 |
</td> |
475 | 483 |
</tr> |
476 | 484 |
<tr> |
477 | 485 |
<th>복용중인 약</th> |
478 | 486 |
<td colSpan={3}> |
479 |
- <textarea className="medicine" cols="30" rows="2" value={senior['medication_pill']} onChange={(e) => {seniorValueChange('medication_pill', e.target.value)}} /> |
|
487 |
+ <textarea className="medicine" cols="30" rows="2" value={senior['medication_pill']} onChange={(e) => { seniorValueChange('medication_pill', e.target.value) }} /> |
|
480 | 488 |
</td> |
481 | 489 |
</tr> |
482 | 490 |
<tr> |
483 | 491 |
<th>비고</th> |
484 | 492 |
<td colSpan={3}> |
485 |
- <textarea className="note" cols="30" rows="2" value={senior['senior_note']} onChange={(e) => {seniorValueChange('senior_note', e.target.value)}} /> |
|
493 |
+ <textarea className="note" cols="30" rows="2" value={senior['senior_note']} onChange={(e) => { seniorValueChange('senior_note', e.target.value) }} /> |
|
486 | 494 |
</td> |
487 | 495 |
</tr> |
488 | 496 |
|
--- client/views/pages/senior_management/SeniorSelectOne.jsx
+++ client/views/pages/senior_management/SeniorSelectOne.jsx
... | ... | @@ -189,7 +189,7 @@ |
189 | 189 |
const deliveryEquipmentSelectList = (currentPage) => { |
190 | 190 |
deliveryEquipmentSearch.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; |
191 | 191 |
setDeliveryEquipmentSearch({ ...deliveryEquipmentSearch }); |
192 |
- |
|
192 |
+ |
|
193 | 193 |
console.log(">>", senior['agency_id']) |
194 | 194 |
deliveryEquipmentSearch.agency_id = senior['agency_id']; |
195 | 195 |
|
... | ... | @@ -202,6 +202,7 @@ |
202 | 202 |
}).then((response) => response.json()).then((data) => { |
203 | 203 |
console.log('deliveryEquipmentSelectList response : ', data); |
204 | 204 |
setDeliveryEquipment(data); |
205 |
+ rentalCheck(); |
|
205 | 206 |
}).catch((error) => { |
206 | 207 |
console.log('deliveryEquipmentSelectList error : ', error); |
207 | 208 |
}); |
... | ... | @@ -437,6 +438,24 @@ |
437 | 438 |
} |
438 | 439 |
} |
439 | 440 |
|
441 |
+ const [isRental, setIsRental] = React.useState("false"); |
|
442 |
+ const rentalCheck = () => { |
|
443 |
+ let count = 0; |
|
444 |
+ |
|
445 |
+ equipmentBySenior.map((item, idx) => { |
|
446 |
+ if (CommonUtil.isEmpty(item['rental_start_date']) == false && CommonUtil.isEmpty(item['rental_end_date']) == true) { |
|
447 |
+ count++; |
|
448 |
+ } else { |
|
449 |
+ return |
|
450 |
+ } |
|
451 |
+ }) |
|
452 |
+ |
|
453 |
+ if (count > 0) { |
|
454 |
+ setIsRental(true); |
|
455 |
+ } else { |
|
456 |
+ setIsRental(false); |
|
457 |
+ } |
|
458 |
+ } |
|
440 | 459 |
|
441 | 460 |
React.useEffect(() => { |
442 | 461 |
seniorSelectOne(); |
... | ... | @@ -455,7 +474,7 @@ |
455 | 474 |
React.useEffect(() => { |
456 | 475 |
if (CommonUtil.isEmpty(deliveryEquipmentSearch['agency_id']) && CommonUtil.isEmpty(senior['agency_id']) == false) { |
457 | 476 |
deliveryEquipmentSearch['agency_id'] = senior['agency_id']; |
458 |
- setDeliveryEquipmentSearch({...deliveryEquipmentSearch}); |
|
477 |
+ setDeliveryEquipmentSearch({ ...deliveryEquipmentSearch }); |
|
459 | 478 |
deliveryEquipmentSelectList(1); |
460 | 479 |
}; |
461 | 480 |
}, [senior]) |
... | ... | @@ -737,7 +756,9 @@ |
737 | 756 |
|
738 | 757 |
|
739 | 758 |
<SubTitle explanation={"대상자의 장비"} className="margin-bottom display-inline-block" /> |
740 |
- <button className={"btn-small gray-btn display-inline-block float-right"} onClick={modalRentalOpen}>장비 추가</button> |
|
759 |
+ {!isRental ? ( |
|
760 |
+ <button className={"btn-small gray-btn display-inline-block float-right"} onClick={modalRentalOpen}>장비 추가</button> |
|
761 |
+ ) : null} |
|
741 | 762 |
<div className="margin-bottom5"> |
742 | 763 |
<table className={"senior-user protector-user"}> |
743 | 764 |
<thead> |
+++ client/views/pages/user_management/230707_backup_UserSelect.jsx
... | ... | @@ -0,0 +1,861 @@ |
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 | + | |
68 | + //검색 변수 (초기화값) | |
69 | + const [userSearch, setUserSearch] = React.useState({ | |
70 | + 'government_id': state.loginUser['government_id'], | |
71 | + 'agency_id': state.loginUser['agency_id'], | |
72 | + 'authority': null, | |
73 | + | |
74 | + 'searchType': null, | |
75 | + 'searchText': null, | |
76 | + 'currentPage': 1, | |
77 | + 'perPage': 10, | |
78 | + }); | |
79 | + | |
80 | + //대상자(시니어) 목록 및 페이징 정보 | |
81 | + userSearch['authority'] = 'ROLE_SENIOR'; | |
82 | + const [senior, setSenior] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); | |
83 | + const seniorSearchChange = (targetKey, value) => { | |
84 | + let newSenior = JSON.parse(JSON.stringify(senior)); | |
85 | + newSenior.search[targetKey] = value; | |
86 | + setSenior(newSenior); | |
87 | + } | |
88 | + const seniorSelectListEnter = (key) => { | |
89 | + if (key == 'Enter') { | |
90 | + seniorSelectList(); | |
91 | + } else { | |
92 | + return; | |
93 | + } | |
94 | + } | |
95 | + //대상자(시니어) 목록 조회 | |
96 | + const seniorSelectList = (currentPage) => { | |
97 | + senior.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; | |
98 | + | |
99 | + fetch("/user/userSelectList.json", { | |
100 | + method: "POST", | |
101 | + headers: { | |
102 | + 'Content-Type': 'application/json; charset=UTF-8' | |
103 | + }, | |
104 | + body: JSON.stringify(senior.search), | |
105 | + }).then((response) => response.json()).then((data) => { | |
106 | + data.search = senior.search; | |
107 | + console.log("대상자(시니어) 목록 조회 : ", data); | |
108 | + setSenior(data); | |
109 | + }).catch((error) => { | |
110 | + console.log('seniorSelectList() /user/userSelectList.json error : ', error); | |
111 | + }); | |
112 | + } | |
113 | + | |
114 | + //시행기관 담당자 목록 및 페이징 정보 | |
115 | + userSearch['authority'] = 'ROLE_AGENCY'; | |
116 | + const [agent, setAgent] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); | |
117 | + const agentSearchChange = (targetKey, value) => { | |
118 | + let newAgent = JSON.parse(JSON.stringify(agent)); | |
119 | + newAgent.search[targetKey] = value; | |
120 | + setAgent(newAgent); | |
121 | + } | |
122 | + const agentSelectListEnter = (key) => { | |
123 | + if (key == 'Enter') { | |
124 | + agentSelectList(); | |
125 | + } else { | |
126 | + return; | |
127 | + } | |
128 | + } | |
129 | + //시행기관 담당자 목록 조회 | |
130 | + const agentSelectList = (currentPage) => { | |
131 | + agent.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; | |
132 | + | |
133 | + fetch("/user/userSelectList.json", { | |
134 | + method: "POST", | |
135 | + headers: { | |
136 | + 'Content-Type': 'application/json; charset=UTF-8' | |
137 | + }, | |
138 | + body: JSON.stringify(agent.search), | |
139 | + }).then((response) => response.json()).then((data) => { | |
140 | + data.search = agent.search; | |
141 | + console.log("시행기관 담당자 목록 조회 : ", data); | |
142 | + setAgent(data); | |
143 | + }).catch((error) => { | |
144 | + console.log('agentSelectList() /user/userSelectList.json error : ', error); | |
145 | + }); | |
146 | + } | |
147 | + | |
148 | + //시행기관 관리자 목록 및 페이징 정보 | |
149 | + userSearch['authority'] = 'ROLE_AGENCYADMIN'; | |
150 | + const [agentAdmin, setAgentAdmin] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); | |
151 | + const agentAdminSearchChange = (targetKey, value) => { | |
152 | + let newAgent = JSON.parse(JSON.stringify(agentAdmin)); | |
153 | + newAgent.search[targetKey] = value; | |
154 | + setAgentAdmin(newAgent); | |
155 | + } | |
156 | + const agentAdminSelectListEnter = (key) => { | |
157 | + if (key == 'Enter') { | |
158 | + agentAdminSelectList(); | |
159 | + } else { | |
160 | + return; | |
161 | + } | |
162 | + } | |
163 | + //시행기관 관리자 목록 조회 | |
164 | + const agentAdminSelectList = (currentPage) => { | |
165 | + agentAdmin.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; | |
166 | + | |
167 | + fetch("/user/userSelectList.json", { | |
168 | + method: "POST", | |
169 | + headers: { | |
170 | + 'Content-Type': 'application/json; charset=UTF-8' | |
171 | + }, | |
172 | + body: JSON.stringify(agentAdmin.search), | |
173 | + }).then((response) => response.json()).then((data) => { | |
174 | + data.search = agentAdmin.search; | |
175 | + console.log("시행기관 관리자 목록 조회 : ", data); | |
176 | + setAgentAdmin(data); | |
177 | + }).catch((error) => { | |
178 | + console.log('agentSelectList() /user/userSelectList.json error : ', error); | |
179 | + }); | |
180 | + } | |
181 | + | |
182 | + //관리기관 관리자 목록 및 페이징 정보 | |
183 | + userSearch['authority'] = 'ROLE_GOVERNMENT'; | |
184 | + const [government, setGovernment] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); | |
185 | + const governmentSearchChange = (targetKey, value) => { | |
186 | + let newGovernment = JSON.parse(JSON.stringify(government)); | |
187 | + newGovernment.search[targetKey] = value; | |
188 | + setGovernment(newGovernment); | |
189 | + } | |
190 | + const governmentSelectListEnter = (key) => { | |
191 | + if (key == 'Enter') { | |
192 | + governmentSelectList(); | |
193 | + } else { | |
194 | + return; | |
195 | + } | |
196 | + } | |
197 | + //관리기관 담당자 목록 조회 | |
198 | + const governmentSelectList = (currentPage) => { | |
199 | + government.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; | |
200 | + | |
201 | + fetch("/user/userSelectList.json", { | |
202 | + method: "POST", | |
203 | + headers: { | |
204 | + 'Content-Type': 'application/json; charset=UTF-8' | |
205 | + }, | |
206 | + body: JSON.stringify(government.search), | |
207 | + }).then((response) => response.json()).then((data) => { | |
208 | + data.search = government.search; | |
209 | + console.log("관리기관 담당자 목록 조회 : ", data); | |
210 | + setGovernment(data); | |
211 | + }).catch((error) => { | |
212 | + console.log('governmentSelectList() /user/userSelectList.json error : ', error); | |
213 | + }); | |
214 | + } | |
215 | + | |
216 | + //시스템 관리자 목록 및 페이징 정보 | |
217 | + userSearch['authority'] = 'ROLE_ADMIN'; | |
218 | + const [admin, setAdmin] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); | |
219 | + const adminSearchChange = (targetKey, value) => { | |
220 | + let newAdmin = JSON.parse(JSON.stringify(admin)); | |
221 | + newAdmin.search[targetKey] = value; | |
222 | + setAdmin(newAdmin); | |
223 | + } | |
224 | + const adminSelectListEnter = (key) => { | |
225 | + if (key == 'Enter') { | |
226 | + adminSelectList(); | |
227 | + } else { | |
228 | + return; | |
229 | + } | |
230 | + } | |
231 | + //시스템 관리자 목록 조회 | |
232 | + const adminSelectList = (currentPage) => { | |
233 | + admin.search.currentPage = CommonUtil.isEmpty(currentPage) ? 1 : currentPage; | |
234 | + | |
235 | + fetch("/user/userSelectList.json", { | |
236 | + method: "POST", | |
237 | + headers: { | |
238 | + 'Content-Type': 'application/json; charset=UTF-8' | |
239 | + }, | |
240 | + body: JSON.stringify(admin.search), | |
241 | + }).then((response) => response.json()).then((data) => { | |
242 | + data.search = admin.search; | |
243 | + console.log("시스템 관리자 목록 조회 : ", data); | |
244 | + setAdmin(data); | |
245 | + }).catch((error) => { | |
246 | + console.log('adminSelectList() /user/userSelectList.json error : ', error); | |
247 | + }); | |
248 | + } | |
249 | + | |
250 | + | |
251 | + //올잇메디 선택 | |
252 | + const adminChange = () => { | |
253 | + const newUserSearch = JSON.parse(JSON.stringify(userSearch)); | |
254 | + newUserSearch['government_id'] = null; | |
255 | + newUserSearch['agency_id'] = null; | |
256 | + setUserSearch(newUserSearch); | |
257 | + | |
258 | + senior.search['government_id'] = null; | |
259 | + senior.search['agency_id'] = null; | |
260 | + seniorSelectList(); | |
261 | + agent.search['government_id'] = null; | |
262 | + agent.search['agency_id'] = null; | |
263 | + agentSelectList(); | |
264 | + agent.search['government_id'] = null; | |
265 | + agent.search['agency_id'] = null; | |
266 | + agentAdminSelectList(); | |
267 | + if (state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT') { | |
268 | + government.search['government_id'] = null; | |
269 | + government.search['agency_id'] = null; | |
270 | + governmentSelectList(); | |
271 | + } | |
272 | + } | |
273 | + | |
274 | + //관리 기관 선택 | |
275 | + const governmentChange = (government_id) => { | |
276 | + const newUserSearch = JSON.parse(JSON.stringify(userSearch)); | |
277 | + newUserSearch['government_id'] = government_id; | |
278 | + newUserSearch['agency_id'] = null; | |
279 | + setUserSearch(newUserSearch); | |
280 | + | |
281 | + senior.search['government_id'] = government_id; | |
282 | + senior.search['agency_id'] = null; | |
283 | + seniorSelectList(); | |
284 | + agent.search['government_id'] = government_id; | |
285 | + agent.search['agency_id'] = null; | |
286 | + agentSelectList(); | |
287 | + agent.search['government_id'] = government_id; | |
288 | + agent.search['agency_id'] = null; | |
289 | + agentAdminSelectList(); | |
290 | + if (state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT') { | |
291 | + government.search['government_id'] = government_id; | |
292 | + government.search['agency_id'] = null; | |
293 | + governmentSelectList(); | |
294 | + } | |
295 | + } | |
296 | + | |
297 | + //시행 기관 선택 | |
298 | + const agencyChange = (government_id, agency_id) => { | |
299 | + const newUserSearch = JSON.parse(JSON.stringify(userSearch)); | |
300 | + newUserSearch['government_id'] = government_id; | |
301 | + newUserSearch['agency_id'] = agency_id; | |
302 | + setUserSearch(newUserSearch); | |
303 | + | |
304 | + senior.search['government_id'] = government_id; | |
305 | + senior.search['agency_id'] = agency_id; | |
306 | + console.log('senior.search : ', senior.search); | |
307 | + seniorSelectList(); | |
308 | + agent.search['government_id'] = government_id; | |
309 | + agent.search['agency_id'] = agency_id; | |
310 | + agentSelectList(); | |
311 | + agent.search['government_id'] = government_id; | |
312 | + agent.search['agency_id'] = agency_id; | |
313 | + agentAdminSelectList(); | |
314 | + } | |
315 | + | |
316 | + | |
317 | + | |
318 | + //사용자 등록 페이지 이동 | |
319 | + const join = () => { | |
320 | + navigate("/Join", { | |
321 | + state: { | |
322 | + 'government_id': userSearch['government_id'], | |
323 | + 'agency_id': userSearch['agency_id'], | |
324 | + 'authority': tabActiveByRoleType, | |
325 | + } | |
326 | + }); | |
327 | + } | |
328 | + | |
329 | + //가입승인 | |
330 | + const userUpdate = (user, callback) => { | |
331 | + user['is_accept'] = true; | |
332 | + | |
333 | + fetch("/user/userUpdate.json", { | |
334 | + method: "POST", | |
335 | + headers: { | |
336 | + 'Content-Type': 'application/json; charset=UTF-8' | |
337 | + }, | |
338 | + body: JSON.stringify(user), | |
339 | + }).then((response) => response.json()).then((data) => { | |
340 | + console.log("시니어 등록 결과(건수) : ", data); | |
341 | + if (data > 0) { | |
342 | + callback(); | |
343 | + alert("승인완료"); | |
344 | + } else { | |
345 | + alert("승인에 실패하였습니다. 관리자에게 문의바랍니다."); | |
346 | + } | |
347 | + }).catch((error) => { | |
348 | + console.log('userUpdate() /user/userUpdate.json error : ', error); | |
349 | + }); | |
350 | + } | |
351 | + | |
352 | + | |
353 | + //Mounted | |
354 | + React.useEffect(() => { | |
355 | + orgSelectListOfHierarchy(); | |
356 | + | |
357 | + if (CommonUtil.isEmpty(location.state) == false) { | |
358 | + const param = location.state; | |
359 | + if (CommonUtil.isEmpty(param['tabActiveByRoleType']) == false) { | |
360 | + setTabActiveByRoleType(param['tabActiveByRoleType']); | |
361 | + } | |
362 | + governmentChange(param['government_id']); | |
363 | + agencyChange(param['government_id'], param['agency_id']); | |
364 | + } else { | |
365 | + seniorSelectList(); | |
366 | + agentSelectList(); | |
367 | + agentAdminSelectList(); | |
368 | + if (state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT') { | |
369 | + governmentSelectList(); | |
370 | + } | |
371 | + } | |
372 | + | |
373 | + if (state.loginUser['authority'] == 'ROLE_ADMIN') { | |
374 | + adminSelectList(); | |
375 | + } | |
376 | + }, []); | |
377 | + | |
378 | + | |
379 | + return ( | |
380 | + <main> | |
381 | + <Modal_Guardian open={modalGuardianIsOpen} close={modalGuardianClose} /> | |
382 | + <Modal_SeniorInsert | |
383 | + open={modalSeniorInsertIsOpen} | |
384 | + close={modalSeniorInsertClose} | |
385 | + seniorInsertCallback={() => { seniorSelectList(); modalSeniorInsertClose(); }} | |
386 | + defaultAgencyId={userSearch['agency_id']} | |
387 | + defaultGovernmentId={userSearch['government_id']} | |
388 | + /> | |
389 | + | |
390 | + {/* <ContentTitle explanation={"사용자 관리"} /> */} | |
391 | + <div className="content-wrap"> | |
392 | + <div className="flex-align-start userauthoriylist gap5" style={{ height: "calc(100% - 61px)" }}> | |
393 | + <div className="left" style={{ height: "100%", }}> | |
394 | + <div style={{ height: "100%" }}> | |
395 | + <SubTitle | |
396 | + explanation={"기관 리스트"} | |
397 | + className="margin-bottom" | |
398 | + /> | |
399 | + {/* 카테고리 디자인 필요 (a.active 클래스 필요) */} | |
400 | + <div style={{ fontSize: '16px' }} className="category"> | |
401 | + {state.loginUser['authority'] == 'ROLE_ADMIN' ? | |
402 | + <a onClick={adminChange} | |
403 | + className={userSearch['government_id'] == null && userSearch['agency_id'] == null ? "active" : ""}> | |
404 | + 올잇메디 | |
405 | + </a> | |
406 | + : null} | |
407 | + <ul style={{ marginLeft: '15px' }}> | |
408 | + {orgListOfHierarchy.map((item, idx) => { | |
409 | + return ( | |
410 | + <li style={{ margin: '10px 0px' }} key={idx}> | |
411 | + <span style={{ marginRight: '5px' }}><img src={House} alt="" /></span> | |
412 | + <a onClick={() => { governmentChange(item['government_id']) }} | |
413 | + className={item['government_id'] == userSearch['government_id'] ? "active" : ""}> | |
414 | + {item['government_name']} | |
415 | + </a> | |
416 | + {item['agencyList'] != undefined && item['agencyList'] != null ? | |
417 | + <ul style={{ marginLeft: '15px' }}> | |
418 | + {item['agencyList'].map((item2, idx2) => { | |
419 | + return ( | |
420 | + <li style={{ margin: '10px 0px' }} key={idx2}> | |
421 | + <span style={{ marginRight: '5px' }}><img src={Arrow} alt="" /></span> | |
422 | + <a onClick={() => { agencyChange(item['government_id'], item2['agency_id']) }} | |
423 | + className={item2['agency_id'] == userSearch['agency_id'] ? "active" : ""}> | |
424 | + {item2['agency_name']} | |
425 | + </a> | |
426 | + </li> | |
427 | + ) | |
428 | + })} | |
429 | + </ul> | |
430 | + : null | |
431 | + } | |
432 | + </li> | |
433 | + ) | |
434 | + })} | |
435 | + </ul> | |
436 | + </div> | |
437 | + {/* 카테고리 디자인 필요 */} | |
438 | + </div> | |
439 | + </div> | |
440 | + <div className="right" style={{ height: "100%", }}> | |
441 | + <div style={{ height: "100%" }}> | |
442 | + <SubTitle explanation={`사용자 리스트`} className="margin-bottom" /> | |
443 | + <div className="tab-container"> | |
444 | + | |
445 | + {/* 탭 제목 */} | |
446 | + <ul className="tab-menu flex-end" > | |
447 | + {/* <li onClick={() => setTabActiveByRoleType('ROLE_SENIOR')} className={tabActiveByRoleType == 'ROLE_SENIOR' ? "active" : null}>대상자(어르신) ({senior.userListCount})</li> */} | |
448 | + <li onClick={() => setTabActiveByRoleType('ROLE_AGENCY')} className={tabActiveByRoleType == 'ROLE_AGENCY' ? "active" : null}>생활보호사 ({agent.userListCount})</li> | |
449 | + {state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_AGENCYADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT' ? | |
450 | + <li onClick={() => setTabActiveByRoleType('ROLE_AGENCYADMIN')} className={tabActiveByRoleType == 'ROLE_AGENCYADMIN' ? "active" : null}>센터 관리자 ({agentAdmin.userListCount})</li> | |
451 | + : null} | |
452 | + {state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT' ? | |
453 | + <li onClick={() => setTabActiveByRoleType('ROLE_GOVERNMENT')} className={tabActiveByRoleType == 'ROLE_GOVERNMENT' ? "active" : null}>기관 관리자 ({government.userListCount})</li> | |
454 | + : null} | |
455 | + {state.loginUser['authority'] == 'ROLE_ADMIN' ? | |
456 | + <li onClick={() => setTabActiveByRoleType('ROLE_ADMIN')} className={tabActiveByRoleType == 'ROLE_ADMIN' ? "active" : null}>시스템 관리자 ({admin.userListCount})</li> | |
457 | + : null} | |
458 | + </ul> | |
459 | + | |
460 | + {/* 탭 내용 */} | |
461 | + <div className="content-wrap userlist"> | |
462 | + {{ | |
463 | + /* 대상자(시니어) (시작) */ | |
464 | + ROLE_SENIOR: ( | |
465 | + <ul className="tab-content"> | |
466 | + <div> | |
467 | + <div className="search-management flex-start margin-bottom2"> | |
468 | + <select id="searchType1" style={{ maxWidth: 'fit-content' }} onChange={(e) => { seniorSearchChange("searchType", e.target.value) }}> | |
469 | + <option value="" selected={senior.search.searchText == ""}>전체</option> | |
470 | + <option value="user_name" selected={senior.search.searchText == "user_name"}>이름</option> | |
471 | + <option value="user_phonenumber" selected={senior.search.searchText == "user_phonenumber"}>연락처</option> | |
472 | + <option value="user_id" selected={senior.search.searchText == "user_id"}>아이디</option> | |
473 | + </select> | |
474 | + <input type="text" id="searchText1" | |
475 | + value={senior.search.searchText} | |
476 | + onChange={(e) => { seniorSearchChange("searchText", e.target.value) }} | |
477 | + onKeyUp={(e) => { seniorSelectListEnter(e.key) }} | |
478 | + /> | |
479 | + <button className={"btn-small gray-btn"} onClick={() => { seniorSelectList() }}>검색</button> | |
480 | + </div> | |
481 | + | |
482 | + <div className="btn-wrap flex margin-bottom"> | |
483 | + <SubTitle explanation={"대상자 클릭 시 상세페이지로 이동합니다."} /> | |
484 | + {/* <button className={"btn-small gray-btn"} onClick={() => modalSeniorInsertOpen()}>등록</button> */} | |
485 | + </div> | |
486 | + | |
487 | + <table className={"protector-user"}> | |
488 | + <thead> | |
489 | + <tr> | |
490 | + <th>No</th> | |
491 | + <th>소속기관명</th> | |
492 | + <th>이름</th> | |
493 | + <th>생년월일</th> | |
494 | + <th>성별</th> | |
495 | + <th>연락처</th> | |
496 | + <th>주소</th> | |
497 | + </tr> | |
498 | + </thead> | |
499 | + <tbody> | |
500 | + {senior.userList.map((item, idx) => { | |
501 | + return ( | |
502 | + <tr key={idx} onClick={() => { | |
503 | + navigate("/SeniorSelectOne", { | |
504 | + state: { | |
505 | + 'senior_id': item['user_id'], | |
506 | + 'agency_id': item['agency_id'], | |
507 | + 'government_id': item['government_id'] | |
508 | + } | |
509 | + }) | |
510 | + }}> | |
511 | + <td data-label="No">{senior.userListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> | |
512 | + <td data-label="No">{item['agency_name']}</td> | |
513 | + <td data-label="소속기관명">{item['user_name']}</td> | |
514 | + <td data-label="생년월일">{item['user_birth']}</td> | |
515 | + <td data-label="성별">{item['user_gender']}</td> | |
516 | + <td data-label="연락처">{item['user_phonenumber']}</td> | |
517 | + <td data-label="주소">{item['user_address']}</td> | |
518 | + </tr> | |
519 | + ) | |
520 | + })} | |
521 | + {senior.userList == null || senior.userList.length == 0 ? | |
522 | + <tr> | |
523 | + <td colSpan={7}>조회된 데이터가 없습니다</td> | |
524 | + </tr> | |
525 | + : null} | |
526 | + </tbody> | |
527 | + </table> | |
528 | + <Pagination | |
529 | + currentPage={senior.search.currentPage} | |
530 | + perPage={senior.search.perPage} | |
531 | + totalCount={senior.userListCount} | |
532 | + maxRange={5} | |
533 | + click={seniorSelectList} | |
534 | + /> | |
535 | + </div> | |
536 | + </ul> | |
537 | + ), | |
538 | + /* 대상자(시니어) (종료) */ | |
539 | + | |
540 | + /* 시행기관(복지사, 간호사) 사용자 (시작) */ | |
541 | + ROLE_AGENCY: ( | |
542 | + <ul className="tab-content"> | |
543 | + <div> | |
544 | + | |
545 | + <div className="search-management flex-start margin-bottom2"> | |
546 | + <select id="searchType2" style={{ maxWidth: 'fit-content' }} onChange={(e) => { agentSearchChange("searchType", e.target.value) }}> | |
547 | + <option value="" selected={agent.search.searchText == ""}>전체</option> | |
548 | + <option value="user_name" selected={agent.search.searchText == "user_name"}>이름</option> | |
549 | + <option value="user_phonenumber" selected={agent.search.searchText == "user_phonenumber"}>연락처</option> | |
550 | + <option value="user_id" selected={agent.search.searchText == "user_id"}>아이디</option> | |
551 | + </select> | |
552 | + <input id="searchText2" type="text" | |
553 | + value={agent.search.searchText} | |
554 | + onChange={(e) => { agentSearchChange("searchText", e.target.value) }} | |
555 | + onKeyUp={(e) => { agentSelectListEnter(e.key) }} | |
556 | + /> | |
557 | + <button className={"btn-small gray-btn"} onClick={() => { agentSelectList() }}>검색</button> | |
558 | + </div> | |
559 | + | |
560 | + <div className="radio-tab btn-wrap flex-end margin-bottom"> | |
561 | + <div className="flex-start"> | |
562 | + <div> | |
563 | + <input type="radio" name="viewType" id="useTrue" /> | |
564 | + <label htmlFor="useTrue">활성화</label> | |
565 | + </div> | |
566 | + <div> | |
567 | + <input type="radio" name="viewType" id="useFalse" /> | |
568 | + <label htmlFor="useFalse">미활성화</label> | |
569 | + </div> | |
570 | + </div> | |
571 | + <button className={"btn-small gray-btn"} onClick={join}>등록</button> | |
572 | + </div> | |
573 | + | |
574 | + <table className={"senior-user protector-user"}> | |
575 | + <thead> | |
576 | + <tr> | |
577 | + <th>No</th> | |
578 | + <th>관리기관명</th> | |
579 | + <th>소속기관명</th> | |
580 | + <th>이름</th> | |
581 | + <th>연락처</th> | |
582 | + <th>이메일</th> | |
583 | + <th>가입승인</th> | |
584 | + <th>상세보기</th> | |
585 | + </tr> | |
586 | + </thead> | |
587 | + <tbody> | |
588 | + {agent.userList.map((item, idx) => { | |
589 | + return ( | |
590 | + <tr key={idx}> | |
591 | + <td data-label="No">{agent.userListCount - idx - (agent.search.currentPage - 1) * agent.search.perPage}</td> | |
592 | + <td data-label="관리기관명">{item['government_name']}</td> | |
593 | + <td data-label="소속기관명">{item['agency_name']}</td> | |
594 | + <td data-label="이름">{item['user_name']}</td> | |
595 | + <td data-label="연락처">{item['user_phonenumber']}</td> | |
596 | + <td data-label="이메일">{item['user_email']}</td> | |
597 | + <td data-label="가입승인"> | |
598 | + {item['is_accept'] ? "승인완료" : | |
599 | + <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, agentSelectList) }}>가입승인</button> | |
600 | + } | |
601 | + </td> | |
602 | + <td data-label="상세보기"> | |
603 | + <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/AgentSelectOne", { state: { 'agent_id': item['user_id'] } }) }}>상세 페이지 이동</button> | |
604 | + </td> | |
605 | + </tr> | |
606 | + ) | |
607 | + })} | |
608 | + {agent.userList == null || agent.userList.length == 0 ? | |
609 | + <tr> | |
610 | + <td colSpan={8}>조회된 데이터가 없습니다</td> | |
611 | + </tr> | |
612 | + : null} | |
613 | + </tbody> | |
614 | + </table> | |
615 | + <Pagination | |
616 | + currentPage={agent.search.currentPage} | |
617 | + perPage={agent.search.perPage} | |
618 | + totalCount={agent.userListCount} | |
619 | + maxRange={5} | |
620 | + click={agentSelectList} | |
621 | + /> | |
622 | + </div> | |
623 | + </ul> | |
624 | + ), | |
625 | + /* 시행기관(복지사, 간호사) 사용자 (종료) */ | |
626 | + | |
627 | + /* 시행기관(복지사, 간호사) 관리자 (시작) */ | |
628 | + ROLE_AGENCYADMIN: ( | |
629 | + <ul className="tab-content"> | |
630 | + <div> | |
631 | + | |
632 | + <div className="search-management flex-start margin-bottom2"> | |
633 | + <select id="searchType2" style={{ maxWidth: 'fit-content' }} onChange={(e) => { agentAdminSearchChange("searchType", e.target.value) }}> | |
634 | + <option value="" selected={agentAdmin.search.searchText == ""}>전체</option> | |
635 | + <option value="user_name" selected={agentAdmin.search.searchText == "user_name"}>이름</option> | |
636 | + <option value="user_phonenumber" selected={agentAdmin.search.searchText == "user_phonenumber"}>연락처</option> | |
637 | + <option value="user_id" selected={agentAdmin.search.searchText == "user_id"}>아이디</option> | |
638 | + </select> | |
639 | + <input id="searchText2" type="text" | |
640 | + value={agentAdmin.search.searchText} | |
641 | + onChange={(e) => { agentAdminSearchChange("searchText", e.target.value) }} | |
642 | + onKeyUp={(e) => { agentAdminSelectListEnter(e.key) }} | |
643 | + /> | |
644 | + <button className={"btn-small gray-btn"} onClick={() => { agentAdminSelectList() }}>검색</button> | |
645 | + </div> | |
646 | + | |
647 | + <div className="btn-wrap flex-end margin-bottom"> | |
648 | + <button className={"btn-small gray-btn"} onClick={join}>등록</button> | |
649 | + </div> | |
650 | + | |
651 | + <table className={"senior-user protector-user"}> | |
652 | + <thead> | |
653 | + <tr> | |
654 | + <th>No</th> | |
655 | + <th>관리기관명</th> | |
656 | + <th>소속기관명</th> | |
657 | + <th>이름</th> | |
658 | + <th>연락처</th> | |
659 | + <th>이메일</th> | |
660 | + <th>가입승인</th> | |
661 | + <th>상세보기</th> | |
662 | + </tr> | |
663 | + </thead> | |
664 | + <tbody> | |
665 | + {agentAdmin.userList.map((item, idx) => { | |
666 | + return ( | |
667 | + <tr key={idx}> | |
668 | + <td data-label="No">{agentAdmin.userListCount - idx - (agentAdmin.search.currentPage - 1) * agentAdmin.search.perPage}</td> | |
669 | + <td data-label="관리기관명">{item['government_name']}</td> | |
670 | + <td data-label="소속기관명">{item['agency_name']}</td> | |
671 | + <td data-label="이름">{item['user_name']}</td> | |
672 | + <td data-label="연락처">{item['user_phonenumber']}</td> | |
673 | + <td data-label="이메일">{item['user_email']}</td> | |
674 | + <td data-label="가입승인"> | |
675 | + {item['is_accept'] ? "승인완료" : | |
676 | + <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, agentAdminSelectList) }}>가입승인</button> | |
677 | + } | |
678 | + </td> | |
679 | + <td data-label="상세보기"> | |
680 | + <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/AgentSelectOne", { state: { 'agent_id': item['user_id'] } }) }}>상세 페이지 이동</button> | |
681 | + </td> | |
682 | + </tr> | |
683 | + ) | |
684 | + })} | |
685 | + {agentAdmin.userList == null || agentAdmin.userList.length == 0 ? | |
686 | + <tr> | |
687 | + <td colSpan={8}>조회된 데이터가 없습니다</td> | |
688 | + </tr> | |
689 | + : null} | |
690 | + </tbody> | |
691 | + </table> | |
692 | + <Pagination | |
693 | + currentPage={agentAdmin.search.currentPage} | |
694 | + perPage={agentAdmin.search.perPage} | |
695 | + totalCount={agentAdmin.userListCount} | |
696 | + maxRange={5} | |
697 | + click={agentAdminSelectList} | |
698 | + /> | |
699 | + </div> | |
700 | + </ul> | |
701 | + ), | |
702 | + /* 시행기관(복지사, 간호사) 관리자 (종료) */ | |
703 | + | |
704 | + /* 관리기관(지자체, 병원) 사용자 (시작) */ | |
705 | + ROLE_GOVERNMENT: ( | |
706 | + <ul className="tab-content"> | |
707 | + <div> | |
708 | + | |
709 | + <div className="search-management flex-start margin-bottom2"> | |
710 | + <select style={{ maxWidth: 'fit-content' }} onChange={(e) => { governmentSearchChange("searchType", e.target.value) }}> | |
711 | + <option value="" selected={government.search.searchText == ""}>전체</option> | |
712 | + <option value="user_name" selected={government.search.searchText == "user_name"}>이름</option> | |
713 | + <option value="user_phonenumber" selected={government.search.searchText == "user_phonenumber"}>연락처</option> | |
714 | + <option value="user_id" selected={government.search.searchText == "user_id"}>아이디</option> | |
715 | + </select> | |
716 | + <input type="text" | |
717 | + value={government.search.searchText} | |
718 | + onChange={(e) => { governmentSearchChange("searchText", e.target.value) }} | |
719 | + onKeyUp={(e) => { governmentSelectListEnter(e.key) }} | |
720 | + /> | |
721 | + <button className={"btn-small gray-btn"} onClick={() => { governmentSelectList() }}>검색</button> | |
722 | + </div> | |
723 | + | |
724 | + <div className="btn-wrap flex-end margin-bottom"> | |
725 | + <button className={"btn-small gray-btn"} onClick={join}>등록</button> | |
726 | + </div> | |
727 | + | |
728 | + <table className={"senior-user protector-user"}> | |
729 | + <thead> | |
730 | + <tr> | |
731 | + <th>No</th> | |
732 | + <th>소속기관명</th> | |
733 | + <th>이름</th> | |
734 | + <th>연락처</th> | |
735 | + <th>이메일</th> | |
736 | + <th>가입승인</th> | |
737 | + <th>관리</th> | |
738 | + </tr> | |
739 | + </thead> | |
740 | + <tbody> | |
741 | + {government.userList.map((item, idx) => { | |
742 | + return ( | |
743 | + <tr key={idx}> | |
744 | + <td data-label="No">{government.userListCount - idx - (government.search.currentPage - 1) * government.search.perPage}</td> | |
745 | + <td data-label="소속기관명">{item['government_name']}</td> | |
746 | + <td data-label="이름">{item['user_name']}</td> | |
747 | + <td data-label="연락처">{item['user_phonenumber']}</td> | |
748 | + <td data-label="이메일">{item['user_email']}</td> | |
749 | + <td data-label="가입승인"> | |
750 | + {item['is_accept'] ? "승인완료" : | |
751 | + <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, governmentSelectList) }}>가입승인</button> | |
752 | + } | |
753 | + </td> | |
754 | + <td data-label="관리"> | |
755 | + <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/UserEdit", { state: { 'user_id': item['user_id'] } }) }}>정보 수정</button> | |
756 | + </td> | |
757 | + </tr> | |
758 | + ) | |
759 | + })} | |
760 | + {government.userList == null || government.userList.length == 0 ? | |
761 | + <tr> | |
762 | + <td colSpan={7}>조회된 데이터가 없습니다</td> | |
763 | + </tr> | |
764 | + : null} | |
765 | + </tbody> | |
766 | + </table> | |
767 | + <Pagination | |
768 | + currentPage={government.search.currentPage} | |
769 | + perPage={government.search.perPage} | |
770 | + totalCount={government.userListCount} | |
771 | + maxRange={5} | |
772 | + click={governmentSelectList} | |
773 | + /> | |
774 | + </div> | |
775 | + </ul> | |
776 | + ), | |
777 | + /* 관리기관(지자체, 병원) 사용자 (종료) */ | |
778 | + | |
779 | + /* 시스템 관리자 (시작) */ | |
780 | + ROLE_ADMIN: ( | |
781 | + <ul className="tab-content"> | |
782 | + <div> | |
783 | + | |
784 | + <div className="search-management flex-start margin-bottom2"> | |
785 | + <select style={{ maxWidth: 'fit-content' }} onChange={(e) => { adminSearchChange("searchType", e.target.value) }}> | |
786 | + <option value="" selected={admin.search.searchText == ""}>전체</option> | |
787 | + <option value="user_name" selected={admin.search.searchText == "user_name"}>이름</option> | |
788 | + <option value="user_phonenumber" selected={admin.search.searchText == "user_phonenumber"}>연락처</option> | |
789 | + <option value="user_id" selected={admin.search.searchText == "user_id"}>아이디</option> | |
790 | + </select> | |
791 | + <input type="text" | |
792 | + value={admin.search.searchText} | |
793 | + onChange={(e) => { adminSearchChange("searchText", e.target.value) }} | |
794 | + onKeyUp={(e) => { adminSelectListEnter(e.key) }} | |
795 | + /> | |
796 | + <button className={"btn-small gray-btn"} onClick={() => { adminSelectList() }}>검색</button> | |
797 | + </div> | |
798 | + | |
799 | + <div className="btn-wrap flex-end margin-bottom"> | |
800 | + <button className={"btn-small gray-btn"} onClick={join}>등록</button> | |
801 | + </div> | |
802 | + | |
803 | + <table className={"senior-user protector-user"}> | |
804 | + <thead> | |
805 | + <tr> | |
806 | + <th>No</th> | |
807 | + <th>이름</th> | |
808 | + <th>연락처</th> | |
809 | + <th>이메일</th> | |
810 | + <th>가입승인</th> | |
811 | + <th>관리</th> | |
812 | + </tr> | |
813 | + </thead> | |
814 | + <tbody> | |
815 | + {admin.userList.map((item, idx) => { | |
816 | + return ( | |
817 | + <tr key={idx}> | |
818 | + <td data-label="No">{admin.userListCount - idx - (admin.search.currentPage - 1) * admin.search.perPage}</td> | |
819 | + <td data-label="이름">{item['user_name']}</td> | |
820 | + <td data-label="연락처">{item['user_phonenumber']}</td> | |
821 | + <td data-label="이메일">{item['user_email']}</td> | |
822 | + <td data-label="가입승인"> | |
823 | + {item['is_accept'] ? "승인완료" : | |
824 | + <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, adminSelectList) }}>가입승인</button> | |
825 | + } | |
826 | + </td> | |
827 | + <td data-label="관리"> | |
828 | + <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/UserEdit", { state: { 'user_id': item['user_id'] } }) }}>정보 수정</button> | |
829 | + </td> | |
830 | + </tr> | |
831 | + ) | |
832 | + })} | |
833 | + {admin.userList == null || admin.userList.length == 0 ? | |
834 | + <tr> | |
835 | + <td colSpan={6}>조회된 데이터가 없습니다</td> | |
836 | + </tr> | |
837 | + : null} | |
838 | + </tbody> | |
839 | + </table> | |
840 | + <Pagination | |
841 | + currentPage={admin.search.currentPage} | |
842 | + perPage={admin.search.perPage} | |
843 | + totalCount={admin.userListCount} | |
844 | + maxRange={5} | |
845 | + click={adminSelectList} | |
846 | + /> | |
847 | + </div> | |
848 | + </ul> | |
849 | + ) | |
850 | + /* 시스템 관리자 (종료) */ | |
851 | + }[tabActiveByRoleType]} | |
852 | + </div> | |
853 | + | |
854 | + </div> | |
855 | + </div> | |
856 | + </div> | |
857 | + </div> | |
858 | + </div> | |
859 | + </main> | |
860 | + ); | |
861 | +} |
--- client/views/pages/user_management/AgentSelectOne.jsx
+++ client/views/pages/user_management/AgentSelectOne.jsx
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 |
}; |
58 | 58 |
|
59 | 59 |
//생활보호사의 대상자 목록 |
60 |
- const [seniorByAgent, setSeniorByAgent] = React.useState({seniorListByAgent: [], seniorListCountByAgent: 0}); |
|
60 |
+ const [seniorByAgent, setSeniorByAgent] = React.useState({ seniorListByAgent: [], seniorListCountByAgent: 0 }); |
|
61 | 61 |
//생활보호사의 선택한 대상자 정보 |
62 | 62 |
const [senior, setSenior] = React.useState({}); |
63 | 63 |
//생활보호사의 대상자 목록 조회 |
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 |
<Modal_SeniorInsert |
143 | 143 |
open={modalSeniorInsertIsOpen} |
144 | 144 |
close={modalSeniorInsertClose} |
145 |
- seniorInsertCallback={() => {seniorSelectListByAgent(); modalSeniorInsertClose();}} |
|
145 |
+ seniorInsertCallback={() => { seniorSelectListByAgent(); modalSeniorInsertClose(); }} |
|
146 | 146 |
defaultAgentId={agent['agent_id']} |
147 | 147 |
defaultAgencyId={agent['agency_id']} |
148 | 148 |
defaultGovernmentId={agent['government_id']} |
... | ... | @@ -157,23 +157,23 @@ |
157 | 157 |
<th>관리기관</th> |
158 | 158 |
<td> |
159 | 159 |
<span>{agent['government_name']}</span> |
160 |
- </td> |
|
160 |
+ </td> |
|
161 | 161 |
</tr> |
162 | 162 |
|
163 | 163 |
<tr> |
164 | 164 |
<th>시행기관</th> |
165 | 165 |
<td> |
166 | 166 |
<span>{agent['agency_name']}</span> |
167 |
- </td> |
|
167 |
+ </td> |
|
168 | 168 |
</tr> |
169 | 169 |
|
170 | 170 |
<tr> |
171 | 171 |
<th>이름(아이디)</th> |
172 | 172 |
<td> |
173 | 173 |
<span>{agent['user_name']}({agent['user_id']})</span> |
174 |
- </td> |
|
174 |
+ </td> |
|
175 | 175 |
</tr> |
176 |
- |
|
176 |
+ |
|
177 | 177 |
<tr> |
178 | 178 |
<th>연락처</th> |
179 | 179 |
<td> |
... | ... | @@ -185,22 +185,20 @@ |
185 | 185 |
<th>이메일</th> |
186 | 186 |
<td> |
187 | 187 |
<span>{agent['user_email']}</span> |
188 |
- </td> |
|
188 |
+ </td> |
|
189 | 189 |
</tr> |
190 | 190 |
|
191 | 191 |
<tr> |
192 |
- <th>가입승인관리</th> |
|
192 |
+ <th>계정활성화여부</th> |
|
193 | 193 |
<td> |
194 |
- {agent['is_accept'] ? <span>승인완료</span> : |
|
195 |
- <button className={"btn-small red-btn"} onClick={userUpdate}>가입승인</button> |
|
196 |
- } |
|
197 |
- </td> |
|
194 |
+ <span>{agent['user_use'] ? '활성화' : '비활성화'}</span> |
|
195 |
+ </td> |
|
198 | 196 |
</tr> |
199 |
- |
|
197 |
+ |
|
200 | 198 |
</tbody> |
201 | 199 |
</table> |
202 | 200 |
<div className="btn-wrap flex-center"> |
203 |
- <button className={"btn-large gray-btn"} onClick={() => {navigate("/UserEdit", {state: {'user_id': agent['user_id']}})}}>수정</button> |
|
201 |
+ <button className={"btn-large gray-btn"} onClick={() => { navigate("/UserEdit", { state: { 'user_id': agent['user_id'] } }) }}>수정</button> |
|
204 | 202 |
<button className={"btn-large red-btn"} onClick={() => alert("삭제할 수 없습니다.")}>삭제</button> |
205 | 203 |
</div> |
206 | 204 |
</div> |
... | ... | @@ -225,33 +223,35 @@ |
225 | 223 |
</tr> |
226 | 224 |
</thead> |
227 | 225 |
<tbody> |
228 |
- {seniorByAgent.seniorListByAgent.map((item, idx) => { return ( |
|
229 |
- <tr key={idx}> |
|
230 |
- <td>{idx + 1}</td> |
|
231 |
- {/* <td>{item['government_name']}</td> |
|
226 |
+ {seniorByAgent.seniorListByAgent.map((item, idx) => { |
|
227 |
+ return ( |
|
228 |
+ <tr key={idx}> |
|
229 |
+ <td>{idx + 1}</td> |
|
230 |
+ {/* <td>{item['government_name']}</td> |
|
232 | 231 |
<td>{item['agency_name']}</td> */} |
233 |
- <td>{item['user_name']}</td> |
|
234 |
- <td>{item['user_phonenumber']}</td> |
|
235 |
- <td>{item['user_birth']}</td> |
|
236 |
- <td>{item['user_gender']}</td> |
|
237 |
- <td>{item['agent_match_state'] ? <span className="green">케어중</span> : <span className="grey">케어완료</span>}</td> |
|
238 |
- <td>{item['agent_match_start_date']}</td> |
|
239 |
- <td> |
|
240 |
- {item['agent_match_state'] ? |
|
241 |
- <button className={"btn-small red-btn"} onClick={() => {agentSeniorDelete(item)}}>케어종료</button> |
|
242 |
- : item['agent_match_end_date'] |
|
243 |
- } |
|
244 |
- </td> |
|
245 |
- <td> |
|
246 |
- <button className={"btn-small lightgray-btn"} onClick={() => {navigate("/SeniorSelectOne", {state: {'senior_id': item['user_id']}})}}>상세 페이지 이동</button> |
|
247 |
- </td> |
|
248 |
- </tr> |
|
249 |
- )})} |
|
232 |
+ <td>{item['user_name']}</td> |
|
233 |
+ <td>{item['user_phonenumber']}</td> |
|
234 |
+ <td>{item['user_birth']}</td> |
|
235 |
+ <td>{item['user_gender']}</td> |
|
236 |
+ <td>{item['agent_match_state'] ? <span className="green">케어중</span> : <span className="grey">케어완료</span>}</td> |
|
237 |
+ <td>{item['agent_match_start_date']}</td> |
|
238 |
+ <td> |
|
239 |
+ {item['agent_match_state'] ? |
|
240 |
+ <button className={"btn-small red-btn"} onClick={() => { agentSeniorDelete(item) }}>케어종료</button> |
|
241 |
+ : item['agent_match_end_date'] |
|
242 |
+ } |
|
243 |
+ </td> |
|
244 |
+ <td> |
|
245 |
+ <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/SeniorSelectOne", { state: { 'senior_id': item['user_id'] } }) }}>상세 페이지 이동</button> |
|
246 |
+ </td> |
|
247 |
+ </tr> |
|
248 |
+ ) |
|
249 |
+ })} |
|
250 | 250 |
{seniorByAgent.seniorListByAgent == null || seniorByAgent.seniorListByAgent.length == 0 ? |
251 | 251 |
<tr> |
252 | 252 |
<td colSpan={9}>조회된 데이터가 없습니다</td> |
253 | 253 |
</tr> |
254 |
- : null} |
|
254 |
+ : null} |
|
255 | 255 |
</tbody> |
256 | 256 |
</table> |
257 | 257 |
</div> |
--- client/views/pages/user_management/UserSelect.jsx
+++ client/views/pages/user_management/UserSelect.jsx
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 |
const location = useLocation(); |
18 | 18 |
|
19 | 19 |
//전역 변수 저장 객체 |
20 |
- const state = useSelector((state) => {return state}); |
|
20 |
+ const state = useSelector((state) => { return state }); |
|
21 | 21 |
const defaultGovernmentId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id']; |
22 | 22 |
|
23 | 23 |
//활성화 탭 (시스템 업무 역할별) |
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 |
headers: { |
55 | 55 |
'Content-Type': 'application/json; charset=UTF-8' |
56 | 56 |
}, |
57 |
- body: JSON.stringify({'government_id': defaultGovernmentId}), |
|
57 |
+ body: JSON.stringify({ 'government_id': defaultGovernmentId }), |
|
58 | 58 |
}).then((response) => response.json()).then((data) => { |
59 | 59 |
console.log("기관(관리, 시행) 계층 구조 목록 조회 : ", data); |
60 | 60 |
setOrgListOfHierarchy(data); |
... | ... | @@ -64,7 +64,8 @@ |
64 | 64 |
}; |
65 | 65 |
|
66 | 66 |
|
67 |
- |
|
67 |
+ // user_state |
|
68 |
+ const [isViewType, setIsViewType] = React.useState(true); |
|
68 | 69 |
//검색 변수 (초기화값) |
69 | 70 |
const [userSearch, setUserSearch] = React.useState({ |
70 | 71 |
'government_id': state.loginUser['government_id'], |
... | ... | @@ -79,7 +80,7 @@ |
79 | 80 |
|
80 | 81 |
//대상자(시니어) 목록 및 페이징 정보 |
81 | 82 |
userSearch['authority'] = 'ROLE_SENIOR'; |
82 |
- const [senior, setSenior] = React.useState({userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch))}); |
|
83 |
+ const [senior, setSenior] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); |
|
83 | 84 |
const seniorSearchChange = (targetKey, value) => { |
84 | 85 |
let newSenior = JSON.parse(JSON.stringify(senior)); |
85 | 86 |
newSenior.search[targetKey] = value; |
... | ... | @@ -113,7 +114,7 @@ |
113 | 114 |
|
114 | 115 |
//시행기관 담당자 목록 및 페이징 정보 |
115 | 116 |
userSearch['authority'] = 'ROLE_AGENCY'; |
116 |
- const [agent, setAgent] = React.useState({userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch))}); |
|
117 |
+ const [agent, setAgent] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); |
|
117 | 118 |
const agentSearchChange = (targetKey, value) => { |
118 | 119 |
let newAgent = JSON.parse(JSON.stringify(agent)); |
119 | 120 |
newAgent.search[targetKey] = value; |
... | ... | @@ -147,7 +148,7 @@ |
147 | 148 |
|
148 | 149 |
//시행기관 관리자 목록 및 페이징 정보 |
149 | 150 |
userSearch['authority'] = 'ROLE_AGENCYADMIN'; |
150 |
- const [agentAdmin, setAgentAdmin] = React.useState({userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch))}); |
|
151 |
+ const [agentAdmin, setAgentAdmin] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); |
|
151 | 152 |
const agentAdminSearchChange = (targetKey, value) => { |
152 | 153 |
let newAgent = JSON.parse(JSON.stringify(agentAdmin)); |
153 | 154 |
newAgent.search[targetKey] = value; |
... | ... | @@ -181,7 +182,7 @@ |
181 | 182 |
|
182 | 183 |
//관리기관 관리자 목록 및 페이징 정보 |
183 | 184 |
userSearch['authority'] = 'ROLE_GOVERNMENT'; |
184 |
- const [government, setGovernment] = React.useState({userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch))}); |
|
185 |
+ const [government, setGovernment] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); |
|
185 | 186 |
const governmentSearchChange = (targetKey, value) => { |
186 | 187 |
let newGovernment = JSON.parse(JSON.stringify(government)); |
187 | 188 |
newGovernment.search[targetKey] = value; |
... | ... | @@ -215,7 +216,7 @@ |
215 | 216 |
|
216 | 217 |
//시스템 관리자 목록 및 페이징 정보 |
217 | 218 |
userSearch['authority'] = 'ROLE_ADMIN'; |
218 |
- const [admin, setAdmin] = React.useState({userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch))}); |
|
219 |
+ const [admin, setAdmin] = React.useState({ userList: [], userListCount: 0, search: JSON.parse(JSON.stringify(userSearch)) }); |
|
219 | 220 |
const adminSearchChange = (targetKey, value) => { |
220 | 221 |
let newAdmin = JSON.parse(JSON.stringify(admin)); |
221 | 222 |
newAdmin.search[targetKey] = value; |
... | ... | @@ -286,7 +287,7 @@ |
286 | 287 |
agentSelectList(); |
287 | 288 |
agent.search['government_id'] = government_id; |
288 | 289 |
agent.search['agency_id'] = null; |
289 |
- agentADminSelectList(); |
|
290 |
+ agentAdminSelectList(); |
|
290 | 291 |
if (state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT') { |
291 | 292 |
government.search['government_id'] = government_id; |
292 | 293 |
government.search['agency_id'] = null; |
... | ... | @@ -312,16 +313,18 @@ |
312 | 313 |
agent.search['agency_id'] = agency_id; |
313 | 314 |
agentAdminSelectList(); |
314 | 315 |
} |
315 |
- |
|
316 |
- |
|
316 |
+ |
|
317 |
+ |
|
317 | 318 |
|
318 | 319 |
//사용자 등록 페이지 이동 |
319 | 320 |
const join = () => { |
320 |
- navigate("/Join", {state: { |
|
321 |
- 'government_id': userSearch['government_id'], |
|
322 |
- 'agency_id': userSearch['agency_id'], |
|
323 |
- 'authority': tabActiveByRoleType, |
|
324 |
- }}); |
|
321 |
+ navigate("/Join", { |
|
322 |
+ state: { |
|
323 |
+ 'government_id': userSearch['government_id'], |
|
324 |
+ 'agency_id': userSearch['agency_id'], |
|
325 |
+ 'authority': tabActiveByRoleType, |
|
326 |
+ } |
|
327 |
+ }); |
|
325 | 328 |
} |
326 | 329 |
|
327 | 330 |
//가입승인 |
... | ... | @@ -351,7 +354,7 @@ |
351 | 354 |
//Mounted |
352 | 355 |
React.useEffect(() => { |
353 | 356 |
orgSelectListOfHierarchy(); |
354 |
- |
|
357 |
+ |
|
355 | 358 |
if (CommonUtil.isEmpty(location.state) == false) { |
356 | 359 |
const param = location.state; |
357 | 360 |
if (CommonUtil.isEmpty(param['tabActiveByRoleType']) == false) { |
... | ... | @@ -376,11 +379,11 @@ |
376 | 379 |
|
377 | 380 |
return ( |
378 | 381 |
<main> |
379 |
- <Modal_Guardian open={modalGuardianIsOpen} close={modalGuardianClose}/> |
|
382 |
+ <Modal_Guardian open={modalGuardianIsOpen} close={modalGuardianClose} /> |
|
380 | 383 |
<Modal_SeniorInsert |
381 | 384 |
open={modalSeniorInsertIsOpen} |
382 | 385 |
close={modalSeniorInsertClose} |
383 |
- seniorInsertCallback={() => {seniorSelectList(); modalSeniorInsertClose();}} |
|
386 |
+ seniorInsertCallback={() => { seniorSelectList(); modalSeniorInsertClose(); }} |
|
384 | 387 |
defaultAgencyId={userSearch['agency_id']} |
385 | 388 |
defaultGovernmentId={userSearch['government_id']} |
386 | 389 |
/> |
... | ... | @@ -395,37 +398,41 @@ |
395 | 398 |
className="margin-bottom" |
396 | 399 |
/> |
397 | 400 |
{/* 카테고리 디자인 필요 (a.active 클래스 필요) */} |
398 |
- <div style={{fontSize: '16px'}} className="category"> |
|
401 |
+ <div style={{ fontSize: '16px' }} className="category"> |
|
399 | 402 |
{state.loginUser['authority'] == 'ROLE_ADMIN' ? |
400 | 403 |
<a onClick={adminChange} |
401 | 404 |
className={userSearch['government_id'] == null && userSearch['agency_id'] == null ? "active" : ""}> |
402 | 405 |
올잇메디 |
403 | 406 |
</a> |
404 |
- : null} |
|
405 |
- <ul style={{marginLeft: '15px'}}> |
|
406 |
- {orgListOfHierarchy.map((item, idx) => { return ( |
|
407 |
- <li style={{margin: '10px 0px'}} key={idx}> |
|
408 |
- <span style={{marginRight: '5px'}}><img src={House} alt="" /></span> |
|
409 |
- <a onClick={() => {governmentChange(item['government_id'])}} |
|
410 |
- className={item['government_id'] == userSearch['government_id'] ? "active" : ""}> |
|
411 |
- {item['government_name']} |
|
412 |
- </a> |
|
413 |
- {item['agencyList'] != undefined && item['agencyList'] != null ? |
|
414 |
- <ul style={{marginLeft: '15px'}}> |
|
415 |
- {item['agencyList'].map((item2, idx2) => { return ( |
|
416 |
- <li style={{margin: '10px 0px'}} key={idx2}> |
|
417 |
- <span style={{marginRight: '5px'}}><img src={Arrow} alt="" /></span> |
|
418 |
- <a onClick={() => {agencyChange(item['government_id'], item2['agency_id'])}} |
|
419 |
- className={item2['agency_id'] == userSearch['agency_id'] ? "active" : ""}> |
|
420 |
- {item2['agency_name']} |
|
421 |
- </a> |
|
422 |
- </li> |
|
423 |
- )})} |
|
424 |
- </ul> |
|
425 |
- : null |
|
426 |
- } |
|
427 |
- </li> |
|
428 |
- )})} |
|
407 |
+ : null} |
|
408 |
+ <ul style={{ marginLeft: '15px' }}> |
|
409 |
+ {orgListOfHierarchy.map((item, idx) => { |
|
410 |
+ return ( |
|
411 |
+ <li style={{ margin: '10px 0px' }} key={idx}> |
|
412 |
+ <span style={{ marginRight: '5px' }}><img src={House} alt="" /></span> |
|
413 |
+ <a onClick={() => { governmentChange(item['government_id']) }} |
|
414 |
+ className={item['government_id'] == userSearch['government_id'] ? "active" : ""}> |
|
415 |
+ {item['government_name']} |
|
416 |
+ </a> |
|
417 |
+ {item['agencyList'] != undefined && item['agencyList'] != null ? |
|
418 |
+ <ul style={{ marginLeft: '15px' }}> |
|
419 |
+ {item['agencyList'].map((item2, idx2) => { |
|
420 |
+ return ( |
|
421 |
+ <li style={{ margin: '10px 0px' }} key={idx2}> |
|
422 |
+ <span style={{ marginRight: '5px' }}><img src={Arrow} alt="" /></span> |
|
423 |
+ <a onClick={() => { agencyChange(item['government_id'], item2['agency_id']) }} |
|
424 |
+ className={item2['agency_id'] == userSearch['agency_id'] ? "active" : ""}> |
|
425 |
+ {item2['agency_name']} |
|
426 |
+ </a> |
|
427 |
+ </li> |
|
428 |
+ ) |
|
429 |
+ })} |
|
430 |
+ </ul> |
|
431 |
+ : null |
|
432 |
+ } |
|
433 |
+ </li> |
|
434 |
+ ) |
|
435 |
+ })} |
|
429 | 436 |
</ul> |
430 | 437 |
</div> |
431 | 438 |
{/* 카테고리 디자인 필요 */} |
... | ... | @@ -433,22 +440,22 @@ |
433 | 440 |
</div> |
434 | 441 |
<div className="right" style={{ height: "100%", }}> |
435 | 442 |
<div style={{ height: "100%" }}> |
436 |
- <SubTitle explanation={`사용자 리스트`} className="margin-bottom"/> |
|
443 |
+ <SubTitle explanation={`사용자 리스트`} className="margin-bottom" /> |
|
437 | 444 |
<div className="tab-container"> |
438 | 445 |
|
439 | 446 |
{/* 탭 제목 */} |
440 | 447 |
<ul className="tab-menu flex-end" > |
441 | 448 |
{/* <li onClick={() => setTabActiveByRoleType('ROLE_SENIOR')} className={tabActiveByRoleType == 'ROLE_SENIOR' ? "active" : null}>대상자(어르신) ({senior.userListCount})</li> */} |
442 | 449 |
<li onClick={() => setTabActiveByRoleType('ROLE_AGENCY')} className={tabActiveByRoleType == 'ROLE_AGENCY' ? "active" : null}>생활보호사 ({agent.userListCount})</li> |
443 |
- {state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_AGENCYADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT' ? |
|
450 |
+ {state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_AGENCYADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT' ? |
|
444 | 451 |
<li onClick={() => setTabActiveByRoleType('ROLE_AGENCYADMIN')} className={tabActiveByRoleType == 'ROLE_AGENCYADMIN' ? "active" : null}>센터 관리자 ({agentAdmin.userListCount})</li> |
445 |
- : null} |
|
446 |
- {state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT' ? |
|
452 |
+ : null} |
|
453 |
+ {state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT' ? |
|
447 | 454 |
<li onClick={() => setTabActiveByRoleType('ROLE_GOVERNMENT')} className={tabActiveByRoleType == 'ROLE_GOVERNMENT' ? "active" : null}>기관 관리자 ({government.userListCount})</li> |
448 |
- : null} |
|
455 |
+ : null} |
|
449 | 456 |
{state.loginUser['authority'] == 'ROLE_ADMIN' ? |
450 | 457 |
<li onClick={() => setTabActiveByRoleType('ROLE_ADMIN')} className={tabActiveByRoleType == 'ROLE_ADMIN' ? "active" : null}>시스템 관리자 ({admin.userListCount})</li> |
451 |
- : null} |
|
458 |
+ : null} |
|
452 | 459 |
</ul> |
453 | 460 |
|
454 | 461 |
{/* 탭 내용 */} |
... | ... | @@ -459,7 +466,7 @@ |
459 | 466 |
<ul className="tab-content"> |
460 | 467 |
<div> |
461 | 468 |
<div className="search-management flex-start margin-bottom2"> |
462 |
- <select id="searchType1" style={{maxWidth: 'fit-content'}} onChange={(e) => {seniorSearchChange("searchType", e.target.value)}}> |
|
469 |
+ <select id="searchType1" style={{ maxWidth: 'fit-content' }} onChange={(e) => { seniorSearchChange("searchType", e.target.value) }}> |
|
463 | 470 |
<option value="" selected={senior.search.searchText == ""}>전체</option> |
464 | 471 |
<option value="user_name" selected={senior.search.searchText == "user_name"}>이름</option> |
465 | 472 |
<option value="user_phonenumber" selected={senior.search.searchText == "user_phonenumber"}>연락처</option> |
... | ... | @@ -467,10 +474,10 @@ |
467 | 474 |
</select> |
468 | 475 |
<input type="text" id="searchText1" |
469 | 476 |
value={senior.search.searchText} |
470 |
- onChange={(e) => {seniorSearchChange("searchText", e.target.value)}} |
|
471 |
- onKeyUp={(e) => {seniorSelectListEnter(e.key)}} |
|
477 |
+ onChange={(e) => { seniorSearchChange("searchText", e.target.value) }} |
|
478 |
+ onKeyUp={(e) => { seniorSelectListEnter(e.key) }} |
|
472 | 479 |
/> |
473 |
- <button className={"btn-small gray-btn"} onClick={() => {seniorSelectList()}}>검색</button> |
|
480 |
+ <button className={"btn-small gray-btn"} onClick={() => { seniorSelectList() }}>검색</button> |
|
474 | 481 |
</div> |
475 | 482 |
|
476 | 483 |
<div className="btn-wrap flex margin-bottom"> |
... | ... | @@ -491,28 +498,32 @@ |
491 | 498 |
</tr> |
492 | 499 |
</thead> |
493 | 500 |
<tbody> |
494 |
- {senior.userList.map((item, idx) => { return ( |
|
495 |
- <tr key={idx} onClick={() => {navigate("/SeniorSelectOne", { |
|
496 |
- state: { |
|
497 |
- 'senior_id': item['user_id'], |
|
498 |
- 'agency_id': item['agency_id'], |
|
499 |
- 'government_id': item['government_id'] |
|
500 |
- } |
|
501 |
- })}}> |
|
502 |
- <td data-label="No">{senior.userListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
503 |
- <td data-label="No">{item['agency_name']}</td> |
|
504 |
- <td data-label="소속기관명">{item['user_name']}</td> |
|
505 |
- <td data-label="생년월일">{item['user_birth']}</td> |
|
506 |
- <td data-label="성별">{item['user_gender']}</td> |
|
507 |
- <td data-label="연락처">{item['user_phonenumber']}</td> |
|
508 |
- <td data-label="주소">{item['user_address']}</td> |
|
509 |
- </tr> |
|
510 |
- )})} |
|
501 |
+ {senior.userList.map((item, idx) => { |
|
502 |
+ return ( |
|
503 |
+ <tr key={idx} onClick={() => { |
|
504 |
+ navigate("/SeniorSelectOne", { |
|
505 |
+ state: { |
|
506 |
+ 'senior_id': item['user_id'], |
|
507 |
+ 'agency_id': item['agency_id'], |
|
508 |
+ 'government_id': item['government_id'] |
|
509 |
+ } |
|
510 |
+ }) |
|
511 |
+ }}> |
|
512 |
+ <td data-label="No">{senior.userListCount - idx - (senior.search.currentPage - 1) * senior.search.perPage}</td> |
|
513 |
+ <td data-label="No">{item['agency_name']}</td> |
|
514 |
+ <td data-label="소속기관명">{item['user_name']}</td> |
|
515 |
+ <td data-label="생년월일">{item['user_birth']}</td> |
|
516 |
+ <td data-label="성별">{item['user_gender']}</td> |
|
517 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
518 |
+ <td data-label="주소">{item['user_address']}</td> |
|
519 |
+ </tr> |
|
520 |
+ ) |
|
521 |
+ })} |
|
511 | 522 |
{senior.userList == null || senior.userList.length == 0 ? |
512 | 523 |
<tr> |
513 | 524 |
<td colSpan={7}>조회된 데이터가 없습니다</td> |
514 |
- </tr> |
|
515 |
- : null} |
|
525 |
+ </tr> |
|
526 |
+ : null} |
|
516 | 527 |
</tbody> |
517 | 528 |
</table> |
518 | 529 |
<Pagination |
... | ... | @@ -533,21 +544,35 @@ |
533 | 544 |
<div> |
534 | 545 |
|
535 | 546 |
<div className="search-management flex-start margin-bottom2"> |
536 |
- <select id="searchType2" style={{maxWidth: 'fit-content'}} onChange={(e) => {agentSearchChange("searchType", e.target.value)}}> |
|
547 |
+ <select id="searchType2" style={{ maxWidth: 'fit-content' }} onChange={(e) => { agentSearchChange("searchType", e.target.value) }}> |
|
537 | 548 |
<option value="" selected={agent.search.searchText == ""}>전체</option> |
538 | 549 |
<option value="user_name" selected={agent.search.searchText == "user_name"}>이름</option> |
539 | 550 |
<option value="user_phonenumber" selected={agent.search.searchText == "user_phonenumber"}>연락처</option> |
540 | 551 |
<option value="user_id" selected={agent.search.searchText == "user_id"}>아이디</option> |
541 | 552 |
</select> |
542 |
- <input id="searchText2" type="text" |
|
553 |
+ <input id="searchText2" type="text" |
|
543 | 554 |
value={agent.search.searchText} |
544 |
- onChange={(e) => {agentSearchChange("searchText", e.target.value)}} |
|
545 |
- onKeyUp={(e) => {agentSelectListEnter(e.key)}} |
|
555 |
+ onChange={(e) => { agentSearchChange("searchText", e.target.value) }} |
|
556 |
+ onKeyUp={(e) => { agentSelectListEnter(e.key) }} |
|
546 | 557 |
/> |
547 |
- <button className={"btn-small gray-btn"} onClick={() => {agentSelectList()}}>검색</button> |
|
558 |
+ <button className={"btn-small gray-btn"} onClick={() => { agentSelectList() }}>검색</button> |
|
548 | 559 |
</div> |
549 | 560 |
|
550 |
- <div className="btn-wrap flex-end margin-bottom"> |
|
561 |
+ <div className="radio-tab btn-wrap flex-end margin-bottom"> |
|
562 |
+ <div className="flex-start"> |
|
563 |
+ <div> |
|
564 |
+ <input type="radio" name="viewType" id="useTrue" |
|
565 |
+ checked={isViewType} |
|
566 |
+ onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> |
|
567 |
+ <label htmlFor="useTrue">활성화</label> |
|
568 |
+ </div> |
|
569 |
+ <div> |
|
570 |
+ <input type="radio" name="viewType" id="useFalse" |
|
571 |
+ checked={!isViewType} |
|
572 |
+ onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> |
|
573 |
+ <label htmlFor="useFalse">미활성화</label> |
|
574 |
+ </div> |
|
575 |
+ </div> |
|
551 | 576 |
<button className={"btn-small gray-btn"} onClick={join}>등록</button> |
552 | 577 |
</div> |
553 | 578 |
|
... | ... | @@ -565,29 +590,31 @@ |
565 | 590 |
</tr> |
566 | 591 |
</thead> |
567 | 592 |
<tbody> |
568 |
- {agent.userList.map((item, idx) => { return ( |
|
569 |
- <tr key={idx}> |
|
570 |
- <td data-label="No">{agent.userListCount - idx - (agent.search.currentPage - 1) * agent.search.perPage}</td> |
|
571 |
- <td data-label="관리기관명">{item['government_name']}</td> |
|
572 |
- <td data-label="소속기관명">{item['agency_name']}</td> |
|
573 |
- <td data-label="이름">{item['user_name']}</td> |
|
574 |
- <td data-label="연락처">{item['user_phonenumber']}</td> |
|
575 |
- <td data-label="이메일">{item['user_email']}</td> |
|
576 |
- <td data-label="가입승인"> |
|
577 |
- {item['is_accept'] ? "승인완료" : |
|
578 |
- <button className={"btn-small red-btn"} onClick={() => {userUpdate(item, agentSelectList)}}>가입승인</button> |
|
579 |
- } |
|
580 |
- </td> |
|
581 |
- <td data-label="상세보기"> |
|
582 |
- <button className={"btn-small lightgray-btn"} onClick={() => {navigate("/AgentSelectOne", {state: {'agent_id': item['user_id']}})}}>상세 페이지 이동</button> |
|
583 |
- </td> |
|
584 |
- </tr> |
|
585 |
- )})} |
|
593 |
+ {agent.userList.map((item, idx) => { |
|
594 |
+ return ( |
|
595 |
+ <tr key={idx}> |
|
596 |
+ <td data-label="No">{agent.userListCount - idx - (agent.search.currentPage - 1) * agent.search.perPage}</td> |
|
597 |
+ <td data-label="관리기관명">{item['government_name']}</td> |
|
598 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
599 |
+ <td data-label="이름">{item['user_name']}</td> |
|
600 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
601 |
+ <td data-label="이메일">{item['user_email']}</td> |
|
602 |
+ <td data-label="가입승인"> |
|
603 |
+ {item['is_accept'] ? "승인완료" : |
|
604 |
+ <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, agentSelectList) }}>가입승인</button> |
|
605 |
+ } |
|
606 |
+ </td> |
|
607 |
+ <td data-label="상세보기"> |
|
608 |
+ <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/AgentSelectOne", { state: { 'agent_id': item['user_id'] } }) }}>상세 페이지 이동</button> |
|
609 |
+ </td> |
|
610 |
+ </tr> |
|
611 |
+ ) |
|
612 |
+ })} |
|
586 | 613 |
{agent.userList == null || agent.userList.length == 0 ? |
587 | 614 |
<tr> |
588 | 615 |
<td colSpan={8}>조회된 데이터가 없습니다</td> |
589 | 616 |
</tr> |
590 |
- : null} |
|
617 |
+ : null} |
|
591 | 618 |
</tbody> |
592 | 619 |
</table> |
593 | 620 |
<Pagination |
... | ... | @@ -608,21 +635,35 @@ |
608 | 635 |
<div> |
609 | 636 |
|
610 | 637 |
<div className="search-management flex-start margin-bottom2"> |
611 |
- <select id="searchType2" style={{maxWidth: 'fit-content'}} onChange={(e) => {agentAdminSearchChange("searchType", e.target.value)}}> |
|
638 |
+ <select id="searchType2" style={{ maxWidth: 'fit-content' }} onChange={(e) => { agentAdminSearchChange("searchType", e.target.value) }}> |
|
612 | 639 |
<option value="" selected={agentAdmin.search.searchText == ""}>전체</option> |
613 | 640 |
<option value="user_name" selected={agentAdmin.search.searchText == "user_name"}>이름</option> |
614 | 641 |
<option value="user_phonenumber" selected={agentAdmin.search.searchText == "user_phonenumber"}>연락처</option> |
615 | 642 |
<option value="user_id" selected={agentAdmin.search.searchText == "user_id"}>아이디</option> |
616 | 643 |
</select> |
617 |
- <input id="searchText2" type="text" |
|
644 |
+ <input id="searchText2" type="text" |
|
618 | 645 |
value={agentAdmin.search.searchText} |
619 |
- onChange={(e) => {agentAdminSearchChange("searchText", e.target.value)}} |
|
620 |
- onKeyUp={(e) => {agentAdminSelectListEnter(e.key)}} |
|
646 |
+ onChange={(e) => { agentAdminSearchChange("searchText", e.target.value) }} |
|
647 |
+ onKeyUp={(e) => { agentAdminSelectListEnter(e.key) }} |
|
621 | 648 |
/> |
622 |
- <button className={"btn-small gray-btn"} onClick={() => {agentAdminSelectList()}}>검색</button> |
|
649 |
+ <button className={"btn-small gray-btn"} onClick={() => { agentAdminSelectList() }}>검색</button> |
|
623 | 650 |
</div> |
624 | 651 |
|
625 |
- <div className="btn-wrap flex-end margin-bottom"> |
|
652 |
+ <div className="radio-tab btn-wrap flex-end margin-bottom"> |
|
653 |
+ <div className="flex-start"> |
|
654 |
+ <div> |
|
655 |
+ <input type="radio" name="viewType" id="useTrue" |
|
656 |
+ checked={isViewType} |
|
657 |
+ onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> |
|
658 |
+ <label htmlFor="useTrue">활성화</label> |
|
659 |
+ </div> |
|
660 |
+ <div> |
|
661 |
+ <input type="radio" name="viewType" id="useFalse" |
|
662 |
+ checked={!isViewType} |
|
663 |
+ onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> |
|
664 |
+ <label htmlFor="useFalse">미활성화</label> |
|
665 |
+ </div> |
|
666 |
+ </div> |
|
626 | 667 |
<button className={"btn-small gray-btn"} onClick={join}>등록</button> |
627 | 668 |
</div> |
628 | 669 |
|
... | ... | @@ -640,29 +681,31 @@ |
640 | 681 |
</tr> |
641 | 682 |
</thead> |
642 | 683 |
<tbody> |
643 |
- {agentAdmin.userList.map((item, idx) => { return ( |
|
644 |
- <tr key={idx}> |
|
645 |
- <td data-label="No">{agentAdmin.userListCount - idx - (agentAdmin.search.currentPage - 1) * agentAdmin.search.perPage}</td> |
|
646 |
- <td data-label="관리기관명">{item['government_name']}</td> |
|
647 |
- <td data-label="소속기관명">{item['agency_name']}</td> |
|
648 |
- <td data-label="이름">{item['user_name']}</td> |
|
649 |
- <td data-label="연락처">{item['user_phonenumber']}</td> |
|
650 |
- <td data-label="이메일">{item['user_email']}</td> |
|
651 |
- <td data-label="가입승인"> |
|
652 |
- {item['is_accept'] ? "승인완료" : |
|
653 |
- <button className={"btn-small red-btn"} onClick={() => {userUpdate(item, agentAdminSelectList)}}>가입승인</button> |
|
654 |
- } |
|
655 |
- </td> |
|
656 |
- <td data-label="상세보기"> |
|
657 |
- <button className={"btn-small lightgray-btn"} onClick={() => {navigate("/AgentSelectOne", {state: {'agent_id': item['user_id']}})}}>상세 페이지 이동</button> |
|
658 |
- </td> |
|
659 |
- </tr> |
|
660 |
- )})} |
|
684 |
+ {agentAdmin.userList.map((item, idx) => { |
|
685 |
+ return ( |
|
686 |
+ <tr key={idx}> |
|
687 |
+ <td data-label="No">{agentAdmin.userListCount - idx - (agentAdmin.search.currentPage - 1) * agentAdmin.search.perPage}</td> |
|
688 |
+ <td data-label="관리기관명">{item['government_name']}</td> |
|
689 |
+ <td data-label="소속기관명">{item['agency_name']}</td> |
|
690 |
+ <td data-label="이름">{item['user_name']}</td> |
|
691 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
692 |
+ <td data-label="이메일">{item['user_email']}</td> |
|
693 |
+ <td data-label="가입승인"> |
|
694 |
+ {item['is_accept'] ? "승인완료" : |
|
695 |
+ <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, agentAdminSelectList) }}>가입승인</button> |
|
696 |
+ } |
|
697 |
+ </td> |
|
698 |
+ <td data-label="상세보기"> |
|
699 |
+ <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/AgentSelectOne", { state: { 'agent_id': item['user_id'] } }) }}>상세 페이지 이동</button> |
|
700 |
+ </td> |
|
701 |
+ </tr> |
|
702 |
+ ) |
|
703 |
+ })} |
|
661 | 704 |
{agentAdmin.userList == null || agentAdmin.userList.length == 0 ? |
662 | 705 |
<tr> |
663 | 706 |
<td colSpan={8}>조회된 데이터가 없습니다</td> |
664 | 707 |
</tr> |
665 |
- : null} |
|
708 |
+ : null} |
|
666 | 709 |
</tbody> |
667 | 710 |
</table> |
668 | 711 |
<Pagination |
... | ... | @@ -681,9 +724,9 @@ |
681 | 724 |
ROLE_GOVERNMENT: ( |
682 | 725 |
<ul className="tab-content"> |
683 | 726 |
<div> |
684 |
- |
|
727 |
+ |
|
685 | 728 |
<div className="search-management flex-start margin-bottom2"> |
686 |
- <select style={{maxWidth: 'fit-content'}} onChange={(e) => {governmentSearchChange("searchType", e.target.value)}}> |
|
729 |
+ <select style={{ maxWidth: 'fit-content' }} onChange={(e) => { governmentSearchChange("searchType", e.target.value) }}> |
|
687 | 730 |
<option value="" selected={government.search.searchText == ""}>전체</option> |
688 | 731 |
<option value="user_name" selected={government.search.searchText == "user_name"}>이름</option> |
689 | 732 |
<option value="user_phonenumber" selected={government.search.searchText == "user_phonenumber"}>연락처</option> |
... | ... | @@ -691,13 +734,27 @@ |
691 | 734 |
</select> |
692 | 735 |
<input type="text" |
693 | 736 |
value={government.search.searchText} |
694 |
- onChange={(e) => {governmentSearchChange("searchText", e.target.value)}} |
|
695 |
- onKeyUp={(e) => {governmentSelectListEnter(e.key)}} |
|
737 |
+ onChange={(e) => { governmentSearchChange("searchText", e.target.value) }} |
|
738 |
+ onKeyUp={(e) => { governmentSelectListEnter(e.key) }} |
|
696 | 739 |
/> |
697 |
- <button className={"btn-small gray-btn"} onClick={() => {governmentSelectList()}}>검색</button> |
|
740 |
+ <button className={"btn-small gray-btn"} onClick={() => { governmentSelectList() }}>검색</button> |
|
698 | 741 |
</div> |
699 | 742 |
|
700 |
- <div className="btn-wrap flex-end margin-bottom"> |
|
743 |
+ <div className="radio-tab btn-wrap flex-end margin-bottom"> |
|
744 |
+ <div className="flex-start"> |
|
745 |
+ <div> |
|
746 |
+ <input type="radio" name="viewType" id="useTrue" |
|
747 |
+ checked={isViewType} |
|
748 |
+ onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> |
|
749 |
+ <label htmlFor="useTrue">활성화</label> |
|
750 |
+ </div> |
|
751 |
+ <div> |
|
752 |
+ <input type="radio" name="viewType" id="useFalse" |
|
753 |
+ checked={!isViewType} |
|
754 |
+ onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> |
|
755 |
+ <label htmlFor="useFalse">미활성화</label> |
|
756 |
+ </div> |
|
757 |
+ </div> |
|
701 | 758 |
<button className={"btn-small gray-btn"} onClick={join}>등록</button> |
702 | 759 |
</div> |
703 | 760 |
|
... | ... | @@ -714,28 +771,30 @@ |
714 | 771 |
</tr> |
715 | 772 |
</thead> |
716 | 773 |
<tbody> |
717 |
- {government.userList.map((item, idx) => { return ( |
|
718 |
- <tr key={idx}> |
|
719 |
- <td data-label="No">{government.userListCount - idx - (government.search.currentPage - 1) * government.search.perPage}</td> |
|
720 |
- <td data-label="소속기관명">{item['government_name']}</td> |
|
721 |
- <td data-label="이름">{item['user_name']}</td> |
|
722 |
- <td data-label="연락처">{item['user_phonenumber']}</td> |
|
723 |
- <td data-label="이메일">{item['user_email']}</td> |
|
724 |
- <td data-label="가입승인"> |
|
725 |
- {item['is_accept'] ? "승인완료" : |
|
726 |
- <button className={"btn-small red-btn"} onClick={() => {userUpdate(item, governmentSelectList)}}>가입승인</button> |
|
727 |
- } |
|
728 |
- </td> |
|
729 |
- <td data-label="관리"> |
|
730 |
- <button className={"btn-small lightgray-btn"} onClick={() => {navigate("/UserEdit", {state: {'user_id': item['user_id']}})}}>정보 수정</button> |
|
731 |
- </td> |
|
732 |
- </tr> |
|
733 |
- )})} |
|
774 |
+ {government.userList.map((item, idx) => { |
|
775 |
+ return ( |
|
776 |
+ <tr key={idx}> |
|
777 |
+ <td data-label="No">{government.userListCount - idx - (government.search.currentPage - 1) * government.search.perPage}</td> |
|
778 |
+ <td data-label="소속기관명">{item['government_name']}</td> |
|
779 |
+ <td data-label="이름">{item['user_name']}</td> |
|
780 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
781 |
+ <td data-label="이메일">{item['user_email']}</td> |
|
782 |
+ <td data-label="가입승인"> |
|
783 |
+ {item['is_accept'] ? "승인완료" : |
|
784 |
+ <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, governmentSelectList) }}>가입승인</button> |
|
785 |
+ } |
|
786 |
+ </td> |
|
787 |
+ <td data-label="관리"> |
|
788 |
+ <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/UserEdit", { state: { 'user_id': item['user_id'] } }) }}>정보 수정</button> |
|
789 |
+ </td> |
|
790 |
+ </tr> |
|
791 |
+ ) |
|
792 |
+ })} |
|
734 | 793 |
{government.userList == null || government.userList.length == 0 ? |
735 | 794 |
<tr> |
736 | 795 |
<td colSpan={7}>조회된 데이터가 없습니다</td> |
737 | 796 |
</tr> |
738 |
- : null} |
|
797 |
+ : null} |
|
739 | 798 |
</tbody> |
740 | 799 |
</table> |
741 | 800 |
<Pagination |
... | ... | @@ -754,9 +813,9 @@ |
754 | 813 |
ROLE_ADMIN: ( |
755 | 814 |
<ul className="tab-content"> |
756 | 815 |
<div> |
757 |
- |
|
816 |
+ |
|
758 | 817 |
<div className="search-management flex-start margin-bottom2"> |
759 |
- <select style={{maxWidth: 'fit-content'}} onChange={(e) => {adminSearchChange("searchType", e.target.value)}}> |
|
818 |
+ <select style={{ maxWidth: 'fit-content' }} onChange={(e) => { adminSearchChange("searchType", e.target.value) }}> |
|
760 | 819 |
<option value="" selected={admin.search.searchText == ""}>전체</option> |
761 | 820 |
<option value="user_name" selected={admin.search.searchText == "user_name"}>이름</option> |
762 | 821 |
<option value="user_phonenumber" selected={admin.search.searchText == "user_phonenumber"}>연락처</option> |
... | ... | @@ -764,13 +823,27 @@ |
764 | 823 |
</select> |
765 | 824 |
<input type="text" |
766 | 825 |
value={admin.search.searchText} |
767 |
- onChange={(e) => {adminSearchChange("searchText", e.target.value)}} |
|
768 |
- onKeyUp={(e) => {adminSelectListEnter(e.key)}} |
|
826 |
+ onChange={(e) => { adminSearchChange("searchText", e.target.value) }} |
|
827 |
+ onKeyUp={(e) => { adminSelectListEnter(e.key) }} |
|
769 | 828 |
/> |
770 |
- <button className={"btn-small gray-btn"} onClick={() => {adminSelectList()}}>검색</button> |
|
829 |
+ <button className={"btn-small gray-btn"} onClick={() => { adminSelectList() }}>검색</button> |
|
771 | 830 |
</div> |
772 | 831 |
|
773 |
- <div className="btn-wrap flex-end margin-bottom"> |
|
832 |
+ <div className="radio-tab btn-wrap flex-end margin-bottom"> |
|
833 |
+ <div className="flex-start"> |
|
834 |
+ <div> |
|
835 |
+ <input type="radio" name="viewType" id="useTrue" |
|
836 |
+ checked={isViewType} |
|
837 |
+ onChange={(e) => { e.target.checked ? setIsViewType(true) : null }} /> |
|
838 |
+ <label htmlFor="useTrue">활성화</label> |
|
839 |
+ </div> |
|
840 |
+ <div> |
|
841 |
+ <input type="radio" name="viewType" id="useFalse" |
|
842 |
+ checked={!isViewType} |
|
843 |
+ onChange={(e) => { e.target.checked ? setIsViewType(false) : null }} /> |
|
844 |
+ <label htmlFor="useFalse">미활성화</label> |
|
845 |
+ </div> |
|
846 |
+ </div> |
|
774 | 847 |
<button className={"btn-small gray-btn"} onClick={join}>등록</button> |
775 | 848 |
</div> |
776 | 849 |
|
... | ... | @@ -786,27 +859,29 @@ |
786 | 859 |
</tr> |
787 | 860 |
</thead> |
788 | 861 |
<tbody> |
789 |
- {admin.userList.map((item, idx) => { return ( |
|
790 |
- <tr key={idx}> |
|
791 |
- <td data-label="No">{admin.userListCount - idx - (admin.search.currentPage - 1) * admin.search.perPage}</td> |
|
792 |
- <td data-label="이름">{item['user_name']}</td> |
|
793 |
- <td data-label="연락처">{item['user_phonenumber']}</td> |
|
794 |
- <td data-label="이메일">{item['user_email']}</td> |
|
795 |
- <td data-label="가입승인"> |
|
796 |
- {item['is_accept'] ? "승인완료" : |
|
797 |
- <button className={"btn-small red-btn"} onClick={() => {userUpdate(item, adminSelectList)}}>가입승인</button> |
|
798 |
- } |
|
799 |
- </td> |
|
800 |
- <td data-label="관리"> |
|
801 |
- <button className={"btn-small lightgray-btn"} onClick={() => {navigate("/UserEdit", {state: {'user_id': item['user_id']}})}}>정보 수정</button> |
|
802 |
- </td> |
|
803 |
- </tr> |
|
804 |
- )})} |
|
862 |
+ {admin.userList.map((item, idx) => { |
|
863 |
+ return ( |
|
864 |
+ <tr key={idx}> |
|
865 |
+ <td data-label="No">{admin.userListCount - idx - (admin.search.currentPage - 1) * admin.search.perPage}</td> |
|
866 |
+ <td data-label="이름">{item['user_name']}</td> |
|
867 |
+ <td data-label="연락처">{item['user_phonenumber']}</td> |
|
868 |
+ <td data-label="이메일">{item['user_email']}</td> |
|
869 |
+ <td data-label="가입승인"> |
|
870 |
+ {item['is_accept'] ? "승인완료" : |
|
871 |
+ <button className={"btn-small red-btn"} onClick={() => { userUpdate(item, adminSelectList) }}>가입승인</button> |
|
872 |
+ } |
|
873 |
+ </td> |
|
874 |
+ <td data-label="관리"> |
|
875 |
+ <button className={"btn-small lightgray-btn"} onClick={() => { navigate("/UserEdit", { state: { 'user_id': item['user_id'] } }) }}>정보 수정</button> |
|
876 |
+ </td> |
|
877 |
+ </tr> |
|
878 |
+ ) |
|
879 |
+ })} |
|
805 | 880 |
{admin.userList == null || admin.userList.length == 0 ? |
806 | 881 |
<tr> |
807 | 882 |
<td colSpan={6}>조회된 데이터가 없습니다</td> |
808 | 883 |
</tr> |
809 |
- : null} |
|
884 |
+ : null} |
|
810 | 885 |
</tbody> |
811 | 886 |
</table> |
812 | 887 |
<Pagination |
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?