migration
This commit is contained in:
@@ -20,19 +20,21 @@ export class ServicesComponent implements OnInit {
|
||||
|
||||
this.view = localStorage.getItem("bstly.servicesView") || 'grid';
|
||||
|
||||
this.serviceService.services().subscribe((data: Array<any>) => {
|
||||
let that = this;
|
||||
that.baseServices = [];
|
||||
data.forEach(function (service) {
|
||||
if (!service.category || service.category == "") {
|
||||
that.baseServices.push(service);
|
||||
} else {
|
||||
if (!that.serviceCategory[ service.category ]) {
|
||||
that.serviceCategory[ service.category ] = [];
|
||||
this.serviceService.services().subscribe({
|
||||
next: (data: Array<any>) => {
|
||||
let that = this;
|
||||
that.baseServices = [];
|
||||
data.forEach(function (service) {
|
||||
if (!service.category || service.category == "") {
|
||||
that.baseServices.push(service);
|
||||
} else {
|
||||
if (!that.serviceCategory[ service.category ]) {
|
||||
that.serviceCategory[ service.category ] = [];
|
||||
}
|
||||
that.serviceCategory[ service.category ].push(service);
|
||||
}
|
||||
that.serviceCategory[ service.category ].push(service);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user