"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; const searchFilterFormElement = document.querySelector('#form--searchFilters'); const searchResultsContainerElement = document.querySelector('#container--searchResults'); const limit = Number.parseInt(document.querySelector('#searchFilter--limit').value, 10); const offsetElement = document.querySelector('#searchFilter--offset'); function renderLotOccupancies(rawResponseJSON) { const responseJSON = rawResponseJSON; if (responseJSON.lotOccupancies.length === 0) { // eslint-disable-next-line no-unsanitized/property searchResultsContainerElement.innerHTML = `
`; return; } const resultsTbodyElement = document.createElement('tbody'); const nowDateString = cityssm.dateToString(new Date()); for (const burialSiteContract of responseJSON.lotOccupancies) { let occupancyTimeHTML = ''; if (burialSiteContract.contractStartDateString <= nowDateString && (burialSiteContract.contractEndDateString === '' || burialSiteContract.contractEndDateString >= nowDateString)) { occupancyTimeHTML = ` `; } else if (burialSiteContract.contractStartDateString > nowDateString) { occupancyTimeHTML = ` `; } else { occupancyTimeHTML = ` `; } let occupantsHTML = ''; for (const occupant of burialSiteContract.burialSiteContractOccupants ?? []) { occupantsHTML += `| ${los.escapedAliases.Occupancy} Type | ${los.escapedAliases.Lot} | ${los.escapedAliases.contractStartDate} | End Date | ${los.escapedAliases.Occupants} | Fees and Transactions |
|---|