@eric-emg/symphiq-components 1.2.211 → 1.2.212
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.
|
@@ -54704,10 +54704,17 @@ class RevenueCalculatorWelcomeBannerComponent {
|
|
|
54704
54704
|
}], null, { viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], dataLoadStatus: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataLoadStatus", required: false }] }], hasTargets: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTargets", required: false }] }] }); })();
|
|
54705
54705
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RevenueCalculatorWelcomeBannerComponent, { className: "RevenueCalculatorWelcomeBannerComponent", filePath: "lib/components/revenue-calculator-dashboard/revenue-calculator-welcome-banner.component.ts", lineNumber: 85 }); })();
|
|
54706
54706
|
|
|
54707
|
-
function calculatePacingStatus(projectedValue, targetValue) {
|
|
54707
|
+
function calculatePacingStatus(projectedValue, targetValue, increaseBad = false) {
|
|
54708
54708
|
if (targetValue <= 0)
|
|
54709
54709
|
return 'on-pace';
|
|
54710
54710
|
const pacingPercent = ((projectedValue - targetValue) / targetValue) * 100;
|
|
54711
|
+
if (increaseBad) {
|
|
54712
|
+
if (pacingPercent <= -5)
|
|
54713
|
+
return 'ahead';
|
|
54714
|
+
if (pacingPercent <= 5)
|
|
54715
|
+
return 'on-pace';
|
|
54716
|
+
return 'behind';
|
|
54717
|
+
}
|
|
54711
54718
|
if (pacingPercent >= 5)
|
|
54712
54719
|
return 'ahead';
|
|
54713
54720
|
if (pacingPercent >= -5)
|
|
@@ -54801,13 +54808,16 @@ function getPacingDisplayInfo(pacingPercentage, status, isDark) {
|
|
|
54801
54808
|
displayText
|
|
54802
54809
|
};
|
|
54803
54810
|
}
|
|
54804
|
-
function calculateMetricPacing(projectedValue, targetValue) {
|
|
54811
|
+
function calculateMetricPacing(projectedValue, targetValue, increaseBad = false) {
|
|
54805
54812
|
console.group(`[PACING] calculateMetricPacing`);
|
|
54806
|
-
console.log('[PACING] Input:', { projectedValue, targetValue });
|
|
54807
|
-
|
|
54813
|
+
console.log('[PACING] Input:', { projectedValue, targetValue, increaseBad });
|
|
54814
|
+
let pacingPercentage = targetValue > 0
|
|
54808
54815
|
? ((projectedValue - targetValue) / targetValue) * 100
|
|
54809
54816
|
: 0;
|
|
54810
|
-
|
|
54817
|
+
if (increaseBad) {
|
|
54818
|
+
pacingPercentage = -pacingPercentage;
|
|
54819
|
+
}
|
|
54820
|
+
const status = calculatePacingStatus(projectedValue, targetValue, increaseBad);
|
|
54811
54821
|
console.log('[PACING] Result:', { pacingPercentage, status, projectedValue });
|
|
54812
54822
|
console.groupEnd();
|
|
54813
54823
|
return {
|
|
@@ -55023,7 +55033,7 @@ function FunnelMetricsVisualizationComponent_For_4_Conditional_23_For_6_Template
|
|
|
55023
55033
|
i0.ɵɵadvance(2);
|
|
55024
55034
|
i0.ɵɵproperty("ngClass", ctx_r1.relatedLabelClasses());
|
|
55025
55035
|
i0.ɵɵadvance();
|
|
55026
|
-
i0.ɵɵtextInterpolate1("Target: ", ctx_r1.formatMetricValue(metric_r3.calc.targetValue, metric_r3.calc.metric));
|
|
55036
|
+
i0.ɵɵtextInterpolate1("Target: ", ctx_r1.formatMetricValue(metric_r3.calc.targetValue, metric_r3.calc.metric, false));
|
|
55027
55037
|
} }
|
|
55028
55038
|
function FunnelMetricsVisualizationComponent_For_4_Conditional_23_Template(rf, ctx) { if (rf & 1) {
|
|
55029
55039
|
i0.ɵɵelement(0, "div", 16);
|
|
@@ -55101,7 +55111,7 @@ function FunnelMetricsVisualizationComponent_For_4_Template(rf, ctx) { if (rf &
|
|
|
55101
55111
|
i0.ɵɵadvance();
|
|
55102
55112
|
i0.ɵɵproperty("ngClass", ctx_r1.targetValueClasses());
|
|
55103
55113
|
i0.ɵɵadvance();
|
|
55104
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatMetricValue(stage_r1.stageMetric.targetValue, stage_r1.stageMetric.metric), " ");
|
|
55114
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatMetricValue(stage_r1.stageMetric.targetValue, stage_r1.stageMetric.metric, false), " ");
|
|
55105
55115
|
i0.ɵɵadvance();
|
|
55106
55116
|
i0.ɵɵconditional(stage_r1.relatedMetrics.length > 0 ? 23 : -1);
|
|
55107
55117
|
} }
|
|
@@ -55134,14 +55144,16 @@ class FunnelMetricsVisualizationComponent {
|
|
|
55134
55144
|
console.log(`[PACING] Processing stage: ${stageMetric.metric}`);
|
|
55135
55145
|
const stageProjectedValue = extractProjectedValue(pacingResponse, stageMetric.metric);
|
|
55136
55146
|
console.log(`[PACING] stageProjectedValue for ${stageMetric.metric}:`, stageProjectedValue);
|
|
55147
|
+
const stageIncreaseBad = MetricEnumUtil.increaseBad(stageMetric.metric);
|
|
55137
55148
|
const stagePacingInfo = stageProjectedValue !== null
|
|
55138
|
-
? calculateMetricPacing(stageProjectedValue, stageMetric.targetValue)
|
|
55149
|
+
? calculateMetricPacing(stageProjectedValue, stageMetric.targetValue, stageIncreaseBad)
|
|
55139
55150
|
: null;
|
|
55140
55151
|
console.log(`[PACING] stagePacingInfo for ${stageMetric.metric}:`, stagePacingInfo);
|
|
55141
55152
|
const relatedWithPacing = related.map(relMetric => {
|
|
55142
55153
|
const relProjectedValue = extractProjectedValue(pacingResponse, relMetric.metric);
|
|
55154
|
+
const relIncreaseBad = MetricEnumUtil.increaseBad(relMetric.metric);
|
|
55143
55155
|
const relPacingInfo = relProjectedValue !== null
|
|
55144
|
-
? calculateMetricPacing(relProjectedValue, relMetric.targetValue)
|
|
55156
|
+
? calculateMetricPacing(relProjectedValue, relMetric.targetValue, relIncreaseBad)
|
|
55145
55157
|
: null;
|
|
55146
55158
|
return { calc: relMetric, pacingInfo: relPacingInfo };
|
|
55147
55159
|
});
|
|
@@ -55350,7 +55362,7 @@ class FunnelMetricsVisualizationComponent {
|
|
|
55350
55362
|
{{ currentYear() }} Target
|
|
55351
55363
|
</p>
|
|
55352
55364
|
<p [ngClass]="targetValueClasses()" class="text-2xl font-bold">
|
|
55353
|
-
{{ formatMetricValue(stage.stageMetric.targetValue, stage.stageMetric.metric) }}
|
|
55365
|
+
{{ formatMetricValue(stage.stageMetric.targetValue, stage.stageMetric.metric, false) }}
|
|
55354
55366
|
</p>
|
|
55355
55367
|
</div>
|
|
55356
55368
|
</div>
|
|
@@ -55407,7 +55419,7 @@ class FunnelMetricsVisualizationComponent {
|
|
|
55407
55419
|
</div>
|
|
55408
55420
|
}
|
|
55409
55421
|
<div>
|
|
55410
|
-
<p [ngClass]="relatedLabelClasses()">Target: {{ formatMetricValue(metric.calc.targetValue, metric.calc.metric) }}</p>
|
|
55422
|
+
<p [ngClass]="relatedLabelClasses()">Target: {{ formatMetricValue(metric.calc.targetValue, metric.calc.metric, false) }}</p>
|
|
55411
55423
|
</div>
|
|
55412
55424
|
</div>
|
|
55413
55425
|
</div>
|