show all occupants on work orders
parent
00074fce05
commit
daefbce96c
|
|
@ -202,6 +202,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
addLot(lotId);
|
addLot(lotId);
|
||||||
};
|
};
|
||||||
const renderRelatedOccupancies = () => {
|
const renderRelatedOccupancies = () => {
|
||||||
|
var _a;
|
||||||
const occupanciesContainerElement = document.querySelector("#container--lotOccupancies");
|
const occupanciesContainerElement = document.querySelector("#container--lotOccupancies");
|
||||||
document.querySelector(".tabs a[href='#relatedTab--lotOccupancies'] .tag").textContent = workOrderLotOccupancies.length.toString();
|
document.querySelector(".tabs a[href='#relatedTab--lotOccupancies'] .tag").textContent = workOrderLotOccupancies.length.toString();
|
||||||
if (workOrderLotOccupancies.length === 0) {
|
if (workOrderLotOccupancies.length === 0) {
|
||||||
|
|
@ -297,14 +298,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
? '<span class="has-text-grey">(No ' +
|
? '<span class="has-text-grey">(No ' +
|
||||||
cityssm.escapeHTML(exports.aliases.occupants) +
|
cityssm.escapeHTML(exports.aliases.occupants) +
|
||||||
")</span>"
|
")</span>"
|
||||||
: '<span class="has-tooltip-left" data-tooltip="' +
|
: (_a = lotOccupancy.lotOccupancyOccupants) === null || _a === void 0 ? void 0 : _a.reduce((soFar, occupant) => {
|
||||||
cityssm.escapeHTML(lotOccupancy.lotOccupancyOccupants[0].lotOccupantType) +
|
return (soFar +
|
||||||
'">' +
|
'<span class="has-tooltip-left" data-tooltip="' +
|
||||||
cityssm.escapeHTML(lotOccupancy.lotOccupancyOccupants[0].occupantName) +
|
cityssm.escapeHTML(occupant.lotOccupantType) +
|
||||||
"</span>") +
|
'">' +
|
||||||
(lotOccupancy.lotOccupancyOccupants.length > 1
|
cityssm.escapeHTML(occupant.occupantName) +
|
||||||
? " plus " + (lotOccupancy.lotOccupancyOccupants.length - 1)
|
"</span><br />");
|
||||||
: "") +
|
}, "")) +
|
||||||
"</td>") +
|
"</td>") +
|
||||||
("<td>" +
|
("<td>" +
|
||||||
'<button class="button is-small is-light is-danger button--deleteLotOccupancy" data-tooltip="Delete Relationship" type="button">' +
|
'<button class="button is-small is-light is-danger button--deleteLotOccupancy" data-tooltip="Delete Relationship" type="button">' +
|
||||||
|
|
|
||||||
|
|
@ -420,18 +420,16 @@ declare const bulmaJS: BulmaJS;
|
||||||
? '<span class="has-text-grey">(No ' +
|
? '<span class="has-text-grey">(No ' +
|
||||||
cityssm.escapeHTML(exports.aliases.occupants) +
|
cityssm.escapeHTML(exports.aliases.occupants) +
|
||||||
")</span>"
|
")</span>"
|
||||||
: '<span class="has-tooltip-left" data-tooltip="' +
|
: lotOccupancy.lotOccupancyOccupants?.reduce((soFar, occupant) => {
|
||||||
cityssm.escapeHTML(
|
return (
|
||||||
lotOccupancy.lotOccupancyOccupants![0].lotOccupantType!
|
soFar +
|
||||||
) +
|
'<span class="has-tooltip-left" data-tooltip="' +
|
||||||
'">' +
|
cityssm.escapeHTML(occupant.lotOccupantType!) +
|
||||||
cityssm.escapeHTML(
|
'">' +
|
||||||
lotOccupancy.lotOccupancyOccupants![0].occupantName!
|
cityssm.escapeHTML(occupant.occupantName!) +
|
||||||
) +
|
"</span><br />"
|
||||||
"</span>") +
|
);
|
||||||
(lotOccupancy.lotOccupancyOccupants!.length > 1
|
}, "")) +
|
||||||
? " plus " + (lotOccupancy.lotOccupancyOccupants!.length - 1)
|
|
||||||
: "") +
|
|
||||||
"</td>") +
|
"</td>") +
|
||||||
("<td>" +
|
("<td>" +
|
||||||
'<button class="button is-small is-light is-danger button--deleteLotOccupancy" data-tooltip="Delete Relationship" type="button">' +
|
'<button class="button is-small is-light is-danger button--deleteLotOccupancy" data-tooltip="Delete Relationship" type="button">' +
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -200,9 +200,9 @@
|
||||||
<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>
|
<% if (lotOccupancy.lotOccupancyOccupants.length === 0) { %>
|
||||||
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.occupants") %>)</span>
|
<span class="has-text-grey">(No <%= configFunctions.getProperty("aliases.occupants") %>)</span>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<% const occupant = lotOccupancy.lotOccupancyOccupants[0]; %>
|
<% for (const occupant of lotOccupancy.lotOccupancyOccupants) { %>
|
||||||
<span class="has-tooltip-left" data-tooltip="<%= occupant.lotOccupantType %>"><%= occupant.occupantName %></span>
|
<span class="has-tooltip-left" data-tooltip="<%= occupant.lotOccupantType %>"><%= occupant.occupantName %></span><br />
|
||||||
<%= (lotOccupancy.lotOccupancyOccupants.length > 1 ? " plus " + (lotOccupancy.lotOccupancyOccupants.length - 1) : "") %>
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue