|
|
@ -38,6 +38,7 @@ import { |
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
import { |
|
|
import { |
|
|
|
|
|
AccountWithPlatform, |
|
|
AccountWithValue, |
|
|
AccountWithValue, |
|
|
OrderWithAccount, |
|
|
OrderWithAccount, |
|
|
UserWithSettings |
|
|
UserWithSettings |
|
|
@ -769,11 +770,14 @@ export class ImportService { |
|
|
userId: user.id |
|
|
userId: user.id |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const accounts = (await this.accountService.getAccounts(user.id)).map( |
|
|
const accounts: Pick<AccountWithPlatform, 'id' | 'name' | 'platform'>[] = ( |
|
|
({ id, name }) => { |
|
|
await this.accountService.accounts({ |
|
|
return { id, name }; |
|
|
include: { platform: true }, |
|
|
} |
|
|
where: { userId: user.id } |
|
|
); |
|
|
}) |
|
|
|
|
|
).map(({ id, name, platform }) => { |
|
|
|
|
|
return { id, name, platform }; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if (isDryRun) { |
|
|
if (isDryRun) { |
|
|
accountsWithBalancesDto |
|
|
accountsWithBalancesDto |
|
|
@ -888,7 +892,7 @@ export class ImportService { |
|
|
let order: |
|
|
let order: |
|
|
| OrderWithAccount |
|
|
| OrderWithAccount |
|
|
| (Omit<OrderWithAccount, 'account' | 'SymbolProfile' | 'tags'> & { |
|
|
| (Omit<OrderWithAccount, 'account' | 'SymbolProfile' | 'tags'> & { |
|
|
account?: { id: string; name: string }; |
|
|
account?: Pick<AccountWithPlatform, 'id' | 'name' | 'platform'>; |
|
|
tags?: { id: string; name: string }[]; |
|
|
tags?: { id: string; name: string }[]; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|