From e849f5989ab27ba0609ffaaa183bd055e9f904ba Mon Sep 17 00:00:00 2001 From: Dan Gowans Date: Mon, 28 Oct 2024 14:43:35 -0400 Subject: [PATCH] linting --- helpers/functions.cache.js | 58 ++--- helpers/functions.cache.ts | 93 +++---- helpers/functions.dynamicsGP.js | 6 +- helpers/functions.dynamicsGP.ts | 7 +- helpers/functions.fee.d.ts | 6 +- helpers/functions.fee.js | 4 +- helpers/functions.fee.ts | 12 +- package-lock.json | 16 +- package.json | 4 +- public/javascripts/adminLotTypes.js | 2 - public/javascripts/adminLotTypes.ts | 3 - public/javascripts/adminTables.js | 32 +-- public/javascripts/adminTables.ts | 33 +-- public/javascripts/dashboard.js | 2 - public/javascripts/dashboard.ts | 3 - public/javascripts/lotOccupancyEdit.js | 20 +- public/javascripts/lotOccupancyEdit.ts | 20 +- public/javascripts/lotOccupancySearch.js | 14 +- public/javascripts/lotOccupancySearch.ts | 18 +- public/javascripts/lotSearch.js | 2 - public/javascripts/lotSearch.ts | 5 +- public/javascripts/lotView.js | 2 - public/javascripts/lotView.ts | 3 - public/javascripts/main.js | 6 +- public/javascripts/main.ts | 7 +- public/javascripts/mapEdit.js | 6 +- public/javascripts/mapEdit.ts | 7 +- public/javascripts/mapSearch.js | 2 - public/javascripts/mapSearch.ts | 3 - public/javascripts/reportSearch.js | 2 - public/javascripts/reportSearch.ts | 3 - public/javascripts/workOrderEdit.js | 256 ++++++++++---------- public/javascripts/workOrderEdit.ts | 295 +++++++++++------------ public/javascripts/workOrderSearch.js | 2 - public/javascripts/workOrderSearch.ts | 3 - public/javascripts/workOrderView.js | 2 - public/javascripts/workOrderView.ts | 3 - 37 files changed, 436 insertions(+), 526 deletions(-) diff --git a/helpers/functions.cache.js b/helpers/functions.cache.js index 1524fc8f..9fee0366 100644 --- a/helpers/functions.cache.js +++ b/helpers/functions.cache.js @@ -1,3 +1,5 @@ +// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair +/* eslint-disable @typescript-eslint/init-declarations */ import cluster from 'node:cluster'; import Debug from 'debug'; import getLotOccupantTypesFromDatabase from '../database/getLotOccupantTypes.js'; @@ -21,17 +23,13 @@ export async function getLotOccupantTypes() { } export async function getLotOccupantTypeById(lotOccupantTypeId) { const cachedLotOccupantTypes = await getLotOccupantTypes(); - return cachedLotOccupantTypes.find((currentLotOccupantType) => { - return currentLotOccupantType.lotOccupantTypeId === lotOccupantTypeId; - }); + return cachedLotOccupantTypes.find((currentLotOccupantType) => currentLotOccupantType.lotOccupantTypeId === lotOccupantTypeId); } export async function getLotOccupantTypeByLotOccupantType(lotOccupantType) { const cachedLotOccupantTypes = await getLotOccupantTypes(); const lotOccupantTypeLowerCase = lotOccupantType.toLowerCase(); - return cachedLotOccupantTypes.find((currentLotOccupantType) => { - return (currentLotOccupantType.lotOccupantType.toLowerCase() === - lotOccupantTypeLowerCase); - }); + return cachedLotOccupantTypes.find((currentLotOccupantType) => currentLotOccupantType.lotOccupantType.toLowerCase() === + lotOccupantTypeLowerCase); } function clearLotOccupantTypesCache() { lotOccupantTypes = undefined; @@ -48,16 +46,12 @@ export async function getLotStatuses() { } export async function getLotStatusById(lotStatusId) { const cachedLotStatuses = await getLotStatuses(); - return cachedLotStatuses.find((currentLotStatus) => { - return currentLotStatus.lotStatusId === lotStatusId; - }); + return cachedLotStatuses.find((currentLotStatus) => currentLotStatus.lotStatusId === lotStatusId); } export async function getLotStatusByLotStatus(lotStatus) { const cachedLotStatuses = await getLotStatuses(); const lotStatusLowerCase = lotStatus.toLowerCase(); - return cachedLotStatuses.find((currentLotStatus) => { - return currentLotStatus.lotStatus.toLowerCase() === lotStatusLowerCase; - }); + return cachedLotStatuses.find((currentLotStatus) => currentLotStatus.lotStatus.toLowerCase() === lotStatusLowerCase); } function clearLotStatusesCache() { lotStatuses = undefined; @@ -74,16 +68,12 @@ export async function getLotTypes() { } export async function getLotTypeById(lotTypeId) { const cachedLotTypes = await getLotTypes(); - return cachedLotTypes.find((currentLotType) => { - return currentLotType.lotTypeId === lotTypeId; - }); + return cachedLotTypes.find((currentLotType) => currentLotType.lotTypeId === lotTypeId); } export async function getLotTypesByLotType(lotType) { const cachedLotTypes = await getLotTypes(); const lotTypeLowerCase = lotType.toLowerCase(); - return cachedLotTypes.find((currentLotType) => { - return currentLotType.lotType.toLowerCase() === lotTypeLowerCase; - }); + return cachedLotTypes.find((currentLotType) => currentLotType.lotType.toLowerCase() === lotTypeLowerCase); } function clearLotTypesCache() { lotTypes = undefined; @@ -107,17 +97,13 @@ export async function getAllOccupancyTypeFields() { } export async function getOccupancyTypeById(occupancyTypeId) { const cachedOccupancyTypes = await getOccupancyTypes(); - return cachedOccupancyTypes.find((currentOccupancyType) => { - return currentOccupancyType.occupancyTypeId === occupancyTypeId; - }); + return cachedOccupancyTypes.find((currentOccupancyType) => currentOccupancyType.occupancyTypeId === occupancyTypeId); } export async function getOccupancyTypeByOccupancyType(occupancyTypeString) { const cachedOccupancyTypes = await getOccupancyTypes(); const occupancyTypeLowerCase = occupancyTypeString.toLowerCase(); - return cachedOccupancyTypes.find((currentOccupancyType) => { - return (currentOccupancyType.occupancyType.toLowerCase() === - occupancyTypeLowerCase); - }); + return cachedOccupancyTypes.find((currentOccupancyType) => currentOccupancyType.occupancyType.toLowerCase() === + occupancyTypeLowerCase); } export async function getOccupancyTypePrintsById(occupancyTypeId) { const occupancyType = await getOccupancyTypeById(occupancyTypeId); @@ -146,9 +132,7 @@ export async function getWorkOrderTypes() { } export async function getWorkOrderTypeById(workOrderTypeId) { const cachedWorkOrderTypes = await getWorkOrderTypes(); - return cachedWorkOrderTypes.find((currentWorkOrderType) => { - return currentWorkOrderType.workOrderTypeId === workOrderTypeId; - }); + return cachedWorkOrderTypes.find((currentWorkOrderType) => currentWorkOrderType.workOrderTypeId === workOrderTypeId); } function clearWorkOrderTypesCache() { workOrderTypes = undefined; @@ -165,18 +149,14 @@ export async function getWorkOrderMilestoneTypes() { } export async function getWorkOrderMilestoneTypeById(workOrderMilestoneTypeId) { const cachedWorkOrderMilestoneTypes = await getWorkOrderMilestoneTypes(); - return cachedWorkOrderMilestoneTypes.find((currentWorkOrderMilestoneType) => { - return (currentWorkOrderMilestoneType.workOrderMilestoneTypeId === - workOrderMilestoneTypeId); - }); + return cachedWorkOrderMilestoneTypes.find((currentWorkOrderMilestoneType) => currentWorkOrderMilestoneType.workOrderMilestoneTypeId === + workOrderMilestoneTypeId); } export async function getWorkOrderMilestoneTypeByWorkOrderMilestoneType(workOrderMilestoneTypeString) { const cachedWorkOrderMilestoneTypes = await getWorkOrderMilestoneTypes(); const workOrderMilestoneTypeLowerCase = workOrderMilestoneTypeString.toLowerCase(); - return cachedWorkOrderMilestoneTypes.find((currentWorkOrderMilestoneType) => { - return (currentWorkOrderMilestoneType.workOrderMilestoneType.toLowerCase() === - workOrderMilestoneTypeLowerCase); - }); + return cachedWorkOrderMilestoneTypes.find((currentWorkOrderMilestoneType) => currentWorkOrderMilestoneType.workOrderMilestoneType.toLowerCase() === + workOrderMilestoneTypeLowerCase); } export async function preloadCaches() { debug('Preloading caches'); @@ -240,7 +220,9 @@ export function clearCacheByTableName(tableName, relayMessage = true) { pid: process.pid }; debug(`Sending clear cache from worker: ${tableName}`); - process.send(workerMessage); + if (process.send !== undefined) { + process.send(workerMessage); + } } } catch { } diff --git a/helpers/functions.cache.ts b/helpers/functions.cache.ts index 0ade01a3..29c4203c 100644 --- a/helpers/functions.cache.ts +++ b/helpers/functions.cache.ts @@ -1,3 +1,6 @@ +// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair +/* eslint-disable @typescript-eslint/init-declarations */ + import cluster from 'node:cluster' import Debug from 'debug' @@ -9,7 +12,10 @@ import getOccupancyTypeFieldsFromDatabase from '../database/getOccupancyTypeFiel import getOccupancyTypesFromDatabase from '../database/getOccupancyTypes.js' import getWorkOrderMilestoneTypesFromDatabase from '../database/getWorkOrderMilestoneTypes.js' import getWorkOrderTypesFromDatabase from '../database/getWorkOrderTypes.js' -import type { ClearCacheWorkerMessage } from '../types/applicationTypes.js' +import type { + ClearCacheWorkerMessage, + WorkerMessage +} from '../types/applicationTypes.js' import type { LotOccupantType, LotStatus, @@ -43,9 +49,10 @@ export async function getLotOccupantTypeById( ): Promise { const cachedLotOccupantTypes = await getLotOccupantTypes() - return cachedLotOccupantTypes.find((currentLotOccupantType) => { - return currentLotOccupantType.lotOccupantTypeId === lotOccupantTypeId - }) + return cachedLotOccupantTypes.find( + (currentLotOccupantType) => + currentLotOccupantType.lotOccupantTypeId === lotOccupantTypeId + ) } export async function getLotOccupantTypeByLotOccupantType( @@ -55,12 +62,11 @@ export async function getLotOccupantTypeByLotOccupantType( const lotOccupantTypeLowerCase = lotOccupantType.toLowerCase() - return cachedLotOccupantTypes.find((currentLotOccupantType) => { - return ( + return cachedLotOccupantTypes.find( + (currentLotOccupantType) => currentLotOccupantType.lotOccupantType.toLowerCase() === lotOccupantTypeLowerCase - ) - }) + ) } function clearLotOccupantTypesCache(): void { @@ -86,9 +92,9 @@ export async function getLotStatusById( ): Promise { const cachedLotStatuses = await getLotStatuses() - return cachedLotStatuses.find((currentLotStatus) => { - return currentLotStatus.lotStatusId === lotStatusId - }) + return cachedLotStatuses.find( + (currentLotStatus) => currentLotStatus.lotStatusId === lotStatusId + ) } export async function getLotStatusByLotStatus( @@ -98,9 +104,10 @@ export async function getLotStatusByLotStatus( const lotStatusLowerCase = lotStatus.toLowerCase() - return cachedLotStatuses.find((currentLotStatus) => { - return currentLotStatus.lotStatus.toLowerCase() === lotStatusLowerCase - }) + return cachedLotStatuses.find( + (currentLotStatus) => + currentLotStatus.lotStatus.toLowerCase() === lotStatusLowerCase + ) } function clearLotStatusesCache(): void { @@ -126,9 +133,9 @@ export async function getLotTypeById( ): Promise { const cachedLotTypes = await getLotTypes() - return cachedLotTypes.find((currentLotType) => { - return currentLotType.lotTypeId === lotTypeId - }) + return cachedLotTypes.find( + (currentLotType) => currentLotType.lotTypeId === lotTypeId + ) } export async function getLotTypesByLotType( @@ -138,9 +145,10 @@ export async function getLotTypesByLotType( const lotTypeLowerCase = lotType.toLowerCase() - return cachedLotTypes.find((currentLotType) => { - return currentLotType.lotType.toLowerCase() === lotTypeLowerCase - }) + return cachedLotTypes.find( + (currentLotType) => + currentLotType.lotType.toLowerCase() === lotTypeLowerCase + ) } function clearLotTypesCache(): void { @@ -176,9 +184,10 @@ export async function getOccupancyTypeById( ): Promise { const cachedOccupancyTypes = await getOccupancyTypes() - return cachedOccupancyTypes.find((currentOccupancyType) => { - return currentOccupancyType.occupancyTypeId === occupancyTypeId - }) + return cachedOccupancyTypes.find( + (currentOccupancyType) => + currentOccupancyType.occupancyTypeId === occupancyTypeId + ) } export async function getOccupancyTypeByOccupancyType( @@ -188,12 +197,11 @@ export async function getOccupancyTypeByOccupancyType( const occupancyTypeLowerCase = occupancyTypeString.toLowerCase() - return cachedOccupancyTypes.find((currentOccupancyType) => { - return ( + return cachedOccupancyTypes.find( + (currentOccupancyType) => currentOccupancyType.occupancyType.toLowerCase() === occupancyTypeLowerCase - ) - }) + ) } export async function getOccupancyTypePrintsById( @@ -239,9 +247,10 @@ export async function getWorkOrderTypeById( ): Promise { const cachedWorkOrderTypes = await getWorkOrderTypes() - return cachedWorkOrderTypes.find((currentWorkOrderType) => { - return currentWorkOrderType.workOrderTypeId === workOrderTypeId - }) + return cachedWorkOrderTypes.find( + (currentWorkOrderType) => + currentWorkOrderType.workOrderTypeId === workOrderTypeId + ) } function clearWorkOrderTypesCache(): void { @@ -269,12 +278,11 @@ export async function getWorkOrderMilestoneTypeById( ): Promise { const cachedWorkOrderMilestoneTypes = await getWorkOrderMilestoneTypes() - return cachedWorkOrderMilestoneTypes.find((currentWorkOrderMilestoneType) => { - return ( + return cachedWorkOrderMilestoneTypes.find( + (currentWorkOrderMilestoneType) => currentWorkOrderMilestoneType.workOrderMilestoneTypeId === workOrderMilestoneTypeId - ) - }) + ) } export async function getWorkOrderMilestoneTypeByWorkOrderMilestoneType( @@ -285,12 +293,11 @@ export async function getWorkOrderMilestoneTypeByWorkOrderMilestoneType( const workOrderMilestoneTypeLowerCase = workOrderMilestoneTypeString.toLowerCase() - return cachedWorkOrderMilestoneTypes.find((currentWorkOrderMilestoneType) => { - return ( + return cachedWorkOrderMilestoneTypes.find( + (currentWorkOrderMilestoneType) => currentWorkOrderMilestoneType.workOrderMilestoneType.toLowerCase() === workOrderMilestoneTypeLowerCase - ) - }) + ) } export async function preloadCaches(): Promise { @@ -370,14 +377,16 @@ export function clearCacheByTableName( debug(`Sending clear cache from worker: ${tableName}`) - process.send!(workerMessage) + if (process.send !== undefined) { + process.send(workerMessage) + } } } catch {} } -process.on('message', (message: ClearCacheWorkerMessage) => { +process.on('message', (message: WorkerMessage) => { if (message.messageType === 'clearCache' && message.pid !== process.pid) { - debug(`Clearing cache: ${message.tableName}`) - clearCacheByTableName(message.tableName, false) + debug(`Clearing cache: ${(message as ClearCacheWorkerMessage).tableName}`) + clearCacheByTableName((message as ClearCacheWorkerMessage).tableName, false) } }) diff --git a/helpers/functions.dynamicsGP.js b/helpers/functions.dynamicsGP.js index 4a9917e4..d71a95ee 100644 --- a/helpers/functions.dynamicsGP.js +++ b/helpers/functions.dynamicsGP.js @@ -1,6 +1,6 @@ -/* eslint-disable unicorn/filename-case, @eslint-community/eslint-comments/disable-enable-pair */ import { DynamicsGP } from '@cityssm/dynamics-gp'; import { getConfigProperty } from './functions.config.js'; +// eslint-disable-next-line @typescript-eslint/init-declarations let gp; if (getConfigProperty('settings.dynamicsGP.integrationIsEnabled')) { gp = new DynamicsGP(getConfigProperty('settings.dynamicsGP.mssqlConfig')); @@ -25,9 +25,7 @@ function filterCashReceipt(cashReceipt) { function filterInvoice(invoice) { const itemNumbers = getConfigProperty('settings.dynamicsGP.itemNumbers'); for (const itemNumber of itemNumbers) { - const found = invoice.lineItems.some((itemRecord) => { - return itemRecord.itemNumber === itemNumber; - }); + const found = invoice.lineItems.some((itemRecord) => itemRecord.itemNumber === itemNumber); if (!found) { return undefined; } diff --git a/helpers/functions.dynamicsGP.ts b/helpers/functions.dynamicsGP.ts index a7bfba44..acc8a2ef 100644 --- a/helpers/functions.dynamicsGP.ts +++ b/helpers/functions.dynamicsGP.ts @@ -1,5 +1,3 @@ -/* eslint-disable unicorn/filename-case, @eslint-community/eslint-comments/disable-enable-pair */ - import { type DiamondCashReceipt, type DiamondExtendedGPInvoice, @@ -12,6 +10,7 @@ import type { DynamicsGPDocument } from '../types/recordTypes.js' import { getConfigProperty } from './functions.config.js' +// eslint-disable-next-line @typescript-eslint/init-declarations let gp: DynamicsGP if (getConfigProperty('settings.dynamicsGP.integrationIsEnabled')) { @@ -46,9 +45,7 @@ function filterInvoice(invoice: GPInvoice): GPInvoice | undefined { const itemNumbers = getConfigProperty('settings.dynamicsGP.itemNumbers') for (const itemNumber of itemNumbers) { - const found = invoice.lineItems.some((itemRecord) => { - return itemRecord.itemNumber === itemNumber - }) + const found = invoice.lineItems.some((itemRecord) => itemRecord.itemNumber === itemNumber) if (!found) { return undefined diff --git a/helpers/functions.fee.d.ts b/helpers/functions.fee.d.ts index bb25438c..5ad9b18f 100644 --- a/helpers/functions.fee.d.ts +++ b/helpers/functions.fee.d.ts @@ -1,3 +1,3 @@ -import type * as recordTypes from '../types/recordTypes'; -export declare const calculateFeeAmount: (fee: recordTypes.Fee, lotOccupancy: recordTypes.LotOccupancy) => number; -export declare function calculateTaxAmount(fee: recordTypes.Fee, feeAmount: number): number; +import type { Fee, LotOccupancy } from '../types/recordTypes.js'; +export declare function calculateFeeAmount(fee: Fee, lotOccupancy: LotOccupancy): number; +export declare function calculateTaxAmount(fee: Fee, feeAmount: number): number; diff --git a/helpers/functions.fee.js b/helpers/functions.fee.js index 4d577b92..d805c43e 100644 --- a/helpers/functions.fee.js +++ b/helpers/functions.fee.js @@ -1,6 +1,6 @@ -export const calculateFeeAmount = (fee, lotOccupancy) => { +export function calculateFeeAmount(fee, lotOccupancy) { return fee.feeFunction ? 0 : fee.feeAmount ?? 0; -}; +} export function calculateTaxAmount(fee, feeAmount) { return fee.taxPercentage ? feeAmount * (fee.taxPercentage / 100) diff --git a/helpers/functions.fee.ts b/helpers/functions.fee.ts index a45fd635..66778634 100644 --- a/helpers/functions.fee.ts +++ b/helpers/functions.fee.ts @@ -1,13 +1,13 @@ -import type * as recordTypes from '../types/recordTypes' +import type { Fee, LotOccupancy } from '../types/recordTypes.js' -export const calculateFeeAmount = ( - fee: recordTypes.Fee, - lotOccupancy: recordTypes.LotOccupancy -): number => { +export function calculateFeeAmount( + fee: Fee, + lotOccupancy: LotOccupancy +): number { return fee.feeFunction ? 0 : fee.feeAmount ?? 0 } -export function calculateTaxAmount(fee: recordTypes.Fee, feeAmount: number): number { +export function calculateTaxAmount(fee: Fee, feeAmount: number): number { return fee.taxPercentage ? feeAmount * (fee.taxPercentage / 100) : fee.taxAmount ?? 0 diff --git a/package-lock.json b/package-lock.json index 9f33407d..b44ac94a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "randomcolor": "^0.6.2", "session-file-store": "^1.5.0", "set-interval-async": "^3.0.3", - "uuid": "^11.0.1" + "uuid": "^11.0.2" }, "devDependencies": { "@cityssm/bulma-a11y": "^0.4.0", @@ -80,7 +80,7 @@ "bulma-tooltip": "^3.0.2", "cypress": "^13.15.1", "cypress-axe": "^1.5.0", - "eslint-config-cityssm": "^14.0.0", + "eslint-config-cityssm": "^14.0.1", "gulp": "^5.0.0", "gulp-sass": "^5.1.0", "nodemon": "^3.1.7", @@ -8120,9 +8120,9 @@ } }, "node_modules/eslint-config-cityssm": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-cityssm/-/eslint-config-cityssm-14.0.0.tgz", - "integrity": "sha512-RLS0mniIK2r5evcqpcYq41SdVxRAy1h37Y3nr1OnqAVc3TWPlcB+HNj/nad9ovfm9NsXWCWKINYO63/BVNjgfg==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-cityssm/-/eslint-config-cityssm-14.0.1.tgz", + "integrity": "sha512-pmqsNjS0cxznslzhZeihz1iGSOe/4LgJZdJzi7D8R3KE3N6dDSxiIay0T+q2u8BgmZJJwmmvrL6Qlk0924mNyA==", "dev": true, "license": "Unlicense", "dependencies": { @@ -16370,9 +16370,9 @@ } }, "node_modules/uuid": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.1.tgz", - "integrity": "sha512-wt9UB5EcLhnboy1UvA1mvGPXkIIrHSu+3FmUksARfdVw9tuPf3CH/CohxO0Su1ApoKAeT6BVzAJIvjTuQVSmuQ==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.2.tgz", + "integrity": "sha512-14FfcOJmqdjbBPdDjFQyk/SdT4NySW4eM0zcG+HqbHP5jzuH56xO3J1DGhgs/cEMCfwYi3HQI1gnTO62iaG+tQ==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" diff --git a/package.json b/package.json index 53bf5373..920632b3 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "randomcolor": "^0.6.2", "session-file-store": "^1.5.0", "set-interval-async": "^3.0.3", - "uuid": "^11.0.1" + "uuid": "^11.0.2" }, "devDependencies": { "@cityssm/bulma-a11y": "^0.4.0", @@ -104,7 +104,7 @@ "bulma-tooltip": "^3.0.2", "cypress": "^13.15.1", "cypress-axe": "^1.5.0", - "eslint-config-cityssm": "^14.0.0", + "eslint-config-cityssm": "^14.0.1", "gulp": "^5.0.0", "gulp-sass": "^5.1.0", "nodemon": "^3.1.7", diff --git a/public/javascripts/adminLotTypes.js b/public/javascripts/adminLotTypes.js index 8b96abc4..9d010815 100644 --- a/public/javascripts/adminLotTypes.js +++ b/public/javascripts/adminLotTypes.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; diff --git a/public/javascripts/adminLotTypes.ts b/public/javascripts/adminLotTypes.ts index 1818a752..59c0d341 100644 --- a/public/javascripts/adminLotTypes.ts +++ b/public/javascripts/adminLotTypes.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { BulmaJS } from '@cityssm/bulma-js/types.js' import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js' diff --git a/public/javascripts/adminTables.js b/public/javascripts/adminTables.js index 05f10d93..1c4bb572 100644 --- a/public/javascripts/adminTables.js +++ b/public/javascripts/adminTables.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; @@ -72,7 +70,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); bulmaJS.confirm({ title: 'Delete Work Order Type', message: `Are you sure you want to delete this work order type?
- Note that no work orders will be removed.`, + Note that no work orders will be removed.`, messageIsHtml: true, contextualColorName: 'warning', okButton: { @@ -109,8 +107,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); const containerElement = document.querySelector('#container--workOrderTypes'); if (workOrderTypes.length === 0) { containerElement.innerHTML = ` -

There are no active work order types.

- `; +

There are no active work order types.

+ `; return; } containerElement.innerHTML = ''; @@ -236,7 +234,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); bulmaJS.confirm({ title: 'Delete Work Order Milestone Type', message: `Are you sure you want to delete this work order milestone type?
- Note that no work orders will be removed.`, + Note that no work orders will be removed.`, messageIsHtml: true, contextualColorName: 'warning', okButton: { @@ -273,8 +271,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); const containerElement = document.querySelector('#container--workOrderMilestoneTypes'); if (workOrderMilestoneTypes.length === 0) { containerElement.innerHTML = ` -

There are no active work order milestone types.

- `; +
+

There are no active work order milestone types.

+
+ `; return; } containerElement.innerHTML = ''; @@ -400,7 +400,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); bulmaJS.confirm({ title: `Delete ${los.escapedAliases.Lot} Status`, message: `Are you sure you want to delete this status?
- Note that no ${los.escapedAliases.lot} will be removed.`, + Note that no ${los.escapedAliases.lot} will be removed.`, messageIsHtml: true, contextualColorName: 'warning', okButton: { @@ -438,8 +438,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); if (lotStatuses.length === 0) { // eslint-disable-next-line no-unsanitized/property containerElement.innerHTML = ` -

There are no active ${los.escapedAliases.lot} statuses.

- `; +
+

There are no active ${los.escapedAliases.lot} statuses.

+
+ `; return; } containerElement.innerHTML = ''; @@ -603,10 +605,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); if (lotOccupantTypes.length === 0) { // eslint-disable-next-line no-unsanitized/property containerElement.innerHTML = ` -
-

There are no active ${los.escapedAliases.lot} ${los.escapedAliases.occupant} types.

-
- `; +
+

There are no active ${los.escapedAliases.lot} ${los.escapedAliases.occupant} types.

+
+ `; return; } containerElement.innerHTML = ''; diff --git a/public/javascripts/adminTables.ts b/public/javascripts/adminTables.ts index 39910a01..a1194c3b 100644 --- a/public/javascripts/adminTables.ts +++ b/public/javascripts/adminTables.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { BulmaJS } from '@cityssm/bulma-js/types.js' import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js' @@ -121,7 +118,7 @@ declare const bulmaJS: BulmaJS bulmaJS.confirm({ title: 'Delete Work Order Type', message: `Are you sure you want to delete this work order type?
- Note that no work orders will be removed.`, + Note that no work orders will be removed.`, messageIsHtml: true, contextualColorName: 'warning', okButton: { @@ -172,8 +169,8 @@ declare const bulmaJS: BulmaJS if (workOrderTypes.length === 0) { containerElement.innerHTML = ` -

There are no active work order types.

- ` +

There are no active work order types.

+ ` return } @@ -361,7 +358,7 @@ declare const bulmaJS: BulmaJS bulmaJS.confirm({ title: 'Delete Work Order Milestone Type', message: `Are you sure you want to delete this work order milestone type?
- Note that no work orders will be removed.`, + Note that no work orders will be removed.`, messageIsHtml: true, contextualColorName: 'warning', okButton: { @@ -413,8 +410,10 @@ declare const bulmaJS: BulmaJS if (workOrderMilestoneTypes.length === 0) { containerElement.innerHTML = ` -

There are no active work order milestone types.

- ` +
+

There are no active work order milestone types.

+
+ ` return } @@ -602,7 +601,7 @@ declare const bulmaJS: BulmaJS bulmaJS.confirm({ title: `Delete ${los.escapedAliases.Lot} Status`, message: `Are you sure you want to delete this status?
- Note that no ${los.escapedAliases.lot} will be removed.`, + Note that no ${los.escapedAliases.lot} will be removed.`, messageIsHtml: true, contextualColorName: 'warning', okButton: { @@ -654,8 +653,10 @@ declare const bulmaJS: BulmaJS if (lotStatuses.length === 0) { // eslint-disable-next-line no-unsanitized/property containerElement.innerHTML = ` -

There are no active ${los.escapedAliases.lot} statuses.

- ` +
+

There are no active ${los.escapedAliases.lot} statuses.

+
+ ` return } @@ -893,10 +894,10 @@ declare const bulmaJS: BulmaJS if (lotOccupantTypes.length === 0) { // eslint-disable-next-line no-unsanitized/property containerElement.innerHTML = ` -
-

There are no active ${los.escapedAliases.lot} ${los.escapedAliases.occupant} types.

-
- ` +
+

There are no active ${los.escapedAliases.lot} ${los.escapedAliases.occupant} types.

+
+ ` return } diff --git a/public/javascripts/dashboard.js b/public/javascripts/dashboard.js index 8bbb2709..8fb9fdf3 100644 --- a/public/javascripts/dashboard.js +++ b/public/javascripts/dashboard.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; diff --git a/public/javascripts/dashboard.ts b/public/javascripts/dashboard.ts index c14e7940..aa25e63a 100644 --- a/public/javascripts/dashboard.ts +++ b/public/javascripts/dashboard.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { LOS } from '../../types/globalTypes.js' declare const exports: Record diff --git a/public/javascripts/lotOccupancyEdit.js b/public/javascripts/lotOccupancyEdit.js index b092db78..df8d6f11 100644 --- a/public/javascripts/lotOccupancyEdit.js +++ b/public/javascripts/lotOccupancyEdit.js @@ -28,7 +28,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); if (responseJSON.success) { clearUnsavedChanges(); if (isCreate || refreshAfterSave) { - window.location.href = los.getLotOccupancyURL(responseJSON.lotOccupancyId, true, true); + globalThis.location.href = los.getLotOccupancyURL(responseJSON.lotOccupancyId, true, true); } else { bulmaJS.alert({ @@ -57,7 +57,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const responseJSON = rawResponseJSON; if (responseJSON.success) { clearUnsavedChanges(); - window.location.href = los.getLotOccupancyURL(responseJSON.lotOccupancyId, true); + globalThis.location.href = los.getLotOccupancyURL(responseJSON.lotOccupancyId, true); } else { bulmaJS.alert({ @@ -102,7 +102,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const responseJSON = rawResponseJSON; if (responseJSON.success) { clearUnsavedChanges(); - window.location.href = los.getLotOccupancyURL(); + globalThis.location.href = los.getLotOccupancyURL(); } else { bulmaJS.alert({ @@ -141,7 +141,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); okButton: { text: 'Yes, Open the Work Order', callbackFunction: () => { - window.location.href = los.getWorkOrderURL(responseJSON.workOrderId, true); + globalThis.location.href = los.getWorkOrderURL(responseJSON.workOrderId, true); } } }); @@ -1355,11 +1355,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); categoryContainerElement .querySelector('.columns') ?.insertAdjacentHTML('beforeend', `
- -
`); + + `); categoryContainerElement .querySelector('button') ?.addEventListener('click', doAddFeeCategory); @@ -1519,7 +1519,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); }); } bulmaJS.confirm({ - title: 'Delete Trasnaction', + title: 'Delete Transaction', message: 'Are you sure you want to delete this transaction?', contextualColorName: 'warning', okButton: { diff --git a/public/javascripts/lotOccupancyEdit.ts b/public/javascripts/lotOccupancyEdit.ts index 62d5daca..1fd1b054 100644 --- a/public/javascripts/lotOccupancyEdit.ts +++ b/public/javascripts/lotOccupancyEdit.ts @@ -71,7 +71,7 @@ declare const exports: Record clearUnsavedChanges() if (isCreate || refreshAfterSave) { - window.location.href = los.getLotOccupancyURL( + globalThis.location.href = los.getLotOccupancyURL( responseJSON.lotOccupancyId, true, true @@ -115,7 +115,7 @@ declare const exports: Record if (responseJSON.success) { clearUnsavedChanges() - window.location.href = los.getLotOccupancyURL( + globalThis.location.href = los.getLotOccupancyURL( responseJSON.lotOccupancyId, true ) @@ -173,7 +173,7 @@ declare const exports: Record if (responseJSON.success) { clearUnsavedChanges() - window.location.href = los.getLotOccupancyURL() + globalThis.location.href = los.getLotOccupancyURL() } else { bulmaJS.alert({ title: 'Error Deleting Record', @@ -226,7 +226,7 @@ declare const exports: Record okButton: { text: 'Yes, Open the Work Order', callbackFunction: () => { - window.location.href = los.getWorkOrderURL( + globalThis.location.href = los.getWorkOrderURL( responseJSON.workOrderId, true ) @@ -2197,11 +2197,11 @@ declare const exports: Record ?.insertAdjacentHTML( 'beforeend', `
- -
` + + ` ) categoryContainerElement @@ -2474,7 +2474,7 @@ declare const exports: Record } bulmaJS.confirm({ - title: 'Delete Trasnaction', + title: 'Delete Transaction', message: 'Are you sure you want to delete this transaction?', contextualColorName: 'warning', okButton: { diff --git a/public/javascripts/lotOccupancySearch.js b/public/javascripts/lotOccupancySearch.js index 230b1b40..eba4a0df 100644 --- a/public/javascripts/lotOccupancySearch.js +++ b/public/javascripts/lotOccupancySearch.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; @@ -52,14 +50,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); ${cityssm.escapeHTML(occupant.occupantFamilyName ?? '')} `; } - const feeTotal = (lotOccupancy.lotOccupancyFees?.reduce((soFar, currentFee) => { - return (soFar + - ((currentFee.feeAmount ?? 0) + (currentFee.taxAmount ?? 0)) * - (currentFee.quantity ?? 0)); - }, 0) ?? 0).toFixed(2); - const transactionTotal = (lotOccupancy.lotOccupancyTransactions?.reduce((soFar, currentTransaction) => { - return soFar + currentTransaction.transactionAmount; - }, 0) ?? 0).toFixed(2); + const feeTotal = (lotOccupancy.lotOccupancyFees?.reduce((soFar, currentFee) => soFar + + ((currentFee.feeAmount ?? 0) + (currentFee.taxAmount ?? 0)) * + (currentFee.quantity ?? 0), 0) ?? 0).toFixed(2); + const transactionTotal = (lotOccupancy.lotOccupancyTransactions?.reduce((soFar, currentTransaction) => soFar + currentTransaction.transactionAmount, 0) ?? 0).toFixed(2); let feeIconHTML = ''; if (feeTotal !== '0.00' || transactionTotal !== '0.00') { feeIconHTML = ` } const feeTotal = ( - lotOccupancy.lotOccupancyFees?.reduce((soFar, currentFee): number => { - return ( + lotOccupancy.lotOccupancyFees?.reduce( + (soFar, currentFee): number => soFar + ((currentFee.feeAmount ?? 0) + (currentFee.taxAmount ?? 0)) * - (currentFee.quantity ?? 0) - ) - }, 0) ?? 0 + (currentFee.quantity ?? 0), + 0 + ) ?? 0 ).toFixed(2) const transactionTotal = ( lotOccupancy.lotOccupancyTransactions?.reduce( - (soFar, currentTransaction): number => { - return soFar + currentTransaction.transactionAmount - }, + (soFar, currentTransaction): number => + soFar + currentTransaction.transactionAmount, 0 ) ?? 0 ).toFixed(2) diff --git a/public/javascripts/lotSearch.js b/public/javascripts/lotSearch.js index 8af0e940..4189e159 100644 --- a/public/javascripts/lotSearch.js +++ b/public/javascripts/lotSearch.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; diff --git a/public/javascripts/lotSearch.ts b/public/javascripts/lotSearch.ts index 33c403e5..d5e9fb60 100644 --- a/public/javascripts/lotSearch.ts +++ b/public/javascripts/lotSearch.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js' import type { LOS } from '../../types/globalTypes.js' @@ -28,7 +25,7 @@ declare const exports: Record '#searchFilter--offset' ) as HTMLInputElement - function renderLots(rawResponseJSON): void { + function renderLots(rawResponseJSON: unknown): void { const responseJSON = rawResponseJSON as { count: number offset: number diff --git a/public/javascripts/lotView.js b/public/javascripts/lotView.js index f0a2ee7e..b5a2727d 100644 --- a/public/javascripts/lotView.js +++ b/public/javascripts/lotView.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const mapContainerElement = document.querySelector('#lot--map'); diff --git a/public/javascripts/lotView.ts b/public/javascripts/lotView.ts index a9e1474c..e6300697 100644 --- a/public/javascripts/lotView.ts +++ b/public/javascripts/lotView.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { LOS } from '../../types/globalTypes.js' declare const exports: Record diff --git a/public/javascripts/main.js b/public/javascripts/main.js index 47105eb5..62a9c809 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { /* @@ -36,12 +34,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); svgId = svgId.slice(0, Math.max(0, svgId.lastIndexOf('-'))); } if (svgElementToHighlight !== null) { - // eslint-disable-next-line unicorn/no-null svgElementToHighlight.style.fill = ''; svgElementToHighlight.classList.add('highlight', `is-${contextualClass}`); const childPathElements = svgElementToHighlight.querySelectorAll('path'); for (const pathElement of childPathElements) { - // eslint-disable-next-line unicorn/no-null pathElement.style.fill = ''; } } @@ -83,7 +79,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); function initializeDatePickers(containerElement) { const dateElements = containerElement.querySelectorAll("input[type='date']"); for (const dateElement of dateElements) { - const datePickerOptions = Object.assign({}, datePickerBaseOptions); + const datePickerOptions = { ...datePickerBaseOptions }; if (dateElement.required) { datePickerOptions.showClearButton = false; } diff --git a/public/javascripts/main.ts b/public/javascripts/main.ts index eaa315d4..21edf94d 100644 --- a/public/javascripts/main.ts +++ b/public/javascripts/main.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { BulmaJS } from '@cityssm/bulma-js/types.js' import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js' import type { Options as BulmaCalendarOptions } from 'bulma-calendar' @@ -79,14 +76,12 @@ declare const exports: Record & { } if (svgElementToHighlight !== null) { - // eslint-disable-next-line unicorn/no-null svgElementToHighlight.style.fill = '' svgElementToHighlight.classList.add('highlight', `is-${contextualClass}`) const childPathElements = svgElementToHighlight.querySelectorAll('path') for (const pathElement of childPathElements) { - // eslint-disable-next-line unicorn/no-null pathElement.style.fill = '' } } @@ -144,7 +139,7 @@ declare const exports: Record & { containerElement.querySelectorAll("input[type='date']") for (const dateElement of dateElements) { - const datePickerOptions = Object.assign({}, datePickerBaseOptions) + const datePickerOptions = { ...datePickerBaseOptions } if (dateElement.required) { datePickerOptions.showClearButton = false diff --git a/public/javascripts/mapEdit.js b/public/javascripts/mapEdit.js index 2e0b8e0b..bddcb4fa 100644 --- a/public/javascripts/mapEdit.js +++ b/public/javascripts/mapEdit.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; @@ -27,7 +25,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); if (responseJSON.success) { clearUnsavedChanges(); if (isCreate) { - window.location.href = los.getMapURL(responseJSON.mapId, true); + globalThis.location.href = los.getMapURL(responseJSON.mapId, true); } else { bulmaJS.alert({ @@ -60,7 +58,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); }, (rawResponseJSON) => { const responseJSON = rawResponseJSON; if (responseJSON.success) { - window.location.href = los.getMapURL(); + globalThis.location.href = los.getMapURL(); } else { bulmaJS.alert({ diff --git a/public/javascripts/mapEdit.ts b/public/javascripts/mapEdit.ts index 0573282b..ba77b95f 100644 --- a/public/javascripts/mapEdit.ts +++ b/public/javascripts/mapEdit.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { BulmaJS } from '@cityssm/bulma-js/types.js' import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js' @@ -50,7 +47,7 @@ declare const exports: Record clearUnsavedChanges() if (isCreate) { - window.location.href = los.getMapURL(responseJSON.mapId, true) + globalThis.location.href = los.getMapURL(responseJSON.mapId, true) } else { bulmaJS.alert({ message: `${los.escapedAliases.Map} Updated Successfully`, @@ -95,7 +92,7 @@ declare const exports: Record } if (responseJSON.success) { - window.location.href = los.getMapURL() + globalThis.location.href = los.getMapURL() } else { bulmaJS.alert({ title: `Error Deleting ${los.escapedAliases.Map}`, diff --git a/public/javascripts/mapSearch.js b/public/javascripts/mapSearch.js index 853d7387..a4778e21 100644 --- a/public/javascripts/mapSearch.js +++ b/public/javascripts/mapSearch.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; diff --git a/public/javascripts/mapSearch.ts b/public/javascripts/mapSearch.ts index 1c7f09e2..c3002a07 100644 --- a/public/javascripts/mapSearch.ts +++ b/public/javascripts/mapSearch.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js' import type { LOS } from '../../types/globalTypes.js' diff --git a/public/javascripts/reportSearch.js b/public/javascripts/reportSearch.js index 035073a8..ba0bae8e 100644 --- a/public/javascripts/reportSearch.js +++ b/public/javascripts/reportSearch.js @@ -1,5 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ ; (() => { const menuTabElements = document.querySelectorAll('.menu a'); diff --git a/public/javascripts/reportSearch.ts b/public/javascripts/reportSearch.ts index 2faed017..e581794a 100644 --- a/public/javascripts/reportSearch.ts +++ b/public/javascripts/reportSearch.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - ;(() => { const menuTabElements: NodeListOf = document.querySelectorAll('.menu a') diff --git a/public/javascripts/workOrderEdit.js b/public/javascripts/workOrderEdit.js index fa084417..1b9c587e 100644 --- a/public/javascripts/workOrderEdit.js +++ b/public/javascripts/workOrderEdit.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; @@ -30,7 +28,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); if (responseJSON.success) { clearUnsavedChanges(); if (isCreate) { - window.location.href = los.getWorkOrderURL(responseJSON.workOrderId, true); + globalThis.location.href = los.getWorkOrderURL(responseJSON.workOrderId, true); } else { bulmaJS.alert({ @@ -62,7 +60,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const responseJSON = rawResponseJSON; if (responseJSON.success) { clearUnsavedChanges(); - window.location.href = los.getWorkOrderURL(workOrderId); + globalThis.location.href = los.getWorkOrderURL(workOrderId); } else { bulmaJS.alert({ @@ -80,7 +78,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const responseJSON = rawResponseJSON; if (responseJSON.success) { clearUnsavedChanges(); - window.location.href = `${los.urlPrefix}/workOrders`; + globalThis.location.href = `${los.urlPrefix}/workOrders`; } else { bulmaJS.alert({ @@ -95,9 +93,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); document .querySelector('#button--closeWorkOrder') ?.addEventListener('click', () => { - const hasOpenMilestones = workOrderMilestones.some((milestone) => { - return !milestone.workOrderMilestoneCompletionDate; - }); + const hasOpenMilestones = workOrderMilestones.some((milestone) => !milestone.workOrderMilestoneCompletionDate); if (hasOpenMilestones) { bulmaJS.alert({ title: 'Outstanding Milestones', @@ -242,23 +238,23 @@ Object.defineProperty(exports, "__esModule", { value: true }); if (workOrderLotOccupancies.length === 0) { // eslint-disable-next-line no-unsanitized/property occupanciesContainerElement.innerHTML = `
-

There are no ${los.escapedAliases.occupancies} associated with this work order.

-
`; +

There are no ${los.escapedAliases.occupancies} associated with this work order.

+ `; return; } // eslint-disable-next-line no-unsanitized/property occupanciesContainerElement.innerHTML = ` - - - - - - - - - - -
${los.escapedAliases.Occupancy} Type${los.escapedAliases.Lot}${los.escapedAliases.OccupancyStartDate}End Date${los.escapedAliases.Occupants}
`; + + + ${los.escapedAliases.Occupancy} Type + ${los.escapedAliases.Lot} + ${los.escapedAliases.OccupancyStartDate} + End Date + ${los.escapedAliases.Occupants} + + + + `; const currentDateString = cityssm.dateToString(new Date()); for (const lotOccupancy of workOrderLotOccupancies) { const rowElement = document.createElement('tr'); @@ -268,9 +264,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const isActive = !(lotOccupancy.occupancyEndDate && lotOccupancy.occupancyEndDateString < currentDateString); const hasLotRecord = lotOccupancy.lotId && - workOrderLots.some((lot) => { - return lotOccupancy.lotId === lot.lotId; - }); + workOrderLots.some((lot) => lotOccupancy.lotId === lot.lotId); // eslint-disable-next-line no-unsanitized/property rowElement.innerHTML = ` ${isActive @@ -303,15 +297,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); let occupantsHTML = ''; for (const occupant of lotOccupancy.lotOccupancyOccupants) { occupantsHTML += `
  • - - + + - - ${cityssm.escapeHTML(occupant.occupantName ?? '')} - ${cityssm.escapeHTML(occupant.occupantFamilyName ?? '')} -
  • `; +
    + ${cityssm.escapeHTML(occupant.occupantName ?? '')} + ${cityssm.escapeHTML(occupant.occupantFamilyName ?? '')} + `; } // eslint-disable-next-line no-unsanitized/method rowElement.insertAdjacentHTML('beforeend', ` @@ -340,9 +334,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); } function openEditLotStatus(clickEvent) { const lotId = Number.parseInt(clickEvent.currentTarget.closest('.container--lot').dataset.lotId ?? '', 10); - const lot = workOrderLots.find((possibleLot) => { - return possibleLot.lotId === lotId; - }); + const lot = workOrderLots.find((possibleLot) => possibleLot.lotId === lotId); let editCloseModalFunction; function doUpdateLotStatus(submitEvent) { submitEvent.preventDefault(); @@ -441,46 +433,46 @@ Object.defineProperty(exports, "__esModule", { value: true }); if (workOrderLots.length === 0) { // eslint-disable-next-line no-unsanitized/property lotsContainerElement.innerHTML = `
    -

    There are no ${los.escapedAliases.lots} associated with this work order.

    -
    `; +

    There are no ${los.escapedAliases.lots} associated with this work order.

    + `; return; } // eslint-disable-next-line no-unsanitized/property lotsContainerElement.innerHTML = ` - - - - - - - - -
    ${los.escapedAliases.Lot}${los.escapedAliases.Map}${los.escapedAliases.Lot} TypeStatus
    `; + + ${los.escapedAliases.Lot} + ${los.escapedAliases.Map} + ${los.escapedAliases.Lot} Type + Status + + + + `; for (const lot of workOrderLots) { const rowElement = document.createElement('tr'); rowElement.className = 'container--lot'; rowElement.dataset.lotId = lot.lotId.toString(); // eslint-disable-next-line no-unsanitized/property rowElement.innerHTML = ` - - ${cityssm.escapeHTML(lot.lotName ?? '')} - - - ${cityssm.escapeHTML(lot.mapName ?? '')} - - ${cityssm.escapeHTML(lot.lotType ?? '')} - - ${lot.lotStatusId + + ${cityssm.escapeHTML(lot.lotName ?? '')} + + + ${cityssm.escapeHTML(lot.mapName ?? '')} + + ${cityssm.escapeHTML(lot.lotType ?? '')} + + ${lot.lotStatusId ? cityssm.escapeHTML(lot.lotStatus ?? '') : '(No Status)'} - - - - `; + + + + `; rowElement .querySelector('.button--editLotStatus') ?.addEventListener('click', openEditLotStatus); @@ -520,35 +512,35 @@ Object.defineProperty(exports, "__esModule", { value: true }); const responseJSON = rawResponseJSON; if (responseJSON.lotOccupancies.length === 0) { searchResultsContainerElement.innerHTML = `
    -

    There are no records that meet the search criteria.

    -
    `; +

    There are no records that meet the search criteria.

    + `; return; } // eslint-disable-next-line no-unsanitized/property searchResultsContainerElement.innerHTML = ` - - - - - - - - - -
    ${los.escapedAliases.Occupancy} Type${los.escapedAliases.Lot}${los.escapedAliases.OccupancyStartDate}End Date${los.escapedAliases.Occupants}
    `; + + + ${los.escapedAliases.Occupancy} Type + ${los.escapedAliases.Lot} + ${los.escapedAliases.OccupancyStartDate} + End Date + ${los.escapedAliases.Occupants} + + + `; for (const lotOccupancy of responseJSON.lotOccupancies) { const rowElement = document.createElement('tr'); rowElement.className = 'container--lotOccupancy'; rowElement.dataset.lotOccupancyId = lotOccupancy.lotOccupancyId.toString(); rowElement.innerHTML = ` - - - - ${cityssm.escapeHTML(lotOccupancy.occupancyType ?? '')} - `; + + + + ${cityssm.escapeHTML(lotOccupancy.occupancyType ?? '')} + `; if (lotOccupancy.lotId) { rowElement.insertAdjacentHTML('beforeend', `${cityssm.escapeHTML(lotOccupancy.lotName ?? '')}`); } @@ -638,32 +630,32 @@ Object.defineProperty(exports, "__esModule", { value: true }); } // eslint-disable-next-line no-unsanitized/property searchResultsContainerElement.innerHTML = ` - - - - - - - - -
    ${los.escapedAliases.Lot}${los.escapedAliases.Map}${los.escapedAliases.Lot} TypeStatus
    `; + + + ${los.escapedAliases.Lot} + ${los.escapedAliases.Map} + ${los.escapedAliases.Lot} Type + Status + + + `; for (const lot of responseJSON.lots) { const rowElement = document.createElement('tr'); rowElement.className = 'container--lot'; rowElement.dataset.lotId = lot.lotId.toString(); rowElement.innerHTML = ` - - - ${cityssm.escapeHTML(lot.lotName ?? '')} - - ${cityssm.escapeHTML(lot.mapName ?? '')} - - ${cityssm.escapeHTML(lot.lotType ?? '')} - - ${cityssm.escapeHTML(lot.lotStatus ?? '')} - `; + + + ${cityssm.escapeHTML(lot.lotName ?? '')} + + ${cityssm.escapeHTML(lot.mapName ?? '')} + + ${cityssm.escapeHTML(lot.lotType ?? '')} + + ${cityssm.escapeHTML(lot.lotStatus ?? '')} + `; rowElement .querySelector('.button--addLot') ?.addEventListener('click', doAddLot); @@ -716,9 +708,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); function openEditWorkOrderComment(clickEvent) { const workOrderCommentId = Number.parseInt(clickEvent.currentTarget.closest('tr')?.dataset .workOrderCommentId ?? '', 10); - const workOrderComment = workOrderComments.find((currentComment) => { - return currentComment.workOrderCommentId === workOrderCommentId; - }); + const workOrderComment = workOrderComments.find((currentComment) => currentComment.workOrderCommentId === workOrderCommentId); let editFormElement; let editCloseModalFunction; function editComment(submitEvent) { @@ -811,35 +801,37 @@ Object.defineProperty(exports, "__esModule", { value: true }); const tableElement = document.createElement('table'); tableElement.className = 'table is-fullwidth is-striped is-hoverable'; tableElement.innerHTML = ` - Commentor - Comment Date - Comment - Options`; + Commentor + Comment Date + Comment + Options + + `; for (const workOrderComment of workOrderComments) { const tableRowElement = document.createElement('tr'); tableRowElement.dataset.workOrderCommentId = workOrderComment.workOrderCommentId?.toString(); // eslint-disable-next-line no-unsanitized/property tableRowElement.innerHTML = ` - ${cityssm.escapeHTML(workOrderComment.recordCreate_userName ?? '')} - - ${workOrderComment.workOrderCommentDateString} - ${workOrderComment.workOrderCommentTime === 0 + ${cityssm.escapeHTML(workOrderComment.recordCreate_userName ?? '')} + + ${workOrderComment.workOrderCommentDateString} + ${workOrderComment.workOrderCommentTime === 0 ? '' : workOrderComment.workOrderCommentTimePeriodString} - - ${cityssm.escapeHTML(workOrderComment.workOrderComment ?? '')} - -
    - - -
    - `; + + ${cityssm.escapeHTML(workOrderComment.workOrderComment ?? '')} + +
    + + +
    + `; tableRowElement .querySelector('.button--edit') ?.addEventListener('click', openEditWorkOrderComment); @@ -910,9 +902,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); workOrderMilestoneDateString }, (rawResponseJSON) => { const responseJSON = rawResponseJSON; - const workOrderMilestones = responseJSON.workOrderMilestones.filter((possibleMilestone) => { - return possibleMilestone.workOrderId.toString() !== workOrderId; - }); + const workOrderMilestones = responseJSON.workOrderMilestones.filter((possibleMilestone) => possibleMilestone.workOrderId.toString() !== workOrderId); clearPanelBlockElements(targetPanelElement); for (const milestone of workOrderMilestones) { targetPanelElement.insertAdjacentHTML('beforeend', `
    @@ -960,9 +950,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); clickEvent.preventDefault(); const currentDateString = cityssm.dateToString(new Date()); const workOrderMilestoneId = Number.parseInt(clickEvent.currentTarget.closest('.container--milestone').dataset.workOrderMilestoneId ?? '', 10); - const workOrderMilestone = workOrderMilestones.find((currentMilestone) => { - return currentMilestone.workOrderMilestoneId === workOrderMilestoneId; - }); + const workOrderMilestone = workOrderMilestones.find((currentMilestone) => currentMilestone.workOrderMilestoneId === workOrderMilestoneId); function doComplete() { cityssm.postJSON(`${los.urlPrefix}/workOrders/doCompleteWorkOrderMilestone`, { workOrderId, @@ -1026,9 +1014,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); function editMilestone(clickEvent) { clickEvent.preventDefault(); const workOrderMilestoneId = Number.parseInt(clickEvent.currentTarget.closest('.container--milestone').dataset.workOrderMilestoneId ?? '', 10); - const workOrderMilestone = workOrderMilestones.find((currentMilestone) => { - return currentMilestone.workOrderMilestoneId === workOrderMilestoneId; - }); + const workOrderMilestone = workOrderMilestones.find((currentMilestone) => currentMilestone.workOrderMilestoneId === workOrderMilestoneId); let editCloseModalFunction; let workOrderMilestoneDateStringElement; function doEdit(submitEvent) { diff --git a/public/javascripts/workOrderEdit.ts b/public/javascripts/workOrderEdit.ts index 89711d37..adbd9977 100644 --- a/public/javascripts/workOrderEdit.ts +++ b/public/javascripts/workOrderEdit.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { BulmaJS } from '@cityssm/bulma-js/types.js' import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js' @@ -69,7 +66,7 @@ declare const exports: Record clearUnsavedChanges() if (isCreate) { - window.location.href = los.getWorkOrderURL( + globalThis.location.href = los.getWorkOrderURL( responseJSON.workOrderId, true ) @@ -116,7 +113,7 @@ declare const exports: Record if (responseJSON.success) { clearUnsavedChanges() - window.location.href = los.getWorkOrderURL(workOrderId) + globalThis.location.href = los.getWorkOrderURL(workOrderId) } else { bulmaJS.alert({ title: 'Error Closing Work Order', @@ -142,7 +139,7 @@ declare const exports: Record if (responseJSON.success) { clearUnsavedChanges() - window.location.href = `${los.urlPrefix}/workOrders` + globalThis.location.href = `${los.urlPrefix}/workOrders` } else { bulmaJS.alert({ title: 'Error Deleting Work Order', @@ -159,9 +156,9 @@ declare const exports: Record document .querySelector('#button--closeWorkOrder') ?.addEventListener('click', () => { - const hasOpenMilestones = workOrderMilestones.some((milestone) => { - return !milestone.workOrderMilestoneCompletionDate - }) + const hasOpenMilestones = workOrderMilestones.some( + (milestone) => !milestone.workOrderMilestoneCompletionDate + ) if (hasOpenMilestones) { bulmaJS.alert({ @@ -363,25 +360,25 @@ declare const exports: Record if (workOrderLotOccupancies.length === 0) { // eslint-disable-next-line no-unsanitized/property occupanciesContainerElement.innerHTML = `
    -

    There are no ${los.escapedAliases.occupancies} associated with this work order.

    -
    ` +

    There are no ${los.escapedAliases.occupancies} associated with this work order.

    +
    ` return } // eslint-disable-next-line no-unsanitized/property occupanciesContainerElement.innerHTML = ` - - - - - - - - - - -
    ${los.escapedAliases.Occupancy} Type${los.escapedAliases.Lot}${los.escapedAliases.OccupancyStartDate}End Date${los.escapedAliases.Occupants}
    ` + + + ${los.escapedAliases.Occupancy} Type + ${los.escapedAliases.Lot} + ${los.escapedAliases.OccupancyStartDate} + End Date + ${los.escapedAliases.Occupants} + + + + ` const currentDateString = cityssm.dateToString(new Date()) @@ -398,9 +395,7 @@ declare const exports: Record const hasLotRecord = lotOccupancy.lotId && - workOrderLots.some((lot) => { - return lotOccupancy.lotId === lot.lotId - }) + workOrderLots.some((lot) => lotOccupancy.lotId === lot.lotId) // eslint-disable-next-line no-unsanitized/property rowElement.innerHTML = ` @@ -446,17 +441,17 @@ declare const exports: Record for (const occupant of lotOccupancy.lotOccupancyOccupants!) { occupantsHTML += `
  • - - - - ${cityssm.escapeHTML(occupant.occupantName ?? '')} - ${cityssm.escapeHTML(occupant.occupantFamilyName ?? '')} -
  • ` + data-tooltip="${cityssm.escapeHTML(occupant.lotOccupantType ?? '')}"> + + + + ${cityssm.escapeHTML(occupant.occupantName ?? '')} + ${cityssm.escapeHTML(occupant.occupantFamilyName ?? '')} + ` } // eslint-disable-next-line no-unsanitized/method @@ -505,9 +500,9 @@ declare const exports: Record 10 ) - const lot = workOrderLots.find((possibleLot) => { - return possibleLot.lotId === lotId - }) as Lot + const lot = workOrderLots.find( + (possibleLot) => possibleLot.lotId === lotId + ) as Lot let editCloseModalFunction: () => void @@ -665,23 +660,23 @@ declare const exports: Record if (workOrderLots.length === 0) { // eslint-disable-next-line no-unsanitized/property lotsContainerElement.innerHTML = `
    -

    There are no ${los.escapedAliases.lots} associated with this work order.

    -
    ` +

    There are no ${los.escapedAliases.lots} associated with this work order.

    + ` return } // eslint-disable-next-line no-unsanitized/property lotsContainerElement.innerHTML = ` - - - - - - - - -
    ${los.escapedAliases.Lot}${los.escapedAliases.Map}${los.escapedAliases.Lot} TypeStatus
    ` + + ${los.escapedAliases.Lot} + ${los.escapedAliases.Map} + ${los.escapedAliases.Lot} Type + Status + + + + ` for (const lot of workOrderLots) { const rowElement = document.createElement('tr') @@ -691,27 +686,27 @@ declare const exports: Record // eslint-disable-next-line no-unsanitized/property rowElement.innerHTML = ` - - ${cityssm.escapeHTML(lot.lotName ?? '')} - - - ${cityssm.escapeHTML(lot.mapName ?? '')} - - ${cityssm.escapeHTML(lot.lotType ?? '')} - - ${ - lot.lotStatusId - ? cityssm.escapeHTML(lot.lotStatus ?? '') - : '(No Status)' - } - - - - ` + + ${cityssm.escapeHTML(lot.lotName ?? '')} + + + ${cityssm.escapeHTML(lot.mapName ?? '')} + + ${cityssm.escapeHTML(lot.lotType ?? '')} + + ${ + lot.lotStatusId + ? cityssm.escapeHTML(lot.lotStatus ?? '') + : '(No Status)' + } + + + + ` rowElement .querySelector('.button--editLotStatus') @@ -771,24 +766,24 @@ declare const exports: Record if (responseJSON.lotOccupancies.length === 0) { searchResultsContainerElement.innerHTML = `
    -

    There are no records that meet the search criteria.

    -
    ` +

    There are no records that meet the search criteria.

    + ` return } // eslint-disable-next-line no-unsanitized/property searchResultsContainerElement.innerHTML = ` - - - - - - - - - -
    ${los.escapedAliases.Occupancy} Type${los.escapedAliases.Lot}${los.escapedAliases.OccupancyStartDate}End Date${los.escapedAliases.Occupants}
    ` + + + ${los.escapedAliases.Occupancy} Type + ${los.escapedAliases.Lot} + ${los.escapedAliases.OccupancyStartDate} + End Date + ${los.escapedAliases.Occupants} + + + ` for (const lotOccupancy of responseJSON.lotOccupancies) { const rowElement = document.createElement('tr') @@ -797,13 +792,13 @@ declare const exports: Record lotOccupancy.lotOccupancyId.toString() rowElement.innerHTML = ` - - - - ${cityssm.escapeHTML(lotOccupancy.occupancyType ?? '')} - ` + + + + ${cityssm.escapeHTML(lotOccupancy.occupancyType ?? '')} + ` if (lotOccupancy.lotId) { rowElement.insertAdjacentHTML( @@ -966,15 +961,15 @@ declare const exports: Record // eslint-disable-next-line no-unsanitized/property searchResultsContainerElement.innerHTML = ` - - - - - - - - -
    ${los.escapedAliases.Lot}${los.escapedAliases.Map}${los.escapedAliases.Lot} TypeStatus
    ` + + + ${los.escapedAliases.Lot} + ${los.escapedAliases.Map} + ${los.escapedAliases.Lot} Type + Status + + + ` for (const lot of responseJSON.lots) { const rowElement = document.createElement('tr') @@ -982,18 +977,18 @@ declare const exports: Record rowElement.dataset.lotId = lot.lotId.toString() rowElement.innerHTML = ` - - - ${cityssm.escapeHTML(lot.lotName ?? '')} - - ${cityssm.escapeHTML(lot.mapName ?? '')} - - ${cityssm.escapeHTML(lot.lotType ?? '')} - - ${cityssm.escapeHTML(lot.lotStatus ?? '')} - ` + + + ${cityssm.escapeHTML(lot.lotName ?? '')} + + ${cityssm.escapeHTML(lot.mapName ?? '')} + + ${cityssm.escapeHTML(lot.lotType ?? '')} + + ${cityssm.escapeHTML(lot.lotStatus ?? '')} + ` rowElement .querySelector('.button--addLot') @@ -1078,9 +1073,10 @@ declare const exports: Record 10 ) - const workOrderComment = workOrderComments.find((currentComment) => { - return currentComment.workOrderCommentId === workOrderCommentId - }) as WorkOrderComment + const workOrderComment = workOrderComments.find( + (currentComment) => + currentComment.workOrderCommentId === workOrderCommentId + ) as WorkOrderComment let editFormElement: HTMLFormElement let editCloseModalFunction: () => void @@ -1234,10 +1230,12 @@ declare const exports: Record const tableElement = document.createElement('table') tableElement.className = 'table is-fullwidth is-striped is-hoverable' tableElement.innerHTML = ` - Commentor - Comment Date - Comment - Options` + Commentor + Comment Date + Comment + Options + + ` for (const workOrderComment of workOrderComments) { const tableRowElement = document.createElement('tr') @@ -1247,27 +1245,27 @@ declare const exports: Record // eslint-disable-next-line no-unsanitized/property tableRowElement.innerHTML = ` - ${cityssm.escapeHTML(workOrderComment.recordCreate_userName ?? '')} - - ${workOrderComment.workOrderCommentDateString} - ${ - workOrderComment.workOrderCommentTime === 0 - ? '' - : workOrderComment.workOrderCommentTimePeriodString - } - - ${cityssm.escapeHTML(workOrderComment.workOrderComment ?? '')} - -
    - - -
    - ` + ${cityssm.escapeHTML(workOrderComment.recordCreate_userName ?? '')} + + ${workOrderComment.workOrderCommentDateString} + ${ + workOrderComment.workOrderCommentTime === 0 + ? '' + : workOrderComment.workOrderCommentTimePeriodString + } + + ${cityssm.escapeHTML(workOrderComment.workOrderComment ?? '')} + +
    + + +
    + ` tableRowElement .querySelector('.button--edit') @@ -1389,9 +1387,8 @@ declare const exports: Record } const workOrderMilestones = responseJSON.workOrderMilestones.filter( - (possibleMilestone) => { - return possibleMilestone.workOrderId.toString() !== workOrderId - } + (possibleMilestone) => + possibleMilestone.workOrderId.toString() !== workOrderId ) clearPanelBlockElements(targetPanelElement) @@ -1466,9 +1463,10 @@ declare const exports: Record 10 ) - const workOrderMilestone = workOrderMilestones.find((currentMilestone) => { - return currentMilestone.workOrderMilestoneId === workOrderMilestoneId - }) as WorkOrderMilestone + const workOrderMilestone = workOrderMilestones.find( + (currentMilestone) => + currentMilestone.workOrderMilestoneId === workOrderMilestoneId + ) as WorkOrderMilestone function doComplete(): void { cityssm.postJSON( @@ -1575,9 +1573,10 @@ declare const exports: Record 10 ) - const workOrderMilestone = workOrderMilestones.find((currentMilestone) => { - return currentMilestone.workOrderMilestoneId === workOrderMilestoneId - }) as WorkOrderMilestone + const workOrderMilestone = workOrderMilestones.find( + (currentMilestone) => + currentMilestone.workOrderMilestoneId === workOrderMilestoneId + ) as WorkOrderMilestone let editCloseModalFunction: () => void let workOrderMilestoneDateStringElement: HTMLInputElement diff --git a/public/javascripts/workOrderSearch.js b/public/javascripts/workOrderSearch.js index f5b40ac7..e0e62d81 100644 --- a/public/javascripts/workOrderSearch.js +++ b/public/javascripts/workOrderSearch.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; diff --git a/public/javascripts/workOrderSearch.ts b/public/javascripts/workOrderSearch.ts index 5ce925b2..373e7113 100644 --- a/public/javascripts/workOrderSearch.ts +++ b/public/javascripts/workOrderSearch.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js' import type { LOS } from '../../types/globalTypes.js' diff --git a/public/javascripts/workOrderView.js b/public/javascripts/workOrderView.js index b618d30f..68549502 100644 --- a/public/javascripts/workOrderView.js +++ b/public/javascripts/workOrderView.js @@ -1,6 +1,4 @@ "use strict"; -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ Object.defineProperty(exports, "__esModule", { value: true }); (() => { const los = exports.los; diff --git a/public/javascripts/workOrderView.ts b/public/javascripts/workOrderView.ts index b06faa57..889531cb 100644 --- a/public/javascripts/workOrderView.ts +++ b/public/javascripts/workOrderView.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable unicorn/prefer-module */ - import type { BulmaJS } from '@cityssm/bulma-js/types.js' import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'