From: Paul Hänsch Date: Tue, 14 May 2024 10:31:01 +0000 (+0200) Subject: transaction list on account page X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=d55c2e8d7ae537ef9f6365ff620a08d3fa7aa79c;p=confetti transaction list on account page --- diff --git a/ledgers/account.sh b/ledgers/account.sh index 2cc279b..a92694f 100755 --- a/ledgers/account.sh +++ b/ledgers/account.sh @@ -16,9 +16,9 @@ if [ ! -f "$cardfile" ]; then REDIRECT "${_BASE}/ledgers/" fi -{ - card="$(pdi_load "$cardfile")" +{ card="$(pdi_load "$cardfile")" cat <<-EOF + [h1 $(l10n Payments)] [div .card #${cardfile##*/} [div .section .basic . $( card_item "$card" FN GENDER NICKNAME BDAY X-ZACK-JOINDATE X-ZACK-LEAVEDATE SOUND PHOTO LOGO @@ -36,6 +36,19 @@ fi $(card_item "$card" CATEGORIES) ] ] + [ul .transactions + $(cnt="$(pdi_count "$card" X-IBAN)" + while [ "$cnt" -gt 0 ]; do + pdi_value X-IBAN "$cnt" |RXLITERAL + cnt=$((cnt - 1)) + done \ + | while read -r iban; do + printf '[li . ' + grep -E "^[^\t]+ [^\t]+ ${iban} " |HTML + printf ']' + done + )] EOF + } \ | yield_page ledgers