Commit 059a6612 authored by Roshan Patil's avatar Roshan Patil
Browse files

Dynamic Form evalution end page added

parent 0373f0ad
Branches
Tags
1 merge request!68Core dev bto c
Showing with 11 additions and 0 deletions
......@@ -38,10 +38,13 @@ func dynamicFormEvalution(ab *servicebuildermdl.AbstractBusinessLogicHolder, rs
}
nextNoConditionPage := gjson.Result{}
currentPageIsNoCondition := false
isEndPage := false
endPageObj := gjson.Result{}
for _, obj := range configs {
condition := obj.Get("condition").String()
pageID := obj.Get("pageID").String()
noCondition := obj.Get("noCondition").Bool()
if noCondition {
if currentPageIsNoCondition {
nextNoConditionPage = obj
......@@ -49,6 +52,10 @@ func dynamicFormEvalution(ab *servicebuildermdl.AbstractBusinessLogicHolder, rs
}
if pageID == currentPage {
currentPageIsNoCondition = true
isEndPage = obj.Get("isEndPage").Bool()
if isEndPage {
endPageObj = obj
}
}
continue
}
......@@ -84,6 +91,10 @@ func dynamicFormEvalution(ab *servicebuildermdl.AbstractBusinessLogicHolder, rs
return obj.Value(), nil
}
}
if isEndPage {
return endPageObj.Value(), nil
}
if nextNoConditionPage.String() != "" {
return nextNoConditionPage.Value(), nil
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment