Browse Source

Add comment to account balance

pull/8416/head
Thomas Kaul 3 weeks ago
parent
commit
44da7cec82
  1. 12
      apps/api/src/app/endpoints/export/export.service.ts
  2. 2
      libs/common/src/lib/interfaces/account-balance.interface.ts

12
apps/api/src/app/endpoints/export/export.service.ts

@ -116,9 +116,15 @@ export class ExportService {
} }
return { return {
balances: balances.map(({ comment, date, value }) => { balances: balances.map(
return { comment, value, date: date.toISOString() }; ({ comment: balanceComment, date, value }) => {
}), return {
...(balanceComment ? { comment: balanceComment } : {}),
value,
date: date.toISOString()
};
}
),
comment, comment,
currency, currency,
id, id,

2
libs/common/src/lib/interfaces/account-balance.interface.ts

@ -1,5 +1,5 @@
export interface AccountBalance { export interface AccountBalance {
comment: string | null; comment?: string;
date: string; date: string;
value: number; value: number;
} }

Loading…
Cancel
Save