Ignore:
Timestamp:
11/05/20 08:53:48 (4 years ago)
Author:
Mile Jankuloski <mile.jankuloski@…>
Branches:
master
Children:
1db5673
Parents:
afc9a9a
Message:

Auth fixes, bug fixes etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/ClientApp/src/app/dashboard/dashboard.component.ts

    rafc9a9a rad60966  
    33import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
    44import { IPharmacy, IMedicine, IPharmacyHead, IPharmacyHeadRequest } from '../shared/interfaces';
    5 import { DataService } from '../shared/services/data.service';
     5import { DataService } from '../shared/data.service';
    66import { PharmacyDialogComponent } from '../dialogs/pharmacy-dialog/pharmacy-dialog.component';
    77import { EditPharmacyDialogComponent } from '../dialogs/edit-pharmacy-dialog/edit-pharmacy-dialog.component';
     
    2727
    2828  ngOnInit(): void {
    29     this.authService.getUser().subscribe((data : IPharmacyHead) => {
    30         this.head = data;
    31     });
     29    this.authService.getUser()
     30        .subscribe((data) => {
     31          console.log(data);
     32          this.head = data;
     33        },
     34        (err: any) => console.log(err),
     35        () => console.log('User data retrieved'));
    3236    this.dataService.getPharmacies()
    3337        .subscribe((pharmacy: IPharmacy[]) => {
     
    102106  }
    103107
     108  logout() {
     109    this.authService.logout();
     110  }
     111
    104112  openPharmacyDialog(pharmacy: IPharmacy): void {
    105113    this.dialog.open(PharmacyDialogComponent, {
Note: See TracChangeset for help on using the changeset viewer.