하석형 하석형 2023-02-27
Merge branch 'admin' of http://210.180.118.83/yjryu/senior_care_system into admin
@ffd7a861906b56145211ae3e22674be8fe0eb379
 
.vscode/launch.json (added)
+++ .vscode/launch.json
@@ -0,0 +1,16 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        
+        {
+            "type": "chrome",
+            "request": "launch",
+            "name": "Launch Chrome against localhost",
+            "url": "http://localhost:8080",
+            "webRoot": "${workspaceFolder}"
+        }
+    ]
+}(No newline at end of file)
client/resources/css/layout.css
--- client/resources/css/layout.css
+++ client/resources/css/layout.css
@@ -39,12 +39,12 @@
 }
 .nav{
   position: relative;
-  box-shadow: 1px 1px 5px 1px rgb(0 0 0 / 20%);}
+  background: #ffffff;
+}
 .logo {  
   padding: 2rem 1rem;
   font-size: large;
   text-align: center;
-  background: #ffffff;
   font-weight: bold;
 }
 .logo img{width: 273px;}
@@ -55,7 +55,7 @@
   color: #333333;
   font-weight: bold;
   margin: 0 3rem;
-  padding: 1rem 6.2rem;
+  padding: 1rem 3.2rem;
   
 }
 
@@ -64,17 +64,14 @@
   display: block;
 }
 .sidebar-title {
-  margin: 0 auto;
-  width: 150px;
-  padding: 1rem;
+  margin: 0 3rem;
+  padding: 1rem 3.2rem;
 }
 
 .sidebar-title span {
   font-weight: bold;
-  color: #333333;
-  
-  font-family:"KoPubDotumLight";
-  
+  color: #333333;  
+  font-family:"KoPubDotumLight";  
 }
 
 .sidebar-title .toggle {
@@ -86,14 +83,15 @@
 }
 nav li{cursor: pointer;}
 .sidebar-item{font-size: 1.8rem;}
-.sidebar-item:hover{background: #f25430; color: #ffffff;}
+.sidebar-item:hover{background: #f25430; color: #ffffff; width: 90%; border-top-right-radius: 50px; border-bottom-right-radius: 50px; }
 .sidebar-item:hover a{color: #ffffff;}
 .sidebar-item:hover span, .sidebar-item:hover .toggle{color: #ffffff;}
+.sidebar-item:hover span, .sidebar-item:hover .MuiSvgIcon-root{color: #ffffff;}
 .sidebar-content {
   display: none;
   color: #ffffff;
 }
-.sidebar-content a{padding: 1rem 0 1rem 6rem;}
+.sidebar-content a{padding: 1rem 0 1rem 5rem;}
 .sidebar-item.open>.sidebar-content {
   height: auto;
   display: block;
@@ -106,6 +104,8 @@
 
 .sidebar-content .sidebar-item:hover a {
   font-weight: bold;
+  background: #f1bdb1;
+  color: #ffffff;
 }
 .info-wrap .usericon{width: 5rem; height: 5rem; border: 1px solid #f25430; border-radius: 50px; margin-right: 2rem;}
 .header-info-id{font-size: 1.6rem; margin-right: 2rem; color: #733c1d; font-weight: 600;}
client/resources/css/main.css
--- client/resources/css/main.css
+++ client/resources/css/main.css
@@ -17,12 +17,15 @@
   background-color: #18924e;
 }
 
+/* 기관조회 */
 
 /* Q&A */
 .title{text-decoration: underline; cursor: pointer;}
 .question-select input{width: 3%;}
 .question-select label{width: 10%;}
-.question-select select{width: 16%;}
+.question-select select{width: 16%; height: 3.7rem;}
+.qna-insert select{height: 3.7rem;}
+.qna-insert th{font-size: 1.8rem; color: #733c1d;}
 /* 담당자배정 */
 .protectorlist input{width: 20rem;}
 /* 위험기준관리 */
@@ -39,7 +42,8 @@
 /* 카테고리 기관 추가*/
 .explain-table th{background: #ffffff;}
 .react-calendar{width: 100%;}
-.total p{font-size: 1.6rem;}
+.total p{font-size: 1.6rem; font-weight: 600;}
+.total{color: #733c1d; }
 .total-equip::before{
   content: "";
   border-left: 20px solid #5a70df;
@@ -542,11 +546,6 @@
   width: 100%;
   margin-bottom: 2rem;
 }
-
-.search-group .btn-box {
-  padding-bottom: 0.5rem;
-}
-
 .detail-search table {
   border-top: none;
   border-bottom: none;
@@ -560,7 +559,7 @@
 }
 
 .detail-search table th {
-  width: 14%;
+  width: 20%;
 }
 
 .detail-search table td {
@@ -569,6 +568,9 @@
 
 .detail-search tbody tr:nth-of-type(2) select {
   width: 24.4%;
+}
+.detail-search tbody select {
+  height: 3.7rem;
 }
 
 .detail-search tbody tr:nth-of-type(3) td {
@@ -597,7 +599,7 @@
 .search-area {
   padding: 2rem;
 }
-
+.search-area button{width: 100%;}
 .search-area details {
   margin-top: 1rem;
 }
@@ -689,8 +691,11 @@
 }
 
 .senior-insert label {
-  padding: 0 4rem 0 1rem;
-
+  padding: 0 0rem 0 1rem;
+  width: 5rem;
+}
+.senior-insert tr:nth-child(5) input{
+  width: 2rem;
 }
 .senior-insert select{padding: 1rem;}
 .senior-insert tr:nth-child(2) .gender {
@@ -931,7 +936,7 @@
 
 .search-management input {
   width: 20%;
-  height: 3rem;
+  height: 3.7rem;
   margin-right: 1rem;
 }
 .tab-container>div>div:nth-child(2) {
@@ -973,4 +978,11 @@
 
 .mobile{
   display: none;
+}
+
+/* -------------- 페이징 버튼 색상 적용 ----------------- */
+.PagingBtn{
+  background-color: #ff7f50;
+  color: #ffffff;
+
 }
(No newline at end of file)
client/resources/css/reset.css
--- client/resources/css/reset.css
+++ client/resources/css/reset.css
@@ -1,7 +1,7 @@
-@font-face {
+/* @font-face {
   font-family: "KoPubDotumLight";
   src: url(../files/font/KoPubDotumLight_0.ttf);
-}
+} */
 
 :root{
   --font-KoPubDotumLight:"KoPubDotumLight"
@@ -45,6 +45,7 @@
   width: 100%;
   border-collapse: collapse;
   font-family:"AuctionGothic_Medium";
+  border: 1px solid #d8d3c7;
 }
 thead{
   font-weight: bold;
 
client/resources/files/images/0percent.png (Binary) (added)
+++ client/resources/files/images/0percent.png
Binary file is not shown
 
client/resources/files/images/100percent.png (Binary) (added)
+++ client/resources/files/images/100percent.png
Binary file is not shown
 
client/resources/files/images/20percent.png (Binary) (added)
+++ client/resources/files/images/20percent.png
Binary file is not shown
 
client/resources/files/images/40percent.png (Binary) (added)
+++ client/resources/files/images/40percent.png
Binary file is not shown
 
client/resources/files/images/60percent.png (Binary) (added)
+++ client/resources/files/images/60percent.png
Binary file is not shown
 
client/resources/files/images/80percent.png (Binary) (added)
+++ client/resources/files/images/80percent.png
Binary file is not shown
 
client/resources/files/images/battery.png (Binary) (added)
+++ client/resources/files/images/battery.png
Binary file is not shown
 
client/resources/files/images/calendar.png (Binary) (added)
+++ client/resources/files/images/calendar.png
Binary file is not shown
 
client/resources/files/images/medicine.png (Binary) (added)
+++ client/resources/files/images/medicine.png
Binary file is not shown
 
client/resources/files/images/temperature.png (Binary) (added)
+++ client/resources/files/images/temperature.png
Binary file is not shown
client/views/component/AgencySearch.jsx
--- client/views/component/AgencySearch.jsx
+++ client/views/component/AgencySearch.jsx
@@ -190,8 +190,8 @@
 
   return (
     <div className="search-group">
-      <div className="search-area flex">
-        <div className="detail-search" style={{padding:"0 5rem", width:"100%"}}>
+      <div className="search-area flex" style={{ width:"50%"}}>
+        <div className="detail-search" style={{ width:"85%"}}>
           <table>
             <tbody>
               <tr>
@@ -212,8 +212,8 @@
             </tbody>
           </table>
         </div>
-        <div className="btn-box flex-center">
-              <Button className={"btn-large green-btn"} btnName={"조회"} />
+        <div className="btn-box flex-center"  style={{ width:"15%"}}>
+              <Button className={"btn-small gray-btn"} btnName={"조회"} />
             </div>
       </div>
     </div>
 
client/views/component/MatchingModal.jsx (added)
+++ client/views/component/MatchingModal.jsx
@@ -0,0 +1,93 @@
+import React from "react";
+import Button from "./Button.jsx";
+import SubTitle from "./SubTitle.jsx";
+import Table from "./Table.jsx";
+import Pagination from "./Pagination.jsx";
+
+export default function Modal({ children, open, close, header }) {
+
+  //-------- 페이징 작업 설정 시작 --------//
+  const limit = 10; // 페이지당 보여줄 공지 개수
+  const [page, setPage] = React.useState(1); //page index
+  const offset = (page - 1) * limit; //게시물 위치 계산
+  const [agencyTotal, setAgencyTotal] = React.useState(0); //최대길이 넣을 변수
+  //-------- 페이징 작업 설정 끝 --------//
+
+  const thead4 = [
+    "No",
+    "보호사 명",
+    "보호사 ID",
+    "보호사 연락처",
+    "매칭 일자",
+  ];
+  const key4 = [
+    "No",
+    "name",
+    "Id",
+    "phone",
+    "date",
+  ];
+  const content4 = [
+    {
+      No: 1,
+      name: "정복지",
+      Id: "worker5",
+      phone: "010-9876-5432",
+      date: "2023-01-10",
+    },
+    {
+      No: 2,
+      name: "문간호",
+      Id: "worker13",
+      phone: "010-1357-2468",
+      date: "2023-02-07",
+    },
+  ];
+
+  return (
+    <div class={open ? "openModal modal" : "modal"}>
+      {open ? (
+        <div className="modal-inner">
+          <div className="modal-header flex">
+            {header}
+            <Button className={"close"} onClick={close} btnName={"X"} />
+          </div>
+          <div className="modal-main">{children}
+            <div className="board-wrap">
+              <SubTitle explanation={"담당자 선택"} className="margin-bottom" />
+              <div className="flex-start protectorlist margin-bottom5">
+                <input type="text" list="protectorlist" />
+                <datalist id="protectorlist">
+                  <option value="보호사1(ID)"></option>
+                  <option value="보호사2(ID)"></option>
+                  <option value="보호사3(ID)"></option>
+                </datalist>
+                <div className="btn-wrap">
+                  <Button
+                    className={"btn-small green-btn"}
+                    btnName={"등록"}
+                  />
+                </div>
+              </div>
+            </div>
+            <div>
+              <Table
+                className={"caregiver-user"}
+                head={thead4}
+                contents={content4}
+                contentKey={key4}
+                view={"matching"}
+                offset={offset}
+                limit={limit}
+              />
+            </div>
+            <div>
+              <Pagination total={content4.length} limit={limit} page={page} setPage={setPage} />
+            </div>
+          </div>
+        </div>
+
+      ) : null}
+    </div>
+  );
+}
client/views/component/Pagination.jsx
--- client/views/component/Pagination.jsx
+++ client/views/component/Pagination.jsx
@@ -9,7 +9,7 @@
             <Paging>
                 <button onClick={() => setPage(page - 1)} disabled={page === 1}>&lt;</button>
                 {Array(numPages).fill().map((_, i) => (
-                    <button key={i + 1} onClick={() => setPage(i + 1)} aria-current={page === i + 1 ? "page" : null}> {i + 1} </button>
+                    <button key={i + 1} onClick={() => setPage(i + 1)} aria-current={page === i + 1 ? "page" : null} className={page === i + 1 ? "PagingBtn" : null}> {i + 1} </button>
                 ))}
                 <button onClick={() => setPage(page + 1)} disabled={page === numPages}>&gt;</button>
             </Paging>
@@ -23,4 +23,5 @@
   align-items: center;
   gap: 4px;
   margin: 16px;
-`;
(No newline at end of file)
+`;
+
client/views/component/Table.jsx
--- client/views/component/Table.jsx
+++ client/views/component/Table.jsx
@@ -1,8 +1,13 @@
 import React from "react";
 import Button from "./Button.jsx";
+import Modal from "./MatchingModal.jsx";
+import Modal2 from "./Modal.jsx";
+import SubTitle from "./SubTitle.jsx";
+
 // import styled from "styled-components";
 
-export default function Table({ head, contents, contentKey, onClick, className, view, offset, limit}) {
+export default function Table({ head, contents, contentKey, onClick, className, view, offset, limit }) {
+  const [userName, setUserName] = React.useState("");
   const [modalOpen, setModalOpen] = React.useState(false);
   const openModal = () => {
     setModalOpen(true);
@@ -12,24 +17,57 @@
   const openModal2 = () => {
     setModalOpen2(true);
   };
-  
 
+  const closeModal = () => {
+    setModalOpen(false);
+  };
+
+  const closeModal2 = () => {
+    setModalOpen2(false);
+  };
+
+  // 보호자 등록페이지 데이터
+  const thead3 = [
+    "No",
+    "이름",
+    "생년월일",
+    "연락처",
+    "대상자와의 관계",
+  ];
+  const key3 = [
+    "No",
+    "name",
+    "birth",
+    "phone",
+    "relationship",
+  ];
+  const content3 = [
+    {
+      No: 1,
+      name: "김훈",
+      birth: "1965.01.01",
+      relationship: "아들",
+      phone: "010-1234-1234",
+    },
+  ];
+
+  
   const buttonPrint = () => {
-    if(view == 'mySenior'){
-      return(
-      <td>
-        <Button
-          className={"btn-small gray-btn"}
-          btnName={"보기"}
-          onClick={openModal}
-        />
-      </td>)
+    if (view == 'mySenior') {
+      return (
+        <td>
+          <Button
+            className={"btn-small gray-btn"}
+            btnName={"보기"}
+            onClick={openModal}
+          />
+        </td>)
     }
-    else if(view == 'allSenior'){
-      return(
+    else if (view == 'allSenior') {
+      return (
         <>
           <td>
-          <Button
+            <Button
               className={"btn-small gray-btn"}
               btnName={"선택"}
               onClick={openModal2}
@@ -41,46 +79,99 @@
               btnName={"보기"}
               onClick={openModal}
             />
-            </td>
-          </>
+          </td>
+        </>
       )
     }
   }
-  
+
   return (
-    <table className={className}>
-      <thead>
-        <tr>
-          {head.map((i) => {
-            return <th>{i}</th>;
-          })}
-        </tr>
-      </thead>
-      <tbody>
-        {contents.slice(offset, offset + limit).map((i, index) => {
-          return (
-            <tr key={index}>
-            {/* //   <td>{i.rn}</td>
-            //   <td>{i.user_name}</td>
-            //   <td>{i.user_phonenumber}</td>
-            //   <td>{i.user_gender}</td>
-            //   <td>{i.user_birth}</td>
-            //   <td>{i.user_address}</td>
-            //   {buttonPrint()} */}
-            {contentKey.map((kes) => {
-                return (
-                  <>
-                  <td onClick={onClick}>{i[kes]}</td>
-                  </>
-                )
-            })}
-            {buttonPrint()}
+    <>
+      <Modal open={modalOpen2} close={closeModal2} header="담당자 배정" />
+      <Modal2 open={modalOpen} close={closeModal} header={userName+"님의 가족"}>
+        <div className="board-wrap">
+          <SubTitle explanation={"최초 ID는 연락처, PW는 생년월일 8자리입니다."} className="margin-bottom" />
+          <table className="margin-bottom2 senior-insert">
+            <tr>
+              <th>이름</th>
+              <td>
+                <input type="text" />
+              </td>
+              <th>생년월일</th>
+              <td>
+                <div className="flex">
+                  <select name="year" id="year">
+                    <option value="">년</option>
+                  </select>
+                  <select name="month" id="month">
+                    <option value="">월</option>
+                  </select>
+                  <select name="days" id="days">
+                    <option value="">일</option>
+                  </select>
+                </div>
+              </td>
             </tr>
-          );
-        })}
-      </tbody>
-    </table>
-    
+            <tr>
+              <th>연락처</th>
+              <td colSpan={3}>
+                <input type="input" maxLength="11" />
+              </td>
+            </tr>
+            <tr>
+              <th>대상자와의 관계</th>
+              <td colSpan={3}>
+                <input type="text" />
+              </td>
+            </tr>
+          </table>
+          <div className="btn-wrap flex-center margin-bottom5">
+            <Button
+              className={"btn-small green-btn"}
+              btnName={"추가"}
+              onClick={() => {
+                navigate("/SeniorInsert");
+              }}
+            />
+          </div>
+          <div>
+            <Table
+              className={"caregiver-user"}
+              head={thead3}
+              contents={content3}
+              contentKey={key3}
+            />
+          </div>
+        </div>
+      </Modal2>
+      <table className={className}>
+        <thead>
+          <tr>
+            {head.map((i) => {
+              return <th>{i}</th>;
+            })}
+          </tr>
+        </thead>
+        <tbody>
+          {contents.slice(offset, offset + limit).map((i, index) => {
+            const name = i.user_name;
+            return (
+              <tr key={index}>
+                {contentKey.map((kes) => {
+                  return (
+                    <>
+                      <td onClick={onClick}>{i[kes]}</td>
+                      {console.log("userName : ", userName)}
+                    </>
+                  )
+                })}
+                {buttonPrint()}
+              </tr>
+            );
+          })}
+        </tbody>
+      </table>
+    </>
   );
 }
 
client/views/pages/App.jsx
--- client/views/pages/App.jsx
+++ client/views/pages/App.jsx
@@ -26,8 +26,8 @@
   };
 
 
-  const menuItems = GovernmentApp.menuItems;  //AdminApp, GovernmentApp, AllApp, AgencyApp, GuardianApp 
-  const AppRoute = GovernmentApp.AppRoute;
+  const menuItems = GuardianApp.menuItems;  //AdminApp, GovernmentApp, AllApp, AgencyApp, GuardianApp 
+  const AppRoute = GuardianApp.AppRoute;
 
 
   const { title } = menuItems.find(
client/views/pages/AppRoute.jsx
--- client/views/pages/AppRoute.jsx
+++ client/views/pages/AppRoute.jsx
@@ -622,8 +622,11 @@
 function AgencyAppRoute() {
   return (
     <Routes>
+      <Route path="/Medicalcare" element={<Medicalcare />}></Route>
+      <Route path="/Healthcare" element={<Healthcare />}></Route>
       <Route path="/Join" element={<Join />}></Route>
       <Route path="/QuestionSelect" element={<QuestionSelect />}></Route>
+      <Route path="/QuestionInsert" element={<QuestionInsert />}></Route>
       <Route path="/Main_agency" element={<Main_agency />}></Route>
       <Route path="/UserAuthoriySelect_agency" element={<UserAuthoriySelect_agency />}></Route>
       <Route path="/SeniorInsert" element={<SeniorInsert />}></Route>
client/views/pages/callcenter/QandAInsert.jsx
--- client/views/pages/callcenter/QandAInsert.jsx
+++ client/views/pages/callcenter/QandAInsert.jsx
@@ -11,7 +11,7 @@
       <div className="content-wrap row">
         <ContentTitle contentTitle={"문의글 작성"} />
         <SubTitle explanation={"작성자 정보"} />
-        <table className="margin-bottom2 senior-insert">
+        <table className="margin-bottom2 qna-insert">
           <tr>
             <th>작성자</th>
             <td>
@@ -51,7 +51,7 @@
             </tr>
         </table>
         <SubTitle explanation={"대상자 정보"} />
-        <table className="margin-bottom2 senior-insert">
+        <table className="margin-bottom2 qna-insert">
           <tr>
             <th>대상자 선택</th>
             <td colSpan={3} className="flex width">
@@ -102,7 +102,7 @@
             }}
           />
           <Button
-            className={"btn-large green-btn"}
+            className={"btn-large red-btn"}
             btnName={"등록"}
             onClick={() => {
               navigate("/QandASelect");
client/views/pages/callcenter/QuestionInsert.jsx
--- client/views/pages/callcenter/QuestionInsert.jsx
+++ client/views/pages/callcenter/QuestionInsert.jsx
@@ -4,14 +4,14 @@
 import SubTitle from "../../component/SubTitle.jsx";
 import { useNavigate } from "react-router";
 
-export default function QandAInsert() {
+export default function QuestionInsert() {
   const navigate = useNavigate();
   return (
     <main>
       <div className="content-wrap row">
         <ContentTitle contentTitle={"문의글 작성"} />
         <SubTitle explanation={"작성자 정보"} />
-        <table className="margin-bottom2 senior-insert">
+        <table className="margin-bottom2 qna-insert">
           <tr>
             <th>작성자</th>
             <td>
client/views/pages/callcenter/QuestionSelect.jsx
--- client/views/pages/callcenter/QuestionSelect.jsx
+++ client/views/pages/callcenter/QuestionSelect.jsx
@@ -51,7 +51,7 @@
             <option value="답변완료">답변완료</option>
           </select>
           <Button
-            className={"btn-small green-btn"}
+            className={"btn-small gray-btn"}
             btnName={"작성하기"}
             onClick={() => {
               navigate("/QuestionInsert");
client/views/pages/equipment/EquipmentManagementSelect.jsx
--- client/views/pages/equipment/EquipmentManagementSelect.jsx
+++ client/views/pages/equipment/EquipmentManagementSelect.jsx
@@ -753,7 +753,7 @@
 						<SubTitle explanation={"장비 클릭 시 지난 매칭이력을 확인할 수 있습니다."} />
 						<div className="btn-wrap flex-end margin-bottom ">
 							<Button
-								className={"btn-small green-btn"}
+								className={"btn-small gray-btn"}
 								btnName={"등록"}
 								onClick={openModal3}
 							/>
@@ -789,12 +789,12 @@
 												{
 													item['senior_id'] == null
 														? <Button
-															className={"btn-small green-btn"}
+															className={"btn-small gray-btn"}
 															btnName={"등록"}
 															onClick={() => seniorMatchInsertModalOpen(item)}
 														/>
 														: <Button
-															className={"btn-small green-btn"}
+															className={"btn-small gray-btn"}
 															btnName={"반납"}
 															onClick={seniorMatchDelete}
 														/>
@@ -846,7 +846,7 @@
 						<SubTitle explanation={"장비 클릭 시 지난 매칭이력을 확인할 수 있습니다."} />
 						<div className="btn-wrap flex-end margin-bottom ">
 							<Button
-								className={"btn-small green-btn"}
+								className={"btn-small gray-btn"}
 								btnName={"LOG"}
 								onClick={logCheck}
 							/>
@@ -891,12 +891,12 @@
 											{
 												item['equipment_rental_state'] == 'RENTABLE'
 													? <Button
-														className={"btn-small green-btn"}
+														className={"btn-small gray-btn"}
 														btnName={"등록"}
 														onClick={() => seniorMatchInsertModalOpen(item)}
 													/>
 													: <Button
-														className={"btn-small green-btn"}
+														className={"btn-small gray-btn"}
 														btnName={"반납"}
 														onClick={() => seniorMatchReturnModalOpen(item)}
 													/>
@@ -938,7 +938,7 @@
 											<td>
 												{
 													<Button
-														className={"btn-small green-btn"}
+														className={"btn-small gray-btn"}
 														btnName={"반납"}
 														onClick={() => seniorMatchReturnModalOpen(item)}
 													/>
@@ -982,7 +982,7 @@
 											<td>
 												{
 													<Button
-														className={"btn-small green-btn"}
+														className={"btn-small gray-btn"}
 														btnName={"등록"}
 														onClick={() => seniorMatchInsertModalOpen(item)}
 													/>
@@ -1017,7 +1017,7 @@
 					</div>
 					<div>
 						<Button
-							className={"btn-100 green-btn"}
+							className={"btn-100 gray-btn"}
 							btnName={"닫기"}
 							onClick={closeModal}
 						/>
@@ -1051,9 +1051,9 @@
 							</tbody>
 						</table>
 					</div>
-					<div>
+					<div className="flex-center">
 						<Button
-							className={"btn-100 green-btn"}
+							className={"btn-small gray-btn"}
 							btnName={"저장"}
 							onClick={closeModal3}
 						/>
@@ -1103,7 +1103,7 @@
 					</div>
 					<div>
 						<Button
-							className={"btn-100 green-btn"}
+							className={"btn-100 gray-btn"}
 							btnName={"닫기"}
 							onClick={seniorMatchInsertModalClose}
 						/>
@@ -1148,7 +1148,7 @@
 					</div>
 					<div>
 						<Button
-							className={"btn-100 green-btn"}
+							className={"btn-100 gray-btn"}
 							btnName={"닫기"}
 							onClick={seniorMatchInsertModalClose}
 						/>
@@ -1185,7 +1185,7 @@
 					</div>
 					<div>
 						<Button
-							className={"btn-100 green-btn"}
+							className={"btn-100 gray-btn"}
 							btnName={"닫기"}
 							onClick={seniorMatchInsertModalClose}
 						/>
client/views/pages/main/Main_guardian.jsx
--- client/views/pages/main/Main_guardian.jsx
+++ client/views/pages/main/Main_guardian.jsx
@@ -65,6 +65,7 @@
   return (
     <>
       <main>
+        <div><Title title={"김복남 어르신"} explanation={"방문, 복약, 온도, 배터리 현황을 확인하세요."} /></div>
         <div className="main-grid-guardian">
           <ul className="content-box statistics-guardian">
             <li className="flex-start">
@@ -134,7 +135,7 @@
             </li>
           </ul>
           <div className="content-box combine-left combine-all-government">
-            <Title title={"김복남 어르신"} explanation={"방문, 복약, 온도, 배터리 현황을 확인하세요."} />
+            
 
           </div>
         </div>
client/views/pages/setting/AuthorityManagement.jsx
--- client/views/pages/setting/AuthorityManagement.jsx
+++ client/views/pages/setting/AuthorityManagement.jsx
@@ -176,7 +176,7 @@
             </tbody>
             </table>
             <div className="btn-wrap flex-end">
-              <Button className={"btn-small green-btn"} btnName={"저장"} />
+              <Button className={"btn-small gray-btn"} btnName={"저장"} />
             </div>
             <SubTitle className="margin-bottom" explanation={"각 메뉴에 대한 설명"} />
             <table className="explain-table">
client/views/pages/setting/RiskSet.jsx
--- client/views/pages/setting/RiskSet.jsx
+++ client/views/pages/setting/RiskSet.jsx
@@ -139,7 +139,7 @@
                 />          
           <div className="btn-wrap flex-end margin-bottom ">
             <Button
-              className={"btn-small green-btn"}
+              className={"btn-small gray-btn"}
               btnName={"저장"}
             />
           </div>
client/views/pages/user_management/AgencySelect.jsx
--- client/views/pages/user_management/AgencySelect.jsx
+++ client/views/pages/user_management/AgencySelect.jsx
@@ -144,7 +144,7 @@
               </div>
               <div className="btn-wrap flex-end margin-bottom ">
                 <Button
-                  className={"btn-small green-btn"}
+                  className={"btn-small gray-btn"}
                   btnName={"등록"}
                   onClick={openModal}
                 />
client/views/pages/user_management/UserAuthoriySelect_agency.jsx
--- client/views/pages/user_management/UserAuthoriySelect_agency.jsx
+++ client/views/pages/user_management/UserAuthoriySelect_agency.jsx
@@ -7,17 +7,21 @@
 import Pagination from "../../component/Pagination.jsx";
 
 export default function UserAuthoriySelect_agency() {
-  // 화면 진입 시 탭 별 노출될ㄹ 리스트 초기화 
-  const [subjectList, setSubjectList] = React.useState([]);
-  const [subjectMyList, setSubjectMyList] = React.useState([]);
-  
+  // 화면 진입 시 탭 별 노출될 리스트 초기화 
+  const [seniortList, setSeniorList] = React.useState([]);
+  const [seniorMyList, setSeniorMyList] = React.useState([]);
 
-  //페이징 작업
-  const limit = 10; // 페이지당 보여줄 공지 개수
+  //category 설정 초기화
+  const [selectUserCode, setSelectUserCode] = React.useState("전체");
+  const [selectUserData, setSelectUserData] = React.useState("이름");
+  
+  //-------- 페이징 작업 설정 시작 --------//
+  const limit = 15; // 페이지당 보여줄 공지 개수
   const [page, setPage] = React.useState(1); //page index
   const offset = (page - 1) * limit; //게시물 위치 계산
   const [myUserTotal, setMyUserTotal] = React.useState(0); //최대길이 넣을 변수
   const [userTotal, setUserTotal] = React.useState(0); //최대길이 넣을 변수
+  //-------- 페이징 작업 설정 끝 --------//
 
   // ------ 등록 버튼 클릭 시 노출되는 모달 데이터 ------//
 
@@ -46,7 +50,7 @@
     setMedication("");
     setNote("");
   }
-  // 변경되는 데이터 Handler
+  //-------- 변경되는 데이터 Handler 설정 --------//
   const handleUserName = (e) => {
     setUserName(e.target.value);
   };
@@ -78,8 +82,16 @@
   const handleNote = (e) => {
     setNote(e.target.value);
   };
-
-  // 대상자 등록 함수 
+  const handleSelectUserCode = (e) => {
+    console.log("e.target.value : ", e.target.value)
+    setSelectUserCode(e.target.value);
+  };
+  const handleSelectUserData = (e) => {
+    console.log("e.target.value : ", e.target.value)
+    setSelectUserData(e.target.value);
+  };
+  //-------- 등록 버튼 동작 수행 영역 시작 --------//
+  // 등록 버튼 클릭 시 수행 함수
   const InsertSenior = () => {
     var insertBtn = confirm("등록하시겠습니까?");
     if (insertBtn) {
@@ -87,8 +99,8 @@
       alert("등록 되었습니다.");
       dataReset();
       closeModal3();
-      getSelectSubjectList();
-      getSelectMySubjectList();
+      getSelectSeniorList();
+      getSelectMySeniorList();
     } else {
       return;
     }
@@ -107,15 +119,15 @@
         user_birth: brith,
         user_phonenumber: telNum,
         user_address: homeAddress,
-        agency_id: 'agency1',
-        government_id: 'government1',
-        user_code: '4'
+        agency_id: 'agency01',
+        government_id: 'government01',
+        user_code: '4',
       }),
     }).then((response) => response.json()).then((data) => {
       console.log("대상자 정보 등록");
       InsertUserPillData();
     }).catch((error) => {
-      console.log('insertSeniorData() /Notice/insertSeniorData.json error : ', error);
+      console.log('insertSeniorData() /user/insertSeniorData.json error : ', error);
     });
   };
   // 대상자 약 복용 정보 등록을 위한 함수 
@@ -139,40 +151,42 @@
       console.log('InsertUserPillData() /user/insertSeniorMadication.json error : ', error);
     });
   };
+  //-------- 등록 버튼 동작 수행 영역 끝 --------//
  //select 
-  const getSelectSubjectList = () => {
+  const getSelectSeniorList = () => {
     fetch("/user/selectUserList.json", {
       method: "POST",
       headers: {
         'Content-Type': 'application/json; charset=UTF-8'
       },
       body: JSON.stringify({
+        agency_id: 'agency01',
         user_code: '4',
       }),
     }).then((response) => response.json()).then((data) => {
       const rowData = data;
       console.log(data);
-      setSubjectList(rowData)
+      setSeniorList(rowData)
       setUserTotal(rowData.length)
     }).catch((error) => {
-      console.log('getSelectSubjectList() /user/selectUserList.json error : ', error);
+      console.log('getSelectSeniorList() /user/selectUserList.json error : ', error);
     });
   };
 
-  const getSelectMySubjectList = () => {
+  const getSelectMySeniorList = () => {
     fetch("/user/selectMyUserList.json", {
       method: "POST",
       headers: {
         'Content-Type': 'application/json; charset=UTF-8'
       },
       body: JSON.stringify({
-        agency_id: 'agency1',
+        agency_id: 'agency01',
         user_code: '4',
       }),
     }).then((response) => response.json()).then((data) => {
       const rowData = data;
       console.log(data);
-      setSubjectMyList(rowData)
+      setSeniorMyList(rowData)
       setMyUserTotal(rowData.length)
     }).catch((error) => {
       console.log('getSubjectMySelect() /user/selectMyUserList.json error : ', error);
@@ -387,7 +401,7 @@
         <Table
           className={"protector-user"}
           head={thead1}
-          contents={subjectMyList}
+          contents={seniorMyList}
           contentKey={key1}
           view={"mySenior"}
           offset={offset}
@@ -402,7 +416,7 @@
         <Table
           className={"caregiver-user"}
           head={thead2}
-          contents={subjectList}
+          contents={seniortList}
           contentKey={key2}
           view={"allSenior"}
           offset={offset}
@@ -416,95 +430,12 @@
 
   
   React.useEffect(() => {
-    getSelectSubjectList();
-    getSelectMySubjectList();
+    getSelectSeniorList();
+    getSelectMySeniorList();
 
   }, [])
   return (
     <main>
-      <Modal open={modalOpen} close={closeModal} header="김복남'님의 가족">
-        <div className="board-wrap">
-          <SubTitle explanation={"최초 ID는 연락처, PW는 생년월일 8자리입니다."} className="margin-bottom" />
-          <table className="margin-bottom2 senior-insert">
-            <tr>
-              <th>이름</th>
-              <td>
-                <input type="text" />
-              </td>
-              <th>생년월일</th>
-              <td>
-                <div className="flex">
-                  <select name="year" id="year">
-                    <option value="">년</option>
-                  </select>
-                  <select name="month" id="month">
-                    <option value="">월</option>
-                  </select>
-                  <select name="days" id="days">
-                    <option value="">일</option>
-                  </select>
-                </div>
-              </td>
-            </tr>
-            <tr>
-              <th>연락처</th>
-              <td colSpan={3}>
-                <input type="input" maxLength="11" />
-              </td>
-            </tr>
-            <tr>
-              <th>대상자와의 관계</th>
-              <td colSpan={3}>
-                <input type="text" />
-              </td>
-            </tr>
-          </table>
-          <div className="btn-wrap flex-center margin-bottom5">
-            <Button
-              className={"btn-small green-btn"}
-              btnName={"추가"}
-              onClick={() => {
-                navigate("/SeniorInsert");
-              }}
-            />
-          </div>
-          <div>
-            <Table
-              className={"caregiver-user"}
-              head={thead3}
-              contents={content3}
-              contentKey={key3}
-            />
-          </div>
-        </div>
-      </Modal>
-      <Modal open={modalOpen2} close={closeModal2} header="담당자 배정">
-        <div className="board-wrap">
-          <SubTitle explanation={"담당자 선택"} className="margin-bottom" />
-          <div className="flex-start protectorlist margin-bottom5">
-            <input type="text" list="protectorlist" />
-            <datalist id="protectorlist">
-              <option value="보호사1(ID)"></option>
-              <option value="보호사2(ID)"></option>
-              <option value="보호사3(ID)"></option>
-            </datalist>
-            <div className="btn-wrap">
-              <Button
-                className={"btn-small green-btn"}
-                btnName={"등록"}
-              />
-            </div>
-          </div>
-          <div>
-            <Table
-              className={"caregiver-user"}
-              head={thead4}
-              contents={content4}
-              contentKey={key4}
-            />
-          </div>
-        </div>
-      </Modal>
       <Modal open={modalOpen3} close={closeModal3} header="대상자 등록">
         <div className="board-wrap">
           <SubTitle explanation={"회원 등록 시 ID는 연락처, 패스워드는 생년월일 8자리입니다."} className="margin-bottom" />
@@ -609,7 +540,7 @@
             <li
               key={item.id}
               className={index === item.id ? "active" : null}
-              onClick={() => setIndex(item.id)}
+              onClick={() => {setIndex(item.id); setPage(1)}}
             >
               {item.title}
             </li>
@@ -617,16 +548,16 @@
         </ul>
         <div className="content-wrap">
           <div className="search-management flex-start margin-bottom2">
-            <select name="management-agency">
+            <select name="management-agency" onChange={handleSelectUserCode} value={selectUserCode}>
               <option value="기관전체">전체</option>
-              <option value="군위군청">대상자</option>
-              <option value="대구보훈병원">복지사</option>
-              <option value="대구보훈병원">보호자</option>
+              <option value="대상자">대상자</option>
+              <option value="담당자">담당자</option>
+              <option value="보호자">보호자</option>
             </select>
-            <select>
+            <select onChange={handleSelectUserData} value={selectUserData}>
               <option value="이름">이름</option>
               <option value="아이디">아이디</option>
-              <option value="아이디">등록번호</option>
+              <option value="등록번호">등록번호</option>
             </select>
             <input type="text" />
             <Button
@@ -645,7 +576,7 @@
               ))}
           </ul>
           <div>
-            <Pagination total={data.id == 1 ? myUserTotal:userTotal} limit={limit} page={page} setPage={setPage} />
+            <Pagination total={index === 1 ? myUserTotal:userTotal} limit={limit} page={page} setPage={setPage} />
           </div>
         </div>
       </div>
Add a comment
List