ensure deleted items are loaded for import
parent
57b6dbf35e
commit
59b0fb7e5f
|
|
@ -1,15 +1,15 @@
|
||||||
import * as cacheFunctions from '../../helpers/functions.cache.js';
|
import * as cacheFunctions from '../../helpers/functions.cache.js';
|
||||||
const inGroundBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('In-Ground Grave')
|
const inGroundBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('In-Ground Grave', true)
|
||||||
?.burialSiteTypeId;
|
?.burialSiteTypeId;
|
||||||
const columbariumBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Columbarium')
|
const columbariumBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Columbarium', true)
|
||||||
?.burialSiteTypeId;
|
?.burialSiteTypeId;
|
||||||
const cremationBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Crematorium')
|
const cremationBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Crematorium', true)
|
||||||
?.burialSiteTypeId;
|
?.burialSiteTypeId;
|
||||||
const mausoleumBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Mausoleum')
|
const mausoleumBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Mausoleum', true)
|
||||||
?.burialSiteTypeId;
|
?.burialSiteTypeId;
|
||||||
const nicheWallBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Niche Wall')
|
const nicheWallBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Niche Wall', true)
|
||||||
?.burialSiteTypeId;
|
?.burialSiteTypeId;
|
||||||
const urnGardenBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Urn Garden')
|
const urnGardenBurialSiteTypeId = cacheFunctions.getBurialSiteTypesByBurialSiteType('Urn Garden', true)
|
||||||
?.burialSiteTypeId;
|
?.burialSiteTypeId;
|
||||||
export function getBurialSiteTypeId(cemeteryKey) {
|
export function getBurialSiteTypeId(cemeteryKey) {
|
||||||
switch (cemeteryKey) {
|
switch (cemeteryKey) {
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,27 @@
|
||||||
import * as cacheFunctions from '../../helpers/functions.cache.js'
|
import * as cacheFunctions from '../../helpers/functions.cache.js'
|
||||||
|
|
||||||
const inGroundBurialSiteTypeId =
|
const inGroundBurialSiteTypeId =
|
||||||
cacheFunctions.getBurialSiteTypesByBurialSiteType('In-Ground Grave')
|
cacheFunctions.getBurialSiteTypesByBurialSiteType('In-Ground Grave', true)
|
||||||
?.burialSiteTypeId as number
|
?.burialSiteTypeId as number
|
||||||
|
|
||||||
const columbariumBurialSiteTypeId =
|
const columbariumBurialSiteTypeId =
|
||||||
cacheFunctions.getBurialSiteTypesByBurialSiteType('Columbarium')
|
cacheFunctions.getBurialSiteTypesByBurialSiteType('Columbarium', true)
|
||||||
?.burialSiteTypeId as number
|
?.burialSiteTypeId as number
|
||||||
|
|
||||||
const cremationBurialSiteTypeId =
|
const cremationBurialSiteTypeId =
|
||||||
cacheFunctions.getBurialSiteTypesByBurialSiteType('Crematorium')
|
cacheFunctions.getBurialSiteTypesByBurialSiteType('Crematorium', true)
|
||||||
?.burialSiteTypeId as number
|
?.burialSiteTypeId as number
|
||||||
|
|
||||||
const mausoleumBurialSiteTypeId =
|
const mausoleumBurialSiteTypeId =
|
||||||
cacheFunctions.getBurialSiteTypesByBurialSiteType('Mausoleum')
|
cacheFunctions.getBurialSiteTypesByBurialSiteType('Mausoleum', true)
|
||||||
?.burialSiteTypeId as number
|
?.burialSiteTypeId as number
|
||||||
|
|
||||||
const nicheWallBurialSiteTypeId =
|
const nicheWallBurialSiteTypeId =
|
||||||
cacheFunctions.getBurialSiteTypesByBurialSiteType('Niche Wall')
|
cacheFunctions.getBurialSiteTypesByBurialSiteType('Niche Wall', true)
|
||||||
?.burialSiteTypeId as number
|
?.burialSiteTypeId as number
|
||||||
|
|
||||||
const urnGardenBurialSiteTypeId =
|
const urnGardenBurialSiteTypeId =
|
||||||
cacheFunctions.getBurialSiteTypesByBurialSiteType('Urn Garden')
|
cacheFunctions.getBurialSiteTypesByBurialSiteType('Urn Garden', true)
|
||||||
?.burialSiteTypeId as number
|
?.burialSiteTypeId as number
|
||||||
|
|
||||||
export function getBurialSiteTypeId(cemeteryKey: string): number {
|
export function getBurialSiteTypeId(cemeteryKey: string): number {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export function getCommittalTypeIdByKey(committalTypeKey, user) {
|
||||||
committalType: committalTypeKey,
|
committalType: committalTypeKey,
|
||||||
committalTypeKey
|
committalTypeKey
|
||||||
}, user);
|
}, user);
|
||||||
committalTypes = getCommittalTypes();
|
committalTypes = getCommittalTypes(true);
|
||||||
return committalTypeId;
|
return committalTypeId;
|
||||||
}
|
}
|
||||||
return committalType.committalTypeId;
|
return committalType.committalTypeId;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export function getCommittalTypeIdByKey(
|
||||||
user
|
user
|
||||||
)
|
)
|
||||||
|
|
||||||
committalTypes = getCommittalTypes()
|
committalTypes = getCommittalTypes(true)
|
||||||
|
|
||||||
return committalTypeId
|
return committalTypeId
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@ export function getFeeIdByFeeDescription(feeDescription, user) {
|
||||||
if (feeId === undefined) {
|
if (feeId === undefined) {
|
||||||
feeId = addFee({
|
feeId = addFee({
|
||||||
feeName: feeDescription.slice(9),
|
feeName: feeDescription.slice(9),
|
||||||
feeDescription,
|
|
||||||
feeCategoryId,
|
|
||||||
feeAccount: '',
|
feeAccount: '',
|
||||||
|
feeCategoryId,
|
||||||
|
feeDescription,
|
||||||
|
burialSiteTypeId: '',
|
||||||
contractTypeId: '',
|
contractTypeId: '',
|
||||||
burialSiteTypeId: ''
|
|
||||||
}, user);
|
}, user);
|
||||||
feeCache.set(feeDescription, feeId);
|
feeCache.set(feeDescription, feeId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ export function getFeeIdByFeeDescription(
|
||||||
)
|
)
|
||||||
.all() as Array<{
|
.all() as Array<{
|
||||||
feeId: number
|
feeId: number
|
||||||
|
|
||||||
feeCategoryId: number
|
feeCategoryId: number
|
||||||
feeDescription: string
|
feeDescription: string
|
||||||
}>
|
}>
|
||||||
|
|
@ -45,11 +46,13 @@ export function getFeeIdByFeeDescription(
|
||||||
feeId = addFee(
|
feeId = addFee(
|
||||||
{
|
{
|
||||||
feeName: feeDescription.slice(9),
|
feeName: feeDescription.slice(9),
|
||||||
feeDescription,
|
|
||||||
feeCategoryId,
|
|
||||||
feeAccount: '',
|
feeAccount: '',
|
||||||
|
feeCategoryId,
|
||||||
|
feeDescription,
|
||||||
|
|
||||||
|
burialSiteTypeId: '',
|
||||||
contractTypeId: '',
|
contractTypeId: '',
|
||||||
burialSiteTypeId: ''
|
|
||||||
},
|
},
|
||||||
user
|
user
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import addIntermentContainerType from '../../database/addIntermentContainerType.js';
|
import addIntermentContainerType from '../../database/addIntermentContainerType.js';
|
||||||
import getIntermentContainerTypes from '../../database/getIntermentContainerTypes.js';
|
import getIntermentContainerTypes from '../../database/getIntermentContainerTypes.js';
|
||||||
let intermentContainerTypes = getIntermentContainerTypes();
|
let intermentContainerTypes = getIntermentContainerTypes(true);
|
||||||
export function getIntermentContainerTypeIdByKey(intermentContainerTypeKey, user) {
|
export function getIntermentContainerTypeIdByKey(intermentContainerTypeKey, user) {
|
||||||
const intermentContainerType = intermentContainerTypes.find((intermentContainerType) => intermentContainerType.intermentContainerTypeKey ===
|
const intermentContainerType = intermentContainerTypes.find((intermentContainerType) => intermentContainerType.intermentContainerTypeKey ===
|
||||||
intermentContainerTypeKey);
|
intermentContainerTypeKey);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import addIntermentContainerType from '../../database/addIntermentContainerType.js'
|
import addIntermentContainerType from '../../database/addIntermentContainerType.js'
|
||||||
import getIntermentContainerTypes from '../../database/getIntermentContainerTypes.js'
|
import getIntermentContainerTypes from '../../database/getIntermentContainerTypes.js'
|
||||||
|
|
||||||
let intermentContainerTypes = getIntermentContainerTypes()
|
let intermentContainerTypes = getIntermentContainerTypes(true)
|
||||||
|
|
||||||
export function getIntermentContainerTypeIdByKey(
|
export function getIntermentContainerTypeIdByKey(
|
||||||
intermentContainerTypeKey: string,
|
intermentContainerTypeKey: string,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue