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