include lotOccupancyId in result tables
parent
95fd36be87
commit
37984ed2f3
|
|
@ -7,8 +7,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const searchResultsContainerElement = document.querySelector('#container--searchResults');
|
const searchResultsContainerElement = document.querySelector('#container--searchResults');
|
||||||
const limit = Number.parseInt(document.querySelector('#searchFilter--limit').value, 10);
|
const limit = Number.parseInt(document.querySelector('#searchFilter--limit').value, 10);
|
||||||
const offsetElement = document.querySelector('#searchFilter--offset');
|
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;
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.lotOccupancies.length === 0) {
|
if (responseJSON.lotOccupancies.length === 0) {
|
||||||
searchResultsContainerElement.innerHTML = `<div class="message is-info">
|
searchResultsContainerElement.innerHTML = `<div class="message is-info">
|
||||||
<p class="message-body">
|
<p class="message-body">
|
||||||
|
|
@ -80,7 +81,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
|
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
|
||||||
'">' +
|
'">' +
|
||||||
cityssm.escapeHTML(lotOccupancy.occupancyType) +
|
cityssm.escapeHTML(lotOccupancy.occupancyType) +
|
||||||
'</a>' +
|
'</a><br />' +
|
||||||
|
`<span class="is-size-7">#${lotOccupancy.lotOccupancyId}</span>` +
|
||||||
'</td>') +
|
'</td>') +
|
||||||
('<td>' +
|
('<td>' +
|
||||||
(((_j = lotOccupancy.lotId) !== null && _j !== void 0 ? _j : -1) === -1
|
(((_j = lotOccupancy.lotId) !== null && _j !== void 0 ? _j : -1) === -1
|
||||||
|
|
@ -114,7 +116,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
'/print/' +
|
'/print/' +
|
||||||
lotOccupancy.printEJS +
|
lotOccupancy.printEJS +
|
||||||
'/?lotOccupancyId=' +
|
'/?lotOccupancyId=' +
|
||||||
lotOccupancy.lotOccupancyId +
|
lotOccupancy.lotOccupancyId.toString() +
|
||||||
'" target="_blank">' +
|
'" target="_blank">' +
|
||||||
'<i class="fas fa-print" aria-label="Print"></i>' +
|
'<i class="fas fa-print" aria-label="Print"></i>' +
|
||||||
'</a>'
|
'</a>'
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,13 @@ declare const cityssm: cityssmGlobal
|
||||||
'#searchFilter--offset'
|
'#searchFilter--offset'
|
||||||
) as HTMLInputElement
|
) as HTMLInputElement
|
||||||
|
|
||||||
function renderLotOccupancies(responseJSON: {
|
function renderLotOccupancies(rawResponseJSON: unknown): void {
|
||||||
count: number
|
const responseJSON = rawResponseJSON as {
|
||||||
offset: number
|
count: number
|
||||||
lotOccupancies: recordTypes.LotOccupancy[]
|
offset: number
|
||||||
}): void {
|
lotOccupancies: recordTypes.LotOccupancy[]
|
||||||
|
}
|
||||||
|
|
||||||
if (responseJSON.lotOccupancies.length === 0) {
|
if (responseJSON.lotOccupancies.length === 0) {
|
||||||
searchResultsContainerElement.innerHTML = `<div class="message is-info">
|
searchResultsContainerElement.innerHTML = `<div class="message is-info">
|
||||||
<p class="message-body">
|
<p class="message-body">
|
||||||
|
|
@ -128,7 +130,8 @@ declare const cityssm: cityssmGlobal
|
||||||
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
|
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
|
||||||
'">' +
|
'">' +
|
||||||
cityssm.escapeHTML(lotOccupancy.occupancyType as string) +
|
cityssm.escapeHTML(lotOccupancy.occupancyType as string) +
|
||||||
'</a>' +
|
'</a><br />' +
|
||||||
|
`<span class="is-size-7">#${lotOccupancy.lotOccupancyId!}</span>` +
|
||||||
'</td>') +
|
'</td>') +
|
||||||
('<td>' +
|
('<td>' +
|
||||||
((lotOccupancy.lotId ?? -1) === -1
|
((lotOccupancy.lotId ?? -1) === -1
|
||||||
|
|
@ -162,7 +165,7 @@ declare const cityssm: cityssmGlobal
|
||||||
'/print/' +
|
'/print/' +
|
||||||
lotOccupancy.printEJS +
|
lotOccupancy.printEJS +
|
||||||
'/?lotOccupancyId=' +
|
'/?lotOccupancyId=' +
|
||||||
lotOccupancy.lotOccupancyId +
|
lotOccupancy.lotOccupancyId!.toString() +
|
||||||
'" target="_blank">' +
|
'" target="_blank">' +
|
||||||
'<i class="fas fa-print" aria-label="Print"></i>' +
|
'<i class="fas fa-print" aria-label="Print"></i>' +
|
||||||
'</a>'
|
'</a>'
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doDeleteWorkOrderLotOccupancy', {
|
cityssm.postJSON(los.urlPrefix + '/workOrders/doDeleteWorkOrderLotOccupancy', {
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotOccupancyId
|
lotOccupancyId
|
||||||
}, (responseJSON) => {
|
}, (rawResponseJSON) => {
|
||||||
var _a;
|
var _a;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
|
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
|
||||||
renderRelatedLotsAndOccupancies();
|
renderRelatedLotsAndOccupancies();
|
||||||
|
|
@ -179,8 +180,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLot', {
|
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLot', {
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotId
|
lotId
|
||||||
}, (responseJSON) => {
|
}, (rawResponseJSON) => {
|
||||||
var _a;
|
var _a;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLots = responseJSON.workOrderLots;
|
workOrderLots = responseJSON.workOrderLots;
|
||||||
renderRelatedLotsAndOccupancies();
|
renderRelatedLotsAndOccupancies();
|
||||||
|
|
@ -192,7 +194,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
contextualColorName: 'danger'
|
contextualColorName: 'danger'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (callbackFunction) {
|
if (callbackFunction !== undefined) {
|
||||||
callbackFunction(responseJSON.success);
|
callbackFunction(responseJSON.success);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -201,8 +203,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLotOccupancy', {
|
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLotOccupancy', {
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotOccupancyId
|
lotOccupancyId
|
||||||
}, (responseJSON) => {
|
}, (rawResponseJSON) => {
|
||||||
var _a;
|
var _a;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
|
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
|
||||||
renderRelatedLotsAndOccupancies();
|
renderRelatedLotsAndOccupancies();
|
||||||
|
|
@ -214,7 +217,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
contextualColorName: 'danger'
|
contextualColorName: 'danger'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (callbackFunction) {
|
if (callbackFunction !== undefined) {
|
||||||
callbackFunction(responseJSON.success);
|
callbackFunction(responseJSON.success);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -271,7 +274,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
|
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
|
||||||
'">' +
|
'">' +
|
||||||
cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '') +
|
cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '') +
|
||||||
'</a>' +
|
'</a><br />' +
|
||||||
|
`<span class="is-size-7">#${lotOccupancy.lotOccupancyId}</span>` +
|
||||||
'</td>');
|
'</td>');
|
||||||
if (lotOccupancy.lotId) {
|
if (lotOccupancy.lotId) {
|
||||||
rowElement.insertAdjacentHTML('beforeend', '<td>' +
|
rowElement.insertAdjacentHTML('beforeend', '<td>' +
|
||||||
|
|
@ -280,7 +284,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
? ''
|
? ''
|
||||||
: ' <button class="button is-small is-light is-success button--addLot"' +
|
: ' <button class="button is-small is-light is-success button--addLot"' +
|
||||||
' data-lot-id="' +
|
' data-lot-id="' +
|
||||||
lotOccupancy.lotId +
|
lotOccupancy.lotId.toString() +
|
||||||
'"' +
|
'"' +
|
||||||
' data-tooltip="Add ' +
|
' data-tooltip="Add ' +
|
||||||
los.escapedAliases.Lot +
|
los.escapedAliases.Lot +
|
||||||
|
|
@ -348,8 +352,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
let editCloseModalFunction;
|
let editCloseModalFunction;
|
||||||
function doUpdateLotStatus(submitEvent) {
|
function doUpdateLotStatus(submitEvent) {
|
||||||
submitEvent.preventDefault();
|
submitEvent.preventDefault();
|
||||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doUpdateLotStatus', submitEvent.currentTarget, (responseJSON) => {
|
cityssm.postJSON(los.urlPrefix + '/workOrders/doUpdateLotStatus', submitEvent.currentTarget, (rawResponseJSON) => {
|
||||||
var _a;
|
var _a;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLots = responseJSON.workOrderLots;
|
workOrderLots = responseJSON.workOrderLots;
|
||||||
renderRelatedLotsAndOccupancies();
|
renderRelatedLotsAndOccupancies();
|
||||||
|
|
@ -411,8 +416,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doDeleteWorkOrderLot', {
|
cityssm.postJSON(los.urlPrefix + '/workOrders/doDeleteWorkOrderLot', {
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotId
|
lotId
|
||||||
}, (responseJSON) => {
|
}, (rawResponseJSON) => {
|
||||||
var _a;
|
var _a;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLots = responseJSON.workOrderLots;
|
workOrderLots = responseJSON.workOrderLots;
|
||||||
renderRelatedLotsAndOccupancies();
|
renderRelatedLotsAndOccupancies();
|
||||||
|
|
@ -468,21 +474,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
cityssm.escapeHTML((_a = lot.lotName) !== null && _a !== void 0 ? _a : '') +
|
cityssm.escapeHTML((_a = lot.lotName) !== null && _a !== void 0 ? _a : '') +
|
||||||
'</a>' +
|
'</a>' +
|
||||||
'</td>' +
|
'</td>' +
|
||||||
('<td>' + cityssm.escapeHTML((_b = lot.mapName) !== null && _b !== void 0 ? _b : '') + '</td>') +
|
`<td>${cityssm.escapeHTML((_b = lot.mapName) !== null && _b !== void 0 ? _b : '')}</td>` +
|
||||||
('<td>' + cityssm.escapeHTML((_c = lot.lotType) !== null && _c !== void 0 ? _c : '') + '</td>') +
|
`<td>${cityssm.escapeHTML((_c = lot.lotType) !== null && _c !== void 0 ? _c : '')}</td>` +
|
||||||
('<td>' +
|
('<td>' +
|
||||||
(lot.lotStatusId
|
(lot.lotStatusId
|
||||||
? cityssm.escapeHTML((_d = lot.lotStatus) !== null && _d !== void 0 ? _d : '')
|
? cityssm.escapeHTML((_d = lot.lotStatus) !== null && _d !== void 0 ? _d : '')
|
||||||
: '<span class="has-text-grey">(No Status)</span>') +
|
: '<span class="has-text-grey">(No Status)</span>') +
|
||||||
'</td>') +
|
'</td>') +
|
||||||
('<td class="is-nowrap">' +
|
`<td class="is-nowrap">
|
||||||
'<button class="button is-small is-light is-info button--editLotStatus" data-tooltip="Update Status" type="button">' +
|
<button class="button is-small is-light is-info button--editLotStatus" data-tooltip="Update Status" type="button">
|
||||||
'<i class="fas fa-pencil-alt" aria-hidden="true"></i>' +
|
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
|
||||||
'</button>' +
|
</button>
|
||||||
' <button class="button is-small is-light is-danger button--deleteLot" data-tooltip="Delete Relationship" type="button">' +
|
<button class="button is-small is-light is-danger button--deleteLot" data-tooltip="Delete Relationship" type="button">
|
||||||
'<i class="fas fa-trash" aria-hidden="true"></i>' +
|
<i class="fas fa-trash" aria-hidden="true"></i>
|
||||||
'</button>' +
|
</button>
|
||||||
'</td>');
|
</td>`;
|
||||||
rowElement
|
rowElement
|
||||||
.querySelector('.button--editLotStatus')
|
.querySelector('.button--editLotStatus')
|
||||||
.addEventListener('click', openEditLotStatus);
|
.addEventListener('click', openEditLotStatus);
|
||||||
|
|
@ -516,8 +522,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
}
|
}
|
||||||
searchResultsContainerElement.innerHTML =
|
searchResultsContainerElement.innerHTML =
|
||||||
los.getLoadingParagraphHTML('Searching...');
|
los.getLoadingParagraphHTML('Searching...');
|
||||||
cityssm.postJSON(los.urlPrefix + '/lotOccupancies/doSearchLotOccupancies', searchFormElement, (responseJSON) => {
|
cityssm.postJSON(los.urlPrefix + '/lotOccupancies/doSearchLotOccupancies', searchFormElement, (rawResponseJSON) => {
|
||||||
var _a, _b;
|
var _a, _b;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.lotOccupancies.length === 0) {
|
if (responseJSON.lotOccupancies.length === 0) {
|
||||||
searchResultsContainerElement.innerHTML = `<div class="message is-info">
|
searchResultsContainerElement.innerHTML = `<div class="message is-info">
|
||||||
<p class="message-body">There are no records that meet the search criteria.</p>
|
<p class="message-body">There are no records that meet the search criteria.</p>
|
||||||
|
|
@ -540,15 +547,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
rowElement.className = 'container--lotOccupancy';
|
rowElement.className = 'container--lotOccupancy';
|
||||||
rowElement.dataset.lotOccupancyId =
|
rowElement.dataset.lotOccupancyId =
|
||||||
lotOccupancy.lotOccupancyId.toString();
|
lotOccupancy.lotOccupancyId.toString();
|
||||||
rowElement.innerHTML =
|
rowElement.innerHTML = `<td class="has-text-centered">
|
||||||
'<td class="has-text-centered">' +
|
<button class="button is-small is-success button--addLotOccupancy" data-tooltip="Add" type="button" aria-label="Add">
|
||||||
'<button class="button is-small is-success button--addLotOccupancy" data-tooltip="Add" type="button" aria-label="Add">' +
|
<i class="fas fa-plus" aria-hidden="true"></i>
|
||||||
'<i class="fas fa-plus" aria-hidden="true"></i>' +
|
</button>
|
||||||
'</button>' +
|
</td>
|
||||||
'</td>' +
|
<td class="has-text-weight-bold">
|
||||||
('<td class="has-text-weight-bold">' +
|
${cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '')}
|
||||||
cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '') +
|
</td>`;
|
||||||
'</td>');
|
|
||||||
if (lotOccupancy.lotId) {
|
if (lotOccupancy.lotId) {
|
||||||
rowElement.insertAdjacentHTML('beforeend', '<td>' +
|
rowElement.insertAdjacentHTML('beforeend', '<td>' +
|
||||||
cityssm.escapeHTML((_b = lotOccupancy.lotName) !== null && _b !== void 0 ? _b : '') +
|
cityssm.escapeHTML((_b = lotOccupancy.lotName) !== null && _b !== void 0 ? _b : '') +
|
||||||
|
|
@ -625,8 +631,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
}
|
}
|
||||||
searchResultsContainerElement.innerHTML =
|
searchResultsContainerElement.innerHTML =
|
||||||
los.getLoadingParagraphHTML('Searching...');
|
los.getLoadingParagraphHTML('Searching...');
|
||||||
cityssm.postJSON(los.urlPrefix + '/lots/doSearchLots', searchFormElement, (responseJSON) => {
|
cityssm.postJSON(los.urlPrefix + '/lots/doSearchLots', searchFormElement, (rawResponseJSON) => {
|
||||||
var _a, _b, _c, _d;
|
var _a, _b, _c, _d;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.lots.length === 0) {
|
if (responseJSON.lots.length === 0) {
|
||||||
searchResultsContainerElement.innerHTML =
|
searchResultsContainerElement.innerHTML =
|
||||||
'<div class="message is-info">' +
|
'<div class="message is-info">' +
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,9 @@ function deleteLotOccupancy(clickEvent) {
|
||||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doDeleteWorkOrderLotOccupancy', {
|
cityssm.postJSON(los.urlPrefix + '/workOrders/doDeleteWorkOrderLotOccupancy', {
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotOccupancyId
|
lotOccupancyId
|
||||||
}, (responseJSON) => {
|
}, (rawResponseJSON) => {
|
||||||
var _a;
|
var _a;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
|
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
|
||||||
renderRelatedLotsAndOccupancies();
|
renderRelatedLotsAndOccupancies();
|
||||||
|
|
@ -42,8 +43,9 @@ function addLot(lotId, callbackFunction) {
|
||||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLot', {
|
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLot', {
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotId
|
lotId
|
||||||
}, (responseJSON) => {
|
}, (rawResponseJSON) => {
|
||||||
var _a;
|
var _a;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLots = responseJSON.workOrderLots;
|
workOrderLots = responseJSON.workOrderLots;
|
||||||
renderRelatedLotsAndOccupancies();
|
renderRelatedLotsAndOccupancies();
|
||||||
|
|
@ -55,7 +57,7 @@ function addLot(lotId, callbackFunction) {
|
||||||
contextualColorName: 'danger'
|
contextualColorName: 'danger'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (callbackFunction) {
|
if (callbackFunction !== undefined) {
|
||||||
callbackFunction(responseJSON.success);
|
callbackFunction(responseJSON.success);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -64,8 +66,9 @@ function addLotOccupancy(lotOccupancyId, callbackFunction) {
|
||||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLotOccupancy', {
|
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderLotOccupancy', {
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotOccupancyId
|
lotOccupancyId
|
||||||
}, (responseJSON) => {
|
}, (rawResponseJSON) => {
|
||||||
var _a;
|
var _a;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
|
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies;
|
||||||
renderRelatedLotsAndOccupancies();
|
renderRelatedLotsAndOccupancies();
|
||||||
|
|
@ -77,7 +80,7 @@ function addLotOccupancy(lotOccupancyId, callbackFunction) {
|
||||||
contextualColorName: 'danger'
|
contextualColorName: 'danger'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (callbackFunction) {
|
if (callbackFunction !== undefined) {
|
||||||
callbackFunction(responseJSON.success);
|
callbackFunction(responseJSON.success);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -134,7 +137,8 @@ function renderRelatedOccupancies() {
|
||||||
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
|
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
|
||||||
'">' +
|
'">' +
|
||||||
cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '') +
|
cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '') +
|
||||||
'</a>' +
|
'</a><br />' +
|
||||||
|
`<span class="is-size-7">#${lotOccupancy.lotOccupancyId}</span>` +
|
||||||
'</td>');
|
'</td>');
|
||||||
if (lotOccupancy.lotId) {
|
if (lotOccupancy.lotId) {
|
||||||
rowElement.insertAdjacentHTML('beforeend', '<td>' +
|
rowElement.insertAdjacentHTML('beforeend', '<td>' +
|
||||||
|
|
@ -143,7 +147,7 @@ function renderRelatedOccupancies() {
|
||||||
? ''
|
? ''
|
||||||
: ' <button class="button is-small is-light is-success button--addLot"' +
|
: ' <button class="button is-small is-light is-success button--addLot"' +
|
||||||
' data-lot-id="' +
|
' data-lot-id="' +
|
||||||
lotOccupancy.lotId +
|
lotOccupancy.lotId.toString() +
|
||||||
'"' +
|
'"' +
|
||||||
' data-tooltip="Add ' +
|
' data-tooltip="Add ' +
|
||||||
los.escapedAliases.Lot +
|
los.escapedAliases.Lot +
|
||||||
|
|
@ -211,8 +215,9 @@ function openEditLotStatus(clickEvent) {
|
||||||
let editCloseModalFunction;
|
let editCloseModalFunction;
|
||||||
function doUpdateLotStatus(submitEvent) {
|
function doUpdateLotStatus(submitEvent) {
|
||||||
submitEvent.preventDefault();
|
submitEvent.preventDefault();
|
||||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doUpdateLotStatus', submitEvent.currentTarget, (responseJSON) => {
|
cityssm.postJSON(los.urlPrefix + '/workOrders/doUpdateLotStatus', submitEvent.currentTarget, (rawResponseJSON) => {
|
||||||
var _a;
|
var _a;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLots = responseJSON.workOrderLots;
|
workOrderLots = responseJSON.workOrderLots;
|
||||||
renderRelatedLotsAndOccupancies();
|
renderRelatedLotsAndOccupancies();
|
||||||
|
|
@ -274,8 +279,9 @@ function deleteLot(clickEvent) {
|
||||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doDeleteWorkOrderLot', {
|
cityssm.postJSON(los.urlPrefix + '/workOrders/doDeleteWorkOrderLot', {
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotId
|
lotId
|
||||||
}, (responseJSON) => {
|
}, (rawResponseJSON) => {
|
||||||
var _a;
|
var _a;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLots = responseJSON.workOrderLots;
|
workOrderLots = responseJSON.workOrderLots;
|
||||||
renderRelatedLotsAndOccupancies();
|
renderRelatedLotsAndOccupancies();
|
||||||
|
|
@ -331,21 +337,21 @@ function renderRelatedLots() {
|
||||||
cityssm.escapeHTML((_a = lot.lotName) !== null && _a !== void 0 ? _a : '') +
|
cityssm.escapeHTML((_a = lot.lotName) !== null && _a !== void 0 ? _a : '') +
|
||||||
'</a>' +
|
'</a>' +
|
||||||
'</td>' +
|
'</td>' +
|
||||||
('<td>' + cityssm.escapeHTML((_b = lot.mapName) !== null && _b !== void 0 ? _b : '') + '</td>') +
|
`<td>${cityssm.escapeHTML((_b = lot.mapName) !== null && _b !== void 0 ? _b : '')}</td>` +
|
||||||
('<td>' + cityssm.escapeHTML((_c = lot.lotType) !== null && _c !== void 0 ? _c : '') + '</td>') +
|
`<td>${cityssm.escapeHTML((_c = lot.lotType) !== null && _c !== void 0 ? _c : '')}</td>` +
|
||||||
('<td>' +
|
('<td>' +
|
||||||
(lot.lotStatusId
|
(lot.lotStatusId
|
||||||
? cityssm.escapeHTML((_d = lot.lotStatus) !== null && _d !== void 0 ? _d : '')
|
? cityssm.escapeHTML((_d = lot.lotStatus) !== null && _d !== void 0 ? _d : '')
|
||||||
: '<span class="has-text-grey">(No Status)</span>') +
|
: '<span class="has-text-grey">(No Status)</span>') +
|
||||||
'</td>') +
|
'</td>') +
|
||||||
('<td class="is-nowrap">' +
|
`<td class="is-nowrap">
|
||||||
'<button class="button is-small is-light is-info button--editLotStatus" data-tooltip="Update Status" type="button">' +
|
<button class="button is-small is-light is-info button--editLotStatus" data-tooltip="Update Status" type="button">
|
||||||
'<i class="fas fa-pencil-alt" aria-hidden="true"></i>' +
|
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
|
||||||
'</button>' +
|
</button>
|
||||||
' <button class="button is-small is-light is-danger button--deleteLot" data-tooltip="Delete Relationship" type="button">' +
|
<button class="button is-small is-light is-danger button--deleteLot" data-tooltip="Delete Relationship" type="button">
|
||||||
'<i class="fas fa-trash" aria-hidden="true"></i>' +
|
<i class="fas fa-trash" aria-hidden="true"></i>
|
||||||
'</button>' +
|
</button>
|
||||||
'</td>');
|
</td>`;
|
||||||
rowElement
|
rowElement
|
||||||
.querySelector('.button--editLotStatus')
|
.querySelector('.button--editLotStatus')
|
||||||
.addEventListener('click', openEditLotStatus);
|
.addEventListener('click', openEditLotStatus);
|
||||||
|
|
@ -379,8 +385,9 @@ function doAddLotOccupancy(clickEvent) {
|
||||||
}
|
}
|
||||||
searchResultsContainerElement.innerHTML =
|
searchResultsContainerElement.innerHTML =
|
||||||
los.getLoadingParagraphHTML('Searching...');
|
los.getLoadingParagraphHTML('Searching...');
|
||||||
cityssm.postJSON(los.urlPrefix + '/lotOccupancies/doSearchLotOccupancies', searchFormElement, (responseJSON) => {
|
cityssm.postJSON(los.urlPrefix + '/lotOccupancies/doSearchLotOccupancies', searchFormElement, (rawResponseJSON) => {
|
||||||
var _a, _b;
|
var _a, _b;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.lotOccupancies.length === 0) {
|
if (responseJSON.lotOccupancies.length === 0) {
|
||||||
searchResultsContainerElement.innerHTML = `<div class="message is-info">
|
searchResultsContainerElement.innerHTML = `<div class="message is-info">
|
||||||
<p class="message-body">There are no records that meet the search criteria.</p>
|
<p class="message-body">There are no records that meet the search criteria.</p>
|
||||||
|
|
@ -403,15 +410,14 @@ function doAddLotOccupancy(clickEvent) {
|
||||||
rowElement.className = 'container--lotOccupancy';
|
rowElement.className = 'container--lotOccupancy';
|
||||||
rowElement.dataset.lotOccupancyId =
|
rowElement.dataset.lotOccupancyId =
|
||||||
lotOccupancy.lotOccupancyId.toString();
|
lotOccupancy.lotOccupancyId.toString();
|
||||||
rowElement.innerHTML =
|
rowElement.innerHTML = `<td class="has-text-centered">
|
||||||
'<td class="has-text-centered">' +
|
<button class="button is-small is-success button--addLotOccupancy" data-tooltip="Add" type="button" aria-label="Add">
|
||||||
'<button class="button is-small is-success button--addLotOccupancy" data-tooltip="Add" type="button" aria-label="Add">' +
|
<i class="fas fa-plus" aria-hidden="true"></i>
|
||||||
'<i class="fas fa-plus" aria-hidden="true"></i>' +
|
</button>
|
||||||
'</button>' +
|
</td>
|
||||||
'</td>' +
|
<td class="has-text-weight-bold">
|
||||||
('<td class="has-text-weight-bold">' +
|
${cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '')}
|
||||||
cityssm.escapeHTML((_a = lotOccupancy.occupancyType) !== null && _a !== void 0 ? _a : '') +
|
</td>`;
|
||||||
'</td>');
|
|
||||||
if (lotOccupancy.lotId) {
|
if (lotOccupancy.lotId) {
|
||||||
rowElement.insertAdjacentHTML('beforeend', '<td>' +
|
rowElement.insertAdjacentHTML('beforeend', '<td>' +
|
||||||
cityssm.escapeHTML((_b = lotOccupancy.lotName) !== null && _b !== void 0 ? _b : '') +
|
cityssm.escapeHTML((_b = lotOccupancy.lotName) !== null && _b !== void 0 ? _b : '') +
|
||||||
|
|
@ -488,8 +494,9 @@ function doAddLot(clickEvent) {
|
||||||
}
|
}
|
||||||
searchResultsContainerElement.innerHTML =
|
searchResultsContainerElement.innerHTML =
|
||||||
los.getLoadingParagraphHTML('Searching...');
|
los.getLoadingParagraphHTML('Searching...');
|
||||||
cityssm.postJSON(los.urlPrefix + '/lots/doSearchLots', searchFormElement, (responseJSON) => {
|
cityssm.postJSON(los.urlPrefix + '/lots/doSearchLots', searchFormElement, (rawResponseJSON) => {
|
||||||
var _a, _b, _c, _d;
|
var _a, _b, _c, _d;
|
||||||
|
const responseJSON = rawResponseJSON;
|
||||||
if (responseJSON.lots.length === 0) {
|
if (responseJSON.lots.length === 0) {
|
||||||
searchResultsContainerElement.innerHTML =
|
searchResultsContainerElement.innerHTML =
|
||||||
'<div class="message is-info">' +
|
'<div class="message is-info">' +
|
||||||
|
|
|
||||||
|
|
@ -35,11 +35,13 @@ function deleteLotOccupancy(clickEvent: Event): void {
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotOccupancyId
|
lotOccupancyId
|
||||||
},
|
},
|
||||||
(responseJSON: {
|
(rawResponseJSON) => {
|
||||||
success: boolean
|
const responseJSON = rawResponseJSON as {
|
||||||
errorMessage?: string
|
success: boolean
|
||||||
workOrderLotOccupancies?: recordTypes.LotOccupancy[]
|
errorMessage?: string
|
||||||
}) => {
|
workOrderLotOccupancies?: recordTypes.LotOccupancy[]
|
||||||
|
}
|
||||||
|
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies!
|
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies!
|
||||||
renderRelatedLotsAndOccupancies()
|
renderRelatedLotsAndOccupancies()
|
||||||
|
|
@ -67,7 +69,7 @@ function deleteLotOccupancy(clickEvent: Event): void {
|
||||||
|
|
||||||
function addLot(
|
function addLot(
|
||||||
lotId: number | string,
|
lotId: number | string,
|
||||||
callbackFunction?: (success?: boolean) => void
|
callbackFunction?: (success: boolean) => void
|
||||||
): void {
|
): void {
|
||||||
cityssm.postJSON(
|
cityssm.postJSON(
|
||||||
los.urlPrefix + '/workOrders/doAddWorkOrderLot',
|
los.urlPrefix + '/workOrders/doAddWorkOrderLot',
|
||||||
|
|
@ -75,11 +77,13 @@ function addLot(
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotId
|
lotId
|
||||||
},
|
},
|
||||||
(responseJSON: {
|
(rawResponseJSON) => {
|
||||||
success: boolean
|
const responseJSON = rawResponseJSON as {
|
||||||
errorMessage?: string
|
success: boolean
|
||||||
workOrderLots?: recordTypes.Lot[]
|
errorMessage?: string
|
||||||
}) => {
|
workOrderLots?: recordTypes.Lot[]
|
||||||
|
}
|
||||||
|
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLots = responseJSON.workOrderLots!
|
workOrderLots = responseJSON.workOrderLots!
|
||||||
renderRelatedLotsAndOccupancies()
|
renderRelatedLotsAndOccupancies()
|
||||||
|
|
@ -91,7 +95,7 @@ function addLot(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callbackFunction) {
|
if (callbackFunction !== undefined) {
|
||||||
callbackFunction(responseJSON.success)
|
callbackFunction(responseJSON.success)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -108,11 +112,13 @@ function addLotOccupancy(
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotOccupancyId
|
lotOccupancyId
|
||||||
},
|
},
|
||||||
(responseJSON: {
|
(rawResponseJSON) => {
|
||||||
success: boolean
|
const responseJSON = rawResponseJSON as {
|
||||||
errorMessage?: string
|
success: boolean
|
||||||
workOrderLotOccupancies?: recordTypes.LotOccupancy[]
|
errorMessage?: string
|
||||||
}) => {
|
workOrderLotOccupancies?: recordTypes.LotOccupancy[]
|
||||||
|
}
|
||||||
|
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies!
|
workOrderLotOccupancies = responseJSON.workOrderLotOccupancies!
|
||||||
renderRelatedLotsAndOccupancies()
|
renderRelatedLotsAndOccupancies()
|
||||||
|
|
@ -124,7 +130,7 @@ function addLotOccupancy(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callbackFunction) {
|
if (callbackFunction !== undefined) {
|
||||||
callbackFunction(responseJSON.success)
|
callbackFunction(responseJSON.success)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -201,7 +207,8 @@ function renderRelatedOccupancies(): void {
|
||||||
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
|
los.getLotOccupancyURL(lotOccupancy.lotOccupancyId) +
|
||||||
'">' +
|
'">' +
|
||||||
cityssm.escapeHTML(lotOccupancy.occupancyType ?? '') +
|
cityssm.escapeHTML(lotOccupancy.occupancyType ?? '') +
|
||||||
'</a>' +
|
'</a><br />' +
|
||||||
|
`<span class="is-size-7">#${lotOccupancy.lotOccupancyId!}</span>` +
|
||||||
'</td>')
|
'</td>')
|
||||||
|
|
||||||
if (lotOccupancy.lotId) {
|
if (lotOccupancy.lotId) {
|
||||||
|
|
@ -213,7 +220,7 @@ function renderRelatedOccupancies(): void {
|
||||||
? ''
|
? ''
|
||||||
: ' <button class="button is-small is-light is-success button--addLot"' +
|
: ' <button class="button is-small is-light is-success button--addLot"' +
|
||||||
' data-lot-id="' +
|
' data-lot-id="' +
|
||||||
lotOccupancy.lotId +
|
lotOccupancy.lotId.toString() +
|
||||||
'"' +
|
'"' +
|
||||||
' data-tooltip="Add ' +
|
' data-tooltip="Add ' +
|
||||||
los.escapedAliases.Lot +
|
los.escapedAliases.Lot +
|
||||||
|
|
@ -310,11 +317,13 @@ function openEditLotStatus(clickEvent: Event): void {
|
||||||
cityssm.postJSON(
|
cityssm.postJSON(
|
||||||
los.urlPrefix + '/workOrders/doUpdateLotStatus',
|
los.urlPrefix + '/workOrders/doUpdateLotStatus',
|
||||||
submitEvent.currentTarget,
|
submitEvent.currentTarget,
|
||||||
(responseJSON: {
|
(rawResponseJSON) => {
|
||||||
success: boolean
|
const responseJSON = rawResponseJSON as {
|
||||||
errorMessage?: string
|
success: boolean
|
||||||
workOrderLots?: recordTypes.Lot[]
|
errorMessage?: string
|
||||||
}) => {
|
workOrderLots?: recordTypes.Lot[]
|
||||||
|
}
|
||||||
|
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLots = responseJSON.workOrderLots!
|
workOrderLots = responseJSON.workOrderLots!
|
||||||
renderRelatedLotsAndOccupancies()
|
renderRelatedLotsAndOccupancies()
|
||||||
|
|
@ -407,11 +416,13 @@ function deleteLot(clickEvent: Event): void {
|
||||||
workOrderId,
|
workOrderId,
|
||||||
lotId
|
lotId
|
||||||
},
|
},
|
||||||
(responseJSON: {
|
(rawResponseJSON) => {
|
||||||
success: boolean
|
const responseJSON = rawResponseJSON as {
|
||||||
errorMessage?: string
|
success: boolean
|
||||||
workOrderLots?: recordTypes.Lot[]
|
errorMessage?: string
|
||||||
}) => {
|
workOrderLots?: recordTypes.Lot[]
|
||||||
|
}
|
||||||
|
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
workOrderLots = responseJSON.workOrderLots!
|
workOrderLots = responseJSON.workOrderLots!
|
||||||
renderRelatedLotsAndOccupancies()
|
renderRelatedLotsAndOccupancies()
|
||||||
|
|
@ -481,21 +492,21 @@ function renderRelatedLots(): void {
|
||||||
cityssm.escapeHTML(lot.lotName ?? '') +
|
cityssm.escapeHTML(lot.lotName ?? '') +
|
||||||
'</a>' +
|
'</a>' +
|
||||||
'</td>' +
|
'</td>' +
|
||||||
('<td>' + cityssm.escapeHTML(lot.mapName ?? '') + '</td>') +
|
`<td>${cityssm.escapeHTML(lot.mapName ?? '')}</td>` +
|
||||||
('<td>' + cityssm.escapeHTML(lot.lotType ?? '') + '</td>') +
|
`<td>${cityssm.escapeHTML(lot.lotType ?? '')}</td>` +
|
||||||
('<td>' +
|
('<td>' +
|
||||||
(lot.lotStatusId
|
(lot.lotStatusId
|
||||||
? cityssm.escapeHTML(lot.lotStatus ?? '')
|
? cityssm.escapeHTML(lot.lotStatus ?? '')
|
||||||
: '<span class="has-text-grey">(No Status)</span>') +
|
: '<span class="has-text-grey">(No Status)</span>') +
|
||||||
'</td>') +
|
'</td>') +
|
||||||
('<td class="is-nowrap">' +
|
`<td class="is-nowrap">
|
||||||
'<button class="button is-small is-light is-info button--editLotStatus" data-tooltip="Update Status" type="button">' +
|
<button class="button is-small is-light is-info button--editLotStatus" data-tooltip="Update Status" type="button">
|
||||||
'<i class="fas fa-pencil-alt" aria-hidden="true"></i>' +
|
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
|
||||||
'</button>' +
|
</button>
|
||||||
' <button class="button is-small is-light is-danger button--deleteLot" data-tooltip="Delete Relationship" type="button">' +
|
<button class="button is-small is-light is-danger button--deleteLot" data-tooltip="Delete Relationship" type="button">
|
||||||
'<i class="fas fa-trash" aria-hidden="true"></i>' +
|
<i class="fas fa-trash" aria-hidden="true"></i>
|
||||||
'</button>' +
|
</button>
|
||||||
'</td>')
|
</td>`
|
||||||
|
|
||||||
rowElement
|
rowElement
|
||||||
.querySelector('.button--editLotStatus')!
|
.querySelector('.button--editLotStatus')!
|
||||||
|
|
@ -545,7 +556,11 @@ document
|
||||||
cityssm.postJSON(
|
cityssm.postJSON(
|
||||||
los.urlPrefix + '/lotOccupancies/doSearchLotOccupancies',
|
los.urlPrefix + '/lotOccupancies/doSearchLotOccupancies',
|
||||||
searchFormElement,
|
searchFormElement,
|
||||||
(responseJSON: { lotOccupancies: recordTypes.LotOccupancy[] }) => {
|
(rawResponseJSON) => {
|
||||||
|
const responseJSON = rawResponseJSON as {
|
||||||
|
lotOccupancies: recordTypes.LotOccupancy[]
|
||||||
|
}
|
||||||
|
|
||||||
if (responseJSON.lotOccupancies.length === 0) {
|
if (responseJSON.lotOccupancies.length === 0) {
|
||||||
searchResultsContainerElement.innerHTML = `<div class="message is-info">
|
searchResultsContainerElement.innerHTML = `<div class="message is-info">
|
||||||
<p class="message-body">There are no records that meet the search criteria.</p>
|
<p class="message-body">There are no records that meet the search criteria.</p>
|
||||||
|
|
@ -572,15 +587,14 @@ document
|
||||||
rowElement.dataset.lotOccupancyId =
|
rowElement.dataset.lotOccupancyId =
|
||||||
lotOccupancy.lotOccupancyId!.toString()
|
lotOccupancy.lotOccupancyId!.toString()
|
||||||
|
|
||||||
rowElement.innerHTML =
|
rowElement.innerHTML = `<td class="has-text-centered">
|
||||||
'<td class="has-text-centered">' +
|
<button class="button is-small is-success button--addLotOccupancy" data-tooltip="Add" type="button" aria-label="Add">
|
||||||
'<button class="button is-small is-success button--addLotOccupancy" data-tooltip="Add" type="button" aria-label="Add">' +
|
<i class="fas fa-plus" aria-hidden="true"></i>
|
||||||
'<i class="fas fa-plus" aria-hidden="true"></i>' +
|
</button>
|
||||||
'</button>' +
|
</td>
|
||||||
'</td>' +
|
<td class="has-text-weight-bold">
|
||||||
('<td class="has-text-weight-bold">' +
|
${cityssm.escapeHTML(lotOccupancy.occupancyType ?? '')}
|
||||||
cityssm.escapeHTML(lotOccupancy.occupancyType ?? '') +
|
</td>`
|
||||||
'</td>')
|
|
||||||
|
|
||||||
if (lotOccupancy.lotId) {
|
if (lotOccupancy.lotId) {
|
||||||
rowElement.insertAdjacentHTML(
|
rowElement.insertAdjacentHTML(
|
||||||
|
|
@ -715,7 +729,9 @@ document.querySelector('#button--addLot')?.addEventListener('click', () => {
|
||||||
cityssm.postJSON(
|
cityssm.postJSON(
|
||||||
los.urlPrefix + '/lots/doSearchLots',
|
los.urlPrefix + '/lots/doSearchLots',
|
||||||
searchFormElement,
|
searchFormElement,
|
||||||
(responseJSON: { lots: recordTypes.Lot[] }) => {
|
(rawResponseJSON) => {
|
||||||
|
const responseJSON = rawResponseJSON as { lots: recordTypes.Lot[] }
|
||||||
|
|
||||||
if (responseJSON.lots.length === 0) {
|
if (responseJSON.lots.length === 0) {
|
||||||
searchResultsContainerElement.innerHTML =
|
searchResultsContainerElement.innerHTML =
|
||||||
'<div class="message is-info">' +
|
'<div class="message is-info">' +
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -4,26 +4,26 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="<%= urlPrefix %>/dashboard">Home</a></li>
|
<li><a href="<%= urlPrefix %>/dashboard">Home</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= urlPrefix %>/lots">
|
<a href="<%= urlPrefix %>/lots">
|
||||||
<span class="icon is-small"><i class="fas fa-vector-square" aria-hidden="true"></i></span>
|
<span class="icon is-small"><i class="fas fa-vector-square" aria-hidden="true"></i></span>
|
||||||
<span><%= configFunctions.getProperty("aliases.lots") %></span>
|
<span><%= configFunctions.getProperty("aliases.lots") %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<% if (!isCreate) { %>
|
<% if (!isCreate) { %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= urlPrefix %>/lots/<%= lot.lotId %>" accesskey="v">
|
<a href="<%= urlPrefix %>/lots/<%= lot.lotId %>" accesskey="v">
|
||||||
<%= lot.lotName %>
|
<%= lot.lotName %>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<li class="is-active">
|
<li class="is-active">
|
||||||
<a href="#" aria-current="page">
|
<a href="#" aria-current="page">
|
||||||
<% if (isCreate) { %>
|
<% if (isCreate) { %>
|
||||||
Create a New <%= configFunctions.getProperty("aliases.lot") %>
|
Create a New <%= configFunctions.getProperty("aliases.lot") %>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
Update <%= configFunctions.getProperty("aliases.lot") %>
|
Update <%= configFunctions.getProperty("aliases.lot") %>
|
||||||
<% } %>
|
<% } %>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
@ -49,20 +49,20 @@
|
||||||
<div class="level-item">
|
<div class="level-item">
|
||||||
<div class="dropdown is-right is-up">
|
<div class="dropdown is-right is-up">
|
||||||
<div class="dropdown-trigger">
|
<div class="dropdown-trigger">
|
||||||
<button class="button" type="button">
|
<button class="button" type="button">
|
||||||
<span>More Options</span>
|
<span>More Options</span>
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i class="fas fa-angle-up" aria-hidden="true"></i>
|
<i class="fas fa-angle-up" aria-hidden="true"></i>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a class="dropdown-item" id="button--deleteLot" href="#">
|
<a class="dropdown-item" id="button--deleteLot" href="#">
|
||||||
<span class="icon is-small"><i class="fas fa-trash has-text-danger" aria-hidden="true"></i></span>
|
<span class="icon is-small"><i class="fas fa-trash has-text-danger" aria-hidden="true"></i></span>
|
||||||
<span>Delete <%= configFunctions.getProperty("aliases.lot") %></span>
|
<span>Delete <%= configFunctions.getProperty("aliases.lot") %></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -71,8 +71,8 @@
|
||||||
<button class="button is-primary" type="submit" form="form--lot">
|
<button class="button is-primary" type="submit" form="form--lot">
|
||||||
<span class="icon is-small"><i class="fas fa-save" aria-hidden="true"></i></span>
|
<span class="icon is-small"><i class="fas fa-save" aria-hidden="true"></i></span>
|
||||||
<span>
|
<span>
|
||||||
<%= (isCreate ? "Create" : "Update") %>
|
<%= (isCreate ? "Create" : "Update") %>
|
||||||
<%= configFunctions.getProperty("aliases.lot") %>
|
<%= configFunctions.getProperty("aliases.lot") %>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -81,265 +81,263 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="form--lot">
|
<form id="form--lot">
|
||||||
<input id="lot--lotId" name="lotId" type="hidden" value="<%= isCreate ? "" : lot.lotId %>" />
|
<input id="lot--lotId" name="lotId" type="hidden" value="<%= isCreate ? "" : lot.lotId %>" />
|
||||||
|
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-block is-block">
|
<div class="panel-block is-block">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="lot--lotName">
|
<label class="label" for="lot--lotName">
|
||||||
<%= configFunctions.getProperty("aliases.lot") %> Name
|
<%= configFunctions.getProperty("aliases.lot") %> Name
|
||||||
</label>
|
</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input class="input" id="lot--lotName" name="lotName" value="<%= lot.lotName %>"
|
<input class="input" id="lot--lotName" name="lotName" value="<%= lot.lotName %>"
|
||||||
<% if (configFunctions.getProperty("settings.lot.lotNamePattern")) { %>
|
<% if (configFunctions.getProperty("settings.lot.lotNamePattern")) { %>
|
||||||
pattern="<%= configFunctions.getProperty("settings.lot.lotNamePattern").source %>"
|
pattern="<%= configFunctions.getProperty("settings.lot.lotNamePattern").source %>"
|
||||||
<% } %>
|
<% } %>
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
required
|
required
|
||||||
accesskey="f"
|
accesskey="f"
|
||||||
<%= (isCreate ? " autofocus" : "") %> />
|
<%= (isCreate ? " autofocus" : "") %> />
|
||||||
</div>
|
</div>
|
||||||
<% if (configFunctions.getProperty("settings.lot.lotNameHelpText")) { %>
|
<% if (configFunctions.getProperty("settings.lot.lotNameHelpText")) { %>
|
||||||
<p class="help">
|
<p class="help">
|
||||||
<%- configFunctions.getProperty("settings.lot.lotNameHelpText").replace(/\n/g, "<br />") %>
|
<%- configFunctions.getProperty("settings.lot.lotNameHelpText").replace(/\n/g, "<br />") %>
|
||||||
</p>
|
</p>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<label class="label" for="lot--lotTypeId">
|
||||||
|
<%= configFunctions.getProperty("aliases.lot") %> Type
|
||||||
|
</label>
|
||||||
|
<div class="field has-addons">
|
||||||
|
<div class="control is-expanded">
|
||||||
|
<div class="select is-fullwidth">
|
||||||
|
<select
|
||||||
|
<% if (!isCreate) { %>
|
||||||
|
class="is-readonly"
|
||||||
|
<% } %>
|
||||||
|
id="lot--lotTypeId" name="lotTypeId" required>
|
||||||
|
<% if (isCreate) { %>
|
||||||
|
<option value="">(No Type)</option>
|
||||||
|
<% } %>
|
||||||
|
<% let typeIsFound = false; %>
|
||||||
|
<% for (const lotType of lotTypes) { %>
|
||||||
|
<%
|
||||||
|
if (lot.lotTypeId === lotType.lotTypeId) {
|
||||||
|
typeIsFound = true;
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<option value="<%= lotType.lotTypeId %>"
|
||||||
|
<%= (lot.lotTypeId === lotType.lotTypeId ? " selected" : "") %>
|
||||||
|
<%= (!isCreate && lot.lotTypeId !== lotType.lotTypeId ? " disabled" : "") %>>
|
||||||
|
<%= lotType.lotType %>
|
||||||
|
</option>
|
||||||
|
<% } %>
|
||||||
|
<% if (lot.lotTypeId && !typeIsFound) { %>
|
||||||
|
<option value="<%= lot.lotTypeId %>" selected>
|
||||||
|
<%= lot.lotType %>
|
||||||
|
</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>
|
||||||
|
<label class="label" for="lot--lotStatusId">
|
||||||
|
<%= configFunctions.getProperty("aliases.lot") %> Status
|
||||||
|
</label>
|
||||||
|
<div class="field">
|
||||||
|
<div class="control">
|
||||||
|
<div class="select is-fullwidth">
|
||||||
|
<select id="lot--lotStatusId" name="lotStatusId">
|
||||||
|
<option value="">(No Status)</option>
|
||||||
|
<% let statusIsFound = false; %>
|
||||||
|
<% for (const lotStatus of lotStatuses) { %>
|
||||||
|
<%
|
||||||
|
if (lot.lotStatusId === lotStatus.lotStatusId) {
|
||||||
|
statusIsFound = true;
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<option value="<%= lotStatus.lotStatusId %>"
|
||||||
|
<%= (lot.lotStatusId === lotStatus.lotStatusId ? " selected" : "") %>>
|
||||||
|
<%= lotStatus.lotStatus %>
|
||||||
|
</option>
|
||||||
|
<% } %>
|
||||||
|
<% if (lot.lotStatusId && !statusIsFound) { %>
|
||||||
|
<option value="<%= lot.lotStatusId %>" selected>
|
||||||
|
<%= lot.lotStatus %>
|
||||||
|
</option>
|
||||||
|
<% } %>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<div id="container--lotFields">
|
||||||
|
<% if (isCreate) { %>
|
||||||
|
<div class="message is-info">
|
||||||
|
<p class="message-body">
|
||||||
|
Select the <%= configFunctions.getProperty("aliases.lot").toLowerCase() %> type to load the available fields.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<% } else if (lot.lotFields.length === 0) { %>
|
||||||
|
<div class="message is-info">
|
||||||
|
<p class="message-body">
|
||||||
|
The current <%= configFunctions.getProperty("aliases.lot").toLowerCase() %> type has no additional fields.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<% } else { %>
|
||||||
|
<% let lotTypeFieldIds = ""; %>
|
||||||
|
<% for (const lotField of lot.lotFields) { %>
|
||||||
|
<% lotTypeFieldIds += "," + lotField.lotTypeFieldId; %>
|
||||||
|
<div class="field">
|
||||||
|
<label class="label" for="lot--lotFieldValue_<%= lotField.lotTypeFieldId %>">
|
||||||
|
<%= lotField.lotTypeField %>
|
||||||
|
</label>
|
||||||
|
<div class="control">
|
||||||
|
<% if (!lotField.lotTypeFieldValues || lotField.lotTypeFieldValues === "") { %>
|
||||||
|
<input class="input"
|
||||||
|
id="lot--lotFieldValue_<%= lotField.lotTypeFieldId %>"
|
||||||
|
name="lotFieldValue_<%= lotField.lotTypeFieldId %>"
|
||||||
|
type="text"
|
||||||
|
value="<%= lotField.lotFieldValue %>"
|
||||||
|
<% if (lotField.pattern !== "") { %>
|
||||||
|
pattern="<%= lotField.pattern %>"
|
||||||
|
<% } %>
|
||||||
|
minlength="<%= lotField.minimumLength %>"
|
||||||
|
maxlength="<%= lotField.maximumLength %>"
|
||||||
|
<%= lotField.isRequired ? " required" : "" %> />
|
||||||
|
<% } else { %>
|
||||||
|
<%
|
||||||
|
const fieldValues = lotField.lotTypeFieldValues.split("\n");
|
||||||
|
let valueFound = false;
|
||||||
|
%>
|
||||||
|
<div class="select is-fullwidth">
|
||||||
|
<select id="lot--lotFieldValue_<%= lotField.lotTypeFieldId %>"
|
||||||
|
name="lotFieldValue_<%= lotField.lotTypeFieldId %>">
|
||||||
|
<% if (!lotField.isRequired || lotField.lotFieldValue === "") { %>
|
||||||
|
<option value="">(Not Set)</option>
|
||||||
|
<% } %>
|
||||||
|
<% for (const fieldValue of fieldValues) { %>
|
||||||
|
<%
|
||||||
|
if (fieldValue === lotField.lotFieldValue) {
|
||||||
|
valueFound = true;
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<option value="<%= fieldValue %>"
|
||||||
|
<%= (fieldValue === lotField.lotFieldValue ? " selected" : "") %>>
|
||||||
|
<%= fieldValue %>
|
||||||
|
</option>
|
||||||
|
<% } %>
|
||||||
|
<% if (!valueFound && lotField.lotFieldValue !== "") { %>
|
||||||
|
<option value="<%= lotField.lotFieldValue %>" selected>
|
||||||
|
<%= lotField.lotFieldValue %>
|
||||||
|
</option>
|
||||||
|
<% } %>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
<input id="lot--lotTypeFieldIds" name="lotTypeFieldIds" type="hidden" value="<%= lotTypeFieldIds.slice(1) %>" />
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</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>
|
</div>
|
||||||
<div class="column">
|
<div class="field">
|
||||||
<label class="label" for="lot--lotTypeId">
|
<label class="label" for="lot--lotLongitude">Longitude</label>
|
||||||
<%= configFunctions.getProperty("aliases.lot") %> Type
|
<div class="control">
|
||||||
</label>
|
<input class="input" id="lot--lotLongitude" name="lotLongitude" type="number" min="-180" max="180" step="0.00000001" value="<%= lot.lotLongitude %>" onwheel="return false" />
|
||||||
<div class="field has-addons">
|
|
||||||
<div class="control is-expanded">
|
|
||||||
<div class="select is-fullwidth">
|
|
||||||
<select
|
|
||||||
<% if (!isCreate) { %>
|
|
||||||
class="is-readonly"
|
|
||||||
<% } %>
|
|
||||||
id="lot--lotTypeId" name="lotTypeId" required>
|
|
||||||
<% if (isCreate) { %>
|
|
||||||
<option value="">(No Type)</option>
|
|
||||||
<% } %>
|
|
||||||
<% let typeIsFound = false; %>
|
|
||||||
<% for (const lotType of lotTypes) { %>
|
|
||||||
<%
|
|
||||||
if (lot.lotTypeId === lotType.lotTypeId) {
|
|
||||||
typeIsFound = true;
|
|
||||||
}
|
|
||||||
%>
|
|
||||||
<option value="<%= lotType.lotTypeId %>"
|
|
||||||
<%= (lot.lotTypeId === lotType.lotTypeId ? " selected" : "") %>
|
|
||||||
<%= (!isCreate && lot.lotTypeId !== lotType.lotTypeId ? " disabled" : "") %>>
|
|
||||||
<%= lotType.lotType %>
|
|
||||||
</option>
|
|
||||||
<% } %>
|
|
||||||
<% if (lot.lotTypeId && !typeIsFound) { %>
|
|
||||||
<option value="<%= lot.lotTypeId %>" selected>
|
|
||||||
<%= lot.lotType %>
|
|
||||||
</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>
|
|
||||||
<label class="label" for="lot--lotStatusId">
|
|
||||||
<%= configFunctions.getProperty("aliases.lot") %> Status
|
|
||||||
</label>
|
|
||||||
<div class="field">
|
|
||||||
<div class="control">
|
|
||||||
<div class="select is-fullwidth">
|
|
||||||
<select id="lot--lotStatusId" name="lotStatusId">
|
|
||||||
<option value="">(No Status)</option>
|
|
||||||
<% let statusIsFound = false; %>
|
|
||||||
<% for (const lotStatus of lotStatuses) { %>
|
|
||||||
<%
|
|
||||||
if (lot.lotStatusId === lotStatus.lotStatusId) {
|
|
||||||
statusIsFound = true;
|
|
||||||
}
|
|
||||||
%>
|
|
||||||
<option value="<%= lotStatus.lotStatusId %>"
|
|
||||||
<%= (lot.lotStatusId === lotStatus.lotStatusId ? " selected" : "") %>>
|
|
||||||
<%= lotStatus.lotStatus %>
|
|
||||||
</option>
|
|
||||||
<% } %>
|
|
||||||
<% if (lot.lotStatusId && !statusIsFound) { %>
|
|
||||||
<option value="<%= lot.lotStatusId %>" selected>
|
|
||||||
<%= lot.lotStatus %>
|
|
||||||
</option>
|
|
||||||
<% } %>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="column">
|
|
||||||
<div id="container--lotFields">
|
|
||||||
<% if (isCreate) { %>
|
|
||||||
<div class="message is-info">
|
|
||||||
<p class="message-body">
|
|
||||||
Select the <%= configFunctions.getProperty("aliases.lot").toLowerCase() %> type to load the available fields.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<% } else if (lot.lotFields.length === 0) { %>
|
|
||||||
<div class="message is-info">
|
|
||||||
<p class="message-body">
|
|
||||||
The current <%= configFunctions.getProperty("aliases.lot").toLowerCase() %> type has no additional fields.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<% } else { %>
|
|
||||||
<% let lotTypeFieldIds = ""; %>
|
|
||||||
<% for (const lotField of lot.lotFields) { %>
|
|
||||||
<% lotTypeFieldIds += "," + lotField.lotTypeFieldId; %>
|
|
||||||
<div class="field">
|
|
||||||
<label class="label" for="lot--lotFieldValue_<%= lotField.lotTypeFieldId %>">
|
|
||||||
<%= lotField.lotTypeField %>
|
|
||||||
</label>
|
|
||||||
<div class="control">
|
|
||||||
<% if (!lotField.lotTypeFieldValues || lotField.lotTypeFieldValues === "") { %>
|
|
||||||
<input class="input"
|
|
||||||
id="lot--lotFieldValue_<%= lotField.lotTypeFieldId %>"
|
|
||||||
name="lotFieldValue_<%= lotField.lotTypeFieldId %>"
|
|
||||||
type="text"
|
|
||||||
value="<%= lotField.lotFieldValue %>"
|
|
||||||
<% if (lotField.pattern !== "") { %>
|
|
||||||
pattern="<%= lotField.pattern %>"
|
|
||||||
<% } %>
|
|
||||||
minlength="<%= lotField.minimumLength %>"
|
|
||||||
maxlength="<%= lotField.maximumLength %>"
|
|
||||||
<%= lotField.isRequired ? " required" : "" %> />
|
|
||||||
<% } else { %>
|
|
||||||
<%
|
|
||||||
const fieldValues = lotField.lotTypeFieldValues.split("\n");
|
|
||||||
let valueFound = false;
|
|
||||||
%>
|
|
||||||
<div class="select is-fullwidth">
|
|
||||||
<select id="lot--lotFieldValue_<%= lotField.lotTypeFieldId %>"
|
|
||||||
name="lotFieldValue_<%= lotField.lotTypeFieldId %>">
|
|
||||||
<% if (!lotField.isRequired || lotField.lotFieldValue === "") { %>
|
|
||||||
<option value="">(Not Set)</option>
|
|
||||||
<% } %>
|
|
||||||
<% for (const fieldValue of fieldValues) { %>
|
|
||||||
<%
|
|
||||||
if (fieldValue === lotField.lotFieldValue) {
|
|
||||||
valueFound = true;
|
|
||||||
}
|
|
||||||
%>
|
|
||||||
<option value="<%= fieldValue %>"
|
|
||||||
<%= (fieldValue === lotField.lotFieldValue ? " selected" : "") %>>
|
|
||||||
<%= fieldValue %>
|
|
||||||
</option>
|
|
||||||
<% } %>
|
|
||||||
<% if (!valueFound && lotField.lotFieldValue !== "") { %>
|
|
||||||
<option value="<%= lotField.lotFieldValue %>" selected>
|
|
||||||
<%= lotField.lotFieldValue %>
|
|
||||||
</option>
|
|
||||||
<% } %>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% } %>
|
|
||||||
<input id="lot--lotTypeFieldIds" name="lotTypeFieldIds" type="hidden" value="<%= lotTypeFieldIds.slice(1) %>" />
|
|
||||||
<% } %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="column">
|
||||||
<div class="columns">
|
<div class="panel">
|
||||||
<div class="column">
|
<h2 class="panel-heading">Image</h2>
|
||||||
<div class="panel">
|
<div class="panel-block is-block">
|
||||||
<h2 class="panel-heading">Geographic Location</h2>
|
<label class="label" for="lot--mapId"><%= configFunctions.getProperty("aliases.map") %></label>
|
||||||
<div class="panel-block is-block">
|
<div class="field has-addons">
|
||||||
<div class="field">
|
<div class="control is-expanded">
|
||||||
<label class="label" for="lot--lotLatitude">Latitude</label>
|
<div class="select is-fullwidth">
|
||||||
<div class="control">
|
<select
|
||||||
<input class="input" id="lot--lotLatitude" name="lotLatitude" type="number" min="-90" max="90" step="0.00000001" value="<%= lot.lotLatitude %>" onwheel="return false" />
|
<% if (!isCreate) { %>
|
||||||
</div>
|
class="is-readonly"
|
||||||
</div>
|
<% } %>
|
||||||
<div class="field">
|
id="lot--mapId" name="mapId">
|
||||||
<label class="label" for="lot--lotLongitude">Longitude</label>
|
<option value="" <%= (!isCreate && lot.mapId ? " disabled" : "") %>>
|
||||||
<div class="control">
|
(No <%= configFunctions.getProperty("aliases.map") %> Selected)
|
||||||
<input class="input" id="lot--lotLongitude" name="lotLongitude" type="number" min="-180" max="180" step="0.00000001" value="<%= lot.lotLongitude %>" onwheel="return false" />
|
</option>
|
||||||
</div>
|
<% let mapIsFound = false; %>
|
||||||
</div>
|
<% for (const map of maps) { %>
|
||||||
</div>
|
<%
|
||||||
</div>
|
if (lot.mapId === map.mapId) {
|
||||||
</div>
|
mapIsFound = true;
|
||||||
<div class="column">
|
}
|
||||||
<div class="panel">
|
%>
|
||||||
<h2 class="panel-heading">Image</h2>
|
<option value="<%= map.mapId %>"
|
||||||
<div class="panel-block is-block">
|
<%= (lot.mapId === map.mapId ? " selected" : "") %>
|
||||||
<label class="label" for="lot--mapId"><%= configFunctions.getProperty("aliases.map") %></label>
|
<%= (!isCreate && lot.mapId !== map.mapId ? " disabled" : "") %>>
|
||||||
<div class="field has-addons">
|
<%= map.mapName || "(No Name)" %>
|
||||||
<div class="control is-expanded">
|
</option>
|
||||||
<div class="select is-fullwidth">
|
<% } %>
|
||||||
<select
|
<% if (lot.mapId && !mapIsFound) { %>
|
||||||
<% if (!isCreate) { %>
|
<option value="<%= lot.mapId %>" selected>
|
||||||
class="is-readonly"
|
<%= lot.mapName %>
|
||||||
<% } %>
|
</option>
|
||||||
id="lot--mapId" name="mapId">
|
<% } %>
|
||||||
<option value="" <%= (!isCreate && lot.mapId ? " disabled" : "") %>>
|
</select>
|
||||||
(No <%= configFunctions.getProperty("aliases.map") %> Selected)
|
</div>
|
||||||
</option>
|
</div>
|
||||||
<% let mapIsFound = false; %>
|
<div class="control">
|
||||||
<% for (const map of maps) { %>
|
<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>
|
||||||
if (lot.mapId === map.mapId) {
|
</button>
|
||||||
mapIsFound = true;
|
</div>
|
||||||
}
|
</div>
|
||||||
%>
|
|
||||||
<option value="<%= map.mapId %>"
|
<div class="field">
|
||||||
<%= (lot.mapId === map.mapId ? " selected" : "") %>
|
<label class="label" for="lot--mapKey">
|
||||||
<%= (!isCreate && lot.mapId !== map.mapId ? " disabled" : "") %>>
|
<%= configFunctions.getProperty("aliases.map") %> SVG ID
|
||||||
<%= map.mapName || "(No Name)" %>
|
</label>
|
||||||
</option>
|
<div class="control">
|
||||||
<% } %>
|
<input class="input" id="lot--mapKey" name="mapKey" value="<%= lot.mapKey %>" maxlength="100" pattern="^[\d\w-]*$" />
|
||||||
<% if (lot.mapId && !mapIsFound) { %>
|
</div>
|
||||||
<option value="<%= lot.mapId %>" selected>
|
<p class="help">
|
||||||
<%= lot.mapName %>
|
<a href="https://cityssm.github.io/lot-occupancy-system/docs/mapImages.html" target="_blank" rel="noreferrer">
|
||||||
</option>
|
<i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||||
<% } %>
|
What is the SVG ID?
|
||||||
</select>
|
</a>
|
||||||
</div>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
</div>
|
||||||
<button class="button is-unlock-field-button" data-tooltip="Unlock Field" type="button" aria-label="Unlock Field">
|
</div>
|
||||||
<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>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<% if (isCreate) { %>
|
<% if (isCreate) { %>
|
||||||
|
|
@ -350,26 +348,26 @@
|
||||||
</div>
|
</div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<div class="level is-mobile">
|
<div class="level is-mobile">
|
||||||
<div class="level-left">
|
<div class="level-left">
|
||||||
<div class="level-item">
|
<div class="level-item">
|
||||||
<h2 class="has-text-weight-bold is-size-5">
|
<h2 class="has-text-weight-bold is-size-5">
|
||||||
Comments
|
Comments
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-right">
|
<div class="level-right">
|
||||||
<div class="level-item">
|
<div class="level-item">
|
||||||
<button class="button is-small is-success" id="lotComments--add" type="button">
|
<button class="button is-small is-success" id="lotComments--add" type="button">
|
||||||
<span class="icon is-small"><i class="fas fa-plus" aria-hidden="true"></i></span>
|
<span class="icon is-small"><i class="fas fa-plus" aria-hidden="true"></i></span>
|
||||||
<span>Add a Comment</span>
|
<span>Add a Comment</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-block is-block" id="container--lotComments"></div>
|
<div class="panel-block is-block" id="container--lotComments"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
|
|
@ -395,44 +393,50 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-block is-block">
|
<div class="panel-block is-block">
|
||||||
<% if (lot.lotOccupancies.length === 0) { %>
|
<% if (lot.lotOccupancies.length === 0) { %>
|
||||||
<div class="message is-info">
|
<div class="message is-info">
|
||||||
<p class="message-body">There are no <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> records asscociated with this <%= configFunctions.getProperty("aliases.lot") %>.</p>
|
<p class="message-body">
|
||||||
</div>
|
There are no <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> records
|
||||||
|
asscociated with this <%= configFunctions.getProperty("aliases.lot") %>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<table class="table is-fullwidth is-striped is-hoverable">
|
<table class="table is-fullwidth is-striped is-hoverable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="has-width-10"> </th>
|
<th class="has-width-10"> </th>
|
||||||
<th><%= configFunctions.getProperty("aliases.occupancy") %> Type</th>
|
<th><%= configFunctions.getProperty("aliases.occupancy") %> Type</th>
|
||||||
<th><%= configFunctions.getProperty("aliases.occupancyStartDate") %></th>
|
<th><%= configFunctions.getProperty("aliases.occupancyStartDate") %></th>
|
||||||
<th>End Date</th>
|
<th>End Date</th>
|
||||||
<th><%= configFunctions.getProperty("aliases.occupants") %></th>
|
<th><%= configFunctions.getProperty("aliases.occupants") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% const currentDate = dateTimeFunctions.dateToInteger(new Date()); %>
|
<% const currentDate = dateTimeFunctions.dateToInteger(new Date()); %>
|
||||||
<% for (const lotOccupancy of lot.lotOccupancies) { %>
|
<% for (const lotOccupancy of lot.lotOccupancies) { %>
|
||||||
<% const isActive = !(lotOccupancy.occupancyEndDate && lotOccupancy.occupancyEndDate < currentDate); %>
|
<% const isActive = !(lotOccupancy.occupancyEndDate && lotOccupancy.occupancyEndDate < currentDate); %>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="has-text-centered">
|
<td class="has-text-centered">
|
||||||
<% if (isActive) { %>
|
<% if (isActive) { %>
|
||||||
<i class="fas fa-play" title="Current <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
<i class="fas fa-play" title="Current <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<i class="fas fa-stop" title="Previous <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
<i class="fas fa-stop" title="Previous <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
||||||
<% } %>
|
<% } %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="has-text-weight-bold" href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>">
|
<a class="has-text-weight-bold" href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>">
|
||||||
<%= lotOccupancy.occupancyType %>
|
<%= lotOccupancy.occupancyType %>
|
||||||
</a>
|
</a><br />
|
||||||
|
<span class="is-size-7">
|
||||||
|
#<%= lotOccupancy.lotOccupancyId %>
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td><%= lotOccupancy.occupancyStartDateString %></td>
|
<td><%= lotOccupancy.occupancyStartDateString %></td>
|
||||||
<td>
|
<td>
|
||||||
<% if (lotOccupancy.occupancyEndDate) { %>
|
<% if (lotOccupancy.occupancyEndDate) { %>
|
||||||
<%= lotOccupancy.occupancyEndDateString %>
|
<%= lotOccupancy.occupancyEndDateString %>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<span class="has-text-grey">(No End Date)</span>
|
<span class="has-text-grey">(No End Date)</span>
|
||||||
<% } %>
|
<% } %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>
|
<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>
|
||||||
|
|
@ -447,9 +451,9 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% } %>
|
<% } %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -30,29 +30,29 @@
|
||||||
<div class="level-right">
|
<div class="level-right">
|
||||||
<div class="level-item">
|
<div class="level-item">
|
||||||
<a class="button is-link is-outlined has-tooltip-left"
|
<a class="button is-link is-outlined has-tooltip-left"
|
||||||
data-tooltip="Previous <%= configFunctions.getProperty("aliases.lot") %>"
|
data-tooltip="Previous <%= configFunctions.getProperty("aliases.lot") %>"
|
||||||
href="<%= urlPrefix %>/lots/<%= lot.lotId %>/previous"
|
href="<%= urlPrefix %>/lots/<%= lot.lotId %>/previous"
|
||||||
accesskey=",">
|
accesskey=",">
|
||||||
<i class="fas fa-arrow-left" aria-hidden="true"></i>
|
<i class="fas fa-arrow-left" aria-hidden="true"></i>
|
||||||
<span class="sr-only">Previous <%= configFunctions.getProperty("aliases.lot") %></span>
|
<span class="sr-only">Previous <%= configFunctions.getProperty("aliases.lot") %></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="level-item">
|
<div class="level-item">
|
||||||
<a class="button is-link has-tooltip-left"
|
<a class="button is-link has-tooltip-left"
|
||||||
data-tooltip="Next <%= configFunctions.getProperty("aliases.lot") %>"
|
data-tooltip="Next <%= configFunctions.getProperty("aliases.lot") %>"
|
||||||
href="<%= urlPrefix %>/lots/<%= lot.lotId %>/next"
|
href="<%= urlPrefix %>/lots/<%= lot.lotId %>/next"
|
||||||
accesskey=".">
|
accesskey=".">
|
||||||
<span>Next</span>
|
<span>Next</span>
|
||||||
<span class="icon"><i class="fas fa-arrow-right" aria-hidden="true"></i></span>
|
<span class="icon"><i class="fas fa-arrow-right" aria-hidden="true"></i></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<% if (user.userProperties.canUpdate) { %>
|
<% if (user.userProperties.canUpdate) { %>
|
||||||
<div class="level-item">
|
<div class="level-item">
|
||||||
<a class="button is-primary"
|
<a class="button is-primary"
|
||||||
href="<%= urlPrefix %>/lots/<%= lot.lotId %>/edit"
|
href="<%= urlPrefix %>/lots/<%= lot.lotId %>/edit"
|
||||||
accesskey="e">
|
accesskey="e">
|
||||||
<span class="icon"><i class="fas fa-pencil-alt" aria-hidden="true"></i></span>
|
<span class="icon"><i class="fas fa-pencil-alt" aria-hidden="true"></i></span>
|
||||||
<span>Switch to Edit Mode</span>
|
<span>Switch to Edit Mode</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
@ -60,155 +60,158 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
<div class="column">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="panel-block is-block">
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column">
|
||||||
|
<p class="mb-2">
|
||||||
|
<strong><%= configFunctions.getProperty("aliases.map") %></strong><br />
|
||||||
|
<a href="<%= urlPrefix %>/maps/<%= lot.mapId %>">
|
||||||
|
<%= lot.mapName || "(No Name)" %>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p class="mb-2">
|
||||||
|
<strong><%= configFunctions.getProperty("aliases.lot") %> Type</strong><br />
|
||||||
|
<%= lot.lotType %>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<strong>Status</strong><br />
|
||||||
|
<%= lot.lotStatus %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<% if (lot.lotFields.length > 0) { %>
|
||||||
|
<div class="column">
|
||||||
|
<% for (const lotField of lot.lotFields) { %>
|
||||||
|
<p class="mb-2">
|
||||||
|
<strong><%= lotField.lotTypeField %></strong><br />
|
||||||
|
<% if (lotField.lotFieldValue) { %>
|
||||||
|
<%= lotField.lotFieldValue %>
|
||||||
|
<% } else { %>
|
||||||
|
<span class="has-text-grey">(No Value)</span>
|
||||||
|
<% } %>
|
||||||
|
</p>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% if (lot.mapSVG) { %>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-block is-block">
|
<h2 class="panel-heading">Image</h2>
|
||||||
<div class="columns">
|
<div class="panel-block is-block">
|
||||||
<div class="column">
|
<% const imageURL = urlPrefix + "/images/maps/" + lot.mapSVG %>
|
||||||
<p class="mb-2">
|
<div class="image" id="lot--map" data-map-key="<%= lot.mapKey %>">
|
||||||
<strong><%= configFunctions.getProperty("aliases.map") %></strong><br />
|
<%- include('../public/images/maps/' + lot.mapSVG); -%>
|
||||||
<a href="<%= urlPrefix %>/maps/<%= lot.mapId %>">
|
</div>
|
||||||
<%= lot.mapName || "(No Name)" %>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
</p>
|
|
||||||
<p class="mb-2">
|
|
||||||
<strong><%= configFunctions.getProperty("aliases.lot") %> Type</strong><br />
|
|
||||||
<%= lot.lotType %>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<strong>Status</strong><br />
|
|
||||||
<%= lot.lotStatus %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<% if (lot.lotFields.length > 0) { %>
|
|
||||||
<div class="column">
|
|
||||||
<% for (const lotField of lot.lotFields) { %>
|
|
||||||
<p class="mb-2">
|
|
||||||
<strong><%= lotField.lotTypeField %></strong><br />
|
|
||||||
<% if (lotField.lotFieldValue) { %>
|
|
||||||
<%= lotField.lotFieldValue %>
|
|
||||||
<% } else { %>
|
|
||||||
<span class="has-text-grey">(No Value)</span>
|
|
||||||
<% } %>
|
|
||||||
</p>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<% if (lot.mapSVG) { %>
|
<% } %>
|
||||||
<div class="column">
|
|
||||||
<div class="panel">
|
|
||||||
<h2 class="panel-heading">Image</h2>
|
|
||||||
<div class="panel-block is-block">
|
|
||||||
<% const imageURL = urlPrefix + "/images/maps/" + lot.mapSVG %>
|
|
||||||
<div class="image" id="lot--map" data-map-key="<%= lot.mapKey %>">
|
|
||||||
<%- include('../public/images/maps/' + lot.mapSVG); -%>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<% if (lot.lotComments.length > 0) { %>
|
<% if (lot.lotComments.length > 0) { %>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<h2 class="panel-heading">Comments</h2>
|
<h2 class="panel-heading">Comments</h2>
|
||||||
<div class="panel-block is-block">
|
<div class="panel-block is-block">
|
||||||
<table class="table is-fullwidth is-striped is-hoverable">
|
<table class="table is-fullwidth is-striped is-hoverable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Commentor</th>
|
<th>Commentor</th>
|
||||||
<th>Comment Date</th>
|
<th>Comment Date</th>
|
||||||
<th>Comment</th>
|
<th>Comment</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% for (const lotComment of lot.lotComments) { %>
|
<% for (const lotComment of lot.lotComments) { %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= lotComment.recordCreate_userName %></td>
|
<td><%= lotComment.recordCreate_userName %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= lotComment.lotCommentDateString %>
|
<%= lotComment.lotCommentDateString %>
|
||||||
<%= (lotComment.lotCommentTime === 0 ? "" : lotComment.lotCommentTimeString) %>
|
<%= (lotComment.lotCommentTime === 0 ? "" : lotComment.lotCommentTimeString) %>
|
||||||
</td>
|
</td>
|
||||||
<td><%= lotComment.lotComment %></td>
|
<td><%= lotComment.lotComment %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% } %>
|
<% } %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<h2 class="panel-heading">
|
<h2 class="panel-heading">
|
||||||
<%= configFunctions.getProperty("aliases.occupancies") %>
|
<%= configFunctions.getProperty("aliases.occupancies") %>
|
||||||
<span class="tag"><%= lot.lotOccupancies.length %></span>
|
<span class="tag"><%= lot.lotOccupancies.length %></span>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="panel-block is-block">
|
<div class="panel-block is-block">
|
||||||
<% if (lot.lotOccupancies.length === 0) { %>
|
<% if (lot.lotOccupancies.length === 0) { %>
|
||||||
<div class="message is-info">
|
<div class="message is-info">
|
||||||
<p class="message-body">There are no occupancy records asscociated with this
|
<p class="message-body">
|
||||||
<%= configFunctions.getProperty("aliases.lot") %>.</p>
|
There are no occupancy records asscociated with this
|
||||||
</div>
|
<%= configFunctions.getProperty("aliases.lot") %>.
|
||||||
<% } else { %>
|
</p>
|
||||||
<table class="table is-fullwidth is-striped is-hoverable">
|
</div>
|
||||||
<thead>
|
<% } else { %>
|
||||||
<tr>
|
<table class="table is-fullwidth is-striped is-hoverable">
|
||||||
<th class="has-width-10"> </th>
|
<thead>
|
||||||
<th><%= configFunctions.getProperty("aliases.occupancy") %> Type</th>
|
<tr>
|
||||||
<th><%= configFunctions.getProperty("aliases.occupancyStartDate") %></th>
|
<th class="has-width-10"> </th>
|
||||||
<th>End Date</th>
|
<th><%= configFunctions.getProperty("aliases.occupancy") %> Type</th>
|
||||||
<th><%= configFunctions.getProperty("aliases.occupants") %></th>
|
<th><%= configFunctions.getProperty("aliases.occupancyStartDate") %></th>
|
||||||
</tr>
|
<th>End Date</th>
|
||||||
</thead>
|
<th><%= configFunctions.getProperty("aliases.occupants") %></th>
|
||||||
<tbody>
|
</tr>
|
||||||
<% const currentDate = dateTimeFunctions.dateToInteger(new Date()); %>
|
</thead>
|
||||||
<% for (const lotOccupancy of lot.lotOccupancies) { %>
|
<tbody>
|
||||||
<% const isActive = !(lotOccupancy.occupancyEndDate && lotOccupancy.occupancyEndDate < currentDate); %>
|
<% const currentDate = dateTimeFunctions.dateToInteger(new Date()); %>
|
||||||
<tr>
|
<% for (const lotOccupancy of lot.lotOccupancies) { %>
|
||||||
<td class="has-text-centered">
|
<% const isActive = !(lotOccupancy.occupancyEndDate && lotOccupancy.occupancyEndDate < currentDate); %>
|
||||||
<% if (isActive) { %>
|
<tr>
|
||||||
<i class="fas fa-play" title="Current <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
<td class="has-text-centered">
|
||||||
<% } else { %>
|
<% if (isActive) { %>
|
||||||
<i class="fas fa-stop" title="Previous <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
<i class="fas fa-play" title="Current <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
||||||
<% } %>
|
<% } else { %>
|
||||||
</td>
|
<i class="fas fa-stop" title="Previous <%= configFunctions.getProperty("aliases.occupancy") %>"></i>
|
||||||
<td>
|
<% } %>
|
||||||
<a class="has-text-weight-bold"
|
</td>
|
||||||
href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>">
|
<td>
|
||||||
<%= lotOccupancy.occupancyType %>
|
<a class="has-text-weight-bold"
|
||||||
</a>
|
href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>">
|
||||||
</td>
|
<%= lotOccupancy.occupancyType %>
|
||||||
<td><%= lotOccupancy.occupancyStartDateString %></td>
|
</a><br />
|
||||||
<td>
|
<span class="is-size-7">#<%= lotOccupancy.lotOccupancyId %></span>
|
||||||
<% if (lotOccupancy.occupancyEndDate) { %>
|
</td>
|
||||||
<%= lotOccupancy.occupancyEndDateString %>
|
<td><%= lotOccupancy.occupancyStartDateString %></td>
|
||||||
<% } else { %>
|
<td>
|
||||||
<span class="has-text-grey">(No End Date)</span>
|
<% if (lotOccupancy.occupancyEndDate) { %>
|
||||||
<% } %>
|
<%= lotOccupancy.occupancyEndDateString %>
|
||||||
</td>
|
<% } else { %>
|
||||||
<td>
|
<span class="has-text-grey">(No End Date)</span>
|
||||||
<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>
|
<% } %>
|
||||||
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.occupants") %>)</span>
|
</td>
|
||||||
<% } else { %>
|
<td>
|
||||||
<% for (const occupant of lotOccupancy.lotOccupancyOccupants) { %>
|
<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>
|
||||||
<span class="has-tooltip-left" data-tooltip="<%= occupant.lotOccupantType %>">
|
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.occupants") %>)</span>
|
||||||
<i class="fas fa-fw fa-<%= occupant.fontAwesomeIconClass || 'user' %>" aria-hidden="true"></i>
|
<% } else { %>
|
||||||
<%= occupant.occupantName + ' ' + occupant.occupantFamilyName %>
|
<% for (const occupant of lotOccupancy.lotOccupancyOccupants) { %>
|
||||||
</span><br />
|
<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 %>
|
||||||
</td>
|
</span><br />
|
||||||
</tr>
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
</tbody>
|
</td>
|
||||||
</table>
|
</tr>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%- include('_footerA'); -%>
|
<%- include('_footerA'); -%>
|
||||||
|
|
|
||||||
|
|
@ -89,34 +89,36 @@
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-block is-block">
|
<div class="panel-block is-block">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<p class="mb-2">
|
<p class="mb-2">
|
||||||
<strong>Work Order Type</strong><br />
|
<strong>Work Order Type</strong><br />
|
||||||
<%= workOrder.workOrderType %>
|
<%= workOrder.workOrderType %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong>Description</strong><br />
|
<strong>Description</strong><br />
|
||||||
<% if (workOrder.workOrderDescription) { %>
|
<% if (workOrder.workOrderDescription) { %>
|
||||||
<%= workOrder.workOrderDescription %>
|
<%= workOrder.workOrderDescription %>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<span class="has-text-grey">(No Description)</span>
|
<span class="has-text-grey">(No Description)</span>
|
||||||
<% } %>
|
<% } %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<p class="mb-2">
|
<p class="mb-2">
|
||||||
<strong><%= configFunctions.getProperty("aliases.workOrderOpenDate") %></strong><br />
|
<strong><%= configFunctions.getProperty("aliases.workOrderOpenDate") %></strong><br />
|
||||||
<%= workOrder.workOrderOpenDateString %>
|
<%= workOrder.workOrderOpenDateString %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong><%= configFunctions.getProperty("aliases.workOrderCloseDate") %></strong><br />
|
<strong><%= configFunctions.getProperty("aliases.workOrderCloseDate") %></strong><br />
|
||||||
<% if (workOrder.workOrderCloseDate) { %>
|
<% if (workOrder.workOrderCloseDate) { %>
|
||||||
<%= workOrder.workOrderCloseDateString %>
|
<%= workOrder.workOrderCloseDateString %>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.workOrderCloseDate") %>)</span>
|
<span class="has-text-grey">
|
||||||
<% } %>
|
(No <%= configFunctions.getProperty("aliases.workOrderCloseDate") %>)
|
||||||
</p>
|
</span>
|
||||||
</div>
|
<% } %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -129,18 +131,18 @@
|
||||||
%>
|
%>
|
||||||
<div class="tabs is-boxed">
|
<div class="tabs is-boxed">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="<%= (tabToSelect === "lotOccupancies" ? "is-active" : "") %>">
|
<li class="<%= (tabToSelect === "lotOccupancies" ? "is-active" : "") %>">
|
||||||
<a href="#relatedTab--lotOccupancies">
|
<a href="#relatedTab--lotOccupancies">
|
||||||
<span><%= configFunctions.getProperty("aliases.occupancies") %></span>
|
<span><%= configFunctions.getProperty("aliases.occupancies") %></span>
|
||||||
<span class="ml-2 tag"><%= workOrder.workOrderLotOccupancies.length %></span>
|
<span class="ml-2 tag"><%= workOrder.workOrderLotOccupancies.length %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="<%= (tabToSelect === "lots" ? "is-active" : "") %>">
|
<li class="<%= (tabToSelect === "lots" ? "is-active" : "") %>">
|
||||||
<a href="#relatedTab--lots">
|
<a href="#relatedTab--lots">
|
||||||
<span><%= configFunctions.getProperty("aliases.lots") %></span>
|
<span><%= configFunctions.getProperty("aliases.lots") %></span>
|
||||||
<span class="ml-2 tag"><%= workOrder.workOrderLots.length %></span>
|
<span class="ml-2 tag"><%= workOrder.workOrderLots.length %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-container">
|
<div class="tab-container">
|
||||||
|
|
@ -179,10 +181,13 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="has-text-weight-bold"
|
<a class="has-text-weight-bold"
|
||||||
href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>">
|
href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>">
|
||||||
<%= lotOccupancy.occupancyType %>
|
<%= lotOccupancy.occupancyType %>
|
||||||
</a>
|
</a><br />
|
||||||
|
<span class="is-size-7">
|
||||||
|
#<%= lotOccupancy.lotOccupancyId %>
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if (lotOccupancy.lotId) { %>
|
<% if (lotOccupancy.lotId) { %>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue