fix return to recipes
This commit is contained in:
parent
3463ca405a
commit
b647517ca6
1 changed files with 7 additions and 4 deletions
|
|
@ -50,6 +50,9 @@ export class RecipeDetailsComponent implements OnInit {
|
||||||
|
|
||||||
commit_msg :string = "";
|
commit_msg :string = "";
|
||||||
|
|
||||||
|
//
|
||||||
|
department: string = this._route.parent!.snapshot.params['department'];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private _formBuilder: FormBuilder,
|
private _formBuilder: FormBuilder,
|
||||||
private _route: ActivatedRoute,
|
private _route: ActivatedRoute,
|
||||||
|
|
@ -150,7 +153,7 @@ export class RecipeDetailsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
console.log('Sending changes');
|
console.log('Sending changes');
|
||||||
void this._router.navigate(['/recipes']);
|
void this._router.navigate(['/'+this.department+'/recipes']);
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -167,7 +170,7 @@ export class RecipeDetailsComponent implements OnInit {
|
||||||
message: 'Do you want to close without saving?',
|
message: 'Do you want to close without saving?',
|
||||||
confirmCallBack: () => {
|
confirmCallBack: () => {
|
||||||
console.log('confirm close');
|
console.log('confirm close');
|
||||||
this._router.navigate(['/recipes']);
|
this._router.navigate(['/'+this.department+'/recipes']);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -175,7 +178,7 @@ export class RecipeDetailsComponent implements OnInit {
|
||||||
if (this.isValueChanged) {
|
if (this.isValueChanged) {
|
||||||
this.showConfirmSaveModal.emit(true);
|
this.showConfirmSaveModal.emit(true);
|
||||||
} else {
|
} else {
|
||||||
this._router.navigate(['/recipes']);
|
this._router.navigate(['/'+this.department+'/recipes']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -183,7 +186,7 @@ export class RecipeDetailsComponent implements OnInit {
|
||||||
if (this.isValueChanged) {
|
if (this.isValueChanged) {
|
||||||
this.showConfirmCloseModal.emit(true);
|
this.showConfirmCloseModal.emit(true);
|
||||||
} else {
|
} else {
|
||||||
this._router.navigate(['/recipes']);
|
this._router.navigate(['/'+this.department+'/recipes']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue