diff --git a/web-ui/web-react/src/components/Inquilinos.js b/web-ui/web-react/src/components/Inquilinos.js index 4325bcf5..e012e88e 100644 --- a/web-ui/web-react/src/components/Inquilinos.js +++ b/web-ui/web-react/src/components/Inquilinos.js @@ -15,6 +15,7 @@ import { faIdCardAlt } from '@fortawesome/free-solid-svg-icons' import { faHashtag } from '@fortawesome/free-solid-svg-icons' import { faCircleQuestion } from '@fortawesome/free-solid-svg-icons' import { useCookies } from 'react-cookie' +import InfoDialog from './generic/InfoDialog' const Inquilinos = () => { let emptyTenant = { @@ -43,6 +44,7 @@ const Inquilinos = () => { const [communitiesList, setCommunitiesList] = useState([]) const [communityId, setCommunityId] = useState(null) const [submitted, setSubmitted] = useState(false) + let [openInfoDialog] = useState(false) const toast = useRef(null) const dt = useRef(null) @@ -144,6 +146,10 @@ const Inquilinos = () => { }) } + function openDialog() { + openInfoDialog = true + } + const deleteSelectedTenants = () => { let _tenants = tenants.filter((val) => !selectedTentants.includes(val)) setTenants(_tenants) @@ -418,6 +424,13 @@ const Inquilinos = () => { ) } + const testInquilino = { + name: 'Juan', // Nombre + last_name: 'Pérez', // Apellidos + email: 'jperez@gmail.com', + phone: '+57 300 1234567', // Teléfono + } + return (
@@ -619,6 +632,7 @@ const Inquilinos = () => { />
diff --git a/web-ui/web-react/src/components/generic/InfoDialog.js b/web-ui/web-react/src/components/generic/InfoDialog.js index 4747ec65..d1faaceb 100644 --- a/web-ui/web-react/src/components/generic/InfoDialog.js +++ b/web-ui/web-react/src/components/generic/InfoDialog.js @@ -1,4 +1,6 @@ import React from 'react' +import { Dialog } from 'primereact/dialog' +import { Button } from 'primereact/button' class InfoDialog extends React.Component { constructor(props) { @@ -15,75 +17,81 @@ class InfoDialog extends React.Component { onClose = () => this.setState({ openInfoDialog: false }) render() { return ( - -
-
-
-

Nombre

-
-
- -

{this.props.info.name}

-
-
+
+ +
+
-

Apellido(s)

+

Nombre

-

{this.props.info.last_name}

+

{this.props.info.name}

+
+
+
+

Apellido(s)

+
+
+ +

{this.props.info.last_name}

+
+
+
+
+

Identificación

+
+
+ +

{this.props.info.dni}

+
-
-

Identificación

-
-
- -

{this.props.info.dni}

+
+
+

Teléfono

+
+
+ +

{this.props.info.phone}

+
-
-
-
-
-

Teléfono

-
-
- -

{this.props.info.phone}

-
-
-
-
-

Correo Electrónico

-
-
- -

{this.props.info.email}

+
+

Correo Electrónico

+
+
+ +

{this.props.info.email}

+
-
-
+
+ ) } } +export default InfoDialog