Ignore:
Timestamp:
01/31/21 06:27:26 (22 months ago)
Author:
Mile Jankuloski <mile.jankuloski@…>
Branches:
master
Children:
de9d697
Parents:
7520f88
Message:

Maps, geolocation api, dialogs & more

File:
1 edited

Legend:

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

    r7520f88 r28d7d35  
    4040    this.dataService.getPharmacies()
    4141        .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          // });
    4647        },
    4748        (err: any) => console.log(err),
     
    147148      if(listMedicines){
    148149        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          }
    150156          this.head.PharmacyMedicines.push(medicine);
    151157          this.filteredMedicines = this.head.PharmacyMedicines;
     
    175181          .subscribe((pharmacy: IPharmacy[]) => {
    176182            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            // });
    180186          },
    181187          (err: any) => console.log(err),
Note: See TracChangeset for help on using the changeset viewer.