Bläddra i källkod

[ADD] example modal

amenpunk 3 år sedan
förälder
incheckning
d0eba9ca20
3 ändrade filer med 32 tillägg och 3 borttagningar
  1. 26 3
      psicoadmin/src/Components/Actividades.js
  2. 5 0
      psicoadmin/src/Css/all.css
  3. 1 0
      psicoadmin/src/Pages/Home.js

+ 26 - 3
psicoadmin/src/Components/Actividades.js

@@ -1,14 +1,32 @@
1
-import * as React from 'react'
1
+import React, { useState } from 'react'
2 2
 import FlightTakeoffIcon from '@mui/icons-material/FlightTakeoff';
3 3
 import TextField from '@mui/material/TextField';
4
-import { Col, Row } from 'react-bootstrap';
4
+import { Col, Row, Modal } from 'react-bootstrap';
5 5
 
6 6
 import LocalizationProvider from '@mui/lab/LocalizationProvider';
7 7
 
8 8
 import DateFnsUtils from '@date-io/date-fns';
9 9
 import DesktopDatePicker from '@mui/lab/DesktopDatePicker';
10 10
 
11
+function HelpModal (props) {
12
+    let { visible, handleClose } = props
13
+    return (
14
+        <Modal size="lg" aria-labelledby="contained-modal-title-vcenter" centered show={visible} onHide={handleClose}> 
15
+            <Modal.Header>
16
+                <button type="button" class="close" onClick={handleClose}>&times;</button>
17
+                <h4 class="modal-title">Asistencia</h4>
18
+            </Modal.Header>
19
+            <Modal.Body class="modal-body">
20
+                <div class="data_notification">
21
+                    <p>La lista muestra un historial de las actividades que se han realizado en cada módulo del sistema a nivel Administradores y Asistentes, realice búsquedas avanzadas o simplemente actualice la lista para obtener los últimos registros.</p>
22
+                </div>
23
+            </Modal.Body>
24
+        </Modal>
25
+    )
26
+}
27
+
11 28
 function LastActivitys() {
29
+    
12 30
 
13 31
     let activitys = [{
14 32
         password : "rcardona2510",
@@ -59,6 +77,10 @@ function LastActivitys() {
59 77
 export default function Actividades() {
60 78
 
61 79
     const [value, setValue] = React.useState(new Date());
80
+    const [show, setShow] = useState(false);
81
+    const handleClose = () => setShow(false);
82
+    const handleShow = () => setShow(true);
83
+
62 84
     const handleChange = (newValue) => {
63 85
         setValue(newValue);
64 86
     };
@@ -147,8 +169,9 @@ export default function Actividades() {
147 169
                     </div>
148 170
                     <LastActivitys/>
149 171
                     <div className="footer_history">
150
-                        <a href="#" data-toggle="modal" data-target="#ayudaHistorial">Ayuda</a>
172
+                        <div className="text-color" onClick={handleShow}>Ayuda</div>
151 173
                     </div>
174
+                    <HelpModal visible={show} handleClose={handleClose}/>
152 175
                 </div>
153 176
             </div>
154 177
         </div>

+ 5 - 0
psicoadmin/src/Css/all.css

@@ -904,6 +904,9 @@ table.dataTable tbody th, table.dataTable tbody td {
904 904
     color: #2ec5d3;
905 905
     transition: all 0.3s;
906 906
 }
907
+.text-color{
908
+    color: #ec5e69 !important;
909
+}
907 910
 .close {
908 911
     float: right;
909 912
     font-size: 1.5rem;
@@ -912,6 +915,8 @@ table.dataTable tbody th, table.dataTable tbody td {
912 915
     color: #ec5e69;
913 916
     text-shadow: 0 1px 0 #fff;
914 917
     opacity: 1;
918
+    border : none;
919
+    background : white;
915 920
 }
916 921
 .data_product input {
917 922
     width: 100%;

+ 1 - 0
psicoadmin/src/Pages/Home.js

@@ -1,5 +1,6 @@
1 1
 import { Card } from '../Components/Card';
2 2
 import { Col, Row } from 'react-bootstrap'
3
+import React from 'react'
3 4
 
4 5
 import PersonOutlineIcon from '@mui/icons-material/PersonOutline';
5 6
 import VerifiedUserIcon from '@mui/icons-material/VerifiedUser';