@eric-emg/symphiq-components 1.2.285 → 1.2.286

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.
@@ -61692,16 +61692,16 @@ class InitialTargetSettingComponent {
61692
61692
  if (pendingChanges.size > 0) {
61693
61693
  const calculations = this.displayedMetricCalculations();
61694
61694
  const existingTargets = this.targets() ?? [];
61695
- const changedMetrics = new Set(pendingChanges.keys());
61696
61695
  const changedTargets = [];
61697
- for (const metric of changedMetrics) {
61698
- const existingTarget = existingTargets.find(t => t.metric === metric);
61699
- const calc = calculations.find(c => c.metric === metric);
61700
- if (existingTarget && calc) {
61701
- changedTargets.push({
61702
- ...existingTarget,
61703
- amount: calc.targetValue
61704
- });
61696
+ for (const calc of calculations) {
61697
+ if (calc.originalTargetValue !== undefined && Math.abs(calc.targetValue - calc.originalTargetValue) > 0.001) {
61698
+ const existingTarget = existingTargets.find(t => t.metric === calc.metric);
61699
+ if (existingTarget) {
61700
+ changedTargets.push({
61701
+ ...existingTarget,
61702
+ amount: calc.targetValue
61703
+ });
61704
+ }
61705
61705
  }
61706
61706
  }
61707
61707
  this.targetsUpdated.emit(changedTargets);