Skip to content
Snippets Groups Projects
Commit 19fcaaf4 authored by ncamera's avatar ncamera
Browse files

Empezar a actualizar las traducciones

parent a3f83482
No related branches found
No related tags found
1 merge request!1Se actualiza Angular a la versión 13 y se resuelven vulnerabilidades
......@@ -158,6 +158,12 @@ export class ArchivosComponent {
*/
modalSeeScoreOpened = true;
private notificationTypeDictonarty = {
error: (message: string) => this.notifService.error(message),
success: (message: string) => this.notifService.success(message),
warning: (message: string) => this.notifService.warning(message),
};
constructor(
private router: Router,
private notifService: NotificacionService,
......@@ -209,6 +215,13 @@ export class ArchivosComponent {
}
this.ordenarArchivos();
}
showNotification(type: "error" | "success" | "warning", traslation: string) {
this.translateService
.get(traslation)
.subscribe(this.notificationTypeDictonarty[type]);
}
ordenarMixto() {
//1. primero las carpetas.
this.archivosCompartidosSinDuplicados =
......@@ -296,9 +309,7 @@ export class ArchivosComponent {
mostrarEliminarDialogo() {
// Chequear si se seleccionó un archivo
if (!this.archivoSeleccionado) {
this.notifService.warning(
this.translateService.get("i18n.warning.file.noSelected").value
);
this.showNotification("warning", "i18n.warning.file.noSelected");
return;
}
......@@ -658,9 +669,7 @@ export class ArchivosComponent {
*/
confirmFileMove(event: CustomEvent) {
if (!this.archivoSeleccionado) {
this.notifService.warning(
this.translateService.get("i18n.warning.file.noSelected").value
);
this.showNotification("warning", "i18n.warning.file.noSelected");
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment