diff --git a/projects/rero/ng-core/src/lib/record/detail/detail.component.ts b/projects/rero/ng-core/src/lib/record/detail/detail.component.ts index a548fd30f..49135a906 100644 --- a/projects/rero/ng-core/src/lib/record/detail/detail.component.ts +++ b/projects/rero/ng-core/src/lib/record/detail/detail.component.ts @@ -270,7 +270,7 @@ export class DetailComponent implements OnInit, OnDestroy { const navigateOptions = { relativeTo: this._route }; if (result === true) { if (typeof element === 'object' && this._config.redirectUrl) { - this._config.redirectUrl(element).subscribe((redirect: string) => { + this._config.redirectUrl(element, 'delete').subscribe((redirect: string) => { if (redirect !== null) { redirectUrl = redirect; } diff --git a/projects/rero/ng-core/src/lib/record/record-ui.service.ts b/projects/rero/ng-core/src/lib/record/record-ui.service.ts index 631234d4f..371d85317 100644 --- a/projects/rero/ng-core/src/lib/record/record-ui.service.ts +++ b/projects/rero/ng-core/src/lib/record/record-ui.service.ts @@ -142,7 +142,7 @@ export class RecordUiService { redirectAfterSave(pid: string, record: any, recordType: string, action: string, route: ActivatedRoute) { const config = this.getResourceConfig(recordType); if (config.redirectUrl) { - config.redirectUrl(record).subscribe((result: string) => { + config.redirectUrl(record, action).subscribe((result: string) => { if (result !== null) { this._router.navigate([result]); return;