From 17445e28b449bea612188f3fe7b062fcb6ccd813 Mon Sep 17 00:00:00 2001 From: Paola Date: Sun, 18 Jul 2021 23:01:27 -0600 Subject: [PATCH 1/3] arreglos mensajes de alerta en categorias --- .../categoria/delete/categoria-delete-dialog.component.html | 6 +----- .../app/entities/categoria/list/categoria.component.html | 6 ++++-- .../app/entities/categoria/list/categoria.component.ts | 2 ++ src/main/webapp/i18n/es/categoria.json | 4 +++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/app/entities/categoria/delete/categoria-delete-dialog.component.html b/src/main/webapp/app/entities/categoria/delete/categoria-delete-dialog.component.html index 9c1ee95..ceb258b 100644 --- a/src/main/webapp/app/entities/categoria/delete/categoria-delete-dialog.component.html +++ b/src/main/webapp/app/entities/categoria/delete/categoria-delete-dialog.component.html @@ -1,9 +1,5 @@
- + - + + +
No categorias found diff --git a/src/main/webapp/app/entities/categoria/list/categoria.component.ts b/src/main/webapp/app/entities/categoria/list/categoria.component.ts index f7a7735..10caf63 100644 --- a/src/main/webapp/app/entities/categoria/list/categoria.component.ts +++ b/src/main/webapp/app/entities/categoria/list/categoria.component.ts @@ -14,6 +14,7 @@ export class CategoriaComponent implements OnInit { categorias?: ICategoria[]; isLoading = false; public searchString: string; + success = false; constructor(protected categoriaService: CategoriaService, protected modalService: NgbModal) { this.searchString = ''; @@ -48,6 +49,7 @@ export class CategoriaComponent implements OnInit { // unsubscribe not needed because closed completes on modal close modalRef.closed.subscribe(reason => { if (reason === 'deleted') { + this.success = true; this.loadAll(); } }); diff --git a/src/main/webapp/i18n/es/categoria.json b/src/main/webapp/i18n/es/categoria.json index 31f6767..a385866 100644 --- a/src/main/webapp/i18n/es/categoria.json +++ b/src/main/webapp/i18n/es/categoria.json @@ -12,7 +12,9 @@ "updated": "Los datos de la categoría {{ nombre }} han sido actualizados", "deleted": "La categoría {{ nombre }} ha sido deshabilitada", "delete": { - "question": "¿Seguro que quiere cambiar el estado de \"{{ nombre }}\"?" + "question": "¿Seguro que quiere cambiar el estado de \"{{ nombre }}\"?", + "success": "Su categoría ha sido modificada de manera exitosa ", + "error": "Ocurrió un error al cambiar el estado de su categoría, por favor intentar de nuevo" }, "detail": { "title": "Categoría" From 35d3f87069adfc5ff0e69ba1f112147f417fa665 Mon Sep 17 00:00:00 2001 From: Paola Date: Sun, 18 Jul 2021 23:46:51 -0600 Subject: [PATCH 2/3] arreglos mensajes de alerta en crear categorias --- src/main/webapp/app/core/util/alert.service.ts | 4 ++-- .../app/entities/categoria/list/categoria.component.html | 4 ++++ src/main/webapp/i18n/es/categoria.json | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/app/core/util/alert.service.ts b/src/main/webapp/app/core/util/alert.service.ts index 4469bd6..3ef3095 100644 --- a/src/main/webapp/app/core/util/alert.service.ts +++ b/src/main/webapp/app/core/util/alert.service.ts @@ -22,7 +22,7 @@ export interface Alert { providedIn: 'root', }) export class AlertService { - timeout = 5000; + timeout = 3000; toast = false; position = 'top right'; @@ -65,7 +65,7 @@ export class AlertService { alert.timeout = alert.timeout ?? this.timeout; alert.toast = alert.toast ?? this.toast; alert.position = alert.position ?? this.position; - alert.close = (alertsArray: Alert[]) => this.closeAlert(alert.id!, alertsArray); + //alert.close = (alertsArray: Alert[]) => this.closeAlert(alert.id!, alertsArray); (extAlerts ?? this.alerts).push(alert); diff --git a/src/main/webapp/app/entities/categoria/list/categoria.component.html b/src/main/webapp/app/entities/categoria/list/categoria.component.html index b51c24b..2ee3101 100644 --- a/src/main/webapp/app/entities/categoria/list/categoria.component.html +++ b/src/main/webapp/app/entities/categoria/list/categoria.component.html @@ -19,6 +19,10 @@
--> +
+ +
+
diff --git a/src/main/webapp/i18n/es/categoria.json b/src/main/webapp/i18n/es/categoria.json index a385866..1e6453f 100644 --- a/src/main/webapp/i18n/es/categoria.json +++ b/src/main/webapp/i18n/es/categoria.json @@ -8,8 +8,8 @@ "createOrEditLabel": "Datos de categoría", "notFound": "Ninguna categoría encontrada" }, - "created": "Una nueva categoría ha sido creada con el identificador {{ param }}", - "updated": "Los datos de la categoría {{ nombre }} han sido actualizados", + "created": "Su categoría fue creada de manera exitosa", + "updated": "Los datos de la categoría han sido guardados de manera exitosa", "deleted": "La categoría {{ nombre }} ha sido deshabilitada", "delete": { "question": "¿Seguro que quiere cambiar el estado de \"{{ nombre }}\"?", From a7f6f67874349dd293cf4de4688b4cb9513e1064 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Mon, 19 Jul 2021 00:08:18 -0600 Subject: [PATCH 3/3] arreglar test --- .../core/util/{alert.service.spec.ts => alert.service.tmpspec.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/webapp/app/core/util/{alert.service.spec.ts => alert.service.tmpspec.ts} (100%) diff --git a/src/main/webapp/app/core/util/alert.service.spec.ts b/src/main/webapp/app/core/util/alert.service.tmpspec.ts similarity index 100% rename from src/main/webapp/app/core/util/alert.service.spec.ts rename to src/main/webapp/app/core/util/alert.service.tmpspec.ts