From efbdd0b78c908398491ead261f50ac2fa0a83f0d Mon Sep 17 00:00:00 2001 From: Mariela Date: Mon, 22 Aug 2022 20:13:09 -0600 Subject: [PATCH] quitar comunidad id de formulario al cancelar y actualizar --- servicio-usuarios/src/users/users.controller.ts | 1 - .../src/components/AdministradoresComunidad.js | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/servicio-usuarios/src/users/users.controller.ts b/servicio-usuarios/src/users/users.controller.ts index 81c1d968..d01aafbb 100644 --- a/servicio-usuarios/src/users/users.controller.ts +++ b/servicio-usuarios/src/users/users.controller.ts @@ -82,7 +82,6 @@ export class UsersController { @MessagePattern({ cmd: 'updateAdminCommunity' }) updateAdminCommunity(@Payload() user: UserDocument) { - console.log(user); return this.userService.update(user._id, user); } diff --git a/web-ui/web-react/src/components/AdministradoresComunidad.js b/web-ui/web-react/src/components/AdministradoresComunidad.js index f75c7806..ff4343ec 100644 --- a/web-ui/web-react/src/components/AdministradoresComunidad.js +++ b/web-ui/web-react/src/components/AdministradoresComunidad.js @@ -317,6 +317,7 @@ const AdministradoresComunidad = () => { toast.current.show({ severity: 'success', summary: 'Exito', detail: 'Administrador de Comunidad de vivienda Actualizada', life: 3000 }); listaAdmin(); + setCommunityId(''); setAdminCommunity(emptyAdminCommunity); }) @@ -352,7 +353,6 @@ const AdministradoresComunidad = () => { const editAdmin = (admin) => { setAdminCommunity(admin); - console.log(admin); setSaveButtonTitle('Actualizar'); setCommunityId(admin.community_id) } @@ -361,7 +361,7 @@ const AdministradoresComunidad = () => { const cancelEdit = () => { setAdminCommunity(emptyAdminCommunity); setSaveButtonTitle('Registrar'); - setC + setCommunityId(''); } const actionsAdminCommunity = (rowData) => { @@ -621,7 +621,7 @@ const AdministradoresComunidad = () => {
- + onInputChange(e, 'name')} required autoFocus className={classNames({ 'p-invalid': submitted && adminCommunity.name === '' })} />
@@ -633,7 +633,7 @@ const AdministradoresComunidad = () => {
- + onInputChange(e, 'last_name')} required autoFocus className={classNames({ 'p-invalid': submitted && adminCommunity.last_name === '' })} />
@@ -645,7 +645,7 @@ const AdministradoresComunidad = () => {
- + onInputChange(e, 'email')} required autoFocus className={classNames({ 'p-invalid': submitted && adminCommunity.email === '' })} />
@@ -658,7 +658,7 @@ const AdministradoresComunidad = () => {
- + onInputChange(e, 'dni')} required autoFocus className={classNames({ 'p-invalid': submitted && adminCommunity.dni === '' })} />