Derive project device phases from category
This commit is contained in:
@@ -14,10 +14,9 @@ describe("project device circuit-first schema", () => {
|
||||
const result = createProjectDeviceSchema.safeParse({
|
||||
name: "E-Line Pro",
|
||||
displayName: "Office lighting",
|
||||
phaseType: "single_phase",
|
||||
connectionKind: "fixed",
|
||||
costGroup: "440",
|
||||
category: "Lighting",
|
||||
category: "lighting",
|
||||
quantity: 6,
|
||||
powerPerUnit: 0.04,
|
||||
simultaneityFactor: 0.8,
|
||||
@@ -28,7 +27,7 @@ describe("project device circuit-first schema", () => {
|
||||
assert.equal(result.success, true);
|
||||
});
|
||||
|
||||
it("requires the circuit-first power and phase fields", () => {
|
||||
it("requires the circuit-first power and category fields", () => {
|
||||
const result = createProjectDeviceSchema.safeParse({
|
||||
name: "Test device",
|
||||
displayName: "Test device",
|
||||
@@ -45,7 +44,7 @@ describe("project device circuit-first schema", () => {
|
||||
const result = createProjectDeviceSchema.safeParse({
|
||||
name: "Pumpe",
|
||||
displayName: "Pumpe",
|
||||
phaseType: "three_phase",
|
||||
category: "three_phase",
|
||||
quantity: 1,
|
||||
powerPerUnit: 2,
|
||||
simultaneityFactor: 1,
|
||||
@@ -59,7 +58,7 @@ describe("project device circuit-first schema", () => {
|
||||
const device = {
|
||||
name: "E-Line Pro",
|
||||
displayName: "Bürobeleuchtung",
|
||||
phaseType: "single_phase" as const,
|
||||
category: "lighting" as const,
|
||||
quantity: 6,
|
||||
powerPerUnit: 0.04,
|
||||
simultaneityFactor: 0.8,
|
||||
|
||||
Reference in New Issue
Block a user