박정하 박정하 2023-06-05
230605 박정하 최초커밋
@8254e1e5674520fa2b295d40c98fefb862e47105
client/resources/css/layout.css
--- client/resources/css/layout.css
+++ client/resources/css/layout.css
@@ -83,9 +83,13 @@
 }
 nav li{cursor: pointer;}
 .sidebar-item{font-size: 1.8rem;}
+.sidebar-item.active,
 .sidebar-item:hover{background: #f25430; color: #ffffff; width: 90%; border-top-right-radius: 50px; border-bottom-right-radius: 50px; }
+.sidebar-item.active a,
 .sidebar-item:hover a{color: #ffffff;}
+.sidebar-item.active span, .sidebar-item.active .toggle,
 .sidebar-item:hover span, .sidebar-item:hover .toggle{color: #ffffff;}
+.sidebar-item.active span, .sidebar-item.active .MuiSvgIcon-root,
 .sidebar-item:hover span, .sidebar-item:hover .MuiSvgIcon-root{color: #ffffff;}
 .sidebar-content {
   display: none;
client/views/layout/SidebarItem.jsx
--- client/views/layout/SidebarItem.jsx
+++ client/views/layout/SidebarItem.jsx
@@ -1,12 +1,13 @@
 import React, { useState } from "react";
 import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
-import { Link } from "react-router-dom";
+import { Link, useLocation } from "react-router-dom";
 
 export default function SidebarItem({ item }) {
   const [open, setOpen] = useState(false);
   const toggleMenu = () => {
     setOpen(!open);
   };
+  const pathName = useLocation().pathname;
 
   if (item.childrens) {
     return (
@@ -34,7 +35,7 @@
     );
   } else {
     return (
-      <li className="sidebar-item">
+      <li className={pathName === item.path ? 'sidebar-item active' : 'sidebar-item'}>
         <Link to={item.path || "#"} className="flex-start ">
           {item.icon}
           {item.title}
client/views/pages/healthcare/Healthcare.jsx
--- client/views/pages/healthcare/Healthcare.jsx
+++ client/views/pages/healthcare/Healthcare.jsx
@@ -95,7 +95,7 @@
 							<th>생년월일</th>
 							<th>성별</th>
 							<th>연락처</th>
-							<th>최근복약률</th>
+							<th colSpan={3}>최근복약률</th>
 						</tr>
 					</thead>
 					<tbody>
@@ -114,8 +114,14 @@
 							<td data-label="생년월일">{item['user_birth']}</td>
 							<td data-label="성별">{item['user_gender']}</td>
 							<td data-label="연락처">{item['user_phonenumber']}</td>
-							<td data-label="문진표관리">
-                                80%
+							<td data-label="최근복약률">
+                                1/3
+							</td>
+							<td data-label="최근복약률">
+                                1/3
+							</td>
+							<td data-label="최근복약률">
+                                1/3
 							</td>
 						</tr>
 						)})}
@@ -270,21 +276,6 @@
                     <div className="right" style={{ height: "100%", }}>
                         <div style={{ height: "100%" }}>
                             <div className="tab-container" style={{ marginTop: "5rem"}}>
-                                {CommonUtil.isEmpty(state.loginUser) == false && state.loginUser['authority'] == 'ROLE_AGENCY' ?
-                                <div className="flex-end margin-bottom">
-                                    <div className="flex searchselect" style={{width: 'auto'}}>
-
-                                        <input type="radio" id="my_senior" name="senior" checked={isMySenior}
-                                            onChange={(e) => {e.target.checked ? setIsMySenior(true) : null}}/>
-                                        <label for="my_senior" style={{marginRight: '3rem'}}>나의 대상자 보기</label>
-
-                                        <input type="radio" id="all_senior" name="senior" checked={!isMySenior}
-                                            onChange={(e) => {e.target.checked ? setIsMySenior(false) : null}}/>
-                                        <label for="all_senior" style={{marginRight: '0'}}>전체 대상자 보기</label>
-
-                                    </div>
-                                </div>
-                                :null}
                                 <ul className="tab-menu flex-end">
                                     {tab.map((item, idx) => { return (
                                     <li onClick={() => setTabIndex(idx)} className={idx == tabIndex ? 'active' : null}>
client/views/pages/main/Main_guardian.jsx
--- client/views/pages/main/Main_guardian.jsx
+++ client/views/pages/main/Main_guardian.jsx
@@ -95,10 +95,19 @@
     }
   ];
 
+  console.log("hello:", state);
+  if(state['seniorList'].length > 1) {
+    console.log('seniorList: ', state['seniorList'].length);
+  } else {
+    console.log('시니어가 한 명 뿐입니다.');
+  }
 
   return (
     <>
       <main className="pink">
+        {state['seniorList'].length > 1 ? ( <select name="" id="">
+            <option value="">시니어 목록</option>
+          </select> ) : ''}
         <div className="flex-start main-guardian"><img src={Senior} alt="" /><Title title={"김복남 어르신"} explanation={"방문, 복약, 온도, 배터리 현황을 확인하세요."} /></div>
         <div className="main-grid-guardian">
           <div className="combine-left combine-all-government battery-wrap ">
Add a comment
List