Commit 1298c83d by kevalbhatt Committed by nixonrodrigues

ATLAS-2027 : UI : Add type-name with attribute name in query-builder

parent 3f2d1915
...@@ -81,7 +81,7 @@ define(['require', ...@@ -81,7 +81,7 @@ define(['require',
getObjDef: function(attrObj, rules) { getObjDef: function(attrObj, rules) {
var obj = { var obj = {
id: attrObj.name, id: attrObj.name,
label: attrObj.name.capitalize(), label: attrObj.name.capitalize() + " (" + attrObj.typeName + ")",
type: attrObj.typeName type: attrObj.typeName
}; };
if (obj.type === "date") { if (obj.type === "date") {
...@@ -104,17 +104,17 @@ define(['require', ...@@ -104,17 +104,17 @@ define(['require',
return obj; return obj;
} }
if (this.isPrimitive(obj.type)) { if (this.isPrimitive(obj.type)) {
if (obj.type === "boolean") {
obj['input'] = 'select';
obj['values'] = ['true', 'false'];
}
_.extend(obj, this.getOperator(obj.type));
if (obj.type === "long" || obj.type === "float") { if (obj.type === "long" || obj.type === "float") {
obj.type = "double"; obj.type = "double";
} }
if (obj.type === "int" || obj.type === "byte" || obj.type === "short") { if (obj.type === "int" || obj.type === "byte" || obj.type === "short") {
obj.type = "integer"; obj.type = "integer";
} }
if (obj.type === "boolean") {
obj['input'] = 'select';
obj['values'] = ['true', 'false'];
}
_.extend(obj, this.getOperator(obj.type));
return obj; return obj;
} }
var enumObj = this.enumDefCollection.fullCollection.find({ name: obj.type }); var enumObj = this.enumDefCollection.fullCollection.find({ name: obj.type });
......
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