Fix diff coloring.
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 46s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 46s
This commit is contained in:
@@ -169,10 +169,13 @@
|
|||||||
oppAvgScore.innerText = oppAvg.toFixed(2);
|
oppAvgScore.innerText = oppAvg.toFixed(2);
|
||||||
if (!isNaN(homeAvg) && !isNaN(oppAvg)) {
|
if (!isNaN(homeAvg) && !isNaN(oppAvg)) {
|
||||||
const diff = (((homeAvg / oppAvg) - 1.0) * 100).toFixed(1);
|
const diff = (((homeAvg / oppAvg) - 1.0) * 100).toFixed(1);
|
||||||
if (diff > 0)
|
diffScore.classList.remove('text-warning');
|
||||||
diffScore.classList.replace('text-warning', 'text-success');
|
diffScore.classList.remove('text-success');
|
||||||
else if (diff < 0)
|
diffScore.classList.remove('text-danger');
|
||||||
diffScore.classList.replace('text-warning', 'text-danger');
|
if (diff > 0.0)
|
||||||
|
diffScore.classList.add('text-success');
|
||||||
|
else if (diff < 0.0)
|
||||||
|
diffScore.classList.add('text-danger');
|
||||||
diffScore.innerText = diff + "%";
|
diffScore.innerText = diff + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user