From 44de0d9f6466b056549dc09972091c8f65456dc4 Mon Sep 17 00:00:00 2001 From: Dominic Ferrando Date: Wed, 15 Oct 2025 13:43:08 -0400 Subject: [PATCH] Small bugfix --- Makefile | 4 ---- src/lib/components/PlayersTable.svelte | 21 +++++++++++++-------- src/lib/services/calculator/main.ts | 7 +------ 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index af78dec..3146b18 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,2 @@ deploy-secrets: fly secrets import < .env - -sync-products: - curl -X POST https://blade-and-brawn.fly.dev/products/sync - diff --git a/src/lib/components/PlayersTable.svelte b/src/lib/components/PlayersTable.svelte index 331e33b..a4559f9 100644 --- a/src/lib/components/PlayersTable.svelte +++ b/src/lib/components/PlayersTable.svelte @@ -9,6 +9,7 @@ Attribute, Gender, lbToKg, + range, type ActivityPerformance, type Player, } from "$lib/services/calculator/util"; @@ -47,13 +48,15 @@ localStorage.setItem("calculations", JSON.stringify(calculations)); }); + $inspect(calculations[0]); + const createCalculation = function (name: string) { return { player: { name: name, metrics: { age: 18, - weight: 180, + weight: lbToKg(180), gender: Gender.Male, }, }, @@ -240,14 +243,16 @@ diff --git a/src/lib/services/calculator/main.ts b/src/lib/services/calculator/main.ts index 56fc0a5..29951e8 100644 --- a/src/lib/services/calculator/main.ts +++ b/src/lib/services/calculator/main.ts @@ -53,14 +53,9 @@ export type ActivityStandards = Record; export class LevelCalculator { - cfg: Required; standards: Standards; - public constructor(standards: Standards, cfg: LevelCalculatorConfig = {}) { - this.cfg = { - expandIters: cfg.expandIters ?? 5, - compressTo: cfg.compressTo ?? 100 - } + public constructor(standards: Standards) { this.standards = standards; }