Commit 250c2eaf by kevalbhatt

ATLAS-3925: UI: Properties with value 0 or false are displayed as N/A for

parent 813bab64
...@@ -102,7 +102,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -102,7 +102,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
} }
}, },
getValue = function(val) { getValue = function(val) {
if (val) { if (!_.isUndefined(val)) {
if ((_.isNumber(val) || !_.isNaN(parseInt(val))) && formatIntVal) { if ((_.isNumber(val) || !_.isNaN(parseInt(val))) && formatIntVal) {
return numberFormat(val); return numberFormat(val);
} else { } else {
...@@ -612,7 +612,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -612,7 +612,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
rule = {}; rule = {};
if (apiObj) { if (apiObj) {
rule = { attributeName: temp[0], operator: mapUiOperatorToAPI(temp[1]), attributeValue: _.trim(temp[2]) } rule = { attributeName: temp[0], operator: mapUiOperatorToAPI(temp[1]), attributeValue: _.trim(temp[2]) }
rule.attributeValue = rule.type === 'date' && formatDate && rule.attributeValue.length ? moment(parseInt(rule.attributeValue)).format(Globals.dateTimeFormat) : rule.attributeValue; rule.attributeValue = rule.type === 'date' && formatDate && rule.attributeValue.length ? moment(parseInt(rule.attributeValue)).format(Globals.dateTimeFormat) : rule.attributeValue;
} else { } else {
rule = { id: temp[0], operator: temp[1], value: _.trim(temp[2]) } rule = { id: temp[0], operator: temp[1], value: _.trim(temp[2]) }
......
...@@ -102,7 +102,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -102,7 +102,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
} }
}, },
getValue = function(val) { getValue = function(val) {
if (val) { if (!_.isUndefined(val)) {
if ((_.isNumber(val) || !_.isNaN(parseInt(val))) && formatIntVal) { if ((_.isNumber(val) || !_.isNaN(parseInt(val))) && formatIntVal) {
return numberFormat(val); return numberFormat(val);
} else { } else {
......
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