From d28c483bdba02cf4163e99efcb07f2ee525ddda1 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 28 Mar 2017 14:56:52 +0200 Subject: Implement list view --- Handler/Common.hs | 2 +- Handler/InventoryList.hs | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Handler/InventoryList.hs (limited to 'Handler') 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 , FormState(..) , HasFormState(..) , stockSort, referenceSort - , humanId + , humanId, dayFormat ) where import 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 @@ +module Handler.InventoryList where + +import Import +import Handler.Common + +import Data.Time.Calendar + +getInventoryListR :: Handler Html +getInventoryListR = do + (stockSort -> stock) <- runDB $ withTypes =<< selectList [] [] + today <- utctDay <$> liftIO getCurrentTime + defaultLayout $(widgetFile "inventoryList") -- cgit v1.2.3