@trudb/tru-common-lib 0.2.535 → 0.2.536
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.
|
@@ -6095,29 +6095,26 @@ class TruCardColumn {
|
|
|
6095
6095
|
};
|
|
6096
6096
|
updateItemsSource(newEntities, revert) {
|
|
6097
6097
|
this.clear();
|
|
6098
|
+
this.busyMessage = 'Rendering...';
|
|
6098
6099
|
if (!revert)
|
|
6099
6100
|
localStorage.setItem('scroll_position' + v4(), '0');
|
|
6100
|
-
if (newEntities.length)
|
|
6101
|
-
this.busyMessage = 'Rendering...';
|
|
6102
6101
|
this.columnFilterChoices = [];
|
|
6103
6102
|
this.columnFilterRefs = [];
|
|
6104
6103
|
this.cardFilterStr = null;
|
|
6105
6104
|
if (!newEntities.length) {
|
|
6106
6105
|
this.lockedColumns = [];
|
|
6107
6106
|
this.columns = [];
|
|
6107
|
+
return;
|
|
6108
6108
|
}
|
|
6109
6109
|
let lockedColumns = [];
|
|
6110
6110
|
let emptyParents = [];
|
|
6111
6111
|
let columns = [];
|
|
6112
6112
|
let query = new breeze.EntityQuery('Query' + this.parentTableName);
|
|
6113
6113
|
let parentRefs = newEntities.map((e) => { return e[this.parentTableName + 'Ref']; });
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
query = query.expand([this.config.parentToChildRelationshipName, 'oBooking', 'oSalesContract']);
|
|
6119
|
-
let uniqueParentRefs = [...new Set(parentRefs)];
|
|
6120
|
-
query = query.where(this.parentTableName + 'Ref', 'in', uniqueParentRefs);
|
|
6114
|
+
if (this.config.resultConfig.cardColumnQuery)
|
|
6115
|
+
query = this.config.resultConfig.cardColumnQuery(query, this.config.parentToChildRelationshipName);
|
|
6116
|
+
else
|
|
6117
|
+
query = query.expand(this.config.parentToChildRelationshipName);
|
|
6121
6118
|
//if (this.parentQuery)
|
|
6122
6119
|
// query = queries[this.parentQuery](query);
|
|
6123
6120
|
this.dataContext.entityAccess().customSearch(this.modelTypeLookup.getType(this.parentTableName), query).subscribe((parents) => {
|