Changeset 993189e for Farmatiko/ClientApp/src/app/dashboard
- Timestamp:
- 10/30/20 02:04:06 (4 years ago)
- Branches:
- master
- Children:
- 1f4846d
- Parents:
- 6f203af
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/dashboard/dashboard.component.ts
r6f203af r993189e 8 8 import { MedicineDialogComponent } from '../dialogs/medicine-dialog/medicine-dialog.component'; 9 9 import { ActivatedRoute, Router } from '@angular/router'; 10 import { AuthService } from '../shared/auth.service'; 10 11 11 12 @Component({ … … 20 21 public filteredMedicines: IMedicine[] = []; 21 22 public request: IPharmacyHeadRequest; 22 public token: string;23 23 24 constructor(private dataService: DataService, private dialog: MatDialog, private snackBar: MatSnackBar, private router: Router, private route: ActivatedRoute) {24 constructor(private dataService: DataService, private authService: AuthService, private dialog: MatDialog, private snackBar: MatSnackBar, private router: Router, private route: ActivatedRoute) { 25 25 26 26 } 27 27 28 28 ngOnInit(): void { 29 this.token = this.route.snapshot.params['token']; 30 this.dataService.getPharmacyHead(this.token) 31 .subscribe((hd: IPharmacyHead) => { 32 this.head = hd; 33 }, 34 (err: any) => console.log(err), 35 () => console.log('Head data retrieved')); 36 29 this.head = this.authService.headValue; 37 30 this.dataService.getPharmacies() 38 31 .subscribe((pharmacy: IPharmacy[]) => {
Note:
See TracChangeset
for help on using the changeset viewer.