glutamatt HF Staff commited on
Commit
4a87b0e
Β·
verified Β·
1 Parent(s): e2402ea
Files changed (1) hide show
  1. src/components/charts.ts +5 -5
src/components/charts.ts CHANGED
@@ -614,24 +614,24 @@ function updateTargetInfo(elementId: string, targetValue: number | null | undefi
614
  let html: string;
615
 
616
  if (targetValue === null || targetValue === undefined) {
617
- html = `<strong>🎯 Target for tomorrow:</strong> <span style="color: var(--secondary-color);">Target ACWR of ${targetACWR} cannot be reached in one day</span>`;
618
  } else if (targetValue === 0) {
619
- html = `<strong>🎯 Target for tomorrow:</strong> <span style="color: var(--secondary-color);">Rest day recommended to reach ACWR of ${targetACWR}</span>`;
620
  } else {
621
  const formattedValue = targetValue.toFixed(1);
622
- html = `<strong>🎯 Target for tomorrow:</strong> <span class="target-value">${formattedValue} ${unit}</span> <span style="color: var(--secondary-color);">to reach ACWR of ${targetACWR}</span>`;
623
  }
624
 
625
  // Add rest tomorrow information
626
  if (restTomorrowACWR !== null && restTomorrowACWR !== undefined) {
627
  const color = getACWRColor(restTomorrowACWR);
628
- html += `<br><strong>😴 Rest tomorrow:</strong> <span style="color: ${color};">ACWR ${restTomorrowACWR.toFixed(2)}</span>`;
629
  }
630
 
631
  element.innerHTML = html;
632
  element.classList.add('visible');
633
  } else {
634
- element.innerHTML = `<strong>ℹ️ Target for tomorrow:</strong> <span style="color: var(--secondary-color);">Need at least 28 days of data to calculate</span>`;
635
  element.classList.add('visible');
636
  }
637
  }
 
614
  let html: string;
615
 
616
  if (targetValue === null || targetValue === undefined) {
617
+ html = `<strong>🎯 Next activity :</strong> <span style="color: var(--secondary-color);">ACWR of ${targetACWR} cannot be reached</span>`;
618
  } else if (targetValue === 0) {
619
+ html = `<strong>🎯 Next activity :</strong> <span style="color: var(--secondary-color);">Rest recommended to reach ACWR of ${targetACWR}</span>`;
620
  } else {
621
  const formattedValue = targetValue.toFixed(1);
622
+ html = `<strong>🎯 Next activity :</strong> <span class="target-value">${formattedValue} ${unit}</span> <span style="color: var(--secondary-color);">to reach ACWR of ${targetACWR}</span>`;
623
  }
624
 
625
  // Add rest tomorrow information
626
  if (restTomorrowACWR !== null && restTomorrowACWR !== undefined) {
627
  const color = getACWRColor(restTomorrowACWR);
628
+ html += `<br><strong>😴 If Rest :</strong> <span style="color: ${color};">ACWR ${restTomorrowACWR.toFixed(2)}</span>`;
629
  }
630
 
631
  element.innerHTML = html;
632
  element.classList.add('visible');
633
  } else {
634
+ element.innerHTML = `<strong>ℹ️ Target :</strong> <span style="color: var(--secondary-color);">Need at least 28 days of data to calculate</span>`;
635
  element.classList.add('visible');
636
  }
637
  }