<%- include('_header'); -%>

<%= burialSite.burialSiteName %>

<%= burialSite.burialSiteName %>
<% if (user.userProperties.canUpdate) { %> <% } %>

Cemetery
<%= burialSite.cemeteryName || "(No Name)" %>

Burial Site Type
<%= burialSite.burialSiteType %>

Status
<%= burialSite.burialSiteStatus %>

<% if (burialSite.burialSiteFields.length > 0) { %>
<% for (const burialSiteField of burialSite.burialSiteFields) { %>

<%= burialSiteField.burialSiteTypeField %>
<% if (burialSiteField.fieldValue) { %> <%= burialSiteField.fieldValue %> <% } else { %> (No Value) <% } %>

<% } %>
<% } %>

Image

<% if (burialSite.burialSiteImage) { %>
Burial Site Image
<% } else if (burialSite.cemeterySvg) { %> <% const imageURL = urlPrefix + "/internal/images/cemeteries/" + burialSite.cemeterySvg %>
<%- include('../public-internal/images/cemeteries/' + burialSite.cemeterySvg); -%>
<% } else { %>

There are no images associated with this burial site.

<% } %>
<% if (burialSite.burialSiteComments.length > 0) { %>

Comments

<% for (const burialSiteComment of burialSite.burialSiteComments) { %> <% } %>
Commentor Comment Date Comment
<%= burialSiteComment.recordCreate_userName %> <%= burialSiteComment.commentDateString %> <%= (burialSiteComment.commentTime === 0 ? "" : burialSiteComment.commentTimePeriodString) %> <%= burialSiteComment.comment %>
<% } %> <% let activeCount = 0 let pastCount = 0 for (const contract of burialSite.contracts) { if (contract.contractEndDate && contract.contractEndDate < dateTimeFunctions.dateToInteger(new Date())) { pastCount++ } else { activeCount++ } } %>

Contracts

<% if (activeCount > 0) { %>
<%= activeCount %> Active
<% } %> <% if (pastCount > 0) { %>
<%= pastCount %> Past
<% } %>
<% if (burialSite.contracts.length > 0) { %>
<% } %>
<% if (burialSite.contracts.length === 0) { %>

There are no contracts asscociated with this burial site.

<% } else { %> <% const currentDate = dateTimeFunctions.dateToInteger(new Date()); %> <% for (const contract of burialSite.contracts) { %> <% const isActive = !(contract.contractEndDate && contract.contractEndDate < currentDate); %> "> <% } %>
  Contract Type Contract Date End Date Interments
<% if (isActive) { %> <% } else { %> <% } %> <%= contract.contractType %>
#<%= contract.contractId %>
<%= contract.contractStartDateString %> <% if (contract.contractEndDate) { %> <%= contract.contractEndDateString %> <% } else { %> (No End Date) <% } %> <% if (contract.contractInterments.length === 0) { %> (No Interments) <% } else { %> <% for (const interment of contract.contractInterments) { %> <%= interment.deceasedName %> <% } %> <% } %>
<% } %>
<%- include('_footerA'); -%> <%- include('_footerB'); -%>