occupant family name field

deepsource-autofix-76c6eb20
Dan Gowans 2023-02-02 10:51:40 -05:00
parent fc234b9dd6
commit ca853c64b7
59 changed files with 767 additions and 612 deletions

View File

@ -21,9 +21,9 @@ function getWorkOrderUrl(request, milestone) {
}
function buildEventSummary(milestone) {
let summary = (milestone.workOrderMilestoneCompletionDate ? '✔ ' : '') +
(milestone.workOrderMilestoneTypeId
? milestone.workOrderMilestoneType
: milestone.workOrderMilestoneDescription).trim();
((milestone.workOrderMilestoneTypeId ?? -1) === -1
? (milestone.workOrderMilestoneDescription ?? '')
: (milestone.workOrderMilestoneType ?? '')).trim();
let occupantCount = 0;
for (const lotOccupancy of milestone.workOrderLotOccupancies) {
for (const occupant of lotOccupancy.lotOccupancyOccupants) {
@ -32,7 +32,7 @@ function buildEventSummary(milestone) {
if (summary !== '') {
summary += ': ';
}
summary += occupant.occupantName ?? '';
summary += (occupant.occupantName ?? '') + ' ' + (occupant.occupantFamilyName ?? '');
}
}
}
@ -81,6 +81,8 @@ function buildEventDescriptionHTML_occupancies(request, milestone) {
escapeHTML(occupant.lotOccupantType) +
': ' +
escapeHTML(occupant.occupantName) +
' ' +
escapeHTML(occupant.occupantFamilyName) +
'<br />';
}
descriptionHTML += '</td></tr>';
@ -257,13 +259,13 @@ export async function handler(request, response) {
for (const occupant of lotOccupancy.lotOccupancyOccupants) {
if (organizerSet) {
calendarEvent.createAttendee({
name: occupant.occupantName,
name: occupant.occupantName + ' ' + occupant.occupantFamilyName,
email: configFunctions.getProperty('settings.workOrders.calendarEmailAddress')
});
}
else {
calendarEvent.organizer({
name: occupant.occupantName,
name: occupant.occupantName + ' ' + occupant.occupantFamilyName,
email: configFunctions.getProperty('settings.workOrders.calendarEmailAddress')
});
organizerSet = true;

View File

@ -49,9 +49,9 @@ function getWorkOrderUrl(
function buildEventSummary(milestone: recordTypes.WorkOrderMilestone): string {
let summary =
(milestone.workOrderMilestoneCompletionDate ? '✔ ' : '') +
(milestone.workOrderMilestoneTypeId
? milestone.workOrderMilestoneType
: milestone.workOrderMilestoneDescription
((milestone.workOrderMilestoneTypeId ?? -1) === -1
? (milestone.workOrderMilestoneDescription ?? '')
: (milestone.workOrderMilestoneType ?? '')
).trim()
let occupantCount = 0
@ -65,7 +65,7 @@ function buildEventSummary(milestone: recordTypes.WorkOrderMilestone): string {
summary += ': '
}
summary += occupant.occupantName ?? ''
summary += (occupant.occupantName ?? '') + ' ' + (occupant.occupantFamilyName ?? '')
}
}
}
@ -129,6 +129,8 @@ function buildEventDescriptionHTML_occupancies(
escapeHTML(occupant.lotOccupantType!) +
': ' +
escapeHTML(occupant.occupantName!) +
' ' +
escapeHTML(occupant.occupantFamilyName!) +
'<br />'
}
@ -403,14 +405,14 @@ export async function handler(
for (const occupant of lotOccupancy.lotOccupancyOccupants!) {
if (organizerSet) {
calendarEvent.createAttendee({
name: occupant.occupantName,
name: occupant.occupantName + ' ' + occupant.occupantFamilyName,
email: configFunctions.getProperty(
'settings.workOrders.calendarEmailAddress'
)
})
} else {
calendarEvent.organizer({
name: occupant.occupantName,
name: occupant.occupantName + ' ' + occupant.occupantFamilyName,
email: configFunctions.getProperty(
'settings.workOrders.calendarEmailAddress'
)

View File

@ -26,6 +26,7 @@ export async function handler(request, response, next) {
return;
}
const reportData = await getReportData(printConfig, request.query);
console.log(reportData);
const reportPath = path.join('views', 'print', 'pdf', printName + '.ejs');
function pdfCallbackFunction(pdf) {
response.setHeader('Content-Disposition', `${attachmentOrInline}; filename=${camelcase(printConfig.title)}.pdf`);

View File

@ -53,6 +53,8 @@ export async function handler(
const reportData = await getReportData(printConfig, request.query)
console.log(reportData)
const reportPath = path.join('views', 'print', 'pdf', printName + '.ejs')
function pdfCallbackFunction(pdf: Buffer): void {

View File

@ -2,7 +2,7 @@ import type { Request, Response } from 'express'
import {
getReportData,
ReportParameters
type ReportParameters
} from '../../helpers/lotOccupancyDB/getReportData.js'
import papaparse from 'papaparse'

View File

@ -58,7 +58,7 @@ export async function getReportData(printConfig, requestQuery) {
}
if (printConfig.params.includes('workOrderId') &&
typeof requestQuery.workOrderId === 'string') {
reportData.workOrder = getWorkOrder(requestQuery.workOrderId, {
reportData.workOrder = await getWorkOrder(requestQuery.workOrderId, {
includeLotsAndLotOccupancies: true,
includeComments: true,
includeMilestones: true

View File

@ -91,7 +91,7 @@ export async function getReportData(
printConfig.params.includes('workOrderId') &&
typeof requestQuery.workOrderId === 'string'
) {
reportData.workOrder = getWorkOrder(requestQuery.workOrderId, {
reportData.workOrder = await getWorkOrder(requestQuery.workOrderId, {
includeLotsAndLotOccupancies: true,
includeComments: true,
includeMilestones: true

View File

@ -76,8 +76,9 @@ export function getOccupantNameWhereClause(occupantName = '', tableAlias = 'o')
if (occupantNamePiece === '') {
continue;
}
sqlWhereClause += ` and instr(lower(${tableAlias}.occupantName), ?)`;
sqlParameters.push(occupantNamePiece);
sqlWhereClause += ` and (instr(lower(${tableAlias}.occupantName), ?)
or instr(lower(${tableAlias}.occupantFamilyName), ?))`;
sqlParameters.push(occupantNamePiece, occupantNamePiece);
}
}
return {

View File

@ -108,8 +108,9 @@ export function getOccupantNameWhereClause(
continue
}
sqlWhereClause += ` and instr(lower(${tableAlias}.occupantName), ?)`
sqlParameters.push(occupantNamePiece)
sqlWhereClause += ` and (instr(lower(${tableAlias}.occupantName), ?)
or instr(lower(${tableAlias}.occupantFamilyName), ?))`
sqlParameters.push(occupantNamePiece, occupantNamePiece)
}
}

View File

@ -9,6 +9,7 @@ interface AddLotOccupancyForm {
[lotOccupancyFieldValue_occupancyTypeFieldId: string]: unknown;
lotOccupantTypeId?: string;
occupantName?: string;
occupantFamilyName?: string;
occupantAddress1?: string;
occupantAddress2?: string;
occupantCity?: string;

View File

@ -36,6 +36,7 @@ export async function addLotOccupancy(lotOccupancyForm, requestSession, connecte
lotOccupancyId,
lotOccupantTypeId: lotOccupancyForm.lotOccupantTypeId,
occupantName: lotOccupancyForm.occupantName,
occupantFamilyName: lotOccupancyForm.occupantFamilyName,
occupantAddress1: lotOccupancyForm.occupantAddress1,
occupantAddress2: lotOccupancyForm.occupantAddress2,
occupantCity: lotOccupancyForm.occupantCity,

View File

@ -20,6 +20,7 @@ interface AddLotOccupancyForm {
lotOccupantTypeId?: string
occupantName?: string
occupantFamilyName?: string
occupantAddress1?: string
occupantAddress2?: string
occupantCity?: string
@ -102,6 +103,7 @@ export async function addLotOccupancy(
lotOccupancyId,
lotOccupantTypeId: lotOccupancyForm.lotOccupantTypeId!,
occupantName: lotOccupancyForm.occupantName!,
occupantFamilyName: lotOccupancyForm.occupantFamilyName!,
occupantAddress1: lotOccupancyForm.occupantAddress1!,
occupantAddress2: lotOccupancyForm.occupantAddress2!,
occupantCity: lotOccupancyForm.occupantCity!,

View File

@ -4,6 +4,7 @@ interface AddLotOccupancyOccupantForm {
lotOccupancyId: string | number;
lotOccupantTypeId: string | number;
occupantName: string;
occupantFamilyName: string;
occupantAddress1: string;
occupantAddress2: string;
occupantCity: string;

View File

@ -16,7 +16,7 @@ export async function addLotOccupancyOccupant(lotOccupancyOccupantForm, requestS
database
.prepare(`insert into LotOccupancyOccupants (
lotOccupancyId, lotOccupantIndex,
occupantName,
occupantName, occupantFamilyName,
occupantAddress1, occupantAddress2,
occupantCity, occupantProvince, occupantPostalCode,
occupantPhoneNumber, occupantEmailAddress,
@ -24,8 +24,8 @@ export async function addLotOccupancyOccupant(lotOccupancyOccupantForm, requestS
lotOccupantTypeId,
recordCreate_userName, recordCreate_timeMillis,
recordUpdate_userName, recordUpdate_timeMillis)
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`)
.run(lotOccupancyOccupantForm.lotOccupancyId, lotOccupantIndex, lotOccupancyOccupantForm.occupantName, lotOccupancyOccupantForm.occupantAddress1, lotOccupancyOccupantForm.occupantAddress2, lotOccupancyOccupantForm.occupantCity, lotOccupancyOccupantForm.occupantProvince, lotOccupancyOccupantForm.occupantPostalCode, lotOccupancyOccupantForm.occupantPhoneNumber, lotOccupancyOccupantForm.occupantEmailAddress, lotOccupancyOccupantForm.occupantComment ?? '', lotOccupancyOccupantForm.lotOccupantTypeId, requestSession.user.userName, rightNowMillis, requestSession.user.userName, rightNowMillis);
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`)
.run(lotOccupancyOccupantForm.lotOccupancyId, lotOccupantIndex, lotOccupancyOccupantForm.occupantName, lotOccupancyOccupantForm.occupantFamilyName, lotOccupancyOccupantForm.occupantAddress1, lotOccupancyOccupantForm.occupantAddress2, lotOccupancyOccupantForm.occupantCity, lotOccupancyOccupantForm.occupantProvince, lotOccupancyOccupantForm.occupantPostalCode, lotOccupancyOccupantForm.occupantPhoneNumber, lotOccupancyOccupantForm.occupantEmailAddress, lotOccupancyOccupantForm.occupantComment ?? '', lotOccupancyOccupantForm.lotOccupantTypeId, requestSession.user.userName, rightNowMillis, requestSession.user.userName, rightNowMillis);
if (connectedDatabase === undefined) {
database.release();
}

View File

@ -7,6 +7,7 @@ interface AddLotOccupancyOccupantForm {
lotOccupancyId: string | number
lotOccupantTypeId: string | number
occupantName: string
occupantFamilyName: string
occupantAddress1: string
occupantAddress2: string
occupantCity: string
@ -46,7 +47,7 @@ export async function addLotOccupancyOccupant(
.prepare(
`insert into LotOccupancyOccupants (
lotOccupancyId, lotOccupantIndex,
occupantName,
occupantName, occupantFamilyName,
occupantAddress1, occupantAddress2,
occupantCity, occupantProvince, occupantPostalCode,
occupantPhoneNumber, occupantEmailAddress,
@ -54,12 +55,13 @@ export async function addLotOccupancyOccupant(
lotOccupantTypeId,
recordCreate_userName, recordCreate_timeMillis,
recordUpdate_userName, recordUpdate_timeMillis)
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`
)
.run(
lotOccupancyOccupantForm.lotOccupancyId,
lotOccupantIndex,
lotOccupancyOccupantForm.occupantName,
lotOccupancyOccupantForm.occupantFamilyName,
lotOccupancyOccupantForm.occupantAddress1,
lotOccupancyOccupantForm.occupantAddress2,
lotOccupancyOccupantForm.occupantCity,

View File

@ -27,6 +27,7 @@ export async function copyLotOccupancy(oldLotOccupancyId, requestSession) {
lotOccupancyId: newLotOccupancyId,
lotOccupantTypeId: occupant.lotOccupantTypeId,
occupantName: occupant.occupantName,
occupantFamilyName: occupant.occupantFamilyName,
occupantAddress1: occupant.occupantAddress1,
occupantAddress2: occupant.occupantAddress2,
occupantCity: occupant.occupantCity,

View File

@ -63,6 +63,7 @@ export async function copyLotOccupancy(
lotOccupancyId: newLotOccupancyId,
lotOccupantTypeId: occupant.lotOccupantTypeId!,
occupantName: occupant.occupantName!,
occupantFamilyName: occupant.occupantFamilyName!,
occupantAddress1: occupant.occupantAddress1!,
occupantAddress2: occupant.occupantAddress2!,
occupantCity: occupant.occupantCity!,

View File

@ -3,7 +3,7 @@ export async function getLotOccupancyOccupants(lotOccupancyId, connectedDatabase
const database = connectedDatabase ?? (await acquireConnection());
const lotOccupancyOccupants = database
.prepare(`select o.lotOccupancyId, o.lotOccupantIndex,
o.occupantName,
o.occupantName, o.occupantFamilyName,
o.occupantAddress1, o.occupantAddress2,
o.occupantCity, o.occupantProvince, o.occupantPostalCode,
o.occupantPhoneNumber, o.occupantEmailAddress,

View File

@ -12,7 +12,7 @@ export async function getLotOccupancyOccupants(
const lotOccupancyOccupants: recordTypes.LotOccupancyOccupant[] = database
.prepare(
`select o.lotOccupancyId, o.lotOccupantIndex,
o.occupantName,
o.occupantName, o.occupantFamilyName,
o.occupantAddress1, o.occupantAddress2,
o.occupantCity, o.occupantProvince, o.occupantPostalCode,
o.occupantPhoneNumber, o.occupantEmailAddress,

View File

@ -11,13 +11,14 @@ export async function getPastLotOccupancyOccupants(filters, options) {
}
sqlWhereClause +=
" and (o.occupantName like '%' || ? || '%'" +
" or o.occupantFamilyName like '%' || ? || '%'" +
" or o.occupantAddress1 like '%' || ? || '%'" +
" or o.occupantAddress2 like '%' || ? || '%'" +
" or o.occupantCity like '%' || ? || '%')";
sqlParameters.push(searchFilterPiece, searchFilterPiece, searchFilterPiece, searchFilterPiece);
sqlParameters.push(searchFilterPiece, searchFilterPiece, searchFilterPiece, searchFilterPiece, searchFilterPiece);
}
}
const sql = `select o.occupantName,
const sql = `select o.occupantName, o.occupantFamilyName,
o.occupantAddress1, o.occupantAddress2,
o.occupantCity, o.occupantProvince, o.occupantPostalCode,
o.occupantPhoneNumber, o.occupantEmailAddress,

View File

@ -31,6 +31,7 @@ export async function getPastLotOccupancyOccupants(
sqlWhereClause +=
" and (o.occupantName like '%' || ? || '%'" +
" or o.occupantFamilyName like '%' || ? || '%'" +
" or o.occupantAddress1 like '%' || ? || '%'" +
" or o.occupantAddress2 like '%' || ? || '%'" +
" or o.occupantCity like '%' || ? || '%')"
@ -39,12 +40,13 @@ export async function getPastLotOccupancyOccupants(
searchFilterPiece,
searchFilterPiece,
searchFilterPiece,
searchFilterPiece,
searchFilterPiece
)
}
}
const sql = `select o.occupantName,
const sql = `select o.occupantName, o.occupantFamilyName,
o.occupantAddress1, o.occupantAddress2,
o.occupantCity, o.occupantProvince, o.occupantPostalCode,
o.occupantPhoneNumber, o.occupantEmailAddress,

View File

@ -25,6 +25,7 @@ const occupantCamelCase = camelCase(configFunctions.getProperty('aliases.occupan
const lotOccupantIndexAlias = occupantCamelCase + 'Index';
const lotOccupantTypeAlias = occupantCamelCase + 'Type';
const occupantNameAlias = occupantCamelCase + 'Name';
const occupantFamilyNameAlias = occupantCamelCase + 'FamilyName';
const occupantAddress1Alias = occupantCamelCase + 'Address1';
const occupantAddress2Alias = occupantCamelCase + 'Address2';
const occupantCityAlias = occupantCamelCase + 'City';
@ -154,6 +155,7 @@ export async function getReportData(reportName, reportParameters = {}) {
sql = `select o.lotOccupantIndex as ${lotOccupantIndexAlias},
t.lotOccupantType as ${lotOccupantTypeAlias},
o.occupantName as ${occupantNameAlias},
o.occupantFamilyName as ${occupantFamilyNameAlias},
o.occupantAddress1 as ${occupantAddress1Alias},
o.occupantAddress2 as ${occupantAddress2Alias},
o.occupantCity as ${occupantCityAlias},

View File

@ -39,6 +39,7 @@ const occupantCamelCase = camelCase(
const lotOccupantIndexAlias = occupantCamelCase + 'Index'
const lotOccupantTypeAlias = occupantCamelCase + 'Type'
const occupantNameAlias = occupantCamelCase + 'Name'
const occupantFamilyNameAlias = occupantCamelCase + 'FamilyName'
const occupantAddress1Alias = occupantCamelCase + 'Address1'
const occupantAddress2Alias = occupantCamelCase + 'Address2'
const occupantCityAlias = occupantCamelCase + 'City'
@ -199,6 +200,7 @@ export async function getReportData(
sql = `select o.lotOccupantIndex as ${lotOccupantIndexAlias},
t.lotOccupantType as ${lotOccupantTypeAlias},
o.occupantName as ${occupantNameAlias},
o.occupantFamilyName as ${occupantFamilyNameAlias},
o.occupantAddress1 as ${occupantAddress1Alias},
o.occupantAddress2 as ${occupantAddress2Alias},
o.occupantCity as ${occupantCityAlias},

View File

@ -4,6 +4,7 @@ interface UpdateLotOccupancyOccupantForm {
lotOccupantIndex: string | number;
lotOccupantTypeId: string | number;
occupantName: string;
occupantFamilyName: string;
occupantAddress1: string;
occupantAddress2: string;
occupantCity: string;

View File

@ -5,6 +5,7 @@ export async function updateLotOccupancyOccupant(lotOccupancyOccupantForm, reque
const results = database
.prepare(`update LotOccupancyOccupants
set occupantName = ?,
occupantFamilyName = ?,
occupantAddress1 = ?,
occupantAddress2 = ?,
occupantCity = ?,
@ -19,7 +20,7 @@ export async function updateLotOccupancyOccupant(lotOccupancyOccupantForm, reque
where recordDelete_timeMillis is null
and lotOccupancyId = ?
and lotOccupantIndex = ?`)
.run(lotOccupancyOccupantForm.occupantName, lotOccupancyOccupantForm.occupantAddress1, lotOccupancyOccupantForm.occupantAddress2, lotOccupancyOccupantForm.occupantCity, lotOccupancyOccupantForm.occupantProvince, lotOccupancyOccupantForm.occupantPostalCode, lotOccupancyOccupantForm.occupantPhoneNumber, lotOccupancyOccupantForm.occupantEmailAddress, lotOccupancyOccupantForm.occupantComment, lotOccupancyOccupantForm.lotOccupantTypeId, requestSession.user.userName, rightNowMillis, lotOccupancyOccupantForm.lotOccupancyId, lotOccupancyOccupantForm.lotOccupantIndex);
.run(lotOccupancyOccupantForm.occupantName, lotOccupancyOccupantForm.occupantFamilyName, lotOccupancyOccupantForm.occupantAddress1, lotOccupancyOccupantForm.occupantAddress2, lotOccupancyOccupantForm.occupantCity, lotOccupancyOccupantForm.occupantProvince, lotOccupancyOccupantForm.occupantPostalCode, lotOccupancyOccupantForm.occupantPhoneNumber, lotOccupancyOccupantForm.occupantEmailAddress, lotOccupancyOccupantForm.occupantComment, lotOccupancyOccupantForm.lotOccupantTypeId, requestSession.user.userName, rightNowMillis, lotOccupancyOccupantForm.lotOccupancyId, lotOccupancyOccupantForm.lotOccupantIndex);
database.release();
return results.changes > 0;
}

View File

@ -7,6 +7,7 @@ interface UpdateLotOccupancyOccupantForm {
lotOccupantIndex: string | number
lotOccupantTypeId: string | number
occupantName: string
occupantFamilyName: string
occupantAddress1: string
occupantAddress2: string
occupantCity: string
@ -29,6 +30,7 @@ export async function updateLotOccupancyOccupant(
.prepare(
`update LotOccupancyOccupants
set occupantName = ?,
occupantFamilyName = ?,
occupantAddress1 = ?,
occupantAddress2 = ?,
occupantCity = ?,
@ -46,6 +48,7 @@ export async function updateLotOccupancyOccupant(
)
.run(
lotOccupancyOccupantForm.occupantName,
lotOccupancyOccupantForm.occupantFamilyName,
lotOccupancyOccupantForm.occupantAddress1,
lotOccupancyOccupantForm.occupantAddress2,
lotOccupancyOccupantForm.occupantCity,

View File

@ -526,6 +526,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
}
modalElement.querySelector('#lotOccupancyOccupantEdit--fontAwesomeIconClass').innerHTML = `<i class="fas fa-fw fa-${lotOccupancyOccupant.fontAwesomeIconClass}" aria-hidden="true"></i>`;
modalElement.querySelector('#lotOccupancyOccupantEdit--occupantName').value = lotOccupancyOccupant.occupantName;
modalElement.querySelector('#lotOccupancyOccupantEdit--occupantFamilyName').value = lotOccupancyOccupant.occupantFamilyName;
modalElement.querySelector('#lotOccupancyOccupantEdit--occupantAddress1').value = lotOccupancyOccupant.occupantAddress1;
modalElement.querySelector('#lotOccupancyOccupantEdit--occupantAddress2').value = lotOccupancyOccupant.occupantAddress2;
modalElement.querySelector('#lotOccupancyOccupantEdit--occupantCity').value = lotOccupancyOccupant.occupantCity;
@ -598,7 +599,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
});
}
function renderLotOccupancyOccupants() {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
const occupantsContainer = document.querySelector('#container--lotOccupancyOccupants');
cityssm.clearElement(occupantsContainer);
if (lotOccupancyOccupants.length === 0) {
@ -623,9 +624,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
lotOccupancyOccupant.lotOccupantIndex.toString();
tableRowElement.innerHTML =
'<td>' +
cityssm.escapeHTML(((_a = lotOccupancyOccupant.occupantName) !== null && _a !== void 0 ? _a : '') === ''
cityssm.escapeHTML(((_a = lotOccupancyOccupant.occupantName) !== null && _a !== void 0 ? _a : '') === '' && ((_b = lotOccupancyOccupant.occupantFamilyName) !== null && _b !== void 0 ? _b : '') === ''
? '(No Name)'
: lotOccupancyOccupant.occupantName) +
: lotOccupancyOccupant.occupantName + ' ' + lotOccupancyOccupant.occupantFamilyName) +
'<br />' +
('<span class="tag">' +
'<i class="fas fa-fw fa-' +
@ -637,37 +638,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
'</span>') +
'</td>' +
('<td>' +
(((_b = lotOccupancyOccupant.occupantAddress1) !== null && _b !== void 0 ? _b : '') === ''
(((_c = lotOccupancyOccupant.occupantAddress1) !== null && _c !== void 0 ? _c : '') === ''
? ''
: cityssm.escapeHTML(lotOccupancyOccupant.occupantAddress1) +
'<br />') +
(((_c = lotOccupancyOccupant.occupantAddress2) !== null && _c !== void 0 ? _c : '') === ''
(((_d = lotOccupancyOccupant.occupantAddress2) !== null && _d !== void 0 ? _d : '') === ''
? ''
: cityssm.escapeHTML(lotOccupancyOccupant.occupantAddress2) +
'<br />') +
(((_d = lotOccupancyOccupant.occupantCity) !== null && _d !== void 0 ? _d : '') === ''
(((_e = lotOccupancyOccupant.occupantCity) !== null && _e !== void 0 ? _e : '') === ''
? ''
: cityssm.escapeHTML(lotOccupancyOccupant.occupantCity) + ', ') +
cityssm.escapeHTML((_e = lotOccupancyOccupant.occupantProvince) !== null && _e !== void 0 ? _e : '') +
cityssm.escapeHTML((_f = lotOccupancyOccupant.occupantProvince) !== null && _f !== void 0 ? _f : '') +
'<br />' +
cityssm.escapeHTML((_f = lotOccupancyOccupant.occupantPostalCode) !== null && _f !== void 0 ? _f : '') +
cityssm.escapeHTML((_g = lotOccupancyOccupant.occupantPostalCode) !== null && _g !== void 0 ? _g : '') +
'</td>') +
('<td>' +
(((_g = lotOccupancyOccupant.occupantPhoneNumber) !== null && _g !== void 0 ? _g : '') === ''
(((_h = lotOccupancyOccupant.occupantPhoneNumber) !== null && _h !== void 0 ? _h : '') === ''
? ''
: cityssm.escapeHTML(lotOccupancyOccupant.occupantPhoneNumber) +
'<br />') +
(((_h = lotOccupancyOccupant.occupantEmailAddress) !== null && _h !== void 0 ? _h : '') === ''
(((_j = lotOccupancyOccupant.occupantEmailAddress) !== null && _j !== void 0 ? _j : '') === ''
? ''
: cityssm.escapeHTML(lotOccupancyOccupant.occupantEmailAddress)) +
'</td>') +
('<td>' +
'<span data-tooltip="' +
cityssm.escapeHTML(((_j = lotOccupancyOccupant.occupantCommentTitle) !== null && _j !== void 0 ? _j : '') === ''
cityssm.escapeHTML(((_k = lotOccupancyOccupant.occupantCommentTitle) !== null && _k !== void 0 ? _k : '') === ''
? 'Comment'
: lotOccupancyOccupant.occupantCommentTitle) +
'">' +
cityssm.escapeHTML((_k = lotOccupancyOccupant.occupantComment) !== null && _k !== void 0 ? _k : '') +
cityssm.escapeHTML((_l = lotOccupancyOccupant.occupantComment) !== null && _l !== void 0 ? _l : '') +
'</span>' +
'</td>') +
('<td class="is-hidden-print">' +
@ -773,7 +774,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
searchResultsElement.innerHTML =
los.getLoadingParagraphHTML('Searching...');
cityssm.postJSON(los.urlPrefix + '/lotOccupancies/doSearchPastOccupants', searchFormElement, (rawResponseJSON) => {
var _a, _b, _c, _d, _e, _f, _g, _h;
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
const responseJSON = rawResponseJSON;
pastOccupantSearchResults = responseJSON.occupants;
const panelElement = document.createElement('div');
@ -785,27 +786,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
panelBlockElement.innerHTML =
'<strong>' +
cityssm.escapeHTML((_a = occupant.occupantName) !== null && _a !== void 0 ? _a : '') +
' ' +
cityssm.escapeHTML((_b = occupant.occupantFamilyName) !== null && _b !== void 0 ? _b : '') +
'</strong>' +
'<br />' +
'<div class="columns">' +
('<div class="column">' +
cityssm.escapeHTML((_b = occupant.occupantAddress1) !== null && _b !== void 0 ? _b : '') +
cityssm.escapeHTML((_c = occupant.occupantAddress1) !== null && _c !== void 0 ? _c : '') +
'<br />' +
(((_c = occupant.occupantAddress2) !== null && _c !== void 0 ? _c : '') === ''
(((_d = occupant.occupantAddress2) !== null && _d !== void 0 ? _d : '') === ''
? ''
: cityssm.escapeHTML(occupant.occupantAddress2) + '<br />') +
cityssm.escapeHTML((_d = occupant.occupantCity) !== null && _d !== void 0 ? _d : '') +
cityssm.escapeHTML((_e = occupant.occupantCity) !== null && _e !== void 0 ? _e : '') +
', ' +
cityssm.escapeHTML((_e = occupant.occupantProvince) !== null && _e !== void 0 ? _e : '') +
cityssm.escapeHTML((_f = occupant.occupantProvince) !== null && _f !== void 0 ? _f : '') +
'<br />' +
cityssm.escapeHTML((_f = occupant.occupantPostalCode) !== null && _f !== void 0 ? _f : '') +
cityssm.escapeHTML((_g = occupant.occupantPostalCode) !== null && _g !== void 0 ? _g : '') +
'</div>') +
('<div class="column">' +
(((_g = occupant.occupantPhoneNumber) !== null && _g !== void 0 ? _g : '') === ''
(((_h = occupant.occupantPhoneNumber) !== null && _h !== void 0 ? _h : '') === ''
? ''
: cityssm.escapeHTML(occupant.occupantPhoneNumber) +
'<br />') +
cityssm.escapeHTML((_h = occupant.occupantEmailAddress) !== null && _h !== void 0 ? _h : '') +
cityssm.escapeHTML((_j = occupant.occupantEmailAddress) !== null && _j !== void 0 ? _j : '') +
'<br />' +
'</div>') +
'</div>';

View File

@ -67,6 +67,7 @@ function openEditLotOccupancyOccupant(clickEvent) {
}
modalElement.querySelector('#lotOccupancyOccupantEdit--fontAwesomeIconClass').innerHTML = `<i class="fas fa-fw fa-${lotOccupancyOccupant.fontAwesomeIconClass}" aria-hidden="true"></i>`;
modalElement.querySelector('#lotOccupancyOccupantEdit--occupantName').value = lotOccupancyOccupant.occupantName;
modalElement.querySelector('#lotOccupancyOccupantEdit--occupantFamilyName').value = lotOccupancyOccupant.occupantFamilyName;
modalElement.querySelector('#lotOccupancyOccupantEdit--occupantAddress1').value = lotOccupancyOccupant.occupantAddress1;
modalElement.querySelector('#lotOccupancyOccupantEdit--occupantAddress2').value = lotOccupancyOccupant.occupantAddress2;
modalElement.querySelector('#lotOccupancyOccupantEdit--occupantCity').value = lotOccupancyOccupant.occupantCity;
@ -139,7 +140,7 @@ function deleteLotOccupancyOccupant(clickEvent) {
});
}
function renderLotOccupancyOccupants() {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
const occupantsContainer = document.querySelector('#container--lotOccupancyOccupants');
cityssm.clearElement(occupantsContainer);
if (lotOccupancyOccupants.length === 0) {
@ -164,9 +165,9 @@ function renderLotOccupancyOccupants() {
lotOccupancyOccupant.lotOccupantIndex.toString();
tableRowElement.innerHTML =
'<td>' +
cityssm.escapeHTML(((_a = lotOccupancyOccupant.occupantName) !== null && _a !== void 0 ? _a : '') === ''
cityssm.escapeHTML(((_a = lotOccupancyOccupant.occupantName) !== null && _a !== void 0 ? _a : '') === '' && ((_b = lotOccupancyOccupant.occupantFamilyName) !== null && _b !== void 0 ? _b : '') === ''
? '(No Name)'
: lotOccupancyOccupant.occupantName) +
: lotOccupancyOccupant.occupantName + ' ' + lotOccupancyOccupant.occupantFamilyName) +
'<br />' +
('<span class="tag">' +
'<i class="fas fa-fw fa-' +
@ -178,37 +179,37 @@ function renderLotOccupancyOccupants() {
'</span>') +
'</td>' +
('<td>' +
(((_b = lotOccupancyOccupant.occupantAddress1) !== null && _b !== void 0 ? _b : '') === ''
(((_c = lotOccupancyOccupant.occupantAddress1) !== null && _c !== void 0 ? _c : '') === ''
? ''
: cityssm.escapeHTML(lotOccupancyOccupant.occupantAddress1) +
'<br />') +
(((_c = lotOccupancyOccupant.occupantAddress2) !== null && _c !== void 0 ? _c : '') === ''
(((_d = lotOccupancyOccupant.occupantAddress2) !== null && _d !== void 0 ? _d : '') === ''
? ''
: cityssm.escapeHTML(lotOccupancyOccupant.occupantAddress2) +
'<br />') +
(((_d = lotOccupancyOccupant.occupantCity) !== null && _d !== void 0 ? _d : '') === ''
(((_e = lotOccupancyOccupant.occupantCity) !== null && _e !== void 0 ? _e : '') === ''
? ''
: cityssm.escapeHTML(lotOccupancyOccupant.occupantCity) + ', ') +
cityssm.escapeHTML((_e = lotOccupancyOccupant.occupantProvince) !== null && _e !== void 0 ? _e : '') +
cityssm.escapeHTML((_f = lotOccupancyOccupant.occupantProvince) !== null && _f !== void 0 ? _f : '') +
'<br />' +
cityssm.escapeHTML((_f = lotOccupancyOccupant.occupantPostalCode) !== null && _f !== void 0 ? _f : '') +
cityssm.escapeHTML((_g = lotOccupancyOccupant.occupantPostalCode) !== null && _g !== void 0 ? _g : '') +
'</td>') +
('<td>' +
(((_g = lotOccupancyOccupant.occupantPhoneNumber) !== null && _g !== void 0 ? _g : '') === ''
(((_h = lotOccupancyOccupant.occupantPhoneNumber) !== null && _h !== void 0 ? _h : '') === ''
? ''
: cityssm.escapeHTML(lotOccupancyOccupant.occupantPhoneNumber) +
'<br />') +
(((_h = lotOccupancyOccupant.occupantEmailAddress) !== null && _h !== void 0 ? _h : '') === ''
(((_j = lotOccupancyOccupant.occupantEmailAddress) !== null && _j !== void 0 ? _j : '') === ''
? ''
: cityssm.escapeHTML(lotOccupancyOccupant.occupantEmailAddress)) +
'</td>') +
('<td>' +
'<span data-tooltip="' +
cityssm.escapeHTML(((_j = lotOccupancyOccupant.occupantCommentTitle) !== null && _j !== void 0 ? _j : '') === ''
cityssm.escapeHTML(((_k = lotOccupancyOccupant.occupantCommentTitle) !== null && _k !== void 0 ? _k : '') === ''
? 'Comment'
: lotOccupancyOccupant.occupantCommentTitle) +
'">' +
cityssm.escapeHTML((_k = lotOccupancyOccupant.occupantComment) !== null && _k !== void 0 ? _k : '') +
cityssm.escapeHTML((_l = lotOccupancyOccupant.occupantComment) !== null && _l !== void 0 ? _l : '') +
'</span>' +
'</td>') +
('<td class="is-hidden-print">' +
@ -314,7 +315,7 @@ else {
searchResultsElement.innerHTML =
los.getLoadingParagraphHTML('Searching...');
cityssm.postJSON(los.urlPrefix + '/lotOccupancies/doSearchPastOccupants', searchFormElement, (rawResponseJSON) => {
var _a, _b, _c, _d, _e, _f, _g, _h;
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
const responseJSON = rawResponseJSON;
pastOccupantSearchResults = responseJSON.occupants;
const panelElement = document.createElement('div');
@ -326,27 +327,29 @@ else {
panelBlockElement.innerHTML =
'<strong>' +
cityssm.escapeHTML((_a = occupant.occupantName) !== null && _a !== void 0 ? _a : '') +
' ' +
cityssm.escapeHTML((_b = occupant.occupantFamilyName) !== null && _b !== void 0 ? _b : '') +
'</strong>' +
'<br />' +
'<div class="columns">' +
('<div class="column">' +
cityssm.escapeHTML((_b = occupant.occupantAddress1) !== null && _b !== void 0 ? _b : '') +
cityssm.escapeHTML((_c = occupant.occupantAddress1) !== null && _c !== void 0 ? _c : '') +
'<br />' +
(((_c = occupant.occupantAddress2) !== null && _c !== void 0 ? _c : '') === ''
(((_d = occupant.occupantAddress2) !== null && _d !== void 0 ? _d : '') === ''
? ''
: cityssm.escapeHTML(occupant.occupantAddress2) + '<br />') +
cityssm.escapeHTML((_d = occupant.occupantCity) !== null && _d !== void 0 ? _d : '') +
cityssm.escapeHTML((_e = occupant.occupantCity) !== null && _e !== void 0 ? _e : '') +
', ' +
cityssm.escapeHTML((_e = occupant.occupantProvince) !== null && _e !== void 0 ? _e : '') +
cityssm.escapeHTML((_f = occupant.occupantProvince) !== null && _f !== void 0 ? _f : '') +
'<br />' +
cityssm.escapeHTML((_f = occupant.occupantPostalCode) !== null && _f !== void 0 ? _f : '') +
cityssm.escapeHTML((_g = occupant.occupantPostalCode) !== null && _g !== void 0 ? _g : '') +
'</div>') +
('<div class="column">' +
(((_g = occupant.occupantPhoneNumber) !== null && _g !== void 0 ? _g : '') === ''
(((_h = occupant.occupantPhoneNumber) !== null && _h !== void 0 ? _h : '') === ''
? ''
: cityssm.escapeHTML(occupant.occupantPhoneNumber) +
'<br />') +
cityssm.escapeHTML((_h = occupant.occupantEmailAddress) !== null && _h !== void 0 ? _h : '') +
cityssm.escapeHTML((_j = occupant.occupantEmailAddress) !== null && _j !== void 0 ? _j : '') +
'<br />' +
'</div>') +
'</div>';

View File

@ -131,6 +131,11 @@ function openEditLotOccupancyOccupant(clickEvent: Event): void {
'#lotOccupancyOccupantEdit--occupantName'
) as HTMLInputElement
).value = lotOccupancyOccupant.occupantName!
;(
modalElement.querySelector(
'#lotOccupancyOccupantEdit--occupantFamilyName'
) as HTMLInputElement
).value = lotOccupancyOccupant.occupantFamilyName!
;(
modalElement.querySelector(
'#lotOccupancyOccupantEdit--occupantAddress1'
@ -302,9 +307,9 @@ function renderLotOccupancyOccupants(): void {
tableRowElement.innerHTML =
'<td>' +
cityssm.escapeHTML(
(lotOccupancyOccupant.occupantName ?? '') === ''
(lotOccupancyOccupant.occupantName ?? '') === '' && (lotOccupancyOccupant.occupantFamilyName ?? '') === ''
? '(No Name)'
: lotOccupancyOccupant.occupantName!
: lotOccupancyOccupant.occupantName! + ' ' + lotOccupancyOccupant.occupantFamilyName!
) +
'<br />' +
('<span class="tag">' +
@ -526,6 +531,8 @@ document
panelBlockElement.innerHTML =
'<strong>' +
cityssm.escapeHTML(occupant.occupantName ?? '') +
' ' +
cityssm.escapeHTML(occupant.occupantFamilyName ?? '') +
'</strong>' +
'<br />' +
'<div class="columns">' +

View File

@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const limit = Number.parseInt(document.querySelector('#searchFilter--limit').value, 10);
const offsetElement = document.querySelector('#searchFilter--offset');
function renderLotOccupancies(responseJSON) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
if (responseJSON.lotOccupancies.length === 0) {
searchResultsContainerElement.innerHTML = `<div class="message is-info">
<p class="message-body">
@ -50,23 +50,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
: occupant.fontAwesomeIconClass) +
'" aria-hidden="true"></i> ') +
cityssm.escapeHTML((_c = occupant.occupantName) !== null && _c !== void 0 ? _c : '') +
' ' +
cityssm.escapeHTML((_d = occupant.occupantFamilyName) !== null && _d !== void 0 ? _d : '') +
'</span><br />';
}
const feeTotal = ((_e = (_d = lotOccupancy.lotOccupancyFees) === null || _d === void 0 ? void 0 : _d.reduce((soFar, currentFee) => {
const feeTotal = ((_f = (_e = lotOccupancy.lotOccupancyFees) === null || _e === void 0 ? void 0 : _e.reduce((soFar, currentFee) => {
var _a, _b, _c;
return (soFar +
(((_a = currentFee.feeAmount) !== null && _a !== void 0 ? _a : 0) + ((_b = currentFee.taxAmount) !== null && _b !== void 0 ? _b : 0)) *
((_c = currentFee.quantity) !== null && _c !== void 0 ? _c : 0));
}, 0)) !== null && _e !== void 0 ? _e : 0).toFixed(2);
const transactionTotal = ((_g = (_f = lotOccupancy.lotOccupancyTransactions) === null || _f === void 0 ? void 0 : _f.reduce((soFar, currentTransaction) => {
}, 0)) !== null && _f !== void 0 ? _f : 0).toFixed(2);
const transactionTotal = ((_h = (_g = lotOccupancy.lotOccupancyTransactions) === null || _g === void 0 ? void 0 : _g.reduce((soFar, currentTransaction) => {
return soFar + currentTransaction.transactionAmount;
}, 0)) !== null && _g !== void 0 ? _g : 0).toFixed(2);
}, 0)) !== null && _h !== void 0 ? _h : 0).toFixed(2);
let feeIconHTML = '';
if (feeTotal !== '0.00' || transactionTotal !== '0.00') {
feeIconHTML = `<span class="icon"
data-tooltip="Total Fees: $${feeTotal}"
aria-label="Total Fees: $${feeTotal}">
<i class="fas fa-dollar-sign ${feeTotal === transactionTotal ? 'has-text-success' : 'has-text-danger'}" aria-hidden="true"></i>
<i class="fas fa-dollar-sign ${feeTotal === transactionTotal
? 'has-text-success'
: 'has-text-danger'}" aria-hidden="true"></i>
</span>`;
}
resultsTbodyElement.insertAdjacentHTML('beforeend', '<tr>' +
@ -79,12 +83,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
'</a>' +
'</td>') +
('<td>' +
(((_h = lotOccupancy.lotId) !== null && _h !== void 0 ? _h : -1) === -1
(((_j = lotOccupancy.lotId) !== null && _j !== void 0 ? _j : -1) === -1
? '<span class="has-text-grey">(No ' +
los.escapedAliases.Lot +
')</span>'
: '<a class="has-tooltip-right" data-tooltip="' +
cityssm.escapeHTML((_j = lotOccupancy.lotType) !== null && _j !== void 0 ? _j : '') +
cityssm.escapeHTML((_k = lotOccupancy.lotType) !== null && _k !== void 0 ? _k : '') +
'" href="' +
los.getLotURL(lotOccupancy.lotId) +
'">' +
@ -92,7 +96,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
'</a>') +
'<br />' +
('<span class="is-size-7">' +
cityssm.escapeHTML((_k = lotOccupancy.mapName) !== null && _k !== void 0 ? _k : '') +
cityssm.escapeHTML((_l = lotOccupancy.mapName) !== null && _l !== void 0 ? _l : '') +
'</span>') +
'</td>') +
('<td>' + lotOccupancy.occupancyStartDateString + '</td>') +
@ -134,10 +138,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
.querySelector('table')
.append(resultsTbodyElement);
searchResultsContainerElement.insertAdjacentHTML('beforeend', los.getSearchResultsPagerHTML(limit, responseJSON.offset, responseJSON.count));
(_l = searchResultsContainerElement
.querySelector("button[data-page='previous']")) === null || _l === void 0 ? void 0 : _l.addEventListener('click', previousAndGetLotOccupancies);
(_m = searchResultsContainerElement
.querySelector("button[data-page='next']")) === null || _m === void 0 ? void 0 : _m.addEventListener('click', nextAndGetLotOccupancies);
.querySelector("button[data-page='previous']")) === null || _m === void 0 ? void 0 : _m.addEventListener('click', previousAndGetLotOccupancies);
(_o = searchResultsContainerElement
.querySelector("button[data-page='next']")) === null || _o === void 0 ? void 0 : _o.addEventListener('click', nextAndGetLotOccupancies);
}
function getLotOccupancies() {
searchResultsContainerElement.innerHTML = los.getLoadingParagraphHTML(`Loading ${los.escapedAliases.Occupancies}...`);

View File

@ -81,25 +81,29 @@ declare const cityssm: cityssmGlobal
) +
'" aria-hidden="true"></i> ') +
cityssm.escapeHTML(occupant.occupantName ?? '') +
' ' +
cityssm.escapeHTML(occupant.occupantFamilyName ?? '') +
'</span><br />'
}
const feeTotal =
(lotOccupancy.lotOccupancyFees?.reduce((soFar, currentFee): number => {
const feeTotal = (
lotOccupancy.lotOccupancyFees?.reduce((soFar, currentFee): number => {
return (
soFar +
((currentFee.feeAmount ?? 0) + (currentFee.taxAmount ?? 0)) *
(currentFee.quantity ?? 0)
)
}, 0) ?? 0).toFixed(2)
}, 0) ?? 0
).toFixed(2)
const transactionTotal =
(lotOccupancy.lotOccupancyTransactions?.reduce(
const transactionTotal = (
lotOccupancy.lotOccupancyTransactions?.reduce(
(soFar, currentTransaction): number => {
return soFar + currentTransaction.transactionAmount
},
0
) ?? 0).toFixed(2)
) ?? 0
).toFixed(2)
let feeIconHTML = ''
@ -108,7 +112,9 @@ declare const cityssm: cityssmGlobal
data-tooltip="Total Fees: $${feeTotal}"
aria-label="Total Fees: $${feeTotal}">
<i class="fas fa-dollar-sign ${
feeTotal === transactionTotal ? 'has-text-success' : 'has-text-danger'
feeTotal === transactionTotal
? 'has-text-success'
: 'has-text-danger'
}" aria-hidden="true"></i>
</span>`
}

View File

@ -322,6 +322,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
los.escapedAliases.Occupant +
'"></i> ' +
cityssm.escapeHTML(occupant.occupantName) +
' ' +
cityssm.escapeHTML(occupant.occupantFamilyName) +
'</span><br />');
}, '')) +
'</td>') +
@ -568,7 +570,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
? '<span class="has-text-grey">(No ' +
cityssm.escapeHTML(los.escapedAliases.Occupants) +
')</span>'
: cityssm.escapeHTML(lotOccupancy.lotOccupancyOccupants[0].occupantName) +
: cityssm.escapeHTML(lotOccupancy.lotOccupancyOccupants[0].occupantName +
' ' +
lotOccupancy.lotOccupancyOccupants[0]
.occupantFamilyName) +
(lotOccupancy.lotOccupancyOccupants.length > 1
? ' plus ' +
(lotOccupancy.lotOccupancyOccupants.length - 1)

View File

@ -185,6 +185,8 @@ function renderRelatedOccupancies() {
los.escapedAliases.Occupant +
'"></i> ' +
cityssm.escapeHTML(occupant.occupantName) +
' ' +
cityssm.escapeHTML(occupant.occupantFamilyName) +
'</span><br />');
}, '')) +
'</td>') +
@ -431,7 +433,10 @@ function doAddLotOccupancy(clickEvent) {
? '<span class="has-text-grey">(No ' +
cityssm.escapeHTML(los.escapedAliases.Occupants) +
')</span>'
: cityssm.escapeHTML(lotOccupancy.lotOccupancyOccupants[0].occupantName) +
: cityssm.escapeHTML(lotOccupancy.lotOccupancyOccupants[0].occupantName +
' ' +
lotOccupancy.lotOccupancyOccupants[0]
.occupantFamilyName) +
(lotOccupancy.lotOccupancyOccupants.length > 1
? ' plus ' +
(lotOccupancy.lotOccupancyOccupants.length - 1)

View File

@ -263,6 +263,8 @@ function renderRelatedOccupancies(): void {
los.escapedAliases.Occupant +
'"></i> ' +
cityssm.escapeHTML(occupant.occupantName!) +
' ' +
cityssm.escapeHTML(occupant.occupantFamilyName!) +
'</span><br />'
)
}, '')) +
@ -610,7 +612,10 @@ document
cityssm.escapeHTML(los.escapedAliases.Occupants) +
')</span>'
: cityssm.escapeHTML(
lotOccupancy.lotOccupancyOccupants![0].occupantName!
lotOccupancy.lotOccupancyOccupants![0].occupantName! +
' ' +
lotOccupancy.lotOccupancyOccupants![0]
.occupantFamilyName!
) +
(lotOccupancy.lotOccupancyOccupants!.length > 1
? ' plus ' +
@ -811,7 +816,6 @@ document.querySelector('#button--addLot')?.addEventListener('click', () => {
},
onremoved() {
bulmaJS.toggleHtmlClipped()
;(document.querySelector('#button--addLot') as HTMLButtonElement).focus()
}
})

View File

@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const workOrderMilestoneDateStringElement = workOrderSearchFiltersFormElement.querySelector('#searchFilter--workOrderMilestoneDateString');
const milestoneCalendarContainerElement = document.querySelector('#container--milestoneCalendar');
function renderMilestones(workOrderMilestones) {
var _a, _b, _c, _d, _e, _f, _g;
var _a, _b, _c, _d, _e, _f, _g, _h;
if (workOrderMilestones.length === 0) {
milestoneCalendarContainerElement.innerHTML = `<div class="message is-info">
<p class="message-body">There are no milestones that meet the search criteria.</p>
@ -58,6 +58,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
los.escapedAliases.Occupancy +
'"></i> ' +
cityssm.escapeHTML((_d = occupant.occupantName) !== null && _d !== void 0 ? _d : '') +
' ' +
cityssm.escapeHTML((_e = occupant.occupantFamilyName) !== null && _e !== void 0 ? _e : '') +
'</span>' +
'<br />';
}
@ -86,15 +88,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
'</div>') +
('<div class="column">' +
'<i class="fas fa-circle" style="color:' +
los.getRandomColor((_e = milestone.workOrderNumber) !== null && _e !== void 0 ? _e : '') +
los.getRandomColor((_f = milestone.workOrderNumber) !== null && _f !== void 0 ? _f : '') +
'" aria-hidden="true"></i>' +
' <a class="has-text-weight-bold" href="' +
los.getWorkOrderURL(milestone.workOrderId) +
'">' +
cityssm.escapeHTML((_f = milestone.workOrderNumber) !== null && _f !== void 0 ? _f : '') +
cityssm.escapeHTML((_g = milestone.workOrderNumber) !== null && _g !== void 0 ? _g : '') +
'</a><br />' +
'<span class="is-size-7">' +
cityssm.escapeHTML((_g = milestone.workOrderDescription) !== null && _g !== void 0 ? _g : '') +
cityssm.escapeHTML((_h = milestone.workOrderDescription) !== null && _h !== void 0 ? _h : '') +
'</span>' +
'</div>') +
('<div class="column is-size-7">' + lotOccupancyHTML + '</div>') +

View File

@ -93,6 +93,8 @@ declare const cityssm: cityssmGlobal
los.escapedAliases.Occupancy +
'"></i> ' +
cityssm.escapeHTML(occupant.occupantName ?? '') +
' ' +
cityssm.escapeHTML(occupant.occupantFamilyName ?? '') +
'</span>' +
'<br />'
}

View File

@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const limit = Number.parseInt(document.querySelector('#searchFilter--limit').value, 10);
const offsetElement = document.querySelector('#searchFilter--offset');
function renderWorkOrders(responseJSON) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
if (responseJSON.workOrders.length === 0) {
searchResultsContainerElement.innerHTML =
'<div class="message is-info">' +
@ -47,9 +47,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
'" aria-label="' +
los.escapedAliases.occupant +
'"></i> ' +
cityssm.escapeHTML(((_e = occupant.occupantName) !== null && _e !== void 0 ? _e : '') === ''
cityssm.escapeHTML(((_e = occupant.occupantName) !== null && _e !== void 0 ? _e : '') === '' && ((_f = occupant.occupantFamilyName) !== null && _f !== void 0 ? _f : '') === ''
? '(No Name)'
: occupant.occupantName) +
: occupant.occupantName + ' ' + occupant.occupantFamilyName) +
'</span><br />';
}
}
@ -59,15 +59,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
los.getWorkOrderURL(workOrder.workOrderId) +
'">' +
(workOrder.workOrderNumber.trim()
? cityssm.escapeHTML((_f = workOrder.workOrderNumber) !== null && _f !== void 0 ? _f : '')
? cityssm.escapeHTML((_g = workOrder.workOrderNumber) !== null && _g !== void 0 ? _g : '')
: '(No Number)') +
'</a>' +
'</td>') +
('<td>' +
cityssm.escapeHTML((_g = workOrder.workOrderType) !== null && _g !== void 0 ? _g : '') +
cityssm.escapeHTML((_h = workOrder.workOrderType) !== null && _h !== void 0 ? _h : '') +
'<br />' +
'<span class="is-size-7">' +
cityssm.escapeHTML((_h = workOrder.workOrderDescription) !== null && _h !== void 0 ? _h : '') +
cityssm.escapeHTML((_j = workOrder.workOrderDescription) !== null && _j !== void 0 ? _j : '') +
'</span>' +
'</td>') +
('<td class="is-nowrap"><span class="is-size-7">' +
@ -132,10 +132,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
searchResultsContainerElement
.querySelector('table')
.append(resultsTbodyElement);
(_j = searchResultsContainerElement
.querySelector("button[data-page='previous']")) === null || _j === void 0 ? void 0 : _j.addEventListener('click', previousAndGetWorkOrders);
(_k = searchResultsContainerElement
.querySelector("button[data-page='next']")) === null || _k === void 0 ? void 0 : _k.addEventListener('click', nextAndGetWorkOrders);
.querySelector("button[data-page='previous']")) === null || _k === void 0 ? void 0 : _k.addEventListener('click', previousAndGetWorkOrders);
(_l = searchResultsContainerElement
.querySelector("button[data-page='next']")) === null || _l === void 0 ? void 0 : _l.addEventListener('click', nextAndGetWorkOrders);
}
function getWorkOrders() {
searchResultsContainerElement.innerHTML = los.getLoadingParagraphHTML('Loading Work Orders...');

View File

@ -80,9 +80,9 @@ declare const cityssm: cityssmGlobal
los.escapedAliases.occupant +
'"></i> ' +
cityssm.escapeHTML(
(occupant.occupantName ?? '') === ''
(occupant.occupantName ?? '') === '' && (occupant.occupantFamilyName ?? '') === ''
? '(No Name)'
: occupant.occupantName!
: occupant.occupantName! + ' ' + occupant.occupantFamilyName!
) +
'</span><br />'
}

View File

@ -64,22 +64,44 @@
</span>
</div>
</div>
<div class="field">
<label class="label" for="lotOccupancyOccupantAdd--occupantName"
><span class="alias" data-alias="Occupant"></span> Name</label
>
<div class="control">
<input
class="input"
id="lotOccupancyOccupantAdd--occupantName"
name="occupantName"
type="text"
maxlength="200"
autocomplete="off"
required
/>
<div class="columns mt-2 mb-0">
<div class="column">
<div class="field">
<label class="label" for="lotOccupancyOccupantAdd--occupantName"
><span class="alias" data-alias="Occupant"></span> Name</label
>
<div class="control">
<input
class="input"
id="lotOccupancyOccupantAdd--occupantName"
name="occupantName"
type="text"
maxlength="200"
autocomplete="off"
required
/>
</div>
</div>
</div>
<div class="column">
<div class="field">
<label class="label" for="lotOccupancyOccupantAdd--occupantFamilyName"
>Family Name</label
>
<div class="control">
<input
class="input"
id="lotOccupancyOccupantAdd--occupantFamilyName"
name="occupantFamilyName"
type="text"
maxlength="200"
autocomplete="off"
/>
</div>
</div>
</div>
</div>
<div class="field">
<label
class="label"

View File

@ -42,20 +42,41 @@
<span class="button is-static" id="lotOccupancyOccupantEdit--fontAwesomeIconClass"></span>
</div>
</div>
<div class="field">
<label class="label" for="lotOccupancyOccupantEdit--occupantName"
><span class="alias" data-alias="Occupant"></span> Name</label
>
<div class="control">
<input
class="input"
id="lotOccupancyOccupantEdit--occupantName"
name="occupantName"
type="text"
maxlength="200"
autocomplete="off"
required
/>
<div class="columns mt-2 mb-0">
<div class="column">
<div class="field">
<label class="label" for="lotOccupancyOccupantEdit--occupantName"
><span class="alias" data-alias="Occupant"></span> Name</label
>
<div class="control">
<input
class="input"
id="lotOccupancyOccupantEdit--occupantName"
name="occupantName"
type="text"
maxlength="200"
autocomplete="off"
required
/>
</div>
</div>
</div>
<div class="column">
<div class="field">
<label class="label" for="lotOccupancyOccupantEdit--occupantFamilyName"
>Family Name</label
>
<div class="control">
<input
class="input"
id="lotOccupancyOccupantEdit--occupantFamilyName"
name="occupantFamilyName"
type="text"
maxlength="200"
autocomplete="off"
/>
</div>
</div>
</div>
</div>
<div class="field">

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const t=exports.los,a=document.querySelector("#form--searchFilters"),e=document.querySelector("#container--searchResults"),s=Number.parseInt(document.querySelector("#searchFilter--limit").value,10),c=document.querySelector("#searchFilter--offset");function n(a){var c,n,l,i,d,p,u,h,y,f,v,m;if(0===a.lotOccupancies.length)return void(e.innerHTML=`<div class="message is-info">\n <p class="message-body">\n There are no ${t.escapedAliases.occupancy} records that meet the search criteria.\n </p>\n </div>`);const g=document.createElement("tbody"),L=cityssm.dateToString(new Date);for(const e of a.lotOccupancies){let a="";a=e.occupancyStartDateString<=L&&(""===e.occupancyEndDateString||e.occupancyEndDateString>=L)?`<span class="has-tooltip-right" data-tooltip="Current ${t.escapedAliases.Occupancy}">\n <i class="fas fa-play" aria-label="Current ${t.escapedAliases.Occupancy}"></i>\n </span>`:e.occupancyStartDateString>L?`<span class="has-tooltip-right" data-tooltip="Future ${t.escapedAliases.Occupancy}">\n <i class="fas fa-fast-forward" aria-label="Future ${t.escapedAliases.Occupancy}"></i>\n </span>`:`<span class="has-tooltip-right" data-tooltip="Past ${t.escapedAliases.Occupancy}">\n <i class="fas fa-stop" aria-label="Past ${t.escapedAliases.Occupancy}"></i>\n </span>`;let s="";for(const t of e.lotOccupancyOccupants)s+='<span class="has-tooltip-left" data-tooltip="'+cityssm.escapeHTML(null!==(c=t.lotOccupantType)&&void 0!==c?c:"")+'"><i class="fas fa-fw fa-'+cityssm.escapeHTML(""===(null!==(n=t.fontAwesomeIconClass)&&void 0!==n?n:"")?"user":t.fontAwesomeIconClass)+'" aria-hidden="true"></i> '+cityssm.escapeHTML(null!==(l=t.occupantName)&&void 0!==l?l:"")+"</span><br />";const o=(null!==(d=null===(i=e.lotOccupancyFees)||void 0===i?void 0:i.reduce((t,a)=>{var e,s,c;return t+((null!==(e=a.feeAmount)&&void 0!==e?e:0)+(null!==(s=a.taxAmount)&&void 0!==s?s:0))*(null!==(c=a.quantity)&&void 0!==c?c:0)},0))&&void 0!==d?d:0).toFixed(2),r=(null!==(u=null===(p=e.lotOccupancyTransactions)||void 0===p?void 0:p.reduce((t,a)=>t+a.transactionAmount,0))&&void 0!==u?u:0).toFixed(2);let v="";"0.00"===o&&"0.00"===r||(v=`<span class="icon"\n data-tooltip="Total Fees: $${o}"\n aria-label="Total Fees: $${o}">\n <i class="fas fa-dollar-sign ${o===r?"has-text-success":"has-text-danger"}" aria-hidden="true"></i>\n </span>`),g.insertAdjacentHTML("beforeend",'<tr><td class="has-width-1">'+a+'</td><td><a class="has-text-weight-bold" href="'+t.getLotOccupancyURL(e.lotOccupancyId)+'">'+cityssm.escapeHTML(e.occupancyType)+"</a></td><td>"+(-1===(null!==(h=e.lotId)&&void 0!==h?h:-1)?'<span class="has-text-grey">(No '+t.escapedAliases.Lot+")</span>":'<a class="has-tooltip-right" data-tooltip="'+cityssm.escapeHTML(null!==(y=e.lotType)&&void 0!==y?y:"")+'" href="'+t.getLotURL(e.lotId)+'">'+cityssm.escapeHTML(e.lotName)+"</a>")+'<br /><span class="is-size-7">'+cityssm.escapeHTML(null!==(f=e.mapName)&&void 0!==f?f:"")+"</span></td><td>"+e.occupancyStartDateString+"</td><td>"+(e.occupancyEndDate?e.occupancyEndDateString:'<span class="has-text-grey">(No End Date)</span>')+"</td><td>"+s+"</td><td>"+v+"</td><td>"+(e.printEJS?'<a class="button is-small" data-tooltip="Print" href="'+t.urlPrefix+"/print/"+e.printEJS+"/?lotOccupancyId="+e.lotOccupancyId+'" target="_blank"><i class="fas fa-print" aria-label="Print"></i></a>':"")+"</td></tr>")}e.innerHTML=`<table class="table is-fullwidth is-striped is-hoverable has-sticky-header">\n <thead><tr>\n <th class="has-width-1"></th>\n <th>${t.escapedAliases.Occupancy} Type</th>\n <th>${t.escapedAliases.Lot}</th>\n <th>${t.escapedAliases.OccupancyStartDate}</th>\n <th>End Date</th>\n <th>${t.escapedAliases.Occupants}</th>\n <th class="has-width-1"><span class="is-sr-only">Fees and Transactions</span></th>\n <th class="has-width-1"><span class="is-sr-only">Print</span></th>\n </tr></thead>\n <table>`,e.querySelector("table").append(g),e.insertAdjacentHTML("beforeend",t.getSearchResultsPagerHTML(s,a.offset,a.count)),null===(v=e.querySelector("button[data-page='previous']"))||void 0===v||v.addEventListener("click",o),null===(m=e.querySelector("button[data-page='next']"))||void 0===m||m.addEventListener("click",r)}function l(){e.innerHTML=t.getLoadingParagraphHTML(`Loading ${t.escapedAliases.Occupancies}...`),cityssm.postJSON(t.urlPrefix+"/lotOccupancies/doSearchLotOccupancies",a,n)}function i(){c.value="0",l()}function o(){c.value=Math.max(Number.parseInt(c.value,10)-s,0).toString(),l()}function r(){c.value=(Number.parseInt(c.value,10)+s).toString(),l()}const d=a.querySelectorAll("input, select");for(const t of d)t.addEventListener("change",i);a.addEventListener("submit",t=>{t.preventDefault()}),l()})();
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const t=exports.los,a=document.querySelector("#form--searchFilters"),e=document.querySelector("#container--searchResults"),s=Number.parseInt(document.querySelector("#searchFilter--limit").value,10),c=document.querySelector("#searchFilter--offset");function n(a){var c,n,l,i,d,p,u,h,y,f,m,v,g;if(0===a.lotOccupancies.length)return void(e.innerHTML=`<div class="message is-info">\n <p class="message-body">\n There are no ${t.escapedAliases.occupancy} records that meet the search criteria.\n </p>\n </div>`);const L=document.createElement("tbody"),b=cityssm.dateToString(new Date);for(const e of a.lotOccupancies){let a="";a=e.occupancyStartDateString<=b&&(""===e.occupancyEndDateString||e.occupancyEndDateString>=b)?`<span class="has-tooltip-right" data-tooltip="Current ${t.escapedAliases.Occupancy}">\n <i class="fas fa-play" aria-label="Current ${t.escapedAliases.Occupancy}"></i>\n </span>`:e.occupancyStartDateString>b?`<span class="has-tooltip-right" data-tooltip="Future ${t.escapedAliases.Occupancy}">\n <i class="fas fa-fast-forward" aria-label="Future ${t.escapedAliases.Occupancy}"></i>\n </span>`:`<span class="has-tooltip-right" data-tooltip="Past ${t.escapedAliases.Occupancy}">\n <i class="fas fa-stop" aria-label="Past ${t.escapedAliases.Occupancy}"></i>\n </span>`;let s="";for(const t of e.lotOccupancyOccupants)s+='<span class="has-tooltip-left" data-tooltip="'+cityssm.escapeHTML(null!==(c=t.lotOccupantType)&&void 0!==c?c:"")+'"><i class="fas fa-fw fa-'+cityssm.escapeHTML(""===(null!==(n=t.fontAwesomeIconClass)&&void 0!==n?n:"")?"user":t.fontAwesomeIconClass)+'" aria-hidden="true"></i> '+cityssm.escapeHTML(null!==(l=t.occupantName)&&void 0!==l?l:"")+" "+cityssm.escapeHTML(null!==(i=t.occupantFamilyName)&&void 0!==i?i:"")+"</span><br />";const o=(null!==(p=null===(d=e.lotOccupancyFees)||void 0===d?void 0:d.reduce((t,a)=>{var e,s,c;return t+((null!==(e=a.feeAmount)&&void 0!==e?e:0)+(null!==(s=a.taxAmount)&&void 0!==s?s:0))*(null!==(c=a.quantity)&&void 0!==c?c:0)},0))&&void 0!==p?p:0).toFixed(2),r=(null!==(h=null===(u=e.lotOccupancyTransactions)||void 0===u?void 0:u.reduce((t,a)=>t+a.transactionAmount,0))&&void 0!==h?h:0).toFixed(2);let v="";"0.00"===o&&"0.00"===r||(v=`<span class="icon"\n data-tooltip="Total Fees: $${o}"\n aria-label="Total Fees: $${o}">\n <i class="fas fa-dollar-sign ${o===r?"has-text-success":"has-text-danger"}" aria-hidden="true"></i>\n </span>`),L.insertAdjacentHTML("beforeend",'<tr><td class="has-width-1">'+a+'</td><td><a class="has-text-weight-bold" href="'+t.getLotOccupancyURL(e.lotOccupancyId)+'">'+cityssm.escapeHTML(e.occupancyType)+"</a></td><td>"+(-1===(null!==(y=e.lotId)&&void 0!==y?y:-1)?'<span class="has-text-grey">(No '+t.escapedAliases.Lot+")</span>":'<a class="has-tooltip-right" data-tooltip="'+cityssm.escapeHTML(null!==(f=e.lotType)&&void 0!==f?f:"")+'" href="'+t.getLotURL(e.lotId)+'">'+cityssm.escapeHTML(e.lotName)+"</a>")+'<br /><span class="is-size-7">'+cityssm.escapeHTML(null!==(m=e.mapName)&&void 0!==m?m:"")+"</span></td><td>"+e.occupancyStartDateString+"</td><td>"+(e.occupancyEndDate?e.occupancyEndDateString:'<span class="has-text-grey">(No End Date)</span>')+"</td><td>"+s+"</td><td>"+v+"</td><td>"+(e.printEJS?'<a class="button is-small" data-tooltip="Print" href="'+t.urlPrefix+"/print/"+e.printEJS+"/?lotOccupancyId="+e.lotOccupancyId+'" target="_blank"><i class="fas fa-print" aria-label="Print"></i></a>':"")+"</td></tr>")}e.innerHTML=`<table class="table is-fullwidth is-striped is-hoverable has-sticky-header">\n <thead><tr>\n <th class="has-width-1"></th>\n <th>${t.escapedAliases.Occupancy} Type</th>\n <th>${t.escapedAliases.Lot}</th>\n <th>${t.escapedAliases.OccupancyStartDate}</th>\n <th>End Date</th>\n <th>${t.escapedAliases.Occupants}</th>\n <th class="has-width-1"><span class="is-sr-only">Fees and Transactions</span></th>\n <th class="has-width-1"><span class="is-sr-only">Print</span></th>\n </tr></thead>\n <table>`,e.querySelector("table").append(L),e.insertAdjacentHTML("beforeend",t.getSearchResultsPagerHTML(s,a.offset,a.count)),null===(v=e.querySelector("button[data-page='previous']"))||void 0===v||v.addEventListener("click",o),null===(g=e.querySelector("button[data-page='next']"))||void 0===g||g.addEventListener("click",r)}function l(){e.innerHTML=t.getLoadingParagraphHTML(`Loading ${t.escapedAliases.Occupancies}...`),cityssm.postJSON(t.urlPrefix+"/lotOccupancies/doSearchLotOccupancies",a,n)}function i(){c.value="0",l()}function o(){c.value=Math.max(Number.parseInt(c.value,10)-s,0).toString(),l()}function r(){c.value=(Number.parseInt(c.value,10)+s).toString(),l()}const d=a.querySelectorAll("input, select");for(const t of d)t.addEventListener("change",i);a.addEventListener("submit",t=>{t.preventDefault()}),l()})();

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const e=exports.los,s=document.querySelector("#form--searchFilters"),r=s.querySelector("#searchFilter--workOrderMilestoneDateFilter"),a=s.querySelector("#searchFilter--workOrderMilestoneDateString"),t=document.querySelector("#container--milestoneCalendar");function i(r){r&&r.preventDefault(),t.innerHTML=e.getLoadingParagraphHTML("Loading Milestones..."),cityssm.postJSON(e.urlPrefix+"/workOrders/doGetWorkOrderMilestones",s,s=>{!function(s){var r,a,i,o,n,l,c;if(0===s.length)return void(t.innerHTML='<div class="message is-info">\n <p class="message-body">There are no milestones that meet the search criteria.</p>\n </div>');t.innerHTML="";const d=cityssm.dateToString(new Date);let p,m="";for(const u of s){m!==u.workOrderMilestoneDateString&&(p&&t.append(p),(p=document.createElement("div")).className="panel",p.innerHTML=`<h2 class="panel-heading">${u.workOrderMilestoneDateString}</h2>`,m=u.workOrderMilestoneDateString);const s=document.createElement("div");s.className="panel-block is-block",!u.workOrderMilestoneCompletionDate&&u.workOrderMilestoneDateString<d&&s.classList.add("has-background-warning-light");let M="";for(const s of u.workOrderLots)M+='<span class="has-tooltip-left" data-tooltip="'+cityssm.escapeHTML(null!==(r=s.mapName)&&void 0!==r?r:"")+'"><i class="fas fa-vector-square" aria-label="'+e.escapedAliases.Lot+'"></i> '+cityssm.escapeHTML(null!==(a=s.lotName)&&void 0!==a?a:"")+"</span><br />";for(const s of u.workOrderLotOccupancies)for(const r of s.lotOccupancyOccupants)M+='<span class="has-tooltip-left" data-tooltip="'+cityssm.escapeHTML(null!==(i=r.lotOccupantType)&&void 0!==i?i:"")+'"><i class="fas fa-user" aria-label="'+e.escapedAliases.Occupancy+'"></i> '+cityssm.escapeHTML(null!==(o=r.occupantName)&&void 0!==o?o:"")+"</span><br />";s.innerHTML='<div class="columns"><div class="column is-narrow"><span class="icon is-small">'+(u.workOrderMilestoneCompletionDate?'<i class="fas fa-check" aria-label="Completed"></i>':'<i class="far fa-square has-text-grey" aria-label="Incomplete"></i>')+'</span></div><div class="column">'+(0===u.workOrderMilestoneTime?"":u.workOrderMilestoneTimeString+"<br />")+(u.workOrderMilestoneTypeId?"<strong>"+cityssm.escapeHTML(u.workOrderMilestoneType)+"</strong><br />":"")+'<span class="is-size-7">'+cityssm.escapeHTML(u.workOrderMilestoneDescription)+'</span></div><div class="column"><i class="fas fa-circle" style="color:'+e.getRandomColor(null!==(n=u.workOrderNumber)&&void 0!==n?n:"")+'" aria-hidden="true"></i> <a class="has-text-weight-bold" href="'+e.getWorkOrderURL(u.workOrderId)+'">'+cityssm.escapeHTML(null!==(l=u.workOrderNumber)&&void 0!==l?l:"")+'</a><br /><span class="is-size-7">'+cityssm.escapeHTML(null!==(c=u.workOrderDescription)&&void 0!==c?c:"")+'</span></div><div class="column is-size-7">'+M+"</div></div>",p.append(s)}t.append(p)}(s.workOrderMilestones)})}r.addEventListener("change",()=>{a.closest("fieldset").disabled="date"!==r.value,i()}),e.initializeDatePickers(s),a.addEventListener("change",i),s.addEventListener("submit",i),i()})();
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const e=exports.los,s=document.querySelector("#form--searchFilters"),r=s.querySelector("#searchFilter--workOrderMilestoneDateFilter"),a=s.querySelector("#searchFilter--workOrderMilestoneDateString"),t=document.querySelector("#container--milestoneCalendar");function i(r){r&&r.preventDefault(),t.innerHTML=e.getLoadingParagraphHTML("Loading Milestones..."),cityssm.postJSON(e.urlPrefix+"/workOrders/doGetWorkOrderMilestones",s,s=>{!function(s){var r,a,i,o,n,l,c,d;if(0===s.length)return void(t.innerHTML='<div class="message is-info">\n <p class="message-body">There are no milestones that meet the search criteria.</p>\n </div>');t.innerHTML="";const p=cityssm.dateToString(new Date);let m,u="";for(const M of s){u!==M.workOrderMilestoneDateString&&(m&&t.append(m),(m=document.createElement("div")).className="panel",m.innerHTML=`<h2 class="panel-heading">${M.workOrderMilestoneDateString}</h2>`,u=M.workOrderMilestoneDateString);const s=document.createElement("div");s.className="panel-block is-block",!M.workOrderMilestoneCompletionDate&&M.workOrderMilestoneDateString<p&&s.classList.add("has-background-warning-light");let v="";for(const s of M.workOrderLots)v+='<span class="has-tooltip-left" data-tooltip="'+cityssm.escapeHTML(null!==(r=s.mapName)&&void 0!==r?r:"")+'"><i class="fas fa-vector-square" aria-label="'+e.escapedAliases.Lot+'"></i> '+cityssm.escapeHTML(null!==(a=s.lotName)&&void 0!==a?a:"")+"</span><br />";for(const s of M.workOrderLotOccupancies)for(const r of s.lotOccupancyOccupants)v+='<span class="has-tooltip-left" data-tooltip="'+cityssm.escapeHTML(null!==(i=r.lotOccupantType)&&void 0!==i?i:"")+'"><i class="fas fa-user" aria-label="'+e.escapedAliases.Occupancy+'"></i> '+cityssm.escapeHTML(null!==(o=r.occupantName)&&void 0!==o?o:"")+" "+cityssm.escapeHTML(null!==(n=r.occupantFamilyName)&&void 0!==n?n:"")+"</span><br />";s.innerHTML='<div class="columns"><div class="column is-narrow"><span class="icon is-small">'+(M.workOrderMilestoneCompletionDate?'<i class="fas fa-check" aria-label="Completed"></i>':'<i class="far fa-square has-text-grey" aria-label="Incomplete"></i>')+'</span></div><div class="column">'+(0===M.workOrderMilestoneTime?"":M.workOrderMilestoneTimeString+"<br />")+(M.workOrderMilestoneTypeId?"<strong>"+cityssm.escapeHTML(M.workOrderMilestoneType)+"</strong><br />":"")+'<span class="is-size-7">'+cityssm.escapeHTML(M.workOrderMilestoneDescription)+'</span></div><div class="column"><i class="fas fa-circle" style="color:'+e.getRandomColor(null!==(l=M.workOrderNumber)&&void 0!==l?l:"")+'" aria-hidden="true"></i> <a class="has-text-weight-bold" href="'+e.getWorkOrderURL(M.workOrderId)+'">'+cityssm.escapeHTML(null!==(c=M.workOrderNumber)&&void 0!==c?c:"")+'</a><br /><span class="is-size-7">'+cityssm.escapeHTML(null!==(d=M.workOrderDescription)&&void 0!==d?d:"")+'</span></div><div class="column is-size-7">'+v+"</div></div>",m.append(s)}t.append(m)}(s.workOrderMilestones)})}r.addEventListener("change",()=>{a.closest("fieldset").disabled="date"!==r.value,i()}),e.initializeDatePickers(s),a.addEventListener("change",i),s.addEventListener("submit",i),i()})();

View File

@ -1 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const e=exports.los,t=exports.workOrderPrints,s=document.querySelector("#form--searchFilters");e.initializeDatePickers(s);const a=document.querySelector("#container--searchResults"),r=Number.parseInt(document.querySelector("#searchFilter--limit").value,10),o=document.querySelector("#searchFilter--offset");function l(s){var o,l,i,n,p,u,f,h,m,O;if(0===s.workOrders.length)return void(a.innerHTML='<div class="message is-info"><p class="message-body">There are no work orders that meet the search criteria.</p></div>');const k=document.createElement("tbody");for(const a of s.workOrders){let s="";for(const t of a.workOrderLots)s+='<span class="has-tooltip-left" data-tooltip="'+cityssm.escapeHTML(null!==(o=t.mapName)&&void 0!==o?o:"")+'"><i class="fas fa-fw fa-vector-square" aria-label="'+e.escapedAliases.Lot+'"></i> '+cityssm.escapeHTML(""===(null!==(l=t.lotName)&&void 0!==l?l:"")?"(No "+e.escapedAliases.Lot+" Name)":t.lotName)+"</span><br />";for(const t of a.workOrderLotOccupancies)for(const a of t.lotOccupancyOccupants)s+='<span class="has-tooltip-left" data-tooltip="'+cityssm.escapeHTML(null!==(i=a.lotOccupantType)&&void 0!==i?i:"")+'"><i class="fas fa-fw fa-'+cityssm.escapeHTML(""===(null!==(n=a.fontAwesomeIconClass)&&void 0!==n?n:"")?"user":a.fontAwesomeIconClass)+'" aria-label="'+e.escapedAliases.occupant+'"></i> '+cityssm.escapeHTML(""===(null!==(p=a.occupantName)&&void 0!==p?p:"")?"(No Name)":a.occupantName)+"</span><br />";k.insertAdjacentHTML("beforeend",'<tr><td><a class="has-text-weight-bold" href="'+e.getWorkOrderURL(a.workOrderId)+'">'+(a.workOrderNumber.trim()?cityssm.escapeHTML(null!==(u=a.workOrderNumber)&&void 0!==u?u:""):"(No Number)")+"</a></td><td>"+cityssm.escapeHTML(null!==(f=a.workOrderType)&&void 0!==f?f:"")+'<br /><span class="is-size-7">'+cityssm.escapeHTML(null!==(h=a.workOrderDescription)&&void 0!==h?h:"")+'</span></td><td class="is-nowrap"><span class="is-size-7">'+s+'</span></td><td class="is-nowrap"><span class="has-tooltip-left" data-tooltip="'+e.escapedAliases.WorkOrderOpenDate+'"><i class="fas fa-fw fa-play" aria-label="'+e.escapedAliases.WorkOrderOpenDate+'"></i> '+a.workOrderOpenDateString+'</span><br /><span class="has-tooltip-left" data-tooltip="'+e.escapedAliases.WorkOrderCloseDate+'"><i class="fas fa-fw fa-stop" aria-label="'+e.escapedAliases.WorkOrderCloseDate+'"></i> '+(a.workOrderCloseDate?a.workOrderCloseDateString:'<span class="has-text-grey">(No '+e.escapedAliases.WorkOrderCloseDate+")</span>")+"</span></td><td>"+(0===a.workOrderMilestoneCount?"-":a.workOrderMilestoneCompletionCount+" / "+a.workOrderMilestoneCount)+"</td>"+(t.length>0?'<td><a class="button is-small" data-tooltip="Print" href="'+e.urlPrefix+"/print/"+t[0]+"/?workOrderId="+a.workOrderId+'" target="_blank"><i class="fas fa-print" aria-label="Print"></i></a></td>':"")+"</tr>")}a.innerHTML='<table class="table is-fullwidth is-striped is-hoverable has-sticky-header"><thead><tr><th>Work Order Number</th><th>Description</th><th>Related</th><th>Date</th><th class="has-tooltip-bottom" data-tooltip="Completed / Total Milestones">Progress</th>'+(t.length>0?'<th class="has-width-1"></th>':"")+"</tr></thead><table>",a.insertAdjacentHTML("beforeend",e.getSearchResultsPagerHTML(r,s.offset,s.count)),a.querySelector("table").append(k),null===(m=a.querySelector("button[data-page='previous']"))||void 0===m||m.addEventListener("click",c),null===(O=a.querySelector("button[data-page='next']"))||void 0===O||O.addEventListener("click",d)}function i(){a.innerHTML=e.getLoadingParagraphHTML("Loading Work Orders..."),cityssm.postJSON(e.urlPrefix+"/workOrders/doSearchWorkOrders",s,l)}function n(){o.value="0",i()}function c(){o.value=Math.max(Number.parseInt(o.value,10)-r,0).toString(),i()}function d(){o.value=(Number.parseInt(o.value,10)+r).toString(),i()}const p=s.querySelectorAll("input, select");for(const e of p)e.addEventListener("change",n);s.addEventListener("submit",e=>{e.preventDefault()}),i()})();
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const e=exports.los,t=exports.workOrderPrints,s=document.querySelector("#form--searchFilters");e.initializeDatePickers(s);const a=document.querySelector("#container--searchResults"),r=Number.parseInt(document.querySelector("#searchFilter--limit").value,10),o=document.querySelector("#searchFilter--offset");function l(s){var o,l,i,n,p,u,f,m,h,O,k;if(0===s.workOrders.length)return void(a.innerHTML='<div class="message is-info"><p class="message-body">There are no work orders that meet the search criteria.</p></div>');const b=document.createElement("tbody");for(const a of s.workOrders){let s="";for(const t of a.workOrderLots)s+='<span class="has-tooltip-left" data-tooltip="'+cityssm.escapeHTML(null!==(o=t.mapName)&&void 0!==o?o:"")+'"><i class="fas fa-fw fa-vector-square" aria-label="'+e.escapedAliases.Lot+'"></i> '+cityssm.escapeHTML(""===(null!==(l=t.lotName)&&void 0!==l?l:"")?"(No "+e.escapedAliases.Lot+" Name)":t.lotName)+"</span><br />";for(const t of a.workOrderLotOccupancies)for(const a of t.lotOccupancyOccupants)s+='<span class="has-tooltip-left" data-tooltip="'+cityssm.escapeHTML(null!==(i=a.lotOccupantType)&&void 0!==i?i:"")+'"><i class="fas fa-fw fa-'+cityssm.escapeHTML(""===(null!==(n=a.fontAwesomeIconClass)&&void 0!==n?n:"")?"user":a.fontAwesomeIconClass)+'" aria-label="'+e.escapedAliases.occupant+'"></i> '+cityssm.escapeHTML(""===(null!==(p=a.occupantName)&&void 0!==p?p:"")&&""===(null!==(u=a.occupantFamilyName)&&void 0!==u?u:"")?"(No Name)":a.occupantName+" "+a.occupantFamilyName)+"</span><br />";b.insertAdjacentHTML("beforeend",'<tr><td><a class="has-text-weight-bold" href="'+e.getWorkOrderURL(a.workOrderId)+'">'+(a.workOrderNumber.trim()?cityssm.escapeHTML(null!==(f=a.workOrderNumber)&&void 0!==f?f:""):"(No Number)")+"</a></td><td>"+cityssm.escapeHTML(null!==(m=a.workOrderType)&&void 0!==m?m:"")+'<br /><span class="is-size-7">'+cityssm.escapeHTML(null!==(h=a.workOrderDescription)&&void 0!==h?h:"")+'</span></td><td class="is-nowrap"><span class="is-size-7">'+s+'</span></td><td class="is-nowrap"><span class="has-tooltip-left" data-tooltip="'+e.escapedAliases.WorkOrderOpenDate+'"><i class="fas fa-fw fa-play" aria-label="'+e.escapedAliases.WorkOrderOpenDate+'"></i> '+a.workOrderOpenDateString+'</span><br /><span class="has-tooltip-left" data-tooltip="'+e.escapedAliases.WorkOrderCloseDate+'"><i class="fas fa-fw fa-stop" aria-label="'+e.escapedAliases.WorkOrderCloseDate+'"></i> '+(a.workOrderCloseDate?a.workOrderCloseDateString:'<span class="has-text-grey">(No '+e.escapedAliases.WorkOrderCloseDate+")</span>")+"</span></td><td>"+(0===a.workOrderMilestoneCount?"-":a.workOrderMilestoneCompletionCount+" / "+a.workOrderMilestoneCount)+"</td>"+(t.length>0?'<td><a class="button is-small" data-tooltip="Print" href="'+e.urlPrefix+"/print/"+t[0]+"/?workOrderId="+a.workOrderId+'" target="_blank"><i class="fas fa-print" aria-label="Print"></i></a></td>':"")+"</tr>")}a.innerHTML='<table class="table is-fullwidth is-striped is-hoverable has-sticky-header"><thead><tr><th>Work Order Number</th><th>Description</th><th>Related</th><th>Date</th><th class="has-tooltip-bottom" data-tooltip="Completed / Total Milestones">Progress</th>'+(t.length>0?'<th class="has-width-1"></th>':"")+"</tr></thead><table>",a.insertAdjacentHTML("beforeend",e.getSearchResultsPagerHTML(r,s.offset,s.count)),a.querySelector("table").append(b),null===(O=a.querySelector("button[data-page='previous']"))||void 0===O||O.addEventListener("click",c),null===(k=a.querySelector("button[data-page='next']"))||void 0===k||k.addEventListener("click",d)}function i(){a.innerHTML=e.getLoadingParagraphHTML("Loading Work Orders..."),cityssm.postJSON(e.urlPrefix+"/workOrders/doSearchWorkOrders",s,l)}function n(){o.value="0",i()}function c(){o.value=Math.max(Number.parseInt(o.value,10)-r,0).toString(),i()}function d(){o.value=(Number.parseInt(o.value,10)+r).toString(),i()}const p=s.querySelectorAll("input, select");for(const e of p)e.addEventListener("change",n);s.addEventListener("submit",e=>{e.preventDefault()}),i()})();

View File

@ -206,6 +206,7 @@ async function importFromMasterCSV() {
lotOccupancyId: preneedLotOccupancyId,
lotOccupantTypeId: importIds.preneedOwnerLotOccupantTypeId,
occupantName: masterRow.CM_PRENEED_OWNER,
occupantFamilyName: '',
occupantAddress1: masterRow.CM_ADDRESS,
occupantAddress2: '',
occupantCity: masterRow.CM_CITY,
@ -265,6 +266,7 @@ async function importFromMasterCSV() {
lotOccupancyId: deceasedLotOccupancyId,
lotOccupantTypeId: importIds.deceasedLotOccupantTypeId,
occupantName: masterRow.CM_DECEASED_NAME,
occupantFamilyName: '',
occupantAddress1: masterRow.CM_ADDRESS,
occupantAddress2: '',
occupantCity: masterRow.CM_CITY,
@ -307,6 +309,7 @@ async function importFromMasterCSV() {
lotOccupancyId: deceasedLotOccupancyId,
lotOccupantTypeId: funeralHomeOccupant.lotOccupantTypeId,
occupantName: funeralHomeOccupant.occupantName,
occupantFamilyName: '',
occupantAddress1: funeralHomeOccupant.occupantAddress1,
occupantAddress2: funeralHomeOccupant.occupantAddress2,
occupantCity: funeralHomeOccupant.occupantCity,
@ -372,6 +375,7 @@ async function importFromMasterCSV() {
lotOccupancyId: deceasedLotOccupancyId,
lotOccupantTypeId: importIds.preneedOwnerLotOccupantTypeId,
occupantName: masterRow.CM_PRENEED_OWNER,
occupantFamilyName: '',
occupantAddress1: '',
occupantAddress2: '',
occupantCity: '',
@ -479,6 +483,7 @@ async function importFromPrepaidCSV() {
lotOccupancyId,
lotOccupantTypeId: importIds.preneedOwnerLotOccupantTypeId,
occupantName: prepaidRow.CMPP_PREPAID_FOR_NAME,
occupantFamilyName: '',
occupantAddress1: prepaidRow.CMPP_ADDRESS,
occupantAddress2: '',
occupantCity: prepaidRow.CMPP_CITY,
@ -492,6 +497,7 @@ async function importFromPrepaidCSV() {
lotOccupancyId,
lotOccupantTypeId: importIds.purchaserLotOccupantTypeId,
occupantName: prepaidRow.CMPP_ARRANGED_BY_NAME,
occupantFamilyName: '',
occupantAddress1: '',
occupantAddress2: '',
occupantCity: '',
@ -726,6 +732,7 @@ async function importFromWorkOrderCSV() {
lotOccupancyId,
lotOccupantTypeId: importIds.deceasedLotOccupantTypeId,
occupantName: workOrderRow.WO_DECEASED_NAME,
occupantFamilyName: '',
occupantAddress1: workOrderRow.WO_ADDRESS,
occupantAddress2: '',
occupantCity: workOrderRow.WO_CITY,
@ -777,6 +784,7 @@ async function importFromWorkOrderCSV() {
lotOccupancyId,
lotOccupantTypeId: funeralHomeOccupant.lotOccupantTypeId,
occupantName: funeralHomeOccupant.occupantName,
occupantFamilyName: '',
occupantAddress1: funeralHomeOccupant.occupantAddress1,
occupantAddress2: funeralHomeOccupant.occupantAddress2,
occupantCity: funeralHomeOccupant.occupantCity,

View File

@ -471,6 +471,7 @@ async function importFromMasterCSV(): Promise<void> {
lotOccupancyId: preneedLotOccupancyId,
lotOccupantTypeId: importIds.preneedOwnerLotOccupantTypeId,
occupantName: masterRow.CM_PRENEED_OWNER,
occupantFamilyName: '',
occupantAddress1: masterRow.CM_ADDRESS,
occupantAddress2: '',
occupantCity: masterRow.CM_CITY,
@ -568,6 +569,7 @@ async function importFromMasterCSV(): Promise<void> {
lotOccupancyId: deceasedLotOccupancyId,
lotOccupantTypeId: importIds.deceasedLotOccupantTypeId,
occupantName: masterRow.CM_DECEASED_NAME,
occupantFamilyName: '',
occupantAddress1: masterRow.CM_ADDRESS,
occupantAddress2: '',
occupantCity: masterRow.CM_CITY,
@ -643,6 +645,7 @@ async function importFromMasterCSV(): Promise<void> {
lotOccupancyId: deceasedLotOccupancyId,
lotOccupantTypeId: funeralHomeOccupant.lotOccupantTypeId!,
occupantName: funeralHomeOccupant.occupantName!,
occupantFamilyName: '',
occupantAddress1: funeralHomeOccupant.occupantAddress1!,
occupantAddress2: funeralHomeOccupant.occupantAddress2!,
occupantCity: funeralHomeOccupant.occupantCity!,
@ -767,6 +770,7 @@ async function importFromMasterCSV(): Promise<void> {
lotOccupancyId: deceasedLotOccupancyId,
lotOccupantTypeId: importIds.preneedOwnerLotOccupantTypeId,
occupantName: masterRow.CM_PRENEED_OWNER,
occupantFamilyName: '',
occupantAddress1: '',
occupantAddress2: '',
occupantCity: '',
@ -912,6 +916,7 @@ async function importFromPrepaidCSV(): Promise<void> {
lotOccupancyId,
lotOccupantTypeId: importIds.preneedOwnerLotOccupantTypeId,
occupantName: prepaidRow.CMPP_PREPAID_FOR_NAME,
occupantFamilyName: '',
occupantAddress1: prepaidRow.CMPP_ADDRESS,
occupantAddress2: '',
occupantCity: prepaidRow.CMPP_CITY,
@ -930,6 +935,7 @@ async function importFromPrepaidCSV(): Promise<void> {
lotOccupancyId,
lotOccupantTypeId: importIds.purchaserLotOccupantTypeId,
occupantName: prepaidRow.CMPP_ARRANGED_BY_NAME,
occupantFamilyName: '',
occupantAddress1: '',
occupantAddress2: '',
occupantCity: '',
@ -1265,6 +1271,7 @@ async function importFromWorkOrderCSV(): Promise<void> {
lotOccupancyId,
lotOccupantTypeId: importIds.deceasedLotOccupantTypeId,
occupantName: workOrderRow.WO_DECEASED_NAME,
occupantFamilyName: '',
occupantAddress1: workOrderRow.WO_ADDRESS,
occupantAddress2: '',
occupantCity: workOrderRow.WO_CITY,
@ -1356,6 +1363,7 @@ async function importFromWorkOrderCSV(): Promise<void> {
lotOccupancyId,
lotOccupantTypeId: funeralHomeOccupant.lotOccupantTypeId!,
occupantName: funeralHomeOccupant.occupantName!,
occupantFamilyName: '',
occupantAddress1: funeralHomeOccupant.occupantAddress1!,
occupantAddress2: funeralHomeOccupant.occupantAddress2!,
occupantCity: funeralHomeOccupant.occupantCity!,
@ -1460,7 +1468,7 @@ async function importFromWorkOrderCSV(): Promise<void> {
if (importIds.acknowledgedWorkOrderMilestoneTypeId) {
await addWorkOrderMilestone(
{
workOrderId: workOrder.workOrderId,
workOrderId: workOrder.workOrderId!,
workOrderMilestoneTypeId:
importIds.acknowledgedWorkOrderMilestoneTypeId,
workOrderMilestoneDateString: workOrderOpenDateString,

View File

@ -154,6 +154,7 @@ export interface LotOccupancyOccupant extends Record {
fontAwesomeIconClass?: string;
occupantCommentTitle?: string;
occupantName?: string;
occupantFamilyName?: string;
occupantAddress1?: string;
occupantAddress2?: string;
occupantCity?: string;

View File

@ -203,6 +203,7 @@ export interface LotOccupancyOccupant extends Record {
occupantCommentTitle?: string
occupantName?: string
occupantFamilyName?: string
occupantAddress1?: string
occupantAddress2?: string
occupantCity?: string

View File

@ -77,6 +77,7 @@
<span class="has-tooltip-right" data-tooltip="<%= occupant.lotOccupantType %>">
<i class="fas fa-fw fa-<%= occupant.fontAwesomeIconClass || 'user' %>" aria-label="<%= configFunctions.getProperty("aliases.occupancy") %>"></i>
<%= occupant.occupantName %>
<%= occupant.occupantFamilyName %>
</span><br />
<%
}

View File

@ -257,97 +257,97 @@
</div>
<div class="columns">
<div class="column">
<div class="panel">
<h2 class="panel-heading">Geographic Location</h2>
<div class="panel-block is-block">
<div class="field">
<label class="label" for="lot--lotLatitude">Latitude</label>
<div class="control">
<input class="input" id="lot--lotLatitude" name="lotLatitude" type="number" min="-90" max="90" step="0.00000001" value="<%= lot.lotLatitude %>" onwheel="return false" />
</div>
</div>
<div class="field">
<label class="label" for="lot--lotLongitude">Longitude</label>
<div class="control">
<input class="input" id="lot--lotLongitude" name="lotLongitude" type="number" min="-180" max="180" step="0.00000001" value="<%= lot.lotLongitude %>" onwheel="return false" />
</div>
</div>
</div>
</div>
</div>
<div class="column">
<div class="panel">
<h2 class="panel-heading">Image</h2>
<div class="panel-block is-block">
<label class="label" for="lot--mapId"><%= configFunctions.getProperty("aliases.map") %></label>
<div class="field has-addons">
<div class="control is-expanded">
<div class="select is-fullwidth">
<select
<% if (!isCreate) { %>
class="is-readonly"
<% } %>
id="lot--mapId" name="mapId">
<option value="" <%= (!isCreate && lot.mapId ? " disabled" : "") %>>
(No <%= configFunctions.getProperty("aliases.map") %> Selected)
</option>
<% let mapIsFound = false; %>
<% for (const map of maps) { %>
<%
if (lot.mapId === map.mapId) {
mapIsFound = true;
}
%>
<option value="<%= map.mapId %>"
<%= (lot.mapId === map.mapId ? " selected" : "") %>
<%= (!isCreate && lot.mapId !== map.mapId ? " disabled" : "") %>>
<%= map.mapName || "(No Name)" %>
</option>
<% } %>
<% if (lot.mapId && !mapIsFound) { %>
<option value="<%= lot.mapId %>" selected>
<%= lot.mapName %>
</option>
<% } %>
</select>
</div>
</div>
<div class="control">
<button class="button is-unlock-field-button" data-tooltip="Unlock Field" type="button" aria-label="Unlock Field">
<i class="fas fa-unlock" aria-hidden="true"></i>
</button>
</div>
</div>
<div class="field">
<label class="label" for="lot--mapKey">
<%= configFunctions.getProperty("aliases.map") %> SVG ID
</label>
<div class="control">
<input class="input" id="lot--mapKey" name="mapKey" value="<%= lot.mapKey %>" maxlength="100" pattern="^[\d\w-]*$" />
</div>
<p class="help">
<a href="https://cityssm.github.io/lot-occupancy-system/docs/mapImages.html" target="_blank" rel="noreferrer">
<i class="fa fa-question-circle" aria-hidden="true"></i>
What is the SVG ID?
</a>
</p>
</div>
</div>
</div>
</div>
<div class="column">
<div class="panel">
<h2 class="panel-heading">Geographic Location</h2>
<div class="panel-block is-block">
<div class="field">
<label class="label" for="lot--lotLatitude">Latitude</label>
<div class="control">
<input class="input" id="lot--lotLatitude" name="lotLatitude" type="number" min="-90" max="90" step="0.00000001" value="<%= lot.lotLatitude %>" onwheel="return false" />
</div>
</div>
<div class="field">
<label class="label" for="lot--lotLongitude">Longitude</label>
<div class="control">
<input class="input" id="lot--lotLongitude" name="lotLongitude" type="number" min="-180" max="180" step="0.00000001" value="<%= lot.lotLongitude %>" onwheel="return false" />
</div>
</div>
</div>
</div>
</div>
<div class="column">
<div class="panel">
<h2 class="panel-heading">Image</h2>
<div class="panel-block is-block">
<label class="label" for="lot--mapId"><%= configFunctions.getProperty("aliases.map") %></label>
<div class="field has-addons">
<div class="control is-expanded">
<div class="select is-fullwidth">
<select
<% if (!isCreate) { %>
class="is-readonly"
<% } %>
id="lot--mapId" name="mapId">
<option value="" <%= (!isCreate && lot.mapId ? " disabled" : "") %>>
(No <%= configFunctions.getProperty("aliases.map") %> Selected)
</option>
<% let mapIsFound = false; %>
<% for (const map of maps) { %>
<%
if (lot.mapId === map.mapId) {
mapIsFound = true;
}
%>
<option value="<%= map.mapId %>"
<%= (lot.mapId === map.mapId ? " selected" : "") %>
<%= (!isCreate && lot.mapId !== map.mapId ? " disabled" : "") %>>
<%= map.mapName || "(No Name)" %>
</option>
<% } %>
<% if (lot.mapId && !mapIsFound) { %>
<option value="<%= lot.mapId %>" selected>
<%= lot.mapName %>
</option>
<% } %>
</select>
</div>
</div>
<div class="control">
<button class="button is-unlock-field-button" data-tooltip="Unlock Field" type="button" aria-label="Unlock Field">
<i class="fas fa-unlock" aria-hidden="true"></i>
</button>
</div>
</div>
<div class="field">
<label class="label" for="lot--mapKey">
<%= configFunctions.getProperty("aliases.map") %> SVG ID
</label>
<div class="control">
<input class="input" id="lot--mapKey" name="mapKey" value="<%= lot.mapKey %>" maxlength="100" pattern="^[\d\w-]*$" />
</div>
<p class="help">
<a href="https://cityssm.github.io/lot-occupancy-system/docs/mapImages.html" target="_blank" rel="noreferrer">
<i class="fa fa-question-circle" aria-hidden="true"></i>
What is the SVG ID?
</a>
</p>
</div>
</div>
</div>
</div>
</div>
</form>
<% if (isCreate) { %>
<div class="message is-info">
<p class="message-body">
Additional options will be available after the record has been created.
</p>
</div>
<div class="message is-info">
<p class="message-body">
Additional options will be available after the record has been created.
</p>
</div>
<% } else { %>
<div class="panel">
<div class="panel-heading">
@ -374,24 +374,24 @@
<div class="panel">
<div class="panel-heading">
<div class="level is-mobile">
<div class="level-left">
<div class="level-item">
<h2 class="has-text-weight-bold is-size-5">
<%= configFunctions.getProperty("aliases.occupancies") %>
<span class="tag"><%= lot.lotOccupancies.length %></span>
</h2>
</div>
</div>
<div class="level-right">
<div class="level-item">
<a class="button is-success is-small has-text-weight-normal" href="<%= urlPrefix %>/lotOccupancies/new?lotId=<%= lot.lotId %>">
<span class="icon is-small"><i class="fas fa-plus" aria-hidden="true"></i></span>
<span>Create New <%= configFunctions.getProperty("aliases.occupancy") %></span>
</a>
</div>
</div>
<div class="level is-mobile">
<div class="level-left">
<div class="level-item">
<h2 class="has-text-weight-bold is-size-5">
<%= configFunctions.getProperty("aliases.occupancies") %>
<span class="tag"><%= lot.lotOccupancies.length %></span>
</h2>
</div>
</div>
<div class="level-right">
<div class="level-item">
<a class="button is-success is-small has-text-weight-normal" href="<%= urlPrefix %>/lotOccupancies/new?lotId=<%= lot.lotId %>">
<span class="icon is-small"><i class="fas fa-plus" aria-hidden="true"></i></span>
<span>Create New <%= configFunctions.getProperty("aliases.occupancy") %></span>
</a>
</div>
</div>
</div>
</div>
<div class="panel-block is-block">
<% if (lot.lotOccupancies.length === 0) { %>
@ -435,16 +435,16 @@
<% } %>
</td>
<td>
<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.occupants") %>)</span>
<% } else { %>
<% for (const occupant of lotOccupancy.lotOccupancyOccupants) { %>
<span class="has-tooltip-left" data-tooltip="<%= occupant.lotOccupantType %>">
<i class="fas fa-fw fa-<%= occupant.fontAwesomeIconClass || 'user' %>" aria-hidden="true"></i>
<%= occupant.occupantName %>
</span><br />
<% } %>
<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.occupants") %>)</span>
<% } else { %>
<% for (const occupant of lotOccupancy.lotOccupancyOccupants) { %>
<span class="has-tooltip-left" data-tooltip="<%= occupant.lotOccupantType %>">
<i class="fas fa-fw fa-<%= occupant.fontAwesomeIconClass || 'user' %>" aria-hidden="true"></i>
<%= occupant.occupantName + ' ' + occupant.occupantFamilyName %>
</span><br />
<% } %>
<% } %>
</td>
</tr>
<% } %>

View File

@ -4,10 +4,10 @@
<ul>
<li><a href="<%= urlPrefix %>/dashboard">Home</a></li>
<li>
<a href="<%= urlPrefix %>/lots">
<span class="icon is-small"><i class="fas fa-vector-square" aria-hidden="true"></i></span>
<span><%= configFunctions.getProperty("aliases.lots") %></span>
</a>
<a href="<%= urlPrefix %>/lots">
<span class="icon is-small"><i class="fas fa-vector-square" aria-hidden="true"></i></span>
<span><%= configFunctions.getProperty("aliases.lots") %></span>
</a>
</li>
<li class="is-active">
<a href="#" aria-current="page">
@ -198,7 +198,7 @@
<% for (const occupant of lotOccupancy.lotOccupancyOccupants) { %>
<span class="has-tooltip-left" data-tooltip="<%= occupant.lotOccupantType %>">
<i class="fas fa-fw fa-<%= occupant.fontAwesomeIconClass || 'user' %>" aria-hidden="true"></i>
<%= occupant.occupantName %>
<%= occupant.occupantName + ' ' + occupant.occupantFamilyName %>
</span><br />
<% } %>
<% } %>

View File

@ -332,13 +332,27 @@
</div>
</div>
</div>
<div class="field">
<label class="label" for="lotOccupancy--occupantName">
<div class="columns">
<div class="column">
<div class="field">
<label class="label" for="lotOccupancy--occupantName">
<%= configFunctions.getProperty("aliases.occupant") %> Name
</label>
<div class="control">
</label>
<div class="control">
<input class="input" id="lotOccupancy--occupantName" data-table="LotOccupancyOccupant" name="occupantName" type="text" maxlength="200" autocomplete="off" required disabled />
</div>
</div>
</div>
<div class="column">
<div class="field">
<label class="label" for="lotOccupancy--occupantFamilyName">
Family Name
</label>
<div class="control">
<input class="input" id="lotOccupancy--occupantFamilyName" data-table="LotOccupancyOccupant" name="occupantFamilyName" type="text" maxlength="200" autocomplete="off" disabled />
</div>
</div>
</div>
</div>
<div class="field">
<label class="label" for="lotOccupancy--occupantAddress1">Address</label>

View File

@ -86,60 +86,60 @@
<div class="panel">
<div class="panel-block is-block">
<div class="columns">
<div class="column">
<p>
<strong><%= configFunctions.getProperty("aliases.occupancy") %> Type</strong><br />
<%= lotOccupancy.occupancyType %>
</p>
</div>
<div class="column">
<p class="mb-2">
<strong><%= configFunctions.getProperty("aliases.lot") %></strong><br />
<% if (lotOccupancy.lotId) { %>
<a href="<%= urlPrefix %>/lots/<%= lotOccupancy.lotId %>"><%= lotOccupancy.lotName %></a>
<% } else { %>
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.lot") %>)</span>
<% } %>
</p>
<p>
<strong><%= configFunctions.getProperty("aliases.map") %></strong><br />
<% if (lotOccupancy.mapId) { %>
<a href="<%= urlPrefix %>/maps/<%= lotOccupancy.mapId %>"><%= lotOccupancy.mapName %></a>
<% } else { %>
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.map") %>)</span>
<% } %>
</p>
</div>
<div class="column">
<p class="mb-2">
<strong><%= configFunctions.getProperty("aliases.occupancyStartDate") %></strong><br />
<%= lotOccupancy.occupancyStartDateString %>
</p>
<p>
<strong>End Date</strong><br />
<% if (lotOccupancy.occupancyEndDateString === "") { %>
<span class="has-text-grey">(No End Date)</span>
<% } else { %>
<%= lotOccupancy.occupancyEndDateString %>
<% } %>
</p>
</div>
<% if (lotOccupancy.lotOccupancyFields.length > 0) { %>
<div class="column">
<% for (const lotOccupancyField of lotOccupancy.lotOccupancyFields) { %>
<p class="mb-2">
<strong><%= lotOccupancyField.occupancyTypeField %></strong><br />
<% if (lotOccupancyField.lotOccupancyFieldValue) { %>
<%= lotOccupancyField.lotOccupancyFieldValue %>
<% } else { %>
<span class="has-text-grey">(No Value)</span>
<% } %>
</p>
<% } %>
</div>
<% } %>
<div class="columns">
<div class="column">
<p>
<strong><%= configFunctions.getProperty("aliases.occupancy") %> Type</strong><br />
<%= lotOccupancy.occupancyType %>
</p>
</div>
<div class="column">
<p class="mb-2">
<strong><%= configFunctions.getProperty("aliases.lot") %></strong><br />
<% if (lotOccupancy.lotId) { %>
<a href="<%= urlPrefix %>/lots/<%= lotOccupancy.lotId %>"><%= lotOccupancy.lotName %></a>
<% } else { %>
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.lot") %>)</span>
<% } %>
</p>
<p>
<strong><%= configFunctions.getProperty("aliases.map") %></strong><br />
<% if (lotOccupancy.mapId) { %>
<a href="<%= urlPrefix %>/maps/<%= lotOccupancy.mapId %>"><%= lotOccupancy.mapName %></a>
<% } else { %>
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.map") %>)</span>
<% } %>
</p>
</div>
<div class="column">
<p class="mb-2">
<strong><%= configFunctions.getProperty("aliases.occupancyStartDate") %></strong><br />
<%= lotOccupancy.occupancyStartDateString %>
</p>
<p>
<strong>End Date</strong><br />
<% if (lotOccupancy.occupancyEndDateString === "") { %>
<span class="has-text-grey">(No End Date)</span>
<% } else { %>
<%= lotOccupancy.occupancyEndDateString %>
<% } %>
</p>
</div>
<% if (lotOccupancy.lotOccupancyFields.length > 0) { %>
<div class="column">
<% for (const lotOccupancyField of lotOccupancy.lotOccupancyFields) { %>
<p class="mb-2">
<strong><%= lotOccupancyField.occupancyTypeField %></strong><br />
<% if (lotOccupancyField.lotOccupancyFieldValue) { %>
<%= lotOccupancyField.lotOccupancyFieldValue %>
<% } else { %>
<span class="has-text-grey">(No Value)</span>
<% } %>
</p>
<% } %>
</div>
<% } %>
</div>
</div>
</div>
@ -183,7 +183,7 @@
<% for (const lotOccupancyOccupant of lotOccupancy.lotOccupancyOccupants) { %>
<tr>
<td>
<%= lotOccupancyOccupant.occupantName %><br />
<%= lotOccupancyOccupant.occupantName %> <%= lotOccupancyOccupant.occupantFamilyName %><br />
<span class="tag">
<i class="fas fa-fw fa-<%= lotOccupancyOccupant.fontAwesomeIconClass %>" aria-hidden="true"></i>
<span class="ml-1"><%= lotOccupancyOccupant.lotOccupantType %></span>

View File

@ -27,25 +27,25 @@
</p>
<p class="has-text-centered">
<% if (funeralDirectorOccupants.length > 0) { %>
<% const funeralDirector = funeralDirectorOccupants[0]; %>
<strong><%= funeralDirector.occupantName %></strong><br />
<%= funeralDirector.occupantAddress1 %><br />
<% if (funeralDirector.occupantAddress2) { %><%= funeralDirector.occupantAddress2 %><br /><% } %>
<%= funeralDirector.occupantCity %>, <%= funeralDirector.occupantProvince %><br />
<%= funeralDirector.occupantPostalCode %>
<% } %>
<% if (funeralDirectorOccupants.length > 0) { %>
<% const funeralDirector = funeralDirectorOccupants[0]; %>
<strong><%= funeralDirector.occupantName %> <%= funeralDirector.occupantFamilyName %></strong><br />
<%= funeralDirector.occupantAddress1 %><br />
<% if (funeralDirector.occupantAddress2) { %><%= funeralDirector.occupantAddress2 %><br /><% } %>
<%= funeralDirector.occupantCity %>, <%= funeralDirector.occupantProvince %><br />
<%= funeralDirector.occupantPostalCode %>
<% } %>
</p>
<p class="mt-4">
for the purpose of the burial or other disposition of the body of:
for the purpose of the burial or other disposition of the body of:
</p>
<p class="has-text-centered">
<% if (deceasedOccupants.length > 0) { %>
<% const deceased = deceasedOccupants[0]; %>
<strong><%= deceased.occupantName %></strong>
<% } %>
<% if (deceasedOccupants.length > 0) { %>
<% const deceased = deceasedOccupants[0]; %>
<strong><%= deceased.occupantName %> <%= deceased.occupantFamilyName %></strong>
<% } %>
</p>
<p>
@ -65,16 +65,16 @@
</p>
<p class="has-text-right mt-6">
<span class="field mb-1" style="width:300px">&nbsp;</span><br />
<span class="is-8pt">(Signature of Division Registrar)</span>
<span class="field mb-1" style="width:300px">&nbsp;</span><br />
<span class="is-8pt">(Signature of Division Registrar)</span>
</p>
<p class="has-text-right">
Sault Ste. Marie
&nbsp;
&nbsp;
&nbsp;
5724
Sault Ste. Marie
&nbsp;
&nbsp;
&nbsp;
5724
</p>
<p class="has-text-right mt-4">

View File

@ -3,10 +3,10 @@
let purchaserOccupants = [];
for (const purchaserLotOccupantType of purchaserLotOccupantTypes) {
purchaserOccupants = lotOccupancyFunctions.filterOccupantsByLotOccupantType(lotOccupancy, purchaserLotOccupantType);
if (purchaserOccupants.length > 0) {
break;
}
purchaserOccupants = lotOccupancyFunctions.filterOccupantsByLotOccupantType(lotOccupancy, purchaserLotOccupantType);
if (purchaserOccupants.length > 0) {
break;
}
}
const purchaser = purchaserOccupants.length > 0 ? purchaserOccupants[0] : undefined;
@ -15,10 +15,10 @@
let recipientOccupants = [];
for (const recipientLotOccupantType of recipientLotOccupantTypes) {
recipientOccupants = lotOccupancyFunctions.filterOccupantsByLotOccupantType(lotOccupancy, recipientLotOccupantType);
if (recipientOccupants.length > 0) {
break;
}
recipientOccupants = lotOccupancyFunctions.filterOccupantsByLotOccupantType(lotOccupancy, recipientLotOccupantType);
if (recipientOccupants.length > 0) {
break;
}
}
const recipient = recipientOccupants.length > 0 ? recipientOccupants[0] : undefined;
@ -73,18 +73,18 @@
</head>
<body class="is-10pt">
<h1 class="is-12pt has-text-centered is-capitalized">
Contract for the Purchase of Interment Rights or<br />
Cemetery Services
Contract for the Purchase of Interment Rights or<br />
Cemetery Services
</h1>
<p class="has-text-centered">
in
<span class="field" style="width:300px">
<%= lotOccupancy.mapName %>
</span>
cemetery<br />
<span class="is-capitalized">operated by</span><br />
The Corporation of the City of Sault Ste. Marie, 99 Foster Drive<br />
Sault Ste. Marie Ontario &nbsp; P6A 5X6
in
<span class="field" style="width:300px">
<%= lotOccupancy.mapName %>
</span>
cemetery<br />
<span class="is-capitalized">operated by</span><br />
The Corporation of the City of Sault Ste. Marie, 99 Foster Drive<br />
Sault Ste. Marie Ontario &nbsp; P6A 5X6
</p>
<p>
Contract No.
@ -105,71 +105,75 @@
<tbody>
<tr>
<td>
<h2 class="is-10pt">Purchaser</h2>
<table class="is-10pt layout-table">
<tbody>
<tr>
<th class="has-text-left">Name:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantName : "" %></td>
</tr><tr>
<th class="has-text-left" rowspan="2" style="vertical-align:top">Address:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantAddress1 : "" %>&nbsp;</td>
</tr><tr>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantAddress2 : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">City:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantCity : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Province:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantProvince : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left has-text-nowrap">Postal Code:</th>
<td class="has-border-bottom" style="width:100%"><%= purchaser ? purchaser.occupantPostalCode : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Telephone:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantPhoneNumber : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">E-mail:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantEmailAddress : "" %>&nbsp;</td>
</tr>
</tbody>
</table>
<h2 class="is-10pt">Purchaser</h2>
<table class="is-10pt layout-table">
<tbody>
<tr>
<th class="has-text-left">Name:</th>
<td class="has-border-bottom">
<%= purchaser ? purchaser.occupantName + ' ' + purchaser.occupantFamilyName : "" %>
</td>
</tr><tr>
<th class="has-text-left" rowspan="2" style="vertical-align:top">Address:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantAddress1 : "" %>&nbsp;</td>
</tr><tr>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantAddress2 : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">City:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantCity : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Province:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantProvince : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left has-text-nowrap">Postal Code:</th>
<td class="has-border-bottom" style="width:100%"><%= purchaser ? purchaser.occupantPostalCode : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Telephone:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantPhoneNumber : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">E-mail:</th>
<td class="has-border-bottom"><%= purchaser ? purchaser.occupantEmailAddress : "" %>&nbsp;</td>
</tr>
</tbody>
</table>
</td>
<td>
<h2 class="is-10pt">Recipient</h2>
<table class="is-10pt layout-table">
<tbody>
<tr>
<th class="has-text-left">Name:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantName : "" %></td>
</tr><tr>
<th class="has-text-left" rowspan="2" style="vertical-align:top">Address:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantAddress1 : "" %>&nbsp;</td>
</tr><tr>
<td class="has-border-bottom"><%= recipient ? recipient.occupantAddress2 : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">City:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantCity : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Province:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantProvince : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Postal Code:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantPostalCode : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Telephone:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantPhoneNumber : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">E-mail:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantEmailAddress : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Date of birth:</th>
<td class="has-border-bottom">&nbsp;</td>
</tr><tr>
<th class="has-text-left has-text-nowrap">Place of birth:</th>
<td class="has-border-bottom" style="width:100%">&nbsp;</td>
</tr>
</tbody>
<tbody>
<tr>
<th class="has-text-left">Name:</th>
<td class="has-border-bottom">
<%= recipient ? recipient.occupantName + ' ' + recipient.occupantFamilyName : "" %>
</td>
</tr><tr>
<th class="has-text-left" rowspan="2" style="vertical-align:top">Address:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantAddress1 : "" %>&nbsp;</td>
</tr><tr>
<td class="has-border-bottom"><%= recipient ? recipient.occupantAddress2 : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">City:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantCity : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Province:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantProvince : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Postal Code:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantPostalCode : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Telephone:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantPhoneNumber : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">E-mail:</th>
<td class="has-border-bottom"><%= recipient ? recipient.occupantEmailAddress : "" %>&nbsp;</td>
</tr><tr>
<th class="has-text-left">Date of birth:</th>
<td class="has-border-bottom">&nbsp;</td>
</tr><tr>
<th class="has-text-left has-text-nowrap">Place of birth:</th>
<td class="has-border-bottom" style="width:100%">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
@ -183,45 +187,45 @@
</span>
</p>
<p>
This Contract for Purchase of Interment Rights or Cemetery Services
is between the Purchaser and The Corporation of the City of Sault Ste. Marie (Corporation)
concerning interment rights or cemetery services for the Recipient(s)
as identified in this Contract.
This Contract for Purchase of Interment Rights or Cemetery Services
is between the Purchaser and The Corporation of the City of Sault Ste. Marie (Corporation)
concerning interment rights or cemetery services for the Recipient(s)
as identified in this Contract.
</p>
<p>
The Purchaser (if different than the Recipient)
represents being legally authorized or charged with the responsibility for
the Recipient's interment rights and prepaid cemetery services
specified in this Contract. This Contract will be enforceable to
the benefit of and be binding upon the parties hereto
and their respective heirs, executors, administrators, successors, and assigns.
The Purchaser (if different than the Recipient)
represents being legally authorized or charged with the responsibility for
the Recipient's interment rights and prepaid cemetery services
specified in this Contract. This Contract will be enforceable to
the benefit of and be binding upon the parties hereto
and their respective heirs, executors, administrators, successors, and assigns.
</p>
<table class="layout-table" style="table-layout:fixed">
<tr>
<td>
<h2 class="is-10pt is-capitalized">Details</h2>
<table class="is-10pt data-table">
<h2 class="is-10pt is-capitalized">Details</h2>
<table class="is-10pt data-table">
<tr>
<td><%= configFunctions.getProperty("aliases.map") %></td>
<td><%= lotOccupancy.mapName %></td>
</tr>
<tr>
<td><%= configFunctions.getProperty("aliases.lot") %></td>
<td><%= lotOccupancy.lotName %></td>
</tr>
<%
for (const field of lotOccupancy.lotOccupancyFields) {
if (field.lotOccupancyFieldValue) {
%>
<tr>
<td><%= configFunctions.getProperty("aliases.map") %></td>
<td><%= lotOccupancy.mapName %></td>
<td><%= field.occupancyTypeField %></td>
<td><%= field.lotOccupancyFieldValue %></td>
</tr>
<tr>
<td><%= configFunctions.getProperty("aliases.lot") %></td>
<td><%= lotOccupancy.lotName %></td>
</tr>
<%
for (const field of lotOccupancy.lotOccupancyFields) {
if (field.lotOccupancyFieldValue) {
%>
<tr>
<td><%= field.occupancyTypeField %></td>
<td><%= field.lotOccupancyFieldValue %></td>
</tr>
<%
}
<%
}
%>
</table>
}
%>
</table>
</td>
<td>
<h2 class="is-10pt is-capitalized">Interment Rights and Services</h2>

View File

@ -54,7 +54,10 @@
<td><%= occupancy.occupancyStartEndString %></td>
<td>
<% for (const occupant of occupancy.lotOccupancyOccupants) { %>
<%= occupant.lotOccupantType %>: <%= occupant.occupantName %><br />
<%= occupant.lotOccupantType %>:
<%= occupant.occupantName %>
<%= occupant.occupantFamilyName %>
<br />
<% } %>
</td>
</tr>

View File

@ -76,7 +76,7 @@
<% for (const lotOccupancyOccupant of lotOccupancy.lotOccupancyOccupants) { %>
<tr>
<td><%= lotOccupancyOccupant.lotOccupantType %></td>
<td><%= lotOccupancyOccupant.occupantName %></td>
<td><%= lotOccupancyOccupant.occupantName %> <%= lotOccupancyOccupant.occupantFamilyName %></td>
<td>
<%= lotOccupancyOccupant.occupantAddress1 %><br />
<% if (lotOccupancyOccupant.occupantAddress2 && lotOccupancyOccupant.occupantAddress2 !== "") { %>

View File

@ -87,172 +87,173 @@
<div class="columns is-desktop">
<div class="column">
<div class="panel">
<div class="panel-block is-block">
<div class="columns">
<div class="column">
<p class="mb-2">
<strong>Work Order Type</strong><br />
<%= workOrder.workOrderType %>
</p>
<p>
<strong>Description</strong><br />
<% if (workOrder.workOrderDescription) { %>
<%= workOrder.workOrderDescription %>
<% } else { %>
<span class="has-text-grey">(No Description)</span>
<% } %>
</p>
</div>
<div class="column">
<p class="mb-2">
<strong><%= configFunctions.getProperty("aliases.workOrderOpenDate") %></strong><br />
<%= workOrder.workOrderOpenDateString %>
</p>
<p>
<strong><%= configFunctions.getProperty("aliases.workOrderCloseDate") %></strong><br />
<% if (workOrder.workOrderCloseDate) { %>
<%= workOrder.workOrderCloseDateString %>
<% } else { %>
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.workOrderCloseDate") %>)</span>
<% } %>
</p>
</div>
</div>
</div>
<div class="panel-block is-block">
<div class="columns">
<div class="column">
<p class="mb-2">
<strong>Work Order Type</strong><br />
<%= workOrder.workOrderType %>
</p>
<p>
<strong>Description</strong><br />
<% if (workOrder.workOrderDescription) { %>
<%= workOrder.workOrderDescription %>
<% } else { %>
<span class="has-text-grey">(No Description)</span>
<% } %>
</p>
</div>
<div class="column">
<p class="mb-2">
<strong><%= configFunctions.getProperty("aliases.workOrderOpenDate") %></strong><br />
<%= workOrder.workOrderOpenDateString %>
</p>
<p>
<strong><%= configFunctions.getProperty("aliases.workOrderCloseDate") %></strong><br />
<% if (workOrder.workOrderCloseDate) { %>
<%= workOrder.workOrderCloseDateString %>
<% } else { %>
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.workOrderCloseDate") %>)</span>
<% } %>
</p>
</div>
</div>
</div>
</div>
<div class="panel">
<h2 class="panel-heading">Related <%= configFunctions.getProperty("aliases.lots") %></h2>
<div class="panel-block is-block">
<%
const tabToSelect = (workOrder.workOrderLotOccupancies.length > 0 || workOrder.workOrderLots.length === 0 ? "lotOccupancies" : "lots");
%>
<div class="tabs is-boxed">
<ul>
<li class="<%= (tabToSelect === "lotOccupancies" ? "is-active" : "") %>">
<a href="#relatedTab--lotOccupancies">
<span><%= configFunctions.getProperty("aliases.occupancies") %></span>
<span class="ml-2 tag"><%= workOrder.workOrderLotOccupancies.length %></span>
</a>
</li>
<li class="<%= (tabToSelect === "lots" ? "is-active" : "") %>">
<a href="#relatedTab--lots">
<span><%= configFunctions.getProperty("aliases.lots") %></span>
<span class="ml-2 tag"><%= workOrder.workOrderLots.length %></span>
</a>
</li>
</ul>
</div>
<div class="tab-container">
<div class="<%= (tabToSelect === "lotOccupancies" ? "" : "is-hidden") %>" id="relatedTab--lotOccupancies">
<% if (workOrder.workOrderLotOccupancies.length === 0) { %>
<div class="message is-info">
<p class="message-body">
There are no
<%= configFunctions.getProperty("aliases.lot").toLowerCase() %>
<%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %>
records associated with this work order.
</p>
</div>
<% } else { %>
<% const currentDate = dateTimeFunctions.dateToInteger(new Date()); %>
<table class="table is-fullwidth is-striped is-hoverable">
<thead>
<tr>
<th class="has-width-1"></th>
<th><%= configFunctions.getProperty("aliases.occupancy") %> Type</th>
<th><%= configFunctions.getProperty("aliases.lot") %></th>
<th><%= configFunctions.getProperty("aliases.occupancyStartDate") %></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 { %>
<% for (const occupant of lotOccupancy.lotOccupancyOccupants) { %>
<span class="has-tooltip-left" data-tooltip="<%= occupant.lotOccupantType %>">
<i class="fas fa-fw fa-<%= occupant.fontAwesomeIconClass || 'user' %>" aria-hidden="true"></i>
<%= occupant.occupantName %>
</span><br />
<% } %>
<% } %>
</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>
<% } else { %>
<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>
<h2 class="panel-heading">Related <%= configFunctions.getProperty("aliases.lots") %></h2>
<div class="panel-block is-block">
<%
const tabToSelect = (workOrder.workOrderLotOccupancies.length > 0 || workOrder.workOrderLots.length === 0 ? "lotOccupancies" : "lots");
%>
<div class="tabs is-boxed">
<ul>
<li class="<%= (tabToSelect === "lotOccupancies" ? "is-active" : "") %>">
<a href="#relatedTab--lotOccupancies">
<span><%= configFunctions.getProperty("aliases.occupancies") %></span>
<span class="ml-2 tag"><%= workOrder.workOrderLotOccupancies.length %></span>
</a>
</li>
<li class="<%= (tabToSelect === "lots" ? "is-active" : "") %>">
<a href="#relatedTab--lots">
<span><%= configFunctions.getProperty("aliases.lots") %></span>
<span class="ml-2 tag"><%= workOrder.workOrderLots.length %></span>
</a>
</li>
</ul>
</div>
<div class="tab-container">
<div class="<%= (tabToSelect === "lotOccupancies" ? "" : "is-hidden") %>" id="relatedTab--lotOccupancies">
<% if (workOrder.workOrderLotOccupancies.length === 0) { %>
<div class="message is-info">
<p class="message-body">
There are no
<%= configFunctions.getProperty("aliases.lot").toLowerCase() %>
<%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %>
records associated with this work order.
</p>
</div>
<% } else { %>
<% const currentDate = dateTimeFunctions.dateToInteger(new Date()); %>
<table class="table is-fullwidth is-striped is-hoverable">
<thead>
<tr>
<th class="has-width-1"></th>
<th><%= configFunctions.getProperty("aliases.occupancy") %> Type</th>
<th><%= configFunctions.getProperty("aliases.lot") %></th>
<th><%= configFunctions.getProperty("aliases.occupancyStartDate") %></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 { %>
<% for (const occupant of lotOccupancy.lotOccupancyOccupants) { %>
<span class="has-tooltip-left" data-tooltip="<%= occupant.lotOccupantType %>">
<i class="fas fa-fw fa-<%= occupant.fontAwesomeIconClass || 'user' %>" aria-hidden="true"></i>
<%= occupant.occupantName %>
<%= occupant.occupantFamilyName %>
</span><br />
<% } %>
<% } %>
</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>
<% } else { %>
<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) { %>