added services grid view

This commit is contained in:
_Bastler
2021-09-26 13:32:14 +02:00
parent 1c0be5e1ea
commit 44524d0165
8 changed files with 143 additions and 15 deletions
@@ -12,10 +12,14 @@ export class ServicesComponent implements OnInit {
baseServices: Array<any>;
serviceCategory: any = {};
view = 'grid';
constructor(private serviceService: ServiceService, private i18n: I18nService) { }
ngOnInit(): void {
this.view = localStorage.getItem("bstly.servicesView") || 'grid';
this.serviceService.services().subscribe((data: Array<any>) => {
let that = this;
that.baseServices = [];
@@ -32,4 +36,8 @@ export class ServicesComponent implements OnInit {
})
}
updateView(): void {
localStorage.setItem("bstly.servicesView", this.view);
}
}