@veloceapps/sdk 7.0.2-33 → 7.0.2-35
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/core/types/ui-definition.types.d.ts +1 -0
- package/esm2020/core/modules/configuration/helpers.mjs +3 -6
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +2 -1
- package/esm2020/core/types/ui-definition.types.mjs +1 -1
- package/esm2020/src/components/header/header.component.mjs +17 -16
- package/fesm2015/veloceapps-sdk-core.mjs +2 -5
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +17 -15
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +3 -5
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +16 -15
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1102,6 +1102,10 @@ class FlowHeaderComponent {
|
|
|
1102
1102
|
date.setHours(0, 0, 0, 0);
|
|
1103
1103
|
const now = date.getTime();
|
|
1104
1104
|
const termParentIds = lineItems.map(li => li.rampInstanceId).filter(Boolean);
|
|
1105
|
+
const lineItemsRampInstanceIdMap = lineItems.reduce((acc, li) => {
|
|
1106
|
+
acc[li.rampInstanceId ?? ''] = li;
|
|
1107
|
+
return acc;
|
|
1108
|
+
}, {});
|
|
1105
1109
|
return lineItems.reduce((result, li) => {
|
|
1106
1110
|
// find main term line item
|
|
1107
1111
|
if (li.rampInstanceId) {
|
|
@@ -1110,23 +1114,20 @@ class FlowHeaderComponent {
|
|
|
1110
1114
|
// find current term line item
|
|
1111
1115
|
let target = li;
|
|
1112
1116
|
while (target && target.endDate && new Date(target.endDate).getTime() <= now) {
|
|
1113
|
-
target =
|
|
1117
|
+
target = lineItemsRampInstanceIdMap[li.id];
|
|
1114
1118
|
}
|
|
1115
1119
|
if (target && target.productId) {
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
nrr: this.formatMetric(target.properties.VDM_Total_NRR),
|
|
1128
|
-
},
|
|
1129
|
-
];
|
|
1120
|
+
result.push({
|
|
1121
|
+
id: target.id,
|
|
1122
|
+
productId: target.productId,
|
|
1123
|
+
name: target.name,
|
|
1124
|
+
configurable: target.properties['#configurable'] === 'true',
|
|
1125
|
+
deleted: target.actionCode === 'DELETE',
|
|
1126
|
+
hasTerm: termParentIds.includes(target.id),
|
|
1127
|
+
qty: target.qty,
|
|
1128
|
+
mrr: this.formatMetric(target.properties.VDM_Total_MRR),
|
|
1129
|
+
nrr: this.formatMetric(target.properties.VDM_Total_NRR),
|
|
1130
|
+
});
|
|
1130
1131
|
}
|
|
1131
1132
|
return result;
|
|
1132
1133
|
}, []);
|