From 056f30a249c444036cfb4903684bb4d033b03d68 Mon Sep 17 00:00:00 2001 From: Dan Gowans Date: Wed, 5 Oct 2022 15:10:12 -0400 Subject: [PATCH] rename default lot occupant type --- helpers/initializer.database.cemetery.js | 2 +- helpers/initializer.database.cemetery.ts | 2 +- temp/legacy.importFromCSV.js | 6 +++--- temp/legacy.importFromCSV.ts | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/helpers/initializer.database.cemetery.js b/helpers/initializer.database.cemetery.js index c1313213..42d88ccc 100644 --- a/helpers/initializer.database.cemetery.js +++ b/helpers/initializer.database.cemetery.js @@ -72,7 +72,7 @@ const initializeCemeteryDatabase = () => { orderNumber: 2 }, session); addLotOccupantType({ - lotOccupantType: "Arranger", + lotOccupantType: "Purchaser", orderNumber: 3 }, session); addOccupancyType({ diff --git a/helpers/initializer.database.cemetery.ts b/helpers/initializer.database.cemetery.ts index 2416c78b..1f223f7e 100644 --- a/helpers/initializer.database.cemetery.ts +++ b/helpers/initializer.database.cemetery.ts @@ -151,7 +151,7 @@ const initializeCemeteryDatabase = () => { addLotOccupantType( { - lotOccupantType: "Arranger", + lotOccupantType: "Purchaser", orderNumber: 3 }, session diff --git a/temp/legacy.importFromCSV.js b/temp/legacy.importFromCSV.js index 7ed1e154..78c78f91 100644 --- a/temp/legacy.importFromCSV.js +++ b/temp/legacy.importFromCSV.js @@ -122,7 +122,7 @@ function getFeeIdByFeeDescription(feeDescription) { readonly: true }); const records = database - .prepare("select feeId, feeDescription from Fees" + " where feeDescription like 'CMPP_FEE_%'") + .prepare("select feeId, feeDescription from Fees where feeDescription like 'CMPP_FEE_%'") .all(); for (const record of records) { feeCache.set(record.feeDescription, record.feeId); @@ -182,7 +182,7 @@ const cremationOccupancyType = cacheFunctions.getOccupancyTypeByOccupancyType("C const allOccupancyTypeFields = cacheFunctions.getAllOccupancyTypeFields(); const preneedOwnerLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Preneed Owner"); const deceasedLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Deceased"); -const arrangerLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Arranger"); +const purchaserLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Purchaser"); const acknowledgedWorkOrderMilestoneType = cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Acknowledged"); const deathWorkOrderMilestoneType = cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Death"); const funeralWorkOrderMilestoneType = cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Funeral"); @@ -520,7 +520,7 @@ function importFromPrepaidCSV() { if (prepaidRow.CMPP_ARRANGED_BY_NAME) { addLotOccupancyOccupant({ lotOccupancyId, - lotOccupantTypeId: arrangerLotOccupantType.lotOccupantTypeId, + lotOccupantTypeId: purchaserLotOccupantType.lotOccupantTypeId, occupantName: prepaidRow.CMPP_ARRANGED_BY_NAME, occupantAddress1: "", occupantAddress2: "", diff --git a/temp/legacy.importFromCSV.ts b/temp/legacy.importFromCSV.ts index c29dd590..7dfa3c83 100644 --- a/temp/legacy.importFromCSV.ts +++ b/temp/legacy.importFromCSV.ts @@ -333,7 +333,7 @@ function getFeeIdByFeeDescription(feeDescription: string) { feeDescription: string; }[] = database .prepare( - "select feeId, feeDescription from Fees" + " where feeDescription like 'CMPP_FEE_%'" + "select feeId, feeDescription from Fees where feeDescription like 'CMPP_FEE_%'" ) .all(); @@ -418,7 +418,7 @@ const allOccupancyTypeFields = cacheFunctions.getAllOccupancyTypeFields(); const preneedOwnerLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Preneed Owner"); const deceasedLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Deceased"); -const arrangerLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Arranger"); +const purchaserLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Purchaser"); const acknowledgedWorkOrderMilestoneType = cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Acknowledged"); @@ -957,7 +957,7 @@ function importFromPrepaidCSV() { addLotOccupancyOccupant( { lotOccupancyId, - lotOccupantTypeId: arrangerLotOccupantType.lotOccupantTypeId, + lotOccupantTypeId: purchaserLotOccupantType.lotOccupantTypeId, occupantName: prepaidRow.CMPP_ARRANGED_BY_NAME, occupantAddress1: "", occupantAddress2: "",