hledger-web-1.9: Web interface for the hledger accounting tool

Safe HaskellNone
LanguageHaskell2010

Foundation

Contents

Synopsis

Documentation

data App Source #

The site argument for your application. This can be a good place to keep settings and values requiring initialization before your application starts running, such as database connections. Every handler will have access to the data present here.

Constructors

App 

Fields

Instances

RouteAttrs App Source # 

Methods

routeAttrs :: Route App -> Set Text #

ParseRoute App Source # 

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route App) #

RenderRoute App Source # 

Associated Types

data Route App :: * #

Methods

renderRoute :: Route App -> ([Text], [(Text, Text)]) #

Yesod App Source # 
RenderMessage App FormMessage Source # 

Methods

renderMessage :: App -> [Lang] -> FormMessage -> Text #

RenderMessage App AppMessage Source # 

Methods

renderMessage :: App -> [Lang] -> AppMessage -> Text #

Eq (Route App) Source # 

Methods

(==) :: Route App -> Route App -> Bool #

(/=) :: Route App -> Route App -> Bool #

Read (Route App) Source # 
Show (Route App) Source # 
data Route App Source # 

data AppMessage Source #

Constructors

MsgHello 

Creates the route datatype AppRoute. Every valid URL in your

Creates the associated type:

Creates the value resourcesApp which contains information on the

type AppRoute = Route App Source #

A convenience alias.

getExtra :: Handler Extra Source #

Get the Extra value, used to hold data from the settings.yml file.

data ViewData Source #

A bundle of data useful for hledger-web request handlers and templates.

Constructors

VD 

Fields

  • opts :: WebOpts

    the command-line options at startup

  • here :: AppRoute

    the current route

  • msg :: Maybe Html

    the current UI message if any, possibly from the current request

  • today :: Day

    today's date (for queries containing relative dates)

  • j :: Journal

    the up-to-date parsed unfiltered journal

  • q :: String

    the current q parameter, the main query expression

  • m :: Query

    a query parsed from the q parameter

  • qopts :: [QueryOpt]

    query options parsed from the q parameter

  • am :: Query

    a query parsed from the accounts sidebar query expr ("a" parameter)

  • aopts :: [QueryOpt]

    query options parsed from the accounts sidebar query expr

  • showpostings :: Bool

    current p parameter, 1 or 0 shows/hides all postings where applicable

  • showsidebar :: Bool

    current showsidebar cookie value

nullviewdata :: ViewData Source #

Make a default ViewData, using day 0 as today's date.

viewdataWithDateAndParams :: Day -> String -> String -> String -> ViewData Source #

Make a ViewData using the given date and request parameters, and defaults elsewhere.

getViewData :: Handler ViewData Source #

Gather data used by handlers and templates in the current request.

getLastMessage :: Handler (Maybe Html) Source #

Get the message that was set by the last request, in a referentially transparent manner (allowing multiple reads).

addform :: Text -> ViewData -> HtmlUrl AppRoute Source #

Add transaction form.

Orphan instances