type linting

deepsource-autofix-76c6eb20
Dan Gowans 2023-03-10 12:34:36 -05:00
parent 353409abca
commit ee66338ee7
4 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion, unicorn/prefer-module */ /* eslint-disable @typescript-eslint/no-non-null-assertion, unicorn/prefer-module */
import * as globalTypes from '../types/globalTypes' import type * as globalTypes from '../types/globalTypes'
;(() => { ;(() => {
const mapContainerElement: HTMLElement | null = const mapContainerElement: HTMLElement | null =
document.querySelector('#lot--map') document.querySelector('#lot--map')

View File

@ -10,8 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
function doReopen() { function doReopen() {
cityssm.postJSON(los.urlPrefix + '/workOrders/doReopenWorkOrder', { cityssm.postJSON(los.urlPrefix + '/workOrders/doReopenWorkOrder', {
workOrderId workOrderId
}, (responseJSON) => { }, (rawResponseJSON) => {
var _a; var _a;
const responseJSON = rawResponseJSON;
if (responseJSON.success) { if (responseJSON.success) {
window.location.href = los.getWorkOrderURL(workOrderId, true, true); window.location.href = los.getWorkOrderURL(workOrderId, true, true);
} }

View File

@ -24,7 +24,12 @@ declare const bulmaJS: BulmaJS
{ {
workOrderId workOrderId
}, },
(responseJSON: { success: boolean; errorMessage?: string }) => { (rawResponseJSON) => {
const responseJSON = rawResponseJSON as {
success: boolean
errorMessage?: string
}
if (responseJSON.success) { if (responseJSON.success) {
window.location.href = los.getWorkOrderURL( window.location.href = los.getWorkOrderURL(
workOrderId, workOrderId,

View File

@ -1 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const e=exports.los,r=document.querySelector("#button--reopenWorkOrder");if(null!==r){const o=r.dataset.workOrderId;r.addEventListener("click",()=>{bulmaJS.confirm({title:"Reopen Work Order",message:"Are you sure you want to remove the close date from this work order and reopen it?",contextualColorName:"warning",okButton:{text:"Yes, Reopen Work Order",callbackFunction:function(){cityssm.postJSON(e.urlPrefix+"/workOrders/doReopenWorkOrder",{workOrderId:o},r=>{var t;r.success?window.location.href=e.getWorkOrderURL(o,!0,!0):bulmaJS.alert({title:"Error Reopening Work Order",message:null!==(t=r.errorMessage)&&void 0!==t?t:"",contextualColorName:"danger"})})}}})})}})(); "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const e=exports.los,r=document.querySelector("#button--reopenWorkOrder");if(null!==r){const o=r.dataset.workOrderId;r.addEventListener("click",()=>{bulmaJS.confirm({title:"Reopen Work Order",message:"Are you sure you want to remove the close date from this work order and reopen it?",contextualColorName:"warning",okButton:{text:"Yes, Reopen Work Order",callbackFunction:function(){cityssm.postJSON(e.urlPrefix+"/workOrders/doReopenWorkOrder",{workOrderId:o},r=>{var t;const n=r;n.success?window.location.href=e.getWorkOrderURL(o,!0,!0):bulmaJS.alert({title:"Error Reopening Work Order",message:null!==(t=n.errorMessage)&&void 0!==t?t:"",contextualColorName:"danger"})})}}})})}})();