made otc wui. no back end

This commit is contained in:
didier amyot committed 2018-11-12 15:39:39 -05:00
1 parent 10b054db25
commit 2c53b516d6
2 files changed
+16 -18

No files matched your search

+14 -16
View File
@@ -1,5 +1,6 @@
(ns skirmish.wui.components.otc-page (ns skirmish.wui.components.otc-page
(:require [reagent.core :refer [atom]] (:require [reagent.core :refer [atom]]
[skirmish.wui.components.securities-page :refer [get-securities]]
[skirmish.wui.util :refer [email?]])) [skirmish.wui.util :refer [email?]]))
@@ -22,31 +23,29 @@
(and (-> state :value js/parseInt pos?) (and (-> state :value js/parseInt pos?)
(-> state :email email?))) (-> state :email email?)))
(defn direct-send-confirmation []
[:div.model (defn select-securities-for [securities on-change]
[:div.modal-background] [:select {:on-change on-change}
[:div.modal-content (for [security securities]
[:div.modal-card [:option {:value (:sec-id security) :key (:sec-id security)} (:sec-id security)])])
[:header.modal-card-head
[:p.modal-card-title "Modal title"]
[:button.delete]]]] (defn select-security [on-change]
[:a.button.modal-close.is-large {:aria-label "close"} "dslkds"]]) (let [securities (atom [])]
(get-securities securities)
#(select-securities-for @securities on-change)))
(defn direct-send [] (defn direct-send []
(let [state (atom {})] (let [state (atom {})]
(fn [] (fn []
[:div [:div
[:div.content [:div.content
[:p "Send securities to another person."] [:p "Send securities to another person."]]
[:pre (str @state)]]
[:form.form [:form.form
[:div.field.has-addons.has-addons-centered [:div.field.has-addons.has-addons-centered
[:div.control [:div.control
[:span.select [:span.select
[:select {:value (:sec-id @state) [select-security (partial set-sec-id state)]]]
:on-change (partial set-sec-id state)}
[:option {:value :foo :selected true} "damp"]
[:option {:value :bar } "blah blah blah"]]]]
[:div.control [:div.control
[:input.input {:type "text" [:input.input {:type "text"
:value (:value @state) :value (:value @state)
@@ -62,7 +61,6 @@
(defn page [state] (defn page [state]
[:div [:div
;[direct-send-confirmation]
[:div.content [:div.content
[:h5 "Do transaction without passing by the exchange."]] [:h5 "Do transaction without passing by the exchange."]]
@@ -41,13 +41,13 @@
[:li done "create two stocks"] [:li done "create two stocks"]
[:li done "add stocks to didier@gmail.com"] [:li done "add stocks to didier@gmail.com"]
[:li done "make something for urls on the backend"] [:li done "make something for urls on the backend"]
[:li on-it "add a wui for OTC"] [:li done "add a wui for OTC"]
[:li "fix the stupid chat. This is an important feature for OTC users."] [:li "fix the stupid chat. This is an important feature for OTC users."]
[:li "make something that allows to send securities from one user to another"] [:li "make something that allows to send securities from one user to another"]
[:li "move 'routes' in 'rest'"] [:li "move 'routes' in 'rest'"]
[:li "add a little bit of professionalism on top of the broker api"] [:li "add a little bit of professionalism on top of the broker api"]
[:li "make the api support transit and edn"] [:li "make the api support transit and edn"]
[:li "implements interest rate in ledger."] [:li on-it "implements interest rate in ledger."]
[:li "Make sure the ledger can have accounts"] [:li "Make sure the ledger can have accounts"]
[:li done "when a new user signs in, he should receive some sort of money"] [:li done "when a new user signs in, he should receive some sort of money"]
[:li "implement send securities to friends"] [:li "implement send securities to friends"]