From 72b9f29c057eb45d022b9bbc1562d7b84ccc165b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 28 Mar 2017 12:51:25 +0200 Subject: Running low --- Handler/Common.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Handler') diff --git a/Handler/Common.hs b/Handler/Common.hs index 90e373a..799f692 100644 --- a/Handler/Common.hs +++ b/Handler/Common.hs @@ -70,12 +70,14 @@ itemForm proto identView = do (boughtRes, boughtWidget) <- dayForm (Just . fromMaybe (DateKnown today) $ itemBought <$> proto) $ DayFormConfig False True True (expiresRes, expiresWidget) <- dayForm (itemExpires <$> proto) $ DayFormConfig True False True (openedRes, openedWidget) <- dayForm (itemOpened <$> proto) $ DayFormConfig True True True + ((fmap $ fromMaybe False -> runningLowRes), runningLowWidget) <- mopt checkBoxField "" . Just . Just . fromMaybe False $ fmap itemRunningLow proto let itemRes = do itemKind <- kindRes itemBought <- boughtRes itemExpires <- expiresRes itemOpened <- openedRes + itemRunningLow <- runningLowRes t <- typeRes return $ Item{ itemNormKind = normalizeKind itemKind, ..} `WithType` t @@ -87,6 +89,11 @@ itemForm proto identView = do
^{boughtWidget}
^{expiresWidget}
^{openedWidget} +
+
    +
  • ^{fvInput runningLowWidget} # +