development
parent
ea41b0e5e7
commit
5b56d14321
4
app.js
4
app.js
|
|
@ -20,10 +20,10 @@ import * as dateTimeFns from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||||
import * as stringFns from "@cityssm/expressjs-server-js/stringFns.js";
|
import * as stringFns from "@cityssm/expressjs-server-js/stringFns.js";
|
||||||
import * as htmlFns from "@cityssm/expressjs-server-js/htmlFns.js";
|
import * as htmlFns from "@cityssm/expressjs-server-js/htmlFns.js";
|
||||||
import { version } from "./version.js";
|
import { version } from "./version.js";
|
||||||
import * as databaseInitializer from "./helpers/databaseInitializer.js";
|
import * as databaseInitializer from "./helpers/initializer.database.js";
|
||||||
import debug from "debug";
|
import debug from "debug";
|
||||||
const debugApp = debug("lot-occupancy-system:app");
|
const debugApp = debug("lot-occupancy-system:app");
|
||||||
databaseInitializer.initLotOccupancyDB();
|
databaseInitializer.initializeDatabase();
|
||||||
const __dirname = ".";
|
const __dirname = ".";
|
||||||
export const app = express();
|
export const app = express();
|
||||||
if (!configFunctions.getProperty("reverseProxy.disableEtag")) {
|
if (!configFunctions.getProperty("reverseProxy.disableEtag")) {
|
||||||
|
|
|
||||||
4
app.ts
4
app.ts
|
|
@ -25,7 +25,7 @@ import * as stringFns from "@cityssm/expressjs-server-js/stringFns.js";
|
||||||
import * as htmlFns from "@cityssm/expressjs-server-js/htmlFns.js";
|
import * as htmlFns from "@cityssm/expressjs-server-js/htmlFns.js";
|
||||||
import { version } from "./version.js";
|
import { version } from "./version.js";
|
||||||
|
|
||||||
import * as databaseInitializer from "./helpers/databaseInitializer.js";
|
import * as databaseInitializer from "./helpers/initializer.database.js";
|
||||||
|
|
||||||
import debug from "debug";
|
import debug from "debug";
|
||||||
const debugApp = debug("lot-occupancy-system:app");
|
const debugApp = debug("lot-occupancy-system:app");
|
||||||
|
|
@ -36,7 +36,7 @@ const debugApp = debug("lot-occupancy-system:app");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
databaseInitializer.initLotOccupancyDB();
|
databaseInitializer.initializeDatabase();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export declare const initLotOccupancyDB: () => boolean;
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
export {};
|
||||||
|
|
@ -0,0 +1,151 @@
|
||||||
|
import { lotOccupancyDB as databasePath } from "../data/databasePaths.js";
|
||||||
|
import { initializeDatabase } from "./initializer.database.js";
|
||||||
|
import addLotType from "./lotOccupancyDB/addLotType.js";
|
||||||
|
import Debug from "debug";
|
||||||
|
import addOccupancyType from "./lotOccupancyDB/addOccupancyType.js";
|
||||||
|
import addOccupancyTypeField from "./lotOccupancyDB/addOccupancyTypeField.js";
|
||||||
|
import addLotStatus from "./lotOccupancyDB/addLotStatus.js";
|
||||||
|
import addLotOccupantType from "./lotOccupancyDB/addLotOccupantType.js";
|
||||||
|
const debug = Debug("lot-occupancy-system:initialize");
|
||||||
|
const session = {
|
||||||
|
user: {
|
||||||
|
userName: "init.cemetery",
|
||||||
|
userProperties: {
|
||||||
|
canUpdate: true,
|
||||||
|
isAdmin: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const initializeCemeteryDatabase = () => {
|
||||||
|
debug("Checking for " + databasePath + "...");
|
||||||
|
const databaseInitialized = initializeDatabase();
|
||||||
|
if (!databaseInitialized) {
|
||||||
|
debug("Database already created.\n" +
|
||||||
|
"To initialize this database with cemetery types, delete the database file first, then rerun this script.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
debug("New database file created. Proceeding with initialization.");
|
||||||
|
addLotType({
|
||||||
|
lotType: "Casket Grave",
|
||||||
|
orderNumber: 1
|
||||||
|
}, session);
|
||||||
|
addLotType({
|
||||||
|
lotType: "Columbarium",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
addLotType({
|
||||||
|
lotType: "Mausoleum",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
addLotType({
|
||||||
|
lotType: "Niche Wall",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
addLotType({
|
||||||
|
lotType: "Urn Garden",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
addLotType({
|
||||||
|
lotType: "Crematorium",
|
||||||
|
orderNumber: 3
|
||||||
|
}, session);
|
||||||
|
addLotStatus({
|
||||||
|
lotStatus: "Available",
|
||||||
|
orderNumber: 1
|
||||||
|
}, session);
|
||||||
|
addLotStatus({
|
||||||
|
lotStatus: "Reserved",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
addLotStatus({
|
||||||
|
lotStatus: "Taken",
|
||||||
|
orderNumber: 3
|
||||||
|
}, session);
|
||||||
|
addLotOccupantType({
|
||||||
|
lotOccupantType: "Deceased",
|
||||||
|
orderNumber: 1
|
||||||
|
}, session);
|
||||||
|
addLotOccupantType({
|
||||||
|
lotOccupantType: "Preneed Owner",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
addOccupancyType({
|
||||||
|
occupancyType: "Preneed",
|
||||||
|
orderNumber: 1
|
||||||
|
}, session);
|
||||||
|
const intermentOccupancyTypeId = addOccupancyType({
|
||||||
|
occupancyType: "Interment",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Death Date",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "\\d{4}([\\/-]\\d{2}){2}",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 10,
|
||||||
|
maximumLength: 10,
|
||||||
|
orderNumber: 1
|
||||||
|
}, session);
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Death Age",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "\\d+",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 1,
|
||||||
|
maximumLength: 3,
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Death Age Period",
|
||||||
|
occupancyTypeFieldValues: "Years,Months,Days,Stillborn",
|
||||||
|
pattern: "",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 1,
|
||||||
|
maximumLength: 10,
|
||||||
|
orderNumber: 3
|
||||||
|
}, session);
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Funeral Home",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 1,
|
||||||
|
maximumLength: 100,
|
||||||
|
orderNumber: 10
|
||||||
|
}, session);
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Funeral Date",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "\\d{4}([\\/-]\\d{2}){2}",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 10,
|
||||||
|
maximumLength: 10,
|
||||||
|
orderNumber: 11
|
||||||
|
}, session);
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Container Type",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 1,
|
||||||
|
maximumLength: 100,
|
||||||
|
orderNumber: 20
|
||||||
|
}, session);
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Committal Type",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 1,
|
||||||
|
maximumLength: 100,
|
||||||
|
orderNumber: 21
|
||||||
|
}, session);
|
||||||
|
};
|
||||||
|
initializeCemeteryDatabase();
|
||||||
|
|
@ -0,0 +1,212 @@
|
||||||
|
import {
|
||||||
|
lotOccupancyDB as databasePath
|
||||||
|
} from "../data/databasePaths.js";
|
||||||
|
|
||||||
|
import {
|
||||||
|
initializeDatabase
|
||||||
|
} from "./initializer.database.js";
|
||||||
|
|
||||||
|
import addLotType from "./lotOccupancyDB/addLotType.js";
|
||||||
|
|
||||||
|
import type {
|
||||||
|
PartialSession
|
||||||
|
} from "../types/recordTypes.js";
|
||||||
|
|
||||||
|
import Debug from "debug";
|
||||||
|
import addOccupancyType from "./lotOccupancyDB/addOccupancyType.js";
|
||||||
|
import addOccupancyTypeField from "./lotOccupancyDB/addOccupancyTypeField.js";
|
||||||
|
import addLotStatus from "./lotOccupancyDB/addLotStatus.js";
|
||||||
|
import addLotOccupantType from "./lotOccupancyDB/addLotOccupantType.js";
|
||||||
|
const debug = Debug("lot-occupancy-system:initialize");
|
||||||
|
|
||||||
|
|
||||||
|
const session: PartialSession = {
|
||||||
|
user: {
|
||||||
|
userName: "init.cemetery",
|
||||||
|
userProperties: {
|
||||||
|
canUpdate: true,
|
||||||
|
isAdmin: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const initializeCemeteryDatabase = () => {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ensure database does not already exist
|
||||||
|
*/
|
||||||
|
|
||||||
|
debug("Checking for " + databasePath + "...");
|
||||||
|
|
||||||
|
const databaseInitialized = initializeDatabase();
|
||||||
|
|
||||||
|
if (!databaseInitialized) {
|
||||||
|
debug("Database already created.\n" +
|
||||||
|
"To initialize this database with cemetery types, delete the database file first, then rerun this script.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
debug("New database file created. Proceeding with initialization.");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Lot Types
|
||||||
|
*/
|
||||||
|
|
||||||
|
addLotType({
|
||||||
|
lotType: "Casket Grave",
|
||||||
|
orderNumber: 1
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addLotType({
|
||||||
|
lotType: "Columbarium",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addLotType({
|
||||||
|
lotType: "Mausoleum",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addLotType({
|
||||||
|
lotType: "Niche Wall",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addLotType({
|
||||||
|
lotType: "Urn Garden",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addLotType({
|
||||||
|
lotType: "Crematorium",
|
||||||
|
orderNumber: 3
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Lot Statuses
|
||||||
|
*/
|
||||||
|
|
||||||
|
addLotStatus({
|
||||||
|
lotStatus: "Available",
|
||||||
|
orderNumber: 1
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addLotStatus({
|
||||||
|
lotStatus: "Reserved",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addLotStatus({
|
||||||
|
lotStatus: "Taken",
|
||||||
|
orderNumber: 3
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Lot Occupant Types
|
||||||
|
*/
|
||||||
|
|
||||||
|
addLotOccupantType({
|
||||||
|
lotOccupantType: "Deceased",
|
||||||
|
orderNumber: 1
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addLotOccupantType({
|
||||||
|
lotOccupantType: "Preneed Owner",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Occupancy Types
|
||||||
|
*/
|
||||||
|
|
||||||
|
addOccupancyType({
|
||||||
|
occupancyType: "Preneed",
|
||||||
|
orderNumber: 1
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
const intermentOccupancyTypeId = addOccupancyType({
|
||||||
|
occupancyType: "Interment",
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Death Date",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "\\d{4}([\\/-]\\d{2}){2}",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 10,
|
||||||
|
maximumLength: 10,
|
||||||
|
orderNumber: 1
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Death Age",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "\\d+",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 1,
|
||||||
|
maximumLength: 3,
|
||||||
|
orderNumber: 2
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Death Age Period",
|
||||||
|
occupancyTypeFieldValues: "Years,Months,Days,Stillborn",
|
||||||
|
pattern: "",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 1,
|
||||||
|
maximumLength: 10,
|
||||||
|
orderNumber: 3
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Funeral Home",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 1,
|
||||||
|
maximumLength: 100,
|
||||||
|
orderNumber: 10
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Funeral Date",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "\\d{4}([\\/-]\\d{2}){2}",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 10,
|
||||||
|
maximumLength: 10,
|
||||||
|
orderNumber: 11
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Container Type",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 1,
|
||||||
|
maximumLength: 100,
|
||||||
|
orderNumber: 20
|
||||||
|
}, session);
|
||||||
|
|
||||||
|
addOccupancyTypeField({
|
||||||
|
occupancyTypeId: intermentOccupancyTypeId,
|
||||||
|
occupancyTypeField: "Committal Type",
|
||||||
|
occupancyTypeFieldValues: "",
|
||||||
|
pattern: "",
|
||||||
|
isRequired: "",
|
||||||
|
minimumLength: 1,
|
||||||
|
maximumLength: 100,
|
||||||
|
orderNumber: 21
|
||||||
|
}, session);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
initializeCemeteryDatabase();
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
export declare const initializeDatabase: () => boolean;
|
||||||
|
|
@ -8,7 +8,7 @@ const recordColumns = " recordCreate_userName varchar(30) not null," +
|
||||||
" recordUpdate_timeMillis integer not null," +
|
" recordUpdate_timeMillis integer not null," +
|
||||||
" recordDelete_userName varchar(30)," +
|
" recordDelete_userName varchar(30)," +
|
||||||
" recordDelete_timeMillis integer";
|
" recordDelete_timeMillis integer";
|
||||||
export const initLotOccupancyDB = () => {
|
export const initializeDatabase = () => {
|
||||||
const lotOccupancyDB = sqlite(databasePath);
|
const lotOccupancyDB = sqlite(databasePath);
|
||||||
const row = lotOccupancyDB
|
const row = lotOccupancyDB
|
||||||
.prepare("select name from sqlite_master where type = 'table' and name = 'Fees'")
|
.prepare("select name from sqlite_master where type = 'table' and name = 'Fees'")
|
||||||
|
|
@ -15,7 +15,8 @@ const recordColumns = " recordCreate_userName varchar(30) not null," +
|
||||||
" recordDelete_userName varchar(30)," +
|
" recordDelete_userName varchar(30)," +
|
||||||
" recordDelete_timeMillis integer";
|
" recordDelete_timeMillis integer";
|
||||||
|
|
||||||
export const initLotOccupancyDB = (): boolean => {
|
|
||||||
|
export const initializeDatabase = (): boolean => {
|
||||||
|
|
||||||
const lotOccupancyDB = sqlite(databasePath);
|
const lotOccupancyDB = sqlite(databasePath);
|
||||||
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
interface AddLotOccupancyFieldForm {
|
||||||
|
lotOccupancyId: string | number;
|
||||||
|
occupancyTypeFieldId: string | number;
|
||||||
|
lotOccupancyFieldValue: string;
|
||||||
|
}
|
||||||
|
export declare const addLotOccupancyField: (lotOccupancyFieldForm: AddLotOccupancyFieldForm, requestSession: recordTypes.PartialSession) => boolean;
|
||||||
|
export default addLotOccupancyField;
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||||
|
export const addLotOccupancyField = (lotOccupancyFieldForm, requestSession) => {
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
let success = true;
|
||||||
|
try {
|
||||||
|
database
|
||||||
|
.prepare("insert into LotOccupancyFields (" +
|
||||||
|
"lotOccupancyId, occupancyTypeFieldId," +
|
||||||
|
" lotOccupancyFieldValue," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(lotOccupancyFieldForm.lotOccupancyId, lotOccupancyFieldForm.occupancyTypeFieldId, lotOccupancyFieldForm.lotOccupancyFieldValue, requestSession.user.userName, rightNowMillis, requestSession.user.userName, rightNowMillis);
|
||||||
|
}
|
||||||
|
catch (_a) {
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
database.close();
|
||||||
|
}
|
||||||
|
return success;
|
||||||
|
};
|
||||||
|
export default addLotOccupancyField;
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
|
||||||
|
import {
|
||||||
|
lotOccupancyDB as databasePath
|
||||||
|
} from "../../data/databasePaths.js";
|
||||||
|
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
|
||||||
|
|
||||||
|
interface AddLotOccupancyFieldForm {
|
||||||
|
lotOccupancyId: string | number;
|
||||||
|
occupancyTypeFieldId: string | number;
|
||||||
|
lotOccupancyFieldValue: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const addLotOccupancyField =
|
||||||
|
(lotOccupancyFieldForm: AddLotOccupancyFieldForm, requestSession: recordTypes.PartialSession): boolean => {
|
||||||
|
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
|
||||||
|
let success = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
database
|
||||||
|
.prepare("insert into LotOccupancyFields (" +
|
||||||
|
"lotOccupancyId, occupancyTypeFieldId," +
|
||||||
|
" lotOccupancyFieldValue," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(lotOccupancyFieldForm.lotOccupancyId,
|
||||||
|
lotOccupancyFieldForm.occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldForm.lotOccupancyFieldValue,
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis,
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis);
|
||||||
|
} catch {
|
||||||
|
success = false;
|
||||||
|
} finally {
|
||||||
|
database.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
return success;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export default addLotOccupancyField;
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import sqlite from "better-sqlite3";
|
import sqlite from "better-sqlite3";
|
||||||
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
|
||||||
|
|
||||||
import * as dateTimeFunctions from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
import {
|
||||||
|
lotOccupancyDB as databasePath
|
||||||
|
} from "../../data/databasePaths.js";
|
||||||
|
|
||||||
import type * as recordTypes from "../../types/recordTypes";
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
interface AddLotOccupantTypeForm {
|
||||||
|
lotOccupantType: string;
|
||||||
|
orderNumber?: number;
|
||||||
|
}
|
||||||
|
export declare const addLotOccupantType: (lotOccupantTypeForm: AddLotOccupantTypeForm, requestSession: recordTypes.PartialSession) => number;
|
||||||
|
export default addLotOccupantType;
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||||
|
export const addLotOccupantType = (lotOccupantTypeForm, requestSession) => {
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
const result = database
|
||||||
|
.prepare("insert into LotOccupantTypes (" +
|
||||||
|
"lotOccupantType, orderNumber," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(lotOccupantTypeForm.lotOccupantType, (lotOccupantTypeForm.orderNumber || 0), requestSession.user.userName, rightNowMillis, requestSession.user.userName, rightNowMillis);
|
||||||
|
database.close();
|
||||||
|
return result.lastInsertRowid;
|
||||||
|
};
|
||||||
|
export default addLotOccupantType;
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
|
||||||
|
import {
|
||||||
|
lotOccupancyDB as databasePath
|
||||||
|
} from "../../data/databasePaths.js";
|
||||||
|
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
|
||||||
|
|
||||||
|
interface AddLotOccupantTypeForm {
|
||||||
|
lotOccupantType: string;
|
||||||
|
orderNumber?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const addLotOccupantType =
|
||||||
|
(lotOccupantTypeForm: AddLotOccupantTypeForm, requestSession: recordTypes.PartialSession): number => {
|
||||||
|
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
|
||||||
|
const result = database
|
||||||
|
.prepare("insert into LotOccupantTypes (" +
|
||||||
|
"lotOccupantType, orderNumber," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(lotOccupantTypeForm.lotOccupantType,
|
||||||
|
(lotOccupantTypeForm.orderNumber || 0),
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis,
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis);
|
||||||
|
|
||||||
|
database.close();
|
||||||
|
|
||||||
|
return result.lastInsertRowid as number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export default addLotOccupantType;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
interface AddLotStatusForm {
|
||||||
|
lotStatus: string;
|
||||||
|
orderNumber?: number;
|
||||||
|
}
|
||||||
|
export declare const addLotStatus: (lotStatusForm: AddLotStatusForm, requestSession: recordTypes.PartialSession) => number;
|
||||||
|
export default addLotStatus;
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||||
|
export const addLotStatus = (lotStatusForm, requestSession) => {
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
const result = database
|
||||||
|
.prepare("insert into LotStatuses (" +
|
||||||
|
"lotStatus, orderNumber," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(lotStatusForm.lotStatus, (lotStatusForm.orderNumber || 0), requestSession.user.userName, rightNowMillis, requestSession.user.userName, rightNowMillis);
|
||||||
|
database.close();
|
||||||
|
return result.lastInsertRowid;
|
||||||
|
};
|
||||||
|
export default addLotStatus;
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
|
||||||
|
import {
|
||||||
|
lotOccupancyDB as databasePath
|
||||||
|
} from "../../data/databasePaths.js";
|
||||||
|
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
|
||||||
|
|
||||||
|
interface AddLotStatusForm {
|
||||||
|
lotStatus: string;
|
||||||
|
orderNumber?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const addLotStatus =
|
||||||
|
(lotStatusForm: AddLotStatusForm, requestSession: recordTypes.PartialSession): number => {
|
||||||
|
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
|
||||||
|
const result = database
|
||||||
|
.prepare("insert into LotStatuses (" +
|
||||||
|
"lotStatus, orderNumber," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(lotStatusForm.lotStatus,
|
||||||
|
(lotStatusForm.orderNumber || 0),
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis,
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis);
|
||||||
|
|
||||||
|
database.close();
|
||||||
|
|
||||||
|
return result.lastInsertRowid as number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export default addLotStatus;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
interface AddLotTypeForm {
|
||||||
|
lotType: string;
|
||||||
|
orderNumber?: number;
|
||||||
|
}
|
||||||
|
export declare const addLotType: (lotTypeForm: AddLotTypeForm, requestSession: recordTypes.PartialSession) => number;
|
||||||
|
export default addLotType;
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||||
|
export const addLotType = (lotTypeForm, requestSession) => {
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
const result = database
|
||||||
|
.prepare("insert into LotTypes (" +
|
||||||
|
"lotType, orderNumber," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(lotTypeForm.lotType, (lotTypeForm.orderNumber || 0), requestSession.user.userName, rightNowMillis, requestSession.user.userName, rightNowMillis);
|
||||||
|
database.close();
|
||||||
|
return result.lastInsertRowid;
|
||||||
|
};
|
||||||
|
export default addLotType;
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
|
||||||
|
import {
|
||||||
|
lotOccupancyDB as databasePath
|
||||||
|
} from "../../data/databasePaths.js";
|
||||||
|
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
|
||||||
|
|
||||||
|
interface AddLotTypeForm {
|
||||||
|
lotType: string;
|
||||||
|
orderNumber?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const addLotType =
|
||||||
|
(lotTypeForm: AddLotTypeForm, requestSession: recordTypes.PartialSession): number => {
|
||||||
|
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
|
||||||
|
const result = database
|
||||||
|
.prepare("insert into LotTypes (" +
|
||||||
|
"lotType, orderNumber," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(lotTypeForm.lotType,
|
||||||
|
(lotTypeForm.orderNumber || 0),
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis,
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis);
|
||||||
|
|
||||||
|
database.close();
|
||||||
|
|
||||||
|
return result.lastInsertRowid as number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export default addLotType;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
interface AddOccupancyTypeForm {
|
||||||
|
occupancyType: string;
|
||||||
|
orderNumber?: number;
|
||||||
|
}
|
||||||
|
export declare const addOccupancyType: (occupancyTypeForm: AddOccupancyTypeForm, requestSession: recordTypes.PartialSession) => number;
|
||||||
|
export default addOccupancyType;
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||||
|
export const addOccupancyType = (occupancyTypeForm, requestSession) => {
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
const result = database
|
||||||
|
.prepare("insert into OccupancyTypes (" +
|
||||||
|
"occupancyType, orderNumber," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(occupancyTypeForm.occupancyType, (occupancyTypeForm.orderNumber || 0), requestSession.user.userName, rightNowMillis, requestSession.user.userName, rightNowMillis);
|
||||||
|
database.close();
|
||||||
|
return result.lastInsertRowid;
|
||||||
|
};
|
||||||
|
export default addOccupancyType;
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
|
||||||
|
import {
|
||||||
|
lotOccupancyDB as databasePath
|
||||||
|
} from "../../data/databasePaths.js";
|
||||||
|
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
|
||||||
|
|
||||||
|
interface AddOccupancyTypeForm {
|
||||||
|
occupancyType: string;
|
||||||
|
orderNumber?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const addOccupancyType =
|
||||||
|
(occupancyTypeForm: AddOccupancyTypeForm, requestSession: recordTypes.PartialSession): number => {
|
||||||
|
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
|
||||||
|
const result = database
|
||||||
|
.prepare("insert into OccupancyTypes (" +
|
||||||
|
"occupancyType, orderNumber," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(occupancyTypeForm.occupancyType,
|
||||||
|
(occupancyTypeForm.orderNumber || 0),
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis,
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis);
|
||||||
|
|
||||||
|
database.close();
|
||||||
|
|
||||||
|
return result.lastInsertRowid as number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export default addOccupancyType;
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
interface AddOccupancyTypeFieldForm {
|
||||||
|
occupancyTypeId: string | number;
|
||||||
|
occupancyTypeField: string;
|
||||||
|
occupancyTypeFieldValues: string;
|
||||||
|
isRequired?: string;
|
||||||
|
pattern: string;
|
||||||
|
minimumLength: string | number;
|
||||||
|
maximumLength: string | number;
|
||||||
|
orderNumber?: number;
|
||||||
|
}
|
||||||
|
export declare const addOccupancyTypeField: (occupancyTypeFieldForm: AddOccupancyTypeFieldForm, requestSession: recordTypes.PartialSession) => number;
|
||||||
|
export default addOccupancyTypeField;
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||||
|
export const addOccupancyTypeField = (occupancyTypeFieldForm, requestSession) => {
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
const result = database
|
||||||
|
.prepare("insert into OccupancyTypeFields (" +
|
||||||
|
"occupancyTypeId, occupancyTypeField," +
|
||||||
|
" occupancyTypeFieldValues, isRequired, pattern," +
|
||||||
|
" minimumLength, maximumLength," +
|
||||||
|
" orderNumber," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(occupancyTypeFieldForm.occupancyTypeId, occupancyTypeFieldForm.occupancyTypeField, occupancyTypeFieldForm.occupancyTypeFieldValues, (occupancyTypeFieldForm.isRequired ? 1 : 0), occupancyTypeFieldForm.pattern, (occupancyTypeFieldForm.minimumLength || 0), (occupancyTypeFieldForm.maximumLength || 100), (occupancyTypeFieldForm.orderNumber || 0), requestSession.user.userName, rightNowMillis, requestSession.user.userName, rightNowMillis);
|
||||||
|
database.close();
|
||||||
|
return result.lastInsertRowid;
|
||||||
|
};
|
||||||
|
export default addOccupancyTypeField;
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
|
||||||
|
import {
|
||||||
|
lotOccupancyDB as databasePath
|
||||||
|
} from "../../data/databasePaths.js";
|
||||||
|
|
||||||
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
|
||||||
|
|
||||||
|
interface AddOccupancyTypeFieldForm {
|
||||||
|
occupancyTypeId: string | number;
|
||||||
|
occupancyTypeField: string;
|
||||||
|
occupancyTypeFieldValues: string;
|
||||||
|
isRequired?: string;
|
||||||
|
pattern: string;
|
||||||
|
minimumLength: string | number;
|
||||||
|
maximumLength: string | number;
|
||||||
|
orderNumber?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const addOccupancyTypeField =
|
||||||
|
(occupancyTypeFieldForm: AddOccupancyTypeFieldForm, requestSession: recordTypes.PartialSession): number => {
|
||||||
|
|
||||||
|
const database = sqlite(databasePath);
|
||||||
|
|
||||||
|
const rightNowMillis = Date.now();
|
||||||
|
|
||||||
|
const result = database
|
||||||
|
.prepare("insert into OccupancyTypeFields (" +
|
||||||
|
"occupancyTypeId, occupancyTypeField," +
|
||||||
|
" occupancyTypeFieldValues, isRequired, pattern," +
|
||||||
|
" minimumLength, maximumLength," +
|
||||||
|
" orderNumber," +
|
||||||
|
" recordCreate_userName, recordCreate_timeMillis," +
|
||||||
|
" recordUpdate_userName, recordUpdate_timeMillis)" +
|
||||||
|
" values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")
|
||||||
|
.run(occupancyTypeFieldForm.occupancyTypeId,
|
||||||
|
occupancyTypeFieldForm.occupancyTypeField,
|
||||||
|
occupancyTypeFieldForm.occupancyTypeFieldValues,
|
||||||
|
(occupancyTypeFieldForm.isRequired ? 1 : 0),
|
||||||
|
occupancyTypeFieldForm.pattern,
|
||||||
|
(occupancyTypeFieldForm.minimumLength || 0),
|
||||||
|
(occupancyTypeFieldForm.maximumLength || 100),
|
||||||
|
(occupancyTypeFieldForm.orderNumber || 0),
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis,
|
||||||
|
requestSession.user.userName,
|
||||||
|
rightNowMillis);
|
||||||
|
|
||||||
|
database.close();
|
||||||
|
|
||||||
|
return result.lastInsertRowid as number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export default addOccupancyTypeField;
|
||||||
|
|
@ -7,7 +7,9 @@ export const getLotOccupancyFields = (lotOccupancyId, connectedDatabase) => {
|
||||||
const lotOccupancyFields = database
|
const lotOccupancyFields = database
|
||||||
.prepare("select o.lotOccupancyId," +
|
.prepare("select o.lotOccupancyId," +
|
||||||
" o.occupancyTypeFieldId, o.lotOccupancyFieldValue," +
|
" o.occupancyTypeFieldId, o.lotOccupancyFieldValue," +
|
||||||
" f.occupancyTypeField, f.orderNumber" +
|
" f.occupancyTypeField," +
|
||||||
|
" f.occupancyTypeFieldValues, f.isRequired, f.pattern, f.minimumLength, f.maximumLength," +
|
||||||
|
" f.orderNumber" +
|
||||||
" from LotOccupancyFields o" +
|
" from LotOccupancyFields o" +
|
||||||
" left join OccupancyTypeFields f on o.occupancyTypeFieldId = f.occupancyTypeFieldId" +
|
" left join OccupancyTypeFields f on o.occupancyTypeFieldId = f.occupancyTypeFieldId" +
|
||||||
" where o.recordDelete_timeMillis is null" +
|
" where o.recordDelete_timeMillis is null" +
|
||||||
|
|
@ -15,7 +17,9 @@ export const getLotOccupancyFields = (lotOccupancyId, connectedDatabase) => {
|
||||||
" union" +
|
" union" +
|
||||||
" select ? as lotOccupancyId," +
|
" select ? as lotOccupancyId," +
|
||||||
" f.occupancyTypeFieldId, '' as lotOccupancyFieldValue," +
|
" f.occupancyTypeFieldId, '' as lotOccupancyFieldValue," +
|
||||||
" f.occupancyTypeField, f.orderNumber" +
|
" f.occupancyTypeField," +
|
||||||
|
" f.occupancyTypeFieldValues, f.isRequired, f.pattern, f.minimumLength, f.maximumLength," +
|
||||||
|
" f.orderNumber" +
|
||||||
" from OccupancyTypeFields f" +
|
" from OccupancyTypeFields f" +
|
||||||
" where f.recordDelete_timeMillis is null" +
|
" where f.recordDelete_timeMillis is null" +
|
||||||
" and f.occupancyTypeId in (select occupancyTypeId from LotOccupancies where lotOccupancyId = ?)" +
|
" and f.occupancyTypeId in (select occupancyTypeId from LotOccupancies where lotOccupancyId = ?)" +
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,9 @@ export const getLotOccupancyFields = (lotOccupancyId: number | string,
|
||||||
const lotOccupancyFields: recordTypes.LotOccupancyField[] = database
|
const lotOccupancyFields: recordTypes.LotOccupancyField[] = database
|
||||||
.prepare("select o.lotOccupancyId," +
|
.prepare("select o.lotOccupancyId," +
|
||||||
" o.occupancyTypeFieldId, o.lotOccupancyFieldValue," +
|
" o.occupancyTypeFieldId, o.lotOccupancyFieldValue," +
|
||||||
" f.occupancyTypeField, f.orderNumber" +
|
" f.occupancyTypeField," +
|
||||||
|
" f.occupancyTypeFieldValues, f.isRequired, f.pattern, f.minimumLength, f.maximumLength," +
|
||||||
|
" f.orderNumber" +
|
||||||
" from LotOccupancyFields o" +
|
" from LotOccupancyFields o" +
|
||||||
" left join OccupancyTypeFields f on o.occupancyTypeFieldId = f.occupancyTypeFieldId" +
|
" left join OccupancyTypeFields f on o.occupancyTypeFieldId = f.occupancyTypeFieldId" +
|
||||||
" where o.recordDelete_timeMillis is null" +
|
" where o.recordDelete_timeMillis is null" +
|
||||||
|
|
@ -25,7 +27,9 @@ export const getLotOccupancyFields = (lotOccupancyId: number | string,
|
||||||
" union" +
|
" union" +
|
||||||
" select ? as lotOccupancyId," +
|
" select ? as lotOccupancyId," +
|
||||||
" f.occupancyTypeFieldId, '' as lotOccupancyFieldValue," +
|
" f.occupancyTypeFieldId, '' as lotOccupancyFieldValue," +
|
||||||
" f.occupancyTypeField, f.orderNumber" +
|
" f.occupancyTypeField," +
|
||||||
|
" f.occupancyTypeFieldValues, f.isRequired, f.pattern, f.minimumLength, f.maximumLength," +
|
||||||
|
" f.orderNumber" +
|
||||||
" from OccupancyTypeFields f" +
|
" from OccupancyTypeFields f" +
|
||||||
" where f.recordDelete_timeMillis is null" +
|
" where f.recordDelete_timeMillis is null" +
|
||||||
" and f.occupancyTypeId in (select occupancyTypeId from LotOccupancies where lotOccupancyId = ?)" +
|
" and f.occupancyTypeId in (select occupancyTypeId from LotOccupancies where lotOccupancyId = ?)" +
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,8 @@
|
||||||
"@types/node-windows": "^0.1.2",
|
"@types/node-windows": "^0.1.2",
|
||||||
"@types/papaparse": "^5.3.3",
|
"@types/papaparse": "^5.3.3",
|
||||||
"@types/session-file-store": "^1.2.2",
|
"@types/session-file-store": "^1.2.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.32.0",
|
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
||||||
"@typescript-eslint/parser": "^5.32.0",
|
"@typescript-eslint/parser": "^5.33.0",
|
||||||
"bulma": "^0.9.4",
|
"bulma": "^0.9.4",
|
||||||
"eslint": "^8.21.0",
|
"eslint": "^8.21.0",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
|
|
@ -1147,14 +1147,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.0.tgz",
|
||||||
"integrity": "sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew==",
|
"integrity": "sha512-jHvZNSW2WZ31OPJ3enhLrEKvAZNyAFWZ6rx9tUwaessTc4sx9KmgMNhVcqVAl1ETnT5rU5fpXTLmY9YvC1DCNg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "5.32.0",
|
"@typescript-eslint/scope-manager": "5.33.0",
|
||||||
"@typescript-eslint/type-utils": "5.32.0",
|
"@typescript-eslint/type-utils": "5.33.0",
|
||||||
"@typescript-eslint/utils": "5.32.0",
|
"@typescript-eslint/utils": "5.33.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"functional-red-black-tree": "^1.0.1",
|
"functional-red-black-tree": "^1.0.1",
|
||||||
"ignore": "^5.2.0",
|
"ignore": "^5.2.0",
|
||||||
|
|
@ -1180,14 +1180,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.0.tgz",
|
||||||
"integrity": "sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A==",
|
"integrity": "sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "5.32.0",
|
"@typescript-eslint/scope-manager": "5.33.0",
|
||||||
"@typescript-eslint/types": "5.32.0",
|
"@typescript-eslint/types": "5.33.0",
|
||||||
"@typescript-eslint/typescript-estree": "5.32.0",
|
"@typescript-eslint/typescript-estree": "5.33.0",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
@ -1207,13 +1207,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.0.tgz",
|
||||||
"integrity": "sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg==",
|
"integrity": "sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.32.0",
|
"@typescript-eslint/types": "5.33.0",
|
||||||
"@typescript-eslint/visitor-keys": "5.32.0"
|
"@typescript-eslint/visitor-keys": "5.33.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
|
|
@ -1224,12 +1224,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils": {
|
"node_modules/@typescript-eslint/type-utils": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.0.tgz",
|
||||||
"integrity": "sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg==",
|
"integrity": "sha512-2zB8uEn7hEH2pBeyk3NpzX1p3lF9dKrEbnXq1F7YkpZ6hlyqb2yZujqgRGqXgRBTHWIUG3NGx/WeZk224UKlIA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/utils": "5.32.0",
|
"@typescript-eslint/utils": "5.33.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"tsutils": "^3.21.0"
|
"tsutils": "^3.21.0"
|
||||||
},
|
},
|
||||||
|
|
@ -1250,9 +1250,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/types": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.0.tgz",
|
||||||
"integrity": "sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ==",
|
"integrity": "sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
|
|
@ -1263,13 +1263,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.0.tgz",
|
||||||
"integrity": "sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg==",
|
"integrity": "sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.32.0",
|
"@typescript-eslint/types": "5.33.0",
|
||||||
"@typescript-eslint/visitor-keys": "5.32.0",
|
"@typescript-eslint/visitor-keys": "5.33.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
|
|
@ -1290,15 +1290,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils": {
|
"node_modules/@typescript-eslint/utils": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.0.tgz",
|
||||||
"integrity": "sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ==",
|
"integrity": "sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/json-schema": "^7.0.9",
|
"@types/json-schema": "^7.0.9",
|
||||||
"@typescript-eslint/scope-manager": "5.32.0",
|
"@typescript-eslint/scope-manager": "5.33.0",
|
||||||
"@typescript-eslint/types": "5.32.0",
|
"@typescript-eslint/types": "5.33.0",
|
||||||
"@typescript-eslint/typescript-estree": "5.32.0",
|
"@typescript-eslint/typescript-estree": "5.33.0",
|
||||||
"eslint-scope": "^5.1.1",
|
"eslint-scope": "^5.1.1",
|
||||||
"eslint-utils": "^3.0.0"
|
"eslint-utils": "^3.0.0"
|
||||||
},
|
},
|
||||||
|
|
@ -1314,12 +1314,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.0.tgz",
|
||||||
"integrity": "sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g==",
|
"integrity": "sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "5.32.0",
|
"@typescript-eslint/types": "5.33.0",
|
||||||
"eslint-visitor-keys": "^3.3.0"
|
"eslint-visitor-keys": "^3.3.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
@ -11632,14 +11632,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/eslint-plugin": {
|
"@typescript-eslint/eslint-plugin": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.0.tgz",
|
||||||
"integrity": "sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew==",
|
"integrity": "sha512-jHvZNSW2WZ31OPJ3enhLrEKvAZNyAFWZ6rx9tUwaessTc4sx9KmgMNhVcqVAl1ETnT5rU5fpXTLmY9YvC1DCNg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/scope-manager": "5.32.0",
|
"@typescript-eslint/scope-manager": "5.33.0",
|
||||||
"@typescript-eslint/type-utils": "5.32.0",
|
"@typescript-eslint/type-utils": "5.33.0",
|
||||||
"@typescript-eslint/utils": "5.32.0",
|
"@typescript-eslint/utils": "5.33.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"functional-red-black-tree": "^1.0.1",
|
"functional-red-black-tree": "^1.0.1",
|
||||||
"ignore": "^5.2.0",
|
"ignore": "^5.2.0",
|
||||||
|
|
@ -11649,52 +11649,52 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/parser": {
|
"@typescript-eslint/parser": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.0.tgz",
|
||||||
"integrity": "sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A==",
|
"integrity": "sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/scope-manager": "5.32.0",
|
"@typescript-eslint/scope-manager": "5.33.0",
|
||||||
"@typescript-eslint/types": "5.32.0",
|
"@typescript-eslint/types": "5.33.0",
|
||||||
"@typescript-eslint/typescript-estree": "5.32.0",
|
"@typescript-eslint/typescript-estree": "5.33.0",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/scope-manager": {
|
"@typescript-eslint/scope-manager": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.0.tgz",
|
||||||
"integrity": "sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg==",
|
"integrity": "sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.32.0",
|
"@typescript-eslint/types": "5.33.0",
|
||||||
"@typescript-eslint/visitor-keys": "5.32.0"
|
"@typescript-eslint/visitor-keys": "5.33.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/type-utils": {
|
"@typescript-eslint/type-utils": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.0.tgz",
|
||||||
"integrity": "sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg==",
|
"integrity": "sha512-2zB8uEn7hEH2pBeyk3NpzX1p3lF9dKrEbnXq1F7YkpZ6hlyqb2yZujqgRGqXgRBTHWIUG3NGx/WeZk224UKlIA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/utils": "5.32.0",
|
"@typescript-eslint/utils": "5.33.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"tsutils": "^3.21.0"
|
"tsutils": "^3.21.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/types": {
|
"@typescript-eslint/types": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.0.tgz",
|
||||||
"integrity": "sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ==",
|
"integrity": "sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.0.tgz",
|
||||||
"integrity": "sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg==",
|
"integrity": "sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.32.0",
|
"@typescript-eslint/types": "5.33.0",
|
||||||
"@typescript-eslint/visitor-keys": "5.32.0",
|
"@typescript-eslint/visitor-keys": "5.33.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
|
|
@ -11703,26 +11703,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/utils": {
|
"@typescript-eslint/utils": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.0.tgz",
|
||||||
"integrity": "sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ==",
|
"integrity": "sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/json-schema": "^7.0.9",
|
"@types/json-schema": "^7.0.9",
|
||||||
"@typescript-eslint/scope-manager": "5.32.0",
|
"@typescript-eslint/scope-manager": "5.33.0",
|
||||||
"@typescript-eslint/types": "5.32.0",
|
"@typescript-eslint/types": "5.33.0",
|
||||||
"@typescript-eslint/typescript-estree": "5.32.0",
|
"@typescript-eslint/typescript-estree": "5.33.0",
|
||||||
"eslint-scope": "^5.1.1",
|
"eslint-scope": "^5.1.1",
|
||||||
"eslint-utils": "^3.0.0"
|
"eslint-utils": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/visitor-keys": {
|
"@typescript-eslint/visitor-keys": {
|
||||||
"version": "5.32.0",
|
"version": "5.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.0.tgz",
|
||||||
"integrity": "sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g==",
|
"integrity": "sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "5.32.0",
|
"@typescript-eslint/types": "5.33.0",
|
||||||
"eslint-visitor-keys": "^3.3.0"
|
"eslint-visitor-keys": "^3.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
12
package.json
12
package.json
|
|
@ -9,11 +9,13 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:version": "npx genversion --es6 --semi version.js",
|
"build:version": "npx genversion --es6 --semi version.js",
|
||||||
|
"init:cemetery": "cross-env NODE_ENV=dev DEBUG=lot-occupancy-system:* node ./helpers/initializer.database.cemetery.js",
|
||||||
|
"init:cemetery:test": "cross-env NODE_ENV=dev DEBUG=lot-occupancy-system:* TEST_DATABASES=true node ./helpers/initializer.database.cemetery.js",
|
||||||
"start": "cross-env NODE_ENV=production node ./bin/www",
|
"start": "cross-env NODE_ENV=production node ./bin/www",
|
||||||
"dev:test": "cross-env NODE_ENV=dev DEBUG=lot-occupancy-system:* TEST_DATABASES=true nodemon ./bin/www",
|
"dev:test": "cross-env NODE_ENV=dev DEBUG=lot-occupancy-system:* TEST_DATABASES=true nodemon ./bin/www.js",
|
||||||
"dev:live": "cross-env NODE_ENV=dev DEBUG=lot-occupancy-system:* nodemon ./bin/www",
|
"dev:live": "cross-env NODE_ENV=dev DEBUG=lot-occupancy-system:* nodemon ./bin/www.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"temp:legacy:importFromCSV": "cross-env NODE_ENV=dev DEBUG=lot-occupancy-system:* TEST_DATABASES=true node ./temp/legacy.importFromCSV.js",
|
"temp:legacy:importFromCsv": "cross-env NODE_ENV=dev DEBUG=lot-occupancy-system:* TEST_DATABASES=true node ./temp/legacy.importFromCsv.js",
|
||||||
"temp:so:exportMaps": "node ./temp/so.exportMaps.js"
|
"temp:so:exportMaps": "node ./temp/so.exportMaps.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -72,8 +74,8 @@
|
||||||
"@types/node-windows": "^0.1.2",
|
"@types/node-windows": "^0.1.2",
|
||||||
"@types/papaparse": "^5.3.3",
|
"@types/papaparse": "^5.3.3",
|
||||||
"@types/session-file-store": "^1.2.2",
|
"@types/session-file-store": "^1.2.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.32.0",
|
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
||||||
"@typescript-eslint/parser": "^5.32.0",
|
"@typescript-eslint/parser": "^5.33.0",
|
||||||
"bulma": "^0.9.4",
|
"bulma": "^0.9.4",
|
||||||
"eslint": "^8.21.0",
|
"eslint": "^8.21.0",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const lotOccupancyId = document.querySelector("#lotOccupancy--lotOccupancyId").value;
|
const lotOccupancyId = document.querySelector("#lotOccupancy--lotOccupancyId").value;
|
||||||
const isCreate = (lotOccupancyId === "");
|
const isCreate = (lotOccupancyId === "");
|
||||||
let hasUnsavedChanges = false;
|
let hasUnsavedChanges = false;
|
||||||
|
let refreshAfterSave = isCreate;
|
||||||
const setUnsavedChanges = () => {
|
const setUnsavedChanges = () => {
|
||||||
if (!hasUnsavedChanges) {
|
if (!hasUnsavedChanges) {
|
||||||
hasUnsavedChanges = true;
|
hasUnsavedChanges = true;
|
||||||
|
|
@ -22,8 +23,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
cityssm.postJSON(urlPrefix + "/lotOccupancies/" + (isCreate ? "doCreateLotOccupancy" : "doUpdateLotOccupancy"), formElement, (responseJSON) => {
|
cityssm.postJSON(urlPrefix + "/lotOccupancies/" + (isCreate ? "doCreateLotOccupancy" : "doUpdateLotOccupancy"), formElement, (responseJSON) => {
|
||||||
if (responseJSON.success) {
|
if (responseJSON.success) {
|
||||||
clearUnsavedChanges();
|
clearUnsavedChanges();
|
||||||
if (isCreate) {
|
if (isCreate || refreshAfterSave) {
|
||||||
window.location.href = urlPrefix + "/lotOccupancies/" + responseJSON.lotOccupancyId + "/edit";
|
window.location.href = urlPrefix + "/lotOccupancies/" + responseJSON.lotOccupancyId + "/edit?t=" + Date.now();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bulmaJS.alert({
|
bulmaJS.alert({
|
||||||
|
|
@ -41,7 +42,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
document.querySelector("#lotOccupancy--lotName").addEventListener("click", () => {
|
const formInputElements = formElement.querySelectorAll("input, select");
|
||||||
|
for (const formInputElement of formInputElements) {
|
||||||
|
formInputElement.addEventListener("change", setUnsavedChanges);
|
||||||
|
}
|
||||||
|
if (!isCreate) {
|
||||||
|
const occupancyTypeIdElement = document.querySelector("#lotOccupancy--occupancyTypeId");
|
||||||
|
const originalOccupancyTypeId = occupancyTypeIdElement.value;
|
||||||
|
occupancyTypeIdElement.addEventListener("change", () => {
|
||||||
|
if (occupancyTypeIdElement.value !== originalOccupancyTypeId) {
|
||||||
|
bulmaJS.confirm({
|
||||||
|
title: "Confirm Change",
|
||||||
|
message: "Are you sure you want to change the " + exports.aliases.occupancy.toLowerCase() + " type?\n" +
|
||||||
|
"This change affects the additional fields associated with this record, and may also affect the available fees.",
|
||||||
|
contextualColorName: "warning",
|
||||||
|
okButton: {
|
||||||
|
text: "Yes, Keep the Change",
|
||||||
|
callbackFunction: () => {
|
||||||
|
refreshAfterSave = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancelButton: {
|
||||||
|
text: "Revert the Change",
|
||||||
|
callbackFunction: () => {
|
||||||
|
occupancyTypeIdElement.value = originalOccupancyTypeId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
document.querySelector("#lotOccupancy--lotName").addEventListener("click", (clickEvent) => {
|
||||||
|
const currentLotName = clickEvent.currentTarget.value;
|
||||||
let lotSelectCloseModalFunction;
|
let lotSelectCloseModalFunction;
|
||||||
let lotSelectFormElement;
|
let lotSelectFormElement;
|
||||||
let lotSelectResultsElement;
|
let lotSelectResultsElement;
|
||||||
|
|
@ -103,6 +135,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
bulmaJS.toggleHtmlClipped();
|
bulmaJS.toggleHtmlClipped();
|
||||||
lotSelectCloseModalFunction = closeModalFunction;
|
lotSelectCloseModalFunction = closeModalFunction;
|
||||||
const lotNameFilterElement = modalElement.querySelector("#lotSelect--lotName");
|
const lotNameFilterElement = modalElement.querySelector("#lotSelect--lotName");
|
||||||
|
lotNameFilterElement.value = currentLotName;
|
||||||
lotNameFilterElement.focus();
|
lotNameFilterElement.focus();
|
||||||
lotNameFilterElement.addEventListener("change", searchLots);
|
lotNameFilterElement.addEventListener("change", searchLots);
|
||||||
modalElement.querySelector("#lotSelect--occupancyStatus").addEventListener("change", searchLots);
|
modalElement.querySelector("#lotSelect--occupancyStatus").addEventListener("change", searchLots);
|
||||||
|
|
@ -111,11 +144,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
lotSelectFormElement.addEventListener("submit", (submitEvent) => {
|
lotSelectFormElement.addEventListener("submit", (submitEvent) => {
|
||||||
submitEvent.preventDefault();
|
submitEvent.preventDefault();
|
||||||
});
|
});
|
||||||
|
searchLots();
|
||||||
},
|
},
|
||||||
onremoved: () => {
|
onremoved: () => {
|
||||||
bulmaJS.toggleHtmlClipped();
|
bulmaJS.toggleHtmlClipped();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
document.querySelector("#lotOccupancy--occupancyStartDateString").addEventListener("change", () => {
|
||||||
|
document.querySelector("#lotOccupancy--occupancyEndDateString").min =
|
||||||
|
document.querySelector("#lotOccupancy--occupancyStartDateString").value;
|
||||||
|
});
|
||||||
los.initializeUnlockFieldButtons(formElement);
|
los.initializeUnlockFieldButtons(formElement);
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ declare const bulmaJS: BulmaJS;
|
||||||
// Main form
|
// Main form
|
||||||
|
|
||||||
let hasUnsavedChanges = false;
|
let hasUnsavedChanges = false;
|
||||||
|
let refreshAfterSave = isCreate;
|
||||||
|
|
||||||
const setUnsavedChanges = () => {
|
const setUnsavedChanges = () => {
|
||||||
if (!hasUnsavedChanges) {
|
if (!hasUnsavedChanges) {
|
||||||
|
|
@ -57,8 +58,8 @@ declare const bulmaJS: BulmaJS;
|
||||||
|
|
||||||
clearUnsavedChanges();
|
clearUnsavedChanges();
|
||||||
|
|
||||||
if (isCreate) {
|
if (isCreate || refreshAfterSave) {
|
||||||
window.location.href = urlPrefix + "/lotOccupancies/" + responseJSON.lotOccupancyId + "/edit";
|
window.location.href = urlPrefix + "/lotOccupancies/" + responseJSON.lotOccupancyId + "/edit?t=" + Date.now();
|
||||||
} else {
|
} else {
|
||||||
bulmaJS.alert({
|
bulmaJS.alert({
|
||||||
message: exports.aliases.occupancy + " Updated Successfully",
|
message: exports.aliases.occupancy + " Updated Successfully",
|
||||||
|
|
@ -75,9 +76,51 @@ declare const bulmaJS: BulmaJS;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const formInputElements = formElement.querySelectorAll("input, select");
|
||||||
|
|
||||||
|
for (const formInputElement of formInputElements) {
|
||||||
|
formInputElement.addEventListener("change", setUnsavedChanges);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Occupancy Type
|
||||||
|
|
||||||
|
if (!isCreate) {
|
||||||
|
|
||||||
|
const occupancyTypeIdElement = document.querySelector("#lotOccupancy--occupancyTypeId") as HTMLSelectElement;
|
||||||
|
|
||||||
|
const originalOccupancyTypeId = occupancyTypeIdElement.value;
|
||||||
|
|
||||||
|
occupancyTypeIdElement.addEventListener("change", () => {
|
||||||
|
|
||||||
|
if (occupancyTypeIdElement.value !== originalOccupancyTypeId) {
|
||||||
|
|
||||||
|
bulmaJS.confirm({
|
||||||
|
title: "Confirm Change",
|
||||||
|
message: "Are you sure you want to change the " + exports.aliases.occupancy.toLowerCase() + " type?\n" +
|
||||||
|
"This change affects the additional fields associated with this record, and may also affect the available fees.",
|
||||||
|
contextualColorName: "warning",
|
||||||
|
okButton: {
|
||||||
|
text: "Yes, Keep the Change",
|
||||||
|
callbackFunction: () => {
|
||||||
|
refreshAfterSave = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancelButton: {
|
||||||
|
text: "Revert the Change",
|
||||||
|
callbackFunction: () => {
|
||||||
|
occupancyTypeIdElement.value = originalOccupancyTypeId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Lot Selector
|
// Lot Selector
|
||||||
|
|
||||||
document.querySelector("#lotOccupancy--lotName").addEventListener("click", () => {
|
document.querySelector("#lotOccupancy--lotName").addEventListener("click", (clickEvent) => {
|
||||||
|
|
||||||
|
const currentLotName = (clickEvent.currentTarget as HTMLInputElement).value;
|
||||||
|
|
||||||
let lotSelectCloseModalFunction: () => void;
|
let lotSelectCloseModalFunction: () => void;
|
||||||
|
|
||||||
|
|
@ -166,6 +209,7 @@ declare const bulmaJS: BulmaJS;
|
||||||
lotSelectCloseModalFunction = closeModalFunction;
|
lotSelectCloseModalFunction = closeModalFunction;
|
||||||
|
|
||||||
const lotNameFilterElement = modalElement.querySelector("#lotSelect--lotName") as HTMLInputElement;
|
const lotNameFilterElement = modalElement.querySelector("#lotSelect--lotName") as HTMLInputElement;
|
||||||
|
lotNameFilterElement.value = currentLotName;
|
||||||
lotNameFilterElement.focus();
|
lotNameFilterElement.focus();
|
||||||
lotNameFilterElement.addEventListener("change", searchLots);
|
lotNameFilterElement.addEventListener("change", searchLots);
|
||||||
|
|
||||||
|
|
@ -177,6 +221,8 @@ declare const bulmaJS: BulmaJS;
|
||||||
lotSelectFormElement.addEventListener("submit", (submitEvent) => {
|
lotSelectFormElement.addEventListener("submit", (submitEvent) => {
|
||||||
submitEvent.preventDefault();
|
submitEvent.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
searchLots();
|
||||||
},
|
},
|
||||||
onremoved: () => {
|
onremoved: () => {
|
||||||
bulmaJS.toggleHtmlClipped();
|
bulmaJS.toggleHtmlClipped();
|
||||||
|
|
@ -184,5 +230,13 @@ declare const bulmaJS: BulmaJS;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Start Date
|
||||||
|
|
||||||
|
document.querySelector("#lotOccupancy--occupancyStartDateString").addEventListener("change", () => {
|
||||||
|
|
||||||
|
(document.querySelector("#lotOccupancy--occupancyEndDateString") as HTMLInputElement).min =
|
||||||
|
(document.querySelector("#lotOccupancy--occupancyStartDateString") as HTMLInputElement).value;
|
||||||
|
});
|
||||||
|
|
||||||
los.initializeUnlockFieldButtons(formElement);
|
los.initializeUnlockFieldButtons(formElement);
|
||||||
})();
|
})();
|
||||||
|
|
@ -1 +1 @@
|
||||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const e=exports.los,t=document.querySelector("main").dataset.urlPrefix,c=""===document.querySelector("#lotOccupancy--lotOccupancyId").value;let s=!1;const a=document.querySelector("#form--lotOccupancy");a.addEventListener("submit",e=>{e.preventDefault(),cityssm.postJSON(t+"/lotOccupancies/"+(c?"doCreateLotOccupancy":"doUpdateLotOccupancy"),a,e=>{e.success?(s=!1,cityssm.disableNavBlocker(),c?window.location.href=t+"/lotOccupancies/"+e.lotOccupancyId+"/edit":bulmaJS.alert({message:exports.aliases.occupancy+" Updated Successfully",contextualColorName:"success"})):bulmaJS.alert({title:"Error Saving "+exports.aliases.occupancy,message:e.errorMessage,contextualColorName:"danger"})})}),document.querySelector("#lotOccupancy--lotName").addEventListener("click",()=>{let c,a,o;const l=e=>{e.preventDefault();const t=e.currentTarget;document.querySelector("#lotOccupancy--lotId").value=t.dataset.lotId,document.querySelector("#lotOccupancy--lotName").value=t.dataset.lotName,s||(s=!0,cityssm.enableNavBlocker()),c()},n=()=>{o.innerHTML='<p class="has-text-centered"><i class="fas fa-3x fa-pulse fa-spinner" aria-hidden="true"></i><br />Searching...</p>',cityssm.postJSON(t+"/lots/doSearchLots",a,e=>{if(0===e.count)return void(o.innerHTML='<div class="message is-info"><p class="message-body">No results.</p></div>');const t=document.createElement("div");t.className="panel";for(const c of e.lots){const e=document.createElement("a");e.className="panel-block is-block",e.href="#",e.dataset.lotId=c.lotId.toString(),e.dataset.lotName=c.lotName,e.innerHTML='<div class="columns"><div class="column">'+cityssm.escapeHTML(c.lotName)+'<br /><span class="is-size-7">'+cityssm.escapeHTML(c.mapName)+'</span></div><div class="column">'+cityssm.escapeHTML(c.lotStatus)+'<br /><span class="is-size-7">'+(c.lotOccupancyCount>0?"Currently Occupied":"")+"</span></div></div>",e.addEventListener("click",l),t.append(e)}o.innerHTML="",o.append(t)})};cityssm.openHtmlModal("lotOccupancy-selectLot",{onshow:t=>{e.populateAliases(t)},onshown:(e,t)=>{bulmaJS.toggleHtmlClipped(),c=t;const s=e.querySelector("#lotSelect--lotName");s.focus(),s.addEventListener("change",n),e.querySelector("#lotSelect--occupancyStatus").addEventListener("change",n),a=e.querySelector("#form--lotSelect"),o=e.querySelector("#resultsContainer--lotSelect"),a.addEventListener("submit",e=>{e.preventDefault()})},onremoved:()=>{bulmaJS.toggleHtmlClipped()}})}),e.initializeUnlockFieldButtons(a)})();
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{const e=exports.los,t=document.querySelector("main").dataset.urlPrefix,c=""===document.querySelector("#lotOccupancy--lotOccupancyId").value;let a=!1,o=c;const n=()=>{a||(a=!0,cityssm.enableNavBlocker())},s=document.querySelector("#form--lotOccupancy");s.addEventListener("submit",e=>{e.preventDefault(),cityssm.postJSON(t+"/lotOccupancies/"+(c?"doCreateLotOccupancy":"doUpdateLotOccupancy"),s,e=>{e.success?(a=!1,cityssm.disableNavBlocker(),c||o?window.location.href=t+"/lotOccupancies/"+e.lotOccupancyId+"/edit?t="+Date.now():bulmaJS.alert({message:exports.aliases.occupancy+" Updated Successfully",contextualColorName:"success"})):bulmaJS.alert({title:"Error Saving "+exports.aliases.occupancy,message:e.errorMessage,contextualColorName:"danger"})})});const l=s.querySelectorAll("input, select");for(const e of l)e.addEventListener("change",n);if(!c){const e=document.querySelector("#lotOccupancy--occupancyTypeId"),t=e.value;e.addEventListener("change",()=>{e.value!==t&&bulmaJS.confirm({title:"Confirm Change",message:"Are you sure you want to change the "+exports.aliases.occupancy.toLowerCase()+" type?\nThis change affects the additional fields associated with this record, and may also affect the available fees.",contextualColorName:"warning",okButton:{text:"Yes, Keep the Change",callbackFunction:()=>{o=!0}},cancelButton:{text:"Revert the Change",callbackFunction:()=>{e.value=t}}})})}document.querySelector("#lotOccupancy--lotName").addEventListener("click",c=>{const a=c.currentTarget.value;let o,s,l;const r=e=>{e.preventDefault();const t=e.currentTarget;document.querySelector("#lotOccupancy--lotId").value=t.dataset.lotId,document.querySelector("#lotOccupancy--lotName").value=t.dataset.lotName,n(),o()},u=()=>{l.innerHTML='<p class="has-text-centered"><i class="fas fa-3x fa-pulse fa-spinner" aria-hidden="true"></i><br />Searching...</p>',cityssm.postJSON(t+"/lots/doSearchLots",s,e=>{if(0===e.count)return void(l.innerHTML='<div class="message is-info"><p class="message-body">No results.</p></div>');const t=document.createElement("div");t.className="panel";for(const c of e.lots){const e=document.createElement("a");e.className="panel-block is-block",e.href="#",e.dataset.lotId=c.lotId.toString(),e.dataset.lotName=c.lotName,e.innerHTML='<div class="columns"><div class="column">'+cityssm.escapeHTML(c.lotName)+'<br /><span class="is-size-7">'+cityssm.escapeHTML(c.mapName)+'</span></div><div class="column">'+cityssm.escapeHTML(c.lotStatus)+'<br /><span class="is-size-7">'+(c.lotOccupancyCount>0?"Currently Occupied":"")+"</span></div></div>",e.addEventListener("click",r),t.append(e)}l.innerHTML="",l.append(t)})};cityssm.openHtmlModal("lotOccupancy-selectLot",{onshow:t=>{e.populateAliases(t)},onshown:(e,t)=>{bulmaJS.toggleHtmlClipped(),o=t;const c=e.querySelector("#lotSelect--lotName");c.value=a,c.focus(),c.addEventListener("change",u),e.querySelector("#lotSelect--occupancyStatus").addEventListener("change",u),s=e.querySelector("#form--lotSelect"),l=e.querySelector("#resultsContainer--lotSelect"),s.addEventListener("submit",e=>{e.preventDefault()}),u()},onremoved:()=>{bulmaJS.toggleHtmlClipped()}})}),document.querySelector("#lotOccupancy--occupancyStartDateString").addEventListener("change",()=>{document.querySelector("#lotOccupancy--occupancyEndDateString").min=document.querySelector("#lotOccupancy--occupancyStartDateString").value}),e.initializeUnlockFieldButtons(s)})();
|
||||||
|
|
@ -11,7 +11,8 @@ import { getOccupants } from "../helpers/lotOccupancyDB/getOccupants.js";
|
||||||
import { addOccupant } from "../helpers/lotOccupancyDB/addOccupant.js";
|
import { addOccupant } from "../helpers/lotOccupancyDB/addOccupant.js";
|
||||||
import { addLotOccupancy } from "../helpers/lotOccupancyDB/addLotOccupancy.js";
|
import { addLotOccupancy } from "../helpers/lotOccupancyDB/addLotOccupancy.js";
|
||||||
import { addLotOccupancyOccupant } from "../helpers/lotOccupancyDB/addLotOccupancyOccupant.js";
|
import { addLotOccupancyOccupant } from "../helpers/lotOccupancyDB/addLotOccupancyOccupant.js";
|
||||||
import addLotOccupancyComment from "../helpers/lotOccupancyDB/addLotOccupancyComment.js";
|
import { addLotOccupancyComment } from "../helpers/lotOccupancyDB/addLotOccupancyComment.js";
|
||||||
|
import { addLotOccupancyField } from "../helpers/lotOccupancyDB/addLotOccupancyField.js";
|
||||||
const user = {
|
const user = {
|
||||||
user: {
|
user: {
|
||||||
userName: "import.unix",
|
userName: "import.unix",
|
||||||
|
|
@ -53,6 +54,19 @@ function formatDateString(year, month, day) {
|
||||||
("00" + month).slice(-2) + "-" +
|
("00" + month).slice(-2) + "-" +
|
||||||
("00" + day).slice(-2);
|
("00" + day).slice(-2);
|
||||||
}
|
}
|
||||||
|
const cemeteryToMapName = {
|
||||||
|
"00": "Crematorium",
|
||||||
|
"GC": "New Greenwood - Columbarium",
|
||||||
|
"HC": "Holy Sepulchre - Columbarium",
|
||||||
|
"HS": "Holy Sepulchre",
|
||||||
|
"MA": "Holy Sepulchre - Mausoleum",
|
||||||
|
"NG": "New Greenwood",
|
||||||
|
"NW": "Niche Wall",
|
||||||
|
"OG": "Old Greenwood",
|
||||||
|
"PG": "Pine Grove",
|
||||||
|
"UG": "New Greenwood - Urn Garden",
|
||||||
|
"WK": "West Korah"
|
||||||
|
};
|
||||||
const mapCache = new Map();
|
const mapCache = new Map();
|
||||||
function getMap(masterRow) {
|
function getMap(masterRow) {
|
||||||
let mapCacheKey = masterRow.CM_CEMETERY;
|
let mapCacheKey = masterRow.CM_CEMETERY;
|
||||||
|
|
@ -67,7 +81,7 @@ function getMap(masterRow) {
|
||||||
if (!map) {
|
if (!map) {
|
||||||
console.log("Creating map: " + masterRow.CM_CEMETERY);
|
console.log("Creating map: " + masterRow.CM_CEMETERY);
|
||||||
const mapId = addMap({
|
const mapId = addMap({
|
||||||
mapName: masterRow.CM_CEMETERY,
|
mapName: cemeteryToMapName[masterRow.CM_CEMETERY] || masterRow.CM_CEMETERY,
|
||||||
mapDescription: masterRow.CM_CEMETERY,
|
mapDescription: masterRow.CM_CEMETERY,
|
||||||
mapSVG: "",
|
mapSVG: "",
|
||||||
mapLatitude: "",
|
mapLatitude: "",
|
||||||
|
|
@ -248,6 +262,71 @@ function importFromCSV() {
|
||||||
lotOccupantTypeId: deceasedLotOccupantType.lotOccupantTypeId,
|
lotOccupantTypeId: deceasedLotOccupantType.lotOccupantTypeId,
|
||||||
occupantId
|
occupantId
|
||||||
}, user);
|
}, user);
|
||||||
|
if (masterRow.CM_DEATH_YR !== "") {
|
||||||
|
const lotOccupancyFieldValue = formatDateString(masterRow.CM_DEATH_YR, masterRow.CM_DEATH_MON, masterRow.CM_DEATH_DAY);
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Death Date";
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
if (masterRow.CM_AGE !== "") {
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Death Age";
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue: masterRow.CM_AGE
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
if (masterRow.CM_PERIOD !== "") {
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Death Age Period";
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue: masterRow.CM_PERIOD
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
if (masterRow.CM_FUNERAL_HOME !== "") {
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Funeral Home";
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue: masterRow.CM_FUNERAL_HOME
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
if (masterRow.CM_FUNERAL_YR !== "") {
|
||||||
|
const lotOccupancyFieldValue = formatDateString(masterRow.CM_FUNERAL_YR, masterRow.CM_FUNERAL_MON, masterRow.CM_FUNERAL_DAY);
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Funeral Date";
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
if (masterRow.CM_CONTAINER_TYPE !== "") {
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Container Type";
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue: masterRow.CM_CONTAINER_TYPE
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
if (masterRow.CM_COMMITTAL_TYPE !== "") {
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Committal Type";
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue: masterRow.CM_COMMITTAL_TYPE
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
if (masterRow.CM_REMARK1 !== "") {
|
if (masterRow.CM_REMARK1 !== "") {
|
||||||
addLotOccupancyComment({
|
addLotOccupancyComment({
|
||||||
lotOccupancyId,
|
lotOccupancyId,
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,15 @@ import {
|
||||||
addLotOccupancyOccupant
|
addLotOccupancyOccupant
|
||||||
} from "../helpers/lotOccupancyDB/addLotOccupancyOccupant.js";
|
} from "../helpers/lotOccupancyDB/addLotOccupancyOccupant.js";
|
||||||
|
|
||||||
import type * as recordTypes from "../types/recordTypes";
|
import {
|
||||||
|
addLotOccupancyComment
|
||||||
|
} from "../helpers/lotOccupancyDB/addLotOccupancyComment.js";
|
||||||
|
|
||||||
import addLotOccupancyComment from "../helpers/lotOccupancyDB/addLotOccupancyComment.js";
|
import {
|
||||||
|
addLotOccupancyField
|
||||||
|
} from "../helpers/lotOccupancyDB/addLotOccupancyField.js";
|
||||||
|
|
||||||
|
import type * as recordTypes from "../types/recordTypes";
|
||||||
|
|
||||||
|
|
||||||
interface MasterRecord {
|
interface MasterRecord {
|
||||||
|
|
@ -147,6 +153,20 @@ function formatDateString(year: string, month: string, day: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const cemeteryToMapName = {
|
||||||
|
"00": "Crematorium",
|
||||||
|
"GC": "New Greenwood - Columbarium",
|
||||||
|
"HC": "Holy Sepulchre - Columbarium",
|
||||||
|
"HS": "Holy Sepulchre",
|
||||||
|
"MA": "Holy Sepulchre - Mausoleum",
|
||||||
|
"NG": "New Greenwood",
|
||||||
|
"NW": "Niche Wall",
|
||||||
|
"OG": "Old Greenwood",
|
||||||
|
"PG": "Pine Grove",
|
||||||
|
"UG": "New Greenwood - Urn Garden",
|
||||||
|
"WK": "West Korah"
|
||||||
|
}
|
||||||
|
|
||||||
const mapCache: Map < string, recordTypes.Map > = new Map();
|
const mapCache: Map < string, recordTypes.Map > = new Map();
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -171,7 +191,7 @@ function getMap(masterRow: MasterRecord): recordTypes.Map {
|
||||||
console.log("Creating map: " + masterRow.CM_CEMETERY);
|
console.log("Creating map: " + masterRow.CM_CEMETERY);
|
||||||
|
|
||||||
const mapId = addMap({
|
const mapId = addMap({
|
||||||
mapName: masterRow.CM_CEMETERY,
|
mapName: cemeteryToMapName[masterRow.CM_CEMETERY] || masterRow.CM_CEMETERY,
|
||||||
mapDescription: masterRow.CM_CEMETERY,
|
mapDescription: masterRow.CM_CEMETERY,
|
||||||
mapSVG: "",
|
mapSVG: "",
|
||||||
mapLatitude: "",
|
mapLatitude: "",
|
||||||
|
|
@ -404,12 +424,99 @@ function importFromCSV() {
|
||||||
occupancyEndDateString
|
occupancyEndDateString
|
||||||
}, user);
|
}, user);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
addLotOccupancyOccupant({
|
addLotOccupancyOccupant({
|
||||||
lotOccupancyId,
|
lotOccupancyId,
|
||||||
lotOccupantTypeId: deceasedLotOccupantType.lotOccupantTypeId,
|
lotOccupantTypeId: deceasedLotOccupantType.lotOccupantTypeId,
|
||||||
occupantId
|
occupantId
|
||||||
}, user);
|
}, user);
|
||||||
|
|
||||||
|
if (masterRow.CM_DEATH_YR !== "") {
|
||||||
|
|
||||||
|
const lotOccupancyFieldValue = formatDateString(masterRow.CM_DEATH_YR,
|
||||||
|
masterRow.CM_DEATH_MON,
|
||||||
|
masterRow.CM_DEATH_DAY);
|
||||||
|
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Death Date"
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (masterRow.CM_AGE !== "") {
|
||||||
|
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Death Age"
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue: masterRow.CM_AGE
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (masterRow.CM_PERIOD !== "") {
|
||||||
|
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Death Age Period"
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue: masterRow.CM_PERIOD
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (masterRow.CM_FUNERAL_HOME !== "") {
|
||||||
|
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Funeral Home"
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue: masterRow.CM_FUNERAL_HOME
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (masterRow.CM_FUNERAL_YR !== "") {
|
||||||
|
|
||||||
|
const lotOccupancyFieldValue = formatDateString(masterRow.CM_FUNERAL_YR,
|
||||||
|
masterRow.CM_FUNERAL_MON,
|
||||||
|
masterRow.CM_FUNERAL_DAY);
|
||||||
|
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Funeral Date"
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (masterRow.CM_CONTAINER_TYPE !== "") {
|
||||||
|
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Container Type"
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue: masterRow.CM_CONTAINER_TYPE
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (masterRow.CM_COMMITTAL_TYPE !== "") {
|
||||||
|
|
||||||
|
addLotOccupancyField({
|
||||||
|
lotOccupancyId,
|
||||||
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
|
return occupancyTypeField.occupancyTypeField === "Committal Type"
|
||||||
|
}).occupancyTypeFieldId,
|
||||||
|
lotOccupancyFieldValue: masterRow.CM_COMMITTAL_TYPE
|
||||||
|
}, user);
|
||||||
|
}
|
||||||
|
|
||||||
if (masterRow.CM_REMARK1 !== "") {
|
if (masterRow.CM_REMARK1 !== "") {
|
||||||
addLotOccupancyComment({
|
addLotOccupancyComment({
|
||||||
lotOccupancyId,
|
lotOccupancyId,
|
||||||
|
|
|
||||||
|
|
@ -99,9 +99,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="columns">
|
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="lotOccupancy--occupancyStartDateString">Start Date</label>
|
<label class="label" for="lotOccupancy--occupancyStartDateString">Start Date</label>
|
||||||
|
|
@ -110,26 +107,66 @@
|
||||||
value="<%= lotOccupancy.occupancyStartDateString %>" required />
|
value="<%= lotOccupancy.occupancyStartDateString %>" required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="column">
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="lotOccupancy--occupancyEndDateString">End Date</label>
|
<label class="label" for="lotOccupancy--occupancyEndDateString">End Date</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input class="input" id="lotOccupancy--occupancyEndDateString" name="occupancyEndDateString" type="date"
|
<input class="input" id="lotOccupancy--occupancyEndDateString" name="occupancyEndDateString" type="date"
|
||||||
value="<%= lotOccupancy.occupancyEndDateString %>"
|
value="<%= lotOccupancy.occupancyEndDateString %>"
|
||||||
min=""<%= lotOccupancy.occupancyStartDateString %>"
|
min="<%= lotOccupancy.occupancyStartDateString %>"
|
||||||
<%= (configFunctions.getProperty("settings.lotOccupancy.occupancyEndDateIsRequired") ? " required" : "") %> />
|
<%= (configFunctions.getProperty("settings.lotOccupancy.occupancyEndDateIsRequired") ? " required" : "") %> />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<div id="container--lotOccupancyFields">
|
||||||
|
<% if (isCreate) { %>
|
||||||
|
<div class="message is-info">
|
||||||
|
<p class="message-body">
|
||||||
|
Select the <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> type to get the available fields.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<% } else if (lotOccupancy.lotOccupancyFields.length === 0) { %>
|
||||||
|
<div class="message is-info">
|
||||||
|
<p class="message-body">
|
||||||
|
The current <%= configFunctions.getProperty("aliases.occupancy").toLowerCase() %> type has no additional fields.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<% } else { %>
|
||||||
|
<% let occupancyTypeFieldIds = ""; %>
|
||||||
|
<% for (const lotOccupancyField of lotOccupancy.lotOccupancyFields) { %>
|
||||||
|
<% occupancyTypeFieldIds += "," + lotOccupancyField.occupancyTypeFieldId; %>
|
||||||
|
<div class="field">
|
||||||
|
<label class="label" for="lotOccupancy--lotOccupancyFieldValue_<%= lotOccupancyField.occupancyTypeFieldId %>">
|
||||||
|
<%= lotOccupancyField.occupancyTypeField %>
|
||||||
|
</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input"
|
||||||
|
id="lotOccupancy--lotOccupancyFieldValue_<%= lotOccupancyField.occupancyTypeFieldId %>"
|
||||||
|
name="lotOccupancyFieldValue_<%= lotOccupancyField.occupancyTypeFieldId %>"
|
||||||
|
type="text"
|
||||||
|
value="<%= lotOccupancyField.lotOccupancyFieldValue %>"
|
||||||
|
<% if (lotOccupancyField.pattern !== "") { %>
|
||||||
|
pattern="<%= lotOccupancyField.pattern %>"
|
||||||
|
<% } %>
|
||||||
|
minlength="<%= lotOccupancyField.minimumLength %>"
|
||||||
|
maxlength="<%= lotOccupancyField.maximumLength %>" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
<input id="lotOccupancy--occupancyTypeFieldIds" name="occupancyTypeFieldIds" type="hidden" value="<%= occupancyTypeFieldIds.slice(1) %>" />
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<% if (isCreate) { %>
|
<% if (isCreate) { %>
|
||||||
|
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
|
||||||
<h2 class="title is-4"><%= configFunctions.getProperty("aliases.occupants") %></h2>
|
<h2 class="title is-4 mt-2"><%= configFunctions.getProperty("aliases.occupants") %></h2>
|
||||||
|
|
||||||
<h2 class="title is-4">Comments</h2>
|
<h2 class="title is-4">Comments</h2>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,25 +46,35 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<p>
|
<p class="mb-2">
|
||||||
<strong><%= configFunctions.getProperty("aliases.lot") %></strong><br />
|
<strong><%= configFunctions.getProperty("aliases.lot") %></strong><br />
|
||||||
<a href="<%= urlPrefix %>/lots/<%= lotOccupancy.lotId %>"><%= lotOccupancy.lotName %></a>
|
<a href="<%= urlPrefix %>/lots/<%= lotOccupancy.lotId %>"><%= lotOccupancy.lotName %></a>
|
||||||
</p>
|
</p>
|
||||||
<p class="mt-2">
|
<p>
|
||||||
<strong><%= configFunctions.getProperty("aliases.map") %></strong><br />
|
<strong><%= configFunctions.getProperty("aliases.map") %></strong><br />
|
||||||
<a href="<%= urlPrefix %>/maps/<%= lotOccupancy.mapId %>"><%= lotOccupancy.mapName %></a>
|
<a href="<%= urlPrefix %>/maps/<%= lotOccupancy.mapId %>"><%= lotOccupancy.mapName %></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<p>
|
<p class="mb-2">
|
||||||
<strong>Start Date</strong><br />
|
<strong>Start Date</strong><br />
|
||||||
<%= lotOccupancy.occupancyStartDateString %>
|
<%= lotOccupancy.occupancyStartDateString %>
|
||||||
</p>
|
</p>
|
||||||
<p class="mt-2">
|
<p>
|
||||||
<strong>End Date</strong><br />
|
<strong>End Date</strong><br />
|
||||||
<%= (lotOccupancy.occupancyEndDateString === "" ? "(No End Date)" : lotOccupancy.occupancyEndDateString) %>
|
<%= (lotOccupancy.occupancyEndDateString === "" ? "(No End Date)" : lotOccupancy.occupancyEndDateString) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<% if (lotOccupancy.lotOccupancyFields.length > 0) { %>
|
||||||
|
<div class="column">
|
||||||
|
<% for (const lotOccupancyField of lotOccupancy.lotOccupancyFields) { %>
|
||||||
|
<p class="mb-2">
|
||||||
|
<strong><%= lotOccupancyField.occupancyTypeField %></strong><br />
|
||||||
|
<%= lotOccupancyField.lotOccupancyFieldValue || "(No Value)" %>
|
||||||
|
</p>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 class="title is-4"><%= configFunctions.getProperty("aliases.occupants") %></h2>
|
<h2 class="title is-4"><%= configFunctions.getProperty("aliases.occupants") %></h2>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue