mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5297] Success Snackbar messages showning as errors (#6404)
This commit is contained in:
@@ -407,14 +407,18 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
action: event.action,
|
||||
type: event.type
|
||||
}).subscribe((message) => {
|
||||
this.openSnackMessage(message);
|
||||
this.openSnackMessageError(message);
|
||||
});
|
||||
}
|
||||
|
||||
openSnackMessage(message: string) {
|
||||
openSnackMessageError(message: string) {
|
||||
this.notificationService.showError(message);
|
||||
}
|
||||
|
||||
openSnackMessageInfo(message: string) {
|
||||
this.notificationService.showInfo(message);
|
||||
}
|
||||
|
||||
emitReadyEvent(event: NodePaging) {
|
||||
this.documentListReady.emit(event);
|
||||
}
|
||||
@@ -438,12 +442,12 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
translatedErrorMessage = this.translateService.instant('OPERATION.ERROR.UNKNOWN');
|
||||
}
|
||||
|
||||
this.openSnackMessage(translatedErrorMessage);
|
||||
this.openSnackMessageError(translatedErrorMessage);
|
||||
}
|
||||
|
||||
onContentActionSuccess(message: string) {
|
||||
const translatedMessage: any = this.translateService.instant(message);
|
||||
this.openSnackMessage(translatedMessage);
|
||||
this.openSnackMessageInfo(translatedMessage);
|
||||
this.documentList.reload();
|
||||
}
|
||||
|
||||
@@ -451,7 +455,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
this.uploadService.fileDeleted.next(message);
|
||||
this.deleteElementSuccess.emit();
|
||||
this.documentList.reload();
|
||||
this.openSnackMessage(message);
|
||||
this.openSnackMessageInfo(message);
|
||||
}
|
||||
|
||||
onPermissionRequested(node: any) {
|
||||
@@ -471,7 +475,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
});
|
||||
} else {
|
||||
const translatedErrorMessage: any = this.translateService.instant('OPERATION.ERROR.PERMISSION');
|
||||
this.openSnackMessage(translatedErrorMessage);
|
||||
this.openSnackMessageError(translatedErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,7 +493,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
});
|
||||
} else {
|
||||
const translatedErrorMessage: any = this.translateService.instant('OPERATION.ERROR.PERMISSION');
|
||||
this.openSnackMessage(translatedErrorMessage);
|
||||
this.openSnackMessageError(translatedErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -653,7 +657,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
});
|
||||
} else {
|
||||
const translatedErrorMessage: any = this.translateService.instant('OPERATION.ERROR.PERMISSION');
|
||||
this.openSnackMessage(translatedErrorMessage);
|
||||
this.openSnackMessageError(translatedErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user