Skip to content

Commit

Permalink
fix initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Jun 28, 2024
1 parent c067470 commit e45cd6b
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 10 deletions.
26 changes: 21 additions & 5 deletions helpers/initializer.database.cemetery.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Debug from 'debug';
import { lotOccupancyDB as databasePath } from '../data/databasePaths.js';
import addFeeCategory from '../database/addFeeCategory.js';
import addLotOccupantType from '../database/addLotOccupantType.js';
import addOccupancyTypeField from '../database/addOccupancyTypeField.js';
import { addRecord } from '../database/addRecord.js';
Expand Down Expand Up @@ -181,11 +182,26 @@ export async function initializeCemeteryDatabase() {
/*
* Fee Categories
*/
await addRecord('FeeCategories', 'Interment Rights', 1, user);
await addRecord('FeeCategories', 'Cremation Services', 2, user);
await addRecord('FeeCategories', 'Burial Charges', 3, user);
await addRecord('FeeCategories', 'Disinterment of Human Remains', 4, user);
await addRecord('FeeCategories', 'Additional Services', 5, user);
await addFeeCategory({
feeCategory: 'Interment Rights',
orderNumber: 1
}, user);
await addFeeCategory({
feeCategory: 'Cremation Services',
orderNumber: 2
}, user);
await addFeeCategory({
feeCategory: 'Burial Charges',
orderNumber: 3
}, user);
await addFeeCategory({
feeCategory: 'Disinterment of Human Remains',
orderNumber: 4
}, user);
await addFeeCategory({
feeCategory: 'Additional Services',
orderNumber: 5
}, user);
/*
* Work Orders
*/
Expand Down
45 changes: 40 additions & 5 deletions helpers/initializer.database.cemetery.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Debug from 'debug'

import { lotOccupancyDB as databasePath } from '../data/databasePaths.js'
import addFeeCategory from '../database/addFeeCategory.js'
import addLotOccupantType from '../database/addLotOccupantType.js'
import addOccupancyTypeField from '../database/addOccupancyTypeField.js'
import { addRecord } from '../database/addRecord.js'
Expand Down Expand Up @@ -274,11 +275,45 @@ export async function initializeCemeteryDatabase(): Promise<boolean> {
* Fee Categories
*/

await addRecord('FeeCategories', 'Interment Rights', 1, user)
await addRecord('FeeCategories', 'Cremation Services', 2, user)
await addRecord('FeeCategories', 'Burial Charges', 3, user)
await addRecord('FeeCategories', 'Disinterment of Human Remains', 4, user)
await addRecord('FeeCategories', 'Additional Services', 5, user)
await addFeeCategory(
{
feeCategory: 'Interment Rights',
orderNumber: 1
},
user
)

await addFeeCategory(
{
feeCategory: 'Cremation Services',
orderNumber: 2
},
user
)

await addFeeCategory(
{
feeCategory: 'Burial Charges',
orderNumber: 3
},
user
)

await addFeeCategory(
{
feeCategory: 'Disinterment of Human Remains',
orderNumber: 4
},
user
)

await addFeeCategory(
{
feeCategory: 'Additional Services',
orderNumber: 5
},
user
)

/*
* Work Orders
Expand Down

0 comments on commit e45cd6b

Please sign in to comment.