linting
parent
f76f41ef63
commit
3e42fa5e78
|
|
@ -1,8 +1,12 @@
|
|||
import type { RequestHandler } from "express";
|
||||
import type {
|
||||
RequestHandler
|
||||
} from "express";
|
||||
|
||||
import * as configFunctions from "../../helpers/functions.config.js";
|
||||
|
||||
import { getMap } from "../../helpers/lotOccupancyDB/getMap.js";
|
||||
import {
|
||||
getMap
|
||||
} from "../../helpers/lotOccupancyDB/getMap.js";
|
||||
|
||||
|
||||
export const handler: RequestHandler = (request, response) => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import * as dateTimeFunctions from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { dateStringToInteger, dateToInteger, dateToTimeInteger, timeStringToInteger } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
import { dateStringToInteger, dateToInteger, dateToTimeInteger, timeStringToInteger } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
export const addLotOccupancyTransaction = (lotOccupancyTransactionForm, requestSession) => {
|
||||
const database = sqlite(databasePath);
|
||||
let transactionIndex = 0;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
dateStringToInteger,
|
||||
dateToInteger,
|
||||
dateToTimeInteger,
|
||||
timeStringToInteger
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,16 @@ import {
|
|||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
clearOccupancyTypesCache
|
||||
} from "../functions.cache.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
import { clearOccupancyTypesCache } from "../functions.cache.js";
|
||||
|
||||
|
||||
interface AddOccupancyTypeForm {
|
||||
occupancyType: string;
|
||||
orderNumber?: number;
|
||||
orderNumber ? : number;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { dateStringToInteger, dateToInteger } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
import { dateStringToInteger, dateToInteger } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
export const addWorkOrder = (workOrderForm, requestSession) => {
|
||||
const database = sqlite(databasePath);
|
||||
const rightNow = new Date();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
import { dateStringToInteger, dateToInteger } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
dateStringToInteger,
|
||||
dateToInteger
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
||||
|
|
@ -12,8 +16,8 @@ interface AddWorkOrderForm {
|
|||
workOrderTypeId: number | string;
|
||||
workOrderNumber: string;
|
||||
workOrderDescription: string;
|
||||
workOrderOpenDateString?: string;
|
||||
workOrderCloseDateString?: string;
|
||||
workOrderOpenDateString ? : string;
|
||||
workOrderCloseDateString ? : string;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { dateIntegerToString, timeIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
import { dateIntegerToString, timeIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
export const getLotComments = (lotId, connectedDatabase) => {
|
||||
const database = connectedDatabase || sqlite(databasePath, {
|
||||
readonly: true
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
import { dateIntegerToString, timeIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
dateIntegerToString,
|
||||
timeIntegerToString
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { dateIntegerToString, dateStringToInteger, dateToInteger } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
import { dateIntegerToString, dateStringToInteger, dateToInteger } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import { getLotOccupancyOccupants } from "./getLotOccupancyOccupants.js";
|
||||
export const getLotOccupancies = (filters, options, connectedDatabase) => {
|
||||
const database = connectedDatabase || sqlite(databasePath, {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import {
|
||||
dateIntegerToString,
|
||||
dateStringToInteger,
|
||||
dateToInteger
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
dateIntegerToString,
|
||||
dateStringToInteger,
|
||||
dateToInteger
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
import {
|
||||
getLotOccupancyOccupants
|
||||
} from "./getLotOccupancyOccupants.js";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { dateIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
import { dateIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import { getLotOccupancyOccupants } from "./getLotOccupancyOccupants.js";
|
||||
import { getLotOccupancyComments } from "./getLotOccupancyComments.js";
|
||||
import { getLotOccupancyFields } from "./getLotOccupancyFields.js";
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import {
|
||||
dateIntegerToString
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
dateIntegerToString
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
import {
|
||||
getLotOccupancyOccupants
|
||||
} from "./getLotOccupancyOccupants.js";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { dateIntegerToString, timeIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
import { dateIntegerToString, timeIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
export const getLotOccupancyComments = (lotOccupancyId, connectedDatabase) => {
|
||||
const database = connectedDatabase || sqlite(databasePath, {
|
||||
readonly: true
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
import { dateIntegerToString, timeIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
dateIntegerToString,
|
||||
timeIntegerToString
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { dateIntegerToString, timeIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
import { dateIntegerToString, timeIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
export const getLotOccupancyTransactions = (lotOccupancyId, connectedDatabase) => {
|
||||
const database = connectedDatabase || sqlite(databasePath, {
|
||||
readonly: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
import { dateIntegerToString, timeIntegerToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
dateIntegerToString,
|
||||
timeIntegerToString
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
|
@ -32,7 +35,7 @@ export const getMap = (mapId: number | string): recordTypes.Map => {
|
|||
database.close();
|
||||
|
||||
return map;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
export default getMap;
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
|
@ -9,14 +12,14 @@ interface UpdateFeeForm {
|
|||
feeCategoryId: string;
|
||||
feeName: string;
|
||||
feeDescription: string;
|
||||
occupancyTypeId?: string;
|
||||
lotTypeId?: string;
|
||||
feeAmount?: string;
|
||||
feeFunction?: string;
|
||||
taxAmount?: string;
|
||||
taxPercentage?: string;
|
||||
occupancyTypeId ? : string;
|
||||
lotTypeId ? : string;
|
||||
feeAmount ? : string;
|
||||
feeFunction ? : string;
|
||||
taxAmount ? : string;
|
||||
taxPercentage ? : string;
|
||||
includeQuantity: "" | "1";
|
||||
quantityUnit?: string;
|
||||
quantityUnit ? : string;
|
||||
isRequired: "" | "1";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { dateStringToInteger } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import sqlite from "better-sqlite3";
|
||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||
import { dateStringToInteger } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
import { addOrUpdateLotOccupancyField } from "./addOrUpdateLotOccupancyField.js";
|
||||
import { deleteLotOccupancyField } from "./deleteLotOccupancyField.js";
|
||||
export function updateLotOccupancy(lotOccupancyForm, requestSession) {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import {
|
||||
dateStringToInteger
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
import sqlite from "better-sqlite3";
|
||||
|
||||
import {
|
||||
lotOccupancyDB as databasePath
|
||||
} from "../../data/databasePaths.js";
|
||||
|
||||
import {
|
||||
dateStringToInteger
|
||||
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||
|
||||
import {
|
||||
addOrUpdateLotOccupancyField
|
||||
} from "./addOrUpdateLotOccupancyField.js";
|
||||
|
|
@ -18,6 +18,7 @@ import {
|
|||
|
||||
import type * as recordTypes from "../../types/recordTypes";
|
||||
|
||||
|
||||
interface UpdateLotOccupancyForm {
|
||||
lotOccupancyId: string | number;
|
||||
occupancyTypeId: string | number;
|
||||
|
|
|
|||
Loading…
Reference in New Issue