mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
65240: Success notification on submitting comcol form
This commit is contained in:
@@ -3,7 +3,7 @@ import { Community } from '../../../core/shared/community.model';
|
||||
import { CommunityDataService } from '../../../core/data/community-data.service';
|
||||
import { Observable } from 'rxjs';
|
||||
import { RouteService } from '../../../core/services/route.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { hasValue, isNotEmpty, isNotUndefined } from '../../empty.util';
|
||||
import { take } from 'rxjs/operators';
|
||||
@@ -11,6 +11,9 @@ import { getSucceededRemoteData } from '../../../core/shared/operators';
|
||||
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
||||
import { DataService } from '../../../core/data/data.service';
|
||||
import { ComColDataService } from '../../../core/data/comcol-data.service';
|
||||
import { NotificationsService } from '../../notifications/notifications.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { ResourceType } from '../../../core/shared/resource-type';
|
||||
|
||||
/**
|
||||
* Component representing the create page for communities and collections
|
||||
@@ -40,11 +43,18 @@ export class CreateComColPageComponent<TDomain extends DSpaceObject> implements
|
||||
*/
|
||||
private newUUID: string;
|
||||
|
||||
/**
|
||||
* The type of the dso
|
||||
*/
|
||||
protected type: ResourceType;
|
||||
|
||||
public constructor(
|
||||
protected dsoDataService: ComColDataService<TDomain>,
|
||||
protected parentDataService: CommunityDataService,
|
||||
protected routeService: RouteService,
|
||||
protected router: Router
|
||||
protected router: Router,
|
||||
protected notificationsService: NotificationsService,
|
||||
protected translate: TranslateService
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -80,6 +90,7 @@ export class CreateComColPageComponent<TDomain extends DSpaceObject> implements
|
||||
} else {
|
||||
this.navigateToNewPage();
|
||||
}
|
||||
this.notificationsService.success(null, this.translate.get(this.type.value + '.create.notifications.success'));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user