bug fix
This commit is contained in:
parent
2da99fbd15
commit
c4a3bd8c53
|
@ -6,6 +6,7 @@ import {
|
||||||
ViewEncapsulation,
|
ViewEncapsulation,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
import { CompComposeComponent } from 'app/modules/beteran/compose/compose/comp-compose.component';
|
import { CompComposeComponent } from 'app/modules/beteran/compose/compose/comp-compose.component';
|
||||||
import { CustomerComposeComponent } from 'app/modules/beteran/compose/compose/customer-compose.component';
|
import { CustomerComposeComponent } from 'app/modules/beteran/compose/compose/customer-compose.component';
|
||||||
|
@ -209,6 +210,7 @@ export class HomeComponent implements OnInit {
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(
|
||||||
private _changeDetectorRef: ChangeDetectorRef,
|
private _changeDetectorRef: ChangeDetectorRef,
|
||||||
|
private _router: Router,
|
||||||
private _matDialog: MatDialog,
|
private _matDialog: MatDialog,
|
||||||
private _vendorService: VendorService
|
private _vendorService: VendorService
|
||||||
) {}
|
) {}
|
||||||
|
@ -290,6 +292,9 @@ export class HomeComponent implements OnInit {
|
||||||
const dialogRef = this._matDialog.open(selectType);
|
const dialogRef = this._matDialog.open(selectType);
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe((result) => {
|
dialogRef.afterClosed().subscribe((result) => {
|
||||||
|
if (ComposeMenuType.signIn === composeMenuType && !!result.choice) {
|
||||||
|
this._router.navigate(['game']);
|
||||||
|
}
|
||||||
console.log('Compose dialog was closed!');
|
console.log('Compose dialog was closed!');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,12 @@ export class DepositComposeComponent implements OnInit {
|
||||||
this.composeForm?.enable();
|
this.composeForm?.enable();
|
||||||
|
|
||||||
// Reset the form
|
// Reset the form
|
||||||
});
|
})
|
||||||
|
.finally(() =>
|
||||||
|
setTimeout(() => {
|
||||||
|
this.matDialogRef.close();
|
||||||
|
}, 2000)
|
||||||
|
);
|
||||||
// req.set
|
// req.set
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,11 @@ import { fuseAnimations } from '@fuse/animations';
|
||||||
import { FuseAlertType } from '@fuse/components/alert';
|
import { FuseAlertType } from '@fuse/components/alert';
|
||||||
import { AuthService } from 'app/core/auth/auth.service';
|
import { AuthService } from 'app/core/auth/auth.service';
|
||||||
|
|
||||||
|
export interface SignInComposeData {}
|
||||||
|
export interface SignInComposeResult {
|
||||||
|
choice: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'sign-in-compose',
|
selector: 'sign-in-compose',
|
||||||
templateUrl: './sign-in-compose.component.html',
|
templateUrl: './sign-in-compose.component.html',
|
||||||
|
@ -86,8 +91,8 @@ export class SignInComposeComponent implements OnInit {
|
||||||
this._authService
|
this._authService
|
||||||
.signIn(this.signInComposeForm?.value)
|
.signIn(this.signInComposeForm?.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log();
|
|
||||||
this.showAlert = true;
|
this.showAlert = true;
|
||||||
|
this.matDialogRef.close({ choice: true });
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
this.showAlert = true;
|
this.showAlert = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user