Browse Source

feat(client): rename dialog components

pull/5212/head
KenTandrian 2 days ago
parent
commit
de9041c533
  1. 13
      apps/client/src/app/components/admin-market-data/admin-market-data.component.ts
  2. 6
      apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts
  3. 4
      apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts
  4. 16
      apps/client/src/app/components/admin-platform/admin-platform.component.ts
  5. 4
      apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.component.ts
  6. 6
      apps/client/src/app/components/admin-tag/admin-tag.component.ts
  7. 4
      apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.component.ts

13
apps/client/src/app/components/admin-market-data/admin-market-data.component.ts

@ -67,9 +67,9 @@ import { Subject } from 'rxjs';
import { distinctUntilChanged, switchMap, takeUntil } from 'rxjs/operators';
import { AdminMarketDataService } from './admin-market-data.service';
import { GfAssetProfileDialog } from './asset-profile-dialog/asset-profile-dialog.component';
import { GfAssetProfileDialogComponent } from './asset-profile-dialog/asset-profile-dialog.component';
import { AssetProfileDialogParams } from './asset-profile-dialog/interfaces/interfaces';
import { CreateAssetProfileDialog } from './create-asset-profile-dialog/create-asset-profile-dialog.component';
import { GfCreateAssetProfileDialogComponent } from './create-asset-profile-dialog/create-asset-profile-dialog.component';
import { CreateAssetProfileDialogParams } from './create-asset-profile-dialog/interfaces/interfaces';
@Component({
@ -422,7 +422,7 @@ export class GfAdminMarketDataComponent
.subscribe((user) => {
this.user = user;
const dialogRef = this.dialog.open(GfAssetProfileDialog, {
const dialogRef = this.dialog.open(GfAssetProfileDialogComponent, {
autoFocus: false,
data: {
dataSource,
@ -457,14 +457,17 @@ export class GfAdminMarketDataComponent
.subscribe((user) => {
this.user = user;
const dialogRef = this.dialog.open(CreateAssetProfileDialog, {
const dialogRef = this.dialog.open(
GfCreateAssetProfileDialogComponent,
{
autoFocus: false,
data: {
deviceType: this.deviceType,
locale: this.user?.settings?.locale
} as CreateAssetProfileDialogParams,
width: this.deviceType === 'mobile' ? '100vw' : '50rem'
});
}
);
dialogRef
.afterClosed()

6
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts

@ -116,7 +116,7 @@ import {
templateUrl: 'asset-profile-dialog.html',
styleUrls: ['./asset-profile-dialog.component.scss']
})
export class GfAssetProfileDialog implements OnDestroy, OnInit {
export class GfAssetProfileDialogComponent implements OnDestroy, OnInit {
private static readonly HISTORICAL_DATA_TEMPLATE = `date;marketPrice\n${format(
new Date(),
DATE_FORMAT
@ -220,7 +220,7 @@ export class GfAssetProfileDialog implements OnDestroy, OnInit {
private changeDetectorRef: ChangeDetectorRef,
@Inject(MAT_DIALOG_DATA) public data: AssetProfileDialogParams,
private dataService: DataService,
public dialogRef: MatDialogRef<GfAssetProfileDialog>,
public dialogRef: MatDialogRef<GfAssetProfileDialogComponent>,
private formBuilder: FormBuilder,
private notificationService: NotificationService,
private snackBar: MatSnackBar,
@ -347,7 +347,7 @@ export class GfAssetProfileDialog implements OnDestroy, OnInit {
),
currency: this.assetProfile?.currency,
historicalData: {
csvString: GfAssetProfileDialog.HISTORICAL_DATA_TEMPLATE
csvString: GfAssetProfileDialogComponent.HISTORICAL_DATA_TEMPLATE
},
isActive: this.assetProfile?.isActive,
name: this.assetProfile.name ?? this.assetProfile.symbol,

4
apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts

@ -51,7 +51,7 @@ import { CreateAssetProfileDialogMode } from './interfaces/interfaces';
styleUrls: ['./create-asset-profile-dialog.component.scss'],
templateUrl: 'create-asset-profile-dialog.html'
})
export class CreateAssetProfileDialog implements OnInit, OnDestroy {
export class GfCreateAssetProfileDialogComponent implements OnInit, OnDestroy {
public createAssetProfileForm: FormGroup;
public mode: CreateAssetProfileDialogMode;
@ -62,7 +62,7 @@ export class CreateAssetProfileDialog implements OnInit, OnDestroy {
public readonly adminService: AdminService,
private readonly changeDetectorRef: ChangeDetectorRef,
private readonly dataService: DataService,
public readonly dialogRef: MatDialogRef<CreateAssetProfileDialog>,
public readonly dialogRef: MatDialogRef<GfCreateAssetProfileDialogComponent>,
public readonly formBuilder: FormBuilder
) {}

16
apps/client/src/app/components/admin-platform/admin-platform.component.ts

@ -33,7 +33,7 @@ import { get } from 'lodash';
import { DeviceDetectorService } from 'ngx-device-detector';
import { Subject, takeUntil } from 'rxjs';
import { CreateOrUpdatePlatformDialog } from './create-or-update-platform-dialog/create-or-update-platform-dialog.component';
import { GfCreateOrUpdatePlatformDialogComponent } from './create-or-update-platform-dialog/create-or-update-platform-dialog.component';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
@ -153,7 +153,9 @@ export class GfAdminPlatformComponent implements OnInit, OnDestroy {
}
private openCreatePlatformDialog() {
const dialogRef = this.dialog.open(CreateOrUpdatePlatformDialog, {
const dialogRef = this.dialog.open(
GfCreateOrUpdatePlatformDialogComponent,
{
data: {
platform: {
name: null,
@ -162,7 +164,8 @@ export class GfAdminPlatformComponent implements OnInit, OnDestroy {
},
height: this.deviceType === 'mobile' ? '98vh' : undefined,
width: this.deviceType === 'mobile' ? '100vw' : '50rem'
});
}
);
dialogRef
.afterClosed()
@ -189,7 +192,9 @@ export class GfAdminPlatformComponent implements OnInit, OnDestroy {
}
private openUpdatePlatformDialog({ id, name, url }) {
const dialogRef = this.dialog.open(CreateOrUpdatePlatformDialog, {
const dialogRef = this.dialog.open(
GfCreateOrUpdatePlatformDialogComponent,
{
data: {
platform: {
id,
@ -199,7 +204,8 @@ export class GfAdminPlatformComponent implements OnInit, OnDestroy {
},
height: this.deviceType === 'mobile' ? '98vh' : undefined,
width: this.deviceType === 'mobile' ? '100vw' : '50rem'
});
}
);
dialogRef
.afterClosed()

4
apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.component.ts

@ -44,14 +44,14 @@ import { CreateOrUpdatePlatformDialogParams } from './interfaces/interfaces';
styleUrls: ['./create-or-update-platform-dialog.scss'],
templateUrl: 'create-or-update-platform-dialog.html'
})
export class CreateOrUpdatePlatformDialog implements OnDestroy {
export class GfCreateOrUpdatePlatformDialogComponent implements OnDestroy {
public platformForm: FormGroup;
private unsubscribeSubject = new Subject<void>();
public constructor(
@Inject(MAT_DIALOG_DATA) public data: CreateOrUpdatePlatformDialogParams,
public dialogRef: MatDialogRef<CreateOrUpdatePlatformDialog>,
public dialogRef: MatDialogRef<GfCreateOrUpdatePlatformDialogComponent>,
private formBuilder: FormBuilder
) {
this.platformForm = this.formBuilder.group({

6
apps/client/src/app/components/admin-tag/admin-tag.component.ts

@ -31,7 +31,7 @@ import { get } from 'lodash';
import { DeviceDetectorService } from 'ngx-device-detector';
import { Subject, takeUntil } from 'rxjs';
import { CreateOrUpdateTagDialog } from './create-or-update-tag-dialog/create-or-update-tag-dialog.component';
import { GfCreateOrUpdateTagDialogComponent } from './create-or-update-tag-dialog/create-or-update-tag-dialog.component';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
@ -149,7 +149,7 @@ export class GfAdminTagComponent implements OnInit, OnDestroy {
}
private openCreateTagDialog() {
const dialogRef = this.dialog.open(CreateOrUpdateTagDialog, {
const dialogRef = this.dialog.open(GfCreateOrUpdateTagDialogComponent, {
data: {
tag: {
name: null
@ -184,7 +184,7 @@ export class GfAdminTagComponent implements OnInit, OnDestroy {
}
private openUpdateTagDialog({ id, name }) {
const dialogRef = this.dialog.open(CreateOrUpdateTagDialog, {
const dialogRef = this.dialog.open(GfCreateOrUpdateTagDialogComponent, {
data: {
tag: {
id,

4
apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.component.ts

@ -41,14 +41,14 @@ import { CreateOrUpdateTagDialogParams } from './interfaces/interfaces';
styleUrls: ['./create-or-update-tag-dialog.scss'],
templateUrl: 'create-or-update-tag-dialog.html'
})
export class CreateOrUpdateTagDialog implements OnDestroy {
export class GfCreateOrUpdateTagDialogComponent implements OnDestroy {
public tagForm: FormGroup;
private unsubscribeSubject = new Subject<void>();
public constructor(
@Inject(MAT_DIALOG_DATA) public data: CreateOrUpdateTagDialogParams,
public dialogRef: MatDialogRef<CreateOrUpdateTagDialog>,
public dialogRef: MatDialogRef<GfCreateOrUpdateTagDialogComponent>,
private formBuilder: FormBuilder
) {
this.tagForm = this.formBuilder.group({

Loading…
Cancel
Save