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 ...@@ -38,10 +38,13 @@ func dynamicFormEvalution(ab *servicebuildermdl.AbstractBusinessLogicHolder, rs
} }
nextNoConditionPage := gjson.Result{} nextNoConditionPage := gjson.Result{}
currentPageIsNoCondition := false currentPageIsNoCondition := false
isEndPage := false
endPageObj := gjson.Result{}
for _, obj := range configs { for _, obj := range configs {
condition := obj.Get("condition").String() condition := obj.Get("condition").String()
pageID := obj.Get("pageID").String() pageID := obj.Get("pageID").String()
noCondition := obj.Get("noCondition").Bool() noCondition := obj.Get("noCondition").Bool()
if noCondition { if noCondition {
if currentPageIsNoCondition { if currentPageIsNoCondition {
nextNoConditionPage = obj nextNoConditionPage = obj
...@@ -49,6 +52,10 @@ func dynamicFormEvalution(ab *servicebuildermdl.AbstractBusinessLogicHolder, rs ...@@ -49,6 +52,10 @@ func dynamicFormEvalution(ab *servicebuildermdl.AbstractBusinessLogicHolder, rs
} }
if pageID == currentPage { if pageID == currentPage {
currentPageIsNoCondition = true currentPageIsNoCondition = true
isEndPage = obj.Get("isEndPage").Bool()
if isEndPage {
endPageObj = obj
}
} }
continue continue
} }
...@@ -84,6 +91,10 @@ func dynamicFormEvalution(ab *servicebuildermdl.AbstractBusinessLogicHolder, rs ...@@ -84,6 +91,10 @@ func dynamicFormEvalution(ab *servicebuildermdl.AbstractBusinessLogicHolder, rs
return obj.Value(), nil return obj.Value(), nil
} }
} }
if isEndPage {
return endPageObj.Value(), nil
}
if nextNoConditionPage.String() != "" { if nextNoConditionPage.String() != "" {
return nextNoConditionPage.Value(), nil 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