show "no cemetery" when none selected

pull/11/head
Dan Gowans 2025-04-25 10:12:50 -04:00
parent e7f79cbc4f
commit dc9a9b2bcc
5 changed files with 25 additions and 15 deletions

View File

@ -23,11 +23,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
${cityssm.escapeHTML(burialSite.burialSiteName ?? '')}
</a>
</td><td>
<a href="${sunrise.getCemeteryURL(burialSite.cemeteryId)}">
${burialSite.cemeteryName
? cityssm.escapeHTML(burialSite.cemeteryName)
: '<span class="has-text-grey">(No Name)</span>'}
</a>
${burialSite.cemeteryId === null
? '<span class="has-text-grey">(No Cemetery)</span>'
: `<a href="${sunrise.getCemeteryURL(burialSite.cemeteryId)}">
${burialSite.cemeteryName === ''
? '<span class="has-text-grey">(No Name)</span>'
: cityssm.escapeHTML(burialSite.cemeteryName)}
</a>`}
</td><td>
${cityssm.escapeHTML(burialSite.burialSiteType ?? '')}
</td><td>

View File

@ -53,13 +53,17 @@ declare const exports: Record<string, unknown>
${cityssm.escapeHTML(burialSite.burialSiteName ?? '')}
</a>
</td><td>
<a href="${sunrise.getCemeteryURL(burialSite.cemeteryId)}">
${
burialSite.cemeteryId === null
? '<span class="has-text-grey">(No Cemetery)</span>'
: `<a href="${sunrise.getCemeteryURL(burialSite.cemeteryId)}">
${
burialSite.cemeteryName
? cityssm.escapeHTML(burialSite.cemeteryName)
: '<span class="has-text-grey">(No Name)</span>'
burialSite.cemeteryName === ''
? '<span class="has-text-grey">(No Name)</span>'
: cityssm.escapeHTML(burialSite.cemeteryName)
}
</a>
</a>`
}
</td><td>
${cityssm.escapeHTML(burialSite.burialSiteType ?? '')}
</td><td>

View File

@ -10,7 +10,7 @@ export interface BurialSite extends Record {
burialSiteType?: string;
burialSiteTypeId?: number;
cemetery?: Cemetery;
cemeteryId?: number;
cemeteryId?: number | null;
cemeteryName?: string;
cemeterySvg?: string;
cemeterySvgId?: string;

View File

@ -14,7 +14,7 @@ export interface BurialSite extends Record {
burialSiteTypeId?: number
cemetery?: Cemetery
cemeteryId?: number
cemeteryId?: number | null
cemeteryName?: string
cemeterySvg?: string
cemeterySvgId?: string

View File

@ -62,9 +62,13 @@
<div class="column">
<p class="mb-2">
<strong>Cemetery</strong><br />
<a href="<%= urlPrefix %>/cemeteries/<%= burialSite.cemeteryId %>">
<%= burialSite.cemeteryName || "(No Name)" %>
</a>
<% if (burialSite.cemeteryId === null) { %>
<span class="has-text-grey">(No Cemetery)</span>
<% } else { %>
<a href="<%= urlPrefix %>/cemeteries/<%= burialSite.cemeteryId %>">
<%= burialSite.cemeteryName || "(No Name)" %>
</a>
<% } %>
</p>
<p class="mb-2">
<strong>Burial Site Type</strong><br />