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 (