Selaa lähdekoodia

Changed the get mall by foodtype format

master
kj1352 5 vuotta sitten
vanhempi
commit
43bd42a985
3 muutettua tiedostoa jossa 43 lisäystä ja 17141 poistoa
  1. +37
    -17128
      package-lock.json
  2. +1
    -1
      package.json
  3. +5
    -12
      src/app/malls/malls.page.ts

+ 37
- 17128
package-lock.json
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
package.json Näytä tiedosto

@@ -91,4 +91,4 @@
"android"
]
}
}
}

+ 5
- 12
src/app/malls/malls.page.ts Näytä tiedosto

@@ -51,18 +51,10 @@ export class MallsPage implements OnInit {
getMallsByFoodType(type: string) {
this.selectedFoodType = type;
this.mallService.mallsByTypes(type).then((mallsByTypes: Array<any>) => {
let malls: any = [];
if (mallsByTypes.length > 0) {
mallsByTypes.forEach((mallLocations) => {
mallLocations.location.forEach((mall) => {
malls.push(mall);
});
});

this.allMalls = malls;
this.tempMalls = malls;

this.mallService.mallsByTypes(type).then((response: Array<any>) => {
if (response.length > 0) {
this.allMalls = response;
this.tempMalls = response;
} else {
this.toastService.presentToast("No Malls of the type " + this.selectedFoodType);
this.allMalls = [];
@@ -83,6 +75,7 @@ export class MallsPage implements OnInit {
}

doRefresh(e: any) {
this.selectedFoodType = '';
this.getMallsByLocation();
e.target.complete();
}


Ladataan…
Peruuta
Tallenna