Created
October 29, 2019 10:44
-
-
Save keirbowden/d0aacd840d9015a13d3ec45c5432223a to your computer and use it in GitHub Desktop.
Aura component controller to handle flow navigation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
handleCaptured : function(component, event, helper) | |
{ | |
console.log('Captured signature') | |
let flowAction=null; | |
let availableActions=component.get('v.availableActions'); | |
console.log('Available actions = ' + availableActions); | |
for (let idx=0; idx<availableActions.length && null==flowAction; idx++) { | |
let availAction=availableActions[idx]; | |
if ('NEXT'==availAction) { | |
flowAction=availAction; | |
} | |
else if ('FINISH'==availAction) { | |
flowAction=availAction | |
} | |
} | |
console.log('Flow action = ' + flowAction); | |
if (null!=flowAction) { | |
let navigate=component.get("v.navigateFlow"); | |
navigate(flowAction); | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment