@builttocreate/engine-utils 1.8.1-rc.1.2.6 → 1.8.1-rc.1.2.7
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/activityHelper.js +8 -3
- package/package.json +1 -1
package/dist/activityHelper.js
CHANGED
|
@@ -110,6 +110,11 @@ var addDocumentDataToActivities = function addDocumentDataToActivities(activitie
|
|
|
110
110
|
* We only need to generate the row lookup once per field to help increase performance,
|
|
111
111
|
* just incase we have other deficiencies that reference the same table field.
|
|
112
112
|
*/
|
|
113
|
+
//removing deleted rows
|
|
114
|
+
var nextDocFieldValue = docFieldValue.filter(function (item) {
|
|
115
|
+
return !item.deleted;
|
|
116
|
+
});
|
|
117
|
+
|
|
113
118
|
if (!fieldRowsLookup[templateField._id]) {
|
|
114
119
|
fieldRowsLookup[templateField._id] = (0, _tableHelper.getRowLookupWithPopulatedDropdownCells)(templateField.tableColumns, docFieldValue);
|
|
115
120
|
}
|
|
@@ -151,14 +156,14 @@ var addDocumentDataToActivities = function addDocumentDataToActivities(activitie
|
|
|
151
156
|
nextActivity.document.value = fieldRowsLookup[activity.document.field][activity.document.row].cells[templateFieldColumn._id];
|
|
152
157
|
} else if (docFieldValue && templateField.type === _FieldTypes["default"].multiSelect) {
|
|
153
158
|
var parsedDocFieldValue = docFieldValue && typeof docFieldValue === 'string' ? docFieldValue.split(',') : docFieldValue;
|
|
154
|
-
var
|
|
159
|
+
var _nextDocFieldValue = '';
|
|
155
160
|
|
|
156
161
|
if (parsedDocFieldValue.length > 0) {
|
|
157
162
|
parsedDocFieldValue.forEach(function (item) {
|
|
158
163
|
var option = templateField.optionsLookup[item];
|
|
159
|
-
|
|
164
|
+
_nextDocFieldValue = _nextDocFieldValue.concat(' ', option.value);
|
|
160
165
|
});
|
|
161
|
-
nextActivity.document.value =
|
|
166
|
+
nextActivity.document.value = _nextDocFieldValue;
|
|
162
167
|
} else {
|
|
163
168
|
nextActivity.document.value = 'No Option Selected';
|
|
164
169
|
}
|