summaryrefslogtreecommitdiff
path: root/Handler
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-28 14:56:52 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-28 14:56:52 +0200
commitd28c483bdba02cf4163e99efcb07f2ee525ddda1 (patch)
treef9becdc79bcb6495e462ec2f17762a63182dbc2a /Handler
parentde1513a40da72632b500c710c5254c8e3639b7bd (diff)
downloadbar-d28c483bdba02cf4163e99efcb07f2ee525ddda1.tar
bar-d28c483bdba02cf4163e99efcb07f2ee525ddda1.tar.gz
bar-d28c483bdba02cf4163e99efcb07f2ee525ddda1.tar.bz2
bar-d28c483bdba02cf4163e99efcb07f2ee525ddda1.tar.xz
bar-d28c483bdba02cf4163e99efcb07f2ee525ddda1.zip
Implement list view
Diffstat (limited to 'Handler')
-rw-r--r--Handler/Common.hs2
-rw-r--r--Handler/InventoryList.hs12
2 files changed, 13 insertions, 1 deletions
diff --git a/Handler/Common.hs b/Handler/Common.hs
index 4f02e3c..73ce9ba 100644
--- a/Handler/Common.hs
+++ b/Handler/Common.hs
@@ -11,7 +11,7 @@ module Handler.Common
11 , FormState(..) 11 , FormState(..)
12 , HasFormState(..) 12 , HasFormState(..)
13 , stockSort, referenceSort 13 , stockSort, referenceSort
14 , humanId 14 , humanId, dayFormat
15 ) where 15 ) where
16 16
17import Import hiding ((\\)) 17import Import hiding ((\\))
diff --git a/Handler/InventoryList.hs b/Handler/InventoryList.hs
new file mode 100644
index 0000000..518d910
--- /dev/null
+++ b/Handler/InventoryList.hs
@@ -0,0 +1,12 @@
1module Handler.InventoryList where
2
3import Import
4import Handler.Common
5
6import Data.Time.Calendar
7
8getInventoryListR :: Handler Html
9getInventoryListR = do
10 (stockSort -> stock) <- runDB $ withTypes =<< selectList [] []
11 today <- utctDay <$> liftIO getCurrentTime
12 defaultLayout $(widgetFile "inventoryList")