Created
September 28, 2015 02:15
-
-
Save jtackett/7178994e186683d8a558 to your computer and use it in GitHub Desktop.
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
(defn confirm-edit | |
"All required fields present. confirm-Edit field/values." | |
[input] | |
(cond | |
(true? (:cancel? input)) ;; Did the user cancel? | |
{:new-state :initial | |
:response (str "The updates have been canceled. | |
Please send us more information to save.")} | |
;; The data has been confirmed | |
(true? (:confirm? input)) ;; Did the user confirm the data? | |
{:new-state :salesforce-write | |
:response (str "Thank you for confirming the data for us. | |
We are now writing your data to Salesforce. | |
We will let you know when it is finished.") | |
:launch-sf-write true} | |
;; Default | |
:else | |
{:new-state :confirm-edit | |
:response (str "Please edit and confirm the following fields for us: " | |
(util/display-fields-values input) | |
"Are these fields correct now?")})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment