Merge branch 'dev' into feature/US-55
This commit is contained in:
commit
9ccfce7eac
|
@ -22,7 +22,7 @@ export interface Alert {
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class AlertService {
|
export class AlertService {
|
||||||
timeout = 5000;
|
timeout = 3000;
|
||||||
toast = false;
|
toast = false;
|
||||||
position = 'top right';
|
position = 'top right';
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ export class AlertService {
|
||||||
alert.timeout = alert.timeout ?? this.timeout;
|
alert.timeout = alert.timeout ?? this.timeout;
|
||||||
alert.toast = alert.toast ?? this.toast;
|
alert.toast = alert.toast ?? this.toast;
|
||||||
alert.position = alert.position ?? this.position;
|
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);
|
(extAlerts ?? this.alerts).push(alert);
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
<form class="ds-form" *ngIf="categoria" name="deleteForm" (ngSubmit)="confirmDelete(categoria!)">
|
<form class="ds-form" *ngIf="categoria" name="deleteForm" (ngSubmit)="confirmDelete(categoria!)">
|
||||||
<div class="modal-header">
|
<div class="modal-header"></div>
|
||||||
<h4 class="modal-title" data-cy="categoriaDeleteDialogHeading" jhiTranslate="entity.delete.title">Confirm delete operation</h4>
|
|
||||||
|
|
||||||
<button type="button" class="ds-btn close" data-dismiss="modal" aria-hidden="true" (click)="cancel()">×</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<jhi-alert-error></jhi-alert-error>
|
<jhi-alert-error></jhi-alert-error>
|
||||||
|
|
|
@ -15,9 +15,15 @@
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<jhi-alert-error></jhi-alert-error>
|
<!-- <div class="alert alert-success" *ngIf="success" jhiTranslate="dataSurveyApp.categoria.delete.error">
|
||||||
|
|
||||||
<jhi-alert></jhi-alert>
|
</div>-->
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<jhi-alert class="alert-success"></jhi-alert>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="alert alert-success" *ngIf="success" jhiTranslate="dataSurveyApp.categoria.delete.success"></div>
|
||||||
|
|
||||||
<div class="alert alert-warning" id="no-result" *ngIf="categorias?.length === 0">
|
<div class="alert alert-warning" id="no-result" *ngIf="categorias?.length === 0">
|
||||||
<span jhiTranslate="dataSurveyApp.categoria.home.notFound">No categorias found</span>
|
<span jhiTranslate="dataSurveyApp.categoria.home.notFound">No categorias found</span>
|
||||||
|
|
|
@ -14,6 +14,7 @@ export class CategoriaComponent implements OnInit {
|
||||||
categorias?: ICategoria[];
|
categorias?: ICategoria[];
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
public searchString: string;
|
public searchString: string;
|
||||||
|
success = false;
|
||||||
|
|
||||||
constructor(protected categoriaService: CategoriaService, protected modalService: NgbModal) {
|
constructor(protected categoriaService: CategoriaService, protected modalService: NgbModal) {
|
||||||
this.searchString = '';
|
this.searchString = '';
|
||||||
|
@ -48,6 +49,7 @@ export class CategoriaComponent implements OnInit {
|
||||||
// unsubscribe not needed because closed completes on modal close
|
// unsubscribe not needed because closed completes on modal close
|
||||||
modalRef.closed.subscribe(reason => {
|
modalRef.closed.subscribe(reason => {
|
||||||
if (reason === 'deleted') {
|
if (reason === 'deleted') {
|
||||||
|
this.success = true;
|
||||||
this.loadAll();
|
this.loadAll();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,11 +8,13 @@
|
||||||
"createOrEditLabel": "Datos de categoría",
|
"createOrEditLabel": "Datos de categoría",
|
||||||
"notFound": "Ninguna categoría encontrada"
|
"notFound": "Ninguna categoría encontrada"
|
||||||
},
|
},
|
||||||
"created": "Una nueva categoría ha sido creada con el identificador {{ param }}",
|
"created": "Su categoría fue creada de manera exitosa",
|
||||||
"updated": "Los datos de la categoría {{ nombre }} han sido actualizados",
|
"updated": "Los datos de la categoría han sido guardados de manera exitosa",
|
||||||
"deleted": "La categoría {{ nombre }} ha sido deshabilitada",
|
"deleted": "La categoría {{ nombre }} ha sido deshabilitada",
|
||||||
"delete": {
|
"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": {
|
"detail": {
|
||||||
"title": "Categoría"
|
"title": "Categoría"
|
||||||
|
|
Loading…
Reference in New Issue