From 1629edc32a5e4b4b5c80452acdf48eb378fda273 Mon Sep 17 00:00:00 2001 From: Mariela Date: Sun, 24 Jul 2022 23:53:28 -0600 Subject: [PATCH] establecer primero constantes para obtener comunidades --- .../components/AdministradoresComunidad.js | 40 +++---------------- .../src/components/AdministradoresSistema.js | 2 +- .../src/components/ComunidadViviendas.js | 2 +- 3 files changed, 8 insertions(+), 36 deletions(-) diff --git a/web-ui/web-react/src/components/AdministradoresComunidad.js b/web-ui/web-react/src/components/AdministradoresComunidad.js index 06416d5d..3eae0d1f 100644 --- a/web-ui/web-react/src/components/AdministradoresComunidad.js +++ b/web-ui/web-react/src/components/AdministradoresComunidad.js @@ -26,6 +26,9 @@ const AdministradoresComunidad = () => { const [deleteAdminsCommunitiesDialog, setDeleteAdminsCommunitiesDialog] = useState(false); const toast = useRef(null); const dt = useRef(null); + const [communitiesList, setCommunitiesList] = useState([]); + const [communityId, setCommunityId] = useState([]); + let emptyAdminCommunity = { _id: null, @@ -38,7 +41,7 @@ const AdministradoresComunidad = () => { community_id: '', community_name: '', user_type: '2', - status: '' + status: '1' }; async function listaAdmin() { @@ -152,9 +155,6 @@ const AdministradoresComunidad = () => { setDeleteAdminCommunityDialog(true); } - const confirmDeleteSelected = () => { - setDeleteAdminsCommunitiesDialog(true); - } const actionsAdminCommunity = (rowData) => { return ( @@ -164,35 +164,6 @@ const AdministradoresComunidad = () => { ); } - const leftToolbarTemplate = () => { - return ( - -
-
-
- ) - } - - const rightToolbarTemplate = () => { - return ( - -