linting
parent
3b15e5e306
commit
ae00f55a2d
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js';
|
||||||
import { getFeeCategories } from "../../helpers/lotOccupancyDB/getFeeCategories.js";
|
import { getFeeCategories } from '../../helpers/lotOccupancyDB/getFeeCategories.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const feeCategoryId = addRecord("FeeCategories", request.body.feeCategory, request.body.orderNumber || -1, request.session);
|
const feeCategoryId = addRecord('FeeCategories', request.body.feeCategory, request.body.orderNumber ?? -1, request.session);
|
||||||
const feeCategories = getFeeCategories({}, {
|
const feeCategories = getFeeCategories({}, {
|
||||||
includeFees: true
|
includeFees: true
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,29 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js'
|
||||||
|
|
||||||
import { getFeeCategories } from "../../helpers/lotOccupancyDB/getFeeCategories.js";
|
import { getFeeCategories } from '../../helpers/lotOccupancyDB/getFeeCategories.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const feeCategoryId = addRecord(
|
const feeCategoryId = addRecord(
|
||||||
"FeeCategories",
|
'FeeCategories',
|
||||||
request.body.feeCategory,
|
request.body.feeCategory,
|
||||||
request.body.orderNumber || -1,
|
request.body.orderNumber ?? -1,
|
||||||
request.session
|
request.session
|
||||||
);
|
)
|
||||||
|
|
||||||
const feeCategories = getFeeCategories(
|
const feeCategories = getFeeCategories(
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
includeFees: true
|
includeFees: true
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
feeCategoryId,
|
feeCategoryId,
|
||||||
feeCategories
|
feeCategories
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { addLotOccupantType } from "../../helpers/lotOccupancyDB/addLotOccupantType.js";
|
import { addLotOccupantType } from '../../helpers/lotOccupancyDB/addLotOccupantType.js';
|
||||||
import { getLotOccupantTypes } from "../../helpers/functions.cache.js";
|
import { getLotOccupantTypes } from '../../helpers/functions.cache.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lotOccupantTypeId = addLotOccupantType(request.body, request.session);
|
const lotOccupantTypeId = addLotOccupantType(request.body, request.session);
|
||||||
const lotOccupantTypes = getLotOccupantTypes();
|
const lotOccupantTypes = getLotOccupantTypes();
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addLotOccupantType } from "../../helpers/lotOccupancyDB/addLotOccupantType.js";
|
import { addLotOccupantType } from '../../helpers/lotOccupancyDB/addLotOccupantType.js'
|
||||||
|
|
||||||
import { getLotOccupantTypes } from "../../helpers/functions.cache.js";
|
import { getLotOccupantTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const lotOccupantTypeId = addLotOccupantType(request.body, request.session);
|
const lotOccupantTypeId = addLotOccupantType(request.body, request.session)
|
||||||
|
|
||||||
const lotOccupantTypes = getLotOccupantTypes();
|
const lotOccupantTypes = getLotOccupantTypes()
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
lotOccupantTypeId,
|
lotOccupantTypeId,
|
||||||
lotOccupantTypes
|
lotOccupantTypes
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js';
|
||||||
import { getLotStatuses } from "../../helpers/functions.cache.js";
|
import { getLotStatuses } from '../../helpers/functions.cache.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lotStatusId = addRecord("LotStatuses", request.body.lotStatus, request.body.orderNumber || -1, request.session);
|
const lotStatusId = addRecord('LotStatuses', request.body.lotStatus, request.body.orderNumber ?? -1, request.session);
|
||||||
const lotStatuses = getLotStatuses();
|
const lotStatuses = getLotStatuses();
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js'
|
||||||
import { getLotStatuses } from "../../helpers/functions.cache.js";
|
import { getLotStatuses } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const lotStatusId = addRecord(
|
const lotStatusId = addRecord(
|
||||||
"LotStatuses",
|
'LotStatuses',
|
||||||
request.body.lotStatus,
|
request.body.lotStatus,
|
||||||
request.body.orderNumber || -1,
|
request.body.orderNumber ?? -1,
|
||||||
request.session
|
request.session
|
||||||
);
|
)
|
||||||
|
|
||||||
const lotStatuses = getLotStatuses();
|
const lotStatuses = getLotStatuses()
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
lotStatusId,
|
lotStatusId,
|
||||||
lotStatuses
|
lotStatuses
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js';
|
||||||
import { getLotTypes } from "../../helpers/functions.cache.js";
|
import { getLotTypes } from '../../helpers/functions.cache.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lotTypeId = addRecord("LotTypes", request.body.lotType, request.body.orderNumber || -1, request.session);
|
const lotTypeId = addRecord('LotTypes', request.body.lotType, request.body.orderNumber ?? -1, request.session);
|
||||||
const lotTypes = getLotTypes();
|
const lotTypes = getLotTypes();
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js'
|
||||||
import { getLotTypes } from "../../helpers/functions.cache.js";
|
import { getLotTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const lotTypeId = addRecord(
|
const lotTypeId = addRecord(
|
||||||
"LotTypes",
|
'LotTypes',
|
||||||
request.body.lotType,
|
request.body.lotType,
|
||||||
request.body.orderNumber || -1,
|
request.body.orderNumber ?? -1,
|
||||||
request.session
|
request.session
|
||||||
);
|
)
|
||||||
|
|
||||||
const lotTypes = getLotTypes();
|
const lotTypes = getLotTypes()
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
lotTypeId,
|
lotTypeId,
|
||||||
lotTypes
|
lotTypes
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { addLotTypeField } from "../../helpers/lotOccupancyDB/addLotTypeField.js";
|
import { addLotTypeField } from '../../helpers/lotOccupancyDB/addLotTypeField.js';
|
||||||
import { getLotTypes } from "../../helpers/functions.cache.js";
|
import { getLotTypes } from '../../helpers/functions.cache.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lotTypeFieldId = addLotTypeField(request.body, request.session);
|
const lotTypeFieldId = addLotTypeField(request.body, request.session);
|
||||||
const lotTypes = getLotTypes();
|
const lotTypes = getLotTypes();
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addLotTypeField } from "../../helpers/lotOccupancyDB/addLotTypeField.js";
|
import { addLotTypeField } from '../../helpers/lotOccupancyDB/addLotTypeField.js'
|
||||||
|
|
||||||
import { getLotTypes } from "../../helpers/functions.cache.js";
|
import { getLotTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const lotTypeFieldId = addLotTypeField(request.body, request.session);
|
const lotTypeFieldId = addLotTypeField(request.body, request.session)
|
||||||
|
|
||||||
const lotTypes = getLotTypes();
|
const lotTypes = getLotTypes()
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
lotTypeFieldId,
|
lotTypeFieldId,
|
||||||
lotTypes
|
lotTypes
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js';
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from "../../helpers/functions.cache.js";
|
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const occupancyTypeId = addRecord("OccupancyTypes", request.body.occupancyType, request.body.orderNumber || -1, request.session);
|
const occupancyTypeId = addRecord('OccupancyTypes', request.body.occupancyType, request.body.orderNumber ?? -1, request.session);
|
||||||
const occupancyTypes = getOccupancyTypes();
|
const occupancyTypes = getOccupancyTypes();
|
||||||
const allOccupancyTypeFields = getAllOccupancyTypeFields();
|
const allOccupancyTypeFields = getAllOccupancyTypeFields();
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,28 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js'
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from "../../helpers/functions.cache.js";
|
import {
|
||||||
|
getAllOccupancyTypeFields,
|
||||||
|
getOccupancyTypes
|
||||||
|
} from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const occupancyTypeId = addRecord(
|
const occupancyTypeId = addRecord(
|
||||||
"OccupancyTypes",
|
'OccupancyTypes',
|
||||||
request.body.occupancyType,
|
request.body.occupancyType,
|
||||||
request.body.orderNumber || -1,
|
request.body.orderNumber ?? -1,
|
||||||
request.session
|
request.session
|
||||||
);
|
)
|
||||||
|
|
||||||
const occupancyTypes = getOccupancyTypes();
|
const occupancyTypes = getOccupancyTypes()
|
||||||
const allOccupancyTypeFields = getAllOccupancyTypeFields();
|
const allOccupancyTypeFields = getAllOccupancyTypeFields()
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
occupancyTypeId,
|
occupancyTypeId,
|
||||||
occupancyTypes,
|
occupancyTypes,
|
||||||
allOccupancyTypeFields
|
allOccupancyTypeFields
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { addOccupancyTypeField } from "../../helpers/lotOccupancyDB/addOccupancyTypeField.js";
|
import { addOccupancyTypeField } from '../../helpers/lotOccupancyDB/addOccupancyTypeField.js';
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from "../../helpers/functions.cache.js";
|
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const occupancyTypeFieldId = addOccupancyTypeField(request.body, request.session);
|
const occupancyTypeFieldId = addOccupancyTypeField(request.body, request.session);
|
||||||
const occupancyTypes = getOccupancyTypes();
|
const occupancyTypes = getOccupancyTypes();
|
||||||
const allOccupancyTypeFields = getAllOccupancyTypeFields();
|
const allOccupancyTypeFields = getAllOccupancyTypeFields();
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,27 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addOccupancyTypeField } from "../../helpers/lotOccupancyDB/addOccupancyTypeField.js";
|
import { addOccupancyTypeField } from '../../helpers/lotOccupancyDB/addOccupancyTypeField.js'
|
||||||
|
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from "../../helpers/functions.cache.js";
|
import {
|
||||||
|
getAllOccupancyTypeFields,
|
||||||
|
getOccupancyTypes
|
||||||
|
} from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const occupancyTypeFieldId = addOccupancyTypeField(request.body, request.session);
|
const occupancyTypeFieldId = addOccupancyTypeField(
|
||||||
|
request.body,
|
||||||
|
request.session
|
||||||
|
)
|
||||||
|
|
||||||
const occupancyTypes = getOccupancyTypes();
|
const occupancyTypes = getOccupancyTypes()
|
||||||
const allOccupancyTypeFields = getAllOccupancyTypeFields();
|
const allOccupancyTypeFields = getAllOccupancyTypeFields()
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
occupancyTypeFieldId,
|
occupancyTypeFieldId,
|
||||||
occupancyTypes,
|
occupancyTypes,
|
||||||
allOccupancyTypeFields
|
allOccupancyTypeFields
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { addOccupancyTypePrint } from "../../helpers/lotOccupancyDB/addOccupancyTypePrint.js";
|
import { addOccupancyTypePrint } from '../../helpers/lotOccupancyDB/addOccupancyTypePrint.js';
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from "../../helpers/functions.cache.js";
|
import { getAllOccupancyTypeFields, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const success = addOccupancyTypePrint(request.body, request.session);
|
const success = addOccupancyTypePrint(request.body, request.session);
|
||||||
const occupancyTypes = getOccupancyTypes();
|
const occupancyTypes = getOccupancyTypes();
|
||||||
const allOccupancyTypeFields = getAllOccupancyTypeFields();
|
const allOccupancyTypeFields = getAllOccupancyTypeFields();
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,23 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addOccupancyTypePrint } from "../../helpers/lotOccupancyDB/addOccupancyTypePrint.js";
|
import { addOccupancyTypePrint } from '../../helpers/lotOccupancyDB/addOccupancyTypePrint.js'
|
||||||
|
|
||||||
import { getAllOccupancyTypeFields, getOccupancyTypes } from "../../helpers/functions.cache.js";
|
import {
|
||||||
|
getAllOccupancyTypeFields,
|
||||||
|
getOccupancyTypes
|
||||||
|
} from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const success = addOccupancyTypePrint(request.body, request.session);
|
const success = addOccupancyTypePrint(request.body, request.session)
|
||||||
|
|
||||||
const occupancyTypes = getOccupancyTypes();
|
const occupancyTypes = getOccupancyTypes()
|
||||||
const allOccupancyTypeFields = getAllOccupancyTypeFields();
|
const allOccupancyTypeFields = getAllOccupancyTypeFields()
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success,
|
success,
|
||||||
occupancyTypes,
|
occupancyTypes,
|
||||||
allOccupancyTypeFields
|
allOccupancyTypeFields
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { getWorkOrderMilestoneTypes } from "../../helpers/functions.cache.js";
|
import { getWorkOrderMilestoneTypes } from '../../helpers/functions.cache.js';
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const workOrderMilestoneTypeId = addRecord("WorkOrderMilestoneTypes", request.body.workOrderMilestoneType, request.body.orderNumber || -1, request.session);
|
const workOrderMilestoneTypeId = addRecord('WorkOrderMilestoneTypes', request.body.workOrderMilestoneType, request.body.orderNumber ?? -1, request.session);
|
||||||
const workOrderMilestoneTypes = getWorkOrderMilestoneTypes();
|
const workOrderMilestoneTypes = getWorkOrderMilestoneTypes();
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { getWorkOrderMilestoneTypes } from "../../helpers/functions.cache.js";
|
import { getWorkOrderMilestoneTypes } from '../../helpers/functions.cache.js'
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const workOrderMilestoneTypeId = addRecord(
|
const workOrderMilestoneTypeId = addRecord(
|
||||||
"WorkOrderMilestoneTypes",
|
'WorkOrderMilestoneTypes',
|
||||||
request.body.workOrderMilestoneType,
|
request.body.workOrderMilestoneType,
|
||||||
request.body.orderNumber || -1,
|
request.body.orderNumber ?? -1,
|
||||||
request.session
|
request.session
|
||||||
);
|
)
|
||||||
|
|
||||||
const workOrderMilestoneTypes = getWorkOrderMilestoneTypes();
|
const workOrderMilestoneTypes = getWorkOrderMilestoneTypes()
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
workOrderMilestoneTypeId,
|
workOrderMilestoneTypeId,
|
||||||
workOrderMilestoneTypes
|
workOrderMilestoneTypes
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js';
|
||||||
import { getWorkOrderTypes } from "../../helpers/functions.cache.js";
|
import { getWorkOrderTypes } from '../../helpers/functions.cache.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const workOrderTypeId = addRecord("WorkOrderTypes", request.body.workOrderType, request.body.orderNumber || -1, request.session);
|
const workOrderTypeId = addRecord('WorkOrderTypes', request.body.workOrderType, request.body.orderNumber ?? -1, request.session);
|
||||||
const workOrderTypes = getWorkOrderTypes();
|
const workOrderTypes = getWorkOrderTypes();
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addRecord } from "../../helpers/lotOccupancyDB/addRecord.js";
|
import { addRecord } from '../../helpers/lotOccupancyDB/addRecord.js'
|
||||||
import { getWorkOrderTypes } from "../../helpers/functions.cache.js";
|
import { getWorkOrderTypes } from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const workOrderTypeId = addRecord(
|
const workOrderTypeId = addRecord(
|
||||||
"WorkOrderTypes",
|
'WorkOrderTypes',
|
||||||
request.body.workOrderType,
|
request.body.workOrderType,
|
||||||
request.body.orderNumber || -1,
|
request.body.orderNumber ?? -1,
|
||||||
request.session
|
request.session
|
||||||
);
|
)
|
||||||
|
|
||||||
const workOrderTypes = getWorkOrderTypes();
|
const workOrderTypes = getWorkOrderTypes()
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
workOrderTypeId,
|
workOrderTypeId,
|
||||||
workOrderTypes
|
workOrderTypes
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { cleanupDatabase } from "../../helpers/lotOccupancyDB/cleanupDatabase.js";
|
import { cleanupDatabase } from '../../helpers/lotOccupancyDB/cleanupDatabase.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const recordCounts = cleanupDatabase(request.session);
|
const recordCounts = cleanupDatabase(request.session);
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { cleanupDatabase } from "../../helpers/lotOccupancyDB/cleanupDatabase.js";
|
import { cleanupDatabase } from '../../helpers/lotOccupancyDB/cleanupDatabase.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const recordCounts = cleanupDatabase(request.session);
|
const recordCounts = cleanupDatabase(request.session)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
inactivedRecordCount: recordCounts.inactivedRecordCount,
|
inactivedRecordCount: recordCounts.inactivedRecordCount,
|
||||||
purgedRecordCount: recordCounts.purgedRecordCount
|
purgedRecordCount: recordCounts.purgedRecordCount
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
import { dateToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
import { dateToString } from '@cityssm/expressjs-server-js/dateTimeFns.js';
|
||||||
import { getWorkOrderMilestones } from "../../helpers/lotOccupancyDB/getWorkOrderMilestones.js";
|
import { getWorkOrderMilestones } from '../../helpers/lotOccupancyDB/getWorkOrderMilestones.js';
|
||||||
import { getWorkOrders } from "../../helpers/lotOccupancyDB/getWorkOrders.js";
|
import { getWorkOrders } from '../../helpers/lotOccupancyDB/getWorkOrders.js';
|
||||||
export const handler = (_request, response) => {
|
export const handler = (_request, response) => {
|
||||||
const currentDateString = dateToString(new Date());
|
const currentDateString = dateToString(new Date());
|
||||||
const workOrderMilestones = getWorkOrderMilestones({
|
const workOrderMilestones = getWorkOrderMilestones({
|
||||||
workOrderMilestoneDateFilter: "date",
|
workOrderMilestoneDateFilter: 'date',
|
||||||
workOrderMilestoneDateString: currentDateString
|
workOrderMilestoneDateString: currentDateString
|
||||||
}, {
|
}, {
|
||||||
orderBy: "completion",
|
orderBy: 'completion',
|
||||||
includeWorkOrders: true
|
includeWorkOrders: true
|
||||||
});
|
});
|
||||||
const workOrderCount = getWorkOrders({
|
const workOrderCount = getWorkOrders({
|
||||||
|
|
@ -16,8 +16,8 @@ export const handler = (_request, response) => {
|
||||||
limit: 1,
|
limit: 1,
|
||||||
offset: 0
|
offset: 0
|
||||||
}).count;
|
}).count;
|
||||||
response.render("dashboard", {
|
response.render('dashboard', {
|
||||||
headTitle: "Dashboard",
|
headTitle: 'Dashboard',
|
||||||
workOrderMilestones,
|
workOrderMilestones,
|
||||||
workOrderCount
|
workOrderCount
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { dateToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
import { dateToString } from '@cityssm/expressjs-server-js/dateTimeFns.js'
|
||||||
|
|
||||||
import { getWorkOrderMilestones } from "../../helpers/lotOccupancyDB/getWorkOrderMilestones.js";
|
import { getWorkOrderMilestones } from '../../helpers/lotOccupancyDB/getWorkOrderMilestones.js'
|
||||||
import { getWorkOrders } from "../../helpers/lotOccupancyDB/getWorkOrders.js";
|
import { getWorkOrders } from '../../helpers/lotOccupancyDB/getWorkOrders.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = (_request, response) => {
|
export const handler: RequestHandler = (_request, response) => {
|
||||||
const currentDateString = dateToString(new Date());
|
const currentDateString = dateToString(new Date())
|
||||||
|
|
||||||
const workOrderMilestones = getWorkOrderMilestones(
|
const workOrderMilestones = getWorkOrderMilestones(
|
||||||
{
|
{
|
||||||
workOrderMilestoneDateFilter: "date",
|
workOrderMilestoneDateFilter: 'date',
|
||||||
workOrderMilestoneDateString: currentDateString
|
workOrderMilestoneDateString: currentDateString
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
orderBy: "completion",
|
orderBy: 'completion',
|
||||||
includeWorkOrders: true
|
includeWorkOrders: true
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
|
||||||
const workOrderCount = getWorkOrders(
|
const workOrderCount = getWorkOrders(
|
||||||
{
|
{
|
||||||
|
|
@ -27,13 +27,13 @@ export const handler: RequestHandler = (_request, response) => {
|
||||||
limit: 1,
|
limit: 1,
|
||||||
offset: 0
|
offset: 0
|
||||||
}
|
}
|
||||||
).count;
|
).count
|
||||||
|
|
||||||
response.render("dashboard", {
|
response.render('dashboard', {
|
||||||
headTitle: "Dashboard",
|
headTitle: 'Dashboard',
|
||||||
workOrderMilestones,
|
workOrderMilestones,
|
||||||
workOrderCount
|
workOrderCount
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from '../../helpers/functions.config.js';
|
||||||
import { getMaps } from "../../helpers/lotOccupancyDB/getMaps.js";
|
import { getMaps } from '../../helpers/lotOccupancyDB/getMaps.js';
|
||||||
import { getLotTypes, getOccupancyTypes } from "../../helpers/functions.cache.js";
|
import { getLotTypes, getOccupancyTypes } from '../../helpers/functions.cache.js';
|
||||||
export const handler = (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const maps = getMaps();
|
const maps = getMaps();
|
||||||
const lotTypes = getLotTypes();
|
const lotTypes = getLotTypes();
|
||||||
const occupancyTypes = getOccupancyTypes();
|
const occupancyTypes = getOccupancyTypes();
|
||||||
response.render("lotOccupancy-search", {
|
response.render('lotOccupancy-search', {
|
||||||
headTitle: configFunctions.getProperty("aliases.occupancy") + " Search",
|
headTitle: configFunctions.getProperty('aliases.occupancy') + ' Search',
|
||||||
maps,
|
maps,
|
||||||
lotTypes,
|
lotTypes,
|
||||||
occupancyTypes,
|
occupancyTypes,
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,26 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from '../../helpers/functions.config.js'
|
||||||
|
|
||||||
import { getMaps } from "../../helpers/lotOccupancyDB/getMaps.js";
|
import { getMaps } from '../../helpers/lotOccupancyDB/getMaps.js'
|
||||||
|
|
||||||
import { getLotTypes, getOccupancyTypes } from "../../helpers/functions.cache.js";
|
import {
|
||||||
|
getLotTypes,
|
||||||
|
getOccupancyTypes
|
||||||
|
} from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const maps = getMaps();
|
const maps = getMaps()
|
||||||
const lotTypes = getLotTypes();
|
const lotTypes = getLotTypes()
|
||||||
const occupancyTypes = getOccupancyTypes();
|
const occupancyTypes = getOccupancyTypes()
|
||||||
|
|
||||||
response.render("lotOccupancy-search", {
|
response.render('lotOccupancy-search', {
|
||||||
headTitle: configFunctions.getProperty("aliases.occupancy") + " Search",
|
headTitle: configFunctions.getProperty('aliases.occupancy') + ' Search',
|
||||||
maps,
|
maps,
|
||||||
lotTypes,
|
lotTypes,
|
||||||
occupancyTypes,
|
occupancyTypes,
|
||||||
mapId: request.query.mapId
|
mapId: request.query.mapId
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { addLotOccupancyComment } from "../../helpers/lotOccupancyDB/addLotOccupancyComment.js";
|
import { addLotOccupancyComment } from '../../helpers/lotOccupancyDB/addLotOccupancyComment.js';
|
||||||
import { getLotOccupancyComments } from "../../helpers/lotOccupancyDB/getLotOccupancyComments.js";
|
import { getLotOccupancyComments } from '../../helpers/lotOccupancyDB/getLotOccupancyComments.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
addLotOccupancyComment(request.body, request.session);
|
addLotOccupancyComment(request.body, request.session);
|
||||||
const lotOccupancyComments = getLotOccupancyComments(request.body.lotOccupancyId);
|
const lotOccupancyComments = getLotOccupancyComments(request.body.lotOccupancyId);
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addLotOccupancyComment } from "../../helpers/lotOccupancyDB/addLotOccupancyComment.js";
|
import { addLotOccupancyComment } from '../../helpers/lotOccupancyDB/addLotOccupancyComment.js'
|
||||||
|
|
||||||
import { getLotOccupancyComments } from "../../helpers/lotOccupancyDB/getLotOccupancyComments.js";
|
import { getLotOccupancyComments } from '../../helpers/lotOccupancyDB/getLotOccupancyComments.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
addLotOccupancyComment(request.body, request.session);
|
addLotOccupancyComment(request.body, request.session)
|
||||||
|
|
||||||
const lotOccupancyComments = getLotOccupancyComments(
|
const lotOccupancyComments = getLotOccupancyComments(
|
||||||
request.body.lotOccupancyId
|
request.body.lotOccupancyId
|
||||||
);
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
lotOccupancyComments
|
lotOccupancyComments
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { addLotOccupancyFee } from "../../helpers/lotOccupancyDB/addLotOccupancyFee.js";
|
import { addLotOccupancyFee } from '../../helpers/lotOccupancyDB/addLotOccupancyFee.js';
|
||||||
import { getLotOccupancyFees } from "../../helpers/lotOccupancyDB/getLotOccupancyFees.js";
|
import { getLotOccupancyFees } from '../../helpers/lotOccupancyDB/getLotOccupancyFees.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
addLotOccupancyFee(request.body, request.session);
|
addLotOccupancyFee(request.body, request.session);
|
||||||
const lotOccupancyFees = getLotOccupancyFees(request.body.lotOccupancyId);
|
const lotOccupancyFees = getLotOccupancyFees(request.body.lotOccupancyId);
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addLotOccupancyFee } from "../../helpers/lotOccupancyDB/addLotOccupancyFee.js";
|
import { addLotOccupancyFee } from '../../helpers/lotOccupancyDB/addLotOccupancyFee.js'
|
||||||
|
|
||||||
import { getLotOccupancyFees } from "../../helpers/lotOccupancyDB/getLotOccupancyFees.js";
|
import { getLotOccupancyFees } from '../../helpers/lotOccupancyDB/getLotOccupancyFees.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
addLotOccupancyFee(request.body, request.session);
|
addLotOccupancyFee(request.body, request.session)
|
||||||
|
|
||||||
const lotOccupancyFees = getLotOccupancyFees(request.body.lotOccupancyId);
|
const lotOccupancyFees = getLotOccupancyFees(request.body.lotOccupancyId)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
lotOccupancyFees
|
lotOccupancyFees
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { addLotOccupancyOccupant } from "../../helpers/lotOccupancyDB/addLotOccupancyOccupant.js";
|
import { addLotOccupancyOccupant } from '../../helpers/lotOccupancyDB/addLotOccupancyOccupant.js';
|
||||||
import { getLotOccupancyOccupants } from "../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js";
|
import { getLotOccupancyOccupants } from '../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
addLotOccupancyOccupant(request.body, request.session);
|
addLotOccupancyOccupant(request.body, request.session);
|
||||||
const lotOccupancyOccupants = getLotOccupancyOccupants(request.body.lotOccupancyId);
|
const lotOccupancyOccupants = getLotOccupancyOccupants(request.body.lotOccupancyId);
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addLotOccupancyOccupant } from "../../helpers/lotOccupancyDB/addLotOccupancyOccupant.js";
|
import { addLotOccupancyOccupant } from '../../helpers/lotOccupancyDB/addLotOccupancyOccupant.js'
|
||||||
|
|
||||||
import { getLotOccupancyOccupants } from "../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js";
|
import { getLotOccupancyOccupants } from '../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
addLotOccupancyOccupant(request.body, request.session);
|
addLotOccupancyOccupant(request.body, request.session)
|
||||||
|
|
||||||
const lotOccupancyOccupants = getLotOccupancyOccupants(
|
const lotOccupancyOccupants = getLotOccupancyOccupants(
|
||||||
request.body.lotOccupancyId
|
request.body.lotOccupancyId
|
||||||
);
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
lotOccupancyOccupants
|
lotOccupancyOccupants
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { addLotOccupancyTransaction } from "../../helpers/lotOccupancyDB/addLotOccupancyTransaction.js";
|
import { addLotOccupancyTransaction } from '../../helpers/lotOccupancyDB/addLotOccupancyTransaction.js';
|
||||||
import { getLotOccupancyTransactions } from "../../helpers/lotOccupancyDB/getLotOccupancyTransactions.js";
|
import { getLotOccupancyTransactions } from '../../helpers/lotOccupancyDB/getLotOccupancyTransactions.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
addLotOccupancyTransaction(request.body, request.session);
|
addLotOccupancyTransaction(request.body, request.session);
|
||||||
const lotOccupancyTransactions = getLotOccupancyTransactions(request.body.lotOccupancyId);
|
const lotOccupancyTransactions = getLotOccupancyTransactions(request.body.lotOccupancyId);
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addLotOccupancyTransaction } from "../../helpers/lotOccupancyDB/addLotOccupancyTransaction.js";
|
import { addLotOccupancyTransaction } from '../../helpers/lotOccupancyDB/addLotOccupancyTransaction.js'
|
||||||
|
|
||||||
import { getLotOccupancyTransactions } from "../../helpers/lotOccupancyDB/getLotOccupancyTransactions.js";
|
import { getLotOccupancyTransactions } from '../../helpers/lotOccupancyDB/getLotOccupancyTransactions.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
addLotOccupancyTransaction(request.body, request.session);
|
addLotOccupancyTransaction(request.body, request.session)
|
||||||
|
|
||||||
const lotOccupancyTransactions = getLotOccupancyTransactions(
|
const lotOccupancyTransactions = getLotOccupancyTransactions(
|
||||||
request.body.lotOccupancyId
|
request.body.lotOccupancyId
|
||||||
);
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
lotOccupancyTransactions
|
lotOccupancyTransactions
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { copyLotOccupancy } from "../../helpers/lotOccupancyDB/copyLotOccupancy.js";
|
import { copyLotOccupancy } from '../../helpers/lotOccupancyDB/copyLotOccupancy.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lotOccupancyId = copyLotOccupancy(request.body.lotOccupancyId, request.session);
|
const lotOccupancyId = copyLotOccupancy(request.body.lotOccupancyId, request.session);
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,17 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { copyLotOccupancy } from "../../helpers/lotOccupancyDB/copyLotOccupancy.js";
|
import { copyLotOccupancy } from '../../helpers/lotOccupancyDB/copyLotOccupancy.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const lotOccupancyId = copyLotOccupancy(request.body.lotOccupancyId, request.session);
|
const lotOccupancyId = copyLotOccupancy(
|
||||||
|
request.body.lotOccupancyId,
|
||||||
|
request.session
|
||||||
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
lotOccupancyId
|
lotOccupancyId
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { addLotOccupancy } from "../../helpers/lotOccupancyDB/addLotOccupancy.js";
|
import { addLotOccupancy } from '../../helpers/lotOccupancyDB/addLotOccupancy.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lotOccupancyId = addLotOccupancy(request.body, request.session);
|
const lotOccupancyId = addLotOccupancy(request.body, request.session);
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { addLotOccupancy } from "../../helpers/lotOccupancyDB/addLotOccupancy.js";
|
import { addLotOccupancy } from '../../helpers/lotOccupancyDB/addLotOccupancy.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const lotOccupancyId = addLotOccupancy(request.body, request.session);
|
const lotOccupancyId = addLotOccupancy(request.body, request.session)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success: true,
|
success: true,
|
||||||
lotOccupancyId
|
lotOccupancyId
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { deleteRecord } from "../../helpers/lotOccupancyDB/deleteRecord.js";
|
import { deleteRecord } from '../../helpers/lotOccupancyDB/deleteRecord.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const success = deleteRecord("LotOccupancies", request.body.lotOccupancyId, request.session);
|
const success = deleteRecord('LotOccupancies', request.body.lotOccupancyId, request.session);
|
||||||
response.json({
|
response.json({
|
||||||
success
|
success
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,17 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { deleteRecord } from "../../helpers/lotOccupancyDB/deleteRecord.js";
|
import { deleteRecord } from '../../helpers/lotOccupancyDB/deleteRecord.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const success = deleteRecord("LotOccupancies", request.body.lotOccupancyId, request.session);
|
const success = deleteRecord(
|
||||||
|
'LotOccupancies',
|
||||||
|
request.body.lotOccupancyId,
|
||||||
|
request.session
|
||||||
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success
|
success
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { deleteRecord } from "../../helpers/lotOccupancyDB/deleteRecord.js";
|
import { deleteRecord } from '../../helpers/lotOccupancyDB/deleteRecord.js';
|
||||||
import { getLotOccupancyComments } from "../../helpers/lotOccupancyDB/getLotOccupancyComments.js";
|
import { getLotOccupancyComments } from '../../helpers/lotOccupancyDB/getLotOccupancyComments.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const success = deleteRecord("LotOccupancyComments", request.body.lotOccupancyCommentId, request.session);
|
const success = deleteRecord('LotOccupancyComments', request.body.lotOccupancyCommentId, request.session);
|
||||||
const lotOccupancyComments = getLotOccupancyComments(request.body.lotOccupancyId);
|
const lotOccupancyComments = getLotOccupancyComments(request.body.lotOccupancyId);
|
||||||
response.json({
|
response.json({
|
||||||
success,
|
success,
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,24 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { deleteRecord } from "../../helpers/lotOccupancyDB/deleteRecord.js";
|
import { deleteRecord } from '../../helpers/lotOccupancyDB/deleteRecord.js'
|
||||||
|
|
||||||
import { getLotOccupancyComments } from "../../helpers/lotOccupancyDB/getLotOccupancyComments.js";
|
import { getLotOccupancyComments } from '../../helpers/lotOccupancyDB/getLotOccupancyComments.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const success = deleteRecord("LotOccupancyComments", request.body.lotOccupancyCommentId, request.session);
|
const success = deleteRecord(
|
||||||
|
'LotOccupancyComments',
|
||||||
|
request.body.lotOccupancyCommentId,
|
||||||
|
request.session
|
||||||
|
)
|
||||||
|
|
||||||
const lotOccupancyComments = getLotOccupancyComments(request.body.lotOccupancyId);
|
const lotOccupancyComments = getLotOccupancyComments(
|
||||||
|
request.body.lotOccupancyId
|
||||||
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success,
|
success,
|
||||||
lotOccupancyComments
|
lotOccupancyComments
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { deleteLotOccupancyFee } from "../../helpers/lotOccupancyDB/deleteLotOccupancyFee.js";
|
import { deleteLotOccupancyFee } from '../../helpers/lotOccupancyDB/deleteLotOccupancyFee.js';
|
||||||
import { getLotOccupancyFees } from "../../helpers/lotOccupancyDB/getLotOccupancyFees.js";
|
import { getLotOccupancyFees } from '../../helpers/lotOccupancyDB/getLotOccupancyFees.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const success = deleteLotOccupancyFee(request.body.lotOccupancyId, request.body.feeId, request.session);
|
const success = deleteLotOccupancyFee(request.body.lotOccupancyId, request.body.feeId, request.session);
|
||||||
const lotOccupancyFees = getLotOccupancyFees(request.body.lotOccupancyId);
|
const lotOccupancyFees = getLotOccupancyFees(request.body.lotOccupancyId);
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { deleteLotOccupancyFee } from "../../helpers/lotOccupancyDB/deleteLotOccupancyFee.js";
|
import { deleteLotOccupancyFee } from '../../helpers/lotOccupancyDB/deleteLotOccupancyFee.js'
|
||||||
|
|
||||||
import { getLotOccupancyFees } from "../../helpers/lotOccupancyDB/getLotOccupancyFees.js";
|
import { getLotOccupancyFees } from '../../helpers/lotOccupancyDB/getLotOccupancyFees.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const success = deleteLotOccupancyFee(
|
const success = deleteLotOccupancyFee(
|
||||||
request.body.lotOccupancyId,
|
request.body.lotOccupancyId,
|
||||||
request.body.feeId,
|
request.body.feeId,
|
||||||
request.session
|
request.session
|
||||||
);
|
)
|
||||||
|
|
||||||
const lotOccupancyFees = getLotOccupancyFees(request.body.lotOccupancyId);
|
const lotOccupancyFees = getLotOccupancyFees(request.body.lotOccupancyId)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success,
|
success,
|
||||||
lotOccupancyFees
|
lotOccupancyFees
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { deleteLotOccupancyOccupant } from "../../helpers/lotOccupancyDB/deleteLotOccupancyOccupant.js";
|
import { deleteLotOccupancyOccupant } from '../../helpers/lotOccupancyDB/deleteLotOccupancyOccupant.js';
|
||||||
import { getLotOccupancyOccupants } from "../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js";
|
import { getLotOccupancyOccupants } from '../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const success = deleteLotOccupancyOccupant(request.body.lotOccupancyId, request.body.lotOccupantIndex, request.session);
|
const success = deleteLotOccupancyOccupant(request.body.lotOccupancyId, request.body.lotOccupantIndex, request.session);
|
||||||
const lotOccupancyOccupants = getLotOccupancyOccupants(request.body.lotOccupancyId);
|
const lotOccupancyOccupants = getLotOccupancyOccupants(request.body.lotOccupancyId);
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { deleteLotOccupancyOccupant } from "../../helpers/lotOccupancyDB/deleteLotOccupancyOccupant.js";
|
import { deleteLotOccupancyOccupant } from '../../helpers/lotOccupancyDB/deleteLotOccupancyOccupant.js'
|
||||||
|
|
||||||
import { getLotOccupancyOccupants } from "../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js";
|
import { getLotOccupancyOccupants } from '../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const success = deleteLotOccupancyOccupant(
|
const success = deleteLotOccupancyOccupant(
|
||||||
request.body.lotOccupancyId,
|
request.body.lotOccupancyId,
|
||||||
request.body.lotOccupantIndex,
|
request.body.lotOccupantIndex,
|
||||||
request.session
|
request.session
|
||||||
);
|
)
|
||||||
|
|
||||||
const lotOccupancyOccupants = getLotOccupancyOccupants(
|
const lotOccupancyOccupants = getLotOccupancyOccupants(
|
||||||
request.body.lotOccupancyId
|
request.body.lotOccupancyId
|
||||||
);
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success,
|
success,
|
||||||
lotOccupancyOccupants
|
lotOccupancyOccupants
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { deleteLotOccupancyTransaction } from "../../helpers/lotOccupancyDB/deleteLotOccupancyTransaction.js";
|
import { deleteLotOccupancyTransaction } from '../../helpers/lotOccupancyDB/deleteLotOccupancyTransaction.js';
|
||||||
import { getLotOccupancyTransactions } from "../../helpers/lotOccupancyDB/getLotOccupancyTransactions.js";
|
import { getLotOccupancyTransactions } from '../../helpers/lotOccupancyDB/getLotOccupancyTransactions.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const success = deleteLotOccupancyTransaction(request.body.lotOccupancyId, request.body.transactionIndex, request.session);
|
const success = deleteLotOccupancyTransaction(request.body.lotOccupancyId, request.body.transactionIndex, request.session);
|
||||||
const lotOccupancyTransactions = getLotOccupancyTransactions(request.body.lotOccupancyId);
|
const lotOccupancyTransactions = getLotOccupancyTransactions(request.body.lotOccupancyId);
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { deleteLotOccupancyTransaction } from "../../helpers/lotOccupancyDB/deleteLotOccupancyTransaction.js";
|
import { deleteLotOccupancyTransaction } from '../../helpers/lotOccupancyDB/deleteLotOccupancyTransaction.js'
|
||||||
|
|
||||||
import { getLotOccupancyTransactions } from "../../helpers/lotOccupancyDB/getLotOccupancyTransactions.js";
|
import { getLotOccupancyTransactions } from '../../helpers/lotOccupancyDB/getLotOccupancyTransactions.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const success = deleteLotOccupancyTransaction(
|
const success = deleteLotOccupancyTransaction(
|
||||||
request.body.lotOccupancyId,
|
request.body.lotOccupancyId,
|
||||||
request.body.transactionIndex,
|
request.body.transactionIndex,
|
||||||
request.session
|
request.session
|
||||||
);
|
)
|
||||||
|
|
||||||
const lotOccupancyTransactions = getLotOccupancyTransactions(
|
const lotOccupancyTransactions = getLotOccupancyTransactions(
|
||||||
request.body.lotOccupancyId
|
request.body.lotOccupancyId
|
||||||
);
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success,
|
success,
|
||||||
lotOccupancyTransactions
|
lotOccupancyTransactions
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { getLotOccupancies } from "../../helpers/lotOccupancyDB/getLotOccupancies.js";
|
import { getLotOccupancies } from '../../helpers/lotOccupancyDB/getLotOccupancies.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const result = getLotOccupancies(request.body, {
|
const result = getLotOccupancies(request.body, {
|
||||||
limit: request.body.limit,
|
limit: request.body.limit,
|
||||||
offset: request.body.offset,
|
offset: request.body.offset,
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { getLotOccupancies } from "../../helpers/lotOccupancyDB/getLotOccupancies.js";
|
import { getLotOccupancies } from '../../helpers/lotOccupancyDB/getLotOccupancies.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const result = getLotOccupancies(request.body, {
|
const result = getLotOccupancies(request.body, {
|
||||||
limit: request.body.limit,
|
limit: request.body.limit,
|
||||||
offset: request.body.offset,
|
offset: request.body.offset,
|
||||||
includeOccupants: true
|
includeOccupants: true
|
||||||
});
|
})
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
count: result.count,
|
count: result.count,
|
||||||
offset: Number.parseInt(request.body.offset, 10),
|
offset: Number.parseInt(request.body.offset, 10),
|
||||||
lotOccupancies: result.lotOccupancies
|
lotOccupancies: result.lotOccupancies
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { getPastLotOccupancyOccupants } from "../../helpers/lotOccupancyDB/getPastLotOccupancyOccupants.js";
|
import { getPastLotOccupancyOccupants } from '../../helpers/lotOccupancyDB/getPastLotOccupancyOccupants.js';
|
||||||
export const handler = (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const occupants = getPastLotOccupancyOccupants(request.body, {
|
const occupants = getPastLotOccupancyOccupants(request.body, {
|
||||||
limit: Number.parseInt(request.body.limit, 10)
|
limit: Number.parseInt(request.body.limit, 10)
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,15 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { getPastLotOccupancyOccupants } from "../../helpers/lotOccupancyDB/getPastLotOccupancyOccupants.js";
|
import { getPastLotOccupancyOccupants } from '../../helpers/lotOccupancyDB/getPastLotOccupancyOccupants.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
|
|
||||||
const occupants = getPastLotOccupancyOccupants(request.body, {
|
const occupants = getPastLotOccupancyOccupants(request.body, {
|
||||||
limit: Number.parseInt(request.body.limit, 10)
|
limit: Number.parseInt(request.body.limit, 10)
|
||||||
});
|
})
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
occupants
|
occupants
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { updateLotOccupancy } from "../../helpers/lotOccupancyDB/updateLotOccupancy.js";
|
import { updateLotOccupancy } from '../../helpers/lotOccupancyDB/updateLotOccupancy.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const success = updateLotOccupancy(request.body, request.session);
|
const success = updateLotOccupancy(request.body, request.session);
|
||||||
response.json({
|
response.json({
|
||||||
success,
|
success,
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { updateLotOccupancy } from "../../helpers/lotOccupancyDB/updateLotOccupancy.js";
|
import { updateLotOccupancy } from '../../helpers/lotOccupancyDB/updateLotOccupancy.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const success = updateLotOccupancy(request.body, request.session);
|
const success = updateLotOccupancy(request.body, request.session)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success,
|
success,
|
||||||
lotOccupancyId: request.body.lotOccupancyId
|
lotOccupancyId: request.body.lotOccupancyId
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { updateLotOccupancyComment } from "../../helpers/lotOccupancyDB/updateLotOccupancyComment.js";
|
import { updateLotOccupancyComment } from '../../helpers/lotOccupancyDB/updateLotOccupancyComment.js';
|
||||||
import { getLotOccupancyComments } from "../../helpers/lotOccupancyDB/getLotOccupancyComments.js";
|
import { getLotOccupancyComments } from '../../helpers/lotOccupancyDB/getLotOccupancyComments.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const success = updateLotOccupancyComment(request.body, request.session);
|
const success = updateLotOccupancyComment(request.body, request.session);
|
||||||
const lotOccupancyComments = getLotOccupancyComments(request.body.lotOccupancyId);
|
const lotOccupancyComments = getLotOccupancyComments(request.body.lotOccupancyId);
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { updateLotOccupancyComment } from "../../helpers/lotOccupancyDB/updateLotOccupancyComment.js";
|
import { updateLotOccupancyComment } from '../../helpers/lotOccupancyDB/updateLotOccupancyComment.js'
|
||||||
|
|
||||||
import { getLotOccupancyComments } from "../../helpers/lotOccupancyDB/getLotOccupancyComments.js";
|
import { getLotOccupancyComments } from '../../helpers/lotOccupancyDB/getLotOccupancyComments.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const success = updateLotOccupancyComment(request.body, request.session);
|
const success = updateLotOccupancyComment(request.body, request.session)
|
||||||
|
|
||||||
const lotOccupancyComments = getLotOccupancyComments(
|
const lotOccupancyComments = getLotOccupancyComments(
|
||||||
request.body.lotOccupancyId
|
request.body.lotOccupancyId
|
||||||
);
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success,
|
success,
|
||||||
lotOccupancyComments
|
lotOccupancyComments
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { updateLotOccupancyOccupant } from "../../helpers/lotOccupancyDB/updateLotOccupancyOccupant.js";
|
import { updateLotOccupancyOccupant } from '../../helpers/lotOccupancyDB/updateLotOccupancyOccupant.js';
|
||||||
import { getLotOccupancyOccupants } from "../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js";
|
import { getLotOccupancyOccupants } from '../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js';
|
||||||
export const handler = async (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const success = updateLotOccupancyOccupant(request.body, request.session);
|
const success = updateLotOccupancyOccupant(request.body, request.session);
|
||||||
const lotOccupancyOccupants = getLotOccupancyOccupants(request.body.lotOccupancyId);
|
const lotOccupancyOccupants = getLotOccupancyOccupants(request.body.lotOccupancyId);
|
||||||
response.json({
|
response.json({
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import { updateLotOccupancyOccupant } from "../../helpers/lotOccupancyDB/updateLotOccupancyOccupant.js";
|
import { updateLotOccupancyOccupant } from '../../helpers/lotOccupancyDB/updateLotOccupancyOccupant.js'
|
||||||
|
|
||||||
import { getLotOccupancyOccupants } from "../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js";
|
import { getLotOccupancyOccupants } from '../../helpers/lotOccupancyDB/getLotOccupancyOccupants.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = async (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const success = updateLotOccupancyOccupant(request.body, request.session);
|
const success = updateLotOccupancyOccupant(request.body, request.session)
|
||||||
|
|
||||||
const lotOccupancyOccupants = getLotOccupancyOccupants(
|
const lotOccupancyOccupants = getLotOccupancyOccupants(
|
||||||
request.body.lotOccupancyId
|
request.body.lotOccupancyId
|
||||||
);
|
)
|
||||||
|
|
||||||
response.json({
|
response.json({
|
||||||
success,
|
success,
|
||||||
lotOccupancyOccupants
|
lotOccupancyOccupants
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,18 @@
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from '../../helpers/functions.config.js';
|
||||||
import { getLot } from "../../helpers/lotOccupancyDB/getLot.js";
|
import { getLot } from '../../helpers/lotOccupancyDB/getLot.js';
|
||||||
import { getMaps } from "../../helpers/lotOccupancyDB/getMaps.js";
|
import { getMaps } from '../../helpers/lotOccupancyDB/getMaps.js';
|
||||||
import * as cacheFunctions from "../../helpers/functions.cache.js";
|
import * as cacheFunctions from '../../helpers/functions.cache.js';
|
||||||
export const handler = (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lot = getLot(request.params.lotId);
|
const lot = getLot(request.params.lotId);
|
||||||
if (!lot) {
|
if (!lot) {
|
||||||
return response.redirect(configFunctions.getProperty("reverseProxy.urlPrefix") + "/lots/?error=lotIdNotFound");
|
response.redirect(configFunctions.getProperty('reverseProxy.urlPrefix') +
|
||||||
|
'/lots/?error=lotIdNotFound');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
const maps = getMaps();
|
const maps = getMaps();
|
||||||
const lotTypes = cacheFunctions.getLotTypes();
|
const lotTypes = cacheFunctions.getLotTypes();
|
||||||
const lotStatuses = cacheFunctions.getLotStatuses();
|
const lotStatuses = cacheFunctions.getLotStatuses();
|
||||||
return response.render("lot-edit", {
|
response.render('lot-edit', {
|
||||||
headTitle: lot.lotName,
|
headTitle: lot.lotName,
|
||||||
lot,
|
lot,
|
||||||
isCreate: false,
|
isCreate: false,
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,34 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from '../../helpers/functions.config.js'
|
||||||
|
|
||||||
import { getLot } from "../../helpers/lotOccupancyDB/getLot.js";
|
import { getLot } from '../../helpers/lotOccupancyDB/getLot.js'
|
||||||
import { getMaps } from "../../helpers/lotOccupancyDB/getMaps.js";
|
import { getMaps } from '../../helpers/lotOccupancyDB/getMaps.js'
|
||||||
import * as cacheFunctions from "../../helpers/functions.cache.js";
|
import * as cacheFunctions from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const lot = getLot(request.params.lotId);
|
const lot = getLot(request.params.lotId)
|
||||||
|
|
||||||
if (!lot) {
|
if (!lot) {
|
||||||
return response.redirect(
|
response.redirect(
|
||||||
configFunctions.getProperty("reverseProxy.urlPrefix") + "/lots/?error=lotIdNotFound"
|
configFunctions.getProperty('reverseProxy.urlPrefix') +
|
||||||
);
|
'/lots/?error=lotIdNotFound'
|
||||||
|
)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const maps = getMaps();
|
const maps = getMaps()
|
||||||
const lotTypes = cacheFunctions.getLotTypes();
|
const lotTypes = cacheFunctions.getLotTypes()
|
||||||
const lotStatuses = cacheFunctions.getLotStatuses();
|
const lotStatuses = cacheFunctions.getLotStatuses()
|
||||||
|
|
||||||
return response.render("lot-edit", {
|
response.render('lot-edit', {
|
||||||
headTitle: lot.lotName,
|
headTitle: lot.lotName,
|
||||||
lot,
|
lot,
|
||||||
isCreate: false,
|
isCreate: false,
|
||||||
maps,
|
maps,
|
||||||
lotTypes,
|
lotTypes,
|
||||||
lotStatuses
|
lotStatuses
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from '../../helpers/functions.config.js';
|
||||||
import { getMaps } from "../../helpers/lotOccupancyDB/getMaps.js";
|
import { getMaps } from '../../helpers/lotOccupancyDB/getMaps.js';
|
||||||
import * as cacheFunctions from "../../helpers/functions.cache.js";
|
import * as cacheFunctions from '../../helpers/functions.cache.js';
|
||||||
export const handler = (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lot = {
|
const lot = {
|
||||||
lotId: -1,
|
lotId: -1,
|
||||||
|
|
@ -19,8 +19,8 @@ export const handler = (request, response) => {
|
||||||
}
|
}
|
||||||
const lotTypes = cacheFunctions.getLotTypes();
|
const lotTypes = cacheFunctions.getLotTypes();
|
||||||
const lotStatuses = cacheFunctions.getLotStatuses();
|
const lotStatuses = cacheFunctions.getLotStatuses();
|
||||||
response.render("lot-edit", {
|
response.render('lot-edit', {
|
||||||
headTitle: "Create a New " + configFunctions.getProperty("aliases.lot"),
|
headTitle: 'Create a New ' + configFunctions.getProperty('aliases.lot'),
|
||||||
lot,
|
lot,
|
||||||
isCreate: true,
|
isCreate: true,
|
||||||
maps,
|
maps,
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,44 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from '../../helpers/functions.config.js'
|
||||||
|
|
||||||
import { getMaps } from "../../helpers/lotOccupancyDB/getMaps.js";
|
import { getMaps } from '../../helpers/lotOccupancyDB/getMaps.js'
|
||||||
import * as cacheFunctions from "../../helpers/functions.cache.js";
|
import * as cacheFunctions from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
import * as recordTypes from "../../types/recordTypes";
|
import * as recordTypes from '../../types/recordTypes'
|
||||||
|
|
||||||
export const handler: RequestHandler = (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const lot: recordTypes.Lot = {
|
const lot: recordTypes.Lot = {
|
||||||
lotId: -1,
|
lotId: -1,
|
||||||
lotOccupancies: []
|
lotOccupancies: []
|
||||||
};
|
}
|
||||||
|
|
||||||
const maps = getMaps();
|
const maps = getMaps()
|
||||||
|
|
||||||
if (request.query.mapId) {
|
if (request.query.mapId) {
|
||||||
const mapId = Number.parseInt(request.query.mapId as string, 10);
|
const mapId = Number.parseInt(request.query.mapId as string, 10)
|
||||||
|
|
||||||
const map = maps.find((possibleMap) => {
|
const map = maps.find((possibleMap) => {
|
||||||
return mapId === possibleMap.mapId;
|
return mapId === possibleMap.mapId
|
||||||
});
|
})
|
||||||
|
|
||||||
if (map) {
|
if (map) {
|
||||||
lot.mapId = map.mapId;
|
lot.mapId = map.mapId
|
||||||
lot.mapName = map.mapName;
|
lot.mapName = map.mapName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const lotTypes = cacheFunctions.getLotTypes();
|
const lotTypes = cacheFunctions.getLotTypes()
|
||||||
const lotStatuses = cacheFunctions.getLotStatuses();
|
const lotStatuses = cacheFunctions.getLotStatuses()
|
||||||
|
|
||||||
response.render("lot-edit", {
|
response.render('lot-edit', {
|
||||||
headTitle: "Create a New " + configFunctions.getProperty("aliases.lot"),
|
headTitle: 'Create a New ' + configFunctions.getProperty('aliases.lot'),
|
||||||
lot,
|
lot,
|
||||||
isCreate: true,
|
isCreate: true,
|
||||||
maps,
|
maps,
|
||||||
lotTypes,
|
lotTypes,
|
||||||
lotStatuses
|
lotStatuses
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from '../../helpers/functions.config.js';
|
||||||
import { getNextLotId } from "../../helpers/lotOccupancyDB/getNextLotId.js";
|
import { getNextLotId } from '../../helpers/lotOccupancyDB/getNextLotId.js';
|
||||||
export const handler = (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lotId = request.params.lotId;
|
const lotId = request.params.lotId;
|
||||||
const nextLotId = getNextLotId(lotId);
|
const nextLotId = getNextLotId(lotId);
|
||||||
if (!nextLotId) {
|
if (!nextLotId) {
|
||||||
return response.redirect(configFunctions.getProperty("reverseProxy.urlPrefix") + "/lots/?error=noNextLotIdFound");
|
response.redirect(configFunctions.getProperty('reverseProxy.urlPrefix') +
|
||||||
|
'/lots/?error=noNextLotIdFound');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return response.redirect(configFunctions.getProperty("reverseProxy.urlPrefix") + "/lots/" + nextLotId);
|
response.redirect(configFunctions.getProperty('reverseProxy.urlPrefix') + '/lots/' + nextLotId);
|
||||||
};
|
};
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,25 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from '../../helpers/functions.config.js'
|
||||||
|
|
||||||
import { getNextLotId } from "../../helpers/lotOccupancyDB/getNextLotId.js";
|
import { getNextLotId } from '../../helpers/lotOccupancyDB/getNextLotId.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const lotId = request.params.lotId;
|
const lotId = request.params.lotId
|
||||||
|
|
||||||
const nextLotId = getNextLotId(lotId);
|
const nextLotId = getNextLotId(lotId)
|
||||||
|
|
||||||
if (!nextLotId) {
|
if (!nextLotId) {
|
||||||
return response.redirect(
|
response.redirect(
|
||||||
configFunctions.getProperty("reverseProxy.urlPrefix") + "/lots/?error=noNextLotIdFound"
|
configFunctions.getProperty('reverseProxy.urlPrefix') +
|
||||||
);
|
'/lots/?error=noNextLotIdFound'
|
||||||
|
)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.redirect(
|
response.redirect(
|
||||||
configFunctions.getProperty("reverseProxy.urlPrefix") + "/lots/" + nextLotId
|
configFunctions.getProperty('reverseProxy.urlPrefix') + '/lots/' + nextLotId
|
||||||
);
|
)
|
||||||
};
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from '../../helpers/functions.config.js';
|
||||||
import { getPreviousLotId } from "../../helpers/lotOccupancyDB/getPreviousLotId.js";
|
import { getPreviousLotId } from '../../helpers/lotOccupancyDB/getPreviousLotId.js';
|
||||||
export const handler = (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lotId = request.params.lotId;
|
const lotId = request.params.lotId;
|
||||||
const previousLotId = getPreviousLotId(lotId);
|
const previousLotId = getPreviousLotId(lotId);
|
||||||
if (!previousLotId) {
|
if (!previousLotId) {
|
||||||
return response.redirect(configFunctions.getProperty("reverseProxy.urlPrefix") +
|
response.redirect(configFunctions.getProperty('reverseProxy.urlPrefix') +
|
||||||
"/lots/?error=noPreviousLotIdFound");
|
'/lots/?error=noPreviousLotIdFound');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return response.redirect(configFunctions.getProperty("reverseProxy.urlPrefix") + "/lots/" + previousLotId);
|
response.redirect(configFunctions.getProperty('reverseProxy.urlPrefix') +
|
||||||
|
'/lots/' +
|
||||||
|
previousLotId);
|
||||||
};
|
};
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,27 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express'
|
||||||
|
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from '../../helpers/functions.config.js'
|
||||||
|
|
||||||
import { getPreviousLotId } from "../../helpers/lotOccupancyDB/getPreviousLotId.js";
|
import { getPreviousLotId } from '../../helpers/lotOccupancyDB/getPreviousLotId.js'
|
||||||
|
|
||||||
export const handler: RequestHandler = (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
const lotId = request.params.lotId;
|
const lotId = request.params.lotId
|
||||||
|
|
||||||
const previousLotId = getPreviousLotId(lotId);
|
const previousLotId = getPreviousLotId(lotId)
|
||||||
|
|
||||||
if (!previousLotId) {
|
if (!previousLotId) {
|
||||||
return response.redirect(
|
response.redirect(
|
||||||
configFunctions.getProperty("reverseProxy.urlPrefix") +
|
configFunctions.getProperty('reverseProxy.urlPrefix') +
|
||||||
"/lots/?error=noPreviousLotIdFound"
|
'/lots/?error=noPreviousLotIdFound'
|
||||||
);
|
)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.redirect(
|
response.redirect(
|
||||||
configFunctions.getProperty("reverseProxy.urlPrefix") + "/lots/" + previousLotId
|
configFunctions.getProperty('reverseProxy.urlPrefix') +
|
||||||
);
|
'/lots/' +
|
||||||
};
|
previousLotId
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export default handler;
|
export default handler
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from 'express';
|
||||||
export declare const handler: RequestHandler;
|
export declare const handler: RequestHandler;
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue