@veloceapps/sdk 7.0.2-7 → 7.0.2-8
Sign up to get free protection for your applications and to get access to all the features.
@@ -1076,15 +1076,19 @@ class FlowHeaderComponent {
|
|
1076
1076
|
return combineLatest([
|
1077
1077
|
this.flowConfiguration.get(),
|
1078
1078
|
this.integrationState.state$.pipe(map(state => state.modifiedAssets), distinctUntilChanged()),
|
1079
|
-
]).pipe(map(([lineItems, modifiedAssets]) =>
|
1080
|
-
const
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1079
|
+
]).pipe(map(([lineItems, modifiedAssets]) => {
|
1080
|
+
const currentTerms = lineItems.reduce((acc, li) => {
|
1081
|
+
const assetId = li.assetId || li.openOrderLineItemId;
|
1082
|
+
const isModified = isLineItemModified(li);
|
1083
|
+
const currentTerm = getOriginParent(lineItems, li) ?? li;
|
1084
|
+
if (isModified || (assetId && modifiedAssets?.[assetId])) {
|
1085
|
+
acc.push(currentTerm);
|
1086
|
+
}
|
1087
|
+
return acc;
|
1088
|
+
}, []);
|
1089
|
+
const uniqCurrentTerms = currentTerms.filter((value, index, array) => array.indexOf(value) === index);
|
1090
|
+
return uniqCurrentTerms;
|
1091
|
+
}));
|
1088
1092
|
}
|
1089
1093
|
getAssets$() {
|
1090
1094
|
return this.flowConfiguration
|