fix computation of executbility

This commit is contained in:
dcore94 2023-03-17 10:11:44 +01:00
parent 8a5f21bb0b
commit d2af24b4ed
1 changed files with 5 additions and 1 deletions

View File

@ -177,10 +177,14 @@ class CCPMethodList2 extends HTMLElement{
}).then(infras=>{
for(let m=0; m < this.#data.length; m++){
const method = this.#data[m]
method["executable"] = false
for(let i=0; i < infras.length; i++){
const infra = infras[i]
const matches = method.links.filter(l => l.rel === "compatibleWith" && l.href === "infrastructures/" + infra.id)
method["executable"] = matches.length > 0
if(matches.length > 0){
method["executable"] = true
break
}
}
}
this.updateList()