|
@@ -1,5 +1,6 @@
|
|
-import { Component } from '@angular/core';
|
|
|
|
-import { MatDialog } from '@angular/material/dialog';
|
|
|
|
|
|
+import { Component, Inject } from '@angular/core';
|
|
|
|
+import { MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
|
|
+import { PaymantConfigComponent } from '../../pay-as-you-go/paymant-config/paymant-config.component';
|
|
import { PaymentRateComponent } from '../payment-rate/payment-rate.component';
|
|
import { PaymentRateComponent } from '../payment-rate/payment-rate.component';
|
|
|
|
|
|
@Component({
|
|
@Component({
|
|
@@ -8,15 +9,26 @@ import { PaymentRateComponent } from '../payment-rate/payment-rate.component';
|
|
styleUrls: ['./personal-information.component.scss'],
|
|
styleUrls: ['./personal-information.component.scss'],
|
|
})
|
|
})
|
|
export class PersonalInformationComponent {
|
|
export class PersonalInformationComponent {
|
|
- constructor(public readonly dialog: MatDialog) {}
|
|
|
|
|
|
+ constructor(
|
|
|
|
+ public readonly dialog: MatDialog,
|
|
|
|
+ @Inject(MAT_DIALOG_DATA) public data: { type: number }
|
|
|
|
+ ) {}
|
|
onOpenPaymentRate(): void {
|
|
onOpenPaymentRate(): void {
|
|
let dialogRef;
|
|
let dialogRef;
|
|
- dialogRef = this.dialog.open(PaymentRateComponent, {
|
|
|
|
- width: '70%',
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- dialogRef.afterClosed().subscribe((result) => {
|
|
|
|
- console.log(`Dialog result: ${result}`);
|
|
|
|
- });
|
|
|
|
|
|
+ if (this.data.type === 0) {
|
|
|
|
+ dialogRef = this.dialog.open(PaymentRateComponent, {
|
|
|
|
+ width: '70%',
|
|
|
|
+ });
|
|
|
|
+ dialogRef.afterClosed().subscribe((result) => {
|
|
|
|
+ console.log(`Dialog result: ${result}`);
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ dialogRef = this.dialog.open(PaymantConfigComponent, {
|
|
|
|
+ width: '50%',
|
|
|
|
+ });
|
|
|
|
+ dialogRef.afterClosed().subscribe((result) => {
|
|
|
|
+ console.log(`Dialog result: ${result}`);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|