diff --git a/Handler/Item.hs b/Handler/Item.hs index baa9b7d..3fac24c 100644 --- a/Handler/Item.hs +++ b/Handler/Item.hs @@ -1,6 +1,7 @@ module Handler.Item where import Import +import Yesod.Default.Util (widgetFileReload) itemsPerPage :: Int itemsPerPage = 100 @@ -17,77 +18,6 @@ getItemPagedR tid page let offset = itemsPerPage * page let maxPages = total `div` itemsPerPage let paginatePages = [1..maxPages+1] - loginLayout user $ [whamlet| -
- $if page > 0 -
#{itemsPerPage} Transactions (starting at #{offset}) of #{total} - $else -
#{itemsPerPage} Transactions of #{total} - - - -
Time - P/C - B/S - Item - ## - ISK/Item - ISK total - ISK profit - % - Time - Client - Station - ? - - $forall Entity _ t <- items -
#{showDateTime $ transactionDateTime $ t} - $if transactionTransForCorp t - C - $else - P - $if transactionTransIsSell t - S - $else - B - #{transactionTypeName t} - #{transactionQuantity t} - #{prettyISK $ transactionPriceCents t} - #{prettyISK $ transactionQuantity t * transactionPriceCents t} - $maybe profit <- transRealProfit t - $if (&&) (transactionTransIsSell t) (profit > 0) - - #{prettyISK $ profit} - $elseif (&&) (transactionTransIsSell t) (profit < 0) - - #{prettyISK $ profit} - $elseif not (transactionTransIsSell t) - - #{prettyISK $ profit} - $else - - #{prettyISK $ profit} - - #{profitPercent profit t}% - $nothing - - - - - - $maybe secs <- transactionSecondsToSell t - #{showSecsToSell secs} - $nothing -   - #{transactionClientName t} - #{transactionStationName t} - - -