linting
parent
1ca3ea0a51
commit
84f009071d
|
|
@ -5,7 +5,12 @@ import type { BulmaJS } from '@cityssm/bulma-js/types.js'
|
|||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type { LOS } from '../types/globalTypes.js'
|
||||
import type * as recordTypes from '../types/recordTypes.js'
|
||||
import type {
|
||||
Fee,
|
||||
FeeCategory,
|
||||
LotType,
|
||||
OccupancyType
|
||||
} from '../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
declare const bulmaJS: BulmaJS
|
||||
|
|
@ -18,13 +23,13 @@ declare const exports: Record<string, unknown>
|
|||
'#container--feeCategories'
|
||||
) as HTMLElement
|
||||
|
||||
let feeCategories = exports.feeCategories as recordTypes.FeeCategory[]
|
||||
let feeCategories = exports.feeCategories as FeeCategory[]
|
||||
delete exports.feeCategories
|
||||
|
||||
type ResponseJSON =
|
||||
| {
|
||||
success: true
|
||||
feeCategories: recordTypes.FeeCategory[]
|
||||
feeCategories: FeeCategory[]
|
||||
}
|
||||
| {
|
||||
success: false
|
||||
|
|
@ -305,7 +310,7 @@ declare const exports: Record<string, unknown>
|
|||
|
||||
const feeCategory = feeCategories.find((currentFeeCategory) => {
|
||||
return currentFeeCategory.feeCategoryId === feeCategoryId
|
||||
}) as recordTypes.FeeCategory
|
||||
}) as FeeCategory
|
||||
|
||||
let editCloseModalFunction: () => void
|
||||
|
||||
|
|
@ -506,7 +511,7 @@ declare const exports: Record<string, unknown>
|
|||
'#feeAdd--occupancyTypeId'
|
||||
) as HTMLSelectElement
|
||||
|
||||
for (const occupancyType of exports.occupancyTypes as recordTypes.OccupancyType[]) {
|
||||
for (const occupancyType of exports.occupancyTypes as OccupancyType[]) {
|
||||
const optionElement = document.createElement('option')
|
||||
optionElement.value = occupancyType.occupancyTypeId.toString()
|
||||
optionElement.textContent = occupancyType.occupancyType
|
||||
|
|
@ -517,7 +522,7 @@ declare const exports: Record<string, unknown>
|
|||
'#feeAdd--lotTypeId'
|
||||
) as HTMLSelectElement
|
||||
|
||||
for (const lotType of exports.lotTypes as recordTypes.LotType[]) {
|
||||
for (const lotType of exports.lotTypes as LotType[]) {
|
||||
const optionElement = document.createElement('option')
|
||||
optionElement.value = lotType.lotTypeId.toString()
|
||||
optionElement.textContent = lotType.lotType
|
||||
|
|
@ -627,11 +632,11 @@ declare const exports: Record<string, unknown>
|
|||
|
||||
const feeCategory = feeCategories.find((currentFeeCategory) => {
|
||||
return currentFeeCategory.feeCategoryId === feeCategoryId
|
||||
}) as recordTypes.FeeCategory
|
||||
}) as FeeCategory
|
||||
|
||||
const fee = feeCategory.fees.find((currentFee) => {
|
||||
return currentFee.feeId === feeId
|
||||
}) as recordTypes.Fee
|
||||
}) as Fee
|
||||
|
||||
let editCloseModalFunction: () => void
|
||||
let editModalElement: HTMLElement
|
||||
|
|
@ -795,7 +800,7 @@ declare const exports: Record<string, unknown>
|
|||
'#feeEdit--occupancyTypeId'
|
||||
) as HTMLSelectElement
|
||||
|
||||
for (const occupancyType of exports.occupancyTypes as recordTypes.OccupancyType[]) {
|
||||
for (const occupancyType of exports.occupancyTypes as OccupancyType[]) {
|
||||
const optionElement = document.createElement('option')
|
||||
optionElement.value = occupancyType.occupancyTypeId.toString()
|
||||
optionElement.textContent = occupancyType.occupancyType
|
||||
|
|
@ -811,7 +816,7 @@ declare const exports: Record<string, unknown>
|
|||
'#feeEdit--lotTypeId'
|
||||
) as HTMLSelectElement
|
||||
|
||||
for (const lotType of exports.lotTypes as recordTypes.LotType[]) {
|
||||
for (const lotType of exports.lotTypes as LotType[]) {
|
||||
const optionElement = document.createElement('option')
|
||||
optionElement.value = lotType.lotTypeId.toString()
|
||||
optionElement.textContent = lotType.lotType
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type { BulmaJS } from '@cityssm/bulma-js/types.js'
|
|||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type { LOS } from '../types/globalTypes.js'
|
||||
import type * as recordTypes from '../types/recordTypes.js'
|
||||
import type { LotType, LotTypeField } from '../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
declare const bulmaJS: BulmaJS
|
||||
|
|
@ -15,7 +15,7 @@ declare const exports: Record<string, unknown>
|
|||
type ResponseJSON =
|
||||
| {
|
||||
success: true
|
||||
lotTypes: recordTypes.LotType[]
|
||||
lotTypes: LotType[]
|
||||
lotTypeFieldId?: number
|
||||
}
|
||||
| {
|
||||
|
|
@ -29,7 +29,7 @@ type ResponseJSON =
|
|||
'#container--lotTypes'
|
||||
) as HTMLElement
|
||||
|
||||
let lotTypes = exports.lotTypes as recordTypes.LotType[]
|
||||
let lotTypes = exports.lotTypes as LotType[]
|
||||
delete exports.lotTypes
|
||||
|
||||
const expandedLotTypes = new Set<number>()
|
||||
|
|
@ -121,7 +121,7 @@ type ResponseJSON =
|
|||
|
||||
const lotType = lotTypes.find((currentLotType) => {
|
||||
return lotTypeId === currentLotType.lotTypeId
|
||||
}) as recordTypes.LotType
|
||||
}) as LotType
|
||||
|
||||
let editCloseModalFunction: () => void
|
||||
|
||||
|
|
@ -266,13 +266,13 @@ type ResponseJSON =
|
|||
): void {
|
||||
const lotType = lotTypes.find((currentLotType) => {
|
||||
return currentLotType.lotTypeId === lotTypeId
|
||||
}) as recordTypes.LotType
|
||||
}) as LotType
|
||||
|
||||
const lotTypeField = (lotType.lotTypeFields ?? []).find(
|
||||
(currentLotTypeField) => {
|
||||
return currentLotTypeField.lotTypeFieldId === lotTypeFieldId
|
||||
}
|
||||
) as recordTypes.LotTypeField
|
||||
) as LotTypeField
|
||||
|
||||
let minimumLengthElement: HTMLInputElement
|
||||
let maximumLengthElement: HTMLInputElement
|
||||
|
|
@ -464,7 +464,7 @@ type ResponseJSON =
|
|||
function renderLotTypeFields(
|
||||
panelElement: HTMLElement,
|
||||
lotTypeId: number,
|
||||
lotTypeFields: recordTypes.LotTypeField[]
|
||||
lotTypeFields: LotTypeField[]
|
||||
): void {
|
||||
if (lotTypeFields.length === 0) {
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type { BulmaJS } from '@cityssm/bulma-js/types.js'
|
|||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type { LOS } from '../types/globalTypes.js'
|
||||
import type * as recordTypes from '../types/recordTypes.js'
|
||||
import type { OccupancyType, OccupancyTypeField } from '../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
declare const bulmaJS: BulmaJS
|
||||
|
|
@ -15,8 +15,8 @@ declare const exports: Record<string, unknown>
|
|||
type ResponseJSON =
|
||||
| {
|
||||
success: true
|
||||
occupancyTypes: recordTypes.OccupancyType[]
|
||||
allOccupancyTypeFields: recordTypes.OccupancyTypeField[]
|
||||
occupancyTypes: OccupancyType[]
|
||||
allOccupancyTypeFields: OccupancyTypeField[]
|
||||
occupancyTypeFieldId?: number
|
||||
}
|
||||
| {
|
||||
|
|
@ -34,11 +34,11 @@ type ResponseJSON =
|
|||
'#container--occupancyTypePrints'
|
||||
) as HTMLElement
|
||||
|
||||
let occupancyTypes = exports.occupancyTypes as recordTypes.OccupancyType[]
|
||||
let occupancyTypes = exports.occupancyTypes as OccupancyType[]
|
||||
delete exports.occupancyTypes
|
||||
|
||||
let allOccupancyTypeFields =
|
||||
exports.allOccupancyTypeFields as recordTypes.OccupancyTypeField[]
|
||||
exports.allOccupancyTypeFields as OccupancyTypeField[]
|
||||
delete exports.allOccupancyTypeFields
|
||||
|
||||
const expandedOccupancyTypes = new Set<number>()
|
||||
|
|
@ -78,8 +78,8 @@ type ResponseJSON =
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
occupancyTypes: recordTypes.OccupancyType[]
|
||||
allOccupancyTypeFields: recordTypes.OccupancyTypeField[]
|
||||
occupancyTypes: OccupancyType[]
|
||||
allOccupancyTypeFields: OccupancyTypeField[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -138,7 +138,7 @@ type ResponseJSON =
|
|||
|
||||
const occupancyType = occupancyTypes.find((currentOccupancyType) => {
|
||||
return occupancyTypeId === currentOccupancyType.occupancyTypeId
|
||||
}) as recordTypes.OccupancyType
|
||||
}) as OccupancyType
|
||||
|
||||
let editCloseModalFunction: () => void
|
||||
|
||||
|
|
@ -283,7 +283,7 @@ type ResponseJSON =
|
|||
occupancyTypeId: number,
|
||||
occupancyTypeFieldId: number
|
||||
): void {
|
||||
let occupancyType: recordTypes.OccupancyType | undefined
|
||||
let occupancyType: OccupancyType | undefined
|
||||
|
||||
if (occupancyTypeId) {
|
||||
occupancyType = occupancyTypes.find((currentOccupancyType) => {
|
||||
|
|
@ -299,7 +299,7 @@ type ResponseJSON =
|
|||
return (
|
||||
currentOccupancyTypeField.occupancyTypeFieldId === occupancyTypeFieldId
|
||||
)
|
||||
}) as recordTypes.OccupancyTypeField
|
||||
}) as OccupancyTypeField
|
||||
|
||||
let minimumLengthElement: HTMLInputElement
|
||||
let maximumLengthElement: HTMLInputElement
|
||||
|
|
@ -498,7 +498,7 @@ type ResponseJSON =
|
|||
function renderOccupancyTypeFields(
|
||||
panelElement: HTMLElement,
|
||||
occupancyTypeId: number | undefined,
|
||||
occupancyTypeFields: recordTypes.OccupancyTypeField[]
|
||||
occupancyTypeFields: OccupancyTypeField[]
|
||||
): void {
|
||||
if (occupancyTypeFields.length === 0) {
|
||||
// eslint-disable-next-line no-unsanitized/method
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type { BulmaJS } from '@cityssm/bulma-js/types.js'
|
|||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type { LOS } from '../types/globalTypes.js'
|
||||
import type * as recordTypes from '../types/recordTypes.js'
|
||||
import type { LotComment, LotTypeField } from '../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
declare const bulmaJS: BulmaJS
|
||||
|
|
@ -153,7 +153,7 @@ declare const exports: Record<string, unknown>
|
|||
},
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
lotTypeFields: recordTypes.LotTypeField[]
|
||||
lotTypeFields: LotTypeField[]
|
||||
}
|
||||
|
||||
if (responseJSON.lotTypeFields.length === 0) {
|
||||
|
|
@ -274,7 +274,7 @@ declare const exports: Record<string, unknown>
|
|||
|
||||
// Comments
|
||||
|
||||
let lotComments = exports.lotComments as recordTypes.LotComment[]
|
||||
let lotComments = exports.lotComments as LotComment[]
|
||||
delete exports.lotComments
|
||||
|
||||
function openEditLotComment(clickEvent: Event): void {
|
||||
|
|
@ -286,7 +286,7 @@ declare const exports: Record<string, unknown>
|
|||
|
||||
const lotComment = lotComments.find((currentLotComment) => {
|
||||
return currentLotComment.lotCommentId === lotCommentId
|
||||
}) as recordTypes.LotComment
|
||||
}) as LotComment
|
||||
|
||||
let editFormElement: HTMLFormElement
|
||||
let editCloseModalFunction: () => void
|
||||
|
|
@ -301,7 +301,7 @@ declare const exports: Record<string, unknown>
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotComments: recordTypes.LotComment[]
|
||||
lotComments: LotComment[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -397,7 +397,7 @@ declare const exports: Record<string, unknown>
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotComments: recordTypes.LotComment[]
|
||||
lotComments: LotComment[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -502,7 +502,7 @@ declare const exports: Record<string, unknown>
|
|||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
lotComments: recordTypes.LotComment[]
|
||||
lotComments: LotComment[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
|
|||
|
|
@ -361,15 +361,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
submitEvent.preventDefault();
|
||||
const lotName = lotSelectModalElement.querySelector('#lotCreate--lotName').value;
|
||||
cityssm.postJSON(`${los.urlPrefix}/lots/doCreateLot`, submitEvent.currentTarget, (rawResponseJSON) => {
|
||||
var _a;
|
||||
var _a, _b;
|
||||
const responseJSON = rawResponseJSON;
|
||||
if (responseJSON.success) {
|
||||
renderSelectedLotAndClose(responseJSON.lotId, lotName);
|
||||
renderSelectedLotAndClose((_a = responseJSON.lotId) !== null && _a !== void 0 ? _a : '', lotName);
|
||||
}
|
||||
else {
|
||||
bulmaJS.alert({
|
||||
title: `Error Creating ${los.escapedAliases.Lot}`,
|
||||
message: (_a = responseJSON.errorMessage) !== null && _a !== void 0 ? _a : '',
|
||||
message: (_b = responseJSON.errorMessage) !== null && _b !== void 0 ? _b : '',
|
||||
contextualColorName: 'danger'
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -361,15 +361,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
submitEvent.preventDefault();
|
||||
const lotName = lotSelectModalElement.querySelector('#lotCreate--lotName').value;
|
||||
cityssm.postJSON(`${los.urlPrefix}/lots/doCreateLot`, submitEvent.currentTarget, (rawResponseJSON) => {
|
||||
var _a;
|
||||
var _a, _b;
|
||||
const responseJSON = rawResponseJSON;
|
||||
if (responseJSON.success) {
|
||||
renderSelectedLotAndClose(responseJSON.lotId, lotName);
|
||||
renderSelectedLotAndClose((_a = responseJSON.lotId) !== null && _a !== void 0 ? _a : '', lotName);
|
||||
}
|
||||
else {
|
||||
bulmaJS.alert({
|
||||
title: `Error Creating ${los.escapedAliases.Lot}`,
|
||||
message: (_a = responseJSON.errorMessage) !== null && _a !== void 0 ? _a : '',
|
||||
message: (_b = responseJSON.errorMessage) !== null && _b !== void 0 ? _b : '',
|
||||
contextualColorName: 'danger'
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
import type { BulmaJS } from '@cityssm/bulma-js/types.js'
|
||||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type * as globalTypes from '../../types/globalTypes.js'
|
||||
import type * as recordTypes from '../../types/recordTypes.js'
|
||||
import type { LOS } from '../../types/globalTypes.js'
|
||||
import type { Lot, LotStatus, LotType, MapRecord, OccupancyTypeField, WorkOrderType } from '../../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
declare const bulmaJS: BulmaJS
|
||||
declare const exports: Record<string, unknown>
|
||||
;(() => {
|
||||
const los = (exports as Record<string, unknown>).los as globalTypes.LOS
|
||||
const los = exports.los as LOS
|
||||
|
||||
const lotOccupancyId = (
|
||||
document.querySelector('#lotOccupancy--lotOccupancyId') as HTMLInputElement
|
||||
|
|
@ -250,7 +250,7 @@ declare const exports: Record<string, unknown>
|
|||
) as HTMLSelectElement
|
||||
|
||||
const workOrderTypes = (exports as Record<string, unknown>)
|
||||
.workOrderTypes as recordTypes.WorkOrderType[]
|
||||
.workOrderTypes as WorkOrderType[]
|
||||
|
||||
if (workOrderTypes.length === 1) {
|
||||
workOrderTypeSelectElement.innerHTML = ''
|
||||
|
|
@ -315,7 +315,7 @@ declare const exports: Record<string, unknown>
|
|||
},
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
occupancyTypeFields: recordTypes.OccupancyTypeField[]
|
||||
occupancyTypeFields: OccupancyTypeField[]
|
||||
}
|
||||
|
||||
if (responseJSON.occupancyTypeFields.length === 0) {
|
||||
|
|
@ -490,7 +490,7 @@ declare const exports: Record<string, unknown>
|
|||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
count: number
|
||||
lots: recordTypes.Lot[]
|
||||
lots: Lot[]
|
||||
}
|
||||
|
||||
if (responseJSON.count === 0) {
|
||||
|
|
@ -557,7 +557,7 @@ declare const exports: Record<string, unknown>
|
|||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
renderSelectedLotAndClose(responseJSON.lotId!, lotName)
|
||||
renderSelectedLotAndClose(responseJSON.lotId ?? '', lotName)
|
||||
} else {
|
||||
bulmaJS.alert({
|
||||
title: `Error Creating ${los.escapedAliases.Lot}`,
|
||||
|
|
@ -635,7 +635,7 @@ declare const exports: Record<string, unknown>
|
|||
'#lotCreate--lotTypeId'
|
||||
) as HTMLSelectElement
|
||||
|
||||
for (const lotType of exports.lotTypes as recordTypes.LotType[]) {
|
||||
for (const lotType of exports.lotTypes as LotType[]) {
|
||||
const optionElement = document.createElement('option')
|
||||
optionElement.value = lotType.lotTypeId.toString()
|
||||
optionElement.textContent = lotType.lotType
|
||||
|
|
@ -646,7 +646,7 @@ declare const exports: Record<string, unknown>
|
|||
'#lotCreate--lotStatusId'
|
||||
) as HTMLSelectElement
|
||||
|
||||
for (const lotStatus of exports.lotStatuses as recordTypes.LotStatus[]) {
|
||||
for (const lotStatus of exports.lotStatuses as LotStatus[]) {
|
||||
const optionElement = document.createElement('option')
|
||||
optionElement.value = lotStatus.lotStatusId.toString()
|
||||
optionElement.textContent = lotStatus.lotStatus
|
||||
|
|
@ -657,7 +657,7 @@ declare const exports: Record<string, unknown>
|
|||
'#lotCreate--mapId'
|
||||
) as HTMLSelectElement
|
||||
|
||||
for (const map of exports.maps as recordTypes.MapRecord[]) {
|
||||
for (const map of exports.maps as MapRecord[]) {
|
||||
const optionElement = document.createElement('option')
|
||||
optionElement.value = map.mapId!.toString()
|
||||
optionElement.textContent =
|
||||
|
|
|
|||
|
|
@ -4,20 +4,19 @@
|
|||
import type { BulmaJS } from '@cityssm/bulma-js/types.js'
|
||||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type * as globalTypes from '../../types/globalTypes.js'
|
||||
import type * as recordTypes from '../../types/recordTypes.js'
|
||||
import type { LOS } from '../../types/globalTypes.js'
|
||||
import type { LotOccupancyComment } from '../../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
declare const bulmaJS: BulmaJS
|
||||
|
||||
declare const los: globalTypes.LOS
|
||||
declare const los: LOS
|
||||
|
||||
declare const lotOccupancyId: string
|
||||
|
||||
declare const exports: Record<string, unknown>
|
||||
|
||||
let lotOccupancyComments =
|
||||
exports.lotOccupancyComments as recordTypes.LotOccupancyComment[]
|
||||
let lotOccupancyComments = exports.lotOccupancyComments as LotOccupancyComment[]
|
||||
delete exports.lotOccupancyComments
|
||||
|
||||
function openEditLotOccupancyComment(clickEvent: Event): void {
|
||||
|
|
@ -34,7 +33,7 @@ function openEditLotOccupancyComment(clickEvent: Event): void {
|
|||
lotOccupancyCommentId
|
||||
)
|
||||
}
|
||||
)!
|
||||
) as LotOccupancyComment
|
||||
|
||||
let editFormElement: HTMLFormElement
|
||||
let editCloseModalFunction: () => void
|
||||
|
|
@ -49,7 +48,7 @@ function openEditLotOccupancyComment(clickEvent: Event): void {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotOccupancyComments?: recordTypes.LotOccupancyComment[]
|
||||
lotOccupancyComments?: LotOccupancyComment[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -145,7 +144,7 @@ function deleteLotOccupancyComment(clickEvent: Event): void {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotOccupancyComments: recordTypes.LotOccupancyComment[]
|
||||
lotOccupancyComments: LotOccupancyComment[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -253,7 +252,7 @@ document.querySelector('#button--addComment')?.addEventListener('click', () => {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotOccupancyComments: recordTypes.LotOccupancyComment[]
|
||||
lotOccupancyComments: LotOccupancyComment[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
|
|||
|
|
@ -4,19 +4,25 @@
|
|||
import type { BulmaJS } from '@cityssm/bulma-js/types.js'
|
||||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type * as globalTypes from '../../types/globalTypes.js'
|
||||
import type * as recordTypes from '../../types/recordTypes.js'
|
||||
import type { LOS } from '../../types/globalTypes.js'
|
||||
import type {
|
||||
DynamicsGPDocument,
|
||||
Fee,
|
||||
FeeCategory,
|
||||
LotOccupancyFee,
|
||||
LotOccupancyTransaction
|
||||
} from '../../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
declare const bulmaJS: BulmaJS
|
||||
|
||||
declare const los: globalTypes.LOS
|
||||
declare const los: LOS
|
||||
|
||||
declare const lotOccupancyId: string
|
||||
|
||||
declare const exports: Record<string, unknown>
|
||||
|
||||
let lotOccupancyFees = exports.lotOccupancyFees as recordTypes.LotOccupancyFee[]
|
||||
let lotOccupancyFees = exports.lotOccupancyFees as LotOccupancyFee[]
|
||||
delete exports.lotOccupancyFees
|
||||
|
||||
const lotOccupancyFeesContainerElement = document.querySelector(
|
||||
|
|
@ -44,7 +50,7 @@ function editLotOccupancyFeeQuantity(clickEvent: Event): void {
|
|||
|
||||
const fee = lotOccupancyFees.find((possibleFee) => {
|
||||
return possibleFee.feeId === feeId
|
||||
}) as recordTypes.LotOccupancyFee
|
||||
}) as LotOccupancyFee
|
||||
|
||||
let updateCloseModalFunction: () => void
|
||||
|
||||
|
|
@ -57,7 +63,7 @@ function editLotOccupancyFeeQuantity(clickEvent: Event): void {
|
|||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
lotOccupancyFees: recordTypes.LotOccupancyFee[]
|
||||
lotOccupancyFees: LotOccupancyFee[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -136,7 +142,7 @@ function deleteLotOccupancyFee(clickEvent: Event): void {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotOccupancyFees: recordTypes.LotOccupancyFee[]
|
||||
lotOccupancyFees: LotOccupancyFee[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -296,7 +302,7 @@ addFeeButtonElement.addEventListener('click', () => {
|
|||
return
|
||||
}
|
||||
|
||||
let feeCategories: recordTypes.FeeCategory[]
|
||||
let feeCategories: FeeCategory[]
|
||||
|
||||
let feeFilterElement: HTMLInputElement
|
||||
let feeFilterResultsElement: HTMLElement
|
||||
|
|
@ -313,7 +319,7 @@ addFeeButtonElement.addEventListener('click', () => {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotOccupancyFees: recordTypes.LotOccupancyFee[]
|
||||
lotOccupancyFees: LotOccupancyFee[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -331,7 +337,7 @@ addFeeButtonElement.addEventListener('click', () => {
|
|||
)
|
||||
}
|
||||
|
||||
function doSetQuantityAndAddFee(fee: recordTypes.Fee): void {
|
||||
function doSetQuantityAndAddFee(fee: Fee): void {
|
||||
let quantityElement: HTMLInputElement
|
||||
let quantityCloseModalFunction: () => void
|
||||
|
||||
|
|
@ -377,11 +383,11 @@ addFeeButtonElement.addEventListener('click', () => {
|
|||
|
||||
const feeCategory = feeCategories.find((currentFeeCategory) => {
|
||||
return currentFeeCategory.feeCategoryId === feeCategoryId
|
||||
}) as recordTypes.FeeCategory
|
||||
}) as FeeCategory
|
||||
|
||||
const fee = feeCategory.fees.find((currentFee) => {
|
||||
return currentFee.feeId === feeId
|
||||
}) as recordTypes.Fee
|
||||
}) as Fee
|
||||
|
||||
if (fee.includeQuantity ?? false) {
|
||||
doSetQuantityAndAddFee(fee)
|
||||
|
|
@ -485,7 +491,7 @@ addFeeButtonElement.addEventListener('click', () => {
|
|||
},
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
feeCategories: recordTypes.FeeCategory[]
|
||||
feeCategories: FeeCategory[]
|
||||
}
|
||||
|
||||
feeCategories = responseJSON.feeCategories
|
||||
|
|
@ -512,7 +518,7 @@ addFeeButtonElement.addEventListener('click', () => {
|
|||
})
|
||||
|
||||
let lotOccupancyTransactions =
|
||||
exports.lotOccupancyTransactions as recordTypes.LotOccupancyTransaction[]
|
||||
exports.lotOccupancyTransactions as LotOccupancyTransaction[]
|
||||
delete exports.lotOccupancyTransactions
|
||||
|
||||
const lotOccupancyTransactionsContainerElement = document.querySelector(
|
||||
|
|
@ -538,7 +544,7 @@ function editLotOccupancyTransaction(clickEvent: Event): void {
|
|||
|
||||
const transaction = lotOccupancyTransactions.find((possibleTransaction) => {
|
||||
return possibleTransaction.transactionIndex === transactionIndex
|
||||
}) as recordTypes.LotOccupancyTransaction
|
||||
}) as LotOccupancyTransaction
|
||||
|
||||
let editCloseModalFunction: () => void
|
||||
|
||||
|
|
@ -551,7 +557,7 @@ function editLotOccupancyTransaction(clickEvent: Event): void {
|
|||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
lotOccupancyTransactions: recordTypes.LotOccupancyTransaction[]
|
||||
lotOccupancyTransactions: LotOccupancyTransaction[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -646,7 +652,7 @@ function deleteLotOccupancyTransaction(clickEvent: Event): void {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotOccupancyTransactions: recordTypes.LotOccupancyTransaction[]
|
||||
lotOccupancyTransactions: LotOccupancyTransaction[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -828,7 +834,7 @@ addTransactionButtonElement.addEventListener('click', () => {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotOccupancyTransactions: recordTypes.LotOccupancyTransaction[]
|
||||
lotOccupancyTransactions: LotOccupancyTransaction[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -872,7 +878,7 @@ addTransactionButtonElement.addEventListener('click', () => {
|
|||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
dynamicsGPDocument?: recordTypes.DynamicsGPDocument
|
||||
dynamicsGPDocument?: DynamicsGPDocument
|
||||
}
|
||||
|
||||
if (
|
||||
|
|
|
|||
|
|
@ -4,13 +4,16 @@
|
|||
import type { BulmaJS } from '@cityssm/bulma-js/types.js'
|
||||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type * as globalTypes from '../../types/globalTypes.js'
|
||||
import type * as recordTypes from '../../types/recordTypes.js'
|
||||
import type { LOS } from '../../types/globalTypes.js'
|
||||
import type {
|
||||
LotOccupancyOccupant,
|
||||
LotOccupantType
|
||||
} from '../../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
declare const bulmaJS: BulmaJS
|
||||
|
||||
declare const los: globalTypes.LOS
|
||||
declare const los: LOS
|
||||
|
||||
declare const lotOccupancyId: string
|
||||
declare const isCreate: boolean
|
||||
|
|
@ -19,7 +22,7 @@ declare const formElement: HTMLFormElement
|
|||
declare const exports: Record<string, unknown>
|
||||
|
||||
let lotOccupancyOccupants =
|
||||
exports.lotOccupancyOccupants as recordTypes.LotOccupancyOccupant[]
|
||||
exports.lotOccupancyOccupants as LotOccupancyOccupant[]
|
||||
|
||||
delete exports.lotOccupancyOccupants
|
||||
|
||||
|
|
@ -34,7 +37,7 @@ function openEditLotOccupancyOccupant(clickEvent: Event): void {
|
|||
(currentLotOccupancyOccupant) => {
|
||||
return currentLotOccupancyOccupant.lotOccupantIndex === lotOccupantIndex
|
||||
}
|
||||
) as recordTypes.LotOccupancyOccupant
|
||||
) as LotOccupancyOccupant
|
||||
|
||||
let editFormElement: HTMLFormElement
|
||||
let editCloseModalFunction: () => void
|
||||
|
|
@ -49,7 +52,7 @@ function openEditLotOccupancyOccupant(clickEvent: Event): void {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotOccupancyOccupants: recordTypes.LotOccupancyOccupant[]
|
||||
lotOccupancyOccupants: LotOccupancyOccupant[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -87,7 +90,7 @@ function openEditLotOccupancyOccupant(clickEvent: Event): void {
|
|||
|
||||
let lotOccupantTypeSelected = false
|
||||
|
||||
for (const lotOccupantType of exports.lotOccupantTypes as recordTypes.LotOccupantType[]) {
|
||||
for (const lotOccupantType of exports.lotOccupantTypes as LotOccupantType[]) {
|
||||
const optionElement = document.createElement('option')
|
||||
optionElement.value = lotOccupantType.lotOccupantTypeId.toString()
|
||||
optionElement.textContent = lotOccupantType.lotOccupantType
|
||||
|
|
@ -254,7 +257,7 @@ function deleteLotOccupancyOccupant(clickEvent: Event): void {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotOccupancyOccupants: recordTypes.LotOccupancyOccupant[]
|
||||
lotOccupancyOccupants: LotOccupancyOccupant[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -436,7 +439,7 @@ document
|
|||
let searchResultsElement: HTMLElement
|
||||
|
||||
function addOccupant(
|
||||
formOrObject: HTMLFormElement | recordTypes.LotOccupancyOccupant
|
||||
formOrObject: HTMLFormElement | LotOccupancyOccupant
|
||||
): void {
|
||||
cityssm.postJSON(
|
||||
`${los.urlPrefix}/lotOccupancies/doAddLotOccupancyOccupant`,
|
||||
|
|
@ -445,7 +448,7 @@ document
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
lotOccupancyOccupants: recordTypes.LotOccupancyOccupant[]
|
||||
lotOccupancyOccupants: LotOccupancyOccupant[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -468,7 +471,7 @@ document
|
|||
addOccupant(addFormElement)
|
||||
}
|
||||
|
||||
let pastOccupantSearchResults: recordTypes.LotOccupancyOccupant[] = []
|
||||
let pastOccupantSearchResults: LotOccupancyOccupant[] = []
|
||||
|
||||
function addOccupantFromCopy(clickEvent: MouseEvent): void {
|
||||
clickEvent.preventDefault()
|
||||
|
|
@ -527,7 +530,7 @@ document
|
|||
searchFormElement,
|
||||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
occupants: recordTypes.LotOccupancyOccupant[]
|
||||
occupants: LotOccupancyOccupant[]
|
||||
}
|
||||
|
||||
pastOccupantSearchResults = responseJSON.occupants
|
||||
|
|
@ -593,7 +596,7 @@ document
|
|||
'#lotOccupancyOccupantCopy--lotOccupantTypeId'
|
||||
) as HTMLSelectElement
|
||||
|
||||
for (const lotOccupantType of exports.lotOccupantTypes as recordTypes.LotOccupantType[]) {
|
||||
for (const lotOccupantType of exports.lotOccupantTypes as LotOccupantType[]) {
|
||||
const optionElement = document.createElement('option')
|
||||
optionElement.value = lotOccupantType.lotOccupantTypeId.toString()
|
||||
optionElement.textContent = lotOccupantType.lotOccupantType
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type { LOS } from '../types/globalTypes.js'
|
||||
import type * as recordTypes from '../types/recordTypes.js'
|
||||
import type { Lot } from '../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ declare const exports: Record<string, unknown>
|
|||
const responseJSON = rawResponseJSON as {
|
||||
count: number
|
||||
offset: number
|
||||
lots: recordTypes.Lot[]
|
||||
lots: Lot[]
|
||||
}
|
||||
|
||||
if (responseJSON.lots.length === 0) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
|
||||
/* eslint-disable unicorn/prefer-module */
|
||||
|
||||
import type * as globalTypes from '../types/globalTypes.js'
|
||||
import type { LOS } from '../types/globalTypes.js'
|
||||
|
||||
declare const exports: Record<string, unknown>
|
||||
;(() => {
|
||||
|
|
@ -9,7 +9,7 @@ declare const exports: Record<string, unknown>
|
|||
document.querySelector('#lot--map')
|
||||
|
||||
if (mapContainerElement !== null) {
|
||||
;(exports.los as globalTypes.LOS).highlightMap(
|
||||
;(exports.los as LOS).highlightMap(
|
||||
mapContainerElement,
|
||||
mapContainerElement.dataset.mapKey ?? '',
|
||||
'success'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type { BulmaJS } from '@cityssm/bulma-js/types.js'
|
|||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type { LOS } from '../../types/globalTypes.js'
|
||||
import type * as recordTypes from '../../types/recordTypes.js'
|
||||
import type { WorkOrderComment } from '../../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
declare const bulmaJS: BulmaJS
|
||||
|
|
@ -17,7 +17,7 @@ declare const workOrderId: string
|
|||
declare const isCreate: boolean
|
||||
|
||||
let workOrderComments =
|
||||
exports.workOrderComments as recordTypes.WorkOrderComment[]
|
||||
exports.workOrderComments as WorkOrderComment[]
|
||||
delete exports.workOrderComments
|
||||
|
||||
function openEditWorkOrderComment(clickEvent: Event): void {
|
||||
|
|
@ -29,7 +29,7 @@ function openEditWorkOrderComment(clickEvent: Event): void {
|
|||
|
||||
const workOrderComment = workOrderComments.find((currentComment) => {
|
||||
return currentComment.workOrderCommentId === workOrderCommentId
|
||||
}) as recordTypes.WorkOrderComment
|
||||
}) as WorkOrderComment
|
||||
|
||||
let editFormElement: HTMLFormElement
|
||||
let editCloseModalFunction: () => void
|
||||
|
|
@ -44,7 +44,7 @@ function openEditWorkOrderComment(clickEvent: Event): void {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
workOrderComments: recordTypes.WorkOrderComment[]
|
||||
workOrderComments: WorkOrderComment[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -138,7 +138,7 @@ function deleteWorkOrderComment(clickEvent: Event): void {
|
|||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
errorMessage?: string
|
||||
workOrderComments: recordTypes.WorkOrderComment[]
|
||||
workOrderComments: WorkOrderComment[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
@ -243,7 +243,7 @@ function openAddCommentModal(): void {
|
|||
(rawResponseJSON) => {
|
||||
const responseJSON = rawResponseJSON as {
|
||||
success: boolean
|
||||
workOrderComments: recordTypes.WorkOrderComment[]
|
||||
workOrderComments: WorkOrderComment[]
|
||||
}
|
||||
|
||||
if (responseJSON.success) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type { LOS } from '../types/globalTypes.js'
|
||||
import type * as recordTypes from '../types/recordTypes.js'
|
||||
import type { WorkOrderMilestone } from '../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
|
||||
|
|
@ -30,9 +30,7 @@ declare const exports: Record<string, unknown>
|
|||
'#container--milestoneCalendar'
|
||||
) as HTMLElement
|
||||
|
||||
function renderMilestones(
|
||||
workOrderMilestones: recordTypes.WorkOrderMilestone[]
|
||||
): void {
|
||||
function renderMilestones(workOrderMilestones: WorkOrderMilestone[]): void {
|
||||
if (workOrderMilestones.length === 0) {
|
||||
milestoneCalendarContainerElement.innerHTML = `<div class="message is-info">
|
||||
<p class="message-body">There are no milestones that meet the search criteria.</p>
|
||||
|
|
@ -167,7 +165,7 @@ declare const exports: Record<string, unknown>
|
|||
renderMilestones(
|
||||
(
|
||||
responseJSON as {
|
||||
workOrderMilestones: recordTypes.WorkOrderMilestone[]
|
||||
workOrderMilestones: WorkOrderMilestone[]
|
||||
}
|
||||
).workOrderMilestones
|
||||
)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
<span class="fa-li">
|
||||
<i class="fas fa-fw fa-${cityssm.escapeHTML(((_h = occupant.fontAwesomeIconClass) !== null && _h !== void 0 ? _h : '') === ''
|
||||
? 'user'
|
||||
: (_j = occupant.fontAwesomeIconClass) !== null && _j !== void 0 ? _j : '')}" aria-label="${los.escapedAliases.occupant}"></i></span>
|
||||
: (_j = occupant.fontAwesomeIconClass) !== null && _j !== void 0 ? _j : '')}" aria-label="${los.escapedAliases.occupant}"></i>
|
||||
</span>
|
||||
${cityssm.escapeHTML(((_k = occupant.occupantName) !== null && _k !== void 0 ? _k : '') === '' &&
|
||||
((_l = occupant.occupantFamilyName) !== null && _l !== void 0 ? _l : '') === ''
|
||||
? '(No Name)'
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types.js'
|
||||
|
||||
import type { LOS } from '../types/globalTypes.js'
|
||||
import type * as recordTypes from '../types/recordTypes.js'
|
||||
import type { WorkOrder } from '../types/recordTypes.js'
|
||||
|
||||
declare const cityssm: cityssmGlobal
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ declare const exports: Record<string, unknown>
|
|||
const responseJSON = rawResponseJSON as {
|
||||
count: number
|
||||
offset: number
|
||||
workOrders: recordTypes.WorkOrder[]
|
||||
workOrders: WorkOrder[]
|
||||
}
|
||||
|
||||
if (responseJSON.workOrders.length === 0) {
|
||||
|
|
@ -79,7 +79,8 @@ declare const exports: Record<string, unknown>
|
|||
(occupant.fontAwesomeIconClass ?? '') === ''
|
||||
? 'user'
|
||||
: occupant.fontAwesomeIconClass ?? ''
|
||||
)}" aria-label="${los.escapedAliases.occupant}"></i></span>
|
||||
)}" aria-label="${los.escapedAliases.occupant}"></i>
|
||||
</span>
|
||||
${cityssm.escapeHTML(
|
||||
(occupant.occupantName ?? '') === '' &&
|
||||
(occupant.occupantFamilyName ?? '') === ''
|
||||
|
|
|
|||
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