|
|
|
|
@ -52,11 +52,12 @@ export class HomeComponent implements AfterViewInit {
|
|
|
|
|
console.log(this.direction);
|
|
|
|
|
let activeClass = this.cs.sharedService.getSharedData(OfferDiscountService.selected_filters);
|
|
|
|
|
|
|
|
|
|
// if (activeClass) {
|
|
|
|
|
// this.filterOffers(activeClass);
|
|
|
|
|
// }
|
|
|
|
|
this.getCategories();
|
|
|
|
|
this.tempSearch = JSON.parse(JSON.stringify(this.offersData));
|
|
|
|
|
if (activeClass) {
|
|
|
|
|
this.filterOffers(activeClass);
|
|
|
|
|
} else {
|
|
|
|
|
this.getCategories();
|
|
|
|
|
this.tempSearch = JSON.parse(JSON.stringify(this.offersData));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
getCategories() {
|
|
|
|
|
this.offersService.getCategories({}).subscribe((result) => {
|
|
|
|
|
|