From 4afbb4388fbe41e22a807a24a54f29dbbf9b4ced Mon Sep 17 00:00:00 2001 From: Mariela Date: Fri, 22 Jul 2022 14:59:59 -0600 Subject: [PATCH] add functions --- .../src/components/AdministradoresSistema.js | 14 +-- .../src/components/ComunidadViviendas.js | 113 ++++++++++++++++++ 2 files changed, 116 insertions(+), 11 deletions(-) diff --git a/web-ui/web-react/src/components/AdministradoresSistema.js b/web-ui/web-react/src/components/AdministradoresSistema.js index 8a8ea049..58b21b3b 100644 --- a/web-ui/web-react/src/components/AdministradoresSistema.js +++ b/web-ui/web-react/src/components/AdministradoresSistema.js @@ -8,7 +8,7 @@ import { Dialog } from 'primereact/dialog'; import { Toolbar } from 'primereact/toolbar'; const AdministradoresSistema = () => { - +`` const [administrators, setAdministrators] = useState([]); const [urlFetch, setUrlFetch] = useState('http://localhost:4000/user/findAdminSistema/'); const [sysadmin, setSysAdmin] = useState(emptySysAdmin); @@ -19,7 +19,6 @@ const AdministradoresSistema = () => { const toast = useRef(null); const dt = useRef(null); - let emptySysAdmin = { _id: null, dni: '', @@ -123,10 +122,8 @@ const AdministradoresSistema = () => { function (response) { let _sysadmin = administrators.filter(val => val._id !== sysadmin._id); setAdministrators(_sysadmin); - setDeleteAdminSystemDialog(false); setSysAdmin(emptySysAdmin); - toast.current.show({ severity: 'success', summary: 'Exito', detail: 'Administrador del Sistema Eliminado', life: 3000 }); } ) @@ -155,7 +152,6 @@ const AdministradoresSistema = () => { toast.current.show({ severity: 'success', summary: 'Successful', detail: 'Products Deleted', life: 3000 }); } - const actionsAdmin = (rowData) => { return (
@@ -205,14 +201,13 @@ const AdministradoresSistema = () => {
+ ); + } + + const leftToolbarTemplate = () => { + return ( + +
+
+
+ ) + } + + const rightToolbarTemplate = () => { + return ( + +