Implemented the Organization Chart feature to create customer organizational

This commit is contained in:
2026-10-26 18:15:32 -03:00
parent bf48ed1dcb
commit 3229ce9c41
41 changed files with 4099 additions and 63 deletions

View File

@@ -17,6 +17,14 @@ const server = http.createServer(async (request, response) => {
return;
}
try {
if (pathname === "/org-storage-fixture.js") {
const files = ["../src/features/org-chart/model.js", "../src/features/org-chart/storage.js"];
const parts = [];
for (const file of files) parts.push(await readFile(new URL(file, import.meta.url), "utf8"));
response.setHeader("Content-Type", "text/javascript");
response.end(parts.join("\n") + "\nwindow.fixtureOrgStorage = createOrgChartStorage({ environment: { indexedDB }, model: createOrgChartModel() });");
return;
}
if (pathname === "/fixture-runtime.js") {
response.setHeader("Content-Type", "text/javascript");
response.end(`window.createFixtureApplication = ${composition.composeScript("content", { bootstrap: false })}`);