Correcting redirection error after contract creation

This commit is contained in:
2023-03-18 17:27:35 +01:00
parent e5375edda8
commit 1bd2774cdd

View File

@@ -162,7 +162,7 @@ export class DraftsCardComponent extends BaseDraftsComponent implements OnInit {
publish() { publish() {
this.crudService.create('contract', this.newContractModel).subscribe({ this.crudService.create('contract', this.newContractModel).subscribe({
next: (response: any) => this.router.navigate([`../../${response.id}`], {relativeTo: this.route}), next: (response: any) => this.router.navigate([`../../contracts/${response.id}`], {relativeTo: this.route}),
error: (err) => this.flashService.error(err) error: (err) => this.flashService.error(err)
}); });
} }