#1467 customs outcome (#1483)

This commit is contained in:
Maurizio Vitale
2017-01-17 13:37:30 +00:00
committed by Mario Romano
parent c6126b6be1
commit 399b716d82
7 changed files with 56 additions and 11 deletions

View File

@@ -190,11 +190,14 @@ export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
return false;
}
isOutcomeButtonVisible(outcome: FormOutcomeModel): boolean {
isOutcomeButtonVisible(outcome: FormOutcomeModel, isFormReadOnly: boolean): boolean {
if (outcome && outcome.name) {
if (outcome.name === FormOutcomeModel.COMPLETE_ACTION) {
return this.showCompleteButton;
}
if (isFormReadOnly) {
return outcome.isSelected ;
}
if (outcome.name === FormOutcomeModel.SAVE_ACTION) {
return this.showSaveButton;
}