
--- client/resources/css/layout.css
+++ client/resources/css/layout.css
... | ... | @@ -83,9 +83,13 @@ |
83 | 83 |
} |
84 | 84 |
nav li{cursor: pointer;} |
85 | 85 |
.sidebar-item{font-size: 1.8rem;} |
86 |
+.sidebar-item.active, |
|
86 | 87 |
.sidebar-item:hover{background: #f25430; color: #ffffff; width: 90%; border-top-right-radius: 50px; border-bottom-right-radius: 50px; } |
88 |
+.sidebar-item.active a, |
|
87 | 89 |
.sidebar-item:hover a{color: #ffffff;} |
90 |
+.sidebar-item.active span, .sidebar-item.active .toggle, |
|
88 | 91 |
.sidebar-item:hover span, .sidebar-item:hover .toggle{color: #ffffff;} |
92 |
+.sidebar-item.active span, .sidebar-item.active .MuiSvgIcon-root, |
|
89 | 93 |
.sidebar-item:hover span, .sidebar-item:hover .MuiSvgIcon-root{color: #ffffff;} |
90 | 94 |
.sidebar-content { |
91 | 95 |
display: none; |
--- client/views/layout/SidebarItem.jsx
+++ client/views/layout/SidebarItem.jsx
... | ... | @@ -1,12 +1,13 @@ |
1 | 1 |
import React, { useState } from "react"; |
2 | 2 |
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; |
3 |
-import { Link } from "react-router-dom"; |
|
3 |
+import { Link, useLocation } from "react-router-dom"; |
|
4 | 4 |
|
5 | 5 |
export default function SidebarItem({ item }) { |
6 | 6 |
const [open, setOpen] = useState(false); |
7 | 7 |
const toggleMenu = () => { |
8 | 8 |
setOpen(!open); |
9 | 9 |
}; |
10 |
+ const pathName = useLocation().pathname; |
|
10 | 11 |
|
11 | 12 |
if (item.childrens) { |
12 | 13 |
return ( |
... | ... | @@ -34,7 +35,7 @@ |
34 | 35 |
); |
35 | 36 |
} else { |
36 | 37 |
return ( |
37 |
- <li className="sidebar-item"> |
|
38 |
+ <li className={pathName === item.path ? 'sidebar-item active' : 'sidebar-item'}> |
|
38 | 39 |
<Link to={item.path || "#"} className="flex-start "> |
39 | 40 |
{item.icon} |
40 | 41 |
{item.title} |
--- client/views/pages/healthcare/Healthcare.jsx
+++ client/views/pages/healthcare/Healthcare.jsx
... | ... | @@ -95,7 +95,7 @@ |
95 | 95 |
<th>생년월일</th> |
96 | 96 |
<th>성별</th> |
97 | 97 |
<th>연락처</th> |
98 |
- <th>최근복약률</th> |
|
98 |
+ <th colSpan={3}>최근복약률</th> |
|
99 | 99 |
</tr> |
100 | 100 |
</thead> |
101 | 101 |
<tbody> |
... | ... | @@ -114,8 +114,14 @@ |
114 | 114 |
<td data-label="생년월일">{item['user_birth']}</td> |
115 | 115 |
<td data-label="성별">{item['user_gender']}</td> |
116 | 116 |
<td data-label="연락처">{item['user_phonenumber']}</td> |
117 |
- <td data-label="문진표관리"> |
|
118 |
- 80% |
|
117 |
+ <td data-label="최근복약률"> |
|
118 |
+ 1/3 |
|
119 |
+ </td> |
|
120 |
+ <td data-label="최근복약률"> |
|
121 |
+ 1/3 |
|
122 |
+ </td> |
|
123 |
+ <td data-label="최근복약률"> |
|
124 |
+ 1/3 |
|
119 | 125 |
</td> |
120 | 126 |
</tr> |
121 | 127 |
)})} |
... | ... | @@ -270,21 +276,6 @@ |
270 | 276 |
<div className="right" style={{ height: "100%", }}> |
271 | 277 |
<div style={{ height: "100%" }}> |
272 | 278 |
<div className="tab-container" style={{ marginTop: "5rem"}}> |
273 |
- {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] == 'ROLE_AGENCY' ? |
|
274 |
- <div className="flex-end margin-bottom"> |
|
275 |
- <div className="flex searchselect" style={{width: 'auto'}}> |
|
276 |
- |
|
277 |
- <input type="radio" id="my_senior" name="senior" checked={isMySenior} |
|
278 |
- onChange={(e) => {e.target.checked ? setIsMySenior(true) : null}}/> |
|
279 |
- <label for="my_senior" style={{marginRight: '3rem'}}>나의 대상자 보기</label> |
|
280 |
- |
|
281 |
- <input type="radio" id="all_senior" name="senior" checked={!isMySenior} |
|
282 |
- onChange={(e) => {e.target.checked ? setIsMySenior(false) : null}}/> |
|
283 |
- <label for="all_senior" style={{marginRight: '0'}}>전체 대상자 보기</label> |
|
284 |
- |
|
285 |
- </div> |
|
286 |
- </div> |
|
287 |
- :null} |
|
288 | 279 |
<ul className="tab-menu flex-end"> |
289 | 280 |
{tab.map((item, idx) => { return ( |
290 | 281 |
<li onClick={() => setTabIndex(idx)} className={idx == tabIndex ? 'active' : null}> |
--- client/views/pages/main/Main_guardian.jsx
+++ client/views/pages/main/Main_guardian.jsx
... | ... | @@ -95,10 +95,19 @@ |
95 | 95 |
} |
96 | 96 |
]; |
97 | 97 |
|
98 |
+ console.log("hello:", state); |
|
99 |
+ if(state['seniorList'].length > 1) { |
|
100 |
+ console.log('seniorList: ', state['seniorList'].length); |
|
101 |
+ } else { |
|
102 |
+ console.log('시니어가 한 명 뿐입니다.'); |
|
103 |
+ } |
|
98 | 104 |
|
99 | 105 |
return ( |
100 | 106 |
<> |
101 | 107 |
<main className="pink"> |
108 |
+ {state['seniorList'].length > 1 ? ( <select name="" id=""> |
|
109 |
+ <option value="">시니어 목록</option> |
|
110 |
+ </select> ) : ''} |
|
102 | 111 |
<div className="flex-start main-guardian"><img src={Senior} alt="" /><Title title={"김복남 어르신"} explanation={"방문, 복약, 온도, 배터리 현황을 확인하세요."} /></div> |
103 | 112 |
<div className="main-grid-guardian"> |
104 | 113 |
<div className="combine-left combine-all-government battery-wrap "> |
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?