Implemented the Organization Chart feature to create customer organizational
This commit is contained in:
@@ -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 })}`);
|
||||
|
||||
Reference in New Issue
Block a user