Refine admin panel workflows

This commit is contained in:
AzuTear
2026-06-18 14:29:40 +02:00
parent f4512eba2e
commit d015fcbe6f
14 changed files with 481 additions and 598 deletions
+10
View File
@@ -0,0 +1,10 @@
import type { AdminMetric } from '../types/awards'
export function getMetricValue(metrics: AdminMetric[], labels: string[]) {
const normalizedLabels = labels.map((label) => label.toLowerCase())
return metrics.find((metric) => normalizedLabels.includes(metric.label.toLowerCase()))?.value ?? 0
}
export function getVoteMetricValue(metrics: AdminMetric[]) {
return getMetricValue(metrics, ['Stimmen', 'Votes'])
}