diff --git a/Handler/Home.hs b/Handler/Home.hs index b6a6865..419336e 100644 --- a/Handler/Home.hs +++ b/Handler/Home.hs @@ -31,6 +31,7 @@ getHomeR = do beverages <- runDB $ selectList [BeverageAmount !=. 0] [Desc BeverageIdent] today <- liftIO $ utctDay <$> getCurrentTime users <- runDB $ selectList [UserTimestamp >=. addDays (-30) today] [Asc UserIdent] + ousers <- runDB $ selectList [UserTimestamp <. addDays (-30) today] [Asc UserIdent] defaultLayout $ do addScript $ StaticR js_barcode_js $(widgetFile "home") diff --git a/templates/home.hamlet b/templates/home.hamlet index d1763eb..be953aa 100644 --- a/templates/home.hamlet +++ b/templates/home.hamlet @@ -20,9 +20,10 @@ $forall (Entity uId user) <- users

_{MsgCreateUser} -

- -

_{MsgReactivateOldUser} +$if not (null ousers) +

+ +

_{MsgReactivateOldUser}