From a6f55b61e475a189f40a6dc3a8937e403a8cf045 Mon Sep 17 00:00:00 2001 From: flfeders Date: Wed, 9 Sep 2026 14:00:34 +0200 Subject: [PATCH] fix: Einheit in Artikelansicht laden --- backend/src/utils/resource.config.ts | 1 + backend/tests/productUnitRelation.test.ts | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 backend/tests/productUnitRelation.test.ts diff --git a/backend/src/utils/resource.config.ts b/backend/src/utils/resource.config.ts index 476c5cc..dd857d1 100644 --- a/backend/src/utils/resource.config.ts +++ b/backend/src/utils/resource.config.ts @@ -147,6 +147,7 @@ export const resourceConfig = { }, products: { table: products, + mtoLoad: ["unit"], searchColumns: ["name","manufacturer","ean","barcode","description","manfacturer_number","article_number"], }, productcategories: { diff --git a/backend/tests/productUnitRelation.test.ts b/backend/tests/productUnitRelation.test.ts new file mode 100644 index 0000000..2eeba1d --- /dev/null +++ b/backend/tests/productUnitRelation.test.ts @@ -0,0 +1,8 @@ +import assert from "node:assert/strict" +import test from "node:test" + +import { resourceConfig } from "../src/utils/resource.config" + +test("product details load their configured unit", () => { + assert.ok(resourceConfig.products.mtoLoad.includes("unit")) +})