diff --git a/data/config.cemetery.js b/data/config.cemetery.js
index 03a96c9b..20a7e56c 100644
--- a/data/config.cemetery.js
+++ b/data/config.cemetery.js
@@ -8,9 +8,7 @@ export const config = {
lot: "Burial Site",
lots: "Burial Sites",
map: "Cemetery",
- maps: "Cemeteries",
- occupancy: "Order",
- occupancies: "Orders"
+ maps: "Cemeteries"
}
};
export default config;
diff --git a/data/config.cemetery.ts b/data/config.cemetery.ts
index c91038eb..88ccd242 100644
--- a/data/config.cemetery.ts
+++ b/data/config.cemetery.ts
@@ -10,9 +10,7 @@ export const config: Config = {
lot: "Burial Site",
lots: "Burial Sites",
map: "Cemetery",
- maps: "Cemeteries",
- occupancy: "Order",
- occupancies: "Orders"
+ maps: "Cemeteries"
}
};
diff --git a/handlers/lots-get/view.js b/handlers/lots-get/view.js
index f5b207e6..cf9dccdb 100644
--- a/handlers/lots-get/view.js
+++ b/handlers/lots-get/view.js
@@ -1,8 +1,14 @@
import * as configFunctions from "../../helpers/functions.config.js";
+import { getLot } from "../../helpers/lotOccupancyDB/getLot.js";
const urlPrefix = configFunctions.getProperty("reverseProxy.urlPrefix");
-export const handler = (_request, response) => {
+export const handler = (request, response) => {
+ const lot = getLot(request.params.lotId);
+ if (!lot) {
+ return response.redirect(configFunctions.getProperty("reverseProxy.urlPrefix") + "/lots/?error=lotIdNotFound");
+ }
return response.render("lot-view", {
- headTitle: "Licence View"
+ headTitle: lot.lotName,
+ lot
});
};
export default handler;
diff --git a/handlers/lots-get/view.ts b/handlers/lots-get/view.ts
index 21ab4d30..5bd5f5c7 100644
--- a/handlers/lots-get/view.ts
+++ b/handlers/lots-get/view.ts
@@ -2,16 +2,24 @@ import type { RequestHandler } from "express";
import * as configFunctions from "../../helpers/functions.config.js";
+import { getLot } from "../../helpers/lotOccupancyDB/getLot.js";
+
const urlPrefix = configFunctions.getProperty("reverseProxy.urlPrefix");
-export const handler: RequestHandler = (_request, response) => {
+export const handler: RequestHandler = (request, response) => {
+
+ const lot = getLot(request.params.lotId);
+
+ if (!lot) {
+ return response.redirect(configFunctions.getProperty("reverseProxy.urlPrefix") + "/lots/?error=lotIdNotFound");
+ }
- //const licenceID = Number(request.params.licenceID);
return response.render("lot-view", {
- headTitle: "Licence View"
+ headTitle: lot.lotName,
+ lot
});
};
diff --git a/helpers/functions.config.d.ts b/helpers/functions.config.d.ts
index ba979a37..d61f70cd 100644
--- a/helpers/functions.config.d.ts
+++ b/helpers/functions.config.d.ts
@@ -19,6 +19,4 @@ export declare function getProperty(propertyName: "aliases.lot"): string;
export declare function getProperty(propertyName: "aliases.lots"): string;
export declare function getProperty(propertyName: "aliases.map"): string;
export declare function getProperty(propertyName: "aliases.maps"): string;
-export declare function getProperty(propertyName: "aliases.occupancy"): string;
-export declare function getProperty(propertyName: "aliases.occupancies"): string;
export declare const keepAliveMillis: number;
diff --git a/helpers/functions.config.js b/helpers/functions.config.js
index 97a5d55a..00eff719 100644
--- a/helpers/functions.config.js
+++ b/helpers/functions.config.js
@@ -19,8 +19,6 @@ configFallbackValues.set("aliases.lot", "Lot");
configFallbackValues.set("aliases.lots", "Lots");
configFallbackValues.set("aliases.map", "Map");
configFallbackValues.set("aliases.maps", "Maps");
-configFallbackValues.set("aliases.occupancy", "Occupancy");
-configFallbackValues.set("aliases.occupancies", "Occupancies");
export function getProperty(propertyName) {
const propertyNameSplit = propertyName.split(".");
let currentObject = config;
diff --git a/helpers/functions.config.ts b/helpers/functions.config.ts
index 2ea5b359..5ba071f6 100644
--- a/helpers/functions.config.ts
+++ b/helpers/functions.config.ts
@@ -33,8 +33,6 @@ configFallbackValues.set("aliases.lot", "Lot");
configFallbackValues.set("aliases.lots", "Lots");
configFallbackValues.set("aliases.map", "Map");
configFallbackValues.set("aliases.maps", "Maps");
-configFallbackValues.set("aliases.occupancy", "Occupancy");
-configFallbackValues.set("aliases.occupancies", "Occupancies");
/*
@@ -66,8 +64,6 @@ export function getProperty(propertyName: "aliases.lot"): string;
export function getProperty(propertyName: "aliases.lots"): string;
export function getProperty(propertyName: "aliases.map"): string;
export function getProperty(propertyName: "aliases.maps"): string;
-export function getProperty(propertyName: "aliases.occupancy"): string;
-export function getProperty(propertyName: "aliases.occupancies"): string;
export function getProperty(propertyName: string): unknown {
diff --git a/helpers/lotOccupancyDB/getLot.d.ts b/helpers/lotOccupancyDB/getLot.d.ts
new file mode 100644
index 00000000..4c0b6c4e
--- /dev/null
+++ b/helpers/lotOccupancyDB/getLot.d.ts
@@ -0,0 +1,3 @@
+import type * as recordTypes from "../../types/recordTypes";
+export declare const getLot: (lotId: number | string) => recordTypes.Lot;
+export default getLot;
diff --git a/helpers/lotOccupancyDB/getLot.js b/helpers/lotOccupancyDB/getLot.js
new file mode 100644
index 00000000..984fe0a1
--- /dev/null
+++ b/helpers/lotOccupancyDB/getLot.js
@@ -0,0 +1,24 @@
+import sqlite from "better-sqlite3";
+import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
+export const getLot = (lotId) => {
+ const database = sqlite(databasePath, {
+ readonly: true
+ });
+ const lot = database
+ .prepare("select l.lotId," +
+ " l.lotTypeId, t.lotType," +
+ " l.lotName," +
+ " l.lotStatusId, s.lotStatus," +
+ " l.mapId, m.mapName, m.mapSVG, l.mapKey," +
+ " l.lotLatitude, l.lotLongitude" +
+ " from Lots l" +
+ " left join LotTypes t on l.lotTypeId = t.lotTypeId" +
+ " left join LotStatuses s on l.lotStatusId = s.lotStatusId" +
+ " left join Maps m on l.mapId = m.mapId" +
+ " where l.recordDelete_timeMillis is null" +
+ " and l.lotId = ?")
+ .get(lotId);
+ database.close();
+ return lot;
+};
+export default getLot;
diff --git a/helpers/lotOccupancyDB/getLot.ts b/helpers/lotOccupancyDB/getLot.ts
new file mode 100644
index 00000000..8c94e132
--- /dev/null
+++ b/helpers/lotOccupancyDB/getLot.ts
@@ -0,0 +1,36 @@
+import sqlite from "better-sqlite3";
+import {
+ lotOccupancyDB as databasePath
+} from "../../data/databasePaths.js";
+
+import type * as recordTypes from "../../types/recordTypes";
+
+
+export const getLot = (lotId: number | string): recordTypes.Lot => {
+
+ const database = sqlite(databasePath, {
+ readonly: true
+ });
+
+ const lot: recordTypes.Lot = database
+ .prepare("select l.lotId," +
+ " l.lotTypeId, t.lotType," +
+ " l.lotName," +
+ " l.lotStatusId, s.lotStatus," +
+ " l.mapId, m.mapName, m.mapSVG, l.mapKey," +
+ " l.lotLatitude, l.lotLongitude" +
+ " from Lots l" +
+ " left join LotTypes t on l.lotTypeId = t.lotTypeId" +
+ " left join LotStatuses s on l.lotStatusId = s.lotStatusId" +
+ " left join Maps m on l.mapId = m.mapId" +
+ " where l.recordDelete_timeMillis is null" +
+ " and l.lotId = ?")
+ .get(lotId);
+
+ database.close();
+
+ return lot;
+};
+
+
+export default getLot;
\ No newline at end of file
diff --git a/helpers/lotOccupancyDB/getLots.d.ts b/helpers/lotOccupancyDB/getLots.d.ts
index 548622c6..428ebcca 100644
--- a/helpers/lotOccupancyDB/getLots.d.ts
+++ b/helpers/lotOccupancyDB/getLots.d.ts
@@ -1,5 +1,6 @@
import type * as recordTypes from "../../types/recordTypes";
interface GetLotsFilters {
+ lotName?: string;
mapId?: number | string;
lotTypeId?: number | string;
lotStatusId?: number | string;
diff --git a/helpers/lotOccupancyDB/getLots.js b/helpers/lotOccupancyDB/getLots.js
index ca78d2af..9658e817 100644
--- a/helpers/lotOccupancyDB/getLots.js
+++ b/helpers/lotOccupancyDB/getLots.js
@@ -1,3 +1,4 @@
+import { dateToInteger } from "@cityssm/expressjs-server-js/dateTimeFns.js";
import sqlite from "better-sqlite3";
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
export const getLots = (filters, options) => {
@@ -6,6 +7,13 @@ export const getLots = (filters, options) => {
});
let sqlWhereClause = "";
const sqlParameters = [];
+ if (filters.lotName) {
+ const lotNamePieces = filters.lotName.toLowerCase().split(" ");
+ for (const lotNamePiece of lotNamePieces) {
+ sqlWhereClause += " and instr(lower(l.lotName), ?)";
+ sqlParameters.push(lotNamePiece);
+ }
+ }
if (filters.mapId) {
sqlWhereClause += " and l.mapId = ?";
sqlParameters.push(filters.mapId);
@@ -18,21 +26,31 @@ export const getLots = (filters, options) => {
sqlWhereClause += " and l.lotStatusId = ?";
sqlParameters.push(filters.lotStatusId);
}
+ const currentDate = dateToInteger(new Date());
const lots = database
.prepare("select l.lotId, l.lotName," +
" t.lotType," +
- " m.mapName, l.mapKey," +
- " s.lotStatus" +
+ " l.mapId, m.mapName, l.mapKey," +
+ " s.lotStatus," +
+ " ifnull(o.lotOccupancyCount, 0) as lotOccupancyCount" +
" from Lots l" +
" left join LotTypes t on l.lotTypeId = t.lotTypeId" +
" left join LotStatuses s on l.lotStatusId = s.lotStatusId" +
" left join Maps m on l.mapId = m.mapId" +
+ (" left join (" +
+ "select lotId, count(lotOccupancyId) as lotOccupancyCount" +
+ " from LotOccupancies" +
+ " where recordDelete_timeMillis is null" +
+ " and occupancyStartDate <= " + currentDate +
+ " and (occupancyEndDate is null or occupancyEndDate >= " + currentDate + ")" +
+ " group by lotId" +
+ ") o on l.lotId = o.lotId") +
" where l.recordDelete_timeMillis is null" +
sqlWhereClause +
" order by l.lotName" +
- (options
- ? " limit " + options.limit + " offset " + options.offset
- : ""))
+ (options ?
+ " limit " + options.limit + " offset " + options.offset :
+ ""))
.all(sqlParameters);
database.close();
return lots;
diff --git a/helpers/lotOccupancyDB/getLots.ts b/helpers/lotOccupancyDB/getLots.ts
index 09f730f7..1726795e 100644
--- a/helpers/lotOccupancyDB/getLots.ts
+++ b/helpers/lotOccupancyDB/getLots.ts
@@ -1,3 +1,6 @@
+import {
+ dateToInteger
+} from "@cityssm/expressjs-server-js/dateTimeFns.js";
import sqlite from "better-sqlite3";
import {
lotOccupancyDB as databasePath
@@ -7,9 +10,10 @@ import type * as recordTypes from "../../types/recordTypes";
interface GetLotsFilters {
- mapId?: number | string;
- lotTypeId?: number | string;
- lotStatusId?: number | string;
+ lotName?: string;
+ mapId ? : number | string;
+ lotTypeId ? : number | string;
+ lotStatusId ? : number | string;
}
interface GetLotsOptions {
@@ -18,7 +22,7 @@ interface GetLotsOptions {
}
-export const getLots = (filters ? : GetLotsFilters, options?: GetLotsOptions): recordTypes.Lot[] => {
+export const getLots = (filters ? : GetLotsFilters, options ? : GetLotsOptions): recordTypes.Lot[] => {
const database = sqlite(databasePath, {
readonly: true
@@ -27,6 +31,14 @@ export const getLots = (filters ? : GetLotsFilters, options?: GetLotsOptions): r
let sqlWhereClause = "";
const sqlParameters = [];
+ if (filters.lotName) {
+ const lotNamePieces = filters.lotName.toLowerCase().split(" ");
+ for (const lotNamePiece of lotNamePieces) {
+ sqlWhereClause += " and instr(lower(l.lotName), ?)";
+ sqlParameters.push(lotNamePiece);
+ }
+ }
+
if (filters.mapId) {
sqlWhereClause += " and l.mapId = ?";
sqlParameters.push(filters.mapId);
@@ -42,21 +54,32 @@ export const getLots = (filters ? : GetLotsFilters, options?: GetLotsOptions): r
sqlParameters.push(filters.lotStatusId);
}
+ const currentDate = dateToInteger(new Date());
+
const lots: recordTypes.Lot[] = database
.prepare("select l.lotId, l.lotName," +
- " t.lotType," +
- " m.mapName, l.mapKey," +
- " s.lotStatus" +
- " from Lots l" +
- " left join LotTypes t on l.lotTypeId = t.lotTypeId" +
- " left join LotStatuses s on l.lotStatusId = s.lotStatusId" +
- " left join Maps m on l.mapId = m.mapId" +
- " where l.recordDelete_timeMillis is null" +
- sqlWhereClause +
- " order by l.lotName" +
- (options
- ? " limit " + options.limit + " offset " + options.offset
- : ""))
+ " t.lotType," +
+ " l.mapId, m.mapName, l.mapKey," +
+ " s.lotStatus," +
+ " ifnull(o.lotOccupancyCount, 0) as lotOccupancyCount" +
+ " from Lots l" +
+ " left join LotTypes t on l.lotTypeId = t.lotTypeId" +
+ " left join LotStatuses s on l.lotStatusId = s.lotStatusId" +
+ " left join Maps m on l.mapId = m.mapId" +
+ (" left join (" +
+ "select lotId, count(lotOccupancyId) as lotOccupancyCount" +
+ " from LotOccupancies" +
+ " where recordDelete_timeMillis is null" +
+ " and occupancyStartDate <= " + currentDate +
+ " and (occupancyEndDate is null or occupancyEndDate >= " + currentDate + ")" +
+ " group by lotId" +
+ ") o on l.lotId = o.lotId") +
+ " where l.recordDelete_timeMillis is null" +
+ sqlWhereClause +
+ " order by l.lotName" +
+ (options ?
+ " limit " + options.limit + " offset " + options.offset :
+ ""))
.all(sqlParameters);
database.close();
diff --git a/package-lock.json b/package-lock.json
index 0503e526..f3ea92c2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -55,6 +55,7 @@
"@types/session-file-store": "^1.2.2",
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6",
+ "bulma": "^0.9.4",
"eslint": "^8.19.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
@@ -2059,6 +2060,12 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/bulma": {
+ "version": "0.9.4",
+ "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.4.tgz",
+ "integrity": "sha512-86FlT5+1GrsgKbPLRRY7cGDg8fsJiP/jzTqXXVqiUZZ2aZT8uemEOHlU1CDU+TxklPEZ11HZNNWclRBBecP4CQ==",
+ "dev": true
+ },
"node_modules/bytes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
@@ -12172,6 +12179,12 @@
"integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==",
"dev": true
},
+ "bulma": {
+ "version": "0.9.4",
+ "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.4.tgz",
+ "integrity": "sha512-86FlT5+1GrsgKbPLRRY7cGDg8fsJiP/jzTqXXVqiUZZ2aZT8uemEOHlU1CDU+TxklPEZ11HZNNWclRBBecP4CQ==",
+ "dev": true
+ },
"bytes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
diff --git a/package.json b/package.json
index ef631002..884591eb 100644
--- a/package.json
+++ b/package.json
@@ -74,6 +74,7 @@
"@types/session-file-store": "^1.2.2",
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6",
+ "bulma": "^0.9.4",
"eslint": "^8.19.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
diff --git a/public-scss/style.scss b/public-scss/style.scss
index aff48308..72bb7394 100644
--- a/public-scss/style.scss
+++ b/public-scss/style.scss
@@ -1,4 +1,5 @@
@use '../node_modules/@cityssm/bulma-webapp-css/cityssm.min.css';
+@import '../node_modules/bulma/sass/utilities/derived-variables.sass';
$white: #fff;
$black: #000;
@@ -83,3 +84,26 @@ fieldset:enabled .is-hidden-enabled {
border: 0;
}
}
+
+
+/*
+ * SVG
+ */
+
+.image svg {
+ display: block;
+ height: auto;
+ width: 100%;
+
+ .highlight,
+ .highlight path {
+
+ &.is-danger {
+ fill: $danger-light;
+ }
+
+ &.is-success {
+ fill: $success-light;
+ }
+ }
+}
\ No newline at end of file
diff --git a/public-typescript/lotSearch.js b/public-typescript/lotSearch.js
index fe4e7a01..d7b46bf6 100644
--- a/public-typescript/lotSearch.js
+++ b/public-typescript/lotSearch.js
@@ -20,21 +20,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
for (const lot of responseJSON.lots) {
resultsTbodyElement.insertAdjacentHTML("beforeend", "
" +
("| " +
- "" +
+ "" +
lot.lotName +
"" +
" | ") +
+ ("" +
+ "" +
+ lot.mapName +
+ "" +
+ " | ") +
"" + lot.lotType + " | " +
- "" + lot.lotStatus + " | " +
- "" + lot.mapName + " | " +
+ ("" +
+ lot.lotStatus + " " +
+ (lot.lotOccupancyCount > 0 ? "Currently Occupied" : "") +
+ " | ") +
"
");
}
searchResultsContainerElement.innerHTML = "" +
"" +
"| " + exports.aliases.lot + " | " +
+ "" + exports.aliases.map + " | " +
"" + exports.aliases.lot + " Type | " +
"Status | " +
- "" + exports.aliases.map + " | " +
"
";
searchResultsContainerElement.querySelector("table").append(resultsTbodyElement);
});
diff --git a/public-typescript/lotSearch.ts b/public-typescript/lotSearch.ts
index 45ba377d..94215c7c 100644
--- a/public-typescript/lotSearch.ts
+++ b/public-typescript/lotSearch.ts
@@ -41,22 +41,29 @@ declare const cityssm: cityssmGlobal;
for (const lot of responseJSON.lots) {
resultsTbodyElement.insertAdjacentHTML("beforeend", "" +
("| " +
- "" +
+ "" +
lot.lotName +
"" +
" | ") +
+ ("" +
+ "" +
+ lot.mapName +
+ "" +
+ " | ") +
"" + lot.lotType + " | " +
- "" + lot.lotStatus + " | " +
- "" + lot.mapName + " | " +
+ ("" +
+ lot.lotStatus + " " +
+ (lot.lotOccupancyCount > 0 ? "Currently Occupied" : "") +
+ " | ") +
"
");
}
searchResultsContainerElement.innerHTML = "" +
"" +
"| " + exports.aliases.lot + " | " +
+ "" + exports.aliases.map + " | " +
"" + exports.aliases.lot + " Type | " +
"Status | " +
- "" + exports.aliases.map + " | " +
"
";
searchResultsContainerElement.querySelector("table").append(resultsTbodyElement);
diff --git a/public-typescript/lotView.d.ts b/public-typescript/lotView.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/public-typescript/lotView.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/public-typescript/lotView.js b/public-typescript/lotView.js
new file mode 100644
index 00000000..e6ee82f3
--- /dev/null
+++ b/public-typescript/lotView.js
@@ -0,0 +1,8 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+(() => {
+ const mapContainerElement = document.querySelector("#lot--map");
+ if (mapContainerElement) {
+ exports.los.highlightMap(mapContainerElement, mapContainerElement.dataset.mapKey, "success");
+ }
+})();
diff --git a/public-typescript/lotView.ts b/public-typescript/lotView.ts
new file mode 100644
index 00000000..7f25bac0
--- /dev/null
+++ b/public-typescript/lotView.ts
@@ -0,0 +1,11 @@
+/* eslint-disable unicorn/prefer-module */
+
+import * as globalTypes from "../types/globalTypes";
+
+(() => {
+
+ const mapContainerElement = document.querySelector("#lot--map") as HTMLElement;
+ if (mapContainerElement) {
+ (exports.los as globalTypes.LOS).highlightMap(mapContainerElement, mapContainerElement.dataset.mapKey, "success");
+ }
+})();
\ No newline at end of file
diff --git a/public-typescript/main.d.ts b/public-typescript/main.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/public-typescript/main.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/public-typescript/main.js b/public-typescript/main.js
new file mode 100644
index 00000000..955a4f1d
--- /dev/null
+++ b/public-typescript/main.js
@@ -0,0 +1,28 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+(() => {
+ const highlightMap = (mapContainerElement, mapKey, contextualClass) => {
+ let svgId = mapKey;
+ let svgElementToHighlight;
+ while (true) {
+ svgElementToHighlight = mapContainerElement.querySelector("#" + svgId);
+ if (svgElementToHighlight || !svgId.includes("-")) {
+ break;
+ }
+ svgId = svgId.slice(0, Math.max(0, svgId.lastIndexOf("-")));
+ console.log(svgId);
+ }
+ if (svgElementToHighlight) {
+ svgElementToHighlight.style.fill = null;
+ svgElementToHighlight.classList.add("highlight", "is-" + contextualClass);
+ const childPathElements = svgElementToHighlight.querySelectorAll("path");
+ for (const pathElement of childPathElements) {
+ pathElement.style.fill = null;
+ }
+ }
+ };
+ const los = {
+ highlightMap
+ };
+ exports.los = los;
+})();
diff --git a/public-typescript/main.ts b/public-typescript/main.ts
new file mode 100644
index 00000000..37fa3654
--- /dev/null
+++ b/public-typescript/main.ts
@@ -0,0 +1,49 @@
+/* eslint-disable unicorn/prefer-module */
+
+import type * as globalTypes from "../types/globalTypes";
+
+(() => {
+
+ const highlightMap = (mapContainerElement: HTMLElement, mapKey: string, contextualClass: "success" | "danger") => {
+
+ // Search for ID
+
+ let svgId = mapKey;
+ let svgElementToHighlight: SVGElement;
+
+ // eslint-disable-next-line no-constant-condition
+ while(true) {
+ svgElementToHighlight = mapContainerElement.querySelector("#" + svgId);
+
+ if (svgElementToHighlight || !svgId.includes("-")) {
+ break;
+ }
+
+ svgId = svgId.slice(0, Math.max(0, svgId.lastIndexOf("-")));
+ console.log(svgId);
+ }
+
+
+
+ if (svgElementToHighlight) {
+
+ // eslint-disable-next-line unicorn/no-null
+ svgElementToHighlight.style.fill = null;
+
+ svgElementToHighlight.classList.add("highlight", "is-" + contextualClass);
+
+ const childPathElements = svgElementToHighlight.querySelectorAll("path");
+ for (const pathElement of childPathElements) {
+
+ // eslint-disable-next-line unicorn/no-null
+ pathElement.style.fill = null;
+ }
+ }
+ };
+
+ const los: globalTypes.LOS = {
+ highlightMap
+ };
+
+ exports.los = los;
+})();
\ No newline at end of file
diff --git a/public/images/maps/ssm.cemetery.holySepulchre-block-H-rows-1-16.svg b/public/images/maps/ssm.cemetery.holySepulchre-block-H-rows-1-16.svg
index 67c4cb85..afe0ac66 100644
--- a/public/images/maps/ssm.cemetery.holySepulchre-block-H-rows-1-16.svg
+++ b/public/images/maps/ssm.cemetery.holySepulchre-block-H-rows-1-16.svg
@@ -1,1384 +1,5117 @@
-
-