Derive device voltages from project settings

This commit is contained in:
2026-07-29 09:53:58 +02:00
parent b1a11397b3
commit 084103bf54
39 changed files with 2696 additions and 76 deletions
@@ -15,6 +15,7 @@ import type { AppDatabase } from "../database-context.js";
import { projects } from "../schema/projects.js";
import { distributionBoards } from "../schema/distribution-boards.js";
import { executeProjectCommandTransaction } from "./project-command-transaction.persistence.js";
import { updateAllDerivedProjectVoltages } from "./project-voltage.persistence.js";
export class ProjectSettingsProjectCommandRepository
implements ProjectSettingsProjectCommandStore
@@ -94,6 +95,7 @@ export class ProjectSettingsProjectCommandRepository
if (updated.changes !== 1) {
throw new Error("Project changed before settings update.");
}
updateAllDerivedProjectVoltages(tx, input.projectId);
return inverse;
}