summaryrefslogtreecommitdiff
path: root/Handler
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-28 13:53:46 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-28 13:53:46 +0200
commitde1513a40da72632b500c710c5254c8e3639b7bd (patch)
treed5e4cb9847642b05a1ffbbfed774dc7caeb618f7 /Handler
parent72b9f29c057eb45d022b9bbc1562d7b84ccc165b (diff)
downloadbar-de1513a40da72632b500c710c5254c8e3639b7bd.tar
bar-de1513a40da72632b500c710c5254c8e3639b7bd.tar.gz
bar-de1513a40da72632b500c710c5254c8e3639b7bd.tar.bz2
bar-de1513a40da72632b500c710c5254c8e3639b7bd.tar.xz
bar-de1513a40da72632b500c710c5254c8e3639b7bd.zip
Fix updating running low
Diffstat (limited to 'Handler')
-rw-r--r--Handler/Common.hs2
-rw-r--r--Handler/Item.hs1
-rw-r--r--Handler/UpdateItem.hs1
3 files changed, 3 insertions, 1 deletions
diff --git a/Handler/Common.hs b/Handler/Common.hs
index 799f692..4f02e3c 100644
--- a/Handler/Common.hs
+++ b/Handler/Common.hs
@@ -91,7 +91,7 @@ itemForm proto identView = do
91 <div .td>^{openedWidget} 91 <div .td>^{openedWidget}
92 <div .td> 92 <div .td>
93 <ul .status> 93 <ul .status>
94 <li>^{fvInput runningLowWidget} # 94 <li>^{fvInput runningLowWidget}
95 <label for=#{fvId runningLowWidget}> 95 <label for=#{fvId runningLowWidget}>
96 Running low 96 Running low
97 |] 97 |]
diff --git a/Handler/Item.hs b/Handler/Item.hs
index abb1b12..2530275 100644
--- a/Handler/Item.hs
+++ b/Handler/Item.hs
@@ -18,6 +18,7 @@ putItemR itemId = do
18 , ItemBought =. itemBought 18 , ItemBought =. itemBought
19 , ItemExpires =. itemExpires 19 , ItemExpires =. itemExpires
20 , ItemOpened =. itemOpened 20 , ItemOpened =. itemOpened
21 , ItemRunningLow =. itemRunningLow
21 ]) 22 ])
22 update (itemFkType $ entityVal entity) [ KindType =. t ] 23 update (itemFkType $ entityVal entity) [ KindType =. t ]
23 withType entity 24 withType entity
diff --git a/Handler/UpdateItem.hs b/Handler/UpdateItem.hs
index b4c8713..ce6b30d 100644
--- a/Handler/UpdateItem.hs
+++ b/Handler/UpdateItem.hs
@@ -19,6 +19,7 @@ postUpdateItemR fsUpdateId = do
19 , ItemBought =. itemBought 19 , ItemBought =. itemBought
20 , ItemExpires =. itemExpires 20 , ItemExpires =. itemExpires
21 , ItemOpened =. itemOpened 21 , ItemOpened =. itemOpened
22 , ItemRunningLow =. itemRunningLow
22 ] 23 ]
23 return () 24 return ()
24 FormFailure errors -> mapM_ (addMessage "formError" . toHtml) errors 25 FormFailure errors -> mapM_ (addMessage "formError" . toHtml) errors