- Timestamp:
- 11/05/20 08:53:48 (4 years ago)
- Branches:
- master
- Children:
- 1db5673
- Parents:
- afc9a9a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/dashboard/dashboard.component.ts
rafc9a9a rad60966 3 3 import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar'; 4 4 import { IPharmacy, IMedicine, IPharmacyHead, IPharmacyHeadRequest } from '../shared/interfaces'; 5 import { DataService } from '../shared/ services/data.service';5 import { DataService } from '../shared/data.service'; 6 6 import { PharmacyDialogComponent } from '../dialogs/pharmacy-dialog/pharmacy-dialog.component'; 7 7 import { EditPharmacyDialogComponent } from '../dialogs/edit-pharmacy-dialog/edit-pharmacy-dialog.component'; … … 27 27 28 28 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')); 32 36 this.dataService.getPharmacies() 33 37 .subscribe((pharmacy: IPharmacy[]) => { … … 102 106 } 103 107 108 logout() { 109 this.authService.logout(); 110 } 111 104 112 openPharmacyDialog(pharmacy: IPharmacy): void { 105 113 this.dialog.open(PharmacyDialogComponent, {
Note:
See TracChangeset
for help on using the changeset viewer.