ignore invalid linear workflow sections that are after the current section
This commit is contained in:
parent
ff07533d80
commit
ea9d47ba75
6 changed files with 42 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue