linting
parent
fb4e4cb202
commit
ef727e9a39
|
|
@ -60,10 +60,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
function doDelete() {
|
||||
cityssm.postJSON(los.urlPrefix + '/lots/doDeleteLot', {
|
||||
lotId
|
||||
}, (responseJSON) => {
|
||||
}, (rawResponseJSON) => {
|
||||
var _a;
|
||||
const responseJSON = rawResponseJSON;
|
||||
if (responseJSON.success) {
|
||||
cityssm.disableNavBlocker();
|
||||
clearUnsavedChanges();
|
||||
window.location.href = los.getLotURL();
|
||||
}
|
||||
else {
|
||||
|
|
@ -98,8 +99,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
}
|
||||
cityssm.postJSON(los.urlPrefix + '/lots/doGetLotTypeFields', {
|
||||
lotTypeId: lotTypeIdElement.value
|
||||
}, (responseJSON) => {
|
||||
}, (rawResponseJSON) => {
|
||||
var _a;
|
||||
const responseJSON = rawResponseJSON;
|
||||
if (responseJSON.lotTypeFields.length === 0) {
|
||||
lotFieldsContainerElement.innerHTML = `<div class="message is-info">
|
||||
<p class="message-body">There are no additional fields for this ${los.escapedAliases.lot} type.</p>
|
||||
|
|
@ -190,8 +192,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
let editCloseModalFunction;
|
||||
function editComment(submitEvent) {
|
||||
submitEvent.preventDefault();
|
||||
cityssm.postJSON(los.urlPrefix + '/lots/doUpdateLotComment', editFormElement, (responseJSON) => {
|
||||
cityssm.postJSON(los.urlPrefix + '/lots/doUpdateLotComment', editFormElement, (rawResponseJSON) => {
|
||||
var _a;
|
||||
const responseJSON = rawResponseJSON;
|
||||
if (responseJSON.success) {
|
||||
lotComments = responseJSON.lotComments;
|
||||
editCloseModalFunction();
|
||||
|
|
@ -241,8 +244,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
cityssm.postJSON(los.urlPrefix + '/lots/doDeleteLotComment', {
|
||||
lotId,
|
||||
lotCommentId
|
||||
}, (responseJSON) => {
|
||||
}, (rawResponseJSON) => {
|
||||
var _a;
|
||||
const responseJSON = rawResponseJSON;
|
||||
if (responseJSON.success) {
|
||||
lotComments = responseJSON.lotComments;
|
||||
renderLotComments();
|
||||
|
|
@ -326,7 +330,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
let addCommentCloseModalFunction;
|
||||
function doAddComment(formEvent) {
|
||||
formEvent.preventDefault();
|
||||
cityssm.postJSON(los.urlPrefix + '/lots/doAddLotComment', formEvent.currentTarget, (responseJSON) => {
|
||||
cityssm.postJSON(los.urlPrefix + '/lots/doAddLotComment', formEvent.currentTarget, (rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON;
|
||||
if (responseJSON.success) {
|
||||
lotComments = responseJSON.lotComments;
|
||||
renderLotComments();
|
||||
|
|
|
|||
|
|
@ -92,9 +92,14 @@ declare const bulmaJS: BulmaJS
|
|||
{
|
||||
lotId
|
||||
},
|
||||
(responseJSON: { success: boolean; errorMessage?: string }) => {
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
cityssm.disableNavBlocker()
|
||||
clearUnsavedChanges()
|
||||
window.location.href = los.getLotURL()
|
||||
} else {
|
||||
bulmaJS.alert({
|
||||
|
|
@ -143,7 +148,11 @@ declare const bulmaJS: BulmaJS
|
|||
{
|
||||
lotTypeId: lotTypeIdElement.value
|
||||
},
|
||||
(responseJSON: { lotTypeFields: recordTypes.LotTypeField[] }) => {
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
lotTypeFields: recordTypes.LotTypeField[]
|
||||
}
|
||||
|
||||
if (responseJSON.lotTypeFields.length === 0) {
|
||||
lotFieldsContainerElement.innerHTML = `<div class="message is-info">
|
||||
<p class="message-body">There are no additional fields for this ${los.escapedAliases.lot} type.</p>
|
||||
|
|
@ -280,11 +289,13 @@ declare const bulmaJS: BulmaJS
|
|||
cityssm.postJSON(
|
||||
los.urlPrefix + '/lots/doUpdateLotComment',
|
||||
editFormElement,
|
||||
(responseJSON: {
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotComments?: recordTypes.LotComment[]
|
||||
}) => {
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
lotComments = responseJSON.lotComments!
|
||||
editCloseModalFunction()
|
||||
|
|
@ -373,11 +384,13 @@ declare const bulmaJS: BulmaJS
|
|||
lotId,
|
||||
lotCommentId
|
||||
},
|
||||
(responseJSON: {
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotComments: recordTypes.LotComment[]
|
||||
}) => {
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
lotComments = responseJSON.lotComments
|
||||
renderLotComments()
|
||||
|
|
@ -478,10 +491,12 @@ declare const bulmaJS: BulmaJS
|
|||
cityssm.postJSON(
|
||||
los.urlPrefix + '/lots/doAddLotComment',
|
||||
formEvent.currentTarget,
|
||||
(responseJSON: {
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
lotComments?: recordTypes.LotComment[]
|
||||
}) => {
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
lotComments = responseJSON.lotComments!
|
||||
renderLotComments()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
"use strict";
|
||||
/* eslint-disable spaced-comment, @typescript-eslint/no-non-null-assertion, unicorn/prefer-module */
|
||||
/* eslint-disable spaced-comment, @typescript-eslint/indent, @typescript-eslint/no-non-null-assertion, unicorn/prefer-module */
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
(() => {
|
||||
var _a, _b, _c;
|
||||
|
|
@ -1011,7 +1011,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
let editCloseModalFunction;
|
||||
function doEdit(submitEvent) {
|
||||
submitEvent.preventDefault();
|
||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doUpdateWorkOrderMilestone', submitEvent.currentTarget, (responseJSON) => {
|
||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doUpdateWorkOrderMilestone', submitEvent.currentTarget, (rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON;
|
||||
processMilestoneResponse(responseJSON);
|
||||
if (responseJSON.success) {
|
||||
editCloseModalFunction();
|
||||
|
|
@ -1169,7 +1170,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
}
|
||||
const currentDateString = cityssm.dateToString(new Date());
|
||||
function _doAdd() {
|
||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderMilestone', addFormElement, (responseJSON) => {
|
||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderMilestone', addFormElement, (rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON;
|
||||
processMilestoneResponse(responseJSON);
|
||||
if (responseJSON.success) {
|
||||
addCloseModalFunction();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
"use strict";
|
||||
/* eslint-disable spaced-comment, @typescript-eslint/no-non-null-assertion, unicorn/prefer-module */
|
||||
/* eslint-disable spaced-comment, @typescript-eslint/indent, @typescript-eslint/no-non-null-assertion, unicorn/prefer-module */
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
(() => {
|
||||
var _a, _b, _c;
|
||||
|
|
@ -253,7 +253,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
let editCloseModalFunction;
|
||||
function doEdit(submitEvent) {
|
||||
submitEvent.preventDefault();
|
||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doUpdateWorkOrderMilestone', submitEvent.currentTarget, (responseJSON) => {
|
||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doUpdateWorkOrderMilestone', submitEvent.currentTarget, (rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON;
|
||||
processMilestoneResponse(responseJSON);
|
||||
if (responseJSON.success) {
|
||||
editCloseModalFunction();
|
||||
|
|
@ -411,7 +412,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
}
|
||||
const currentDateString = cityssm.dateToString(new Date());
|
||||
function _doAdd() {
|
||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderMilestone', addFormElement, (responseJSON) => {
|
||||
cityssm.postJSON(los.urlPrefix + '/workOrders/doAddWorkOrderMilestone', addFormElement, (rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON;
|
||||
processMilestoneResponse(responseJSON);
|
||||
if (responseJSON.success) {
|
||||
addCloseModalFunction();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable spaced-comment, @typescript-eslint/no-non-null-assertion, unicorn/prefer-module */
|
||||
/* eslint-disable spaced-comment, @typescript-eslint/indent, @typescript-eslint/no-non-null-assertion, unicorn/prefer-module */
|
||||
|
||||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types'
|
||||
import type { BulmaJS } from '@cityssm/bulma-js/types'
|
||||
|
|
@ -82,8 +82,9 @@ declare const bulmaJS: BulmaJS
|
|||
)
|
||||
})
|
||||
|
||||
const inputElements: NodeListOf<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement> =
|
||||
workOrderFormElement.querySelectorAll('input, select, textarea')
|
||||
const inputElements: NodeListOf<
|
||||
HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
|
||||
> = workOrderFormElement.querySelectorAll('input, select, textarea')
|
||||
|
||||
for (const inputElement of inputElements) {
|
||||
inputElement.addEventListener('change', setUnsavedChanges)
|
||||
|
|
@ -376,11 +377,13 @@ declare const bulmaJS: BulmaJS
|
|||
cityssm.postJSON(
|
||||
los.urlPrefix + '/workOrders/doUpdateWorkOrderMilestone',
|
||||
submitEvent.currentTarget,
|
||||
(responseJSON: {
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
workOrderMilestones?: recordTypes.WorkOrderMilestone[]
|
||||
}) => {
|
||||
}
|
||||
|
||||
processMilestoneResponse(responseJSON)
|
||||
if (responseJSON.success) {
|
||||
editCloseModalFunction()
|
||||
|
|
@ -498,9 +501,9 @@ declare const bulmaJS: BulmaJS
|
|||
('<div class="column is-narrow">' +
|
||||
(milestone.workOrderMilestoneCompletionDate
|
||||
? '<span class="button is-static" data-tooltip="Completed ' +
|
||||
milestone.workOrderMilestoneCompletionDateString +
|
||||
milestone.workOrderMilestoneCompletionDateString! +
|
||||
'" aria-label="Completed ' +
|
||||
milestone.workOrderMilestoneCompletionDateString +
|
||||
milestone.workOrderMilestoneCompletionDateString! +
|
||||
'">' +
|
||||
'<span class="icon is-small"><i class="fas fa-check" aria-hidden="true"></i></span>' +
|
||||
'</span>'
|
||||
|
|
@ -518,7 +521,7 @@ declare const bulmaJS: BulmaJS
|
|||
? '<span class="has-text-grey">(No Set Date)</span>'
|
||||
: milestone.workOrderMilestoneDateString) +
|
||||
(milestone.workOrderMilestoneTime
|
||||
? ' ' + milestone.workOrderMilestoneTimeString
|
||||
? ' ' + milestone.workOrderMilestoneTimeString!
|
||||
: '') +
|
||||
'<br />' +
|
||||
'<span class="is-size-7">' +
|
||||
|
|
@ -600,11 +603,13 @@ declare const bulmaJS: BulmaJS
|
|||
cityssm.postJSON(
|
||||
los.urlPrefix + '/workOrders/doAddWorkOrderMilestone',
|
||||
addFormElement,
|
||||
(responseJSON: {
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
workOrderMilestones?: recordTypes.WorkOrderMilestone[]
|
||||
}) => {
|
||||
}
|
||||
|
||||
processMilestoneResponse(responseJSON)
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue