fitness: fix type errors, hydration warning, and add gym link
- Add exerciseId to WorkoutSession model (interface + schema) - Fix button-in-button hydration warning in TemplateCard (use div) - Expand FitnessChart dataset type to include all Chart.js properties - Fix getTime type error in session update with proper cast - Fix weight nullable type in profile stats with non-null assertion - Fix $or query typing in templates list endpoint - Re-add gym link on homepage pointing to /fitness
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
/**
|
||||
* @type {{
|
||||
* type?: 'line' | 'bar',
|
||||
* data: { labels: string[], datasets: Array<{ label: string, data: number[], borderColor?: string, backgroundColor?: string }> },
|
||||
* data: { labels: string[], datasets: Array<{ label: string, data: (number|null)[], borderColor?: string, backgroundColor?: string, borderWidth?: number, pointRadius?: number, pointBackgroundColor?: string, tension?: number, fill?: boolean|string, order?: number }> },
|
||||
* title?: string,
|
||||
* height?: string,
|
||||
* yUnit?: string
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<button class="template-card" onclick={() => onStart?.()}>
|
||||
<div class="template-card" role="button" tabindex="0" onclick={() => onStart?.()} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onStart?.(); }}}>
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{template.name}</h3>
|
||||
{#if onMenu}
|
||||
@@ -50,7 +50,7 @@
|
||||
{#if lastUsed}
|
||||
<p class="last-used">Last performed: {formatDate(lastUsed)}</p>
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.template-card {
|
||||
|
||||
Reference in New Issue
Block a user