@optimiser/common 1.0.278 → 1.0.281
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/utility.js +5 -9
- package/package.json +1 -1
package/dist/lib/utility.js
CHANGED
|
@@ -1779,7 +1779,9 @@ function BuildGridFieldProjection(project, field, group) {
|
|
|
1779
1779
|
if (field.Schema.ExcludeLookupFieldsOnSearch && field.Schema.ExcludeLookupFieldsOnSearch.filter(function (x) { return x == field.Schema.LookupFields[i]; }).length != 0) {
|
|
1780
1780
|
return "continue";
|
|
1781
1781
|
}
|
|
1782
|
-
searchConcatArry.push({ "$ifNull": ['$' + alias + '.' + field.Schema.LookupFields[i], ""] });
|
|
1782
|
+
// searchConcatArry.push({ "$ifNull": ['$' + alias + '.' + field.Schema.LookupFields[i], ""] });
|
|
1783
|
+
// added by Shahzaib, make int to string and concat
|
|
1784
|
+
searchConcatArry.push({ "$ifNull": [{ $toString: '$' + alias + '.' + field.Schema.LookupFields[i] }, ""] });
|
|
1783
1785
|
if (i < field.Schema.LookupFields.length - 1) {
|
|
1784
1786
|
searchConcatArry.push(" ");
|
|
1785
1787
|
}
|
|
@@ -1795,9 +1797,7 @@ function BuildGridFieldProjection(project, field, group) {
|
|
|
1795
1797
|
project[fldName] = 1;
|
|
1796
1798
|
project[alias] = 1;
|
|
1797
1799
|
for (var i = 0; i < field.Schema.LookupFields.length; i++) {
|
|
1798
|
-
searchConcatArry.push({
|
|
1799
|
-
"$ifNull": ['$' + alias + '.' + field.Schema.LookupFields[i], [" "]]
|
|
1800
|
-
});
|
|
1800
|
+
searchConcatArry.push({ "$ifNull": ['$' + alias + '.' + field.Schema.LookupFields[i], [" "]] });
|
|
1801
1801
|
if (i < field.Schema.LookupFields.length - 1) {
|
|
1802
1802
|
searchConcatArry.push([" "]);
|
|
1803
1803
|
}
|
|
@@ -1838,11 +1838,7 @@ function BuildGridFieldProjection(project, field, group) {
|
|
|
1838
1838
|
project[alias] = 1;
|
|
1839
1839
|
if (field.Schema.LookupObject) {
|
|
1840
1840
|
for (var i = 0; i < field.Schema.LookupFields.length; i++) {
|
|
1841
|
-
searchConcatArry.push({
|
|
1842
|
-
"$ifNull": ['$' + alias + '.' + field.Schema.LookupFields[i],
|
|
1843
|
-
[" "]
|
|
1844
|
-
]
|
|
1845
|
-
});
|
|
1841
|
+
searchConcatArry.push({ "$ifNull": ['$' + alias + '.' + field.Schema.LookupFields[i], [" "]] });
|
|
1846
1842
|
if (i < field.Schema.LookupFields.length - 1) {
|
|
1847
1843
|
searchConcatArry.push([" "]);
|
|
1848
1844
|
}
|