mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
changed to forEach for loop
This commit is contained in:
parent
55b11aa0f7
commit
0035c9b742
@ -124,16 +124,18 @@ export class WidgetVisibilityService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
searchForm(form: FormModel, name: string) {
|
searchForm(form: FormModel, name: string) {
|
||||||
for (let columns of form.json.fields) {
|
let res;
|
||||||
|
form.json.fields.forEach(columns => {
|
||||||
for (let i in columns.fields) {
|
for (let i in columns.fields) {
|
||||||
if (columns.fields.hasOwnProperty(i)) {
|
if (columns.fields.hasOwnProperty(i)) {
|
||||||
let res = columns.fields[i].find(field => field.id === name);
|
res = columns.fields[i].find(field => field.id === name);
|
||||||
if (res) {
|
if (res) {
|
||||||
return res.value;
|
return res.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
return res ? res.value : res;
|
||||||
}
|
}
|
||||||
|
|
||||||
getVariableValue(form: FormModel, name: string, processVarList: TaskProcessVariableModel[]) {
|
getVariableValue(form: FormModel, name: string, processVarList: TaskProcessVariableModel[]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user