Implement organization maker-checker workflows
This commit is contained in:
@@ -182,9 +182,18 @@ export class InstitutionProfileComponent implements OnInit {
|
||||
.subscribe((res: any) => {
|
||||
this.saving = false;
|
||||
if (!res) return;
|
||||
if (res.rollbackTransaction) {
|
||||
// Parked for checker approval - the profile has not actually changed yet, so the form must
|
||||
// not be patched with the submitted (not-yet-applied) values as if it had.
|
||||
this.successMsg = 'Bank profile update has been submitted for approval.';
|
||||
this.form.markAsPristine();
|
||||
return;
|
||||
}
|
||||
this.successMsg = 'Bank profile saved.';
|
||||
this.applyResult(res);
|
||||
this.form.markAsPristine();
|
||||
// The response is now a CommandProcessingResult, not the updated row (the write goes through
|
||||
// the command pipeline) - reload the saved row from the server instead of patching the form
|
||||
// from this response.
|
||||
this.load();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user