mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1407] Version Manager - file name conflict message (#398)
* upoad file conflict message * SnackbarErrorAction
This commit is contained in:
committed by
Denys Vuika
parent
8d58d00c08
commit
9076c7ee9f
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, Pagination } from 'alfresco-js-api';
|
||||
import { UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { UserPreferencesService, FileUploadErrorEvent } from '@alfresco/adf-core';
|
||||
import { ShareDataRow, DocumentListComponent } from '@alfresco/adf-content-services';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { OnDestroy, ViewChild, OnInit } from '@angular/core';
|
||||
@@ -34,6 +34,8 @@ import { AppStore } from '../store/states/app.state';
|
||||
import { SetSelectedNodesAction } from '../store/actions/node.action';
|
||||
import { selectedNodes } from '../store/selectors/app.selectors';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { SnackbarErrorAction } from '../store/actions';
|
||||
|
||||
|
||||
export abstract class PageComponent implements OnInit, OnDestroy {
|
||||
|
||||
@@ -181,4 +183,14 @@ export abstract class PageComponent implements OnInit, OnDestroy {
|
||||
this.documentList.reload();
|
||||
}
|
||||
}
|
||||
|
||||
onFileUploadedError(error: FileUploadErrorEvent) {
|
||||
let message = null;
|
||||
|
||||
if (error.error.status === 409) {
|
||||
message = new SnackbarErrorAction('VERSION.MESSAGE.ERROR.CONFLICT');
|
||||
}
|
||||
|
||||
this.store.dispatch(message);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user