diff --git a/apps/client/src/app/pages/accounts/accounts-page.component.ts b/apps/client/src/app/pages/accounts/accounts-page.component.ts index ab03340df..7ef1ad7a0 100644 --- a/apps/client/src/app/pages/accounts/accounts-page.component.ts +++ b/apps/client/src/app/pages/accounts/accounts-page.component.ts @@ -16,6 +16,7 @@ import { Subject, Subscription } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { CreateOrUpdateAccountDialog } from './create-or-update-account-dialog/create-or-update-account-dialog.component'; +import { TransferCashBalanceDialog } from './transfer-cash-balance/transfer-cash-balance-dialog.component'; @Component({ host: { class: 'page' }, @@ -267,4 +268,21 @@ export class AccountsPageComponent implements OnDestroy, OnInit { this.router.navigate(['.'], { relativeTo: this.route }); }); } + + private transferCashBalanceDialog(): void { + const dialogRef = this.dialog.open(TransferCashBalanceDialog, { + data: { + accounts: this.accounts + }, + height: this.deviceType === 'mobile' ? '97.5vh' : '80vh', + width: this.deviceType === 'mobile' ? '100vw' : '50rem' + }); + + dialogRef + .afterClosed() + .pipe(takeUntil(this.unsubscribeSubject)) + .subscribe((data: any) => { + this.router.navigate(['.'], { relativeTo: this.route }); + }); + } } diff --git a/apps/client/src/app/pages/accounts/accounts-page.html b/apps/client/src/app/pages/accounts/accounts-page.html index 6057802df..a47366f08 100644 --- a/apps/client/src/app/pages/accounts/accounts-page.html +++ b/apps/client/src/app/pages/accounts/accounts-page.html @@ -24,7 +24,7 @@ class="fab-container" > + + + diff --git a/apps/client/src/app/pages/accounts/accounts-page.module.ts b/apps/client/src/app/pages/accounts/accounts-page.module.ts index 9edb43ba7..1749bbed9 100644 --- a/apps/client/src/app/pages/accounts/accounts-page.module.ts +++ b/apps/client/src/app/pages/accounts/accounts-page.module.ts @@ -8,6 +8,7 @@ import { GfAccountsTableModule } from '@ghostfolio/client/components/accounts-ta import { AccountsPageRoutingModule } from './accounts-page-routing.module'; import { AccountsPageComponent } from './accounts-page.component'; import { GfCreateOrUpdateAccountDialogModule } from './create-or-update-account-dialog/create-or-update-account-dialog.module'; +import { GfTransferCashBalanceDialogModule } from './transfer-cash-balance/transfer-cash-balance.module-dialog'; @NgModule({ declarations: [AccountsPageComponent], @@ -17,9 +18,10 @@ import { GfCreateOrUpdateAccountDialogModule } from './create-or-update-account- GfAccountDetailDialogModule, GfAccountsTableModule, GfCreateOrUpdateAccountDialogModule, + GfTransferCashBalanceDialogModule, MatButtonModule, RouterModule ], schemas: [CUSTOM_ELEMENTS_SCHEMA] }) -export class AccountsPageModule {} +export class AccountsPageModule { }