Should force the user to select a client
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
|
||||
(defn fastlink-dialog [{:keys [session]}]
|
||||
(defn fastlink-dialog [{:keys [client]}]
|
||||
(html-response
|
||||
(com/modal
|
||||
{}
|
||||
@@ -41,14 +41,19 @@
|
||||
(format "
|
||||
fastlink.open({fastLinkURL: '%s',
|
||||
accessToken: '%s',
|
||||
params: {'configName': 'Aggregation'}},
|
||||
params: {'configName': 'Aggregation'},
|
||||
onError: function(e) {
|
||||
console.log(e);
|
||||
htmx.trigger(\"#yodlee-table\", \"notification\", {value: \"Yodlee returned the following error: '\" + e.message + \"'.\\n\\nYou may want to refresh your browser and try again.\"});
|
||||
setTimeout(hideModal, 300);
|
||||
}},
|
||||
'fa-spot');
|
||||
|
||||
" (:yodlee2-fastlink env) (yodlee/get-access-token (:client/code (:client session)))))]
|
||||
" (:yodlee2-fastlink env) (yodlee/get-access-token (:client/code client))))]
|
||||
]
|
||||
[:div]))))
|
||||
|
||||
(defn reauthenticate [{:keys [session form-params]}]
|
||||
(defn reauthenticate [{:keys [form-params]}]
|
||||
(html-response
|
||||
(com/modal
|
||||
{}
|
||||
@@ -92,14 +97,21 @@ fastlink.open({fastLinkURL: '%s',
|
||||
:title "Yodlee Accounts"
|
||||
:entity-name "Yodlee accounts"
|
||||
:route :company-yodlee-table
|
||||
:action-buttons (fn [user _]
|
||||
[(com/button {:color :primary
|
||||
:on-click "openFastlink()"
|
||||
:hx-get (bidi/path-for ssr-routes/only-routes
|
||||
:company-yodlee-fastlink-dialog)
|
||||
:hx-target "#modal-holder"}
|
||||
(com/button-icon {} svg/refresh)
|
||||
"Link new account")])
|
||||
:action-buttons (fn [user args]
|
||||
[[:div.flex.flex-col.flex-shrink
|
||||
[:div.flex-shrink
|
||||
(com/button {:color :primary
|
||||
:on-click "openFastlink()"
|
||||
:disabled (if (:client args)
|
||||
false
|
||||
true)
|
||||
:hx-get (bidi/path-for ssr-routes/only-routes
|
||||
:company-yodlee-fastlink-dialog)
|
||||
:hx-target "#modal-holder"}
|
||||
(com/button-icon {} svg/refresh)
|
||||
"Link new account")]
|
||||
(when-not (:client args)
|
||||
[:div.text-xs "Note: please select a specific customer to link a new account."])]])
|
||||
:row-buttons (fn [user e]
|
||||
[
|
||||
(com/button {:hx-put (bidi/path-for ssr-routes/only-routes
|
||||
|
||||
Reference in New Issue
Block a user