189 files

This commit is contained in:
Home Assistant Version Control
2026-09-08 18:05:32 +00:00
parent 79fefc0a7c
commit 303886f212
189 changed files with 21402 additions and 3514 deletions
@@ -18,6 +18,8 @@ export interface ObjectColumnDef {
/** Canonical order + label mapping. Most labels reuse existing i18n keys. */
export const OBJECT_COLUMNS: ObjectColumnDef[] = [
{ key: "name", labelKey: "name", required: true },
// #170: the object's reference number — off by default, one click away.
{ key: "ref_no", labelKey: "ref_number" },
{ key: "manufacturer", labelKey: "manufacturer" },
{ key: "model", labelKey: "model" },
{ key: "serial_number", labelKey: "serial_number_label" },
@@ -8,6 +8,8 @@
*/
export const LS_KEYS = {
/** #170: service-booklet print options (layout + include switches). */
printOptions: "msp-print-options",
overviewTab: "msp-overview-tab",
collapsedSections: "msp-collapsed-sections",
chartRange: "msp-chart-range",
@@ -61,6 +61,8 @@ export function buildTaskWorksheetHtml(
excerpt: WorksheetExcerpt | null,
nowIso: string,
partsLines: string[] = [],
/** #170: the task's reference ("8.3") — printed next to the title. */
taskRef: string | null = null,
): string {
const meta: Array<[string, string]> = [
[L.object, esc(objectName)],
@@ -97,6 +99,7 @@ export function buildTaskWorksheetHtml(
header { display: flex; justify-content: space-between; align-items: flex-start;
border-bottom: 3px solid #111; padding-bottom: 8px; margin-bottom: 12px; }
h1 { font-size: 22px; margin: 0 0 2px; }
h1 .ref { font-size: 12px; font-weight: 500; color: #555; border: 1px solid #ccc; border-radius: 5px; padding: 1px 6px; vertical-align: middle; font-variant-numeric: tabular-nums; }
.obj { font-size: 14px; color: #444; }
.qr-row { display: flex; gap: 18px; }
.qr { margin: 0; text-align: center; }
@@ -123,7 +126,7 @@ export function buildTaskWorksheetHtml(
<body>
<header>
<div>
<h1>${esc(task.name)}</h1>
<h1>${esc(task.name)}${taskRef ? ` <span class="ref">#${esc(taskRef)}</span>` : ""}</h1>
<div class="obj">${esc(objectName)}</div>
</div>
<div class="qr-row">