|
@@ -232,7 +232,7 @@ function renderAnalysisNode(node: AnalysisNode, level = 0): HTMLElement {
|
|
|
if (node.children.length === 0) {
|
|
if (node.children.length === 0) {
|
|
|
el = element('div', {textContent: node.text, className: 'analysis-node'});
|
|
el = element('div', {textContent: node.text, className: 'analysis-node'});
|
|
|
} else {
|
|
} else {
|
|
|
- el = element('details', {className: 'analysis-node', open: true});
|
|
|
|
|
|
|
+ el = element('details', {className: 'analysis-node', open: level > 0});
|
|
|
el.append(element('summary', {textContent: node.text}));
|
|
el.append(element('summary', {textContent: node.text}));
|
|
|
for (const child of node.children)
|
|
for (const child of node.children)
|
|
|
el.append(renderAnalysisNode(child, level + 1));
|
|
el.append(renderAnalysisNode(child, level + 1));
|
|
@@ -270,7 +270,7 @@ function renderProduction(expertiseGroups: Record<string, string[]>, production:
|
|
|
|
|
|
|
|
let totalConsumablesCost = 0;
|
|
let totalConsumablesCost = 0;
|
|
|
for (const [expertise, productionBuildings] of Object.entries(expertiseGroups)) {
|
|
for (const [expertise, productionBuildings] of Object.entries(expertiseGroups)) {
|
|
|
- section.append(element('h3', {textContent: expertise}));
|
|
|
|
|
|
|
+ section.append(element('h3', {textContent: expertise.toLocaleLowerCase()}));
|
|
|
for (const building of productionBuildings) {
|
|
for (const building of productionBuildings) {
|
|
|
const buildingMats = element('div');
|
|
const buildingMats = element('div');
|
|
|
const mats = Object.entries(production[building]);
|
|
const mats = Object.entries(production[building]);
|