Changeset 0.30.2 cs2 (#202)
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit is contained in:
@@ -599,6 +599,7 @@ type WorkflowPageData struct {
|
||||
FormTemplateJSON string // typed form template JSON (empty if chat_only)
|
||||
TotalStages int
|
||||
CurrentStage int
|
||||
SurfacePkgID string // v0.30.2: custom package surface override (empty = use StageMode)
|
||||
}
|
||||
|
||||
// WorkflowLandingPageData is passed to workflow-landing.html.
|
||||
@@ -650,7 +651,7 @@ func (e *Engine) RenderWorkflow() gin.HandlerFunc {
|
||||
}
|
||||
|
||||
// Load workflow stage info for form rendering (v0.29.3)
|
||||
var stageMode, stageName, formTplJSON string
|
||||
var stageMode, stageName, formTplJSON, surfacePkgID string
|
||||
var totalStages, currentStage int
|
||||
stageMode = "chat_only" // default
|
||||
if e.stores.Channels != nil && channelID != "" {
|
||||
@@ -669,6 +670,9 @@ func (e *Engine) RenderWorkflow() gin.HandlerFunc {
|
||||
if stageMode != "chat_only" {
|
||||
formTplJSON = string(stg.FormTemplate)
|
||||
}
|
||||
if stg.SurfacePkgID != nil {
|
||||
surfacePkgID = *stg.SurfacePkgID
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -690,6 +694,7 @@ func (e *Engine) RenderWorkflow() gin.HandlerFunc {
|
||||
FormTemplateJSON: formTplJSON,
|
||||
TotalStages: totalStages,
|
||||
CurrentStage: currentStage,
|
||||
SurfacePkgID: surfacePkgID,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user