mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-19 16:03:02 +00:00
Merge branch 'master' into w2p-70237_entities-orgunit-submission-fix
This commit is contained in:
@@ -7,6 +7,7 @@ import { DataService } from '../../../core/data/data.service';
|
||||
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
||||
import { NotificationsService } from '../../notifications/notifications.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { RestResponse } from '../../../core/cache/response.models';
|
||||
|
||||
/**
|
||||
* Component representing the delete page for communities and collections
|
||||
@@ -45,8 +46,8 @@ export class DeleteComColPageComponent<TDomain extends DSpaceObject> implements
|
||||
onConfirm(dso: TDomain) {
|
||||
this.dsoDataService.delete(dso.id)
|
||||
.pipe(first())
|
||||
.subscribe((success: boolean) => {
|
||||
if (success) {
|
||||
.subscribe((response: RestResponse) => {
|
||||
if (response.isSuccessful) {
|
||||
const successMessage = this.translate.instant((dso as any).type + '.delete.notification.success');
|
||||
this.notifications.success(successMessage)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user