Fix transaction visibility without add permission
This commit is contained in:
parent
ef936a0733
commit
ab1e176010
@ -6,82 +6,82 @@ $if elem AddPermission perms
|
||||
data-toggle="modal" data-target="#addmodal" title="Lisää uusi tapahtuma kirjanpitoon.">
|
||||
Kirjaa tapahtuma
|
||||
|
||||
<ol .transactionsreport .list-unstyled>
|
||||
$forall torig <- items
|
||||
<li .transaction ##{transactionFrag torig}>
|
||||
<div .title title="#{showTransaction torig}">
|
||||
$with (payee, note) <- payeeAndNoteFromDescription' $ tdescription torig
|
||||
<details .elided-text .transaction-metarow>
|
||||
<ol .transactionsreport .list-unstyled>
|
||||
$forall torig <- items
|
||||
<li .transaction ##{transactionFrag torig}>
|
||||
<div .title title="#{showTransaction torig}">
|
||||
$with (payee, note) <- payeeAndNoteFromDescription' $ tdescription torig
|
||||
<details .elided-text .transaction-metarow>
|
||||
<summary>
|
||||
<time .date datetime="#{show (tdate torig)}" nowrap>
|
||||
#{show (tdate torig)}
|
||||
<div .status>
|
||||
$case tstatus torig
|
||||
$of Unmarked
|
||||
<div .status-unmarked title="Tarkistamaton" aria-label="Tarkistamaton">
|
||||
$of Pending
|
||||
<div .status-pending title="Kesken" aria-label="Kesken">
|
||||
$of Cleared
|
||||
<div .status-cleared title="Tarkistettu" aria-label="Tarkistettu">
|
||||
$if not $ T.null $ tcode torig
|
||||
<div .transaction-code>
|
||||
<a href=@?{addCodeQuery $ tcode torig} .filter>
|
||||
(#{tcode torig})
|
||||
$if not $ T.null $ T.strip payee
|
||||
<span .transaction-payee>
|
||||
<a href=@?{addPayeeQuery payee} .filter>
|
||||
#{payee}
|
||||
$if not $ T.null $ T.strip note
|
||||
<details .transaction-note .elided-text>
|
||||
<summary>
|
||||
<time .date datetime="#{show (tdate torig)}" nowrap>
|
||||
#{show (tdate torig)}
|
||||
<div .status>
|
||||
$case tstatus torig
|
||||
$of Unmarked
|
||||
<div .status-unmarked title="Tarkistamaton" aria-label="Tarkistamaton">
|
||||
$of Pending
|
||||
<div .status-pending title="Kesken" aria-label="Kesken">
|
||||
$of Cleared
|
||||
<div .status-cleared title="Tarkistettu" aria-label="Tarkistettu">
|
||||
$if not $ T.null $ tcode torig
|
||||
<div .transaction-code>
|
||||
<a href=@?{addCodeQuery $ tcode torig} .filter>
|
||||
(#{tcode torig})
|
||||
$if not $ T.null $ T.strip payee
|
||||
<span .transaction-payee>
|
||||
<a href=@?{addPayeeQuery payee} .filter>
|
||||
#{payee}
|
||||
$if not $ T.null $ T.strip note
|
||||
<details .transaction-note .elided-text>
|
||||
<summary>
|
||||
#{note}
|
||||
#{note}
|
||||
|
||||
$if null $ filter isVisibleTag $ ttags torig
|
||||
$else
|
||||
<ul .tags>
|
||||
$forall (tagName, tagValue) <- filter isVisibleTag $ ttags torig
|
||||
<li .tag title="#{mconcat [tagName, ": ", tagValue]}">
|
||||
<div .tag-name>
|
||||
<a href=@?{addTagQuery tagName tagValue} .filter>
|
||||
#{tagName}
|
||||
$if not $ T.null $ T.strip tagValue
|
||||
<div .tag-value>
|
||||
$if isAbsoluteURI tagValue
|
||||
<a href="#{tagValue}">#{tagValue}
|
||||
$elseif tagName == "tosite"
|
||||
<a href="@{documentRoute tagValue}">#{tagValue}
|
||||
$else
|
||||
#{tagValue}
|
||||
$if null $ filter isVisibleTag $ ttags torig
|
||||
$else
|
||||
<ul .tags>
|
||||
$forall (tagName, tagValue) <- filter isVisibleTag $ ttags torig
|
||||
<li .tag title="#{mconcat [tagName, ": ", tagValue]}">
|
||||
<div .tag-name>
|
||||
<a href=@?{addTagQuery tagName tagValue} .filter>
|
||||
#{tagName}
|
||||
$if not $ T.null $ T.strip tagValue
|
||||
<div .tag-value>
|
||||
$if isAbsoluteURI tagValue
|
||||
<a href="#{tagValue}">#{tagValue}
|
||||
$elseif tagName == "tosite"
|
||||
<a href="@{documentRoute tagValue}">#{tagValue}
|
||||
$else
|
||||
#{tagValue}
|
||||
|
||||
<ul .postings>
|
||||
$forall Posting { paccount = acc, pamount = amt, pbalanceassertion = passert, ptags = tags } <- tpostings torig
|
||||
<li .posting>
|
||||
<div .posting-row>
|
||||
<div .account>
|
||||
<a href="@?{acctlink acc}##{tindex torig}" title="#{acc}">
|
||||
#{elideAccountName 40 acc}
|
||||
<div .amount style="text-align:right;">
|
||||
<span .posted-amount>
|
||||
^{mixedAmountAsHtml amt}
|
||||
$maybe BalanceAssertion { baamount = assertAmt } <- passert
|
||||
<span .balance-assertion>
|
||||
jälkeen ^{mixedAmountAsHtml $ mixedAmount assertAmt}
|
||||
$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>
|
||||
<a href=@?{addTagQuery tagName tagValue} .filter>
|
||||
#{tagName}
|
||||
$if not $ T.null $ T.strip tagValue
|
||||
<div .tag-value>
|
||||
$if isAbsoluteURI tagValue
|
||||
<a href="#{tagValue}">#{tagValue}
|
||||
$elseif tagName == "tosite"
|
||||
<a href="@{documentRoute tagValue}">#{tagValue}
|
||||
$else
|
||||
#{tagValue}
|
||||
<ul .postings>
|
||||
$forall Posting { paccount = acc, pamount = amt, pbalanceassertion = passert, ptags = tags } <- tpostings torig
|
||||
<li .posting>
|
||||
<div .posting-row>
|
||||
<div .account>
|
||||
<a href="@?{acctlink acc}##{tindex torig}" title="#{acc}">
|
||||
#{elideAccountName 40 acc}
|
||||
<div .amount style="text-align:right;">
|
||||
<span .posted-amount>
|
||||
^{mixedAmountAsHtml amt}
|
||||
$maybe BalanceAssertion { baamount = assertAmt } <- passert
|
||||
<span .balance-assertion>
|
||||
jälkeen ^{mixedAmountAsHtml $ mixedAmount assertAmt}
|
||||
$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>
|
||||
<a href=@?{addTagQuery tagName tagValue} .filter>
|
||||
#{tagName}
|
||||
$if not $ T.null $ T.strip tagValue
|
||||
<div .tag-value>
|
||||
$if isAbsoluteURI tagValue
|
||||
<a href="#{tagValue}">#{tagValue}
|
||||
$elseif tagName == "tosite"
|
||||
<a href="@{documentRoute tagValue}">#{tagValue}
|
||||
$else
|
||||
#{tagValue}
|
||||
|
||||
$if elem AddPermission perms
|
||||
^{addModal AddR j today}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user