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 {
balances: balances.map(({ comment, date, value }) => {
return { comment, value, date: date.toISOString() };
}),
balances: balances.map(
({ comment: balanceComment, date, value }) => {
return {
...(balanceComment ? { comment: balanceComment } : {}),
value,
date: date.toISOString()
};
}
),
comment,
currency,
id,

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

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

Loading…
Cancel
Save