From 2ef0fc941510e21f6286153ab2858b2a419c4bb9 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins <matiss@mja.lv> Date: Fri, 11 Aug 2023 21:13:02 +0100 Subject: [PATCH] :bug: show all available transaction icons (#1508) --- .../transactions/TransactionsTable.js | 67 ++++++++++--------- upcoming-release-notes/1508.md | 6 ++ 2 files changed, 42 insertions(+), 31 deletions(-) create mode 100644 upcoming-release-notes/1508.md diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.js b/packages/desktop-client/src/components/transactions/TransactionsTable.js index 0967a1f60..9ad6be9bf 100644 --- a/packages/desktop-client/src/components/transactions/TransactionsTable.js +++ b/packages/desktop-client/src/components/transactions/TransactionsTable.js @@ -629,39 +629,44 @@ function PayeeIcons({ let recurring = schedule && schedule._date && !!schedule._date.frequency; - return schedule ? ( - <Button - type="bare" - style={buttonStyle} - onClick={e => { - e.stopPropagation(); - onNavigateToSchedule(scheduleId); - }} - > - {recurring ? ( - <ArrowsSynchronize style={scheduleIconStyle} /> - ) : ( - <CalendarIcon style={scheduleIconStyle} /> + return ( + <> + {schedule && ( + <Button + type="bare" + style={buttonStyle} + onClick={e => { + e.stopPropagation(); + onNavigateToSchedule(scheduleId); + }} + > + {recurring ? ( + <ArrowsSynchronize style={scheduleIconStyle} /> + ) : ( + <CalendarIcon style={scheduleIconStyle} /> + )} + </Button> )} - </Button> - ) : transferAccount ? ( - <Button - type="bare" - style={buttonStyle} - onClick={e => { - e.stopPropagation(); - if (!isTemporaryId(transaction.id)) { - onNavigateToTransferAccount(transferAccount.id); - } - }} - > - {(transaction._inverse ? -1 : 1) * transaction.amount > 0 ? ( - <LeftArrow2 style={transferIconStyle} /> - ) : ( - <RightArrow2 style={transferIconStyle} /> + {transferAccount && ( + <Button + type="bare" + style={buttonStyle} + onClick={e => { + e.stopPropagation(); + if (!isTemporaryId(transaction.id)) { + onNavigateToTransferAccount(transferAccount.id); + } + }} + > + {(transaction._inverse ? -1 : 1) * transaction.amount > 0 ? ( + <LeftArrow2 style={transferIconStyle} /> + ) : ( + <RightArrow2 style={transferIconStyle} /> + )} + </Button> )} - </Button> - ) : null; + </> + ); } const Transaction = memo(function Transaction(props) { diff --git a/upcoming-release-notes/1508.md b/upcoming-release-notes/1508.md new file mode 100644 index 000000000..2c5915127 --- /dev/null +++ b/upcoming-release-notes/1508.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [MatissJanis] +--- + +Show all available transaction icons - transfer & schedule -- GitLab