linting
parent
20b2ddc8d4
commit
84f3574240
|
|
@ -1,3 +1,2 @@
|
||||||
import type { PoolConnection } from 'better-sqlite-pool';
|
import type { PoolConnection } from 'better-sqlite-pool';
|
||||||
export declare function deleteLotField(lotId: number | string, lotTypeFieldId: number | string, user: User, connectedDatabase?: PoolConnection): Promise<boolean>;
|
export default function deleteLotField(lotId: number | string, lotTypeFieldId: number | string, user: User, connectedDatabase?: PoolConnection): Promise<boolean>;
|
||||||
export default deleteLotField;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function deleteLotField(lotId, lotTypeFieldId, user, connectedDatabase) {
|
export default async function deleteLotField(lotId, lotTypeFieldId, user, connectedDatabase) {
|
||||||
const database = connectedDatabase ?? (await acquireConnection());
|
const database = connectedDatabase ?? (await acquireConnection());
|
||||||
const result = database
|
const result = database
|
||||||
.prepare(`update LotFields
|
.prepare(`update LotFields
|
||||||
|
|
@ -13,4 +13,3 @@ export async function deleteLotField(lotId, lotTypeFieldId, user, connectedDatab
|
||||||
}
|
}
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default deleteLotField;
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import type { PoolConnection } from 'better-sqlite-pool'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
export async function deleteLotField(
|
export default async function deleteLotField(
|
||||||
lotId: number | string,
|
lotId: number | string,
|
||||||
lotTypeFieldId: number | string,
|
lotTypeFieldId: number | string,
|
||||||
user: User,
|
user: User,
|
||||||
|
|
@ -26,5 +26,3 @@ export async function deleteLotField(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default deleteLotField
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
export declare function deleteLotOccupancyFee(lotOccupancyId: number | string, feeId: number | string, user: User): Promise<boolean>;
|
export default function deleteLotOccupancyFee(lotOccupancyId: number | string, feeId: number | string, user: User): Promise<boolean>;
|
||||||
export default deleteLotOccupancyFee;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function deleteLotOccupancyFee(lotOccupancyId, feeId, user) {
|
export default async function deleteLotOccupancyFee(lotOccupancyId, feeId, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const result = database
|
const result = database
|
||||||
.prepare(`update LotOccupancyFees
|
.prepare(`update LotOccupancyFees
|
||||||
|
|
@ -11,4 +11,3 @@ export async function deleteLotOccupancyFee(lotOccupancyId, feeId, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default deleteLotOccupancyFee;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
export async function deleteLotOccupancyFee(
|
export default async function deleteLotOccupancyFee(
|
||||||
lotOccupancyId: number | string,
|
lotOccupancyId: number | string,
|
||||||
feeId: number | string,
|
feeId: number | string,
|
||||||
user: User
|
user: User
|
||||||
|
|
@ -21,5 +21,3 @@ export async function deleteLotOccupancyFee(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default deleteLotOccupancyFee
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,2 @@
|
||||||
import type { PoolConnection } from 'better-sqlite-pool';
|
import type { PoolConnection } from 'better-sqlite-pool';
|
||||||
export declare function deleteLotOccupancyField(lotOccupancyId: number | string, occupancyTypeFieldId: number | string, user: User, connectedDatabase?: PoolConnection): Promise<boolean>;
|
export default function deleteLotOccupancyField(lotOccupancyId: number | string, occupancyTypeFieldId: number | string, user: User, connectedDatabase?: PoolConnection): Promise<boolean>;
|
||||||
export default deleteLotOccupancyField;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function deleteLotOccupancyField(lotOccupancyId, occupancyTypeFieldId, user, connectedDatabase) {
|
export default async function deleteLotOccupancyField(lotOccupancyId, occupancyTypeFieldId, user, connectedDatabase) {
|
||||||
const database = connectedDatabase ?? (await acquireConnection());
|
const database = connectedDatabase ?? (await acquireConnection());
|
||||||
const result = database
|
const result = database
|
||||||
.prepare(`update LotOccupancyFields
|
.prepare(`update LotOccupancyFields
|
||||||
|
|
@ -13,4 +13,3 @@ export async function deleteLotOccupancyField(lotOccupancyId, occupancyTypeField
|
||||||
}
|
}
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default deleteLotOccupancyField;
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import type { PoolConnection } from 'better-sqlite-pool'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
export async function deleteLotOccupancyField(
|
export default async function deleteLotOccupancyField(
|
||||||
lotOccupancyId: number | string,
|
lotOccupancyId: number | string,
|
||||||
occupancyTypeFieldId: number | string,
|
occupancyTypeFieldId: number | string,
|
||||||
user: User,
|
user: User,
|
||||||
|
|
@ -18,12 +18,7 @@ export async function deleteLotOccupancyField(
|
||||||
where lotOccupancyId = ?
|
where lotOccupancyId = ?
|
||||||
and occupancyTypeFieldId = ?`
|
and occupancyTypeFieldId = ?`
|
||||||
)
|
)
|
||||||
.run(
|
.run(user.userName, Date.now(), lotOccupancyId, occupancyTypeFieldId)
|
||||||
user.userName,
|
|
||||||
Date.now(),
|
|
||||||
lotOccupancyId,
|
|
||||||
occupancyTypeFieldId
|
|
||||||
)
|
|
||||||
|
|
||||||
if (connectedDatabase === undefined) {
|
if (connectedDatabase === undefined) {
|
||||||
database.release()
|
database.release()
|
||||||
|
|
@ -31,5 +26,3 @@ export async function deleteLotOccupancyField(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default deleteLotOccupancyField
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
export declare function deleteLotOccupancyOccupant(lotOccupancyId: number | string, lotOccupantIndex: number | string, user: User): Promise<boolean>;
|
export default function deleteLotOccupancyOccupant(lotOccupancyId: number | string, lotOccupantIndex: number | string, user: User): Promise<boolean>;
|
||||||
export default deleteLotOccupancyOccupant;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function deleteLotOccupancyOccupant(lotOccupancyId, lotOccupantIndex, user) {
|
export default async function deleteLotOccupancyOccupant(lotOccupancyId, lotOccupantIndex, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const result = database
|
const result = database
|
||||||
.prepare(`update LotOccupancyOccupants
|
.prepare(`update LotOccupancyOccupants
|
||||||
|
|
@ -11,4 +11,3 @@ export async function deleteLotOccupancyOccupant(lotOccupancyId, lotOccupantInde
|
||||||
database.release();
|
database.release();
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default deleteLotOccupancyOccupant;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
export async function deleteLotOccupancyOccupant(
|
export default async function deleteLotOccupancyOccupant(
|
||||||
lotOccupancyId: number | string,
|
lotOccupancyId: number | string,
|
||||||
lotOccupantIndex: number | string,
|
lotOccupantIndex: number | string,
|
||||||
user: User
|
user: User
|
||||||
|
|
@ -21,5 +21,3 @@ export async function deleteLotOccupancyOccupant(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default deleteLotOccupancyOccupant
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
export declare function deleteLotOccupancyTransaction(lotOccupancyId: number | string, transactionIndex: number | string, user: User): Promise<boolean>;
|
export default function deleteLotOccupancyTransaction(lotOccupancyId: number | string, transactionIndex: number | string, user: User): Promise<boolean>;
|
||||||
export default deleteLotOccupancyTransaction;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function deleteLotOccupancyTransaction(lotOccupancyId, transactionIndex, user) {
|
export default async function deleteLotOccupancyTransaction(lotOccupancyId, transactionIndex, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const result = database
|
const result = database
|
||||||
.prepare(`update LotOccupancyTransactions
|
.prepare(`update LotOccupancyTransactions
|
||||||
|
|
@ -11,4 +11,3 @@ export async function deleteLotOccupancyTransaction(lotOccupancyId, transactionI
|
||||||
database.release();
|
database.release();
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default deleteLotOccupancyTransaction;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
export async function deleteLotOccupancyTransaction(
|
export default async function deleteLotOccupancyTransaction(
|
||||||
lotOccupancyId: number | string,
|
lotOccupancyId: number | string,
|
||||||
transactionIndex: number | string,
|
transactionIndex: number | string,
|
||||||
user: User
|
user: User
|
||||||
|
|
@ -21,5 +21,3 @@ export async function deleteLotOccupancyTransaction(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default deleteLotOccupancyTransaction
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
export declare function deleteOccupancyTypePrint(occupancyTypeId: number | string, printEJS: string, user: User): Promise<boolean>;
|
export default function deleteOccupancyTypePrint(occupancyTypeId: number | string, printEJS: string, user: User): Promise<boolean>;
|
||||||
export default deleteOccupancyTypePrint;
|
|
||||||
|
|
|
||||||
|
|
@ -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 deleteOccupancyTypePrint(occupancyTypeId, printEJS, user) {
|
export default async function deleteOccupancyTypePrint(occupancyTypeId, printEJS, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const result = database
|
const result = database
|
||||||
.prepare(`update OccupancyTypePrints
|
.prepare(`update OccupancyTypePrints
|
||||||
|
|
@ -13,4 +13,3 @@ export async function deleteOccupancyTypePrint(occupancyTypeId, printEJS, user)
|
||||||
clearCacheByTableName('OccupancyTypePrints');
|
clearCacheByTableName('OccupancyTypePrints');
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default deleteOccupancyTypePrint;
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { clearCacheByTableName } from '../helpers/functions.cache.js'
|
||||||
|
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
export async function deleteOccupancyTypePrint(
|
export default async function deleteOccupancyTypePrint(
|
||||||
occupancyTypeId: number | string,
|
occupancyTypeId: number | string,
|
||||||
printEJS: string,
|
printEJS: string,
|
||||||
user: User
|
user: User
|
||||||
|
|
@ -25,5 +25,3 @@ export async function deleteOccupancyTypePrint(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default deleteOccupancyTypePrint
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
export declare function deleteWorkOrderLot(workOrderId: number | string, lotId: number | string, user: User): Promise<boolean>;
|
export default function deleteWorkOrderLot(workOrderId: number | string, lotId: number | string, user: User): Promise<boolean>;
|
||||||
export default deleteWorkOrderLot;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function deleteWorkOrderLot(workOrderId, lotId, user) {
|
export default async function deleteWorkOrderLot(workOrderId, lotId, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const result = database
|
const result = database
|
||||||
.prepare(`update WorkOrderLots
|
.prepare(`update WorkOrderLots
|
||||||
|
|
@ -11,4 +11,3 @@ export async function deleteWorkOrderLot(workOrderId, lotId, user) {
|
||||||
database.release();
|
database.release();
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default deleteWorkOrderLot;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
export async function deleteWorkOrderLot(
|
export default async function deleteWorkOrderLot(
|
||||||
workOrderId: number | string,
|
workOrderId: number | string,
|
||||||
lotId: number | string,
|
lotId: number | string,
|
||||||
user: User
|
user: User
|
||||||
|
|
@ -21,5 +21,3 @@ export async function deleteWorkOrderLot(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default deleteWorkOrderLot
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
export declare function deleteWorkOrderLotOccupancy(workOrderId: number | string, lotOccupancyId: number | string, user: User): Promise<boolean>;
|
export default function deleteWorkOrderLotOccupancy(workOrderId: number | string, lotOccupancyId: number | string, user: User): Promise<boolean>;
|
||||||
export default deleteWorkOrderLotOccupancy;
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { acquireConnection } from './pool.js';
|
import { acquireConnection } from './pool.js';
|
||||||
export async function deleteWorkOrderLotOccupancy(workOrderId, lotOccupancyId, user) {
|
export default async function deleteWorkOrderLotOccupancy(workOrderId, lotOccupancyId, user) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
const result = database
|
const result = database
|
||||||
.prepare(`update WorkOrderLotOccupancies
|
.prepare(`update WorkOrderLotOccupancies
|
||||||
|
|
@ -11,4 +11,3 @@ export async function deleteWorkOrderLotOccupancy(workOrderId, lotOccupancyId, u
|
||||||
database.release();
|
database.release();
|
||||||
return result.changes > 0;
|
return result.changes > 0;
|
||||||
}
|
}
|
||||||
export default deleteWorkOrderLotOccupancy;
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { acquireConnection } from './pool.js'
|
import { acquireConnection } from './pool.js'
|
||||||
|
|
||||||
export async function deleteWorkOrderLotOccupancy(
|
export default async function deleteWorkOrderLotOccupancy(
|
||||||
workOrderId: number | string,
|
workOrderId: number | string,
|
||||||
lotOccupancyId: number | string,
|
lotOccupancyId: number | string,
|
||||||
user: User
|
user: User
|
||||||
|
|
@ -21,5 +21,3 @@ export async function deleteWorkOrderLotOccupancy(
|
||||||
|
|
||||||
return result.changes > 0
|
return result.changes > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export default deleteWorkOrderLotOccupancy
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
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) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
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'
|
||||||
|
|
||||||
interface UpdateLotForm {
|
interface UpdateLotForm {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
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) {
|
||||||
const database = await acquireConnection();
|
const database = await acquireConnection();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
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'
|
||||||
|
|
||||||
interface UpdateLotOccupancyForm {
|
interface UpdateLotOccupancyForm {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,11 @@ export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
response: Response
|
response: Response
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord('Fees', request.body.feeId, request.session.user as User)
|
const success = await deleteRecord(
|
||||||
|
'Fees',
|
||||||
|
request.body.feeId as string,
|
||||||
|
request.session.user as User
|
||||||
|
)
|
||||||
|
|
||||||
const feeCategories = await getFeeCategories(
|
const feeCategories = await getFeeCategories(
|
||||||
{},
|
{},
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'FeeCategories',
|
'FeeCategories',
|
||||||
request.body.feeCategoryId,
|
request.body.feeCategoryId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getLotOccupantTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js';
|
import { deleteRecord } from '../../database/deleteRecord.js';
|
||||||
|
import { getLotOccupantTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteRecord('LotOccupantTypes', request.body.lotOccupantTypeId, request.session.user);
|
const success = await deleteRecord('LotOccupantTypes', request.body.lotOccupantTypeId, request.session.user);
|
||||||
const lotOccupantTypes = await getLotOccupantTypes();
|
const lotOccupantTypes = await getLotOccupantTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { getLotOccupantTypes } from '../../helpers/functions.cache.js'
|
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js'
|
import { deleteRecord } from '../../database/deleteRecord.js'
|
||||||
|
import { getLotOccupantTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
@ -9,7 +9,7 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'LotOccupantTypes',
|
'LotOccupantTypes',
|
||||||
request.body.lotOccupantTypeId,
|
request.body.lotOccupantTypeId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getLotStatuses } from '../../helpers/functions.cache.js';
|
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js';
|
import { deleteRecord } from '../../database/deleteRecord.js';
|
||||||
|
import { getLotStatuses } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteRecord('LotStatuses', request.body.lotStatusId, request.session.user);
|
const success = await deleteRecord('LotStatuses', request.body.lotStatusId, 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 { deleteRecord } from '../../database/deleteRecord.js'
|
import { deleteRecord } from '../../database/deleteRecord.js'
|
||||||
|
import { getLotStatuses } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
@ -9,7 +9,7 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'LotStatuses',
|
'LotStatuses',
|
||||||
request.body.lotStatusId,
|
request.body.lotStatusId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getLotTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js';
|
import { deleteRecord } from '../../database/deleteRecord.js';
|
||||||
|
import { getLotTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteRecord('LotTypes', request.body.lotTypeId, request.session.user);
|
const success = await deleteRecord('LotTypes', request.body.lotTypeId, 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 { deleteRecord } from '../../database/deleteRecord.js'
|
import { deleteRecord } from '../../database/deleteRecord.js'
|
||||||
|
import { getLotTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
@ -9,7 +9,7 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'LotTypes',
|
'LotTypes',
|
||||||
request.body.lotTypeId,
|
request.body.lotTypeId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getLotTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js';
|
import { deleteRecord } from '../../database/deleteRecord.js';
|
||||||
|
import { getLotTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteRecord('LotTypeFields', request.body.lotTypeFieldId, request.session.user);
|
const success = await deleteRecord('LotTypeFields', request.body.lotTypeFieldId, 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 { deleteRecord } from '../../database/deleteRecord.js'
|
import { deleteRecord } from '../../database/deleteRecord.js'
|
||||||
|
import { getLotTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
@ -9,7 +9,7 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'LotTypeFields',
|
'LotTypeFields',
|
||||||
request.body.lotTypeFieldId,
|
request.body.lotTypeFieldId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js';
|
import { deleteRecord } from '../../database/deleteRecord.js';
|
||||||
|
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteRecord('OccupancyTypes', request.body.occupancyTypeId, request.session.user);
|
const success = await deleteRecord('OccupancyTypes', request.body.occupancyTypeId, 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 { deleteRecord } from '../../database/deleteRecord.js'
|
||||||
import {
|
import {
|
||||||
getAllOccupancyTypeFields,
|
getAllOccupancyTypeFields,
|
||||||
getOccupancyTypes
|
getOccupancyTypes
|
||||||
} from '../../helpers/functions.cache.js'
|
} from '../../helpers/functions.cache.js'
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js'
|
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
@ -12,7 +12,7 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'OccupancyTypes',
|
'OccupancyTypes',
|
||||||
request.body.occupancyTypeId,
|
request.body.occupancyTypeId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js';
|
import { deleteRecord } from '../../database/deleteRecord.js';
|
||||||
|
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteRecord('OccupancyTypeFields', request.body.occupancyTypeFieldId, request.session.user);
|
const success = await deleteRecord('OccupancyTypeFields', request.body.occupancyTypeFieldId, 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 { deleteRecord } from '../../database/deleteRecord.js'
|
||||||
import {
|
import {
|
||||||
getAllOccupancyTypeFields,
|
getAllOccupancyTypeFields,
|
||||||
getOccupancyTypes
|
getOccupancyTypes
|
||||||
} from '../../helpers/functions.cache.js'
|
} from '../../helpers/functions.cache.js'
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js'
|
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
@ -12,7 +12,7 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'OccupancyTypeFields',
|
'OccupancyTypeFields',
|
||||||
request.body.occupancyTypeFieldId,
|
request.body.occupancyTypeFieldId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
import deleteOccupancyTypePrint from '../../database/deleteOccupancyTypePrint.js';
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
||||||
import { deleteOccupancyTypePrint } from '../../database/deleteOccupancyTypePrint.js';
|
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteOccupancyTypePrint(request.body.occupancyTypeId, request.body.printEJS, request.session.user);
|
const success = await deleteOccupancyTypePrint(request.body.occupancyTypeId, request.body.printEJS, request.session.user);
|
||||||
const occupancyTypes = await getOccupancyTypes();
|
const occupancyTypes = await getOccupancyTypes();
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
|
import deleteOccupancyTypePrint from '../../database/deleteOccupancyTypePrint.js'
|
||||||
import {
|
import {
|
||||||
getAllOccupancyTypeFields,
|
getAllOccupancyTypeFields,
|
||||||
getOccupancyTypes
|
getOccupancyTypes
|
||||||
} from '../../helpers/functions.cache.js'
|
} from '../../helpers/functions.cache.js'
|
||||||
import { deleteOccupancyTypePrint } from '../../database/deleteOccupancyTypePrint.js'
|
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
response: Response
|
response: Response
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteOccupancyTypePrint(
|
const success = await deleteOccupancyTypePrint(
|
||||||
request.body.occupancyTypeId,
|
request.body.occupancyTypeId as string,
|
||||||
request.body.printEJS,
|
request.body.printEJS as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getWorkOrderMilestoneTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js';
|
import { deleteRecord } from '../../database/deleteRecord.js';
|
||||||
|
import { getWorkOrderMilestoneTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteRecord('WorkOrderMilestoneTypes', request.body.workOrderMilestoneTypeId, request.session.user);
|
const success = await deleteRecord('WorkOrderMilestoneTypes', request.body.workOrderMilestoneTypeId, 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 { deleteRecord } from '../../database/deleteRecord.js'
|
import { deleteRecord } from '../../database/deleteRecord.js'
|
||||||
|
import { getWorkOrderMilestoneTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
@ -9,7 +9,7 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'WorkOrderMilestoneTypes',
|
'WorkOrderMilestoneTypes',
|
||||||
request.body.workOrderMilestoneTypeId,
|
request.body.workOrderMilestoneTypeId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getWorkOrderTypes } from '../../helpers/functions.cache.js';
|
|
||||||
import { deleteRecord } from '../../database/deleteRecord.js';
|
import { deleteRecord } from '../../database/deleteRecord.js';
|
||||||
|
import { getWorkOrderTypes } from '../../helpers/functions.cache.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteRecord('WorkOrderTypes', request.body.workOrderTypeId, request.session.user);
|
const success = await deleteRecord('WorkOrderTypes', request.body.workOrderTypeId, 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 { deleteRecord } from '../../database/deleteRecord.js'
|
import { deleteRecord } from '../../database/deleteRecord.js'
|
||||||
|
import { getWorkOrderTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
@ -9,7 +9,7 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'WorkOrderTypes',
|
'WorkOrderTypes',
|
||||||
request.body.workOrderTypeId,
|
request.body.workOrderTypeId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export async function handler(request: Request, response: Response): Promise<voi
|
||||||
}
|
}
|
||||||
|
|
||||||
const occupancyTypePrints = await getOccupancyTypePrintsById(
|
const occupancyTypePrints = await getOccupancyTypePrintsById(
|
||||||
lotOccupancy.occupancyTypeId!
|
lotOccupancy.occupancyTypeId
|
||||||
)
|
)
|
||||||
|
|
||||||
const occupancyTypes = await getOccupancyTypes()
|
const occupancyTypes = await getOccupancyTypes()
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export async function handler(
|
||||||
}
|
}
|
||||||
|
|
||||||
const occupancyTypePrints = await getOccupancyTypePrintsById(
|
const occupancyTypePrints = await getOccupancyTypePrintsById(
|
||||||
lotOccupancy.occupancyTypeId!
|
lotOccupancy.occupancyTypeId
|
||||||
)
|
)
|
||||||
|
|
||||||
response.render('lotOccupancy-view', {
|
response.render('lotOccupancy-view', {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'LotOccupancies',
|
'LotOccupancies',
|
||||||
request.body.lotOccupancyId,
|
request.body.lotOccupancyId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ export async function handler(
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const success = await deleteRecord(
|
const success = await deleteRecord(
|
||||||
'LotOccupancyComments',
|
'LotOccupancyComments',
|
||||||
request.body.lotOccupancyCommentId,
|
request.body.lotOccupancyCommentId as string,
|
||||||
request.session.user as User
|
request.session.user as User
|
||||||
)
|
)
|
||||||
|
|
||||||
const lotOccupancyComments = await getLotOccupancyComments(
|
const lotOccupancyComments = await getLotOccupancyComments(
|
||||||
request.body.lotOccupancyId
|
request.body.lotOccupancyId as string
|
||||||
)
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { deleteLotOccupancyFee } from '../../database/deleteLotOccupancyFee.js';
|
import deleteLotOccupancyFee from '../../database/deleteLotOccupancyFee.js';
|
||||||
import { getLotOccupancyFees } from '../../database/getLotOccupancyFees.js';
|
import { getLotOccupancyFees } from '../../database/getLotOccupancyFees.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteLotOccupancyFee(request.body.lotOccupancyId, request.body.feeId, request.session.user);
|
const success = await deleteLotOccupancyFee(request.body.lotOccupancyId, request.body.feeId, request.session.user);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { deleteLotOccupancyFee } from '../../database/deleteLotOccupancyFee.js'
|
import deleteLotOccupancyFee from '../../database/deleteLotOccupancyFee.js'
|
||||||
import { getLotOccupancyFees } from '../../database/getLotOccupancyFees.js'
|
import { getLotOccupancyFees } from '../../database/getLotOccupancyFees.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { deleteLotOccupancyOccupant } from '../../database/deleteLotOccupancyOccupant.js';
|
import deleteLotOccupancyOccupant from '../../database/deleteLotOccupancyOccupant.js';
|
||||||
import { getLotOccupancyOccupants } from '../../database/getLotOccupancyOccupants.js';
|
import { getLotOccupancyOccupants } from '../../database/getLotOccupancyOccupants.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteLotOccupancyOccupant(request.body.lotOccupancyId, request.body.lotOccupantIndex, request.session.user);
|
const success = await deleteLotOccupancyOccupant(request.body.lotOccupancyId, request.body.lotOccupantIndex, request.session.user);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { deleteLotOccupancyOccupant } from '../../database/deleteLotOccupancyOccupant.js'
|
import deleteLotOccupancyOccupant from '../../database/deleteLotOccupancyOccupant.js'
|
||||||
import { getLotOccupancyOccupants } from '../../database/getLotOccupancyOccupants.js'
|
import { getLotOccupancyOccupants } from '../../database/getLotOccupancyOccupants.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { deleteLotOccupancyTransaction } from '../../database/deleteLotOccupancyTransaction.js';
|
import deleteLotOccupancyTransaction from '../../database/deleteLotOccupancyTransaction.js';
|
||||||
import { getLotOccupancyTransactions } from '../../database/getLotOccupancyTransactions.js';
|
import { getLotOccupancyTransactions } from '../../database/getLotOccupancyTransactions.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteLotOccupancyTransaction(request.body.lotOccupancyId, request.body.transactionIndex, request.session.user);
|
const success = await deleteLotOccupancyTransaction(request.body.lotOccupancyId, request.body.transactionIndex, request.session.user);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { deleteLotOccupancyTransaction } from '../../database/deleteLotOccupancyTransaction.js'
|
import deleteLotOccupancyTransaction from '../../database/deleteLotOccupancyTransaction.js'
|
||||||
import { getLotOccupancyTransactions } from '../../database/getLotOccupancyTransactions.js'
|
import { getLotOccupancyTransactions } from '../../database/getLotOccupancyTransactions.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { deleteWorkOrderLot } from '../../database/deleteWorkOrderLot.js';
|
import deleteWorkOrderLot from '../../database/deleteWorkOrderLot.js';
|
||||||
import { getLots } from '../../database/getLots.js';
|
import { getLots } from '../../database/getLots.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteWorkOrderLot(request.body.workOrderId, request.body.lotId, request.session.user);
|
const success = await deleteWorkOrderLot(request.body.workOrderId, request.body.lotId, request.session.user);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { deleteWorkOrderLot } from '../../database/deleteWorkOrderLot.js'
|
import deleteWorkOrderLot from '../../database/deleteWorkOrderLot.js'
|
||||||
import { getLots } from '../../database/getLots.js'
|
import { getLots } from '../../database/getLots.js'
|
||||||
|
|
||||||
export async function handler(
|
export async function handler(
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { deleteWorkOrderLotOccupancy } from '../../database/deleteWorkOrderLotOccupancy.js';
|
import deleteWorkOrderLotOccupancy from '../../database/deleteWorkOrderLotOccupancy.js';
|
||||||
import { getLotOccupancies } from '../../database/getLotOccupancies.js';
|
import { getLotOccupancies } from '../../database/getLotOccupancies.js';
|
||||||
export async function handler(request, response) {
|
export async function handler(request, response) {
|
||||||
const success = await deleteWorkOrderLotOccupancy(request.body.workOrderId, request.body.lotOccupancyId, request.session.user);
|
const success = await deleteWorkOrderLotOccupancy(request.body.workOrderId, request.body.lotOccupancyId, request.session.user);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
|
|
||||||
import { deleteWorkOrderLotOccupancy } from '../../database/deleteWorkOrderLotOccupancy.js'
|
import deleteWorkOrderLotOccupancy from '../../database/deleteWorkOrderLotOccupancy.js'
|
||||||
import { getLotOccupancies } from '../../database/getLotOccupancies.js'
|
import { getLotOccupancies } from '../../database/getLotOccupancies.js'
|
||||||
|
|
||||||
export async function handler(request: Request, response: Response): Promise<void> {
|
export async function handler(
|
||||||
|
request: Request,
|
||||||
|
response: Response
|
||||||
|
): Promise<void> {
|
||||||
const success = await deleteWorkOrderLotOccupancy(
|
const success = await deleteWorkOrderLotOccupancy(
|
||||||
request.body.workOrderId,
|
request.body.workOrderId,
|
||||||
request.body.lotOccupancyId,
|
request.body.lotOccupancyId,
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ export interface LotOccupancyField extends OccupancyTypeField, Record {
|
||||||
}
|
}
|
||||||
export interface LotOccupancy extends Record {
|
export interface LotOccupancy extends Record {
|
||||||
lotOccupancyId: number;
|
lotOccupancyId: number;
|
||||||
occupancyTypeId?: number;
|
occupancyTypeId: number;
|
||||||
occupancyType?: string;
|
occupancyType?: string;
|
||||||
printEJS?: string;
|
printEJS?: string;
|
||||||
lotId?: number;
|
lotId?: number;
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ export interface LotOccupancyField extends OccupancyTypeField, Record {
|
||||||
export interface LotOccupancy extends Record {
|
export interface LotOccupancy extends Record {
|
||||||
lotOccupancyId: number
|
lotOccupancyId: number
|
||||||
|
|
||||||
occupancyTypeId?: number
|
occupancyTypeId: number
|
||||||
occupancyType?: string
|
occupancyType?: string
|
||||||
printEJS?: string
|
printEJS?: string
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue