최정임 최정임 2023-02-09
230209 최정임 메뉴 수정
@5e203ffb36d2db3e18ced906613d6d538aaf71f8
client/resources/css/main.css
--- client/resources/css/main.css
+++ client/resources/css/main.css
@@ -16,13 +16,141 @@
 .join-btn{
   background-color: transparent;
 }
-/* 카테고리 */
-.category{font-size: 1.6rem;}
-.category-btn{padding: 0; border-radius: 0;}
-.category ul{list-style: disc;}
-.category > ul >li{list-style: circle; }
-.category > ul > li > ul > li{list-style: circle; border: 1px solid red; }
+.react-calendar{width: 90%; }
+.highlight{
+  font-weight: 900;
+  background-color: #18924e;
+}
+/* 카테고리 기관 추가*/
+/* hierarchy menu */
+.hierarchy-menu {
+  background-color: #f8f8f8;
+  color: #333333;
+  overflow-y: auto;
+}
+.hierarchy-menu a { 
+  color: #333333;
+  text-decoration: none;
+}
 
+.category a span{
+  font-size: 1.6rem;
+  padding-left: 20px;
+}
+
+/* List */
+.hierarchy-menu ul {
+  list-style: none;
+  margin: 0;
+  padding: 10px 0 0 0;
+  position: relative;
+}
+.hierarchy-menu ul ul:before {
+  content: '';
+  position: absolute;
+  top: 0;
+  bottom: 27px;
+  left: 6px;
+  border-left: 1px dashed #373E4B;
+}
+.hierarchy-menu > ul {
+  padding: 15px 0 10px 25px;
+}
+.hierarchy-menu > ul ul {
+  padding-left: 16px;
+}
+
+/* List items */
+.hierarchy-menu ul li {
+  display: block;
+  position: relative;
+}
+.hierarchy-menu > ul ul li:before {
+  content: '';
+  display: block;
+  height: 0px;
+  width: 50px;
+  border-bottom: 1px solid #7A7F87;
+  position: absolute;
+  left: -10px;
+  top: 16px;
+}
+.hierarchy-menu > ul ul li:after {
+  content: '';
+  display: block;
+  height: 43px;
+  width: 0;
+  border-left: 1px solid #7A7F87;
+  position: absolute;
+  left: -10px;
+  top: -27px;
+}
+.hierarchy-menu > ul ul li.group-lvl:before {
+  width: 50px;
+}
+.hierarchy-menu > ul ul li:first-child:after { 
+  height: 28px;
+  top: -12px;
+}
+
+/* Links */
+.category ul .max-agency{
+  margin-left: 0px;
+  width: 50%;
+}
+.category ul .top-agency{
+  margin-left: 49px;
+  width: 50%;
+}
+.category .low-agency{
+  margin-left: 87px;
+}
+.category .low-agency span{
+  padding-left: 49px;
+}
+.hierarchy-menu ul a {
+  display: block;
+  padding: 6px 0;
+  height: 44px;
+  position: relative;
+  color: #333333;
+  transition: 100ms;
+}
+.hierarchy-menu ul a:hover {
+  color: #7e9d9c;
+}
+.hierarchy-menu ul a.active {
+  color: #333333;
+  font-weight: bold;
+}
+
+.category li.sub-nav > a:before {
+  position: absolute;
+  left: 0px;
+  top: 14px;
+  content: '';
+  width: 5px;
+  height: 5px;
+  border-bottom: 1px solid #333333;
+  border-right: 1px solid #333333;
+  -ms-transform: rotate(-45deg);
+  -webkit-transform: rotate(-45deg);
+  transform: rotate(-45deg);
+}
+.hierarchy-menu li.sub-nav.open > a:before {
+  -ms-transform: rotate(45deg);
+  -webkit-transform: rotate(45deg);
+  transform: rotate(45deg);
+}
+.hierarchy-menu li.sub-nav.open > a {
+  color: #333333;
+}
+.hierarchy-menu li.sub-nav > ul {
+  display: block;
+}
+.hierarchy-menu li.sub-nav.open > ul {
+  display: block;
+}
 
 
 /* -----------------------------------------------지자체 */
 
client/views/component/Calendar.jsx (added)
+++ client/views/component/Calendar.jsx
@@ -0,0 +1,34 @@
+import React, { useState } from "react";
+import Calendar from "react-calendar";
+import "react-calendar/dist/Calendar.css";
+import moment from "moment";
+
+export default function CalendarComponent(props) {
+  const [value, setValue] = useState(new Date());
+  const mark = ["12-02-2023", "21-02-2023", "05-02-2023", "02-02-2023"];
+  return (
+    <div className="w-full h-full p-10">
+      <Calendar
+        className="w-96 h-full rounded-xl bg-violet-300"
+        onChange={setValue}
+        value={value}
+        tileClassName={({ date, view }) => {
+          // if (mark.find((x) => x === moment(date).format("DD-MM-YYYY"))) {
+          //   return "highlight";
+          // }
+          let day = date.getDate()
+          let month = date.getMonth()+1
+          if(date.getMonth()<10){
+            month = '0'+day
+          }
+          const realDate =day+'-'+month+'-'+date.getFullYear()
+          if(mark.find(val=> val === realDate)){
+            return 'highlight'
+          }
+
+        }}
+      />
+    </div>
+  );
+}
+
client/views/layout/Menu.jsx
--- client/views/layout/Menu.jsx
+++ client/views/layout/Menu.jsx
@@ -8,6 +8,7 @@
 import SpeakerPhoneIcon from "@mui/icons-material/SpeakerPhone";
 import SettingsIcon from "@mui/icons-material/Settings";
 import CallIcon from '@mui/icons-material/Call';
+import ConstructionIcon from '@mui/icons-material/Construction';
 
 export const items = [
   {
@@ -25,7 +26,7 @@
   {
     title: "장비 관리",    
     icon: (
-      <SpeakerPhoneIcon
+      <SettingsIcon
         sx={{ fontSize: 20, color: "#ffffff", marginRight: 1 }}
       />
     ),
@@ -46,7 +47,7 @@
   },    
   {
     title: "문의게시판",
-    path: "/EquipmentManagementSelectReturn",
+    path: "/QandA",
     icon: (
       <SpeakerPhoneIcon
         sx={{ fontSize: 20, color: "#ffffff", marginRight: 1 }}
client/views/pages/App.jsx
--- client/views/pages/App.jsx
+++ client/views/pages/App.jsx
@@ -22,7 +22,7 @@
 
   const getLogin = () => {
     setIsLogin(true);
-    navigate("");
+    navigate("/Main");
   };
 
   const { title } = items.find(
client/views/pages/AppRoute.jsx
--- client/views/pages/AppRoute.jsx
+++ client/views/pages/AppRoute.jsx
@@ -33,6 +33,7 @@
 import EquipmentManagementSelectAdd from "./equipment/EquipmentManagementSelectAdd.jsx";
 import RiskInsert from "./authority/RiskInsert.jsx";
 import AuthorityManagement from "./authority/AuthorityManagement.jsx";
+import QandA from "./authority/QandA.jsx";
 
 function AppRoute() {
   return (
@@ -90,6 +91,7 @@
       <Route path="/EquipmentManagementSelectAdd" element={<EquipmentManagementSelectAdd />}></Route>
       <Route path="/RiskInsert" element={<RiskInsert />}></Route>
       <Route path="/AuthorityManagement" element={<AuthorityManagement />}></Route>
+      <Route path="/QandA" element={<QandA />}></Route>
     </Routes>
   );
 }
 
client/views/pages/authority/QandA.jsx (added)
+++ client/views/pages/authority/QandA.jsx
@@ -0,0 +1,58 @@
+import React from "react";
+import Button from "../../component/Button.jsx";
+import Table from "../../component/Table.jsx";
+import Modal from "../../component/Modal.jsx";
+import { useNavigate } from "react-router";
+import ContentTitle from "../../component/ContentTitle.jsx";
+
+export default function QandA() {
+  const navigate = useNavigate();
+  //게시판
+  const thead = [
+    "No",
+    "제목",
+    "작성자",
+    "작성일자",
+    "상태",
+  ];
+  const key = [
+    "No",
+    "title",
+    "name",
+    "date",
+    "work",
+  ];
+  const content = [
+    {
+      No: 1,
+      title: (
+        <p style={{textDecoration:"underline"}}>질문입니다.</p>
+      ),
+      name: "홍**",
+      date: "2022-08-01",
+      work: "답변완료"
+    },
+    {
+      No: 2,
+      title: (
+        <p style={{textDecoration:"underline"}}>질문입니다.</p>
+      ),
+      name: "홍**",
+      date: "2022-08-01",
+      work:  (
+        <p style={{color:"red"}}>처리전</p>
+      ),
+    },
+   
+  ];
+  return (
+    <main>
+      <div className="content-wrap">
+      <ContentTitle contentTitle={"Q&A"} />
+        <div className="board-wrap">
+          <Table className="equipment-detail" head={thead} contents={content} contentKey={key} />
+        </div>
+      </div>
+    </main>
+  );
+}
client/views/pages/authority/UserAuthoriySelect.jsx
--- client/views/pages/authority/UserAuthoriySelect.jsx
+++ client/views/pages/authority/UserAuthoriySelect.jsx
@@ -19,7 +19,7 @@
   className ??= 'group-lvl';
   className = `${className} sub-nav ${open}`; //[className, 'sub-nav', open].join(' ')
   return <li className={className}>
-    <a href={href ?? '#'} onClick={() => setOpend(open ? '' : 'open')}>
+    <a href={href ?? '#'} onClick={() => setOpend(open ? '' : 'open')} className="max-agency">
       <span>{title}</span><button>추가</button>
     </a>
     {open && <ul id="venue-scope-options">
@@ -29,6 +29,7 @@
 }
 
 export default function UserAuthoriySelect() {
+
   const [modalOpen, setModalOpen] = React.useState(false);
   const openModal = () => {
     setModalOpen(true);
@@ -195,14 +196,14 @@
                 explanation={"시스템 로그인의 사용자를 관리합니다."}
                 className="margin-bottom"
               />
-              <div class="hierarchy-menu">
+              <div class="hierarchy-menu category">
                 <ul>
                   <Menu className="customer-lvl" href="#" title="올잇메디">
                     <li class="group-lvl sub-nav open">
-                      <a href="#">
+                      <a href="#" className="top-agency">
                         <span>지자체</span><button>추가</button>
                       </a>
-                      <ul id="venue-scope-options">
+                      <ul id="venue-scope-options" className="low-agency">
                         <Menu href="#" title="보호기관1" />
                         <Menu href="#" title="보호기관2" />
                         <Menu href="#" title="보호기관3" />
@@ -210,10 +211,10 @@
                       </ul>
                     </li>
                     <li class="group-lvl sub-nav open">
-                      <a href="#" class="active">
+                      <a href="#" class="active top-agency">
                         <span>관리 병원</span><button>추가</button>
                       </a>
-                      <ul>
+                      <ul className="low-agency">
                         <Menu href="#" title="병원1" />
                         <Menu href="#" title="병원2" />
                         <Menu href="#" title="병원3" />
@@ -221,7 +222,7 @@
 
                     </li>
                     <li class="venue-lvl ">
-                      <a href="#">
+                      <a href="#" className="top-agency">
                         <span>관리자</span>
                       </a>
                     </li>
client/views/pages/equipment/EquipmentManagementSelect.jsx
--- client/views/pages/equipment/EquipmentManagementSelect.jsx
+++ client/views/pages/equipment/EquipmentManagementSelect.jsx
@@ -8,6 +8,7 @@
 
 
 export default function EquipmentManagementSelect() {
+  
   const [modalOpen, setModalOpen] = React.useState(false);
   const openModal = () => {
     setModalOpen(true);
@@ -54,7 +55,6 @@
     "장비명",
     "시리얼 넘버",
     "입고일자",
-    "사용여부",
     "납품 기관",
   ];
   const key3= [
@@ -62,7 +62,6 @@
     "equipment_name",
     "serialNumber",
     "name",
-    "use",
     "management",];
   const content3 = [
     {
@@ -70,7 +69,6 @@
       equipment_name: "스마트약상자",
       serialNumber: "ABCD-1",
       name: "2022.12.02",
-      use: "사용",
       management: (
         <Button
           className={"btn-small gray-btn"}
@@ -84,7 +82,6 @@
       equipment_name: "스마트약상자",
       serialNumber: "ABCD-1",
       name: "2022.12.02",
-      use: "미사용",
       management: (<Button
       className={"btn-small gray-btn"}
       btnName={"선택"}
client/views/pages/equipment/EquipmentManagementSelectAdd.jsx
--- client/views/pages/equipment/EquipmentManagementSelectAdd.jsx
+++ client/views/pages/equipment/EquipmentManagementSelectAdd.jsx
@@ -6,6 +6,13 @@
 import ContentTitle from "../../component/ContentTitle.jsx";
 
 export default function EquipmentManagementSelectAdd() {
+  const [modalOpen, setModalOpen] = React.useState(false);
+  const openModal = () => {
+    setModalOpen(true);
+  };
+  const closeModal = () => {
+    setModalOpen(false);
+  };
   const navigate = useNavigate();
   //게시판
   const thead = [
@@ -13,6 +20,7 @@
     "기관명",
     "요청일자",
     "요청수량",
+    "사용자(사용등록번호)",
     "처리여부",
   ];
   const key = [
@@ -20,6 +28,7 @@
     "name",
     "date",
     "period_of_use",
+    "address",
     "visit",
   ];
   const content = [
@@ -27,14 +36,14 @@
       No: 1,
       name: "A복지관",
       date: "2023-01-27",
-      period_of_use: "1대",
+      period_of_use: "2대",
+      address: "김복남(2022020901) / 김삼남(2022020801)",
       visit:(
         <div className="btn-wrap">
               <Button
                 className={"btn-small green-btn"}
                 btnName={"승인"}
               />
-              <Button className={"btn-small green-btn"} btnName={"보류"} />
             </div>
       ),
     },
@@ -42,20 +51,21 @@
       No: 2,
       name: "B복지관",
       date: "2023-01-27",
-      period_of_use: "2대",
+      period_of_use: "1대",
+      address: "김사남(2023020102)",
       visit:(
         <div className="btn-wrap">
               <Button
                 className={"btn-small green-btn"}
                 btnName={"승인"}
               />
-              <Button className={"btn-small green-btn"} btnName={"보류"} />
             </div>
       ),
     },
   ];
   return (
     <main>
+      
       <div className="content-wrap">
       <ContentTitle contentTitle={"장비 추가 요청"} />
          <div className="board-wrap">
client/views/pages/main/Main2.jsx
--- client/views/pages/main/Main2.jsx
+++ client/views/pages/main/Main2.jsx
@@ -4,6 +4,7 @@
 import Map from "../../component/chart/Map.jsx";
 import Chart1 from "../../component/chart/Chart1.jsx";
 import Chart2 from "../../component/chart/Chart2.jsx";
+import Calendar from "../../component/Calendar.jsx";
 import AddCircleIcon from '@mui/icons-material/AddCircle';
 import PersonIcon from '@mui/icons-material/Person';
 
@@ -139,11 +140,15 @@
             <Title title={"금일 반납/교환 예정 리스트"} explanation={"장비 반납/교환 리스트를 확인하세요."} />
             <AddCircleIcon sx={{ fontSize: 20, color: "#1976d2" }} />
           </div>
-          <Table head={tableHead} contents={content} contentKey={Key} />
+          <div className="flex" >
+            <div style={{ width:"50%" }}><Calendar /></div>
+            <div style={{ width:"50%" }}><Table head={tableHead} contents={content} contentKey={Key} /></div>
+          </div>
+
         </div>          
         <div className="content-box combine-left">
           <div className="flex margin-bottom">
-            <Title title={"금주 반납/교환 예정 리스트"} explanation={"장비 반납/교환 리스트를 확인하세요."} />
+            <Title title={"약상자 추가 예정 리스트"} explanation={"장비 반납/교환 리스트를 확인하세요."} />
             <AddCircleIcon sx={{ fontSize: 20, color: "#1976d2" }} />
           </div>
           <Table head={tableHead2} contents={content2} contentKey={Key2} />
Add a comment
List