diff --git a/web-ui/web-react/src/components/AdministradoresComunidad.js b/web-ui/web-react/src/components/AdministradoresComunidad.js
index 3eae0d1f..4c5bab8f 100644
--- a/web-ui/web-react/src/components/AdministradoresComunidad.js
+++ b/web-ui/web-react/src/components/AdministradoresComunidad.js
@@ -155,6 +155,10 @@ const AdministradoresComunidad = () => {
setDeleteAdminCommunityDialog(true);
}
+ const confirmDeleteSelected = () => {
+ setDeleteAdminsCommunitiesDialog(true);
+ }
+
const actionsAdminCommunity = (rowData) => {
return (
@@ -178,6 +182,36 @@ const AdministradoresComunidad = () => {
>
);
+
+ const leftToolbarTemplate = () => {
+ return (
+
+
+
+
+
+ )
+ }
+
+ const rightToolbarTemplate = () => {
+ return (
+
+
+
+ )
+ }
+
+
+ const header = (
+
+
Administradores de Comunidades
+
+
+ setGlobalFilter(e.target.value)} placeholder="Buscar..." />
+
+
+ );
+
const headerName = (
<>
Nombre
@@ -220,129 +254,6 @@ const AdministradoresComunidad = () => {
>
)
- const hideDeleteAdminSystemDialog = () => {
- setDeleteAdminSystemDialog(false);
- }
-
- const hideDeleteAdminsSystemsDialog = () => {
- setDeleteAdminsSystemDialog(false);
- }
-
- const confirmDeleteAdminSystem = (sysAdmin) => {
- setSysAdmin(sysAdmin);
- setDeleteAdminSystemDialog(true);
- }
-
- const confirmDeleteSelected = () => {
- setDeleteAdminsSystemDialog(true);
- }
-
- const deleteSysAdmin = () => {
-
- fetch('http://localhost:4000/user/deleteAdminSystem/' + sysadmin._id, {
- cache: 'no-cache',
- method: 'DELETE',
- headers: {
- 'Content-Type': 'application/json'
- }
- })
- .then(
- function (response) {
- if (response.status != 201)
- console.log('OcurriĆ³ un error con el servicio: ' + response.status);
- else
- return response.json();
- }
- )
- .then(
- function (response) {
- let _sysadmin = listaAdmins.filter(val => val._id !== sysadmin._id);
- setListaAdmins(_sysadmin);
-
- setDeleteAdminSystemDialog(false);
- setSysAdmin(emptySysAdmin);
-
- toast.current.show({ severity: 'success', summary: 'Exito', detail: 'Administrador del Sistema Eliminado', life: 3000 });
- }
- )
- .catch(
- err => {
- console.log('OcurriĆ³ un error con el fetch', err)
- toast.current.show({ severity: 'danger', summary: 'Error', detail: 'Administrador del Sistema no se pudo eliminar', life: 3000 });
- }
- );
- }
-
- const deleteSelectedAdminsSystem = () => {
- let _administrators = listaAdmins.filter(val => !selectedAdministrators.includes(val));
- selectedAdministrators.map((item) => {
- fetch('http://localhost:4000/user/deleteAdminSystem/' + item._id, {
- cache: 'no-cache',
- method: 'DELETE',
- headers: {
- 'Content-Type': 'application/json'
- }
- })
- })
- setListaAdmins(_administrators);
- setDeleteAdminsSystemDialog(false);
- setSelectedAdministrators(null);
- toast.current.show({ severity: 'success', summary: 'Successful', detail: 'Products Deleted', life: 3000 });
- }
-
-
- const actionsAdmin = (rowData) => {
- return (
-
-
- );
- }
-
- const leftToolbarTemplate = () => {
- return (
-
-
-
-
-
- )
- }
-
- const rightToolbarTemplate = () => {
- return (
-
-
-
- )
- }
-
-
- const header = (
-
-
Administradores de Comunidades
-
-
- setGlobalFilter(e.target.value)} placeholder="Buscar..." />
-
-
- );
-
- const deleteAdminSystemDialogFooter = (
- <>
-
-
- >
- );
-
- const deleteAdminsSystemDialogFooter = (
- <>
-
-
- >
- );
-
-
return (