- Timestamp:
- 01/31/21 06:27:26 (4 years ago)
- Branches:
- master
- Children:
- de9d697
- Parents:
- 7520f88
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/dashboard/dashboard.component.ts
r7520f88 r28d7d35 40 40 this.dataService.getPharmacies() 41 41 .subscribe((pharmacy: IPharmacy[]) => { 42 this.pharmacies = pharmacy; 43 this.head.Pharmacy.forEach((pharma) => { 44 this.filteredPharmacies = this.pharmacies = this.pharmacies.filter(x => x == pharma); 45 }); 42 this.pharmacies = this.filteredPharmacies = pharmacy; 43 // Iskluceno filtriranje na farmacies (Star metod) 44 // this.head.Pharmacy.forEach((pharma) => { 45 // this.filteredPharmacies = this.pharmacies = this.pharmacies.filter(x => x == pharma); 46 // }); 46 47 }, 47 48 (err: any) => console.log(err), … … 147 148 if(listMedicines){ 148 149 listMedicines.forEach((medicine) => { 149 this.head.PharmacyMedicines = this.head.PharmacyMedicines.filter(x => x != medicine); 150 if(this.head.PharmacyMedicines) { 151 this.head.PharmacyMedicines = this.head.PharmacyMedicines.filter(x => x != medicine); 152 } 153 else { 154 this.head.PharmacyMedicines = []; 155 } 150 156 this.head.PharmacyMedicines.push(medicine); 151 157 this.filteredMedicines = this.head.PharmacyMedicines; … … 175 181 .subscribe((pharmacy: IPharmacy[]) => { 176 182 this.filteredPharmacies = pharmacy; 177 this.head.Pharmacy.forEach((pharma) => {178 this.filteredPharmacies = this.filteredPharmacies.filter(x => x == pharma);179 });183 // this.head.Pharmacy.forEach((pharma) => { 184 // this.filteredPharmacies = this.filteredPharmacies.filter(x => x == pharma); 185 // }); 180 186 }, 181 187 (err: any) => console.log(err),
Note:
See TracChangeset
for help on using the changeset viewer.