|
@ -27,7 +27,7 @@ import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
import { Subject, Subscription } from 'rxjs'; |
|
|
import { Subject, Subscription } from 'rxjs'; |
|
|
import { takeUntil } from 'rxjs/operators'; |
|
|
import { takeUntil } from 'rxjs/operators'; |
|
|
|
|
|
|
|
|
import { GfCreateOrUpdateActivityDialog } from './create-or-update-activity-dialog/create-or-update-activity-dialog.component'; |
|
|
import { GfCreateOrUpdateActivityDialogComponent } from './create-or-update-activity-dialog/create-or-update-activity-dialog.component'; |
|
|
import { GfImportActivitiesDialogComponent } from './import-activities-dialog/import-activities-dialog.component'; |
|
|
import { GfImportActivitiesDialogComponent } from './import-activities-dialog/import-activities-dialog.component'; |
|
|
import { ImportActivitiesDialogParams } from './import-activities-dialog/interfaces/interfaces'; |
|
|
import { ImportActivitiesDialogParams } from './import-activities-dialog/interfaces/interfaces'; |
|
|
|
|
|
|
|
@ -306,15 +306,18 @@ export class GfActivitiesPageComponent implements OnDestroy, OnInit { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public openUpdateActivityDialog(aActivity: Activity) { |
|
|
public openUpdateActivityDialog(aActivity: Activity) { |
|
|
const dialogRef = this.dialog.open(GfCreateOrUpdateActivityDialog, { |
|
|
const dialogRef = this.dialog.open( |
|
|
data: { |
|
|
GfCreateOrUpdateActivityDialogComponent, |
|
|
activity: aActivity, |
|
|
{ |
|
|
accounts: this.user?.accounts, |
|
|
data: { |
|
|
user: this.user |
|
|
activity: aActivity, |
|
|
}, |
|
|
accounts: this.user?.accounts, |
|
|
height: this.deviceType === 'mobile' ? '98vh' : '80vh', |
|
|
user: this.user |
|
|
width: this.deviceType === 'mobile' ? '100vw' : '50rem' |
|
|
}, |
|
|
}); |
|
|
height: this.deviceType === 'mobile' ? '98vh' : '80vh', |
|
|
|
|
|
width: this.deviceType === 'mobile' ? '100vw' : '50rem' |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
dialogRef |
|
|
dialogRef |
|
|
.afterClosed() |
|
|
.afterClosed() |
|
@ -347,23 +350,26 @@ export class GfActivitiesPageComponent implements OnDestroy, OnInit { |
|
|
.subscribe((user) => { |
|
|
.subscribe((user) => { |
|
|
this.updateUser(user); |
|
|
this.updateUser(user); |
|
|
|
|
|
|
|
|
const dialogRef = this.dialog.open(GfCreateOrUpdateActivityDialog, { |
|
|
const dialogRef = this.dialog.open( |
|
|
data: { |
|
|
GfCreateOrUpdateActivityDialogComponent, |
|
|
accounts: this.user?.accounts, |
|
|
{ |
|
|
activity: { |
|
|
data: { |
|
|
...aActivity, |
|
|
accounts: this.user?.accounts, |
|
|
accountId: aActivity?.accountId, |
|
|
activity: { |
|
|
date: new Date(), |
|
|
...aActivity, |
|
|
id: null, |
|
|
accountId: aActivity?.accountId, |
|
|
fee: 0, |
|
|
date: new Date(), |
|
|
type: aActivity?.type ?? 'BUY', |
|
|
id: null, |
|
|
unitPrice: null |
|
|
fee: 0, |
|
|
|
|
|
type: aActivity?.type ?? 'BUY', |
|
|
|
|
|
unitPrice: null |
|
|
|
|
|
}, |
|
|
|
|
|
user: this.user |
|
|
}, |
|
|
}, |
|
|
user: this.user |
|
|
height: this.deviceType === 'mobile' ? '98vh' : '80vh', |
|
|
}, |
|
|
width: this.deviceType === 'mobile' ? '100vw' : '50rem' |
|
|
height: this.deviceType === 'mobile' ? '98vh' : '80vh', |
|
|
} |
|
|
width: this.deviceType === 'mobile' ? '100vw' : '50rem' |
|
|
); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
dialogRef |
|
|
dialogRef |
|
|
.afterClosed() |
|
|
.afterClosed() |
|
|