ignore invalid linear workflow sections that are after the current section

This commit is contained in:
alecmerdler 2017-02-22 16:33:34 -08:00 committed by Joseph Schorr
parent ff07533d80
commit ea9d47ba75
6 changed files with 42 additions and 12 deletions

View file

@ -45,14 +45,16 @@ export class LinearWorkflowComponent implements ng.IComponentController {
public onSectionInvalid(sectionId: string): void {
var invalidSection = this.sections.filter(section => section.component.sectionId == sectionId)[0];
invalidSection.component.isCurrentSection = true;
this.currentSection = invalidSection;
this.sections.forEach((section) => {
if (section.index > invalidSection.index) {
section.component.sectionVisible = false;
section.component.isCurrentSection = false;
}
});
if (invalidSection.index <= this.currentSection.index) {
invalidSection.component.isCurrentSection = true;
this.currentSection = invalidSection;
this.sections.forEach((section) => {
if (section.index > invalidSection.index) {
section.component.sectionVisible = false;
section.component.isCurrentSection = false;
}
});
}
}
}