Display posting tags in hledger-web
This commit is contained in:
parent
e5ac735110
commit
10c71cb447
@ -33,6 +33,7 @@ getJournalR = do
|
||||
entriesReport rspec j
|
||||
transactionFrag = transactionFragment j
|
||||
isVisibleTag = not . isHiddenTagName . fst
|
||||
isPostingTag account tag = not $ tag `elem` journalInheritedAccountTags j account
|
||||
|
||||
defaultLayout $ do
|
||||
setTitle "päiväkirja - hledger-web"
|
||||
|
||||
@ -214,7 +214,7 @@ ul {
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.transaction .posting {
|
||||
.transaction .posting-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
@ -26,13 +26,23 @@ $if elem AddPermission perms
|
||||
#{tagValue}
|
||||
|
||||
<ul .postings>
|
||||
$forall Posting { paccount = acc, pamount = amt } <- tpostings torig
|
||||
$forall Posting { paccount = acc, pamount = amt, ptags = tags } <- tpostings torig
|
||||
<li .posting>
|
||||
<div .account>
|
||||
<a href="@?{acctlink acc}##{tindex torig}" title="#{acc}">
|
||||
#{elideAccountName 40 acc}
|
||||
<div .amount style="text-align:right;">
|
||||
^{mixedAmountAsHtml amt}
|
||||
<div .posting-row>
|
||||
<div .account>
|
||||
<a href="@?{acctlink acc}##{tindex torig}" title="#{acc}">
|
||||
#{elideAccountName 40 acc}
|
||||
<div .amount style="text-align:right;">
|
||||
^{mixedAmountAsHtml amt}
|
||||
$if null $ filter (isPostingTag acc) $ filter isVisibleTag tags
|
||||
$else
|
||||
<ul .tags>
|
||||
$forall (tagName, tagValue) <- filter (isPostingTag acc) $ filter isVisibleTag tags
|
||||
<li .tag title="#{mconcat [tagName, ": ", tagValue]}">
|
||||
<div .tag-name>
|
||||
#{tagName}
|
||||
<div .tag-value>
|
||||
#{tagValue}
|
||||
|
||||
$if elem AddPermission perms
|
||||
^{addModal AddR j today}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user