Spaces:
Running
Running
wording
Browse files- 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>π―
|
| 618 |
} else if (targetValue === 0) {
|
| 619 |
-
html = `<strong>π―
|
| 620 |
} else {
|
| 621 |
const formattedValue = targetValue.toFixed(1);
|
| 622 |
-
html = `<strong>π―
|
| 623 |
}
|
| 624 |
|
| 625 |
// Add rest tomorrow information
|
| 626 |
if (restTomorrowACWR !== null && restTomorrowACWR !== undefined) {
|
| 627 |
const color = getACWRColor(restTomorrowACWR);
|
| 628 |
-
html += `<br><strong>π΄ Rest
|
| 629 |
}
|
| 630 |
|
| 631 |
element.innerHTML = html;
|
| 632 |
element.classList.add('visible');
|
| 633 |
} else {
|
| 634 |
-
element.innerHTML = `<strong>βΉοΈ Target
|
| 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 |
}
|