linting
parent
82c7f047cf
commit
5276c7e962
|
|
@ -146,7 +146,7 @@ function buildEventDescriptionHTML_lots(
|
|||
): string {
|
||||
let descriptionHTML = ''
|
||||
|
||||
if (milestone.workOrderLots.length > 0) {
|
||||
if (milestone.workOrderLots!.length > 0) {
|
||||
const urlRoot = getUrlRoot(request)
|
||||
|
||||
descriptionHTML +=
|
||||
|
|
@ -388,10 +388,10 @@ export async function handler(request: Request, response: Response): Promise<voi
|
|||
calendarEvent.location(location)
|
||||
|
||||
// Set organizer / attendees
|
||||
if (milestone.workOrderLotOccupancies.length > 0) {
|
||||
if (milestone.workOrderLotOccupancies!.length > 0) {
|
||||
let organizerSet = false
|
||||
for (const lotOccupancy of milestone.workOrderLotOccupancies) {
|
||||
for (const occupant of lotOccupancy.lotOccupancyOccupants) {
|
||||
for (const lotOccupancy of milestone.workOrderLotOccupancies!) {
|
||||
for (const occupant of lotOccupancy.lotOccupancyOccupants!) {
|
||||
if (organizerSet) {
|
||||
calendarEvent.createAttendee({
|
||||
name: occupant.occupantName,
|
||||
|
|
|
|||
|
|
@ -23,17 +23,17 @@ async function saveApiKeys() {
|
|||
}
|
||||
}
|
||||
function generateApiKey(apiKeyPrefix) {
|
||||
return apiKeyPrefix + '-' + uuidv4() + '-' + Date.now();
|
||||
return `${apiKeyPrefix}-${uuidv4()}-${Date.now()}`;
|
||||
}
|
||||
export async function regenerateApiKey(userName) {
|
||||
apiKeys[userName] = generateApiKey(userName);
|
||||
await saveApiKeys();
|
||||
}
|
||||
export async function getApiKey(userName) {
|
||||
if (!apiKeys) {
|
||||
if (apiKeys === undefined) {
|
||||
await loadApiKeys();
|
||||
}
|
||||
if (!apiKeys[userName]) {
|
||||
if (!Object.hasOwn(apiKeys, userName)) {
|
||||
await regenerateApiKey(userName);
|
||||
}
|
||||
return apiKeys[userName];
|
||||
|
|
@ -42,7 +42,7 @@ export async function getApiKeyFromSession(session) {
|
|||
return await getApiKey(session.user.userName);
|
||||
}
|
||||
export async function getUserNameFromApiKey(apiKey) {
|
||||
if (!apiKeys) {
|
||||
if (apiKeys === undefined) {
|
||||
await loadApiKeys();
|
||||
}
|
||||
for (const [userName, currentApiKey] of Object.entries(apiKeys)) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ async function saveApiKeys(): Promise<void> {
|
|||
}
|
||||
|
||||
function generateApiKey(apiKeyPrefix: string): string {
|
||||
return apiKeyPrefix + '-' + uuidv4() + '-' + Date.now()
|
||||
return `${apiKeyPrefix}-${uuidv4()}-${Date.now()}`
|
||||
}
|
||||
|
||||
export async function regenerateApiKey(userName: string): Promise<void> {
|
||||
|
|
@ -38,11 +38,11 @@ export async function regenerateApiKey(userName: string): Promise<void> {
|
|||
}
|
||||
|
||||
export async function getApiKey(userName: string): Promise<string> {
|
||||
if (!apiKeys) {
|
||||
if (apiKeys === undefined) {
|
||||
await loadApiKeys()
|
||||
}
|
||||
|
||||
if (!apiKeys[userName]) {
|
||||
if (!Object.hasOwn(apiKeys, userName)) {
|
||||
await regenerateApiKey(userName)
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ export async function getApiKeyFromSession(
|
|||
export async function getUserNameFromApiKey(
|
||||
apiKey: string
|
||||
): Promise<string | undefined> {
|
||||
if (!apiKeys) {
|
||||
if (apiKeys === undefined) {
|
||||
await loadApiKeys()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ async function authenticateViaActiveDirectory(userName, password) {
|
|||
});
|
||||
}
|
||||
export async function authenticate(userName, password) {
|
||||
if (!userName || userName === '' || !password || password === '') {
|
||||
if ((userName ?? '') === '' || (password ?? '') === '') {
|
||||
return false;
|
||||
}
|
||||
return await authenticateViaActiveDirectory(userName, password);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export async function authenticate(
|
|||
userName: string,
|
||||
password: string
|
||||
): Promise<boolean> {
|
||||
if (!userName || userName === '' || !password || password === '') {
|
||||
if ((userName ?? '') === '' || (password ?? '') === '') {
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ export function getFieldValueByOccupancyTypeField(lotOccupancy, occupancyTypeFie
|
|||
return (possibleField.occupancyTypeField.toLowerCase() ===
|
||||
occupancyTypeFieldLowerCase);
|
||||
});
|
||||
if (field) {
|
||||
return field.lotOccupancyFieldValue;
|
||||
if (field === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return undefined;
|
||||
return field.lotOccupancyFieldValue;
|
||||
}
|
||||
export function getFeesByFeeCategory(lotOccupancy, feeCategory, feeCategoryContains = false) {
|
||||
const feeCategoryLowerCase = feeCategory.toLowerCase();
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ export function getFieldValueByOccupancyTypeField(
|
|||
}
|
||||
)
|
||||
|
||||
if (field) {
|
||||
return field.lotOccupancyFieldValue
|
||||
if (field === undefined) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
return undefined
|
||||
return field.lotOccupancyFieldValue
|
||||
}
|
||||
|
||||
export function getFeesByFeeCategory(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import fs from 'node:fs/promises';
|
||||
let mapSVGs;
|
||||
export async function getMapSVGs() {
|
||||
if (!mapSVGs) {
|
||||
if (mapSVGs === undefined) {
|
||||
const files = await fs.readdir('./public/images/maps/');
|
||||
const SVGs = [];
|
||||
for (const file of files) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import fs from 'node:fs/promises'
|
|||
let mapSVGs: string[]
|
||||
|
||||
export async function getMapSVGs(): Promise<string[]> {
|
||||
if (!mapSVGs) {
|
||||
if (mapSVGs === undefined) {
|
||||
const files = await fs.readdir('./public/images/maps/')
|
||||
|
||||
const SVGs: string[] = []
|
||||
|
|
|
|||
|
|
@ -32,33 +32,31 @@ export function getLotNameWhereClause(lotName = '', lotNameSearchType, lotsTable
|
|||
export function getOccupancyTimeWhereClause(occupancyTime, lotOccupanciesTableAlias = 'o') {
|
||||
let sqlWhereClause = '';
|
||||
const sqlParameters = [];
|
||||
if (occupancyTime) {
|
||||
const currentDateString = dateToInteger(new Date());
|
||||
switch (occupancyTime) {
|
||||
case 'current': {
|
||||
sqlWhereClause +=
|
||||
' and ' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyStartDate <= ? and (' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyEndDate is null or ' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyEndDate >= ?)';
|
||||
sqlParameters.push(currentDateString, currentDateString);
|
||||
break;
|
||||
}
|
||||
case 'past': {
|
||||
sqlWhereClause +=
|
||||
' and ' + lotOccupanciesTableAlias + '.occupancyEndDate < ?';
|
||||
sqlParameters.push(currentDateString);
|
||||
break;
|
||||
}
|
||||
case 'future': {
|
||||
sqlWhereClause +=
|
||||
' and ' + lotOccupanciesTableAlias + '.occupancyStartDate > ?';
|
||||
sqlParameters.push(currentDateString);
|
||||
break;
|
||||
}
|
||||
const currentDateString = dateToInteger(new Date());
|
||||
switch (occupancyTime ?? '') {
|
||||
case 'current': {
|
||||
sqlWhereClause +=
|
||||
' and ' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyStartDate <= ? and (' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyEndDate is null or ' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyEndDate >= ?)';
|
||||
sqlParameters.push(currentDateString, currentDateString);
|
||||
break;
|
||||
}
|
||||
case 'past': {
|
||||
sqlWhereClause +=
|
||||
' and ' + lotOccupanciesTableAlias + '.occupancyEndDate < ?';
|
||||
sqlParameters.push(currentDateString);
|
||||
break;
|
||||
}
|
||||
case 'future': {
|
||||
sqlWhereClause +=
|
||||
' and ' + lotOccupanciesTableAlias + '.occupancyStartDate > ?';
|
||||
sqlParameters.push(currentDateString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
|
@ -72,7 +70,7 @@ export function getOccupantNameWhereClause(occupantName = '', tableAlias = 'o')
|
|||
if (occupantName !== '') {
|
||||
const occupantNamePieces = occupantName.toLowerCase().split(' ');
|
||||
for (const occupantNamePiece of occupantNamePieces) {
|
||||
sqlWhereClause += ' and instr(lower(' + tableAlias + '.occupantName), ?)';
|
||||
sqlWhereClause += ` and instr(lower(${tableAlias}.occupantName), ?)`;
|
||||
sqlParameters.push(occupantNamePiece);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,36 +53,34 @@ export function getOccupancyTimeWhereClause(
|
|||
let sqlWhereClause = ''
|
||||
const sqlParameters: unknown[] = []
|
||||
|
||||
if (occupancyTime) {
|
||||
const currentDateString = dateToInteger(new Date())
|
||||
const currentDateString = dateToInteger(new Date())
|
||||
|
||||
switch (occupancyTime) {
|
||||
case 'current': {
|
||||
sqlWhereClause +=
|
||||
' and ' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyStartDate <= ? and (' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyEndDate is null or ' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyEndDate >= ?)'
|
||||
sqlParameters.push(currentDateString, currentDateString)
|
||||
break
|
||||
}
|
||||
switch (occupancyTime ?? '') {
|
||||
case 'current': {
|
||||
sqlWhereClause +=
|
||||
' and ' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyStartDate <= ? and (' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyEndDate is null or ' +
|
||||
lotOccupanciesTableAlias +
|
||||
'.occupancyEndDate >= ?)'
|
||||
sqlParameters.push(currentDateString, currentDateString)
|
||||
break
|
||||
}
|
||||
|
||||
case 'past': {
|
||||
sqlWhereClause +=
|
||||
' and ' + lotOccupanciesTableAlias + '.occupancyEndDate < ?'
|
||||
sqlParameters.push(currentDateString)
|
||||
break
|
||||
}
|
||||
case 'past': {
|
||||
sqlWhereClause +=
|
||||
' and ' + lotOccupanciesTableAlias + '.occupancyEndDate < ?'
|
||||
sqlParameters.push(currentDateString)
|
||||
break
|
||||
}
|
||||
|
||||
case 'future': {
|
||||
sqlWhereClause +=
|
||||
' and ' + lotOccupanciesTableAlias + '.occupancyStartDate > ?'
|
||||
sqlParameters.push(currentDateString)
|
||||
break
|
||||
}
|
||||
case 'future': {
|
||||
sqlWhereClause +=
|
||||
' and ' + lotOccupanciesTableAlias + '.occupancyStartDate > ?'
|
||||
sqlParameters.push(currentDateString)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +100,7 @@ export function getOccupantNameWhereClause(
|
|||
if (occupantName !== '') {
|
||||
const occupantNamePieces = occupantName.toLowerCase().split(' ')
|
||||
for (const occupantNamePiece of occupantNamePieces) {
|
||||
sqlWhereClause += ' and instr(lower(' + tableAlias + '.occupantName), ?)'
|
||||
sqlWhereClause += ` and instr(lower(${tableAlias}.occupantName), ?)`
|
||||
sqlParameters.push(occupantNamePiece)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export function initializeDatabase() {
|
|||
const row = lotOccupancyDB
|
||||
.prepare("select name from sqlite_master where type = 'table' and name = 'WorkOrderMilestones'")
|
||||
.get();
|
||||
if (!row) {
|
||||
if (row === undefined) {
|
||||
debugSQL('Creating ' + databasePath);
|
||||
for (const sql of createStatements) {
|
||||
lotOccupancyDB.prepare(sql).run();
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ export function initializeDatabase(): boolean {
|
|||
)
|
||||
.get()
|
||||
|
||||
if (!row) {
|
||||
if (row === undefined) {
|
||||
debugSQL('Creating ' + databasePath)
|
||||
|
||||
for (const sql of createStatements) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
import { Pool } from 'better-sqlite-pool';
|
||||
import { lotOccupancyDB as databasePath } from '../../data/databasePaths.js';
|
||||
import exitHook from 'exit-hook';
|
||||
import Debug from 'debug';
|
||||
const debug = Debug('lot-occupancy-system:lotOccupancyDB:pool');
|
||||
const pool = new Pool(databasePath);
|
||||
export async function acquireConnection() {
|
||||
return await pool.acquire();
|
||||
}
|
||||
exitHook(() => {
|
||||
debug('Closing database pool');
|
||||
pool.close();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ import { lotOccupancyDB as databasePath } from '../../data/databasePaths.js'
|
|||
|
||||
import exitHook from 'exit-hook'
|
||||
|
||||
import Debug from 'debug'
|
||||
const debug = Debug('lot-occupancy-system:lotOccupancyDB:pool')
|
||||
|
||||
const pool = new Pool(databasePath)
|
||||
|
||||
export async function acquireConnection(): Promise<PoolConnection> {
|
||||
|
|
@ -11,5 +14,6 @@ export async function acquireConnection(): Promise<PoolConnection> {
|
|||
}
|
||||
|
||||
exitHook(() => {
|
||||
debug('Closing database pool')
|
||||
pool.close()
|
||||
})
|
||||
|
|
|
|||
207
routes/admin.ts
207
routes/admin.ts
|
|
@ -1,4 +1,4 @@
|
|||
import { Router } from 'express'
|
||||
import { Router, RequestHandler } from 'express'
|
||||
|
||||
// Fee Management
|
||||
|
||||
|
|
@ -96,174 +96,261 @@ export const router = Router()
|
|||
* Fees
|
||||
*/
|
||||
|
||||
router.get('/fees', handler_fees)
|
||||
router.get('/fees', handler_fees as RequestHandler)
|
||||
|
||||
router.post('/doAddFeeCategory', handler_doAddFeeCategory)
|
||||
router.post('/doAddFeeCategory', handler_doAddFeeCategory as RequestHandler)
|
||||
|
||||
router.post('/doUpdateFeeCategory', handler_doUpdateFeeCategory)
|
||||
router.post(
|
||||
'/doUpdateFeeCategory',
|
||||
handler_doUpdateFeeCategory as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveFeeCategoryUp', handler_doMoveFeeCategoryUp)
|
||||
router.post(
|
||||
'/doMoveFeeCategoryUp',
|
||||
handler_doMoveFeeCategoryUp as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveFeeCategoryDown', handler_doMoveFeeCategoryDown)
|
||||
router.post(
|
||||
'/doMoveFeeCategoryDown',
|
||||
handler_doMoveFeeCategoryDown as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doDeleteFeeCategory', handler_doDeleteFeeCategory)
|
||||
router.post(
|
||||
'/doDeleteFeeCategory',
|
||||
handler_doDeleteFeeCategory as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doAddFee', handler_doAddFee)
|
||||
router.post('/doAddFee', handler_doAddFee as RequestHandler)
|
||||
|
||||
router.post('/doUpdateFee', handler_doUpdateFee)
|
||||
router.post('/doUpdateFee', handler_doUpdateFee as RequestHandler)
|
||||
|
||||
router.post('/doMoveFeeUp', handler_doMoveFeeUp)
|
||||
router.post('/doMoveFeeUp', handler_doMoveFeeUp as RequestHandler)
|
||||
|
||||
router.post('/doMoveFeeDown', handler_doMoveFeeDown)
|
||||
router.post('/doMoveFeeDown', handler_doMoveFeeDown as RequestHandler)
|
||||
|
||||
router.post('/doDeleteFee', handler_doDeleteFee)
|
||||
router.post('/doDeleteFee', handler_doDeleteFee as RequestHandler)
|
||||
|
||||
/*
|
||||
* Occupancy Type Management
|
||||
*/
|
||||
|
||||
router.get('/occupancyTypes', handler_occupancyTypes)
|
||||
router.get('/occupancyTypes', handler_occupancyTypes as RequestHandler)
|
||||
|
||||
router.post('/doAddOccupancyType', handler_doAddOccupancyType)
|
||||
router.post('/doAddOccupancyType', handler_doAddOccupancyType as RequestHandler)
|
||||
|
||||
router.post('/doUpdateOccupancyType', handler_doUpdateOccupancyType)
|
||||
router.post(
|
||||
'/doUpdateOccupancyType',
|
||||
handler_doUpdateOccupancyType as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveOccupancyTypeUp', handler_doMoveOccupancyTypeUp)
|
||||
router.post(
|
||||
'/doMoveOccupancyTypeUp',
|
||||
handler_doMoveOccupancyTypeUp as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveOccupancyTypeDown', handler_doMoveOccupancyTypeDown)
|
||||
router.post(
|
||||
'/doMoveOccupancyTypeDown',
|
||||
handler_doMoveOccupancyTypeDown as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doDeleteOccupancyType', handler_doDeleteOccupancyType)
|
||||
router.post(
|
||||
'/doDeleteOccupancyType',
|
||||
handler_doDeleteOccupancyType as RequestHandler
|
||||
)
|
||||
|
||||
// Occupancy Type Fields
|
||||
|
||||
router.post('/doAddOccupancyTypeField', handler_doAddOccupancyTypeField)
|
||||
router.post(
|
||||
'/doAddOccupancyTypeField',
|
||||
handler_doAddOccupancyTypeField as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doUpdateOccupancyTypeField', handler_doUpdateOccupancyTypeField)
|
||||
router.post(
|
||||
'/doUpdateOccupancyTypeField',
|
||||
handler_doUpdateOccupancyTypeField as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveOccupancyTypeFieldUp', handler_doMoveOccupancyTypeFieldUp)
|
||||
router.post(
|
||||
'/doMoveOccupancyTypeFieldUp',
|
||||
handler_doMoveOccupancyTypeFieldUp as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doMoveOccupancyTypeFieldDown',
|
||||
handler_doMoveOccupancyTypeFieldDown
|
||||
handler_doMoveOccupancyTypeFieldDown as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doDeleteOccupancyTypeField', handler_doDeleteOccupancyTypeField)
|
||||
router.post(
|
||||
'/doDeleteOccupancyTypeField',
|
||||
handler_doDeleteOccupancyTypeField as RequestHandler
|
||||
)
|
||||
|
||||
// Occupancy Type Prints
|
||||
|
||||
router.post('/doAddOccupancyTypePrint', handler_doAddOccupancyTypePrint)
|
||||
router.post(
|
||||
'/doAddOccupancyTypePrint',
|
||||
handler_doAddOccupancyTypePrint as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveOccupancyTypePrintUp', handler_doMoveOccupancyTypePrintUp)
|
||||
router.post(
|
||||
'/doMoveOccupancyTypePrintUp',
|
||||
handler_doMoveOccupancyTypePrintUp as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doMoveOccupancyTypePrintDown',
|
||||
handler_doMoveOccupancyTypePrintDown
|
||||
handler_doMoveOccupancyTypePrintDown as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doDeleteOccupancyTypePrint', handler_doDeleteOccupancyTypePrint)
|
||||
router.post(
|
||||
'/doDeleteOccupancyTypePrint',
|
||||
handler_doDeleteOccupancyTypePrint as RequestHandler
|
||||
)
|
||||
|
||||
/*
|
||||
* Lot Type Management
|
||||
*/
|
||||
|
||||
router.get('/lotTypes', handler_lotTypes)
|
||||
router.get('/lotTypes', handler_lotTypes as RequestHandler)
|
||||
|
||||
router.post('/doAddLotType', handler_doAddLotType)
|
||||
router.post('/doAddLotType', handler_doAddLotType as RequestHandler)
|
||||
|
||||
router.post('/doUpdateLotType', handler_doUpdateLotType)
|
||||
router.post('/doUpdateLotType', handler_doUpdateLotType as RequestHandler)
|
||||
|
||||
router.post('/doMoveLotTypeUp', handler_doMoveLotTypeUp)
|
||||
router.post('/doMoveLotTypeUp', handler_doMoveLotTypeUp as RequestHandler)
|
||||
|
||||
router.post('/doMoveLotTypeDown', handler_doMoveLotTypeDown)
|
||||
router.post('/doMoveLotTypeDown', handler_doMoveLotTypeDown as RequestHandler)
|
||||
|
||||
router.post('/doDeleteLotType', handler_doDeleteLotType)
|
||||
router.post('/doDeleteLotType', handler_doDeleteLotType as RequestHandler)
|
||||
|
||||
// Lot Type Fields
|
||||
|
||||
router.post('/doAddLotTypeField', handler_doAddLotTypeField)
|
||||
router.post('/doAddLotTypeField', handler_doAddLotTypeField as RequestHandler)
|
||||
|
||||
router.post('/doUpdateLotTypeField', handler_doUpdateLotTypeField)
|
||||
router.post(
|
||||
'/doUpdateLotTypeField',
|
||||
handler_doUpdateLotTypeField as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveLotTypeFieldUp', handler_doMoveLotTypeFieldUp)
|
||||
router.post(
|
||||
'/doMoveLotTypeFieldUp',
|
||||
handler_doMoveLotTypeFieldUp as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveLotTypeFieldDown', handler_doMoveLotTypeFieldDown)
|
||||
router.post(
|
||||
'/doMoveLotTypeFieldDown',
|
||||
handler_doMoveLotTypeFieldDown as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doDeleteLotTypeField', handler_doDeleteLotTypeField)
|
||||
router.post(
|
||||
'/doDeleteLotTypeField',
|
||||
handler_doDeleteLotTypeField as RequestHandler
|
||||
)
|
||||
|
||||
/*
|
||||
* Config Tables
|
||||
*/
|
||||
|
||||
router.get('/tables', handler_tables)
|
||||
router.get('/tables', handler_tables as RequestHandler)
|
||||
|
||||
// Config Tables - Work Order Types
|
||||
|
||||
router.post('/doAddWorkOrderType', handler_doAddWorkOrderType)
|
||||
router.post('/doAddWorkOrderType', handler_doAddWorkOrderType as RequestHandler)
|
||||
|
||||
router.post('/doUpdateWorkOrderType', handler_doUpdateWorkOrderType)
|
||||
router.post(
|
||||
'/doUpdateWorkOrderType',
|
||||
handler_doUpdateWorkOrderType as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveWorkOrderTypeUp', handler_doMoveWorkOrderTypeUp)
|
||||
router.post(
|
||||
'/doMoveWorkOrderTypeUp',
|
||||
handler_doMoveWorkOrderTypeUp as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveWorkOrderTypeDown', handler_doMoveWorkOrderTypeDown)
|
||||
router.post(
|
||||
'/doMoveWorkOrderTypeDown',
|
||||
handler_doMoveWorkOrderTypeDown as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doDeleteWorkOrderType', handler_doDeleteWorkOrderType)
|
||||
router.post(
|
||||
'/doDeleteWorkOrderType',
|
||||
handler_doDeleteWorkOrderType as RequestHandler
|
||||
)
|
||||
// Config Tables - Work Order Milestone Types
|
||||
|
||||
router.post(
|
||||
'/doAddWorkOrderMilestoneType',
|
||||
|
||||
handler_doAddWorkOrderMilestoneType
|
||||
handler_doAddWorkOrderMilestoneType as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateWorkOrderMilestoneType',
|
||||
handler_doUpdateWorkOrderMilestoneType
|
||||
handler_doUpdateWorkOrderMilestoneType as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doMoveWorkOrderMilestoneTypeUp',
|
||||
handler_doMoveWorkOrderMilestoneTypeUp
|
||||
handler_doMoveWorkOrderMilestoneTypeUp as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doMoveWorkOrderMilestoneTypeDown',
|
||||
handler_doMoveWorkOrderMilestoneTypeDown
|
||||
handler_doMoveWorkOrderMilestoneTypeDown as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteWorkOrderMilestoneType',
|
||||
handler_doDeleteWorkOrderMilestoneType
|
||||
handler_doDeleteWorkOrderMilestoneType as RequestHandler
|
||||
)
|
||||
|
||||
// Config Tables - Lot Statuses
|
||||
|
||||
router.post('/doAddLotStatus', handler_doAddLotStatus)
|
||||
router.post('/doAddLotStatus', handler_doAddLotStatus as RequestHandler)
|
||||
|
||||
router.post('/doUpdateLotStatus', handler_doUpdateLotStatus)
|
||||
router.post('/doUpdateLotStatus', handler_doUpdateLotStatus as RequestHandler)
|
||||
|
||||
router.post('/doMoveLotStatusUp', handler_doMoveLotStatusUp)
|
||||
router.post('/doMoveLotStatusUp', handler_doMoveLotStatusUp as RequestHandler)
|
||||
|
||||
router.post('/doMoveLotStatusDown', handler_doMoveLotStatusDown)
|
||||
router.post(
|
||||
'/doMoveLotStatusDown',
|
||||
handler_doMoveLotStatusDown as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doDeleteLotStatus', handler_doDeleteLotStatus)
|
||||
router.post('/doDeleteLotStatus', handler_doDeleteLotStatus as RequestHandler)
|
||||
|
||||
// Config Tables - Lot Occupant Types
|
||||
|
||||
router.post('/doAddLotOccupantType', handler_doAddLotOccupantType)
|
||||
router.post(
|
||||
'/doAddLotOccupantType',
|
||||
handler_doAddLotOccupantType as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doUpdateLotOccupantType', handler_doUpdateLotOccupantType)
|
||||
router.post(
|
||||
'/doUpdateLotOccupantType',
|
||||
handler_doUpdateLotOccupantType as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveLotOccupantTypeUp', handler_doMoveLotOccupantTypeUp)
|
||||
router.post(
|
||||
'/doMoveLotOccupantTypeUp',
|
||||
handler_doMoveLotOccupantTypeUp as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doMoveLotOccupantTypeDown', handler_doMoveLotOccupantTypeDown)
|
||||
router.post(
|
||||
'/doMoveLotOccupantTypeDown',
|
||||
handler_doMoveLotOccupantTypeDown as RequestHandler
|
||||
)
|
||||
|
||||
router.post('/doDeleteLotOccupantType', handler_doDeleteLotOccupantType)
|
||||
router.post(
|
||||
'/doDeleteLotOccupantType',
|
||||
handler_doDeleteLotOccupantType as RequestHandler
|
||||
)
|
||||
|
||||
// Cleanup
|
||||
|
||||
router.get('/cleanup', handler_cleanup)
|
||||
|
||||
router.post('/doCleanupDatabase', handler_doCleanupDatabase)
|
||||
router.post('/doCleanupDatabase', handler_doCleanupDatabase as RequestHandler)
|
||||
|
||||
// Ntfy Startup
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Router } from 'express'
|
||||
import { Router, RequestHandler } from 'express'
|
||||
|
||||
import handler_milestoneICS from '../handlers/api-get/milestoneICS.js'
|
||||
|
||||
export const router = Router()
|
||||
|
||||
router.get('/milestoneICS', handler_milestoneICS)
|
||||
router.get('/milestoneICS', handler_milestoneICS as RequestHandler)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Router } from 'express'
|
||||
import { Router, RequestHandler } from 'express'
|
||||
|
||||
import handler_dashboard from '../handlers/dashboard-get/dashboard.js'
|
||||
|
||||
export const router = Router()
|
||||
|
||||
router.get('/', handler_dashboard)
|
||||
router.get('/', handler_dashboard as RequestHandler)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Router } from 'express'
|
||||
import { RequestHandler, Router } from 'express'
|
||||
|
||||
import handler_search from '../handlers/lotOccupancies-get/search.js'
|
||||
import handler_doSearchLotOccupancies from '../handlers/lotOccupancies-post/doSearchLotOccupancies.js'
|
||||
|
|
@ -36,54 +36,61 @@ export const router = Router()
|
|||
|
||||
// Search
|
||||
|
||||
router.get('/', handler_search)
|
||||
router.get('/', handler_search as RequestHandler)
|
||||
|
||||
router.post('/doSearchLotOccupancies', handler_doSearchLotOccupancies)
|
||||
router.post(
|
||||
'/doSearchLotOccupancies',
|
||||
handler_doSearchLotOccupancies as RequestHandler
|
||||
)
|
||||
|
||||
// Create
|
||||
|
||||
router.get('/new', permissionHandlers.updateGetHandler, handler_new)
|
||||
router.get(
|
||||
'/new',
|
||||
permissionHandlers.updateGetHandler,
|
||||
handler_new as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doGetOccupancyTypeFields',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doGetOccupancyTypeFields
|
||||
handler_doGetOccupancyTypeFields as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doCreateLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCreateLotOccupancy
|
||||
handler_doCreateLotOccupancy as RequestHandler
|
||||
)
|
||||
|
||||
// View
|
||||
|
||||
router.get('/:lotOccupancyId', handler_view)
|
||||
router.get('/:lotOccupancyId', handler_view as RequestHandler)
|
||||
|
||||
// Edit
|
||||
|
||||
router.get(
|
||||
'/:lotOccupancyId/edit',
|
||||
permissionHandlers.updateGetHandler,
|
||||
handler_edit
|
||||
handler_edit as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLotOccupancy
|
||||
handler_doUpdateLotOccupancy as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doCopyLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCopyLotOccupancy
|
||||
handler_doCopyLotOccupancy as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotOccupancy
|
||||
handler_doDeleteLotOccupancy as RequestHandler
|
||||
)
|
||||
|
||||
// Occupants
|
||||
|
|
@ -91,25 +98,25 @@ router.post(
|
|||
router.post(
|
||||
'/doSearchPastOccupants',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doSearchPastOccupants
|
||||
handler_doSearchPastOccupants as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doAddLotOccupancyOccupant',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddLotOccupancyOccupant
|
||||
handler_doAddLotOccupancyOccupant as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateLotOccupancyOccupant',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLotOccupancyOccupant
|
||||
handler_doUpdateLotOccupancyOccupant as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteLotOccupancyOccupant',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotOccupancyOccupant
|
||||
handler_doDeleteLotOccupancyOccupant as RequestHandler
|
||||
)
|
||||
|
||||
// Comments
|
||||
|
|
@ -117,19 +124,19 @@ router.post(
|
|||
router.post(
|
||||
'/doAddLotOccupancyComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddLotOccupancyComment
|
||||
handler_doAddLotOccupancyComment as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateLotOccupancyComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLotOccupancyComment
|
||||
handler_doUpdateLotOccupancyComment as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteLotOccupancyComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotOccupancyComment
|
||||
handler_doDeleteLotOccupancyComment as RequestHandler
|
||||
)
|
||||
|
||||
// Fees
|
||||
|
|
@ -137,19 +144,19 @@ router.post(
|
|||
router.post(
|
||||
'/doGetFees',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doGetFees
|
||||
handler_doGetFees as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doAddLotOccupancyFee',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddLotOccupancyFee
|
||||
handler_doAddLotOccupancyFee as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteLotOccupancyFee',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotOccupancyFee
|
||||
handler_doDeleteLotOccupancyFee as RequestHandler
|
||||
)
|
||||
|
||||
// Transactions
|
||||
|
|
@ -157,13 +164,13 @@ router.post(
|
|||
router.post(
|
||||
'/doAddLotOccupancyTransaction',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddLotOccupancyTransaction
|
||||
handler_doAddLotOccupancyTransaction as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteLotOccupancyTransaction',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotOccupancyTransaction
|
||||
handler_doDeleteLotOccupancyTransaction as RequestHandler
|
||||
)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Router } from 'express'
|
||||
import { RequestHandler, Router } from 'express'
|
||||
|
||||
import * as permissionHandlers from '../handlers/permissions.js'
|
||||
|
||||
|
|
@ -28,64 +28,72 @@ export const router = Router()
|
|||
* Lot Search
|
||||
*/
|
||||
|
||||
router.get('/', handler_search)
|
||||
router.get('/', handler_search as RequestHandler)
|
||||
|
||||
router.post('/doSearchLots', handler_doSearchLots)
|
||||
router.post('/doSearchLots', handler_doSearchLots as RequestHandler)
|
||||
|
||||
/*
|
||||
* Lot View / Edit
|
||||
*/
|
||||
|
||||
router.get('/new', permissionHandlers.updateGetHandler, handler_new)
|
||||
router.get(
|
||||
'/new',
|
||||
permissionHandlers.updateGetHandler,
|
||||
handler_new as RequestHandler
|
||||
)
|
||||
|
||||
router.get('/:lotId', handler_view)
|
||||
router.get('/:lotId', handler_view as RequestHandler)
|
||||
|
||||
router.get('/:lotId/next', handler_next)
|
||||
router.get('/:lotId/next', handler_next as RequestHandler)
|
||||
|
||||
router.get('/:lotId/previous', handler_previous)
|
||||
router.get('/:lotId/previous', handler_previous as RequestHandler)
|
||||
|
||||
router.get('/:lotId/edit', permissionHandlers.updateGetHandler, handler_edit)
|
||||
router.get(
|
||||
'/:lotId/edit',
|
||||
permissionHandlers.updateGetHandler,
|
||||
handler_edit as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doGetLotTypeFields',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doGetLotTypeFields
|
||||
handler_doGetLotTypeFields as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doCreateLot',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCreateLot
|
||||
handler_doCreateLot as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateLot',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLot
|
||||
handler_doUpdateLot as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteLot',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLot
|
||||
handler_doDeleteLot as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doAddLotComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddLotComment
|
||||
handler_doAddLotComment as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateLotComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLotComment
|
||||
handler_doUpdateLotComment as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteLotComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteLotComment
|
||||
handler_doDeleteLotComment as RequestHandler
|
||||
)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Router } from 'express'
|
||||
import { RequestHandler, Router } from 'express'
|
||||
|
||||
import * as permissionHandlers from '../handlers/permissions.js'
|
||||
|
||||
|
|
@ -14,30 +14,38 @@ import handler_doDeleteMap from '../handlers/maps-post/doDeleteMap.js'
|
|||
|
||||
export const router = Router()
|
||||
|
||||
router.get('/', handler_search)
|
||||
router.get('/', handler_search as RequestHandler)
|
||||
|
||||
router.get('/new', permissionHandlers.updateGetHandler, handler_new)
|
||||
router.get(
|
||||
'/new',
|
||||
permissionHandlers.updateGetHandler,
|
||||
handler_new as RequestHandler
|
||||
)
|
||||
|
||||
router.get('/:mapId', handler_view)
|
||||
router.get('/:mapId', handler_view as RequestHandler)
|
||||
|
||||
router.get('/:mapId/edit', permissionHandlers.updateGetHandler, handler_edit)
|
||||
router.get(
|
||||
'/:mapId/edit',
|
||||
permissionHandlers.updateGetHandler,
|
||||
handler_edit as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doCreateMap',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCreateMap
|
||||
handler_doCreateMap as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateMap',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateMap
|
||||
handler_doUpdateMap as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteMap',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteMap
|
||||
handler_doDeleteMap as RequestHandler
|
||||
)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { Router } from 'express'
|
||||
import { RequestHandler, Router } from 'express'
|
||||
|
||||
import handler_screen from '../handlers/print-get/screen.js'
|
||||
import handler_pdf from '../handlers/print-get/pdf.js'
|
||||
|
||||
export const router = Router()
|
||||
|
||||
router.get('/screen/:printName', handler_screen)
|
||||
router.get('/screen/:printName', handler_screen as RequestHandler)
|
||||
|
||||
router.get('/pdf/:printName', handler_pdf)
|
||||
router.get('/pdf/:printName', handler_pdf as RequestHandler)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { Router } from 'express'
|
||||
import { RequestHandler, Router } from 'express'
|
||||
|
||||
import handler_search from '../handlers/reports-get/search.js'
|
||||
import handler_reportName from '../handlers/reports-get/reportName.js'
|
||||
|
||||
export const router = Router()
|
||||
|
||||
router.get('/', handler_search)
|
||||
router.get('/', handler_search as RequestHandler)
|
||||
|
||||
router.all('/:reportName', handler_reportName)
|
||||
router.all('/:reportName', handler_reportName as RequestHandler)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Router } from 'express'
|
||||
import { RequestHandler, Router } from 'express'
|
||||
|
||||
import * as permissionHandlers from '../handlers/permissions.js'
|
||||
|
||||
|
|
@ -42,38 +42,45 @@ export const router = Router()
|
|||
|
||||
// Search
|
||||
|
||||
router.get('/', handler_search)
|
||||
router.get('/', handler_search as RequestHandler)
|
||||
|
||||
router.post('/doSearchWorkOrders', handler_doSearchWorkOrders)
|
||||
router.post('/doSearchWorkOrders', handler_doSearchWorkOrders as RequestHandler)
|
||||
|
||||
// Milestone Calendar
|
||||
|
||||
router.get('/milestoneCalendar', handler_milestoneCalendar)
|
||||
router.get('/milestoneCalendar', handler_milestoneCalendar as RequestHandler)
|
||||
|
||||
router.post('/doGetWorkOrderMilestones', handler_doGetWorkOrderMilestones)
|
||||
router.post(
|
||||
'/doGetWorkOrderMilestones',
|
||||
handler_doGetWorkOrderMilestones as RequestHandler
|
||||
)
|
||||
|
||||
// Outlook Integration
|
||||
|
||||
router.get('/outlook', handler_outlook)
|
||||
router.get('/outlook', handler_outlook as RequestHandler)
|
||||
|
||||
// New
|
||||
|
||||
router.get('/new', permissionHandlers.adminGetHandler, handler_new)
|
||||
router.get(
|
||||
'/new',
|
||||
permissionHandlers.adminGetHandler,
|
||||
handler_new as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doCreateWorkOrder',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCreateWorkOrder
|
||||
handler_doCreateWorkOrder as RequestHandler
|
||||
)
|
||||
|
||||
// View
|
||||
|
||||
router.get('/:workOrderId', handler_view)
|
||||
router.get('/:workOrderId', handler_view as RequestHandler)
|
||||
|
||||
router.post(
|
||||
'/doReopenWorkOrder',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doReopenWorkOrder
|
||||
handler_doReopenWorkOrder as RequestHandler
|
||||
)
|
||||
|
||||
// Edit
|
||||
|
|
@ -81,25 +88,25 @@ router.post(
|
|||
router.get(
|
||||
'/:workOrderId/edit',
|
||||
permissionHandlers.updateGetHandler,
|
||||
handler_edit
|
||||
handler_edit as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateWorkOrder',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateWorkOrder
|
||||
handler_doUpdateWorkOrder as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doCloseWorkOrder',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCloseWorkOrder
|
||||
handler_doCloseWorkOrder as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteWorkOrder',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteWorkOrder
|
||||
handler_doDeleteWorkOrder as RequestHandler
|
||||
)
|
||||
|
||||
// Lot Occupancy
|
||||
|
|
@ -107,31 +114,31 @@ router.post(
|
|||
router.post(
|
||||
'/doAddWorkOrderLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddWorkOrderLotOccupancy
|
||||
handler_doAddWorkOrderLotOccupancy as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteWorkOrderLotOccupancy',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteWorkOrderLotOccupancy
|
||||
handler_doDeleteWorkOrderLotOccupancy as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doAddWorkOrderLot',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddWorkOrderLot
|
||||
handler_doAddWorkOrderLot as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateLotStatus',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateLotStatus
|
||||
handler_doUpdateLotStatus as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteWorkOrderLot',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteWorkOrderLot
|
||||
handler_doDeleteWorkOrderLot as RequestHandler
|
||||
)
|
||||
|
||||
// Comments
|
||||
|
|
@ -139,19 +146,19 @@ router.post(
|
|||
router.post(
|
||||
'/doAddWorkOrderComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddWorkOrderComment
|
||||
handler_doAddWorkOrderComment as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateWorkOrderComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateWorkOrderComment
|
||||
handler_doUpdateWorkOrderComment as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteWorkOrderComment',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteWorkOrderComment
|
||||
handler_doDeleteWorkOrderComment as RequestHandler
|
||||
)
|
||||
|
||||
// Milestones
|
||||
|
|
@ -159,31 +166,31 @@ router.post(
|
|||
router.post(
|
||||
'/doAddWorkOrderMilestone',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doAddWorkOrderMilestone
|
||||
handler_doAddWorkOrderMilestone as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doUpdateWorkOrderMilestone',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doUpdateWorkOrderMilestone
|
||||
handler_doUpdateWorkOrderMilestone as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doCompleteWorkOrderMilestone',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doCompleteWorkOrderMilestone
|
||||
handler_doCompleteWorkOrderMilestone as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doReopenWorkOrderMilestone',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doReopenWorkOrderMilestone
|
||||
handler_doReopenWorkOrderMilestone as RequestHandler
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/doDeleteWorkOrderMilestone',
|
||||
permissionHandlers.updatePostHandler,
|
||||
handler_doDeleteWorkOrderMilestone
|
||||
handler_doDeleteWorkOrderMilestone as RequestHandler
|
||||
)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
Loading…
Reference in New Issue