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