-
-
Save claudiuapetrei/618b433ad4b9476bf99e31bf575ad1cd 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
(defui ^:once GrantDisplay | |
static om/IQuery | |
(query [this] [:id :title :funder_name :ui/awarded-to :funding_amount_in_usd :start_date :end_date]) | |
static om/Ident | |
(ident [this props] [:grant/by-id (:id props)]) | |
(defui ^:once GrantOverlay | |
static f-core/InitialAppState | |
(initial-state [this params] {:grant nil}) | |
static om/IQuery | |
(query [this] [{:grant (om/get-query GrantDisplay)}]) | |
static om/Ident | |
(ident [this props] [:overlays/by-type :grant]) | |
Object | |
(render [this] | |
(let [{:keys [grant]} (om/props this)] | |
(ui-grant-display grant {}) | |
(defmutation open-grant-modal! | |
[{:keys [grant-id]}] | |
(action [{:keys [state]}] | |
(swap! state assoc-in [:overlays/by-type :grant :grant] [:grant/by-id grant-id]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment