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