select first work order type when only 1
parent
926e20d3d5
commit
efa16bc7c8
|
|
@ -168,7 +168,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
modalElement.querySelector("#workOrderCreate--lotOccupancyId").value = lotOccupancyId;
|
||||
modalElement.querySelector("#workOrderCreate--workOrderOpenDateString").value = cityssm.dateToString(new Date());
|
||||
const workOrderTypeSelectElement = modalElement.querySelector("#workOrderCreate--workOrderTypeId");
|
||||
for (const workOrderType of exports.workOrderTypes) {
|
||||
const workOrderTypes = exports.workOrderTypes;
|
||||
if (workOrderTypes.length === 1) {
|
||||
workOrderTypeSelectElement.innerHTML = "";
|
||||
}
|
||||
for (const workOrderType of workOrderTypes) {
|
||||
const optionElement = document.createElement("option");
|
||||
optionElement.value = workOrderType.workOrderTypeId.toString();
|
||||
optionElement.textContent = workOrderType.workOrderType;
|
||||
|
|
|
|||
|
|
@ -242,7 +242,13 @@ declare const bulmaJS: BulmaJS;
|
|||
"#workOrderCreate--workOrderTypeId"
|
||||
) as HTMLSelectElement;
|
||||
|
||||
for (const workOrderType of exports.workOrderTypes as recordTypes.WorkOrderType[]) {
|
||||
const workOrderTypes = exports.workOrderTypes as recordTypes.WorkOrderType[];
|
||||
|
||||
if (workOrderTypes.length === 1) {
|
||||
workOrderTypeSelectElement.innerHTML = "";
|
||||
}
|
||||
|
||||
for (const workOrderType of workOrderTypes) {
|
||||
const optionElement = document.createElement("option");
|
||||
optionElement.value = (
|
||||
workOrderType.workOrderTypeId as number
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue