highlight today's funerals

pull/11/head
Dan Gowans 2025-05-01 11:34:47 -04:00
parent 39dc10369f
commit 434e15ba1d
1 changed files with 7 additions and 6 deletions

View File

@ -85,11 +85,12 @@
</div> </div>
</div> </div>
<% } else { %> <% } else { %>
<table class="table is-striped is-fullwidth"> <% const todayDateString = dateTimeFunctions.dateToString(new Date()); %>
<table class="table is-striped is-fullwidth is-hoverable has-sticky-header">
<thead> <thead>
<tr> <tr>
<th>Contract Type</th>
<th>Funeral Date</th> <th>Funeral Date</th>
<th>Contract Type</th>
<th>Interments</th> <th>Interments</th>
<th>Funeral Director</th> <th>Funeral Director</th>
</tr> </tr>
@ -97,6 +98,10 @@
<tbody id="burialSite--contractsTbody"> <tbody id="burialSite--contractsTbody">
<% for (const contract of contracts) { %> <% for (const contract of contracts) { %>
<tr> <tr>
<td class="<%= contract.funeralDateString === todayDateString ? 'has-background-warning-light' : '' %>">
<%= contract.funeralDateString %>
<%= contract.funeralTime === null || contract.funeralTime === 0 ? '' : contract.funeralTimePeriodString %>
</td>
<td> <td>
<a class="has-text-weight-bold" <a class="has-text-weight-bold"
href="<%= urlPrefix %>/contracts/<%= contract.contractId %>"> href="<%= urlPrefix %>/contracts/<%= contract.contractId %>">
@ -104,10 +109,6 @@
</a><br /> </a><br />
<span class="is-size-7">#<%= contract.contractId %></span> <span class="is-size-7">#<%= contract.contractId %></span>
</td> </td>
<td>
<%= contract.funeralDateString %>
<%= contract.funeralTime === null || contract.funeralTime === 0 ? '' : contract.funeralTimeString %>
</td>
<td> <td>
<% if (contract.contractInterments.length === 0) { %> <% if (contract.contractInterments.length === 0) { %>
<span class="has-text-grey">(No Interments)</span> <span class="has-text-grey">(No Interments)</span>