From ce8e16e13571920daddf1f24e84ff4c11b6595f7 Mon Sep 17 00:00:00 2001 From: Mariela Date: Tue, 2 Aug 2022 22:38:54 -0600 Subject: [PATCH] agregar filtros para comunidades eliminadas --- web-ui/web-react/src/components/Inquilinos.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web-ui/web-react/src/components/Inquilinos.js b/web-ui/web-react/src/components/Inquilinos.js index 78fa76df..879c2cba 100644 --- a/web-ui/web-react/src/components/Inquilinos.js +++ b/web-ui/web-react/src/components/Inquilinos.js @@ -34,7 +34,8 @@ const Inquilinos = () => { number_house: 'Sin nĂºmero de vivienda', user_type: '4', date_entry: new Date(), - status: '1' + status: '1', + status_text: '', }; const [tenants, setTenants] = useState([]); @@ -50,6 +51,7 @@ const Inquilinos = () => { const dt = useRef(null); const [cookies, setCookie] = useCookies(); + const [changeStatusTenantDialog, setChangeStatusTenantDialog] = useState(false); async function tenantsList() { @@ -72,7 +74,9 @@ const Inquilinos = () => { let response = await fetch('http://localhost:4000/community/allCommunities', { method: 'GET' }); let resList = await response.json(); let list = await resList.message; - + list = await list.filter( + (val) => val.status != -1, + ) setCommunitiesList(await list); }