From ac36eea05424d6efbe40387100f8c91dfb684f7d Mon Sep 17 00:00:00 2001 From: navidgh67 Date: Wed, 3 Jun 2026 13:47:46 -0400 Subject: [PATCH] Add Eq Param ID to outputs and new units --- api/routers/equipment.py | 1 + web/app/equipment/register/page.tsx | 25 +++++++++++++++++++++++-- web/lib/api-client.ts | 1 + 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/api/routers/equipment.py b/api/routers/equipment.py index 26113d9..440c2c6 100644 --- a/api/routers/equipment.py +++ b/api/routers/equipment.py @@ -71,6 +71,7 @@ class EquipmentOutputPayload(BaseModel): type: str = "float" unit: str = "" description: str = "" + equipment_parameter_id: str = "" artifact: bool = False diff --git a/web/app/equipment/register/page.tsx b/web/app/equipment/register/page.tsx index 97f4e69..93de1e4 100644 --- a/web/app/equipment/register/page.tsx +++ b/web/app/equipment/register/page.tsx @@ -44,19 +44,27 @@ const UNIT_OPTIONS = [ { value: "Torr", label: "Torr" }, { value: "Pa", label: "Pa" }, { value: "sccm", label: "sccm" }, + { value: "SLPM", label: "SLPM" }, { value: "V", label: "V" }, + { value: "VDC", label: "VDC" }, + { value: "VRMS", label: "VRMS" }, + { value: "VAC", label: "VAC" }, { value: "A", label: "A" }, { value: "Hz", label: "Hz" }, { value: "kHz", label: "kHz" }, { value: "MHz", label: "MHz" }, + { value: "ohms", label: "ohms" }, { value: "s", label: "s" }, { value: "min", label: "min" }, { value: "°C", label: "°C" }, { value: "nm", label: "nm" }, { value: "um", label: "um" }, { value: "nm/min", label: "nm/min" }, + { value: "Å", label: "Å" }, + { value: "Å/min", label: "Å/min" }, { value: "%", label: "%" }, { value: "rpm", label: "rpm" }, + { value: "ratio", label: "ratio" }, { value: "count", label: "count" }, { value: "a.u.", label: "a.u." }, ]; @@ -77,6 +85,7 @@ interface EquipmentOutput { type: string; unit: string; description: string; + equipment_parameter_id: string; artifact: boolean; } @@ -352,6 +361,7 @@ function formDataFromEquipment(equipment: EquipmentInfo): FormData { type: output.type || "float", unit: output.unit || "", description: output.description || "", + equipment_parameter_id: output.equipment_parameter_id || "", artifact: Boolean(output.artifact), })) : cloneInitialData().outputs, @@ -613,6 +623,7 @@ function EquipmentRegisterContent() { type: "float", unit: "", description: "", + equipment_parameter_id: "", artifact: false, }, ], @@ -735,6 +746,7 @@ function EquipmentRegisterContent() { name: output.name.trim(), unit: output.unit.trim(), description: output.description.trim(), + equipment_parameter_id: output.equipment_parameter_id.trim(), })) .filter((output) => output.name); @@ -1168,10 +1180,11 @@ function EquipmentRegisterContent() { experiment outputs, not from equipment registration.

-
+
Name Type Unit + Eq Param ID Description Raw file @@ -1180,7 +1193,7 @@ function EquipmentRegisterContent() { {formData.outputs.map((output, index) => (
file {renderUnitSelect("", output.unit, (value) => updateOutput(index, "unit", value))} + + updateOutput(index, "equipment_parameter_id", event.target.value) + } + placeholder="e.g., 413" + className={inputClass} + /> diff --git a/web/lib/api-client.ts b/web/lib/api-client.ts index f7f466a..6df1078 100644 --- a/web/lib/api-client.ts +++ b/web/lib/api-client.ts @@ -592,6 +592,7 @@ export interface EquipmentOutput { type: string; unit: string; description: string; + equipment_parameter_id?: string; artifact: boolean; }