refreshing userService.user OnInit
This commit is contained in:
parent
aa126f7f45
commit
ca58ec78b6
@ -1,4 +1,4 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {NgForOf, NgIf} from "@angular/common";
|
||||
import {UserService} from "../../api/User/user.service";
|
||||
import {FormsModule} from "@angular/forms";
|
||||
@ -18,7 +18,7 @@ import {SessionListComponent} from "../tools/numbers/shared/session-list/session
|
||||
templateUrl: './profile.component.html',
|
||||
styleUrl: './profile.component.less'
|
||||
})
|
||||
export class ProfileComponent {
|
||||
export class ProfileComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
protected readonly userService: UserService,
|
||||
@ -26,4 +26,8 @@ export class ProfileComponent {
|
||||
// -
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.userService.refresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {UserService} from "../../../../api/User/user.service";
|
||||
import {DatePipe, NgForOf, NgIf} from "@angular/common";
|
||||
import {NumbersSessionService} from "../../../../api/tools/Numbers/Session/numbers-session.service";
|
||||
@ -16,7 +16,7 @@ import {SessionListComponent} from "../shared/session-list/session-list.componen
|
||||
templateUrl: './numbers-overview.component.html',
|
||||
styleUrl: './numbers-overview.component.less'
|
||||
})
|
||||
export class NumbersOverviewComponent {
|
||||
export class NumbersOverviewComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
protected readonly userService: UserService,
|
||||
@ -25,6 +25,10 @@ export class NumbersOverviewComponent {
|
||||
// -
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.userService.refresh();
|
||||
}
|
||||
|
||||
create() {
|
||||
this.numberSessionService.create(session => this.numberSessionService.goto(session));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user