From 7194cddb28656c721342c2ef604f9f9fb0692960 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 19 Nov 2017 00:20:25 +0100 Subject: Show payment count and partition - Also fixes exceedingPayer in back by using only punctual payments --- client/src/Main.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'client/src/Main.hs') diff --git a/client/src/Main.hs b/client/src/Main.hs index cbc881c..d55eefe 100644 --- a/client/src/Main.hs +++ b/client/src/Main.hs @@ -13,9 +13,8 @@ import JSDOM.Types (HTMLElement (..), JSM) import qualified JSDOM.Types as Dom import Prelude hiding (error, init) -import qualified Common.Message as Message -import qualified Common.Message.Key as Key import Common.Model (InitResult (InitEmpty)) +import qualified Common.Msg as Msg import qualified View.App as App @@ -27,7 +26,8 @@ main = do readInit :: JSM InitResult readInit = do document <- Dom.currentDocumentUnchecked - initNode <- Dom.getElementById document "init" + initNode <- Dom.getElementById document ("init" :: Dom.JSString) + case initNode of Just node -> do text <- Dom.textFromJSString <$> Dom.getInnerText (Dom.uncheckedCastTo HTMLElement node) @@ -36,4 +36,5 @@ readInit = do Nothing -> initParseError _ -> return initParseError - where initParseError = InitEmpty (Left $ Message.get Key.SignIn_ParseError) + + where initParseError = InitEmpty (Left $ Msg.get Msg.SignIn_ParseError) -- cgit v1.2.3