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