mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
CST-12179 Form error now shows failed to edit the service and redirect to the form instead of closing and returning to services directory
This commit is contained in:
@@ -255,16 +255,18 @@ export class LdnServiceFormEditComponent implements OnInit {
|
||||
|
||||
this.ldnServicesService.patch(this.service, patchOperations).pipe(
|
||||
getFirstCompletedRemoteData()
|
||||
).subscribe(
|
||||
() => {
|
||||
|
||||
this.closeModal();
|
||||
this.sendBack();
|
||||
this.notificationService.success(this.translateService.get('admin.registries.services-formats.modify.success.head'),
|
||||
this.translateService.get('admin.registries.services-formats.modify.success.content'));
|
||||
}
|
||||
);
|
||||
|
||||
).subscribe((rd: RemoteData<LdnService>) => {
|
||||
if (rd.hasSucceeded) {
|
||||
this.closeModal();
|
||||
this.sendBack();
|
||||
this.notificationService.success(this.translateService.get('admin.registries.services-formats.modify.success.head'),
|
||||
this.translateService.get('admin.registries.services-formats.modify.success.content'));
|
||||
} else {
|
||||
this.notificationService.error(this.translateService.get('admin.registries.services-formats.modify.failure.head'),
|
||||
this.translateService.get('admin.registries.services-formats.modify.failure.content'));
|
||||
this.closeModal();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
resetFormAndLeave() {
|
||||
|
Reference in New Issue
Block a user