2.2.1 - Misc improvements and cleanup
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m3s

This commit is contained in:
2026-01-19 21:08:46 -07:00
parent 8a3932a013
commit df82a02f41
25 changed files with 149 additions and 153 deletions

View File

@@ -58,9 +58,11 @@ const chartOptions: ChartOptions<"bar"> = {
beginAtZero: true,
ticks: {
color: "#e2e8f0",
callback: function (value: any) {
const hours = Math.floor(value / 60);
const mins = value % 60;
callback: function (value: string | number) {
const numValue =
typeof value === "string" ? parseFloat(value) : value;
const hours = Math.floor(numValue / 60);
const mins = Math.round(numValue % 60);
return hours > 0 ? `${hours}h ${mins}m` : `${mins}m`;
},
},
@@ -83,8 +85,8 @@ const chartOptions: ChartOptions<"bar"> = {
},
tooltip: {
callbacks: {
label: function (context: any) {
const minutes = Math.round(context.raw);
label: function (context) {
const minutes = Math.round(context.raw as number);
const hours = Math.floor(minutes / 60);
const mins = minutes % 60;
return ` ${hours}h ${mins}m`;