From 542e3ceabb0e11c2f60c28e9ddee4f64a54a2715 Mon Sep 17 00:00:00 2001 From: Dan Gowans Date: Wed, 26 Mar 2025 13:43:10 -0400 Subject: [PATCH] update heading tags --- views/burialSite-edit.ejs | 40 ++++++++++++++++++++++++++++++++++++--- views/burialSite-view.ejs | 40 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 74 insertions(+), 6 deletions(-) diff --git a/views/burialSite-edit.ejs b/views/burialSite-edit.ejs index 85268b70..9ab2d213 100644 --- a/views/burialSite-edit.ejs +++ b/views/burialSite-edit.ejs @@ -409,6 +409,18 @@
+ <% + let activeCount = 0 + let pastCount = 0 + + for (const contract of burialSite.contracts) { + if (contract.contractEndDate && contract.contractEndDate < dateTimeFunctions.dateToInteger(new Date())) { + pastCount++ + } else { + activeCount++ + } + } + %>
@@ -418,9 +430,31 @@ Contracts
-
- <%= burialSite.contracts.length %> -
+ <% if (activeCount > 0) { %> +
+ + + + + + <%= activeCount %> + Active + + +
+ <% } %> + <% if (pastCount > 0) { %> +
+ + + + + + <%= pastCount %> Past + + +
+ <% } %>
diff --git a/views/burialSite-view.ejs b/views/burialSite-view.ejs index 50d54e62..75019c7f 100644 --- a/views/burialSite-view.ejs +++ b/views/burialSite-view.ejs @@ -143,6 +143,18 @@
<% } %> +<% + let activeCount = 0 + let pastCount = 0 + + for (const contract of burialSite.contracts) { + if (contract.contractEndDate && contract.contractEndDate < dateTimeFunctions.dateToInteger(new Date())) { + pastCount++ + } else { + activeCount++ + } + } +%>
@@ -150,9 +162,31 @@

Contracts

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