forked from jappel/leistungsbilanz-ts
Isolated module (mirrors src/external-model/ dependency direction) that adds an on-demand, DIN VDE 0298-4 referenced cable cross-section calculator: a click-on-a-circuit input mask for laying method, insulation, ambient temperature, grouping and voltage-drop limit that suggests a cross-section for the circuit cableCrossSection/cableLength fields. Applying a suggestion goes through the existing circuit.update command (expectedRevision, undo/redo) unchanged - nothing here writes to circuits directly or touches the revision/command system. See docs/cable-sizing-module.md for the full rationale, API contract, verification status and maintenance plan. Proposal, not yet reviewed by the project owner - see the docs file. 423 existing + 11 new tests pass, build:api/build:web/typecheck:scripts clean.
19 lines
701 B
TypeScript
19 lines
701 B
TypeScript
import express from "express";
|
|
import * as cableSizingController from "../controllers/cable-sizing.controller.js";
|
|
|
|
export const cableSizingRouter = express.Router();
|
|
|
|
cableSizingRouter.post("/calculate", cableSizingController.calculateCableSizingHandler);
|
|
cableSizingRouter.get("/laying-methods", cableSizingController.listLayingMethodsHandler);
|
|
cableSizingRouter.get(
|
|
"/insulation-materials",
|
|
cableSizingController.listInsulationMaterialsHandler
|
|
);
|
|
cableSizingRouter.post(
|
|
"/calculations/:calculationId/applied",
|
|
cableSizingController.markCalculationAppliedHandler
|
|
);
|
|
cableSizingRouter.get(
|
|
"/circuits/:circuitId/calculations",
|
|
cableSizingController.listCalculationsForCircuitHandler
|
|
);
|