fix report titles

deepsource-autofix-76c6eb20
Dan Gowans 2024-06-26 09:38:12 -04:00
parent f1ffdefbf8
commit 870ad27d1d
3 changed files with 119 additions and 116 deletions

View File

@ -10,9 +10,10 @@
%> %>
<html> <html>
<head> <head>
<style> <title>Burial Permit</title>
<%- include('style.css'); %> <style>
</style> <%- include('style.css'); %>
</style>
</head> </head>
<body style="margin:100px 80px"> <body style="margin:100px 80px">
<p class="mb-2 has-text-centered is-capitalized">Province of Ontario</p> <p class="mb-2 has-text-centered is-capitalized">Province of Ontario</p>

View File

@ -28,6 +28,7 @@
%> %>
<html> <html>
<head> <head>
<title>Contract for the Purchase of Interment Rights or Cemetery Services</title>
<style> <style>
<%- include('style.css'); %> <%- include('style.css'); %>

View File

@ -1,124 +1,125 @@
<html> <html>
<head> <head>
<style> <title>Work Order #<%= workOrder.workOrderNumber %></title>
<%- include('style.css'); %> <style>
</style> <%- include('style.css'); %>
</head> </style>
<body> </head>
<%- include('_workOrder-header.ejs'); %> <body>
<%- include('_workOrder-header.ejs'); %>
<% if (workOrder.workOrderLots.length > 0) { %> <% if (workOrder.workOrderLots.length > 0) { %>
<h2 class="mb-0"><%= configFunctions.getConfigProperty("aliases.lots") %></h2> <h2 class="mb-0"><%= configFunctions.getConfigProperty("aliases.lots") %></h2>
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr> <tr>
<th><%= configFunctions.getConfigProperty("aliases.lot") %></th> <th><%= configFunctions.getConfigProperty("aliases.lot") %></th>
<th><%= configFunctions.getConfigProperty("aliases.map") %></th> <th><%= configFunctions.getConfigProperty("aliases.map") %></th>
<th><%= configFunctions.getConfigProperty("aliases.lot") %> Type</th> <th><%= configFunctions.getConfigProperty("aliases.lot") %> Type</th>
<th>Status</th> <th>Status</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% for (const lot of workOrder.workOrderLots) { %> <% for (const lot of workOrder.workOrderLots) { %>
<tr> <tr>
<td><%= lot.lotName %></td> <td><%= lot.lotName %></td>
<td><%= lot.mapName %></td> <td><%= lot.mapName %></td>
<td><%= lot.lotType %></td> <td><%= lot.lotType %></td>
<td><%= lot.lotStatus %></td> <td><%= lot.lotStatus %></td>
</tr> </tr>
<% } %>
</tbody>
</table>
<% } %>
<% if (workOrder.workOrderLotOccupancies.length > 0) { %>
<h2 class="mb-0"><%= configFunctions.getConfigProperty("aliases.occupancies") %></h2>
<table class="data-table">
<thead>
<tr>
<th><%= configFunctions.getConfigProperty("aliases.occupancy") %> Type</th>
<th><%= configFunctions.getConfigProperty("aliases.lot") %></th>
<th><%= configFunctions.getConfigProperty("aliases.occupancyStartDate") %></th>
<th>End Date</th>
<th><%= configFunctions.getConfigProperty("aliases.occupants") %></th>
</tr>
</thead>
<tbody>
<% for (const occupancy of workOrder.workOrderLotOccupancies) { %>
<tr>
<td><%= occupancy.occupancyType %></td>
<td><%= occupancy.lotName %></td>
<td><%= occupancy.occupancyStartDateString %></td>
<td><%= occupancy.occupancyStartEndString %></td>
<td>
<% for (const occupant of occupancy.lotOccupancyOccupants) { %>
<%= occupant.lotOccupantType %>:
<%= occupant.occupantName %>
<%= occupant.occupantFamilyName %>
<br />
<% } %> <% } %>
</tbody> </td>
</table> </tr>
<% } %> <% } %>
</tbody>
</table>
<% } %>
<% if (workOrder.workOrderLotOccupancies.length > 0) { %> <% if (workOrder.workOrderMilestones.length > 0) { %>
<h2 class="mb-0"><%= configFunctions.getConfigProperty("aliases.occupancies") %></h2> <h2 class="mb-0">Milestones</h2>
<table class="data-table"> <table class="data-table">
<thead> <thead>
<tr>
<th class="is-width-1"></th>
<th>Milestone Description</th>
<th>Due Date</th>
</tr>
</thead>
<tbody>
<% for (const milestone of workOrder.workOrderMilestones) { %>
<tr> <tr>
<th><%= configFunctions.getConfigProperty("aliases.occupancy") %> Type</th> <td class="is-width-1">
<th><%= configFunctions.getConfigProperty("aliases.lot") %></th> <% if (milestone.workOrderMilestoneCompletionDate) { %>
<th><%= configFunctions.getConfigProperty("aliases.occupancyStartDate") %></th> <span class="checkbox is-checked"></span>
<th>End Date</th> <% } else { %>
<th><%= configFunctions.getConfigProperty("aliases.occupants") %></th> <span class="checkbox"></span>
</tr> <% } %>
</thead> </td>
<tbody> <td>
<% for (const occupancy of workOrder.workOrderLotOccupancies) { %> <% if (milestone.workOrderMilestoneTypeId) { %>
<tr> <strong><%= milestone.workOrderMilestoneType %></strong><br />
<td><%= occupancy.occupancyType %></td> <% } %>
<td><%= occupancy.lotName %></td> <%= milestone.workOrderMilestoneDescription %>
<td><%= occupancy.occupancyStartDateString %></td> </td>
<td><%= occupancy.occupancyStartEndString %></td> <td>
<td> <% if (milestone.workOrderMilestoneDate === 0) { %>
<% for (const occupant of occupancy.lotOccupancyOccupants) { %> (No Set Date)
<%= occupant.lotOccupantType %>: <% } else { %>
<%= occupant.occupantName %> <%= milestone.workOrderMilestoneDateString %>
<%= occupant.occupantFamilyName %> <% } %>
<br /> <% if (milestone.workOrderMilestoneTime) { %>
<% } %> <%= milestone.workOrderMilestoneTimePeriodString %>
<% } %>
</td> </td>
</tr>
<% } %>
</tbody>
</table>
<% } %>
<% if (workOrder.workOrderMilestones.length > 0) { %>
<h2 class="mb-0">Milestones</h2>
<table class="data-table">
<thead>
<tr>
<th class="is-width-1"></th>
<th>Milestone Description</th>
<th>Due Date</th>
</tr> </tr>
</thead> <% } %>
<tbody> </tbody>
<% for (const milestone of workOrder.workOrderMilestones) { %> </table>
<tr> <% } %>
<td class="is-width-1">
<% if (milestone.workOrderMilestoneCompletionDate) { %>
<span class="checkbox is-checked"></span>
<% } else { %>
<span class="checkbox"></span>
<% } %>
</td>
<td>
<% if (milestone.workOrderMilestoneTypeId) { %>
<strong><%= milestone.workOrderMilestoneType %></strong><br />
<% } %>
<%= milestone.workOrderMilestoneDescription %>
</td>
<td>
<% if (milestone.workOrderMilestoneDate === 0) { %>
(No Set Date)
<% } else { %>
<%= milestone.workOrderMilestoneDateString %>
<% } %>
<% if (milestone.workOrderMilestoneTime) { %>
<%= milestone.workOrderMilestoneTimePeriodString %>
<% } %>
</td>
</tr>
<% } %>
</tbody>
</table>
<% } %>
<h2 class="mb-0">Notes</h2> <h2 class="mb-0">Notes</h2>
<p class="has-text-right is-italic is-8pt" style="position:absolute;bottom:10px;right:10px"> <p class="has-text-right is-italic is-8pt" style="position:absolute;bottom:10px;right:10px">
<% <%
const recordCreateDate = new Date(workOrder.recordCreate_timeMillis); const recordCreateDate = new Date(workOrder.recordCreate_timeMillis);
const currentDate = new Date(); const currentDate = new Date();
%> %>
Work order created <%= dateTimeFunctions.dateToString(recordCreateDate) %> at <%= dateTimeFunctions.dateToTimePeriodString(recordCreateDate) %>. Work order created <%= dateTimeFunctions.dateToString(recordCreateDate) %> at <%= dateTimeFunctions.dateToTimePeriodString(recordCreateDate) %>.
Printed <%= dateTimeFunctions.dateToString(currentDate) %> at <%= dateTimeFunctions.dateToTimePeriodString(currentDate) %>.<br /> Printed <%= dateTimeFunctions.dateToString(currentDate) %> at <%= dateTimeFunctions.dateToTimePeriodString(currentDate) %>.<br />
workOrderId = <%= workOrder.workOrderId %> workOrderId = <%= workOrder.workOrderId %>
</p> </p>
</body> </body>
</html> </html>