<%- include('_header'); -%>

<%= lot.lotName %>

<% if (user.userProperties.canUpdate) { %>
" href="<%= urlPrefix %>/lots/<%= lot.lotId %>/edit"> Update <%= configFunctions.getProperty("aliases.lot") %>
<% } %>
<%= configFunctions.getProperty("aliases.map") %>
<%= lot.mapName %>
<%= configFunctions.getProperty("aliases.lot") %> Type
<%= lot.lotType %>
Status
<%= lot.lotStatus %>

Image

<% if (lot.mapSVG) { %> <% const imageURL = urlPrefix + "/images/maps/" + lot.mapSVG %>
<%- include('../public/images/maps/' + lot.mapSVG); -%>
<% } else { %>

There are no image associated with this <%= configFunctions.getProperty("aliases.lot").toLowerCase() %>.

<% } %>

<%= configFunctions.getProperty("aliases.occupancies") %> <%= lot.lotOccupancies.length %>

<% if (lot.lotOccupancies.length === 0) { %>

There are no occupancy records asscociated with this <%= configFunctions.getProperty("aliases.lot") %>.

<% } else { %> <% const currentDate = dateTimeFunctions.dateToInteger(new Date()); %> <% for (const lotOccupancy of lot.lotOccupancies) { %> <% const isActive = !(lotOccupancy.occupancyEndDate && lotOccupancy.occupancyEndDate < currentDate); %> <% } %>
  <%= configFunctions.getProperty("aliases.occupancy") %> Type Start Date End Date <%= configFunctions.getProperty("aliases.occupants") %>
<% if (isActive) { %> "> <% } else { %> "> <% } %> <%= lotOccupancy.occupancyType %> <%= lotOccupancy.occupancyStartDateString %> <% if (lotOccupancy.occupancyEndDate) { %> <%= lotOccupancy.occupancyEndDateString %> <% } else { %> (No End Date) <% } %> <% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %> (No <%= configFunctions.getProperty("aliases.occupants") %>) <% } else { %> <% const occupant = lotOccupancy.lotOccupancyOccupants[0]; %> <%= occupant.occupantName %> <%= (lotOccupancy.lotOccupancyOccupants.length > 1 ? " plus " + (lotOccupancy.lotOccupancyOccupants.length - 1) : "") %> <% } %>
<% } %>
<%- include('_footerA'); -%> <%- include('_footerB'); -%>