account.component.ts 773 Bytes
Newer Older
Lukas Burgey's avatar
Lukas Burgey committed
1
import { Component, OnInit, ViewChild } from '@angular/core';
2
import { MatDialog } from '@angular/material/dialog';
Lukas Burgey's avatar
Lukas Burgey committed
3

Lukas Burgey's avatar
Lukas Burgey committed
4
import { UserService } from '../../user.service';
5
6
import { ProfileComponent } from '../profile/profile.component';

Lukas Burgey's avatar
Lukas Burgey committed
7
8
9
10
11
12
@Component({
  selector: 'app-account',
  templateUrl: './account.component.html',
  styleUrls: ['./account.component.css']
})
export class AccountComponent implements OnInit {
Lukas Burgey's avatar
Lukas Burgey committed
13
14
15
16
17
18


  // account deletion form
  sure: boolean = false;


Lukas Burgey's avatar
Lukas Burgey committed
19
20
  constructor(
    public userService: UserService,
Lukas Burgey's avatar
Lukas Burgey committed
21
    private dialog: MatDialog,
Lukas Burgey's avatar
Lukas Burgey committed
22
23
24
25
  ) {
  }

  ngOnInit() {
Lukas Burgey's avatar
Lukas Burgey committed
26
27
  }

28
29
30
31
  public openProfile(user) {
    this.dialog.open(
      ProfileComponent,
      {
Lukas Burgey's avatar
Lukas Burgey committed
32
        panelClass: 'scrolling-dialog',
33
34
35
36
37
38
39
        data: {
          user: user,
        }
      }
    );
  }

Lukas Burgey's avatar
Lukas Burgey committed
40
}