kopia lustrzana https://github.com/FacilMap/facilmap
Fix handling of empty pad/marker/line names in table export
rodzic
304b56d9c6
commit
997509cda0
|
@ -36,7 +36,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<h1><%=padData.name%> – FacilMap</h1>
|
<h1><%=normalizePadName(padData.name)%> – FacilMap</h1>
|
||||||
<%
|
<%
|
||||||
for(let type of Object.values(types)) {
|
for(let type of Object.values(types)) {
|
||||||
-%>
|
-%>
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
<%
|
<%
|
||||||
if(!hide.includes("Name")) {
|
if(!hide.includes("Name")) {
|
||||||
-%>
|
-%>
|
||||||
<td><%=object.name%></td>
|
<td><%=type.type === "marker" ? normalizeMarkerName(object.name) : normalizeLineName(object.name)%></td>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import * as ejs from "ejs";
|
||||||
import * as utils from "facilmap-utils";
|
import * as utils from "facilmap-utils";
|
||||||
import { Router, type RequestHandler } from "express";
|
import { Router, type RequestHandler } from "express";
|
||||||
import { static as expressStatic } from "express";
|
import { static as expressStatic } from "express";
|
||||||
|
import { normalizeLineName, normalizeMarkerName, normalizePadName } from "facilmap-utils";
|
||||||
|
|
||||||
export const isDevMode = !!process.env.FM_DEV;
|
export const isDevMode = !!process.env.FM_DEV;
|
||||||
|
|
||||||
|
@ -92,6 +93,9 @@ export async function renderTable(params: {
|
||||||
...injections,
|
...injections,
|
||||||
paths,
|
paths,
|
||||||
utils,
|
utils,
|
||||||
|
normalizeMarkerName,
|
||||||
|
normalizeLineName,
|
||||||
|
normalizePadName,
|
||||||
...params
|
...params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue