Procházet zdrojové kódy

Changed the get mall by foodtype format

master
kj1352 před 5 roky
rodič
revize
43bd42a985
3 změnil soubory, kde provedl 43 přidání a 17141 odebrání
  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
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 1
package.json Zobrazit soubor

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

+ 5
- 12
src/app/malls/malls.page.ts Zobrazit soubor

@@ -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();
}


Načítá se…
Zrušit
Uložit