rename default lot occupant type

deepsource-autofix-76c6eb20
Dan Gowans 2022-10-05 15:10:12 -04:00
parent c117cc84e4
commit 056f30a249
4 changed files with 8 additions and 8 deletions

View File

@ -72,7 +72,7 @@ const initializeCemeteryDatabase = () => {
orderNumber: 2 orderNumber: 2
}, session); }, session);
addLotOccupantType({ addLotOccupantType({
lotOccupantType: "Arranger", lotOccupantType: "Purchaser",
orderNumber: 3 orderNumber: 3
}, session); }, session);
addOccupancyType({ addOccupancyType({

View File

@ -151,7 +151,7 @@ const initializeCemeteryDatabase = () => {
addLotOccupantType( addLotOccupantType(
{ {
lotOccupantType: "Arranger", lotOccupantType: "Purchaser",
orderNumber: 3 orderNumber: 3
}, },
session session

View File

@ -122,7 +122,7 @@ function getFeeIdByFeeDescription(feeDescription) {
readonly: true readonly: true
}); });
const records = database 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(); .all();
for (const record of records) { for (const record of records) {
feeCache.set(record.feeDescription, record.feeId); feeCache.set(record.feeDescription, record.feeId);
@ -182,7 +182,7 @@ const cremationOccupancyType = cacheFunctions.getOccupancyTypeByOccupancyType("C
const allOccupancyTypeFields = cacheFunctions.getAllOccupancyTypeFields(); const allOccupancyTypeFields = cacheFunctions.getAllOccupancyTypeFields();
const preneedOwnerLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Preneed Owner"); const preneedOwnerLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Preneed Owner");
const deceasedLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Deceased"); const deceasedLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Deceased");
const arrangerLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Arranger"); const purchaserLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Purchaser");
const acknowledgedWorkOrderMilestoneType = cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Acknowledged"); const acknowledgedWorkOrderMilestoneType = cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Acknowledged");
const deathWorkOrderMilestoneType = cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Death"); const deathWorkOrderMilestoneType = cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Death");
const funeralWorkOrderMilestoneType = cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Funeral"); const funeralWorkOrderMilestoneType = cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Funeral");
@ -520,7 +520,7 @@ function importFromPrepaidCSV() {
if (prepaidRow.CMPP_ARRANGED_BY_NAME) { if (prepaidRow.CMPP_ARRANGED_BY_NAME) {
addLotOccupancyOccupant({ addLotOccupancyOccupant({
lotOccupancyId, lotOccupancyId,
lotOccupantTypeId: arrangerLotOccupantType.lotOccupantTypeId, lotOccupantTypeId: purchaserLotOccupantType.lotOccupantTypeId,
occupantName: prepaidRow.CMPP_ARRANGED_BY_NAME, occupantName: prepaidRow.CMPP_ARRANGED_BY_NAME,
occupantAddress1: "", occupantAddress1: "",
occupantAddress2: "", occupantAddress2: "",

View File

@ -333,7 +333,7 @@ function getFeeIdByFeeDescription(feeDescription: string) {
feeDescription: string; feeDescription: string;
}[] = database }[] = database
.prepare( .prepare(
"select feeId, feeDescription from Fees" + " where feeDescription like 'CMPP_FEE_%'" "select feeId, feeDescription from Fees where feeDescription like 'CMPP_FEE_%'"
) )
.all(); .all();
@ -418,7 +418,7 @@ const allOccupancyTypeFields = cacheFunctions.getAllOccupancyTypeFields();
const preneedOwnerLotOccupantType = const preneedOwnerLotOccupantType =
cacheFunctions.getLotOccupantTypesByLotOccupantType("Preneed Owner"); cacheFunctions.getLotOccupantTypesByLotOccupantType("Preneed Owner");
const deceasedLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Deceased"); const deceasedLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Deceased");
const arrangerLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Arranger"); const purchaserLotOccupantType = cacheFunctions.getLotOccupantTypesByLotOccupantType("Purchaser");
const acknowledgedWorkOrderMilestoneType = const acknowledgedWorkOrderMilestoneType =
cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Acknowledged"); cacheFunctions.getWorkOrderMilestoneTypeByWorkOrderMilestoneType("Acknowledged");
@ -957,7 +957,7 @@ function importFromPrepaidCSV() {
addLotOccupancyOccupant( addLotOccupancyOccupant(
{ {
lotOccupancyId, lotOccupancyId,
lotOccupantTypeId: arrangerLotOccupantType.lotOccupantTypeId, lotOccupantTypeId: purchaserLotOccupantType.lotOccupantTypeId,
occupantName: prepaidRow.CMPP_ARRANGED_BY_NAME, occupantName: prepaidRow.CMPP_ARRANGED_BY_NAME,
occupantAddress1: "", occupantAddress1: "",
occupantAddress2: "", occupantAddress2: "",