Skip to content

Commit

Permalink
started to create a location aggregator
Browse files Browse the repository at this point in the history
  • Loading branch information
bbarker committed Jul 12, 2019
1 parent 2691a0f commit 6705dce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion app/src/Metajelo/UI.purs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ import Concur.React (HTML)
import Concur.React.DOM as D
import Concur.React.Run (runWidgetInDom)
import Data.Array.NonEmpty (NonEmptyArray)
import Data.Foldable (fold, foldMap)
import Data.Maybe (Maybe(..))
import Data.Show (show)
import Effect (Effect)
import Metajelo.Forms as MF
import Metajelo.Types as M
import Metajelo.View as MV

main :: Effect Unit
main = pure unit
Expand Down Expand Up @@ -62,8 +64,15 @@ accumulateLocation locMay = D.div_ [] do
Nothing
Nothing
Nothing
-- TODO: render location
display $ locWidg
pure newLocMay
where
locWidg :: forall a. Widget HTML a
locWidg = D.div' [
D.h3' [D.text "Last submitted location summary for this product:"]
, D.br'
, foldMap (\loc -> fold $ MV.spacify $ MV.locElems loc) locMay
]

-- TODO: so far just a test of retrieving data from signals
accumulateRecord :: String -> Signal HTML String
Expand Down
2 changes: 1 addition & 1 deletion packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ let additions =
, "url-validator"
]
"https://github.com/labordynamicsinstitute/metajelo-web.git"
"v1.0.2"
"f5d1ff27f80c03c4686bc7fa706097aed3f3a871"
, naturals =
mkPackage
[ "enums", "maybe", "prelude" ]
Expand Down

0 comments on commit 6705dce

Please sign in to comment.