linting
parent
7a54cc0a41
commit
20b2ddc8d4
|
|
@ -1,4 +1,4 @@
|
||||||
interface AddFeeForm {
|
export interface AddFeeForm {
|
||||||
feeCategoryId: string;
|
feeCategoryId: string;
|
||||||
feeName: string;
|
feeName: string;
|
||||||
feeDescription: string;
|
feeDescription: string;
|
||||||
|
|
@ -14,5 +14,4 @@ interface AddFeeForm {
|
||||||
isRequired: '' | '1';
|
isRequired: '' | '1';
|
||||||
orderNumber?: number;
|
orderNumber?: number;
|
||||||
}
|
}
|
||||||
export declare function addFee(feeForm: AddFeeForm, user: User): Promise<number>;
|
export default function addFee(feeForm: AddFeeForm, user: User): Promise<number>;
|
||||||
export default addFee;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addFee(feeForm, user) {
|
export default async function addFee(feeForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -18,4 +18,3 @@ export async function addFee(feeForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.lastInsertRowid;
|
return result.lastInsertRowid;
|
||||||
}
|
}
|
||||||
export default addFee;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddFeeForm {
|
export interface AddFeeForm {
|
||||||
feeCategoryId: string
|
feeCategoryId: string
|
||||||
feeName: string
|
feeName: string
|
||||||
feeDescription: string
|
feeDescription: string
|
||||||
|
|
@ -17,7 +17,10 @@ interface AddFeeForm {
|
||||||
orderNumber?: number
|
orderNumber?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addFee(feeForm: AddFeeForm, user: User): Promise<number> {
|
export default async function addFee(
|
||||||
|
feeForm: AddFeeForm,
|
||||||
|
user: User
|
||||||
|
): Promise<number> {
|
||||||
const database = await acquireConnection()
|
const database = await acquireConnection()
|
||||||
|
|
||||||
const rightNowMillis = Date.now()
|
const rightNowMillis = Date.now()
|
||||||
|
|
@ -61,5 +64,3 @@ export async function addFee(feeForm: AddFeeForm, user: User): Promise<number> {
|
||||||
|
|
||||||
return result.lastInsertRowid as number
|
return result.lastInsertRowid as number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addFee
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
interface AddLotForm {
|
export interface AddLotForm {
|
||||||
lotName: string;
|
lotName: string;
|
||||||
lotTypeId: string | number;
|
lotTypeId: string | number;
|
||||||
lotStatusId: string | number;
|
lotStatusId: string | number;
|
||||||
|
|
@ -9,5 +9,4 @@ interface AddLotForm {
|
||||||
lotTypeFieldIds?: string;
|
lotTypeFieldIds?: string;
|
||||||
[lotFieldValue_lotTypeFieldId: string]: unknown;
|
[lotFieldValue_lotTypeFieldId: string]: unknown;
|
||||||
}
|
}
|
||||||
export declare function addLot(lotForm: AddLotForm, user: User): Promise<number>;
|
export default function addLot(lotForm: AddLotForm, user: User): Promise<number>;
|
||||||
export default addLot;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { addOrUpdateLotField } from './addOrUpdateLotField.js';
|
import addOrUpdateLotField from './addOrUpdateLotField.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addLot(lotForm, user) {
|
export default async function addLot(lotForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -15,7 +15,7 @@ export async function addLot(lotForm, user) {
|
||||||
const lotId = result.lastInsertRowid;
|
const lotId = result.lastInsertRowid;
|
||||||
const lotTypeFieldIds = (lotForm.lotTypeFieldIds ?? '').split(',');
|
const lotTypeFieldIds = (lotForm.lotTypeFieldIds ?? '').split(',');
|
||||||
for (const lotTypeFieldId of lotTypeFieldIds) {
|
for (const lotTypeFieldId of lotTypeFieldIds) {
|
||||||
const lotFieldValue = lotForm['lotFieldValue_' + lotTypeFieldId];
|
const lotFieldValue = lotForm[`lotFieldValue_${lotTypeFieldId}`];
|
||||||
if ((lotFieldValue ?? '') !== '') {
|
if ((lotFieldValue ?? '') !== '') {
|
||||||
await addOrUpdateLotField({
|
await addOrUpdateLotField({
|
||||||
lotId,
|
lotId,
|
||||||
|
|
@ -27,4 +27,3 @@ export async function addLot(lotForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return lotId;
|
return lotId;
|
||||||
}
|
}
|
||||||
export default addLot;
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { addOrUpdateLotField } from './addOrUpdateLotField.js'
|
import addOrUpdateLotField from './addOrUpdateLotField.js'
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddLotForm {
|
export interface AddLotForm {
|
||||||
lotName: string
|
lotName: string
|
||||||
lotTypeId: string | number
|
lotTypeId: string | number
|
||||||
lotStatusId: string | number
|
lotStatusId: string | number
|
||||||
|
|
@ -16,7 +16,10 @@ interface AddLotForm {
|
||||||
[lotFieldValue_lotTypeFieldId: string]: unknown
|
[lotFieldValue_lotTypeFieldId: string]: unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addLot(lotForm: AddLotForm, user: User): Promise<number> {
|
export default async function addLot(
|
||||||
|
lotForm: AddLotForm,
|
||||||
|
user: User
|
||||||
|
): Promise<number> {
|
||||||
const database = await acquireConnection()
|
const database = await acquireConnection()
|
||||||
|
|
||||||
const rightNowMillis = Date.now()
|
const rightNowMillis = Date.now()
|
||||||
|
|
@ -50,7 +53,7 @@ export async function addLot(lotForm: AddLotForm, user: User): Promise<number> {
|
||||||
const lotTypeFieldIds = (lotForm.lotTypeFieldIds ?? '').split(',')
|
const lotTypeFieldIds = (lotForm.lotTypeFieldIds ?? '').split(',')
|
||||||
|
|
||||||
for (const lotTypeFieldId of lotTypeFieldIds) {
|
for (const lotTypeFieldId of lotTypeFieldIds) {
|
||||||
const lotFieldValue = lotForm['lotFieldValue_' + lotTypeFieldId] as string
|
const lotFieldValue = lotForm[`lotFieldValue_${lotTypeFieldId}`] as string
|
||||||
|
|
||||||
if ((lotFieldValue ?? '') !== '') {
|
if ((lotFieldValue ?? '') !== '') {
|
||||||
await addOrUpdateLotField(
|
await addOrUpdateLotField(
|
||||||
|
|
@ -69,5 +72,3 @@ export async function addLot(lotForm: AddLotForm, user: User): Promise<number> {
|
||||||
|
|
||||||
return lotId
|
return lotId
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addLot
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
interface AddLotCommentForm {
|
export interface AddLotCommentForm {
|
||||||
lotId: string;
|
lotId: string;
|
||||||
lotComment: string;
|
lotComment: string;
|
||||||
}
|
}
|
||||||
export declare function addLotComment(lotCommentForm: AddLotCommentForm, user: User): Promise<number>;
|
export default function addLotComment(lotCommentForm: AddLotCommentForm, user: User): Promise<number>;
|
||||||
export default addLotComment;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as dateTimeFunctions from '@cityssm/utils-datetime';
|
import * as dateTimeFunctions from '@cityssm/utils-datetime';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addLotComment(lotCommentForm, user) {
|
export default async function addLotComment(lotCommentForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNow = new Date();
|
const rightNow = new Date();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -14,4 +14,3 @@ export async function addLotComment(lotCommentForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.lastInsertRowid;
|
return result.lastInsertRowid;
|
||||||
}
|
}
|
||||||
export default addLotComment;
|
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@ import * as dateTimeFunctions from '@cityssm/utils-datetime'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddLotCommentForm {
|
export interface AddLotCommentForm {
|
||||||
lotId: string
|
lotId: string
|
||||||
lotComment: string
|
lotComment: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addLotComment(
|
export default async function addLotComment(
|
||||||
lotCommentForm: AddLotCommentForm,
|
lotCommentForm: AddLotCommentForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
|
|
@ -39,5 +39,3 @@ export async function addLotComment(
|
||||||
|
|
||||||
return result.lastInsertRowid as number
|
return result.lastInsertRowid as number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addLotComment
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import type { PoolConnection } from 'better-sqlite-pool';
|
import type { PoolConnection } from 'better-sqlite-pool';
|
||||||
interface AddLotOccupancyForm {
|
export interface AddLotOccupancyForm {
|
||||||
occupancyTypeId: string | number;
|
occupancyTypeId: string | number;
|
||||||
lotId: string | number;
|
lotId: string | number;
|
||||||
occupancyStartDateString: string;
|
occupancyStartDateString: string;
|
||||||
|
|
@ -18,5 +18,4 @@ interface AddLotOccupancyForm {
|
||||||
occupantEmailAddress?: string;
|
occupantEmailAddress?: string;
|
||||||
occupantComment?: string;
|
occupantComment?: string;
|
||||||
}
|
}
|
||||||
export declare function addLotOccupancy(lotOccupancyForm: AddLotOccupancyForm, user: User, connectedDatabase?: PoolConnection): Promise<number>;
|
export default function addLotOccupancy(lotOccupancyForm: AddLotOccupancyForm, user: User, connectedDatabase?: PoolConnection): Promise<number>;
|
||||||
export default addLotOccupancy;
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import * as dateTimeFunctions from '@cityssm/utils-datetime';
|
import * as dateTimeFunctions from '@cityssm/utils-datetime';
|
||||||
import { addLotOccupancyOccupant } from './addLotOccupancyOccupant.js';
|
import addLotOccupancyOccupant from './addLotOccupancyOccupant.js';
|
||||||
import { addOrUpdateLotOccupancyField } from './addOrUpdateLotOccupancyField.js';
|
import addOrUpdateLotOccupancyField from './addOrUpdateLotOccupancyField.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addLotOccupancy(lotOccupancyForm, user, connectedDatabase) {
|
export default async function addLotOccupancy(lotOccupancyForm, user, connectedDatabase) {
|
||||||
const database = connectedDatabase ?? (await acquireConnection());
|
const database = connectedDatabase ?? (await acquireConnection());
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const occupancyStartDate = dateTimeFunctions.dateStringToInteger(lotOccupancyForm.occupancyStartDateString);
|
const occupancyStartDate = dateTimeFunctions.dateStringToInteger(lotOccupancyForm.occupancyStartDateString);
|
||||||
|
|
@ -22,7 +22,7 @@ export async function addLotOccupancy(lotOccupancyForm, user, connectedDatabase)
|
||||||
const lotOccupancyId = result.lastInsertRowid;
|
const lotOccupancyId = result.lastInsertRowid;
|
||||||
const occupancyTypeFieldIds = (lotOccupancyForm.occupancyTypeFieldIds ?? '').split(',');
|
const occupancyTypeFieldIds = (lotOccupancyForm.occupancyTypeFieldIds ?? '').split(',');
|
||||||
for (const occupancyTypeFieldId of occupancyTypeFieldIds) {
|
for (const occupancyTypeFieldId of occupancyTypeFieldIds) {
|
||||||
const lotOccupancyFieldValue = lotOccupancyForm['lotOccupancyFieldValue_' + occupancyTypeFieldId];
|
const lotOccupancyFieldValue = lotOccupancyForm[`lotOccupancyFieldValue_${occupancyTypeFieldId}`];
|
||||||
if ((lotOccupancyFieldValue ?? '') !== '') {
|
if ((lotOccupancyFieldValue ?? '') !== '') {
|
||||||
await addOrUpdateLotOccupancyField({
|
await addOrUpdateLotOccupancyField({
|
||||||
lotOccupancyId,
|
lotOccupancyId,
|
||||||
|
|
@ -52,4 +52,3 @@ export async function addLotOccupancy(lotOccupancyForm, user, connectedDatabase)
|
||||||
}
|
}
|
||||||
return lotOccupancyId;
|
return lotOccupancyId;
|
||||||
}
|
}
|
||||||
export default addLotOccupancy;
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,11 @@
|
||||||
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
|
|
||||||
/* eslint-disable @typescript-eslint/indent */
|
|
||||||
|
|
||||||
import * as dateTimeFunctions from '@cityssm/utils-datetime'
|
import * as dateTimeFunctions from '@cityssm/utils-datetime'
|
||||||
import type { PoolConnection } from 'better-sqlite-pool'
|
import type { PoolConnection } from 'better-sqlite-pool'
|
||||||
|
|
||||||
import { addLotOccupancyOccupant } from './addLotOccupancyOccupant.js'
|
import addLotOccupancyOccupant from './addLotOccupancyOccupant.js'
|
||||||
import { addOrUpdateLotOccupancyField } from './addOrUpdateLotOccupancyField.js'
|
import addOrUpdateLotOccupancyField from './addOrUpdateLotOccupancyField.js'
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddLotOccupancyForm {
|
export interface AddLotOccupancyForm {
|
||||||
occupancyTypeId: string | number
|
occupancyTypeId: string | number
|
||||||
lotId: string | number
|
lotId: string | number
|
||||||
|
|
||||||
|
|
@ -31,7 +28,7 @@ interface AddLotOccupancyForm {
|
||||||
occupantComment?: string
|
occupantComment?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addLotOccupancy(
|
export default async function addLotOccupancy(
|
||||||
lotOccupancyForm: AddLotOccupancyForm,
|
lotOccupancyForm: AddLotOccupancyForm,
|
||||||
user: User,
|
user: User,
|
||||||
connectedDatabase?: PoolConnection
|
connectedDatabase?: PoolConnection
|
||||||
|
|
@ -80,7 +77,7 @@ export async function addLotOccupancy(
|
||||||
|
|
||||||
for (const occupancyTypeFieldId of occupancyTypeFieldIds) {
|
for (const occupancyTypeFieldId of occupancyTypeFieldIds) {
|
||||||
const lotOccupancyFieldValue = lotOccupancyForm[
|
const lotOccupancyFieldValue = lotOccupancyForm[
|
||||||
'lotOccupancyFieldValue_' + occupancyTypeFieldId
|
`lotOccupancyFieldValue_${occupancyTypeFieldId}`
|
||||||
] as string
|
] as string
|
||||||
|
|
||||||
if ((lotOccupancyFieldValue ?? '') !== '') {
|
if ((lotOccupancyFieldValue ?? '') !== '') {
|
||||||
|
|
@ -123,5 +120,3 @@ export async function addLotOccupancy(
|
||||||
|
|
||||||
return lotOccupancyId
|
return lotOccupancyId
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addLotOccupancy
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
interface AddLotOccupancyCommentForm {
|
export interface AddLotOccupancyCommentForm {
|
||||||
lotOccupancyId: string | number;
|
lotOccupancyId: string | number;
|
||||||
lotOccupancyCommentDateString?: string;
|
lotOccupancyCommentDateString?: string;
|
||||||
lotOccupancyCommentTimeString?: string;
|
lotOccupancyCommentTimeString?: string;
|
||||||
lotOccupancyComment: string;
|
lotOccupancyComment: string;
|
||||||
}
|
}
|
||||||
export declare function addLotOccupancyComment(commentForm: AddLotOccupancyCommentForm, user: User): Promise<number>;
|
export default function addLotOccupancyComment(commentForm: AddLotOccupancyCommentForm, user: User): Promise<number>;
|
||||||
export default addLotOccupancyComment;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { dateStringToInteger, dateToInteger, dateToTimeInteger, timeStringToInteger } from '@cityssm/utils-datetime';
|
import { dateStringToInteger, dateToInteger, dateToTimeInteger, timeStringToInteger } from '@cityssm/utils-datetime';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addLotOccupancyComment(commentForm, user) {
|
export default async function addLotOccupancyComment(commentForm, user) {
|
||||||
const rightNow = new Date();
|
const rightNow = new Date();
|
||||||
let lotOccupancyCommentDate;
|
let lotOccupancyCommentDate;
|
||||||
let lotOccupancyCommentTime;
|
let lotOccupancyCommentTime;
|
||||||
|
|
@ -25,4 +25,3 @@ export async function addLotOccupancyComment(commentForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.lastInsertRowid;
|
return result.lastInsertRowid;
|
||||||
}
|
}
|
||||||
export default addLotOccupancyComment;
|
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,14 @@ import {
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddLotOccupancyCommentForm {
|
export interface AddLotOccupancyCommentForm {
|
||||||
lotOccupancyId: string | number
|
lotOccupancyId: string | number
|
||||||
lotOccupancyCommentDateString?: string
|
lotOccupancyCommentDateString?: string
|
||||||
lotOccupancyCommentTimeString?: string
|
lotOccupancyCommentTimeString?: string
|
||||||
lotOccupancyComment: string
|
lotOccupancyComment: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addLotOccupancyComment(
|
export default async function addLotOccupancyComment(
|
||||||
commentForm: AddLotOccupancyCommentForm,
|
commentForm: AddLotOccupancyCommentForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
|
|
@ -62,5 +62,3 @@ export async function addLotOccupancyComment(
|
||||||
|
|
||||||
return result.lastInsertRowid as number
|
return result.lastInsertRowid as number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addLotOccupancyComment
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
interface AddLotOccupancyFeeForm {
|
export interface AddLotOccupancyFeeForm {
|
||||||
lotOccupancyId: number | string;
|
lotOccupancyId: number | string;
|
||||||
feeId: number | string;
|
feeId: number | string;
|
||||||
quantity: number | string;
|
quantity: number | string;
|
||||||
feeAmount?: number | string;
|
feeAmount?: number | string;
|
||||||
taxAmount?: number | string;
|
taxAmount?: number | string;
|
||||||
}
|
}
|
||||||
export declare function addLotOccupancyFee(lotOccupancyFeeForm: AddLotOccupancyFeeForm, user: User): Promise<boolean>;
|
export default function addLotOccupancyFee(lotOccupancyFeeForm: AddLotOccupancyFeeForm, user: User): Promise<boolean>;
|
||||||
export default addLotOccupancyFee;
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { calculateFeeAmount, calculateTaxAmount } from '../helpers/functions.fee
|
||||||
import { getFee } from './getFee.js';
|
import { getFee } from './getFee.js';
|
||||||
import { getLotOccupancy } from './getLotOccupancy.js';
|
import { getLotOccupancy } from './getLotOccupancy.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addLotOccupancyFee(lotOccupancyFeeForm, user) {
|
export default async function addLotOccupancyFee(lotOccupancyFeeForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
let feeAmount;
|
let feeAmount;
|
||||||
|
|
@ -80,4 +80,3 @@ export async function addLotOccupancyFee(lotOccupancyFeeForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default addLotOccupancyFee;
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import { getFee } from './getFee.js'
|
||||||
import { getLotOccupancy } from './getLotOccupancy.js'
|
import { getLotOccupancy } from './getLotOccupancy.js'
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddLotOccupancyFeeForm {
|
export interface AddLotOccupancyFeeForm {
|
||||||
lotOccupancyId: number | string
|
lotOccupancyId: number | string
|
||||||
feeId: number | string
|
feeId: number | string
|
||||||
quantity: number | string
|
quantity: number | string
|
||||||
|
|
@ -16,7 +16,7 @@ interface AddLotOccupancyFeeForm {
|
||||||
taxAmount?: number | string
|
taxAmount?: number | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addLotOccupancyFee(
|
export default async function addLotOccupancyFee(
|
||||||
lotOccupancyFeeForm: AddLotOccupancyFeeForm,
|
lotOccupancyFeeForm: AddLotOccupancyFeeForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
|
|
@ -154,5 +154,3 @@ export async function addLotOccupancyFee(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addLotOccupancyFee
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import type { PoolConnection } from 'better-sqlite-pool';
|
import type { PoolConnection } from 'better-sqlite-pool';
|
||||||
interface AddLotOccupancyOccupantForm {
|
export interface AddLotOccupancyOccupantForm {
|
||||||
lotOccupancyId: string | number;
|
lotOccupancyId: string | number;
|
||||||
lotOccupantTypeId: string | number;
|
lotOccupantTypeId: string | number;
|
||||||
occupantName: string;
|
occupantName: string;
|
||||||
|
|
@ -13,5 +13,4 @@ interface AddLotOccupancyOccupantForm {
|
||||||
occupantEmailAddress: string;
|
occupantEmailAddress: string;
|
||||||
occupantComment?: string;
|
occupantComment?: string;
|
||||||
}
|
}
|
||||||
export declare function addLotOccupancyOccupant(lotOccupancyOccupantForm: AddLotOccupancyOccupantForm, user: User, connectedDatabase?: PoolConnection): Promise<number>;
|
export default function addLotOccupancyOccupant(lotOccupancyOccupantForm: AddLotOccupancyOccupantForm, user: User, connectedDatabase?: PoolConnection): Promise<number>;
|
||||||
export default addLotOccupancyOccupant;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addLotOccupancyOccupant(lotOccupancyOccupantForm, user, connectedDatabase) {
|
export default async function addLotOccupancyOccupant(lotOccupancyOccupantForm, user, connectedDatabase) {
|
||||||
const database = connectedDatabase ?? (await acquireConnection());
|
const database = connectedDatabase ?? (await acquireConnection());
|
||||||
let lotOccupantIndex = 0;
|
let lotOccupantIndex = 0;
|
||||||
const maxIndexResult = database
|
const maxIndexResult = database
|
||||||
|
|
@ -31,4 +31,3 @@ export async function addLotOccupancyOccupant(lotOccupancyOccupantForm, user, co
|
||||||
}
|
}
|
||||||
return lotOccupantIndex;
|
return lotOccupantIndex;
|
||||||
}
|
}
|
||||||
export default addLotOccupancyOccupant;
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import type { PoolConnection } from 'better-sqlite-pool'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddLotOccupancyOccupantForm {
|
export interface AddLotOccupancyOccupantForm {
|
||||||
lotOccupancyId: string | number
|
lotOccupancyId: string | number
|
||||||
lotOccupantTypeId: string | number
|
lotOccupantTypeId: string | number
|
||||||
occupantName: string
|
occupantName: string
|
||||||
|
|
@ -17,7 +17,7 @@ interface AddLotOccupancyOccupantForm {
|
||||||
occupantComment?: string
|
occupantComment?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addLotOccupancyOccupant(
|
export default async function addLotOccupancyOccupant(
|
||||||
lotOccupancyOccupantForm: AddLotOccupancyOccupantForm,
|
lotOccupancyOccupantForm: AddLotOccupancyOccupantForm,
|
||||||
user: User,
|
user: User,
|
||||||
connectedDatabase?: PoolConnection
|
connectedDatabase?: PoolConnection
|
||||||
|
|
@ -84,5 +84,3 @@ export async function addLotOccupancyOccupant(
|
||||||
|
|
||||||
return lotOccupantIndex
|
return lotOccupantIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addLotOccupancyOccupant
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
interface AddLotOccupancyTransactionForm {
|
export interface AddLotOccupancyTransactionForm {
|
||||||
lotOccupancyId: string | number;
|
lotOccupancyId: string | number;
|
||||||
transactionDateString?: string;
|
transactionDateString?: string;
|
||||||
transactionTimeString?: string;
|
transactionTimeString?: string;
|
||||||
|
|
@ -6,5 +6,4 @@ interface AddLotOccupancyTransactionForm {
|
||||||
externalReceiptNumber: string;
|
externalReceiptNumber: string;
|
||||||
transactionNote: string;
|
transactionNote: string;
|
||||||
}
|
}
|
||||||
export declare function addLotOccupancyTransaction(lotOccupancyTransactionForm: AddLotOccupancyTransactionForm, user: User): Promise<number>;
|
export default function addLotOccupancyTransaction(lotOccupancyTransactionForm: AddLotOccupancyTransactionForm, user: User): Promise<number>;
|
||||||
export default addLotOccupancyTransaction;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { dateStringToInteger, dateToInteger, dateToTimeInteger, timeStringToInteger } from '@cityssm/utils-datetime';
|
import { dateStringToInteger, dateToInteger, dateToTimeInteger, timeStringToInteger } from '@cityssm/utils-datetime';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addLotOccupancyTransaction(lotOccupancyTransactionForm, user) {
|
export default async function addLotOccupancyTransaction(lotOccupancyTransactionForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
let transactionIndex = 0;
|
let transactionIndex = 0;
|
||||||
const maxIndexResult = database
|
const maxIndexResult = database
|
||||||
|
|
@ -32,4 +32,3 @@ export async function addLotOccupancyTransaction(lotOccupancyTransactionForm, us
|
||||||
database.release();
|
database.release();
|
||||||
return transactionIndex;
|
return transactionIndex;
|
||||||
}
|
}
|
||||||
export default addLotOccupancyTransaction;
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import {
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddLotOccupancyTransactionForm {
|
export interface AddLotOccupancyTransactionForm {
|
||||||
lotOccupancyId: string | number
|
lotOccupancyId: string | number
|
||||||
transactionDateString?: string
|
transactionDateString?: string
|
||||||
transactionTimeString?: string
|
transactionTimeString?: string
|
||||||
|
|
@ -16,7 +16,7 @@ interface AddLotOccupancyTransactionForm {
|
||||||
transactionNote: string
|
transactionNote: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addLotOccupancyTransaction(
|
export default async function addLotOccupancyTransaction(
|
||||||
lotOccupancyTransactionForm: AddLotOccupancyTransactionForm,
|
lotOccupancyTransactionForm: AddLotOccupancyTransactionForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
|
|
@ -78,5 +78,3 @@ export async function addLotOccupancyTransaction(
|
||||||
|
|
||||||
return transactionIndex
|
return transactionIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addLotOccupancyTransaction
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
interface AddLotOccupantTypeForm {
|
export interface AddLotOccupantTypeForm {
|
||||||
lotOccupantType: string;
|
lotOccupantType: string;
|
||||||
fontAwesomeIconClass?: string;
|
fontAwesomeIconClass?: string;
|
||||||
occupantCommentTitle?: string;
|
occupantCommentTitle?: string;
|
||||||
orderNumber?: number;
|
orderNumber?: number;
|
||||||
}
|
}
|
||||||
export declare function addLotOccupantType(lotOccupantTypeForm: AddLotOccupantTypeForm, user: User): Promise<number>;
|
export default function addLotOccupantType(lotOccupantTypeForm: AddLotOccupantTypeForm, user: User): Promise<number>;
|
||||||
export default addLotOccupantType;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { clearCacheByTableName } from '../helpers/functions.cache.js';
|
import { clearCacheByTableName } from '../helpers/functions.cache.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addLotOccupantType(lotOccupantTypeForm, user) {
|
export default async function addLotOccupantType(lotOccupantTypeForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -14,4 +14,3 @@ export async function addLotOccupantType(lotOccupantTypeForm, user) {
|
||||||
clearCacheByTableName('LotOccupantTypes');
|
clearCacheByTableName('LotOccupantTypes');
|
||||||
return result.lastInsertRowid;
|
return result.lastInsertRowid;
|
||||||
}
|
}
|
||||||
export default addLotOccupantType;
|
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,14 @@ import { clearCacheByTableName } from '../helpers/functions.cache.js'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddLotOccupantTypeForm {
|
export interface AddLotOccupantTypeForm {
|
||||||
lotOccupantType: string
|
lotOccupantType: string
|
||||||
fontAwesomeIconClass?: string
|
fontAwesomeIconClass?: string
|
||||||
occupantCommentTitle?: string
|
occupantCommentTitle?: string
|
||||||
orderNumber?: number
|
orderNumber?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addLotOccupantType(
|
export default async function addLotOccupantType(
|
||||||
lotOccupantTypeForm: AddLotOccupantTypeForm,
|
lotOccupantTypeForm: AddLotOccupantTypeForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
|
|
@ -42,5 +42,3 @@ export async function addLotOccupantType(
|
||||||
|
|
||||||
return result.lastInsertRowid as number
|
return result.lastInsertRowid as number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addLotOccupantType
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
interface AddLotTypeFieldForm {
|
export interface AddLotTypeFieldForm {
|
||||||
lotTypeId: string | number;
|
lotTypeId: string | number;
|
||||||
lotTypeField: string;
|
lotTypeField: string;
|
||||||
lotTypeFieldValues?: string;
|
lotTypeFieldValues?: string;
|
||||||
|
|
@ -8,5 +8,4 @@ interface AddLotTypeFieldForm {
|
||||||
maximumLength: string | number;
|
maximumLength: string | number;
|
||||||
orderNumber?: number;
|
orderNumber?: number;
|
||||||
}
|
}
|
||||||
export declare function addLotTypeField(lotTypeFieldForm: AddLotTypeFieldForm, user: User): Promise<number>;
|
export default function addLotTypeField(lotTypeFieldForm: AddLotTypeFieldForm, user: User): Promise<number>;
|
||||||
export default addLotTypeField;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { clearCacheByTableName } from '../helpers/functions.cache.js';
|
import { clearCacheByTableName } from '../helpers/functions.cache.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addLotTypeField(lotTypeFieldForm, user) {
|
export default async function addLotTypeField(lotTypeFieldForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -17,4 +17,3 @@ export async function addLotTypeField(lotTypeFieldForm, user) {
|
||||||
clearCacheByTableName('LotTypeFields');
|
clearCacheByTableName('LotTypeFields');
|
||||||
return result.lastInsertRowid;
|
return result.lastInsertRowid;
|
||||||
}
|
}
|
||||||
export default addLotTypeField;
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { clearCacheByTableName } from '../helpers/functions.cache.js'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddLotTypeFieldForm {
|
export interface AddLotTypeFieldForm {
|
||||||
lotTypeId: string | number
|
lotTypeId: string | number
|
||||||
lotTypeField: string
|
lotTypeField: string
|
||||||
lotTypeFieldValues?: string
|
lotTypeFieldValues?: string
|
||||||
|
|
@ -13,7 +13,7 @@ interface AddLotTypeFieldForm {
|
||||||
orderNumber?: number
|
orderNumber?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addLotTypeField(
|
export default async function addLotTypeField(
|
||||||
lotTypeFieldForm: AddLotTypeFieldForm,
|
lotTypeFieldForm: AddLotTypeFieldForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
|
|
@ -53,5 +53,3 @@ export async function addLotTypeField(
|
||||||
|
|
||||||
return result.lastInsertRowid as number
|
return result.lastInsertRowid as number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addLotTypeField
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
interface AddMapForm {
|
export interface AddMapForm {
|
||||||
mapName: string;
|
mapName: string;
|
||||||
mapDescription: string;
|
mapDescription: string;
|
||||||
mapSVG: string;
|
mapSVG: string;
|
||||||
|
|
@ -11,5 +11,4 @@ interface AddMapForm {
|
||||||
mapPostalCode: string;
|
mapPostalCode: string;
|
||||||
mapPhoneNumber: string;
|
mapPhoneNumber: string;
|
||||||
}
|
}
|
||||||
export declare function addMap(mapForm: AddMapForm, user: User): Promise<number>;
|
export default function addMap(mapForm: AddMapForm, user: User): Promise<number>;
|
||||||
export default addMap;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addMap(mapForm, user) {
|
export default async function addMap(mapForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -16,4 +16,3 @@ export async function addMap(mapForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.lastInsertRowid;
|
return result.lastInsertRowid;
|
||||||
}
|
}
|
||||||
export default addMap;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddMapForm {
|
export interface AddMapForm {
|
||||||
mapName: string
|
mapName: string
|
||||||
mapDescription: string
|
mapDescription: string
|
||||||
mapSVG: string
|
mapSVG: string
|
||||||
|
|
@ -14,7 +14,10 @@ interface AddMapForm {
|
||||||
mapPhoneNumber: string
|
mapPhoneNumber: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addMap(mapForm: AddMapForm, user: User): Promise<number> {
|
export default async function addMap(
|
||||||
|
mapForm: AddMapForm,
|
||||||
|
user: User
|
||||||
|
): Promise<number> {
|
||||||
const database = await acquireConnection()
|
const database = await acquireConnection()
|
||||||
|
|
||||||
const rightNowMillis = Date.now()
|
const rightNowMillis = Date.now()
|
||||||
|
|
@ -53,5 +56,3 @@ export async function addMap(mapForm: AddMapForm, user: User): Promise<number> {
|
||||||
|
|
||||||
return result.lastInsertRowid as number
|
return result.lastInsertRowid as number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addMap
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
interface AddOccupancyTypeFieldForm {
|
export interface AddOccupancyTypeFieldForm {
|
||||||
occupancyTypeId?: string | number;
|
occupancyTypeId?: string | number;
|
||||||
occupancyTypeField: string;
|
occupancyTypeField: string;
|
||||||
occupancyTypeFieldValues?: string;
|
occupancyTypeFieldValues?: string;
|
||||||
|
|
@ -8,5 +8,4 @@ interface AddOccupancyTypeFieldForm {
|
||||||
maximumLength: string | number;
|
maximumLength: string | number;
|
||||||
orderNumber?: number;
|
orderNumber?: number;
|
||||||
}
|
}
|
||||||
export declare function addOccupancyTypeField(occupancyTypeFieldForm: AddOccupancyTypeFieldForm, user: User): Promise<number>;
|
export default function addOccupancyTypeField(occupancyTypeFieldForm: AddOccupancyTypeFieldForm, user: User): Promise<number>;
|
||||||
export default addOccupancyTypeField;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { clearCacheByTableName } from '../helpers/functions.cache.js';
|
import { clearCacheByTableName } from '../helpers/functions.cache.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addOccupancyTypeField(occupancyTypeFieldForm, user) {
|
export default async function addOccupancyTypeField(occupancyTypeFieldForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -17,4 +17,3 @@ export async function addOccupancyTypeField(occupancyTypeFieldForm, user) {
|
||||||
clearCacheByTableName('OccupancyTypeFields');
|
clearCacheByTableName('OccupancyTypeFields');
|
||||||
return result.lastInsertRowid;
|
return result.lastInsertRowid;
|
||||||
}
|
}
|
||||||
export default addOccupancyTypeField;
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { clearCacheByTableName } from '../helpers/functions.cache.js'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddOccupancyTypeFieldForm {
|
export interface AddOccupancyTypeFieldForm {
|
||||||
occupancyTypeId?: string | number
|
occupancyTypeId?: string | number
|
||||||
occupancyTypeField: string
|
occupancyTypeField: string
|
||||||
occupancyTypeFieldValues?: string
|
occupancyTypeFieldValues?: string
|
||||||
|
|
@ -13,7 +13,7 @@ interface AddOccupancyTypeFieldForm {
|
||||||
orderNumber?: number
|
orderNumber?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addOccupancyTypeField(
|
export default async function addOccupancyTypeField(
|
||||||
occupancyTypeFieldForm: AddOccupancyTypeFieldForm,
|
occupancyTypeFieldForm: AddOccupancyTypeFieldForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
|
|
@ -53,5 +53,3 @@ export async function addOccupancyTypeField(
|
||||||
|
|
||||||
return result.lastInsertRowid as number
|
return result.lastInsertRowid as number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addOccupancyTypeField
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
interface OccupancyTypePrintForm {
|
export interface AddOccupancyTypePrintForm {
|
||||||
occupancyTypeId: string | number;
|
occupancyTypeId: string | number;
|
||||||
printEJS: string;
|
printEJS: string;
|
||||||
orderNumber?: number;
|
orderNumber?: number;
|
||||||
}
|
}
|
||||||
export declare function addOccupancyTypePrint(occupancyTypePrintForm: OccupancyTypePrintForm, user: User): Promise<boolean>;
|
export default function addOccupancyTypePrint(occupancyTypePrintForm: AddOccupancyTypePrintForm, user: User): Promise<boolean>;
|
||||||
export default addOccupancyTypePrint;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { clearCacheByTableName } from '../helpers/functions.cache.js';
|
import { clearCacheByTableName } from '../helpers/functions.cache.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addOccupancyTypePrint(occupancyTypePrintForm, user) {
|
export default async function addOccupancyTypePrint(occupancyTypePrintForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
let result = database
|
let result = database
|
||||||
|
|
@ -25,4 +25,3 @@ export async function addOccupancyTypePrint(occupancyTypePrintForm, user) {
|
||||||
clearCacheByTableName('OccupancyTypePrints');
|
clearCacheByTableName('OccupancyTypePrints');
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default addOccupancyTypePrint;
|
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,14 @@ import { clearCacheByTableName } from '../helpers/functions.cache.js'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface OccupancyTypePrintForm {
|
export interface AddOccupancyTypePrintForm {
|
||||||
occupancyTypeId: string | number
|
occupancyTypeId: string | number
|
||||||
printEJS: string
|
printEJS: string
|
||||||
orderNumber?: number
|
orderNumber?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addOccupancyTypePrint(
|
export default async function addOccupancyTypePrint(
|
||||||
occupancyTypePrintForm: OccupancyTypePrintForm,
|
occupancyTypePrintForm: AddOccupancyTypePrintForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const database = await acquireConnection()
|
const database = await acquireConnection()
|
||||||
|
|
@ -59,5 +59,3 @@ export async function addOccupancyTypePrint(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addOccupancyTypePrint
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import type { PoolConnection } from 'better-sqlite-pool';
|
import type { PoolConnection } from 'better-sqlite-pool';
|
||||||
interface LotFieldForm {
|
export interface LotFieldForm {
|
||||||
lotId: string | number;
|
lotId: string | number;
|
||||||
lotTypeFieldId: string | number;
|
lotTypeFieldId: string | number;
|
||||||
lotFieldValue: string;
|
lotFieldValue: string;
|
||||||
}
|
}
|
||||||
export declare function addOrUpdateLotField(lotFieldForm: LotFieldForm, user: User, connectedDatabase?: PoolConnection): Promise<boolean>;
|
export default function addOrUpdateLotField(lotFieldForm: LotFieldForm, user: User, connectedDatabase?: PoolConnection): Promise<boolean>;
|
||||||
export default addOrUpdateLotField;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addOrUpdateLotField(lotFieldForm, user, connectedDatabase) {
|
export default async function addOrUpdateLotField(lotFieldForm, user, connectedDatabase) {
|
||||||
const database = connectedDatabase ?? (await acquireConnection());
|
const database = connectedDatabase ?? (await acquireConnection());
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
let result = database
|
let result = database
|
||||||
|
|
@ -26,4 +26,3 @@ export async function addOrUpdateLotField(lotFieldForm, user, connectedDatabase)
|
||||||
}
|
}
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default addOrUpdateLotField;
|
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@ import type { PoolConnection } from 'better-sqlite-pool'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface LotFieldForm {
|
export interface LotFieldForm {
|
||||||
lotId: string | number
|
lotId: string | number
|
||||||
lotTypeFieldId: string | number
|
lotTypeFieldId: string | number
|
||||||
lotFieldValue: string
|
lotFieldValue: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addOrUpdateLotField(
|
export default async function addOrUpdateLotField(
|
||||||
lotFieldForm: LotFieldForm,
|
lotFieldForm: LotFieldForm,
|
||||||
user: User,
|
user: User,
|
||||||
connectedDatabase?: PoolConnection
|
connectedDatabase?: PoolConnection
|
||||||
|
|
@ -62,5 +62,3 @@ export async function addOrUpdateLotField(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addOrUpdateLotField
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import type { PoolConnection } from 'better-sqlite-pool';
|
import type { PoolConnection } from 'better-sqlite-pool';
|
||||||
interface LotOccupancyFieldForm {
|
export interface LotOccupancyFieldForm {
|
||||||
lotOccupancyId: string | number;
|
lotOccupancyId: string | number;
|
||||||
occupancyTypeFieldId: string | number;
|
occupancyTypeFieldId: string | number;
|
||||||
lotOccupancyFieldValue: string;
|
lotOccupancyFieldValue: string;
|
||||||
}
|
}
|
||||||
export declare function addOrUpdateLotOccupancyField(lotOccupancyFieldForm: LotOccupancyFieldForm, user: User, connectedDatabase?: PoolConnection): Promise<boolean>;
|
export default function addOrUpdateLotOccupancyField(lotOccupancyFieldForm: LotOccupancyFieldForm, user: User, connectedDatabase?: PoolConnection): Promise<boolean>;
|
||||||
export default addOrUpdateLotOccupancyField;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addOrUpdateLotOccupancyField(lotOccupancyFieldForm, user, connectedDatabase) {
|
export default async function addOrUpdateLotOccupancyField(lotOccupancyFieldForm, user, connectedDatabase) {
|
||||||
const database = connectedDatabase ?? (await acquireConnection());
|
const database = connectedDatabase ?? (await acquireConnection());
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
let result = database
|
let result = database
|
||||||
|
|
@ -26,4 +26,3 @@ export async function addOrUpdateLotOccupancyField(lotOccupancyFieldForm, user,
|
||||||
}
|
}
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default addOrUpdateLotOccupancyField;
|
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@ import type { PoolConnection } from 'better-sqlite-pool'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface LotOccupancyFieldForm {
|
export interface LotOccupancyFieldForm {
|
||||||
lotOccupancyId: string | number
|
lotOccupancyId: string | number
|
||||||
occupancyTypeFieldId: string | number
|
occupancyTypeFieldId: string | number
|
||||||
lotOccupancyFieldValue: string
|
lotOccupancyFieldValue: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addOrUpdateLotOccupancyField(
|
export default async function addOrUpdateLotOccupancyField(
|
||||||
lotOccupancyFieldForm: LotOccupancyFieldForm,
|
lotOccupancyFieldForm: LotOccupancyFieldForm,
|
||||||
user: User,
|
user: User,
|
||||||
connectedDatabase?: PoolConnection
|
connectedDatabase?: PoolConnection
|
||||||
|
|
@ -62,5 +62,3 @@ export async function addOrUpdateLotOccupancyField(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addOrUpdateLotOccupancyField
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
interface AddWorkOrderForm {
|
export interface AddWorkOrderForm {
|
||||||
workOrderTypeId: number | string;
|
workOrderTypeId: number | string;
|
||||||
workOrderNumber?: string;
|
workOrderNumber?: string;
|
||||||
workOrderDescription: string;
|
workOrderDescription: string;
|
||||||
|
|
@ -6,5 +6,4 @@ interface AddWorkOrderForm {
|
||||||
workOrderCloseDateString?: string;
|
workOrderCloseDateString?: string;
|
||||||
lotOccupancyId?: string;
|
lotOccupancyId?: string;
|
||||||
}
|
}
|
||||||
export declare function addWorkOrder(workOrderForm: AddWorkOrderForm, user: User): Promise<number>;
|
export default function addWorkOrder(workOrderForm: AddWorkOrderForm, user: User): Promise<number>;
|
||||||
export default addWorkOrder;
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { dateStringToInteger, dateToInteger } from '@cityssm/utils-datetime';
|
import { dateStringToInteger, dateToInteger } from '@cityssm/utils-datetime';
|
||||||
import { addWorkOrderLotOccupancy } from './addWorkOrderLotOccupancy.js';
|
import addWorkOrderLotOccupancy from './addWorkOrderLotOccupancy.js';
|
||||||
import { getNextWorkOrderNumber } from './getNextWorkOrderNumber.js';
|
import { getNextWorkOrderNumber } from './getNextWorkOrderNumber.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addWorkOrder(workOrderForm, user) {
|
export default async function addWorkOrder(workOrderForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNow = new Date();
|
const rightNow = new Date();
|
||||||
let workOrderNumber = workOrderForm.workOrderNumber;
|
let workOrderNumber = workOrderForm.workOrderNumber;
|
||||||
|
|
@ -31,4 +31,3 @@ export async function addWorkOrder(workOrderForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return workOrderId;
|
return workOrderId;
|
||||||
}
|
}
|
||||||
export default addWorkOrder;
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
import {
|
import { dateStringToInteger, dateToInteger } from '@cityssm/utils-datetime'
|
||||||
dateStringToInteger,
|
|
||||||
dateToInteger
|
|
||||||
} from '@cityssm/utils-datetime'
|
|
||||||
|
|
||||||
import { addWorkOrderLotOccupancy } from './addWorkOrderLotOccupancy.js'
|
import addWorkOrderLotOccupancy from './addWorkOrderLotOccupancy.js'
|
||||||
import { getNextWorkOrderNumber } from './getNextWorkOrderNumber.js'
|
import { getNextWorkOrderNumber } from './getNextWorkOrderNumber.js'
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddWorkOrderForm {
|
export interface AddWorkOrderForm {
|
||||||
workOrderTypeId: number | string
|
workOrderTypeId: number | string
|
||||||
workOrderNumber?: string
|
workOrderNumber?: string
|
||||||
workOrderDescription: string
|
workOrderDescription: string
|
||||||
|
|
@ -16,7 +13,7 @@ interface AddWorkOrderForm {
|
||||||
lotOccupancyId?: string
|
lotOccupancyId?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addWorkOrder(
|
export default async function addWorkOrder(
|
||||||
workOrderForm: AddWorkOrderForm,
|
workOrderForm: AddWorkOrderForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
|
|
@ -72,5 +69,3 @@ export async function addWorkOrder(
|
||||||
|
|
||||||
return workOrderId
|
return workOrderId
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addWorkOrder
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
interface AddWorkOrderCommentForm {
|
export interface AddWorkOrderCommentForm {
|
||||||
workOrderId: string;
|
workOrderId: string;
|
||||||
workOrderComment: string;
|
workOrderComment: string;
|
||||||
}
|
}
|
||||||
export declare function addWorkOrderComment(workOrderCommentForm: AddWorkOrderCommentForm, user: User): Promise<number>;
|
export default function addWorkOrderComment(workOrderCommentForm: AddWorkOrderCommentForm, user: User): Promise<number>;
|
||||||
export default addWorkOrderComment;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as dateTimeFunctions from '@cityssm/utils-datetime';
|
import * as dateTimeFunctions from '@cityssm/utils-datetime';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addWorkOrderComment(workOrderCommentForm, user) {
|
export default async function addWorkOrderComment(workOrderCommentForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNow = new Date();
|
const rightNow = new Date();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -15,4 +15,3 @@ export async function addWorkOrderComment(workOrderCommentForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.lastInsertRowid;
|
return result.lastInsertRowid;
|
||||||
}
|
}
|
||||||
export default addWorkOrderComment;
|
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@ import * as dateTimeFunctions from '@cityssm/utils-datetime'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddWorkOrderCommentForm {
|
export interface AddWorkOrderCommentForm {
|
||||||
workOrderId: string
|
workOrderId: string
|
||||||
workOrderComment: string
|
workOrderComment: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addWorkOrderComment(
|
export default async function addWorkOrderComment(
|
||||||
workOrderCommentForm: AddWorkOrderCommentForm,
|
workOrderCommentForm: AddWorkOrderCommentForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
|
|
@ -40,5 +40,3 @@ export async function addWorkOrderComment(
|
||||||
|
|
||||||
return result.lastInsertRowid as number
|
return result.lastInsertRowid as number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addWorkOrderComment
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
interface AddWorkOrderLotForm {
|
export interface AddWorkOrderLotForm {
|
||||||
workOrderId: number | string;
|
workOrderId: number | string;
|
||||||
lotId: number | string;
|
lotId: number | string;
|
||||||
}
|
}
|
||||||
export declare function addWorkOrderLot(workOrderLotForm: AddWorkOrderLotForm, user: User): Promise<boolean>;
|
export default function addWorkOrderLot(workOrderLotForm: AddWorkOrderLotForm, user: User): Promise<boolean>;
|
||||||
export default addWorkOrderLot;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addWorkOrderLot(workOrderLotForm, user) {
|
export default async function addWorkOrderLot(workOrderLotForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const row = database
|
const row = database
|
||||||
|
|
@ -35,4 +35,3 @@ export async function addWorkOrderLot(workOrderLotForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
export default addWorkOrderLot;
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddWorkOrderLotForm {
|
export interface AddWorkOrderLotForm {
|
||||||
workOrderId: number | string
|
workOrderId: number | string
|
||||||
lotId: number | string
|
lotId: number | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addWorkOrderLot(
|
export default async function addWorkOrderLot(
|
||||||
workOrderLotForm: AddWorkOrderLotForm,
|
workOrderLotForm: AddWorkOrderLotForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
|
|
@ -70,5 +70,3 @@ export async function addWorkOrderLot(
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addWorkOrderLot
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import type { PoolConnection } from 'better-sqlite-pool';
|
import type { PoolConnection } from 'better-sqlite-pool';
|
||||||
interface AddWorkOrderLotOccupancyForm {
|
export interface AddWorkOrderLotOccupancyForm {
|
||||||
workOrderId: number | string;
|
workOrderId: number | string;
|
||||||
lotOccupancyId: number | string;
|
lotOccupancyId: number | string;
|
||||||
}
|
}
|
||||||
export declare function addWorkOrderLotOccupancy(workOrderLotOccupancyForm: AddWorkOrderLotOccupancyForm, user: User, connectedDatabase?: PoolConnection): Promise<boolean>;
|
export default function addWorkOrderLotOccupancy(workOrderLotOccupancyForm: AddWorkOrderLotOccupancyForm, user: User, connectedDatabase?: PoolConnection): Promise<boolean>;
|
||||||
export default addWorkOrderLotOccupancy;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addWorkOrderLotOccupancy(workOrderLotOccupancyForm, user, connectedDatabase) {
|
export default async function addWorkOrderLotOccupancy(workOrderLotOccupancyForm, user, connectedDatabase) {
|
||||||
const database = connectedDatabase ?? (await acquireConnection());
|
const database = connectedDatabase ?? (await acquireConnection());
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const row = database
|
const row = database
|
||||||
|
|
@ -37,4 +37,3 @@ export async function addWorkOrderLotOccupancy(workOrderLotOccupancyForm, user,
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
export default addWorkOrderLotOccupancy;
|
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@ import type { PoolConnection } from 'better-sqlite-pool'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddWorkOrderLotOccupancyForm {
|
export interface AddWorkOrderLotOccupancyForm {
|
||||||
workOrderId: number | string
|
workOrderId: number | string
|
||||||
lotOccupancyId: number | string
|
lotOccupancyId: number | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addWorkOrderLotOccupancy(
|
export default async function addWorkOrderLotOccupancy(
|
||||||
workOrderLotOccupancyForm: AddWorkOrderLotOccupancyForm,
|
workOrderLotOccupancyForm: AddWorkOrderLotOccupancyForm,
|
||||||
user: User,
|
user: User,
|
||||||
connectedDatabase?: PoolConnection
|
connectedDatabase?: PoolConnection
|
||||||
|
|
@ -76,5 +76,3 @@ export async function addWorkOrderLotOccupancy(
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addWorkOrderLotOccupancy
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
interface AddWorkOrderMilestoneForm {
|
export interface AddWorkOrderMilestoneForm {
|
||||||
workOrderId: string | number;
|
workOrderId: string | number;
|
||||||
workOrderMilestoneTypeId: number | string;
|
workOrderMilestoneTypeId: number | string;
|
||||||
workOrderMilestoneDateString: string;
|
workOrderMilestoneDateString: string;
|
||||||
|
|
@ -7,5 +7,4 @@ interface AddWorkOrderMilestoneForm {
|
||||||
workOrderMilestoneCompletionDateString?: string;
|
workOrderMilestoneCompletionDateString?: string;
|
||||||
workOrderMilestoneCompletionTimeString?: string;
|
workOrderMilestoneCompletionTimeString?: string;
|
||||||
}
|
}
|
||||||
export declare function addWorkOrderMilestone(milestoneForm: AddWorkOrderMilestoneForm, user: User): Promise<number>;
|
export default function addWorkOrderMilestone(milestoneForm: AddWorkOrderMilestoneForm, user: User): Promise<number>;
|
||||||
export default addWorkOrderMilestone;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { dateStringToInteger, timeStringToInteger } from '@cityssm/utils-datetime';
|
import { dateStringToInteger, timeStringToInteger } from '@cityssm/utils-datetime';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function addWorkOrderMilestone(milestoneForm, user) {
|
export default async function addWorkOrderMilestone(milestoneForm, user) {
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -26,4 +26,3 @@ export async function addWorkOrderMilestone(milestoneForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.lastInsertRowid;
|
return result.lastInsertRowid;
|
||||||
}
|
}
|
||||||
export default addWorkOrderMilestone;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
|
|
||||||
/* eslint-disable @typescript-eslint/indent */
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
dateStringToInteger,
|
dateStringToInteger,
|
||||||
timeStringToInteger
|
timeStringToInteger
|
||||||
|
|
@ -8,7 +5,7 @@ import {
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddWorkOrderMilestoneForm {
|
export interface AddWorkOrderMilestoneForm {
|
||||||
workOrderId: string | number
|
workOrderId: string | number
|
||||||
workOrderMilestoneTypeId: number | string
|
workOrderMilestoneTypeId: number | string
|
||||||
workOrderMilestoneDateString: string
|
workOrderMilestoneDateString: string
|
||||||
|
|
@ -18,7 +15,7 @@ interface AddWorkOrderMilestoneForm {
|
||||||
workOrderMilestoneCompletionTimeString?: string
|
workOrderMilestoneCompletionTimeString?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addWorkOrderMilestone(
|
export default async function addWorkOrderMilestone(
|
||||||
milestoneForm: AddWorkOrderMilestoneForm,
|
milestoneForm: AddWorkOrderMilestoneForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
|
|
@ -69,5 +66,3 @@ export async function addWorkOrderMilestone(
|
||||||
|
|
||||||
return result.lastInsertRowid as number
|
return result.lastInsertRowid as number
|
||||||
}
|
}
|
||||||
|
|
||||||
export default addWorkOrderMilestone
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
export declare function cleanupDatabase(user: User): Promise<{
|
export default function cleanupDatabase(user: User): Promise<{
|
||||||
inactivatedRecordCount: number;
|
inactivatedRecordCount: number;
|
||||||
purgedRecordCount: number;
|
purgedRecordCount: number;
|
||||||
}>;
|
}>;
|
||||||
export default cleanupDatabase;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as configFunctions from '../helpers/functions.config.js';
|
import * as configFunctions from '../helpers/functions.config.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function cleanupDatabase(user) {
|
export default async function cleanupDatabase(user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNowMillis = Date.now();
|
const rightNowMillis = Date.now();
|
||||||
const recordDeleteTimeMillisMin = rightNowMillis -
|
const recordDeleteTimeMillisMin = rightNowMillis -
|
||||||
|
|
@ -234,4 +234,3 @@ export async function cleanupDatabase(user) {
|
||||||
purgedRecordCount
|
purgedRecordCount
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export default cleanupDatabase;
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import * as configFunctions from '../helpers/functions.config.js'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
export async function cleanupDatabase(
|
export default async function cleanupDatabase(
|
||||||
user: User
|
user: User
|
||||||
): Promise<{ inactivatedRecordCount: number; purgedRecordCount: number }> {
|
): Promise<{ inactivatedRecordCount: number; purgedRecordCount: number }> {
|
||||||
const database = await acquireConnection()
|
const database = await acquireConnection()
|
||||||
|
|
@ -447,5 +447,3 @@ export async function cleanupDatabase(
|
||||||
purgedRecordCount
|
purgedRecordCount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default cleanupDatabase
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
interface AddWorkOrderForm {
|
export interface CloseWorkOrderForm {
|
||||||
workOrderId: number | string;
|
workOrderId: number | string;
|
||||||
workOrderCloseDateString?: string;
|
workOrderCloseDateString?: string;
|
||||||
}
|
}
|
||||||
export declare function closeWorkOrder(workOrderForm: AddWorkOrderForm, user: User): Promise<boolean>;
|
export default function closeWorkOrder(workOrderForm: CloseWorkOrderForm, user: User): Promise<boolean>;
|
||||||
export default closeWorkOrder;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { dateStringToInteger, dateToInteger } from '@cityssm/utils-datetime';
|
import { dateStringToInteger, dateToInteger } from '@cityssm/utils-datetime';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function closeWorkOrder(workOrderForm, user) {
|
export default async function closeWorkOrder(workOrderForm, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const rightNow = new Date();
|
const rightNow = new Date();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -15,4 +15,3 @@ export async function closeWorkOrder(workOrderForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default closeWorkOrder;
|
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@ import { dateStringToInteger, dateToInteger } from '@cityssm/utils-datetime'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface AddWorkOrderForm {
|
export interface CloseWorkOrderForm {
|
||||||
workOrderId: number | string
|
workOrderId: number | string
|
||||||
workOrderCloseDateString?: string
|
workOrderCloseDateString?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function closeWorkOrder(
|
export default async function closeWorkOrder(
|
||||||
workOrderForm: AddWorkOrderForm,
|
workOrderForm: CloseWorkOrderForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const database = await acquireConnection()
|
const database = await acquireConnection()
|
||||||
|
|
@ -36,5 +36,3 @@ export async function closeWorkOrder(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default closeWorkOrder
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
interface CompleteWorkOrderMilestoneForm {
|
export interface CompleteWorkOrderMilestoneForm {
|
||||||
workOrderMilestoneId: string | number;
|
workOrderMilestoneId: string | number;
|
||||||
workOrderMilestoneCompletionDateString?: string;
|
workOrderMilestoneCompletionDateString?: string;
|
||||||
workOrderMilestoneCompletionTimeString?: string;
|
workOrderMilestoneCompletionTimeString?: string;
|
||||||
}
|
}
|
||||||
export declare function completeWorkOrderMilestone(milestoneForm: CompleteWorkOrderMilestoneForm, user: User): Promise<boolean>;
|
export default function completeWorkOrderMilestone(milestoneForm: CompleteWorkOrderMilestoneForm, user: User): Promise<boolean>;
|
||||||
export default completeWorkOrderMilestone;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { dateStringToInteger, dateToInteger, dateToTimeInteger, timeStringToInteger } from '@cityssm/utils-datetime';
|
import { dateStringToInteger, dateToInteger, dateToTimeInteger, timeStringToInteger } from '@cityssm/utils-datetime';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function completeWorkOrderMilestone(milestoneForm, user) {
|
export default async function completeWorkOrderMilestone(milestoneForm, user) {
|
||||||
const rightNow = new Date();
|
const rightNow = new Date();
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const result = database
|
const result = database
|
||||||
|
|
@ -18,4 +18,3 @@ export async function completeWorkOrderMilestone(milestoneForm, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default completeWorkOrderMilestone;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
|
|
||||||
/* eslint-disable @typescript-eslint/indent */
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
dateStringToInteger,
|
dateStringToInteger,
|
||||||
dateToInteger,
|
dateToInteger,
|
||||||
|
|
@ -10,13 +7,13 @@ import {
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
interface CompleteWorkOrderMilestoneForm {
|
export interface CompleteWorkOrderMilestoneForm {
|
||||||
workOrderMilestoneId: string | number
|
workOrderMilestoneId: string | number
|
||||||
workOrderMilestoneCompletionDateString?: string
|
workOrderMilestoneCompletionDateString?: string
|
||||||
workOrderMilestoneCompletionTimeString?: string
|
workOrderMilestoneCompletionTimeString?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function completeWorkOrderMilestone(
|
export default async function completeWorkOrderMilestone(
|
||||||
milestoneForm: CompleteWorkOrderMilestoneForm,
|
milestoneForm: CompleteWorkOrderMilestoneForm,
|
||||||
user: User
|
user: User
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
|
|
@ -53,5 +50,3 @@ export async function completeWorkOrderMilestone(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default completeWorkOrderMilestone
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
export declare function copyLotOccupancy(oldLotOccupancyId: number | string, user: User): Promise<number>;
|
export default function copyLotOccupancy(oldLotOccupancyId: number | string, user: User): Promise<number>;
|
||||||
export default copyLotOccupancy;
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { dateToString } from '@cityssm/utils-datetime';
|
import { dateToString } from '@cityssm/utils-datetime';
|
||||||
import { addLotOccupancy } from './addLotOccupancy.js';
|
import addLotOccupancy from './addLotOccupancy.js';
|
||||||
import { addLotOccupancyOccupant } from './addLotOccupancyOccupant.js';
|
import addLotOccupancyOccupant from './addLotOccupancyOccupant.js';
|
||||||
import { getLotOccupancy } from './getLotOccupancy.js';
|
import { getLotOccupancy } from './getLotOccupancy.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function copyLotOccupancy(oldLotOccupancyId, user) {
|
export default async function copyLotOccupancy(oldLotOccupancyId, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const oldLotOccupancy = (await getLotOccupancy(oldLotOccupancyId, database));
|
const oldLotOccupancy = (await getLotOccupancy(oldLotOccupancyId, database));
|
||||||
const newLotOccupancyId = await addLotOccupancy({
|
const newLotOccupancyId = await addLotOccupancy({
|
||||||
|
|
@ -40,4 +40,3 @@ export async function copyLotOccupancy(oldLotOccupancyId, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return newLotOccupancyId;
|
return newLotOccupancyId;
|
||||||
}
|
}
|
||||||
export default copyLotOccupancy;
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import { dateToString } from '@cityssm/utils-datetime'
|
import { dateToString } from '@cityssm/utils-datetime'
|
||||||
|
|
||||||
import { addLotOccupancy } from './addLotOccupancy.js'
|
import addLotOccupancy from './addLotOccupancy.js'
|
||||||
import { addLotOccupancyOccupant } from './addLotOccupancyOccupant.js'
|
import addLotOccupancyOccupant from './addLotOccupancyOccupant.js'
|
||||||
import { getLotOccupancy } from './getLotOccupancy.js'
|
import { getLotOccupancy } from './getLotOccupancy.js'
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
export async function copyLotOccupancy(
|
export default async function copyLotOccupancy(
|
||||||
oldLotOccupancyId: number | string,
|
oldLotOccupancyId: number | string,
|
||||||
user: User
|
user: User
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
|
|
@ -78,5 +78,3 @@ export async function copyLotOccupancy(
|
||||||
|
|
||||||
return newLotOccupancyId
|
return newLotOccupancyId
|
||||||
}
|
}
|
||||||
|
|
||||||
export default copyLotOccupancy
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
|
|
||||||
/* eslint-disable @typescript-eslint/indent */
|
|
||||||
|
|
||||||
import type { WorkOrderMilestoneType } from '../types/recordTypes.js'
|
import type { WorkOrderMilestoneType } from '../types/recordTypes.js'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
|
|
||||||
/* eslint-disable @typescript-eslint/indent */
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
dateIntegerToString,
|
dateIntegerToString,
|
||||||
dateStringToInteger,
|
dateStringToInteger,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
|
|
||||||
/* eslint-disable @typescript-eslint/indent */
|
|
||||||
|
|
||||||
import type { WorkOrderType } from '../types/recordTypes.js'
|
import type { WorkOrderType } from '../types/recordTypes.js'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
|
|
||||||
/* eslint-disable @typescript-eslint/indent */
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
dateIntegerToString,
|
dateIntegerToString,
|
||||||
dateStringToInteger
|
dateStringToInteger
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { addOrUpdateLotField } from './addOrUpdateLotField.js';
|
import addOrUpdateLotField from './addOrUpdateLotField.js';
|
||||||
import { deleteLotField } from './deleteLotField.js';
|
import { deleteLotField } from './deleteLotField.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function updateLot(lotForm, user) {
|
export async function updateLot(lotForm, user) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
|
import addOrUpdateLotField from './addOrUpdateLotField.js'
|
||||||
/* eslint-disable @typescript-eslint/indent */
|
|
||||||
|
|
||||||
import { addOrUpdateLotField } from './addOrUpdateLotField.js'
|
|
||||||
import { deleteLotField } from './deleteLotField.js'
|
import { deleteLotField } from './deleteLotField.js'
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { dateStringToInteger } from '@cityssm/utils-datetime';
|
import { dateStringToInteger } from '@cityssm/utils-datetime';
|
||||||
import { addOrUpdateLotOccupancyField } from './addOrUpdateLotOccupancyField.js';
|
import addOrUpdateLotOccupancyField from './addOrUpdateLotOccupancyField.js';
|
||||||
import { deleteLotOccupancyField } from './deleteLotOccupancyField.js';
|
import { deleteLotOccupancyField } from './deleteLotOccupancyField.js';
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function updateLotOccupancy(lotOccupancyForm, user) {
|
export async function updateLotOccupancy(lotOccupancyForm, user) {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
|
|
||||||
/* eslint-disable @typescript-eslint/indent */
|
|
||||||
|
|
||||||
import { dateStringToInteger } from '@cityssm/utils-datetime'
|
import { dateStringToInteger } from '@cityssm/utils-datetime'
|
||||||
|
|
||||||
import { addOrUpdateLotOccupancyField } from './addOrUpdateLotOccupancyField.js'
|
import addOrUpdateLotOccupancyField from './addOrUpdateLotOccupancyField.js'
|
||||||
import { deleteLotOccupancyField } from './deleteLotOccupancyField.js'
|
import { deleteLotOccupancyField } from './deleteLotOccupancyField.js'
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { addFee } from '../../database/addFee.js';
|
import addFee from '../../database/addFee.js';
|
||||||
import { getFeeCategories } from '../../database/getFeeCategories.js';
|
import { getFeeCategories } from '../../database/getFeeCategories.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const feeId = await addFee(request.body, request.session.user);
|
const feeId = await addFee(request.body, request.session.user);
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,16 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { addFee } from '../../database/addFee.js'
|
import addFee, { type AddFeeForm } from '../../database/addFee.js'
|
||||||
import { getFeeCategories } from '../../database/getFeeCategories.js'
|
import { getFeeCategories } from '../../database/getFeeCategories.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
response: Response
|
response: Response
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const feeId = await addFee(request.body, request.session.user as User)
|
const feeId = await addFee(
|
||||||
|
request.body as AddFeeForm,
|
||||||
|
request.session.user as User
|
||||||
|
)
|
||||||
|
|
||||||
const feeCategories = await getFeeCategories(
|
const feeCategories = await getFeeCategories(
|
||||||
{},
|
{},
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
import addLotOccupantType from '../../database/addLotOccupantType.js';
|
||||||
import { getLotOccupantTypes } from '../../helpers/functions.cache.js';
|
import { getLotOccupantTypes } from '../../helpers/functions.cache.js';
|
||||||
import { addLotOccupantType } from '../../database/addLotOccupantType.js';
|
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const lotOccupantTypeId = await addLotOccupantType(request.body, request.session.user);
|
const lotOccupantTypeId = await addLotOccupantType(request.body, request.session.user);
|
||||||
const lotOccupantTypes = await getLotOccupantTypes();
|
const lotOccupantTypes = await getLotOccupantTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,16 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
|
import addLotOccupantType, {
|
||||||
|
type AddLotOccupantTypeForm
|
||||||
|
} from '../../database/addLotOccupantType.js'
|
||||||
import { getLotOccupantTypes } from '../../helpers/functions.cache.js'
|
import { getLotOccupantTypes } from '../../helpers/functions.cache.js'
|
||||||
import { addLotOccupantType } from '../../database/addLotOccupantType.js'
|
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
response: Response
|
response: Response
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const lotOccupantTypeId = await addLotOccupantType(
|
const lotOccupantTypeId = await addLotOccupantType(
|
||||||
request.body,
|
request.body as AddLotOccupantTypeForm,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getLotStatuses } from '../../helpers/functions.cache.js';
|
|
||||||
import { addRecord } from '../../database/addRecord.js';
|
import { addRecord } from '../../database/addRecord.js';
|
||||||
|
import { getLotStatuses } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const lotStatusId = await addRecord('LotStatuses', request.body.lotStatus, request.body.orderNumber ?? -1, request.session.user);
|
const lotStatusId = await addRecord('LotStatuses', request.body.lotStatus, request.body.orderNumber ?? -1, request.session.user);
|
||||||
const lotStatuses = await getLotStatuses();
|
const lotStatuses = await getLotStatuses();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { getLotStatuses } from '../../helpers/functions.cache.js'
|
|
||||||
import { addRecord } from '../../database/addRecord.js'
|
import { addRecord } from '../../database/addRecord.js'
|
||||||
|
import { getLotStatuses } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getLotTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { addRecord } from '../../database/addRecord.js';
|
import { addRecord } from '../../database/addRecord.js';
|
||||||
|
import { getLotTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const lotTypeId = await addRecord('LotTypes', request.body.lotType, request.body.orderNumber ?? -1, request.session.user);
|
const lotTypeId = await addRecord('LotTypes', request.body.lotType, request.body.orderNumber ?? -1, request.session.user);
|
||||||
const lotTypes = await getLotTypes();
|
const lotTypes = await getLotTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { getLotTypes } from '../../helpers/functions.cache.js'
|
|
||||||
import { addRecord } from '../../database/addRecord.js'
|
import { addRecord } from '../../database/addRecord.js'
|
||||||
|
import { getLotTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
import addLotTypeField from '../../database/addLotTypeField.js';
|
||||||
import { getLotTypes } from '../../helpers/functions.cache.js';
|
import { getLotTypes } from '../../helpers/functions.cache.js';
|
||||||
import { addLotTypeField } from '../../database/addLotTypeField.js';
|
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const lotTypeFieldId = await addLotTypeField(request.body, request.session.user);
|
const lotTypeFieldId = await addLotTypeField(request.body, request.session.user);
|
||||||
const lotTypes = await getLotTypes();
|
const lotTypes = await getLotTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,16 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
|
import addLotTypeField, {
|
||||||
|
type AddLotTypeFieldForm
|
||||||
|
} from '../../database/addLotTypeField.js'
|
||||||
import { getLotTypes } from '../../helpers/functions.cache.js'
|
import { getLotTypes } from '../../helpers/functions.cache.js'
|
||||||
import { addLotTypeField } from '../../database/addLotTypeField.js'
|
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
response: Response
|
response: Response
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const lotTypeFieldId = await addLotTypeField(
|
const lotTypeFieldId = await addLotTypeField(
|
||||||
request.body,
|
request.body as AddLotTypeFieldForm,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { addRecord } from '../../database/addRecord.js';
|
import { addRecord } from '../../database/addRecord.js';
|
||||||
|
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const occupancyTypeId = await addRecord('OccupancyTypes', request.body.occupancyType, request.body.orderNumber ?? -1, request.session.user);
|
const occupancyTypeId = await addRecord('OccupancyTypes', request.body.occupancyType, request.body.orderNumber ?? -1, request.session.user);
|
||||||
const occupancyTypes = await getOccupancyTypes();
|
const occupancyTypes = await getOccupancyTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
|
import { addRecord } from '../../database/addRecord.js'
|
||||||
import {
|
import {
|
||||||
getAllOccupancyTypeFields,
|
getAllOccupancyTypeFields,
|
||||||
getOccupancyTypes
|
getOccupancyTypes
|
||||||
} from '../../helpers/functions.cache.js'
|
} from '../../helpers/functions.cache.js'
|
||||||
import { addRecord } from '../../database/addRecord.js'
|
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
import addOccupancyTypeField from '../../database/addOccupancyTypeField.js';
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
||||||
import { addOccupancyTypeField } from '../../database/addOccupancyTypeField.js';
|
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const occupancyTypeFieldId = await addOccupancyTypeField(request.body, request.session.user);
|
const occupancyTypeFieldId = await addOccupancyTypeField(request.body, request.session.user);
|
||||||
const occupancyTypes = await getOccupancyTypes();
|
const occupancyTypes = await getOccupancyTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,19 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
|
import addOccupancyTypeField, {
|
||||||
|
type AddOccupancyTypeFieldForm
|
||||||
|
} from '../../database/addOccupancyTypeField.js'
|
||||||
import {
|
import {
|
||||||
getAllOccupancyTypeFields,
|
getAllOccupancyTypeFields,
|
||||||
getOccupancyTypes
|
getOccupancyTypes
|
||||||
} from '../../helpers/functions.cache.js'
|
} from '../../helpers/functions.cache.js'
|
||||||
import { addOccupancyTypeField } from '../../database/addOccupancyTypeField.js'
|
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
response: Response
|
response: Response
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const occupancyTypeFieldId = await addOccupancyTypeField(
|
const occupancyTypeFieldId = await addOccupancyTypeField(
|
||||||
request.body,
|
request.body as AddOccupancyTypeFieldForm,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
import addOccupancyTypePrint from '../../database/addOccupancyTypePrint.js';
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
||||||
import { addOccupancyTypePrint } from '../../database/addOccupancyTypePrint.js';
|
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await addOccupancyTypePrint(request.body, request.session.user);
|
const success = await addOccupancyTypePrint(request.body, request.session.user);
|
||||||
const occupancyTypes = await getOccupancyTypes();
|
const occupancyTypes = await getOccupancyTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,19 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
|
import addOccupancyTypePrint, {
|
||||||
|
type AddOccupancyTypePrintForm
|
||||||
|
} from '../../database/addOccupancyTypePrint.js'
|
||||||
import {
|
import {
|
||||||
getAllOccupancyTypeFields,
|
getAllOccupancyTypeFields,
|
||||||
getOccupancyTypes
|
getOccupancyTypes
|
||||||
} from '../../helpers/functions.cache.js'
|
} from '../../helpers/functions.cache.js'
|
||||||
import { addOccupancyTypePrint } from '../../database/addOccupancyTypePrint.js'
|
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
response: Response
|
response: Response
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await addOccupancyTypePrint(
|
const success = await addOccupancyTypePrint(
|
||||||
request.body,
|
request.body as AddOccupancyTypePrintForm,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getWorkOrderMilestoneTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { addRecord } from '../../database/addRecord.js';
|
import { addRecord } from '../../database/addRecord.js';
|
||||||
|
import { getWorkOrderMilestoneTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const workOrderMilestoneTypeId = await addRecord('WorkOrderMilestoneTypes', request.body.workOrderMilestoneType, request.body.orderNumber ?? -1, request.session.user);
|
const workOrderMilestoneTypeId = await addRecord('WorkOrderMilestoneTypes', request.body.workOrderMilestoneType, request.body.orderNumber ?? -1, request.session.user);
|
||||||
const workOrderMilestoneTypes = await getWorkOrderMilestoneTypes();
|
const workOrderMilestoneTypes = await getWorkOrderMilestoneTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { getWorkOrderMilestoneTypes } from '../../helpers/functions.cache.js'
|
|
||||||
import { addRecord } from '../../database/addRecord.js'
|
import { addRecord } from '../../database/addRecord.js'
|
||||||
|
import { getWorkOrderMilestoneTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getWorkOrderTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { addRecord } from '../../database/addRecord.js';
|
import { addRecord } from '../../database/addRecord.js';
|
||||||
|
import { getWorkOrderTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const workOrderTypeId = await addRecord('WorkOrderTypes', request.body.workOrderType, request.body.orderNumber ?? -1, request.session.user);
|
const workOrderTypeId = await addRecord('WorkOrderTypes', request.body.workOrderType, request.body.orderNumber ?? -1, request.session.user);
|
||||||
const workOrderTypes = await getWorkOrderTypes();
|
const workOrderTypes = await getWorkOrderTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { getWorkOrderTypes } from '../../helpers/functions.cache.js'
|
|
||||||
import { addRecord } from '../../database/addRecord.js'
|
import { addRecord } from '../../database/addRecord.js'
|
||||||
|
import { getWorkOrderTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue