ensure deleted items are loaded for import

pull/11/head
Dan Gowans 2025-05-01 09:16:02 -04:00
parent 57b6dbf35e
commit 59b0fb7e5f
8 changed files with 25 additions and 22 deletions

View File

@ -1,15 +1,15 @@
import * as cacheFunctions from '../../helpers/functions.cache.js';
const inGroundBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('In-Ground Grave')
const inGroundBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('In-Ground Grave', true)
?.burialSiteTypeId;
const columbariumBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Columbarium')
const columbariumBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Columbarium', true)
?.burialSiteTypeId;
const cremationBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Crematorium')
const cremationBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Crematorium', true)
?.burialSiteTypeId;
const mausoleumBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Mausoleum')
const mausoleumBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Mausoleum', true)
?.burialSiteTypeId;
const nicheWallBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Niche Wall')
const nicheWallBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Niche Wall', true)
?.burialSiteTypeId;
const urnGardenBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Urn Garden')
const urnGardenBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Urn Garden', true)
?.burialSiteTypeId;
export function getBurialSiteTypeId(cemeteryKey) {
switch (cemeteryKey) {

View File

@ -1,27 +1,27 @@
import * as cacheFunctions from '../../helpers/functions.cache.js'
const inGroundBurialSiteTypeId =
cacheFunctions.getBurialSiteTypesByBurialSiteType('In-Ground Grave')
cacheFunctions.getBurialSiteTypesByBurialSiteType('In-Ground Grave', true)
?.burialSiteTypeId as number
const columbariumBurialSiteTypeId =
cacheFunctions.getBurialSiteTypesByBurialSiteType('Columbarium')
cacheFunctions.getBurialSiteTypesByBurialSiteType('Columbarium', true)
?.burialSiteTypeId as number
const cremationBurialSiteTypeId =
cacheFunctions.getBurialSiteTypesByBurialSiteType('Crematorium')
cacheFunctions.getBurialSiteTypesByBurialSiteType('Crematorium', true)
?.burialSiteTypeId as number
const mausoleumBurialSiteTypeId =
cacheFunctions.getBurialSiteTypesByBurialSiteType('Mausoleum')
cacheFunctions.getBurialSiteTypesByBurialSiteType('Mausoleum', true)
?.burialSiteTypeId as number
const nicheWallBurialSiteTypeId =
cacheFunctions.getBurialSiteTypesByBurialSiteType('Niche Wall')
cacheFunctions.getBurialSiteTypesByBurialSiteType('Niche Wall', true)
?.burialSiteTypeId as number
const urnGardenBurialSiteTypeId =
cacheFunctions.getBurialSiteTypesByBurialSiteType('Urn Garden')
cacheFunctions.getBurialSiteTypesByBurialSiteType('Urn Garden', true)
?.burialSiteTypeId as number
export function getBurialSiteTypeId(cemeteryKey: string): number {

View File

@ -8,7 +8,7 @@ export function getCommittalTypeIdByKey(committalTypeKey, user) {
committalType: committalTypeKey,
committalTypeKey
}, user);
committalTypes = getCommittalTypes();
committalTypes = getCommittalTypes(true);
return committalTypeId;
}
return committalType.committalTypeId;

View File

@ -20,7 +20,7 @@ export function getCommittalTypeIdByKey(
user
)
committalTypes = getCommittalTypes()
committalTypes = getCommittalTypes(true)
return committalTypeId
}

View File

@ -25,11 +25,11 @@ export function getFeeIdByFeeDescription(feeDescription, user) {
if (feeId === undefined) {
feeId = addFee({
feeName: feeDescription.slice(9),
feeDescription,
feeCategoryId,
feeAccount: '',
feeCategoryId,
feeDescription,
burialSiteTypeId: '',
contractTypeId: '',
burialSiteTypeId: ''
}, user);
feeCache.set(feeDescription, feeId);
}

View File

@ -24,6 +24,7 @@ export function getFeeIdByFeeDescription(
)
.all() as Array<{
feeId: number
feeCategoryId: number
feeDescription: string
}>
@ -45,11 +46,13 @@ export function getFeeIdByFeeDescription(
feeId = addFee(
{
feeName: feeDescription.slice(9),
feeDescription,
feeCategoryId,
feeAccount: '',
feeCategoryId,
feeDescription,
burialSiteTypeId: '',
contractTypeId: '',
burialSiteTypeId: ''
},
user
)

View File

@ -1,6 +1,6 @@
import addIntermentContainerType from '../../database/addIntermentContainerType.js';
import getIntermentContainerTypes from '../../database/getIntermentContainerTypes.js';
let intermentContainerTypes = getIntermentContainerTypes();
let intermentContainerTypes = getIntermentContainerTypes(true);
export function getIntermentContainerTypeIdByKey(intermentContainerTypeKey, user) {
const intermentContainerType = intermentContainerTypes.find((intermentContainerType) => intermentContainerType.intermentContainerTypeKey ===
intermentContainerTypeKey);

View File

@ -1,7 +1,7 @@
import addIntermentContainerType from '../../database/addIntermentContainerType.js'
import getIntermentContainerTypes from '../../database/getIntermentContainerTypes.js'
let intermentContainerTypes = getIntermentContainerTypes()
let intermentContainerTypes = getIntermentContainerTypes(true)
export function getIntermentContainerTypeIdByKey(
intermentContainerTypeKey: string,