diff --git a/temp/legacyImportFromCsv/data.burialSiteTypes.js b/temp/legacyImportFromCsv/data.burialSiteTypes.js index 6207a1a5..43b5c48a 100644 --- a/temp/legacyImportFromCsv/data.burialSiteTypes.js +++ b/temp/legacyImportFromCsv/data.burialSiteTypes.js @@ -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) { diff --git a/temp/legacyImportFromCsv/data.burialSiteTypes.ts b/temp/legacyImportFromCsv/data.burialSiteTypes.ts index bd18e6d8..3d3d87f2 100644 --- a/temp/legacyImportFromCsv/data.burialSiteTypes.ts +++ b/temp/legacyImportFromCsv/data.burialSiteTypes.ts @@ -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 { diff --git a/temp/legacyImportFromCsv/data.committalTypes.js b/temp/legacyImportFromCsv/data.committalTypes.js index d3ccbb71..14899e99 100644 --- a/temp/legacyImportFromCsv/data.committalTypes.js +++ b/temp/legacyImportFromCsv/data.committalTypes.js @@ -8,7 +8,7 @@ export function getCommittalTypeIdByKey(committalTypeKey, user) { committalType: committalTypeKey, committalTypeKey }, user); - committalTypes = getCommittalTypes(); + committalTypes = getCommittalTypes(true); return committalTypeId; } return committalType.committalTypeId; diff --git a/temp/legacyImportFromCsv/data.committalTypes.ts b/temp/legacyImportFromCsv/data.committalTypes.ts index 13c5e72c..16c22c3c 100644 --- a/temp/legacyImportFromCsv/data.committalTypes.ts +++ b/temp/legacyImportFromCsv/data.committalTypes.ts @@ -20,7 +20,7 @@ export function getCommittalTypeIdByKey( user ) - committalTypes = getCommittalTypes() + committalTypes = getCommittalTypes(true) return committalTypeId } diff --git a/temp/legacyImportFromCsv/data.fees.js b/temp/legacyImportFromCsv/data.fees.js index b739836a..12b26c25 100644 --- a/temp/legacyImportFromCsv/data.fees.js +++ b/temp/legacyImportFromCsv/data.fees.js @@ -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); } diff --git a/temp/legacyImportFromCsv/data.fees.ts b/temp/legacyImportFromCsv/data.fees.ts index 80af2a04..33c99f54 100644 --- a/temp/legacyImportFromCsv/data.fees.ts +++ b/temp/legacyImportFromCsv/data.fees.ts @@ -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 ) diff --git a/temp/legacyImportFromCsv/data.intermentContainerTypes.js b/temp/legacyImportFromCsv/data.intermentContainerTypes.js index f66286f2..f3db73ce 100644 --- a/temp/legacyImportFromCsv/data.intermentContainerTypes.js +++ b/temp/legacyImportFromCsv/data.intermentContainerTypes.js @@ -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); diff --git a/temp/legacyImportFromCsv/data.intermentContainerTypes.ts b/temp/legacyImportFromCsv/data.intermentContainerTypes.ts index 71bc525d..71680bf0 100644 --- a/temp/legacyImportFromCsv/data.intermentContainerTypes.ts +++ b/temp/legacyImportFromCsv/data.intermentContainerTypes.ts @@ -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,