diff --git a/app/src/pages/plans/plan-editor/ExerciseEditor.tsx b/app/src/pages/plans/plan-editor/ExerciseEditor.tsx index d19af69..1833709 100644 --- a/app/src/pages/plans/plan-editor/ExerciseEditor.tsx +++ b/app/src/pages/plans/plan-editor/ExerciseEditor.tsx @@ -7,7 +7,7 @@ import { MUSCLE_COLORS, muscleName } from '../../../lib/labels'; import type { Exercise, ExerciseProgressPoint, LatestExerciseResult } from '../../../api/types'; import type { EditorExercise, EditorSet } from './types'; import { ExerciseResultsPanel } from './ExerciseResultsPanel'; -import { WHEEL_SPECS } from './setWheelSpecs'; +import { WHEEL_SPECS, type SetNumericKey } from './setWheelSpecs'; /** Szybkie podsumowanie serii wg pierwszej: „3×10 @ 20 kg · RIR 2”; brak obciążenia = masa ciała. */ function setsSummary(sets: EditorSet[], bodyweightLabel: string): string { @@ -29,7 +29,7 @@ const SET_INPUT_CLS = Komórka serii to picker kółkowy (bottom sheet jak alarm w iPhonie) z przełącznikiem na ręczne wpisanie wartości („Wpisz”). */ const SET_COLUMNS: { - key: keyof EditorSet; + key: SetNumericKey; labelKey: string; advanced?: boolean; }[] = [ diff --git a/app/src/pages/plans/plan-editor/setWheelSpecs.ts b/app/src/pages/plans/plan-editor/setWheelSpecs.ts index 08c3ec2..be5ebfc 100644 --- a/app/src/pages/plans/plan-editor/setWheelSpecs.ts +++ b/app/src/pages/plans/plan-editor/setWheelSpecs.ts @@ -6,6 +6,9 @@ import type { EditorSet } from './types'; wartości spoza zakresu koła trafiają do najbliższej — ręczny tryb „Wpisz” obsługuje dokładne/egzotyczne liczby. */ +/** Klucze liczbowe serii (bez opcjonalnego `id` wiersza). */ +export type SetNumericKey = Exclude; + const NONE: WheelOption = { value: '', label: '—' }; const range = (from: number, to: number): WheelOption[] => Array.from({ length: to - from + 1 }, (_, i) => ({ @@ -103,7 +106,7 @@ export const RIR_WHEEL: WheelFieldSpec = { sanitizeManual: (raw) => raw.replace(/\D/g, '').slice(0, 2), }; -export const WHEEL_SPECS: Record = { +export const WHEEL_SPECS: Record = { reps: REPS_WHEEL, loadKg: LOAD_WHEEL, restSec: REST_WHEEL,