add work order comment log print
parent
9f20895eab
commit
35bdee578a
|
|
@ -37,7 +37,7 @@ configFallbackValues.set("settings.workOrders.workOrderNumberLength", 6);
|
|||
configFallbackValues.set("settings.workOrders.workOrderMilestoneDateRecentBeforeDays", 5);
|
||||
configFallbackValues.set("settings.workOrders.workOrderMilestoneDateRecentAfterDays", 60);
|
||||
configFallbackValues.set("settings.workOrders.calendarEmailAddress", "no-reply@127.0.0.1");
|
||||
configFallbackValues.set("settings.workOrders.prints", ["pdf/workOrder"]);
|
||||
configFallbackValues.set("settings.workOrders.prints", ["pdf/workOrder", "pdf/workOrder-commentLog"]);
|
||||
configFallbackValues.set("settings.adminCleanup.recordDeleteAgeDays", 60);
|
||||
export function getProperty(propertyName) {
|
||||
const propertyNameSplit = propertyName.split(".");
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ configFallbackValues.set("settings.workOrders.workOrderNumberLength", 6);
|
|||
configFallbackValues.set("settings.workOrders.workOrderMilestoneDateRecentBeforeDays", 5);
|
||||
configFallbackValues.set("settings.workOrders.workOrderMilestoneDateRecentAfterDays", 60);
|
||||
configFallbackValues.set("settings.workOrders.calendarEmailAddress", "no-reply@127.0.0.1");
|
||||
configFallbackValues.set("settings.workOrders.prints", ["pdf/workOrder"]);
|
||||
configFallbackValues.set("settings.workOrders.prints", ["pdf/workOrder", "pdf/workOrder-commentLog"]);
|
||||
|
||||
configFallbackValues.set("settings.adminCleanup.recordDeleteAgeDays", 60);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ const pdfPrintConfigs = {
|
|||
title: "Work Order Field Sheet",
|
||||
params: ["workOrderId"]
|
||||
},
|
||||
"workOrder-commentLog": {
|
||||
title: "Work Order Field Sheet - Comment Log",
|
||||
params: ["workOrderId"]
|
||||
},
|
||||
"ssm.cemetery.burialPermit": {
|
||||
title: "Burial Permit",
|
||||
params: ["lotOccupancyId"]
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ const pdfPrintConfigs: { [printName: string]: PrintConfig } = {
|
|||
title: "Work Order Field Sheet",
|
||||
params: ["workOrderId"]
|
||||
},
|
||||
"workOrder-commentLog": {
|
||||
title: "Work Order Field Sheet - Comment Log",
|
||||
params: ["workOrderId"]
|
||||
},
|
||||
|
||||
// Occupancy
|
||||
"ssm.cemetery.burialPermit": {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
<div class="dropdown-content">
|
||||
<% for (const printName of configFunctions.getProperty("settings.lotOccupancy.prints")) { %>
|
||||
<% const printConfig = printFunctions.getPrintConfig(printName); %>
|
||||
<a class="dropdown-item" href="<%= urlPrefix %>/print/<%= printName %>/?lotOccupancyId=<%= lotOccupancy.lotOccupancyId %>">
|
||||
<a class="dropdown-item" href="<%= urlPrefix %>/print/<%= printName %>/?lotOccupancyId=<%= lotOccupancy.lotOccupancyId %>" target="_blank">
|
||||
<span class="icon is-small"><i class="fas fa-print" aria-hidden="true"></i></span>
|
||||
<span><%= printConfig.title %></span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
<div class="dropdown-content">
|
||||
<% for (const printName of configFunctions.getProperty("settings.lotOccupancy.prints")) { %>
|
||||
<% const printConfig = printFunctions.getPrintConfig(printName); %>
|
||||
<a class="dropdown-item" href="<%= urlPrefix %>/print/<%= printName %>/?lotOccupancyId=<%= lotOccupancy.lotOccupancyId %>">
|
||||
<a class="dropdown-item" href="<%= urlPrefix %>/print/<%= printName %>/?lotOccupancyId=<%= lotOccupancy.lotOccupancyId %>" target="_blank">
|
||||
<span class="icon is-small"><i class="fas fa-print" aria-hidden="true"></i></span>
|
||||
<span><%= printConfig.title %></span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
<%- include('style.css'); %>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table class="layout-table">
|
||||
<tr>
|
||||
<td>
|
||||
<h1 class="m-0">Work Order #<%= workOrder.workOrderNumber %></h1>
|
||||
</td>
|
||||
<td class="has-text-right is-vcentered">
|
||||
<strong>
|
||||
<% if (workOrder.workOrderCloseDate) { %>
|
||||
CLOSED<br />
|
||||
<% } %>
|
||||
<%= workOrder.workOrderType %>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="box mt-1">
|
||||
<table class="layout-table">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
<strong>Description</strong><br />
|
||||
<%= workOrder.workOrderDescription %>
|
||||
</p>
|
||||
</td>
|
||||
<td class="pl-1 is-width-1 has-text-nowrap">
|
||||
<p>
|
||||
<strong>Open Date</strong><br />
|
||||
<%= workOrder.workOrderOpenDateString %>
|
||||
</p>
|
||||
<% if (workOrder.workOrderCloseDate) { %>
|
||||
<p>
|
||||
<strong>Close Date</strong><br />
|
||||
<%= workOrder.workOrderCloseDateString %>
|
||||
</p>
|
||||
<% } %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2 class="mb-0">Comments</h2>
|
||||
|
||||
<% if (workOrder.workOrderComments.length === 0) { %>
|
||||
<p>There are no comments associated with this work order.</p>
|
||||
<% } else { %>
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Commentor</th>
|
||||
<th>Comment Time</th>
|
||||
<th>Comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% for (const comment of workOrder.workOrderComments) { %>
|
||||
<tr>
|
||||
<td><%= comment.recordUpdate_userName %></td>
|
||||
<td><%= comment.workOrderCommentDateString %> <%= comment.workOrderCommentTimeString %></td>
|
||||
<td><%= comment.workOrderComment %></td>
|
||||
</tr>
|
||||
<% } %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% } %>
|
||||
|
||||
|
||||
<p class="has-text-right has-text-italicized is-8pt" style="position:absolute;bottom:10px;right:10px">
|
||||
<%
|
||||
const recordCreateDate = new Date(workOrder.recordCreate_timeMillis);
|
||||
const currentDate = new Date();
|
||||
%>
|
||||
Work order created <%= dateTimeFunctions.dateToString(recordCreateDate) %> at <%= dateTimeFunctions.dateToTimeString(recordCreateDate) %>.
|
||||
Printed <%= dateTimeFunctions.dateToString(currentDate) %> at <%= dateTimeFunctions.dateToTimeString(currentDate) %>.<br />
|
||||
workOrderId = <%= workOrder.workOrderId %>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
<div class="dropdown-content">
|
||||
<% for (const printName of configFunctions.getProperty("settings.workOrders.prints")) { %>
|
||||
<% const printConfig = printFunctions.getPrintConfig(printName); %>
|
||||
<a class="dropdown-item" href="<%= urlPrefix %>/print/<%= printName %>/?workOrderId=<%= workOrder.workOrderId %>">
|
||||
<a class="dropdown-item" href="<%= urlPrefix %>/print/<%= printName %>/?workOrderId=<%= workOrder.workOrderId %>" target="_blank">
|
||||
<span class="icon is-small"><i class="fas fa-print" aria-hidden="true"></i></span>
|
||||
<span><%= printConfig.title %></span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<div class="dropdown-content">
|
||||
<% for (const printName of configFunctions.getProperty("settings.workOrders.prints")) { %>
|
||||
<% const printConfig = printFunctions.getPrintConfig(printName); %>
|
||||
<a class="dropdown-item" href="<%= urlPrefix %>/print/<%= printName %>/?workOrderId=<%= workOrder.workOrderId %>">
|
||||
<a class="dropdown-item" href="<%= urlPrefix %>/print/<%= printName %>/?workOrderId=<%= workOrder.workOrderId %>" target="_blank">
|
||||
<span class="icon is-small"><i class="fas fa-print" aria-hidden="true"></i></span>
|
||||
<span><%= printConfig.title %></span>
|
||||
</a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue