diff --git a/public-typescript/lotOccupancySearch.js b/public-typescript/lotOccupancySearch.js
index 39bbb835..bc216b59 100644
--- a/public-typescript/lotOccupancySearch.js
+++ b/public-typescript/lotOccupancySearch.js
@@ -7,8 +7,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
const searchResultsContainerElement = document.querySelector('#container--searchResults');
const limit = Number.parseInt(document.querySelector('#searchFilter--limit').value, 10);
const offsetElement = document.querySelector('#searchFilter--offset');
- function renderLotOccupancies(responseJSON) {
+ function renderLotOccupancies(rawResponseJSON) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
+ const responseJSON = rawResponseJSON;
if (responseJSON.lotOccupancies.length === 0) {
searchResultsContainerElement.innerHTML = `
@@ -80,7 +81,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
'">' +
cityssm.escapeHTML(lotOccupancy.occupancyType) +
- '' +
+ '
' +
+ `#${lotOccupancy.lotOccupancyId}` +
'') +
('
' +
(((_j = lotOccupancy.lotId) !== null && _j !== void 0 ? _j : -1) === -1
@@ -114,7 +116,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
'/print/' +
lotOccupancy.printEJS +
'/?lotOccupancyId=' +
- lotOccupancy.lotOccupancyId +
+ lotOccupancy.lotOccupancyId.toString() +
'" target="_blank">' +
'' +
''
diff --git a/public-typescript/lotOccupancySearch.ts b/public-typescript/lotOccupancySearch.ts
index 477a4790..ef5860c6 100644
--- a/public-typescript/lotOccupancySearch.ts
+++ b/public-typescript/lotOccupancySearch.ts
@@ -26,11 +26,13 @@ declare const cityssm: cityssmGlobal
'#searchFilter--offset'
) as HTMLInputElement
- function renderLotOccupancies(responseJSON: {
- count: number
- offset: number
- lotOccupancies: recordTypes.LotOccupancy[]
- }): void {
+ function renderLotOccupancies(rawResponseJSON: unknown): void {
+ const responseJSON = rawResponseJSON as {
+ count: number
+ offset: number
+ lotOccupancies: recordTypes.LotOccupancy[]
+ }
+
if (responseJSON.lotOccupancies.length === 0) {
searchResultsContainerElement.innerHTML = `
@@ -128,7 +130,8 @@ declare const cityssm: cityssmGlobal
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
'">' +
cityssm.escapeHTML(lotOccupancy.occupancyType as string) +
- '' +
+ ' ' +
+ `#${lotOccupancy.lotOccupancyId!}` +
' | ') +
('
' +
((lotOccupancy.lotId ?? -1) === -1
@@ -162,7 +165,7 @@ declare const cityssm: cityssmGlobal
'/print/' +
lotOccupancy.printEJS +
'/?lotOccupancyId=' +
- lotOccupancy.lotOccupancyId +
+ lotOccupancy.lotOccupancyId!.toString() +
'" target="_blank">' +
'' +
''
diff --git a/public-typescript/workOrderEdit.js b/public-typescript/workOrderEdit.js
index 3cb45f33..feae4b55 100644
--- a/public-typescript/workOrderEdit.js
+++ b/public-typescript/workOrderEdit.js
@@ -150,8 +150,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
cityssm.postJSON(los.urlPrefix + '/workOrders/doDeleteWorkOrderLotOccupancy', {
workOrderId,
lotOccupancyId
- }, (responseJSON) => {
+ }, (rawResponseJSON) => {
var _a;
+ const responseJSON = rawResponseJSON;
if (responseJSON.success) {
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
renderRelatedLotsAndOccupancies();
@@ -179,8 +180,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLot', {
workOrderId,
lotId
- }, (responseJSON) => {
+ }, (rawResponseJSON) => {
var _a;
+ const responseJSON = rawResponseJSON;
if (responseJSON.success) {
workOrderLots = responseJSON.workOrderLots;
renderRelatedLotsAndOccupancies();
@@ -192,7 +194,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
contextualColorName: 'danger'
});
}
- if (callbackFunction) {
+ if (callbackFunction !== undefined) {
callbackFunction(responseJSON.success);
}
});
@@ -201,8 +203,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLotOccupancy', {
workOrderId,
lotOccupancyId
- }, (responseJSON) => {
+ }, (rawResponseJSON) => {
var _a;
+ const responseJSON = rawResponseJSON;
if (responseJSON.success) {
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
renderRelatedLotsAndOccupancies();
@@ -214,7 +217,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
contextualColorName: 'danger'
});
}
- if (callbackFunction) {
+ if (callbackFunction !== undefined) {
callbackFunction(responseJSON.success);
}
});
@@ -271,7 +274,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
'">' +
cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '') +
- '' +
+ ' ' +
+ `#${lotOccupancy.lotOccupancyId}` +
' | ');
if (lotOccupancy.lotId) {
rowElement.insertAdjacentHTML('beforeend', '
' +
@@ -280,7 +284,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
? ''
: ' | ' +
- ('
' + cityssm.escapeHTML((_b = lot.mapName) !== null && _b !== void 0 ? _b : '') + ' | ') +
- ('
' + cityssm.escapeHTML((_c = lot.lotType) !== null && _c !== void 0 ? _c : '') + ' | ') +
+ `
${cityssm.escapeHTML((_b = lot.mapName) !== null && _b !== void 0 ? _b : '')} | ` +
+ `
${cityssm.escapeHTML((_c = lot.lotType) !== null && _c !== void 0 ? _c : '')} | ` +
('
' +
(lot.lotStatusId
? cityssm.escapeHTML((_d = lot.lotStatus) !== null && _d !== void 0 ? _d : '')
: '(No Status)') +
' | ') +
- ('
' +
- '' +
- ' ' +
- ' | ');
+ `
+
+
+ | `;
rowElement
.querySelector('.button--editLotStatus')
.addEventListener('click', openEditLotStatus);
@@ -516,8 +522,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
}
searchResultsContainerElement.innerHTML =
los.getLoadingParagraphHTML('Searching...');
- cityssm.postJSON(los.urlPrefix + '/lotOccupancies/doSearchLotOccupancies', searchFormElement, (responseJSON) => {
+ cityssm.postJSON(los.urlPrefix + '/lotOccupancies/doSearchLotOccupancies', searchFormElement, (rawResponseJSON) => {
var _a, _b;
+ const responseJSON = rawResponseJSON;
if (responseJSON.lotOccupancies.length === 0) {
searchResultsContainerElement.innerHTML = `
There are no records that meet the search criteria.
@@ -540,15 +547,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
rowElement.className = 'container--lotOccupancy';
rowElement.dataset.lotOccupancyId =
lotOccupancy.lotOccupancyId.toString();
- rowElement.innerHTML =
- '
' +
- '' +
- ' | ' +
- ('
' +
- cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '') +
- ' | ');
+ rowElement.innerHTML = `
+
+ |
+
+ ${cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '')}
+ | `;
if (lotOccupancy.lotId) {
rowElement.insertAdjacentHTML('beforeend', '
' +
cityssm.escapeHTML((_b = lotOccupancy.lotName) !== null && _b !== void 0 ? _b : '') +
@@ -625,8 +631,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
}
searchResultsContainerElement.innerHTML =
los.getLoadingParagraphHTML('Searching...');
- cityssm.postJSON(los.urlPrefix + '/lots/doSearchLots', searchFormElement, (responseJSON) => {
+ cityssm.postJSON(los.urlPrefix + '/lots/doSearchLots', searchFormElement, (rawResponseJSON) => {
var _a, _b, _c, _d;
+ const responseJSON = rawResponseJSON;
if (responseJSON.lots.length === 0) {
searchResultsContainerElement.innerHTML =
' ' +
diff --git a/public-typescript/workOrderEdit/workOrderEditLots.js b/public-typescript/workOrderEdit/workOrderEditLots.js
index 78fb6fd2..f3f39a38 100644
--- a/public-typescript/workOrderEdit/workOrderEditLots.js
+++ b/public-typescript/workOrderEdit/workOrderEditLots.js
@@ -13,8 +13,9 @@ function deleteLotOccupancy(clickEvent) {
cityssm.postJSON(los.urlPrefix + '/workOrders/doDeleteWorkOrderLotOccupancy', {
workOrderId,
lotOccupancyId
- }, (responseJSON) => {
+ }, (rawResponseJSON) => {
var _a;
+ const responseJSON = rawResponseJSON;
if (responseJSON.success) {
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
renderRelatedLotsAndOccupancies();
@@ -42,8 +43,9 @@ function addLot(lotId, callbackFunction) {
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLot', {
workOrderId,
lotId
- }, (responseJSON) => {
+ }, (rawResponseJSON) => {
var _a;
+ const responseJSON = rawResponseJSON;
if (responseJSON.success) {
workOrderLots = responseJSON.workOrderLots;
renderRelatedLotsAndOccupancies();
@@ -55,7 +57,7 @@ function addLot(lotId, callbackFunction) {
contextualColorName: 'danger'
});
}
- if (callbackFunction) {
+ if (callbackFunction !== undefined) {
callbackFunction(responseJSON.success);
}
});
@@ -64,8 +66,9 @@ function addLotOccupancy(lotOccupancyId, callbackFunction) {
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLotOccupancy', {
workOrderId,
lotOccupancyId
- }, (responseJSON) => {
+ }, (rawResponseJSON) => {
var _a;
+ const responseJSON = rawResponseJSON;
if (responseJSON.success) {
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
renderRelatedLotsAndOccupancies();
@@ -77,7 +80,7 @@ function addLotOccupancy(lotOccupancyId, callbackFunction) {
contextualColorName: 'danger'
});
}
- if (callbackFunction) {
+ if (callbackFunction !== undefined) {
callbackFunction(responseJSON.success);
}
});
@@ -134,7 +137,8 @@ function renderRelatedOccupancies() {
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
'">' +
cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '') +
- '' +
+ ' ' +
+ `#${lotOccupancy.lotOccupancyId}` +
' | ');
if (lotOccupancy.lotId) {
rowElement.insertAdjacentHTML('beforeend', '
' +
@@ -143,7 +147,7 @@ function renderRelatedOccupancies() {
? ''
: ' | ') +
- ('
' +
- '' +
- ' ' +
- ' | ');
+ `
+
+
+ | `;
rowElement
.querySelector('.button--editLotStatus')
.addEventListener('click', openEditLotStatus);
@@ -379,8 +385,9 @@ function doAddLotOccupancy(clickEvent) {
}
searchResultsContainerElement.innerHTML =
los.getLoadingParagraphHTML('Searching...');
- cityssm.postJSON(los.urlPrefix + '/lotOccupancies/doSearchLotOccupancies', searchFormElement, (responseJSON) => {
+ cityssm.postJSON(los.urlPrefix + '/lotOccupancies/doSearchLotOccupancies', searchFormElement, (rawResponseJSON) => {
var _a, _b;
+ const responseJSON = rawResponseJSON;
if (responseJSON.lotOccupancies.length === 0) {
searchResultsContainerElement.innerHTML = `
There are no records that meet the search criteria.
@@ -403,15 +410,14 @@ function doAddLotOccupancy(clickEvent) {
rowElement.className = 'container--lotOccupancy';
rowElement.dataset.lotOccupancyId =
lotOccupancy.lotOccupancyId.toString();
- rowElement.innerHTML =
- '
' +
- '' +
- ' | ' +
- ('
' +
- cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '') +
- ' | ');
+ rowElement.innerHTML = `
+
+ |
+
+ ${cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '')}
+ | `;
if (lotOccupancy.lotId) {
rowElement.insertAdjacentHTML('beforeend', '
' +
cityssm.escapeHTML((_b = lotOccupancy.lotName) !== null && _b !== void 0 ? _b : '') +
@@ -488,8 +494,9 @@ function doAddLot(clickEvent) {
}
searchResultsContainerElement.innerHTML =
los.getLoadingParagraphHTML('Searching...');
- cityssm.postJSON(los.urlPrefix + '/lots/doSearchLots', searchFormElement, (responseJSON) => {
+ cityssm.postJSON(los.urlPrefix + '/lots/doSearchLots', searchFormElement, (rawResponseJSON) => {
var _a, _b, _c, _d;
+ const responseJSON = rawResponseJSON;
if (responseJSON.lots.length === 0) {
searchResultsContainerElement.innerHTML =
' ' +
diff --git a/public-typescript/workOrderEdit/workOrderEditLots.ts b/public-typescript/workOrderEdit/workOrderEditLots.ts
index a1fd468a..2fee1b7b 100644
--- a/public-typescript/workOrderEdit/workOrderEditLots.ts
+++ b/public-typescript/workOrderEdit/workOrderEditLots.ts
@@ -35,11 +35,13 @@ function deleteLotOccupancy(clickEvent: Event): void {
workOrderId,
lotOccupancyId
},
- (responseJSON: {
- success: boolean
- errorMessage?: string
- workOrderLotOccupancies?: recordTypes.LotOccupancy[]
- }) => {
+ (rawResponseJSON) => {
+ const responseJSON = rawResponseJSON as {
+ success: boolean
+ errorMessage?: string
+ workOrderLotOccupancies?: recordTypes.LotOccupancy[]
+ }
+
if (responseJSON.success) {
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies!
renderRelatedLotsAndOccupancies()
@@ -67,7 +69,7 @@ function deleteLotOccupancy(clickEvent: Event): void {
function addLot(
lotId: number | string,
- callbackFunction?: (success?: boolean) => void
+ callbackFunction?: (success: boolean) => void
): void {
cityssm.postJSON(
los.urlPrefix + '/workOrders/doAddWorkOrderLot',
@@ -75,11 +77,13 @@ function addLot(
workOrderId,
lotId
},
- (responseJSON: {
- success: boolean
- errorMessage?: string
- workOrderLots?: recordTypes.Lot[]
- }) => {
+ (rawResponseJSON) => {
+ const responseJSON = rawResponseJSON as {
+ success: boolean
+ errorMessage?: string
+ workOrderLots?: recordTypes.Lot[]
+ }
+
if (responseJSON.success) {
workOrderLots = responseJSON.workOrderLots!
renderRelatedLotsAndOccupancies()
@@ -91,7 +95,7 @@ function addLot(
})
}
- if (callbackFunction) {
+ if (callbackFunction !== undefined) {
callbackFunction(responseJSON.success)
}
}
@@ -108,11 +112,13 @@ function addLotOccupancy(
workOrderId,
lotOccupancyId
},
- (responseJSON: {
- success: boolean
- errorMessage?: string
- workOrderLotOccupancies?: recordTypes.LotOccupancy[]
- }) => {
+ (rawResponseJSON) => {
+ const responseJSON = rawResponseJSON as {
+ success: boolean
+ errorMessage?: string
+ workOrderLotOccupancies?: recordTypes.LotOccupancy[]
+ }
+
if (responseJSON.success) {
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies!
renderRelatedLotsAndOccupancies()
@@ -124,7 +130,7 @@ function addLotOccupancy(
})
}
- if (callbackFunction) {
+ if (callbackFunction !== undefined) {
callbackFunction(responseJSON.success)
}
}
@@ -201,7 +207,8 @@ function renderRelatedOccupancies(): void {
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
'">' +
cityssm.escapeHTML(lotOccupancy.occupancyType ?? '') +
- '' +
+ ' ' +
+ `#${lotOccupancy.lotOccupancyId!}` +
' | ')
if (lotOccupancy.lotId) {
@@ -213,7 +220,7 @@ function renderRelatedOccupancies(): void {
? ''
: '