Commit 7a3ff89e authored by MARCO Jonathan's avatar MARCO Jonathan
Browse files

馃悰 Fix the parenthese bug

parent 9888e443
......@@ -191,7 +191,6 @@ export default Vue.extend({
this.items.splice(0, this.items.length);
const conditions = ConditionService.getConditions(this.field.conditional.basic[this.type]);
console.log(conditions);
if (conditions) {
conditions.forEach((condition) => {
this.items.push(condition);
......
......@@ -108,8 +108,8 @@ function translateSubCondition(
operator: <'&&' | '||'>conditions[i + 1].value,
fieldB: {id: <string>subConditionArray[0]?.child?.id, value: 'child'},
});
subConditions.push(subConditionArray[0])
i = subConditionIFinal
subConditions.push(subConditionArray[0]);
i = subConditionIFinal;
}
}
......@@ -195,6 +195,16 @@ class ConditionService {
i = subConditionInsert(conditions, i, translation);
} else if (conditionTest(conditions, i)) {
i = insertTranslation(conditions, i, translation);
} else if (conditionWithSubConditionAfter(conditions, i)) {
const subConditionArray: ConditionTranslated[] = [];
const subConditionIFinal = subConditionInsert(conditions, i + 2, subConditionArray);
translation.push({
fieldA: {id: <string>conditions[i].id, value: <string>conditions[i].value},
operator: <'&&' | '||'>conditions[i + 1].value,
fieldB: {id: <string>subConditionArray[0]?.child?.id, value: 'child'},
});
translation.push(subConditionArray[0]);
i = subConditionIFinal;
}
}
}
......
Supports Markdown
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