From c3d114f61e29a55b2aa166635f9a15552603fedd Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sun, 21 Aug 2022 20:11:53 -0600 Subject: [PATCH] add dialog --- web-ui/web-react/src/components/Inquilinos.js | 103 +++++++++++++++++- 1 file changed, 99 insertions(+), 4 deletions(-) diff --git a/web-ui/web-react/src/components/Inquilinos.js b/web-ui/web-react/src/components/Inquilinos.js index ab19ed75..812af9ae 100644 --- a/web-ui/web-react/src/components/Inquilinos.js +++ b/web-ui/web-react/src/components/Inquilinos.js @@ -15,7 +15,6 @@ 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' import classNames from 'classnames'; const Inquilinos = () => { @@ -46,7 +45,7 @@ const Inquilinos = () => { const [houseNumber, setHouseNumber] = useState([]) const [housesList, setHousesList] = useState([]) const [submitted, setSubmitted] = useState(false) - const [showInfoDialog, setShowInfoDialog] = useState(false) + const [infoDialogVisible, setShowInfoDialog] = useState(false) const toast = useRef(null) const dt = useRef(null) const [cookies] = useCookies() @@ -95,7 +94,7 @@ const Inquilinos = () => { useEffect(() => { tenantsList() - }, [tenantsList]) + }, []) useEffect(() => { getCommunity() @@ -228,6 +227,17 @@ const Inquilinos = () => { setChangeStatusTenantDialog(true) } + const hideInfoDialog = () => { + setSubmitted(false); + setShowInfoDialog(false); + setTenant(emptyTenant); + } + + const infoTenant = (tenant) => { + setTenant(tenant); + setShowInfoDialog(true); + } + const actionsTenant = (rowData) => { let icono = '' let text = '' @@ -240,6 +250,11 @@ const Inquilinos = () => { } return (
+
-