linting
parent
ca47423bfc
commit
c1d00559e5
|
|
@ -14,9 +14,9 @@ export async function updateWorkOrderMilestone(milestoneForm, requestSession) {
|
||||||
where workOrderMilestoneId = ?`)
|
where workOrderMilestoneId = ?`)
|
||||||
.run(milestoneForm.workOrderMilestoneTypeId === ''
|
.run(milestoneForm.workOrderMilestoneTypeId === ''
|
||||||
? undefined
|
? undefined
|
||||||
: milestoneForm.workOrderMilestoneTypeId, dateStringToInteger(milestoneForm.workOrderMilestoneDateString), milestoneForm.workOrderMilestoneTimeString
|
: milestoneForm.workOrderMilestoneTypeId, dateStringToInteger(milestoneForm.workOrderMilestoneDateString), (milestoneForm.workOrderMilestoneTimeString ?? '') === ''
|
||||||
? timeStringToInteger(milestoneForm.workOrderMilestoneTimeString)
|
? 0
|
||||||
: 0, milestoneForm.workOrderMilestoneDescription, requestSession.user.userName, rightNow.getTime(), milestoneForm.workOrderMilestoneId);
|
: timeStringToInteger(milestoneForm.workOrderMilestoneTimeString), milestoneForm.workOrderMilestoneDescription, requestSession.user.userName, rightNow.getTime(), milestoneForm.workOrderMilestoneId);
|
||||||
database.release();
|
database.release();
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,9 @@ export async function updateWorkOrderMilestone(
|
||||||
? undefined
|
? undefined
|
||||||
: milestoneForm.workOrderMilestoneTypeId,
|
: milestoneForm.workOrderMilestoneTypeId,
|
||||||
dateStringToInteger(milestoneForm.workOrderMilestoneDateString),
|
dateStringToInteger(milestoneForm.workOrderMilestoneDateString),
|
||||||
milestoneForm.workOrderMilestoneTimeString
|
(milestoneForm.workOrderMilestoneTimeString ?? '') === ''
|
||||||
? timeStringToInteger(milestoneForm.workOrderMilestoneTimeString)
|
? 0
|
||||||
: 0,
|
: timeStringToInteger(milestoneForm.workOrderMilestoneTimeString!),
|
||||||
milestoneForm.workOrderMilestoneDescription,
|
milestoneForm.workOrderMilestoneDescription,
|
||||||
|
|
||||||
requestSession.user!.userName,
|
requestSession.user!.userName,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
/* eslint-disable @typescript-eslint/no-non-null-assertion, unicorn/prefer-module */
|
/* eslint-disable @typescript-eslint/no-non-null-assertion, unicorn/prefer-module */
|
||||||
|
var _a;
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
let lotOccupancyOccupants;
|
let lotOccupancyOccupants = exports.lotOccupancyOccupants;
|
||||||
|
delete exports.lotOccupancyOccupants;
|
||||||
function openEditLotOccupancyOccupant(clickEvent) {
|
function openEditLotOccupancyOccupant(clickEvent) {
|
||||||
const lotOccupantIndex = Number.parseInt(clickEvent.currentTarget.closest('tr').dataset
|
const lotOccupantIndex = Number.parseInt(clickEvent.currentTarget.closest('tr').dataset
|
||||||
.lotOccupantIndex, 10);
|
.lotOccupantIndex, 10);
|
||||||
|
|
@ -192,7 +194,11 @@ function renderLotOccupancyOccupants() {
|
||||||
: cityssm.escapeHTML(lotOccupancyOccupant.occupantEmailAddress)) +
|
: cityssm.escapeHTML(lotOccupancyOccupant.occupantEmailAddress)) +
|
||||||
'</td>') +
|
'</td>') +
|
||||||
('<td>' +
|
('<td>' +
|
||||||
'<span data-tooltip="' + cityssm.escapeHTML(((_j = lotOccupancyOccupant.occupantCommentTitle) !== null && _j !== void 0 ? _j : '') === '' ? 'Comment' : lotOccupancyOccupant.occupantCommentTitle) + '">' +
|
'<span data-tooltip="' +
|
||||||
|
cityssm.escapeHTML(((_j = lotOccupancyOccupant.occupantCommentTitle) !== null && _j !== void 0 ? _j : '') === ''
|
||||||
|
? 'Comment'
|
||||||
|
: lotOccupancyOccupant.occupantCommentTitle) +
|
||||||
|
'">' +
|
||||||
cityssm.escapeHTML((_k = lotOccupancyOccupant.occupantComment) !== null && _k !== void 0 ? _k : '') +
|
cityssm.escapeHTML((_k = lotOccupancyOccupant.occupantComment) !== null && _k !== void 0 ? _k : '') +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'</td>') +
|
'</td>') +
|
||||||
|
|
@ -229,11 +235,10 @@ if (isCreate) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
lotOccupancyOccupants = exports.lotOccupancyOccupants;
|
renderLotOccupancyOccupants();
|
||||||
delete exports.lotOccupancyOccupants;
|
}
|
||||||
document
|
(_a = document
|
||||||
.querySelector('#button--addOccupant')
|
.querySelector('#button--addOccupant')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => {
|
||||||
.addEventListener('click', () => {
|
|
||||||
let addCloseModalFunction;
|
let addCloseModalFunction;
|
||||||
let addFormElement;
|
let addFormElement;
|
||||||
let searchFormElement;
|
let searchFormElement;
|
||||||
|
|
@ -311,8 +316,7 @@ else {
|
||||||
'<br />' +
|
'<br />' +
|
||||||
(((_c = occupant.occupantAddress2) !== null && _c !== void 0 ? _c : '') === ''
|
(((_c = occupant.occupantAddress2) !== null && _c !== void 0 ? _c : '') === ''
|
||||||
? ''
|
? ''
|
||||||
: cityssm.escapeHTML(occupant.occupantAddress2) +
|
: cityssm.escapeHTML(occupant.occupantAddress2) + '<br />') +
|
||||||
'<br />') +
|
|
||||||
cityssm.escapeHTML((_d = occupant.occupantCity) !== null && _d !== void 0 ? _d : '') +
|
cityssm.escapeHTML((_d = occupant.occupantCity) !== null && _d !== void 0 ? _d : '') +
|
||||||
', ' +
|
', ' +
|
||||||
cityssm.escapeHTML((_e = occupant.occupantProvince) !== null && _e !== void 0 ? _e : '') +
|
cityssm.escapeHTML((_e = occupant.occupantProvince) !== null && _e !== void 0 ? _e : '') +
|
||||||
|
|
@ -382,6 +386,4 @@ else {
|
||||||
bulmaJS.toggleHtmlClipped();
|
bulmaJS.toggleHtmlClipped();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
renderLotOccupancyOccupants();
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,9 @@ declare const lotOccupancyId: string
|
||||||
declare const isCreate: boolean
|
declare const isCreate: boolean
|
||||||
declare const formElement: HTMLFormElement
|
declare const formElement: HTMLFormElement
|
||||||
|
|
||||||
let lotOccupancyOccupants: recordTypes.LotOccupancyOccupant[]
|
let lotOccupancyOccupants: recordTypes.LotOccupancyOccupant[] =
|
||||||
|
exports.lotOccupancyOccupants
|
||||||
|
delete exports.lotOccupancyOccupants
|
||||||
|
|
||||||
function openEditLotOccupancyOccupant(clickEvent: Event): void {
|
function openEditLotOccupancyOccupant(clickEvent: Event): void {
|
||||||
const lotOccupantIndex = Number.parseInt(
|
const lotOccupantIndex = Number.parseInt(
|
||||||
|
|
@ -316,7 +318,13 @@ function renderLotOccupancyOccupants(): void {
|
||||||
: cityssm.escapeHTML(lotOccupancyOccupant.occupantEmailAddress!)) +
|
: cityssm.escapeHTML(lotOccupancyOccupant.occupantEmailAddress!)) +
|
||||||
'</td>') +
|
'</td>') +
|
||||||
('<td>' +
|
('<td>' +
|
||||||
'<span data-tooltip="' + cityssm.escapeHTML((lotOccupancyOccupant.occupantCommentTitle ?? '') === '' ? 'Comment' : lotOccupancyOccupant.occupantCommentTitle!) + '">' +
|
'<span data-tooltip="' +
|
||||||
|
cityssm.escapeHTML(
|
||||||
|
(lotOccupancyOccupant.occupantCommentTitle ?? '') === ''
|
||||||
|
? 'Comment'
|
||||||
|
: lotOccupancyOccupant.occupantCommentTitle!
|
||||||
|
) +
|
||||||
|
'">' +
|
||||||
cityssm.escapeHTML(lotOccupancyOccupant.occupantComment ?? '') +
|
cityssm.escapeHTML(lotOccupancyOccupant.occupantComment ?? '') +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'</td>') +
|
'</td>') +
|
||||||
|
|
@ -362,12 +370,12 @@ if (isCreate) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
lotOccupancyOccupants = exports.lotOccupancyOccupants
|
renderLotOccupancyOccupants()
|
||||||
delete exports.lotOccupancyOccupants
|
}
|
||||||
|
|
||||||
document
|
document
|
||||||
.querySelector('#button--addOccupant')!
|
.querySelector('#button--addOccupant')
|
||||||
.addEventListener('click', () => {
|
?.addEventListener('click', () => {
|
||||||
let addCloseModalFunction: () => void
|
let addCloseModalFunction: () => void
|
||||||
|
|
||||||
let addFormElement: HTMLFormElement
|
let addFormElement: HTMLFormElement
|
||||||
|
|
@ -469,10 +477,7 @@ if (isCreate) {
|
||||||
const panelElement = document.createElement('div')
|
const panelElement = document.createElement('div')
|
||||||
panelElement.className = 'panel'
|
panelElement.className = 'panel'
|
||||||
|
|
||||||
for (const [
|
for (const [index, occupant] of pastOccupantSearchResults.entries()) {
|
||||||
index,
|
|
||||||
occupant
|
|
||||||
] of pastOccupantSearchResults.entries()) {
|
|
||||||
const panelBlockElement = document.createElement('a')
|
const panelBlockElement = document.createElement('a')
|
||||||
panelBlockElement.className = 'panel-block is-block'
|
panelBlockElement.className = 'panel-block is-block'
|
||||||
panelBlockElement.dataset.index = index.toString()
|
panelBlockElement.dataset.index = index.toString()
|
||||||
|
|
@ -488,8 +493,7 @@ if (isCreate) {
|
||||||
'<br />' +
|
'<br />' +
|
||||||
((occupant.occupantAddress2 ?? '') === ''
|
((occupant.occupantAddress2 ?? '') === ''
|
||||||
? ''
|
? ''
|
||||||
: cityssm.escapeHTML(occupant.occupantAddress2!) +
|
: cityssm.escapeHTML(occupant.occupantAddress2!) + '<br />') +
|
||||||
'<br />') +
|
|
||||||
cityssm.escapeHTML(occupant.occupantCity ?? '') +
|
cityssm.escapeHTML(occupant.occupantCity ?? '') +
|
||||||
', ' +
|
', ' +
|
||||||
cityssm.escapeHTML(occupant.occupantProvince ?? '') +
|
cityssm.escapeHTML(occupant.occupantProvince ?? '') +
|
||||||
|
|
@ -543,9 +547,7 @@ if (isCreate) {
|
||||||
|
|
||||||
lotOccupantTypeSelectElement.append(optionElement)
|
lotOccupantTypeSelectElement.append(optionElement)
|
||||||
|
|
||||||
lotOccupantTypeCopySelectElement.append(
|
lotOccupantTypeCopySelectElement.append(optionElement.cloneNode(true))
|
||||||
optionElement.cloneNode(true)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
;(
|
;(
|
||||||
|
|
@ -611,6 +613,3 @@ if (isCreate) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
renderLotOccupancyOccupants()
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue