chore(wizard): ♻️ Set the state when saving the wizard

pull/4470/head
tidusjar 3 years ago
parent 33b8d1111a
commit 033fa52fac

@ -1,6 +1,7 @@
import { AfterViewInit, Component, OnInit, ViewChild } from "@angular/core"; import { AfterViewInit, Component, OnInit, ViewChild } from "@angular/core";
import { IdentityService, NotificationService, SettingsService } from "../../services"; import { IdentityService, NotificationService, SettingsService } from "../../services";
import { CustomizationFacade } from "../../state/customization/customization.facade";
import { ICreateWizardUser } from "../../interfaces"; import { ICreateWizardUser } from "../../interfaces";
import { IOmbiConfigModel } from "../models/OmbiConfigModel"; import { IOmbiConfigModel } from "../models/OmbiConfigModel";
import { MatHorizontalStepper } from'@angular/material/stepper'; import { MatHorizontalStepper } from'@angular/material/stepper';
@ -19,7 +20,7 @@ export class WelcomeComponent implements OnInit {
constructor(private router: Router, private identityService: IdentityService, constructor(private router: Router, private identityService: IdentityService,
private notificationService: NotificationService, private WizardService: WizardService, private notificationService: NotificationService, private WizardService: WizardService,
private settingsService: SettingsService) { } private settingsService: SettingsService, private customizationFacade: CustomizationFacade) { }
public ngOnInit(): void { public ngOnInit(): void {
this.localUser = { this.localUser = {
@ -55,6 +56,7 @@ export class WelcomeComponent implements OnInit {
if(config != null) { if(config != null) {
this.identityService.createWizardUser(this.localUser).subscribe(x => { this.identityService.createWizardUser(this.localUser).subscribe(x => {
if (x.result) { if (x.result) {
this.customizationFacade.loadCustomziationSettings().subscribe();
// save the config // save the config
this.router.navigate(["login"]); this.router.navigate(["login"]);
} else { } else {

Loading…
Cancel
Save