linting
parent
2176158847
commit
6cb36c4548
2
app.js
2
app.js
|
|
@ -12,9 +12,9 @@ import createError from 'http-errors';
|
|||
import FileStore from 'session-file-store';
|
||||
import { DEBUG_NAMESPACE } from './debug.config.js';
|
||||
import * as permissionHandlers from './handlers/permissions.js';
|
||||
import { getSafeRedirectURL } from './helpers/authentication.helpers.js';
|
||||
import * as configFunctions from './helpers/config.helpers.js';
|
||||
import { useTestDatabases } from './helpers/database.helpers.js';
|
||||
import { getSafeRedirectURL } from './helpers/functions.authentication.js';
|
||||
import * as printFunctions from './helpers/functions.print.js';
|
||||
import routerAdmin from './routes/admin.js';
|
||||
import routerApi from './routes/api.js';
|
||||
|
|
|
|||
2
app.ts
2
app.ts
|
|
@ -14,9 +14,9 @@ import FileStore from 'session-file-store'
|
|||
|
||||
import { DEBUG_NAMESPACE } from './debug.config.js'
|
||||
import * as permissionHandlers from './handlers/permissions.js'
|
||||
import { getSafeRedirectURL } from './helpers/authentication.helpers.js'
|
||||
import * as configFunctions from './helpers/config.helpers.js'
|
||||
import { useTestDatabases } from './helpers/database.helpers.js'
|
||||
import { getSafeRedirectURL } from './helpers/functions.authentication.js'
|
||||
import * as printFunctions from './helpers/functions.print.js'
|
||||
import routerAdmin from './routes/admin.js'
|
||||
import routerApi from './routes/api.js'
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
export interface AddBurialSiteTypeFieldForm {
|
||||
burialSiteTypeId: string | number;
|
||||
burialSiteTypeId: number | string;
|
||||
burialSiteTypeField: string;
|
||||
fieldType?: string;
|
||||
fieldValues?: string;
|
||||
isRequired?: string;
|
||||
pattern?: string;
|
||||
minLength?: string | number;
|
||||
maxLength?: string | number;
|
||||
minLength?: number | string;
|
||||
maxLength?: number | string;
|
||||
orderNumber?: number;
|
||||
}
|
||||
export default function addBurialSiteTypeField(addForm: AddBurialSiteTypeFieldForm, user: User): Promise<number>;
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ import { clearCacheByTableName } from '../helpers/functions.cache.js'
|
|||
import { acquireConnection } from './pool.js'
|
||||
|
||||
export interface AddBurialSiteTypeFieldForm {
|
||||
burialSiteTypeId: string | number
|
||||
burialSiteTypeId: number | string
|
||||
burialSiteTypeField: string
|
||||
fieldType?: string
|
||||
fieldValues?: string
|
||||
isRequired?: string
|
||||
pattern?: string
|
||||
minLength?: string | number
|
||||
maxLength?: string | number
|
||||
minLength?: number | string
|
||||
maxLength?: number | string
|
||||
orderNumber?: number
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ export interface UpdateBurialSiteTypeFieldForm {
|
|||
burialSiteTypeField: string;
|
||||
isRequired: '0' | '1';
|
||||
fieldType?: string;
|
||||
minLength?: string;
|
||||
maxLength?: string;
|
||||
minLength?: string;
|
||||
pattern?: string;
|
||||
fieldValues: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ export interface UpdateBurialSiteTypeFieldForm {
|
|||
burialSiteTypeField: string
|
||||
isRequired: '0' | '1'
|
||||
fieldType?: string
|
||||
minLength?: string
|
||||
maxLength?: string
|
||||
minLength?: string
|
||||
pattern?: string
|
||||
fieldValues: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,4 +14,11 @@ export interface UpdateCemeteryForm {
|
|||
cemeteryLongitude: string;
|
||||
cemeterySvg: string;
|
||||
}
|
||||
/**
|
||||
* Updates a cemetery in the database.
|
||||
* Be sure to rebuild burial site names after updating a cemetery.
|
||||
* @param updateForm - The form data from the update cemetery form.
|
||||
* @param user - The user who is updating the cemetery.
|
||||
* @returns `true` if the cemetery was updated successfully, `false` otherwise.
|
||||
*/
|
||||
export default function updateCemetery(updateForm: UpdateCemeteryForm, user: User): Promise<boolean>;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,11 @@
|
|||
import { acquireConnection } from './pool.js';
|
||||
/**
|
||||
* Updates a cemetery in the database.
|
||||
* Be sure to rebuild burial site names after updating a cemetery.
|
||||
* @param updateForm - The form data from the update cemetery form.
|
||||
* @param user - The user who is updating the cemetery.
|
||||
* @returns `true` if the cemetery was updated successfully, `false` otherwise.
|
||||
*/
|
||||
export default async function updateCemetery(updateForm, user) {
|
||||
const database = await acquireConnection();
|
||||
const result = database
|
||||
|
|
|
|||
|
|
@ -21,6 +21,13 @@ export interface UpdateCemeteryForm {
|
|||
cemeterySvg: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a cemetery in the database.
|
||||
* Be sure to rebuild burial site names after updating a cemetery.
|
||||
* @param updateForm - The form data from the update cemetery form.
|
||||
* @param user - The user who is updating the cemetery.
|
||||
* @returns `true` if the cemetery was updated successfully, `false` otherwise.
|
||||
*/
|
||||
export default async function updateCemetery(
|
||||
updateForm: UpdateCemeteryForm,
|
||||
user: User
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
import { type DateString, type TimeString } from '@cityssm/utils-datetime';
|
||||
export interface UpdateContractForm {
|
||||
contractId: string | number;
|
||||
contractTypeId: string | number;
|
||||
burialSiteId: string | number;
|
||||
contractId: number | string;
|
||||
burialSiteId: number | string;
|
||||
contractTypeId: number | string;
|
||||
contractEndDateString: '' | DateString;
|
||||
contractStartDateString: DateString;
|
||||
contractEndDateString: DateString | '';
|
||||
funeralHomeId?: string | number;
|
||||
funeralHomeId?: number | string;
|
||||
committalTypeId?: number | string;
|
||||
funeralDateString: '' | DateString;
|
||||
funeralDirectorName: string;
|
||||
funeralDateString: DateString | '';
|
||||
funeralTimeString: TimeString | '';
|
||||
committalTypeId?: string | number;
|
||||
funeralTimeString: '' | TimeString;
|
||||
purchaserName?: string;
|
||||
purchaserAddress1?: string;
|
||||
purchaserAddress2?: string;
|
||||
purchaserCity?: string;
|
||||
purchaserProvince?: string;
|
||||
purchaserPostalCode?: string;
|
||||
purchaserPhoneNumber?: string;
|
||||
purchaserProvince?: string;
|
||||
purchaserEmail?: string;
|
||||
purchaserPhoneNumber?: string;
|
||||
purchaserRelationship?: string;
|
||||
contractTypeFieldIds?: string;
|
||||
[fieldValue_contractTypeFieldId: `fieldValue_${string}`]: unknown;
|
||||
|
|
|
|||
|
|
@ -10,27 +10,31 @@ import deleteContractField from './deleteContractField.js'
|
|||
import { acquireConnection } from './pool.js'
|
||||
|
||||
export interface UpdateContractForm {
|
||||
contractId: string | number
|
||||
contractTypeId: string | number
|
||||
burialSiteId: string | number
|
||||
contractId: number | string
|
||||
|
||||
burialSiteId: number | string
|
||||
contractTypeId: number | string
|
||||
|
||||
contractEndDateString: '' | DateString
|
||||
contractStartDateString: DateString
|
||||
contractEndDateString: DateString | ''
|
||||
|
||||
funeralHomeId?: string | number
|
||||
funeralHomeId?: number | string
|
||||
|
||||
committalTypeId?: number | string
|
||||
funeralDateString: '' | DateString
|
||||
funeralDirectorName: string
|
||||
funeralDateString: DateString | ''
|
||||
funeralTimeString: TimeString | ''
|
||||
committalTypeId?: string | number
|
||||
funeralTimeString: '' | TimeString
|
||||
|
||||
purchaserName?: string
|
||||
|
||||
purchaserAddress1?: string
|
||||
purchaserAddress2?: string
|
||||
purchaserCity?: string
|
||||
purchaserProvince?: string
|
||||
purchaserPostalCode?: string
|
||||
purchaserPhoneNumber?: string
|
||||
purchaserProvince?: string
|
||||
|
||||
purchaserEmail?: string
|
||||
purchaserPhoneNumber?: string
|
||||
purchaserRelationship?: string
|
||||
|
||||
contractTypeFieldIds?: string
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { type DateString, type TimeString } from '@cityssm/utils-datetime';
|
||||
export interface UpdateForm {
|
||||
contractCommentId: string | number;
|
||||
contractCommentId: number | string;
|
||||
commentDateString: DateString;
|
||||
commentTimeString: TimeString;
|
||||
comment: string;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {
|
|||
import { acquireConnection } from './pool.js'
|
||||
|
||||
export interface UpdateForm {
|
||||
contractCommentId: string | number
|
||||
contractCommentId: number | string
|
||||
commentDateString: DateString
|
||||
commentTimeString: TimeString
|
||||
comment: string
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
export interface UpdateBurialSiteFeeForm {
|
||||
contractId: string | number;
|
||||
feeId: string | number;
|
||||
quantity: string | number;
|
||||
contractId: number | string;
|
||||
feeId: number | string;
|
||||
quantity: number | string;
|
||||
}
|
||||
export default function updateContractFeeQuantity(feeQuantityForm: UpdateBurialSiteFeeForm, user: User): Promise<boolean>;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { acquireConnection } from './pool.js'
|
||||
|
||||
export interface UpdateBurialSiteFeeForm {
|
||||
contractId: string | number
|
||||
feeId: string | number
|
||||
quantity: string | number
|
||||
contractId: number | string
|
||||
feeId: number | string
|
||||
quantity: number | string
|
||||
}
|
||||
|
||||
export default async function updateContractFeeQuantity(
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { type DateString } from '@cityssm/utils-datetime';
|
||||
export interface UpdateForm {
|
||||
contractId: string | number;
|
||||
intermentNumber: string | number;
|
||||
contractId: number | string;
|
||||
intermentNumber: number | string;
|
||||
deceasedName: string;
|
||||
deceasedAddress1: string;
|
||||
deceasedAddress2: string;
|
||||
deceasedCity: string;
|
||||
deceasedProvince: string;
|
||||
deceasedPostalCode: string;
|
||||
birthDateString: DateString | '';
|
||||
deceasedProvince: string;
|
||||
birthDateString: '' | DateString;
|
||||
birthPlace: string;
|
||||
deathDateString: DateString | '';
|
||||
deathDateString: '' | DateString;
|
||||
deathPlace: string;
|
||||
deathAge: string;
|
||||
deathAgePeriod: string;
|
||||
intermentContainerTypeId: string | number;
|
||||
intermentContainerTypeId: number | string;
|
||||
}
|
||||
export default function updateContractInterment(contractForm: UpdateForm, user: User): Promise<boolean>;
|
||||
|
|
|
|||
|
|
@ -3,21 +3,26 @@ import { type DateString, dateStringToInteger } from '@cityssm/utils-datetime'
|
|||
import { acquireConnection } from './pool.js'
|
||||
|
||||
export interface UpdateForm {
|
||||
contractId: string | number
|
||||
intermentNumber: string | number
|
||||
contractId: number | string
|
||||
intermentNumber: number | string
|
||||
|
||||
deceasedName: string
|
||||
|
||||
deceasedAddress1: string
|
||||
deceasedAddress2: string
|
||||
deceasedCity: string
|
||||
deceasedProvince: string
|
||||
deceasedPostalCode: string
|
||||
birthDateString: DateString | ''
|
||||
deceasedProvince: string
|
||||
|
||||
birthDateString: '' | DateString
|
||||
birthPlace: string
|
||||
deathDateString: DateString | ''
|
||||
deathDateString: '' | DateString
|
||||
deathPlace: string
|
||||
|
||||
deathAge: string
|
||||
deathAgePeriod: string
|
||||
intermentContainerTypeId: string | number
|
||||
|
||||
intermentContainerTypeId: number | string
|
||||
}
|
||||
|
||||
export default async function updateContractInterment(
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { type DateString, type TimeString } from '@cityssm/utils-datetime';
|
||||
export interface ContractTransactionUpdateForm {
|
||||
contractId: string | number;
|
||||
transactionIndex: string | number;
|
||||
contractId: number | string;
|
||||
transactionIndex: number | string;
|
||||
transactionDateString: DateString;
|
||||
transactionTimeString: TimeString;
|
||||
transactionAmount: string | number;
|
||||
externalReceiptNumber: string;
|
||||
transactionAmount: number | string;
|
||||
transactionNote: string;
|
||||
}
|
||||
export default function updateContractTransaction(updateForm: ContractTransactionUpdateForm, user: User): Promise<boolean>;
|
||||
|
|
|
|||
|
|
@ -8,12 +8,14 @@ import {
|
|||
import { acquireConnection } from './pool.js'
|
||||
|
||||
export interface ContractTransactionUpdateForm {
|
||||
contractId: string | number
|
||||
transactionIndex: string | number
|
||||
contractId: number | string
|
||||
transactionIndex: number | string
|
||||
|
||||
transactionDateString: DateString
|
||||
transactionTimeString: TimeString
|
||||
transactionAmount: string | number
|
||||
|
||||
externalReceiptNumber: string
|
||||
transactionAmount: number | string
|
||||
transactionNote: string
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ export default async function updateContractType(updateForm, user) {
|
|||
const result = database
|
||||
.prepare(`update ContractTypes
|
||||
set contractType = ?,
|
||||
isPreneed = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
isPreneed = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where recordDelete_timeMillis is null
|
||||
and contractTypeId = ?`)
|
||||
and contractTypeId = ?`)
|
||||
.run(updateForm.contractType, updateForm.isPreneed === undefined ? 0 : 1, user.userName, rightNowMillis, updateForm.contractTypeId);
|
||||
database.release();
|
||||
clearCacheByTableName('ContractTypes');
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ export default async function updateContractType(
|
|||
.prepare(
|
||||
`update ContractTypes
|
||||
set contractType = ?,
|
||||
isPreneed = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
isPreneed = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where recordDelete_timeMillis is null
|
||||
and contractTypeId = ?`
|
||||
and contractTypeId = ?`
|
||||
)
|
||||
.run(
|
||||
updateForm.contractType,
|
||||
|
|
|
|||
|
|
@ -5,16 +5,16 @@ export default async function updateContractTypeField(updateForm, user) {
|
|||
const result = database
|
||||
.prepare(`update ContractTypeFields
|
||||
set contractTypeField = ?,
|
||||
isRequired = ?,
|
||||
fieldType = ?,
|
||||
minLength = ?,
|
||||
maxLength = ?,
|
||||
pattern = ?,
|
||||
fieldValues = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
isRequired = ?,
|
||||
fieldType = ?,
|
||||
minLength = ?,
|
||||
maxLength = ?,
|
||||
pattern = ?,
|
||||
fieldValues = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where contractTypeFieldId = ?
|
||||
and recordDelete_timeMillis is null`)
|
||||
and recordDelete_timeMillis is null`)
|
||||
.run(updateForm.contractTypeField, Number.parseInt(updateForm.isRequired, 10), updateForm.fieldType ?? 'text', updateForm.minLength ?? 0, updateForm.maxLength ?? 100, updateForm.pattern ?? '', updateForm.fieldValues, user.userName, Date.now(), updateForm.contractTypeFieldId);
|
||||
database.release();
|
||||
clearCacheByTableName('ContractTypeFields');
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ export default async function updateContractTypeField(
|
|||
.prepare(
|
||||
`update ContractTypeFields
|
||||
set contractTypeField = ?,
|
||||
isRequired = ?,
|
||||
fieldType = ?,
|
||||
minLength = ?,
|
||||
maxLength = ?,
|
||||
pattern = ?,
|
||||
fieldValues = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
isRequired = ?,
|
||||
fieldType = ?,
|
||||
minLength = ?,
|
||||
maxLength = ?,
|
||||
pattern = ?,
|
||||
fieldValues = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where contractTypeFieldId = ?
|
||||
and recordDelete_timeMillis is null`
|
||||
and recordDelete_timeMillis is null`
|
||||
)
|
||||
.run(
|
||||
updateForm.contractTypeField,
|
||||
|
|
|
|||
|
|
@ -4,22 +4,22 @@ export default async function updateFee(feeForm, user) {
|
|||
const result = database
|
||||
.prepare(`update Fees
|
||||
set feeCategoryId = ?,
|
||||
feeName = ?,
|
||||
feeDescription = ?,
|
||||
feeAccount = ?,
|
||||
contractTypeId = ?,
|
||||
burialSiteTypeId = ?,
|
||||
feeAmount = ?,
|
||||
feeFunction = ?,
|
||||
taxAmount = ?,
|
||||
taxPercentage = ?,
|
||||
includeQuantity = ?,
|
||||
quantityUnit = ?,
|
||||
isRequired = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
feeName = ?,
|
||||
feeDescription = ?,
|
||||
feeAccount = ?,
|
||||
contractTypeId = ?,
|
||||
burialSiteTypeId = ?,
|
||||
feeAmount = ?,
|
||||
feeFunction = ?,
|
||||
taxAmount = ?,
|
||||
taxPercentage = ?,
|
||||
includeQuantity = ?,
|
||||
quantityUnit = ?,
|
||||
isRequired = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where recordDelete_timeMillis is null
|
||||
and feeId = ?`)
|
||||
and feeId = ?`)
|
||||
.run(feeForm.feeCategoryId, feeForm.feeName, feeForm.feeDescription, feeForm.feeAccount, feeForm.contractTypeId === '' ? undefined : feeForm.contractTypeId, feeForm.burialSiteTypeId === '' ? undefined : feeForm.burialSiteTypeId, feeForm.feeAmount === undefined || feeForm.feeAmount === ''
|
||||
? 0
|
||||
: feeForm.feeAmount, feeForm.feeFunction ?? undefined, feeForm.taxAmount === '' ? undefined : feeForm.taxAmount, feeForm.taxPercentage === '' ? undefined : feeForm.taxPercentage, feeForm.includeQuantity === '' ? 0 : 1, feeForm.quantityUnit, feeForm.isRequired === '' ? 0 : 1, user.userName, Date.now(), feeForm.feeId);
|
||||
|
|
|
|||
|
|
@ -27,22 +27,22 @@ export default async function updateFee(
|
|||
.prepare(
|
||||
`update Fees
|
||||
set feeCategoryId = ?,
|
||||
feeName = ?,
|
||||
feeDescription = ?,
|
||||
feeAccount = ?,
|
||||
contractTypeId = ?,
|
||||
burialSiteTypeId = ?,
|
||||
feeAmount = ?,
|
||||
feeFunction = ?,
|
||||
taxAmount = ?,
|
||||
taxPercentage = ?,
|
||||
includeQuantity = ?,
|
||||
quantityUnit = ?,
|
||||
isRequired = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
feeName = ?,
|
||||
feeDescription = ?,
|
||||
feeAccount = ?,
|
||||
contractTypeId = ?,
|
||||
burialSiteTypeId = ?,
|
||||
feeAmount = ?,
|
||||
feeFunction = ?,
|
||||
taxAmount = ?,
|
||||
taxPercentage = ?,
|
||||
includeQuantity = ?,
|
||||
quantityUnit = ?,
|
||||
isRequired = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where recordDelete_timeMillis is null
|
||||
and feeId = ?`
|
||||
and feeId = ?`
|
||||
)
|
||||
.run(
|
||||
feeForm.feeCategoryId,
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ export default async function updateFeeCategory(feeCategoryForm, user) {
|
|||
const result = database
|
||||
.prepare(`update FeeCategories
|
||||
set feeCategory = ?,
|
||||
isGroupedFee = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
isGroupedFee = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where recordDelete_timeMillis is null
|
||||
and feeCategoryId = ?`)
|
||||
and feeCategoryId = ?`)
|
||||
.run(feeCategoryForm.feeCategory, (feeCategoryForm.isGroupedFee ?? '') === '1' ? 1 : 0, user.userName, Date.now(), feeCategoryForm.feeCategoryId);
|
||||
database.release();
|
||||
return result.changes > 0;
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ export default async function updateFeeCategory(
|
|||
.prepare(
|
||||
`update FeeCategories
|
||||
set feeCategory = ?,
|
||||
isGroupedFee = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
isGroupedFee = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where recordDelete_timeMillis is null
|
||||
and feeCategoryId = ?`
|
||||
and feeCategoryId = ?`
|
||||
)
|
||||
.run(
|
||||
feeCategoryForm.feeCategory,
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ export default async function updateWorkOrder(workOrderForm, user) {
|
|||
const result = database
|
||||
.prepare(`update WorkOrders
|
||||
set workOrderNumber = ?,
|
||||
workOrderTypeId = ?,
|
||||
workOrderDescription = ?,
|
||||
workOrderOpenDate = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
workOrderTypeId = ?,
|
||||
workOrderDescription = ?,
|
||||
workOrderOpenDate = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where workOrderId = ?
|
||||
and recordDelete_timeMillis is null`)
|
||||
and recordDelete_timeMillis is null`)
|
||||
.run(workOrderForm.workOrderNumber, workOrderForm.workOrderTypeId, workOrderForm.workOrderDescription, dateStringToInteger(workOrderForm.workOrderOpenDateString), user.userName, Date.now(), workOrderForm.workOrderId);
|
||||
database.release();
|
||||
return result.changes > 0;
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ export default async function updateWorkOrder(
|
|||
.prepare(
|
||||
`update WorkOrders
|
||||
set workOrderNumber = ?,
|
||||
workOrderTypeId = ?,
|
||||
workOrderDescription = ?,
|
||||
workOrderOpenDate = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
workOrderTypeId = ?,
|
||||
workOrderDescription = ?,
|
||||
workOrderOpenDate = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where workOrderId = ?
|
||||
and recordDelete_timeMillis is null`
|
||||
and recordDelete_timeMillis is null`
|
||||
)
|
||||
.run(
|
||||
workOrderForm.workOrderNumber,
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ export default async function updateWorkOrderComment(commentForm, user) {
|
|||
const result = database
|
||||
.prepare(`update WorkOrderComments
|
||||
set commentDate = ?,
|
||||
commentTime = ?,
|
||||
comment = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
commentTime = ?,
|
||||
comment = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where recordDelete_timeMillis is null
|
||||
and workOrderCommentId = ?`)
|
||||
and workOrderCommentId = ?`)
|
||||
.run(dateStringToInteger(commentForm.commentDateString), timeStringToInteger(commentForm.commentTimeString), commentForm.comment, user.userName, Date.now(), commentForm.workOrderCommentId);
|
||||
database.release();
|
||||
return result.changes > 0;
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ export default async function updateWorkOrderComment(
|
|||
.prepare(
|
||||
`update WorkOrderComments
|
||||
set commentDate = ?,
|
||||
commentTime = ?,
|
||||
comment = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
commentTime = ?,
|
||||
comment = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where recordDelete_timeMillis is null
|
||||
and workOrderCommentId = ?`
|
||||
and workOrderCommentId = ?`
|
||||
)
|
||||
.run(
|
||||
dateStringToInteger(commentForm.commentDateString),
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ export default async function updateWorkOrderMilestone(milestoneForm, user) {
|
|||
const result = database
|
||||
.prepare(`update WorkOrderMilestones
|
||||
set workOrderMilestoneTypeId = ?,
|
||||
workOrderMilestoneDate = ?,
|
||||
workOrderMilestoneTime = ?,
|
||||
workOrderMilestoneDescription = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
workOrderMilestoneDate = ?,
|
||||
workOrderMilestoneTime = ?,
|
||||
workOrderMilestoneDescription = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where workOrderMilestoneId = ?`)
|
||||
.run(milestoneForm.workOrderMilestoneTypeId === ''
|
||||
? undefined
|
||||
|
|
@ -17,7 +17,7 @@ export default async function updateWorkOrderMilestone(milestoneForm, user) {
|
|||
? 0
|
||||
: dateStringToInteger(milestoneForm.workOrderMilestoneDateString), (milestoneForm.workOrderMilestoneTimeString ?? '') === ''
|
||||
? 0
|
||||
: timeStringToInteger(milestoneForm.workOrderMilestoneTimeString), milestoneForm.workOrderMilestoneDescription, user.userName, Date.now(), milestoneForm.workOrderMilestoneId);
|
||||
: timeStringToInteger(milestoneForm.workOrderMilestoneTimeString ?? ''), milestoneForm.workOrderMilestoneDescription, user.userName, Date.now(), milestoneForm.workOrderMilestoneId);
|
||||
database.release();
|
||||
return result.changes > 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ export default async function updateWorkOrderMilestone(
|
|||
.prepare(
|
||||
`update WorkOrderMilestones
|
||||
set workOrderMilestoneTypeId = ?,
|
||||
workOrderMilestoneDate = ?,
|
||||
workOrderMilestoneTime = ?,
|
||||
workOrderMilestoneDescription = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
workOrderMilestoneDate = ?,
|
||||
workOrderMilestoneTime = ?,
|
||||
workOrderMilestoneDescription = ?,
|
||||
recordUpdate_userName = ?,
|
||||
recordUpdate_timeMillis = ?
|
||||
where workOrderMilestoneId = ?`
|
||||
)
|
||||
.run(
|
||||
|
|
@ -40,7 +40,7 @@ export default async function updateWorkOrderMilestone(
|
|||
: dateStringToInteger(milestoneForm.workOrderMilestoneDateString),
|
||||
(milestoneForm.workOrderMilestoneTimeString ?? '') === ''
|
||||
? 0
|
||||
: timeStringToInteger(milestoneForm.workOrderMilestoneTimeString!),
|
||||
: timeStringToInteger(milestoneForm.workOrderMilestoneTimeString ?? ''),
|
||||
milestoneForm.workOrderMilestoneDescription,
|
||||
|
||||
user.userName,
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
# Sunrise CMS Help Documentation
|
||||
|
||||
**Thank you for taking the time to read the documentation.**
|
||||
**Thank you for taking the time to read the Sunrise Cemetery Management System (CMS) documentation.**
|
||||
|
||||

|
||||
|
||||
**Coming soon.**
|
||||
**In development**
|
||||
|
||||
## 👩 User Documentation
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
# Installation
|
||||
|
||||
While Sunrise CMS can run on a high end server, that is by no means a requirement.
|
||||
While the Sunrise Cemetery Management System (CMS) can run on a high end server,
|
||||
that is by no means a requirement.
|
||||
Most user workstations are sufficient for modest installations.
|
||||
|
||||
## Minimum Requirements
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export default async function handler(
|
|||
|
||||
response.render('admin-burialSiteTypes', {
|
||||
headTitle: "Burial Site Type Management",
|
||||
|
||||
burialSiteTypes
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ export default async function handler(_request, response) {
|
|||
}
|
||||
}
|
||||
response.render('admin-contractTypes', {
|
||||
headTitle: "Contract Type Management",
|
||||
contractTypes,
|
||||
headTitle: 'Contract Type Management',
|
||||
allContractTypeFields,
|
||||
contractTypePrintTitles
|
||||
contractTypePrintTitles,
|
||||
contractTypes
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,10 @@ export default async function handler(
|
|||
}
|
||||
|
||||
response.render('admin-contractTypes', {
|
||||
headTitle: "Contract Type Management",
|
||||
contractTypes,
|
||||
headTitle: 'Contract Type Management',
|
||||
|
||||
allContractTypeFields,
|
||||
contractTypePrintTitles
|
||||
contractTypePrintTitles,
|
||||
contractTypes
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ export default async function handler(_request, response) {
|
|||
const burialSiteTypes = await getBurialSiteTypes();
|
||||
response.render('admin-fees', {
|
||||
headTitle: 'Fee Management',
|
||||
feeCategories,
|
||||
burialSiteTypes,
|
||||
contractTypes,
|
||||
burialSiteTypes
|
||||
feeCategories
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,9 @@ export default async function handler(
|
|||
|
||||
response.render('admin-fees', {
|
||||
headTitle: 'Fee Management',
|
||||
feeCategories,
|
||||
|
||||
burialSiteTypes,
|
||||
contractTypes,
|
||||
burialSiteTypes
|
||||
feeCategories
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ export default async function handler(_request, response) {
|
|||
const burialSiteStatuses = await getBurialSiteStatuses();
|
||||
response.render('admin-tables', {
|
||||
headTitle: 'Config Table Management',
|
||||
workOrderTypes,
|
||||
burialSiteStatuses,
|
||||
workOrderMilestoneTypes,
|
||||
burialSiteStatuses
|
||||
workOrderTypes
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ export default async function handler(
|
|||
|
||||
response.render('admin-tables', {
|
||||
headTitle: 'Config Table Management',
|
||||
workOrderTypes,
|
||||
|
||||
burialSiteStatuses,
|
||||
workOrderMilestoneTypes,
|
||||
burialSiteStatuses
|
||||
workOrderTypes
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ export default async function handler(request, response) {
|
|||
response.render('contract-edit', {
|
||||
headTitle: 'Contract Update',
|
||||
contract,
|
||||
committalTypes,
|
||||
contractTypePrints,
|
||||
contractTypes,
|
||||
funeralHomes,
|
||||
committalTypes,
|
||||
intermentContainerTypes,
|
||||
workOrderTypes,
|
||||
isCreate: false
|
||||
|
|
|
|||
|
|
@ -40,12 +40,13 @@ export default async function handler(
|
|||
|
||||
response.render('contract-edit', {
|
||||
headTitle: 'Contract Update',
|
||||
contract,
|
||||
contractTypePrints,
|
||||
|
||||
contract,
|
||||
|
||||
committalTypes,
|
||||
contractTypePrints,
|
||||
contractTypes,
|
||||
funeralHomes,
|
||||
committalTypes,
|
||||
intermentContainerTypes,
|
||||
workOrderTypes,
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ export default async function handler(request, response) {
|
|||
response.render('contract-edit', {
|
||||
headTitle: 'Create a New Contract',
|
||||
contract,
|
||||
committalTypes,
|
||||
contractTypes,
|
||||
funeralHomes,
|
||||
committalTypes,
|
||||
intermentContainerTypes,
|
||||
isCreate: true
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { dateToInteger, dateToString } from '@cityssm/utils-datetime'
|
||||
import type { Request, Response } from 'express'
|
||||
|
||||
import { dateToInteger, dateToString } from '@cityssm/utils-datetime'
|
||||
|
||||
import getBurialSite from '../../database/getBurialSite.js'
|
||||
import getFuneralHomes from '../../database/getFuneralHomes.js'
|
||||
import { getConfigProperty } from '../../helpers/config.helpers.js'
|
||||
|
|
@ -39,11 +40,12 @@ export default async function handler(
|
|||
|
||||
response.render('contract-edit', {
|
||||
headTitle: 'Create a New Contract',
|
||||
|
||||
contract,
|
||||
|
||||
committalTypes,
|
||||
contractTypes,
|
||||
funeralHomes,
|
||||
committalTypes,
|
||||
intermentContainerTypes,
|
||||
|
||||
isCreate: true
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ export default async function handler(request, response) {
|
|||
const contractTypes = await getContractTypes();
|
||||
const funeralHomes = await getFuneralHomes();
|
||||
response.render('contract-search', {
|
||||
headTitle: "Contract Search",
|
||||
cemeteries,
|
||||
headTitle: 'Contract Search',
|
||||
burialSiteTypes,
|
||||
cemeteries,
|
||||
cemeteryId: request.query.cemeteryId,
|
||||
contractTypes,
|
||||
funeralHomes,
|
||||
cemeteryId: request.query.cemeteryId
|
||||
funeralHomes
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,12 @@ export default async function handler(
|
|||
const funeralHomes = await getFuneralHomes()
|
||||
|
||||
response.render('contract-search', {
|
||||
headTitle: "Contract Search",
|
||||
cemeteries,
|
||||
headTitle: 'Contract Search',
|
||||
|
||||
burialSiteTypes,
|
||||
cemeteries,
|
||||
cemeteryId: request.query.cemeteryId,
|
||||
contractTypes,
|
||||
funeralHomes,
|
||||
cemeteryId: request.query.cemeteryId
|
||||
funeralHomes
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ export default async function handler(
|
|||
|
||||
response.render('contract-view', {
|
||||
headTitle: `Contract #${contract.contractId.toString()}`,
|
||||
|
||||
contract,
|
||||
contractTypePrints
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { dateToString } from '@cityssm/utils-datetime'
|
||||
import type { Request, Response } from 'express'
|
||||
|
||||
import { dateToString } from '@cityssm/utils-datetime'
|
||||
|
||||
import getWorkOrderMilestones from '../../database/getWorkOrderMilestones.js'
|
||||
|
||||
export default async function handler(
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export default async function handler(request, response) {
|
|||
}
|
||||
response.render('funeralHome-edit', {
|
||||
headTitle: funeralHome.funeralHomeName,
|
||||
isCreate: false,
|
||||
funeralHome
|
||||
funeralHome,
|
||||
isCreate: false
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ export default async function handler(
|
|||
|
||||
response.render('funeralHome-edit', {
|
||||
headTitle: funeralHome.funeralHomeName,
|
||||
isCreate: false,
|
||||
funeralHome
|
||||
|
||||
funeralHome,
|
||||
isCreate: false
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ export default function handler(_request, response) {
|
|||
funeralHomeProvince: getConfigProperty('settings.provinceDefault')
|
||||
};
|
||||
response.render('funeralHome-edit', {
|
||||
headTitle: "Create a Funeral Home",
|
||||
isCreate: true,
|
||||
funeralHome
|
||||
headTitle: 'Create a Funeral Home',
|
||||
funeralHome,
|
||||
isCreate: true
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@ export default function handler(_request: Request, response: Response): void {
|
|||
}
|
||||
|
||||
response.render('funeralHome-edit', {
|
||||
headTitle: "Create a Funeral Home",
|
||||
isCreate: true,
|
||||
funeralHome
|
||||
headTitle: 'Create a Funeral Home',
|
||||
|
||||
funeralHome,
|
||||
isCreate: true
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export default async function handler(
|
|||
|
||||
response.render('funeralHome-search', {
|
||||
headTitle: "Funeral Home Search",
|
||||
|
||||
funeralHomes
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ export default async function handler(request, response) {
|
|||
}
|
||||
response.render('funeralHome-view', {
|
||||
headTitle: funeralHome.funeralHomeName,
|
||||
isCreate: false,
|
||||
funeralHome
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export default async function handler(
|
|||
|
||||
response.render('funeralHome-view', {
|
||||
headTitle: funeralHome.funeralHomeName,
|
||||
isCreate: false,
|
||||
|
||||
funeralHome
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import type { Request, Response } from 'express'
|
||||
|
||||
import papaParse from 'papaparse'
|
||||
|
||||
import getReportData, {
|
||||
|
|
@ -19,6 +20,7 @@ export default async function handler(
|
|||
if (rows === undefined) {
|
||||
response.status(404).json({
|
||||
success: false,
|
||||
|
||||
message: 'Report Not Found'
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ export default async function handler(_request, response) {
|
|||
const burialSiteStatuses = await getBurialSiteStatuses();
|
||||
response.render('report-search', {
|
||||
headTitle: 'Reports',
|
||||
todayDateString: dateToString(rightNow),
|
||||
cemeteries,
|
||||
burialSiteStatuses,
|
||||
burialSiteTypes,
|
||||
burialSiteStatuses
|
||||
cemeteries,
|
||||
todayDateString: dateToString(rightNow)
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { dateToString } from '@cityssm/utils-datetime'
|
||||
import type { Request, Response } from 'express'
|
||||
|
||||
import { dateToString } from '@cityssm/utils-datetime'
|
||||
|
||||
import getCemeteries from '../../database/getCemeteries.js'
|
||||
import {
|
||||
getBurialSiteStatuses,
|
||||
|
|
@ -19,9 +20,10 @@ export default async function handler(
|
|||
|
||||
response.render('report-search', {
|
||||
headTitle: 'Reports',
|
||||
todayDateString: dateToString(rightNow),
|
||||
cemeteries,
|
||||
|
||||
burialSiteStatuses,
|
||||
burialSiteTypes,
|
||||
burialSiteStatuses
|
||||
cemeteries,
|
||||
todayDateString: dateToString(rightNow)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ export default async function handler(request, response) {
|
|||
response.render('workOrder-edit', {
|
||||
headTitle: `Work Order #${workOrder.workOrderNumber}`,
|
||||
workOrder,
|
||||
burialSiteStatuses,
|
||||
isCreate: false,
|
||||
workOrderTypes,
|
||||
workOrderMilestoneTypes,
|
||||
burialSiteStatuses
|
||||
workOrderTypes
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,10 +44,12 @@ export default async function handler(
|
|||
|
||||
response.render('workOrder-edit', {
|
||||
headTitle: `Work Order #${workOrder.workOrderNumber}`,
|
||||
|
||||
workOrder,
|
||||
|
||||
burialSiteStatuses,
|
||||
isCreate: false,
|
||||
workOrderTypes,
|
||||
workOrderMilestoneTypes,
|
||||
burialSiteStatuses
|
||||
workOrderTypes
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { dateToInteger, dateToString } from '@cityssm/utils-datetime'
|
||||
import type { Request, Response } from 'express'
|
||||
|
||||
import { dateToInteger, dateToString } from '@cityssm/utils-datetime'
|
||||
|
||||
import { getWorkOrderTypes } from '../../helpers/functions.cache.js'
|
||||
import type { WorkOrder } from '../../types/recordTypes.js'
|
||||
|
||||
|
|
@ -19,9 +20,10 @@ export default async function handler(
|
|||
|
||||
response.render('workOrder-edit', {
|
||||
headTitle: 'New Work Order',
|
||||
|
||||
workOrder,
|
||||
|
||||
isCreate: true,
|
||||
workOrderTypes
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ export default async function handler(request, response) {
|
|||
const workOrderMilestoneTypes = await getWorkOrderMilestoneTypes();
|
||||
response.render('workOrder-outlook', {
|
||||
headTitle: 'Work Order Outlook Integration',
|
||||
workOrderTypes,
|
||||
workOrderMilestoneTypes
|
||||
workOrderMilestoneTypes,
|
||||
workOrderTypes
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ export default async function handler(
|
|||
|
||||
response.render('workOrder-outlook', {
|
||||
headTitle: 'Work Order Outlook Integration',
|
||||
workOrderTypes,
|
||||
workOrderMilestoneTypes
|
||||
|
||||
workOrderMilestoneTypes,
|
||||
workOrderTypes
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ export default async function handler(request, response) {
|
|||
const workOrderTypes = await getWorkOrderTypes();
|
||||
response.render('workOrder-search', {
|
||||
headTitle: 'Work Order Search',
|
||||
workOrderTypes,
|
||||
workOrderOpenDateString
|
||||
workOrderOpenDateString,
|
||||
workOrderTypes
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ export default async function handler(
|
|||
|
||||
response.render('workOrder-search', {
|
||||
headTitle: 'Work Order Search',
|
||||
workOrderTypes,
|
||||
workOrderOpenDateString
|
||||
|
||||
workOrderOpenDateString,
|
||||
workOrderTypes
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import fs from 'node:fs/promises';
|
|||
import Debug from 'debug';
|
||||
import { DEBUG_NAMESPACE } from '../debug.config.js';
|
||||
import { getConfigProperty } from './config.helpers.js';
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:database.helpers`);
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:database.helpers:${process.pid}`);
|
||||
export const useTestDatabases = getConfigProperty('application.useTestDatabases') ||
|
||||
process.env.TEST_DATABASES === 'true';
|
||||
if (useTestDatabases) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { DEBUG_NAMESPACE } from '../debug.config.js'
|
|||
|
||||
import { getConfigProperty } from './config.helpers.js'
|
||||
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:database.helpers`)
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:database.helpers:${process.pid}`)
|
||||
|
||||
export const useTestDatabases =
|
||||
getConfigProperty('application.useTestDatabases') ||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,12 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "cross-env NODE_ENV=production node ./bin/www.js",
|
||||
"dev:test": "cross-env NODE_ENV=dev DEBUG=sunrise:*,dynamics-gp:* TEST_DATABASES=true nodemon --inspect ./bin/www.js",
|
||||
"dev:test:process": "cross-env NODE_ENV=dev DEBUG=sunrise:* TEST_DATABASES=true nodemon --inspect ./bin/wwwProcess.js",
|
||||
"dev:live": "cross-env NODE_ENV=dev DEBUG=sunrise:* nodemon --inspect ./bin/www.js",
|
||||
"dev:test": "cross-env NODE_ENV=dev DEBUG=sunrise:*,dynamics-gp:* TEST_DATABASES=true nodemon ./bin/www.js",
|
||||
"dev:test:inspect": "cross-env NODE_ENV=dev DEBUG=sunrise:*,dynamics-gp:* TEST_DATABASES=true nodemon --inspect ./bin/www.js",
|
||||
"dev:test:process": "cross-env NODE_ENV=dev DEBUG=sunrise:* TEST_DATABASES=true nodemon ./bin/wwwProcess.js",
|
||||
"dev:test:process:inspect": "cross-env NODE_ENV=dev DEBUG=sunrise:* TEST_DATABASES=true nodemon --inspect ./bin/wwwProcess.js",
|
||||
"dev:live": "cross-env NODE_ENV=dev DEBUG=sunrise:* nodemon ./bin/www.js",
|
||||
"dev:live:inspect": "cross-env NODE_ENV=dev DEBUG=sunrise:* nodemon --inspect ./bin/www.js",
|
||||
"cy:open": "cypress open --config-file cypress.config.js",
|
||||
"cy:run": "cypress run --config-file cypress.config.js",
|
||||
"cy:run:firefox": "cypress run --config-file cypress.config.js --browser firefox",
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import Debug from 'debug';
|
||||
import { Router } from 'express';
|
||||
import { DEBUG_NAMESPACE } from '../debug.config.js';
|
||||
import { authenticate, getSafeRedirectURL } from '../helpers/authentication.helpers.js';
|
||||
import { getConfigProperty } from '../helpers/config.helpers.js';
|
||||
import { useTestDatabases } from '../helpers/database.helpers.js';
|
||||
import { getApiKey } from '../helpers/functions.api.js';
|
||||
import { authenticate, getSafeRedirectURL } from '../helpers/functions.authentication.js';
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:login`);
|
||||
export const router = Router();
|
||||
function getHandler(request, response) {
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ import Debug from 'debug'
|
|||
import { type Request, type Response, Router } from 'express'
|
||||
|
||||
import { DEBUG_NAMESPACE } from '../debug.config.js'
|
||||
import { getConfigProperty } from '../helpers/config.helpers.js'
|
||||
import { useTestDatabases } from '../helpers/database.helpers.js'
|
||||
import { getApiKey } from '../helpers/functions.api.js'
|
||||
import {
|
||||
authenticate,
|
||||
getSafeRedirectURL
|
||||
} from '../helpers/functions.authentication.js'
|
||||
} from '../helpers/authentication.helpers.js'
|
||||
import { getConfigProperty } from '../helpers/config.helpers.js'
|
||||
import { useTestDatabases } from '../helpers/database.helpers.js'
|
||||
import { getApiKey } from '../helpers/functions.api.js'
|
||||
|
||||
const debug = Debug(`${DEBUG_NAMESPACE}:login`)
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ async function postHandler(
|
|||
request: Request<
|
||||
unknown,
|
||||
unknown,
|
||||
{ password: string; redirect: string; userName: string; }
|
||||
{ password: string; redirect: string; userName: string }
|
||||
>,
|
||||
response: Response
|
||||
): Promise<void> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue