App: fix typow pickera pod tsc -b - WHEEL_SPECS po Exclude<keyof EditorSet,'id'> i SET_COLUMNS pod SetNumericKey (przyczyna FAIL builda na stagingu; testy unit/e2e nie typuja src)
This commit is contained in:
@@ -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;
|
||||
}[] = [
|
||||
|
||||
@@ -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<keyof EditorSet, 'id'>;
|
||||
|
||||
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<keyof EditorSet, WheelFieldSpec> = {
|
||||
export const WHEEL_SPECS: Record<SetNumericKey, WheelFieldSpec> = {
|
||||
reps: REPS_WHEEL,
|
||||
loadKg: LOAD_WHEEL,
|
||||
restSec: REST_WHEEL,
|
||||
|
||||
Reference in New Issue
Block a user