comments and milestones placeholders
parent
c6f6bf01df
commit
ccd57cea82
|
|
@ -30,169 +30,186 @@
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<div class="panel">
|
<div class="columns">
|
||||||
<div class="panel-block is-block">
|
<div class="column">
|
||||||
<div class="columns">
|
<div class="panel">
|
||||||
<div class="column">
|
<div class="panel-block is-block">
|
||||||
<p class="mb-2">
|
<div class="columns">
|
||||||
<strong>Work Order Type</strong><br />
|
<div class="column">
|
||||||
<%= workOrder.workOrderType %>
|
<p class="mb-2">
|
||||||
</p>
|
<strong>Work Order Type</strong><br />
|
||||||
<p>
|
<%= workOrder.workOrderType %>
|
||||||
<strong>Description</strong><br />
|
</p>
|
||||||
<% if (workOrder.workOrderDescription) { %>
|
<p>
|
||||||
<%= workOrder.workOrderDescription %>
|
<strong>Description</strong><br />
|
||||||
<% } else { %>
|
<% if (workOrder.workOrderDescription) { %>
|
||||||
<span class="has-text-grey">(No Description)</span>
|
<%= workOrder.workOrderDescription %>
|
||||||
<% } %>
|
<% } else { %>
|
||||||
</p>
|
<span class="has-text-grey">(No Description)</span>
|
||||||
</div>
|
<% } %>
|
||||||
<div class="column">
|
</p>
|
||||||
<p class="mb-2">
|
</div>
|
||||||
<strong>Open Date</strong><br />
|
<div class="column">
|
||||||
<%= workOrder.workOrderOpenDateString %>
|
<p class="mb-2">
|
||||||
</p>
|
<strong>Open Date</strong><br />
|
||||||
<p>
|
<%= workOrder.workOrderOpenDateString %>
|
||||||
<strong>Close Date</strong><br />
|
</p>
|
||||||
<% if (workOrder.workOrderCloseDate) { %>
|
<p>
|
||||||
<%= workOrder.workOrderCloseDateString %>
|
<strong>Close Date</strong><br />
|
||||||
<% } else { %>
|
<% if (workOrder.workOrderCloseDate) { %>
|
||||||
<span class="has-text-grey">(No Close Date)</span>
|
<%= workOrder.workOrderCloseDateString %>
|
||||||
<% } %>
|
<% } else { %>
|
||||||
</p>
|
<span class="has-text-grey">(No Close Date)</span>
|
||||||
|
<% } %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<h2 class="panel-heading">Related <%= configFunctions.getProperty("aliases.lots") %></h2>
|
<h2 class="panel-heading">Related <%= configFunctions.getProperty("aliases.lots") %></h2>
|
||||||
<div class="panel-block is-block">
|
<div class="panel-block is-block">
|
||||||
<%
|
<%
|
||||||
const tabToSelect = (workOrder.workOrderLotOccupancies.length > 0 || workOrder.workOrderLots.length === 0 ? "lotOccupancies" : "lots");
|
const tabToSelect = (workOrder.workOrderLotOccupancies.length > 0 || workOrder.workOrderLots.length === 0 ? "lotOccupancies" : "lots");
|
||||||
%>
|
%>
|
||||||
<div class="tabs is-boxed">
|
<div class="tabs is-boxed">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="<%= (tabToSelect === "lotOccupancies" ? "is-active" : "") %>">
|
<li class="<%= (tabToSelect === "lotOccupancies" ? "is-active" : "") %>">
|
||||||
<a href="#relatedTab--lotOccupancies">
|
<a href="#relatedTab--lotOccupancies">
|
||||||
<span><%= configFunctions.getProperty("aliases.occupancies") %></span>
|
<span><%= configFunctions.getProperty("aliases.occupancies") %></span>
|
||||||
<span class="ml-2 tag"><%= workOrder.workOrderLotOccupancies.length %></span>
|
<span class="ml-2 tag"><%= workOrder.workOrderLotOccupancies.length %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="<%= (tabToSelect === "lots" ? "is-active" : "") %>">
|
<li class="<%= (tabToSelect === "lots" ? "is-active" : "") %>">
|
||||||
<a href="#relatedTab--lots">
|
<a href="#relatedTab--lots">
|
||||||
<span><%= configFunctions.getProperty("aliases.lots") %></span>
|
<span><%= configFunctions.getProperty("aliases.lots") %></span>
|
||||||
<span class="ml-2 tag"><%= workOrder.workOrderLots.length %></span>
|
<span class="ml-2 tag"><%= workOrder.workOrderLots.length %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-container">
|
<div class="tab-container">
|
||||||
<div class="<%= (tabToSelect === "lotOccupancies" ? "" : "is-hidden") %>" id="relatedTab--lotOccupancies">
|
<div class="<%= (tabToSelect === "lotOccupancies" ? "" : "is-hidden") %>" id="relatedTab--lotOccupancies">
|
||||||
<% if (workOrder.workOrderLotOccupancies.length === 0) { %>
|
<% if (workOrder.workOrderLotOccupancies.length === 0) { %>
|
||||||
<div class="message is-info">
|
<div class="message is-info">
|
||||||
<p class="message-body">
|
<p class="message-body">
|
||||||
There are no
|
There are no
|
||||||
<%= configFunctions.getProperty("aliases.lot").toLowerCase() %>
|
<%= configFunctions.getProperty("aliases.lot").toLowerCase() %>
|
||||||
<%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %>
|
<%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %>
|
||||||
records associated with this work order.
|
records associated with this work order.
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
<% } else { %>
|
||||||
|
<table class="table is-fullwidth is-striped is-hoverable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="has-width-1"></th>
|
||||||
|
<th>Occupancy Type</th>
|
||||||
|
<th><%= configFunctions.getProperty("aliases.lot") %></th>
|
||||||
|
<th>Start Date</th>
|
||||||
|
<th>End Date</th>
|
||||||
|
<th><%= configFunctions.getProperty("aliases.occupants") %></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% for (const lotOccupancy of workOrder.workOrderLotOccupancies) { %>
|
||||||
|
<% const isActive = !(lotOccupancy.occupancyEndDate && lotOccupancy.occupancyEndDate < currentDate); %>
|
||||||
|
<tr>
|
||||||
|
<td class="has-text-centered">
|
||||||
|
<% if (isActive) { %>
|
||||||
|
<i class="fas fa-play" title="Current <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
||||||
|
<% } else { %>
|
||||||
|
<i class="fas fa-stop" title="Previous <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
||||||
|
<% } %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a class="has-text-weight-bold"
|
||||||
|
href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>">
|
||||||
|
<%= lotOccupancy.occupancyType %>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<% if (lotOccupancy.lotId) { %>
|
||||||
|
<%= lotOccupancy.lotName %>
|
||||||
|
<% } else { %>
|
||||||
|
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.lot") %>)</span>
|
||||||
|
<% } %>
|
||||||
|
</td>
|
||||||
|
<td><%= lotOccupancy.occupancyStartDateString %></td>
|
||||||
|
<td>
|
||||||
|
<% if (lotOccupancy.occupancyEndDate) { %>
|
||||||
|
<%= lotOccupancy.occupancyEndDateString %>
|
||||||
|
<% } else { %>
|
||||||
|
<span class="has-text-grey">(No End Date)</span>
|
||||||
|
<% } %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>
|
||||||
|
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.occupants") %>)</span>
|
||||||
|
<% } else { %>
|
||||||
|
<% const occupant = lotOccupancy.lotOccupancyOccupants[0]; %>
|
||||||
|
<%= occupant.occupantName %>
|
||||||
|
<%= (lotOccupancy.lotOccupancyOccupants.length > 1 ? " plus " + (lotOccupancy.lotOccupancyOccupants.length - 1) : "") %>
|
||||||
|
<% } %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% } %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<% } else { %>
|
<div class="<%= (tabToSelect === "lots" ? "" : "is-hidden") %>" id="relatedTab--lots">
|
||||||
<table class="table is-fullwidth is-striped is-hoverable">
|
<% if (workOrder.workOrderLots.length === 0) { %>
|
||||||
<thead>
|
<div class="message is-info">
|
||||||
<tr>
|
<p class="message-body">
|
||||||
<th class="has-width-1"></th>
|
There are no
|
||||||
<th>Occupancy Type</th>
|
<%= configFunctions.getProperty("aliases.lots").toLowerCase() %>
|
||||||
<th><%= configFunctions.getProperty("aliases.lot") %></th>
|
records associated with this work order.
|
||||||
<th>Start Date</th>
|
</p>
|
||||||
<th>End Date</th>
|
</div>
|
||||||
<th><%= configFunctions.getProperty("aliases.occupants") %></th>
|
<% } else { %>
|
||||||
</tr>
|
<table class="table is-fullwidth is-striped is-hoverable">
|
||||||
</thead>
|
<thead>
|
||||||
<tbody>
|
<tr>
|
||||||
<% for (const lotOccupancy of workOrder.workOrderLotOccupancies) { %>
|
<th><%= configFunctions.getProperty("aliases.lot") %></th>
|
||||||
<% const isActive = !(lotOccupancy.occupancyEndDate && lotOccupancy.occupancyEndDate < currentDate); %>
|
<th><%= configFunctions.getProperty("aliases.map") %></th>
|
||||||
<tr>
|
<th><%= configFunctions.getProperty("aliases.lot") %> Type</th>
|
||||||
<td class="has-text-centered">
|
<th>Status</th>
|
||||||
<% if (isActive) { %>
|
</tr>
|
||||||
<i class="fas fa-play" title="Current <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
</thead>
|
||||||
<% } else { %>
|
<tbody>
|
||||||
<i class="fas fa-stop" title="Previous <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
<% for (const lot of workOrder.workOrderLots) { %>
|
||||||
<% } %>
|
<tr>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<a class="has-text-weight-bold" href="<%= urlPrefix %>/lots/<%= lot.lotId %>"><%= lot.lotName %></a>
|
||||||
<a class="has-text-weight-bold"
|
</td>
|
||||||
href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>">
|
<td><%= lot.mapName %></td>
|
||||||
<%= lotOccupancy.occupancyType %>
|
<td><%= lot.lotType %></td>
|
||||||
</a>
|
<td><%= lot.lotStatus %></td>
|
||||||
</td>
|
</tr>
|
||||||
<td>
|
<% } %>
|
||||||
<% if (lotOccupancy.lotId) { %>
|
</tbody>
|
||||||
<%= lotOccupancy.lotName %>
|
</table>
|
||||||
<% } else { %>
|
<% } %>
|
||||||
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.lot") %>)</span>
|
|
||||||
<% } %>
|
|
||||||
</td>
|
|
||||||
<td><%= lotOccupancy.occupancyStartDateString %></td>
|
|
||||||
<td>
|
|
||||||
<% if (lotOccupancy.occupancyEndDate) { %>
|
|
||||||
<%= lotOccupancy.occupancyEndDateString %>
|
|
||||||
<% } else { %>
|
|
||||||
<span class="has-text-grey">(No End Date)</span>
|
|
||||||
<% } %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>
|
|
||||||
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.occupants") %>)</span>
|
|
||||||
<% } else { %>
|
|
||||||
<% const occupant = lotOccupancy.lotOccupancyOccupants[0]; %>
|
|
||||||
<%= occupant.occupantName %>
|
|
||||||
<%= (lotOccupancy.lotOccupancyOccupants.length > 1 ? " plus " + (lotOccupancy.lotOccupancyOccupants.length - 1) : "") %>
|
|
||||||
<% } %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% } %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
|
||||||
<div class="<%= (tabToSelect === "lots" ? "" : "is-hidden") %>" id="relatedTab--lots">
|
|
||||||
<% if (workOrder.workOrderLots.length === 0) { %>
|
|
||||||
<div class="message is-info">
|
|
||||||
<p class="message-body">
|
|
||||||
There are no
|
|
||||||
<%= configFunctions.getProperty("aliases.lots").toLowerCase() %>
|
|
||||||
records associated with this work order.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<% } else { %>
|
</div>
|
||||||
<table class="table is-fullwidth is-striped is-hoverable">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th><%= configFunctions.getProperty("aliases.lot") %></th>
|
|
||||||
<th><%= configFunctions.getProperty("aliases.map") %></th>
|
|
||||||
<th><%= configFunctions.getProperty("aliases.lot") %> Type</th>
|
|
||||||
<th>Status</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<% for (const lot of workOrder.workOrderLots) { %>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<a class="has-text-weight-bold" href="<%= urlPrefix %>/lots/<%= lot.lotId %>"><%= lot.lotName %></a>
|
|
||||||
</td>
|
|
||||||
<td><%= lot.mapName %></td>
|
|
||||||
<td><%= lot.lotType %></td>
|
|
||||||
<td><%= lot.lotStatus %></td>
|
|
||||||
</tr>
|
|
||||||
<% } %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if (workOrder.workOrderComments.length > 0) { %>
|
||||||
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">Work Order Comments</h2>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
|
<% if (workOrder.workOrderMilestones.length > 0) { %>
|
||||||
|
<div class="column is-4">
|
||||||
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">Milestones</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%- include('_footerA'); -%>
|
<%- include('_footerA'); -%>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue