Commit 97d382d2 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Fix service listing in vo

parent 29d3afde
......@@ -51,19 +51,24 @@ export class VoComponent implements OnInit {
return ss;
}
private filterBySite(services: t.Service[], site: t.Site): t.Service[] {
return services.filter(
(s: t.Service) => {
return s.site.some(
(ss: t.Site) => {
return ss.id === site.id;
}
);
}
);
}
public servicesBySite(site: t.Site): t.Service[] {
if (this.deployment) {
return this.deployment.services.filter(
(s: t.Service) => {
return s.site.some(
(ss: t.Site) => {
return ss.id === site.id;
}
);
}
);
return this.filterBySite(this.deployment.services, site);
} else {
return this.filterBySite(this.userService.getServices(this.group), site);
}
return this.userService.getServices(this.group);
}
public services(): t.Service[] {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment