parent
dd6ac7114c
commit
8da22d137a
|
|
@ -1,7 +1,20 @@
|
||||||
|
import { dateToInteger, dateToString } from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||||
import { getOccupancyTypes } from "../../helpers/functions.cache.js";
|
import { getOccupancyTypes } from "../../helpers/functions.cache.js";
|
||||||
|
import { getLot } from "../../helpers/lotOccupancyDB/getLot.js";
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from "../../helpers/functions.config.js";
|
||||||
export const handler = (request, response) => {
|
export const handler = (request, response) => {
|
||||||
const lotOccupancy = {};
|
const startDate = new Date();
|
||||||
|
const lotOccupancy = {
|
||||||
|
occupancyStartDate: dateToInteger(startDate),
|
||||||
|
occupancyStartDateString: dateToString(startDate)
|
||||||
|
};
|
||||||
|
if (request.query.lotId) {
|
||||||
|
const lot = getLot(request.query.lotId);
|
||||||
|
lotOccupancy.lotId = lot.lotId;
|
||||||
|
lotOccupancy.lotName = lot.lotName;
|
||||||
|
lotOccupancy.mapId = lot.mapId;
|
||||||
|
lotOccupancy.mapName = lot.mapName;
|
||||||
|
}
|
||||||
const occupancyTypes = getOccupancyTypes();
|
const occupancyTypes = getOccupancyTypes();
|
||||||
return response.render("lotOccupancy-edit", {
|
return response.render("lotOccupancy-edit", {
|
||||||
headTitle: "Create a New " + configFunctions.getProperty("aliases.lot") + " " + configFunctions.getProperty("aliases.occupancy") + " Record",
|
headTitle: "Create a New " + configFunctions.getProperty("aliases.lot") + " " + configFunctions.getProperty("aliases.occupancy") + " Record",
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
import {
|
||||||
|
dateToInteger,
|
||||||
|
dateToString
|
||||||
|
} from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||||
import type {
|
import type {
|
||||||
RequestHandler
|
RequestHandler
|
||||||
} from "express";
|
} from "express";
|
||||||
|
|
@ -6,6 +10,10 @@ import {
|
||||||
getOccupancyTypes
|
getOccupancyTypes
|
||||||
} from "../../helpers/functions.cache.js";
|
} from "../../helpers/functions.cache.js";
|
||||||
|
|
||||||
|
import {
|
||||||
|
getLot
|
||||||
|
} from "../../helpers/lotOccupancyDB/getLot.js";
|
||||||
|
|
||||||
import * as configFunctions from "../../helpers/functions.config.js";
|
import * as configFunctions from "../../helpers/functions.config.js";
|
||||||
|
|
||||||
import type * as recordTypes from "../../types/recordTypes";
|
import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
|
@ -13,10 +21,21 @@ import type * as recordTypes from "../../types/recordTypes";
|
||||||
|
|
||||||
export const handler: RequestHandler = (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
|
|
||||||
const lotOccupancy: recordTypes.LotOccupancy = {
|
const startDate = new Date();
|
||||||
|
|
||||||
|
const lotOccupancy: recordTypes.LotOccupancy = {
|
||||||
|
occupancyStartDate: dateToInteger(startDate),
|
||||||
|
occupancyStartDateString: dateToString(startDate)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (request.query.lotId) {
|
||||||
|
const lot = getLot(request.query.lotId as string);
|
||||||
|
lotOccupancy.lotId = lot.lotId;
|
||||||
|
lotOccupancy.lotName = lot.lotName;
|
||||||
|
lotOccupancy.mapId = lot.mapId;
|
||||||
|
lotOccupancy.mapName = lot.mapName;
|
||||||
|
}
|
||||||
|
|
||||||
const occupancyTypes = getOccupancyTypes();
|
const occupancyTypes = getOccupancyTypes();
|
||||||
|
|
||||||
return response.render("lotOccupancy-edit", {
|
return response.render("lotOccupancy-edit", {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,24 @@
|
||||||
|
import { getReportData } from "../../helpers/lotOccupancyDB/getReportData.js";
|
||||||
|
import papaparse from "papaparse";
|
||||||
export const handler = (request, response) => {
|
export const handler = (request, response) => {
|
||||||
|
const reportName = request.params.reportName;
|
||||||
|
let rows;
|
||||||
|
switch (reportName) {
|
||||||
|
default:
|
||||||
|
rows = getReportData(reportName, request.query);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!rows) {
|
||||||
|
return response
|
||||||
|
.status(404)
|
||||||
|
.json({
|
||||||
|
success: false,
|
||||||
|
message: "Report Not Found"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const csv = papaparse.unparse(rows);
|
||||||
|
response.setHeader("Content-Disposition", "attachment; filename=" + reportName + "-" + Date.now().toString() + ".csv");
|
||||||
|
response.setHeader("Content-Type", "text/csv");
|
||||||
|
response.send(csv);
|
||||||
};
|
};
|
||||||
export default handler;
|
export default handler;
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,38 @@
|
||||||
import type { RequestHandler } from "express";
|
import type {
|
||||||
|
RequestHandler
|
||||||
|
} from "express";
|
||||||
|
|
||||||
// import * as configFunctions from "../../helpers/functions.config.js";
|
import {
|
||||||
|
getReportData,
|
||||||
|
ReportParameters
|
||||||
|
} from "../../helpers/lotOccupancyDB/getReportData.js";
|
||||||
|
|
||||||
|
import papaparse from "papaparse";
|
||||||
|
|
||||||
|
|
||||||
export const handler: RequestHandler = (request, response) => {
|
export const handler: RequestHandler = (request, response) => {
|
||||||
|
|
||||||
// const reportName = request.params.reportName;
|
const reportName = request.params.reportName;
|
||||||
|
|
||||||
/*
|
let rows: unknown[];
|
||||||
const csv = rawToCSV(rowsColumnsObject);
|
|
||||||
|
switch (reportName) {
|
||||||
|
|
||||||
|
default:
|
||||||
|
rows = getReportData(reportName, request.query as ReportParameters);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!rows) {
|
||||||
|
return response
|
||||||
|
.status(404)
|
||||||
|
.json({
|
||||||
|
success: false,
|
||||||
|
message: "Report Not Found"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const csv = papaparse.unparse(rows);
|
||||||
|
|
||||||
response.setHeader("Content-Disposition",
|
response.setHeader("Content-Disposition",
|
||||||
"attachment; filename=" + reportName + "-" + Date.now().toString() + ".csv");
|
"attachment; filename=" + reportName + "-" + Date.now().toString() + ".csv");
|
||||||
|
|
@ -16,7 +40,6 @@ export const handler: RequestHandler = (request, response) => {
|
||||||
response.setHeader("Content-Type", "text/csv");
|
response.setHeader("Content-Type", "text/csv");
|
||||||
|
|
||||||
response.send(csv);
|
response.send(csv);
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ export const addLotOccupancyOccupant = (lotOccupancyOccupantForm, requestSession
|
||||||
const maxIndexResult = database.prepare("select lotOccupantIndex" +
|
const maxIndexResult = database.prepare("select lotOccupantIndex" +
|
||||||
" from LotOccupancyOccupants" +
|
" from LotOccupancyOccupants" +
|
||||||
" where lotOccupancyId = ?" +
|
" where lotOccupancyId = ?" +
|
||||||
" order by lotOccupantIndex" +
|
" order by lotOccupantIndex desc" +
|
||||||
" limit 1")
|
" limit 1")
|
||||||
.get(lotOccupancyOccupantForm.lotOccupancyId);
|
.get(lotOccupancyOccupantForm.lotOccupancyId);
|
||||||
if (maxIndexResult) {
|
if (maxIndexResult) {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export const addLotOccupancyOccupant =
|
||||||
const maxIndexResult = database.prepare("select lotOccupantIndex" +
|
const maxIndexResult = database.prepare("select lotOccupantIndex" +
|
||||||
" from LotOccupancyOccupants" +
|
" from LotOccupancyOccupants" +
|
||||||
" where lotOccupancyId = ?" +
|
" where lotOccupancyId = ?" +
|
||||||
" order by lotOccupantIndex" +
|
" order by lotOccupantIndex desc" +
|
||||||
" limit 1")
|
" limit 1")
|
||||||
.get(lotOccupancyOccupantForm.lotOccupancyId);
|
.get(lotOccupancyOccupantForm.lotOccupancyId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,13 @@ export const addLotOccupancyTransaction = (lotOccupancyTransactionForm, requestS
|
||||||
const maxIndexResult = database.prepare("select transactionIndex" +
|
const maxIndexResult = database.prepare("select transactionIndex" +
|
||||||
" from LotOccupancyTransactions" +
|
" from LotOccupancyTransactions" +
|
||||||
" where lotOccupancyId = ?" +
|
" where lotOccupancyId = ?" +
|
||||||
" order by transactionIndex" +
|
" order by transactionIndex desc" +
|
||||||
" limit 1")
|
" limit 1")
|
||||||
.get(lotOccupancyTransactionForm.lotOccupancyId);
|
.get(lotOccupancyTransactionForm.lotOccupancyId);
|
||||||
if (maxIndexResult) {
|
if (maxIndexResult) {
|
||||||
transactionIndex = maxIndexResult.transactionIndex + 1;
|
transactionIndex = maxIndexResult.transactionIndex + 1;
|
||||||
}
|
}
|
||||||
|
console.log("transactionIndex = " + transactionIndex);
|
||||||
const rightNow = new Date();
|
const rightNow = new Date();
|
||||||
const transactionDate = lotOccupancyTransactionForm.transactionDateString ?
|
const transactionDate = lotOccupancyTransactionForm.transactionDateString ?
|
||||||
dateStringToInteger(lotOccupancyTransactionForm.transactionDateString) :
|
dateStringToInteger(lotOccupancyTransactionForm.transactionDateString) :
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ export const addLotOccupancyTransaction =
|
||||||
const maxIndexResult = database.prepare("select transactionIndex" +
|
const maxIndexResult = database.prepare("select transactionIndex" +
|
||||||
" from LotOccupancyTransactions" +
|
" from LotOccupancyTransactions" +
|
||||||
" where lotOccupancyId = ?" +
|
" where lotOccupancyId = ?" +
|
||||||
" order by transactionIndex" +
|
" order by transactionIndex desc" +
|
||||||
" limit 1")
|
" limit 1")
|
||||||
.get(lotOccupancyTransactionForm.lotOccupancyId);
|
.get(lotOccupancyTransactionForm.lotOccupancyId);
|
||||||
|
|
||||||
|
|
@ -41,6 +41,8 @@ export const addLotOccupancyTransaction =
|
||||||
transactionIndex = maxIndexResult.transactionIndex + 1;
|
transactionIndex = maxIndexResult.transactionIndex + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("transactionIndex = " + transactionIndex);
|
||||||
|
|
||||||
const rightNow = new Date();
|
const rightNow = new Date();
|
||||||
|
|
||||||
const transactionDate = lotOccupancyTransactionForm.transactionDateString ?
|
const transactionDate = lotOccupancyTransactionForm.transactionDateString ?
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
export interface ReportParameters {
|
||||||
|
[parameterName: string]: string | number;
|
||||||
|
}
|
||||||
|
export declare const getReportData: (reportName: string, reportParameters?: ReportParameters) => unknown[];
|
||||||
|
export default getReportData;
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
import { lotOccupancyDB as databasePath } from "../../data/databasePaths.js";
|
||||||
|
import * as configFunctions from "../functions.config.js";
|
||||||
|
import * as dateTimeFunctions from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||||
|
import camelCase from "camelcase";
|
||||||
|
const mapCamelCase = camelCase(configFunctions.getProperty("aliases.map"));
|
||||||
|
const mapNameAlias = mapCamelCase + "Name";
|
||||||
|
const mapDescriptionAlias = mapCamelCase + "Description";
|
||||||
|
const mapAddress1Alias = mapCamelCase + "Address1";
|
||||||
|
const mapAddress2Alias = mapCamelCase + "Address2";
|
||||||
|
const mapCityAlias = mapCamelCase + "City";
|
||||||
|
const mapProvinceAlias = mapCamelCase + "Province";
|
||||||
|
const mapPostalCodeAlias = mapCamelCase + "PostalCode";
|
||||||
|
const mapPhoneNumberAlias = mapCamelCase + "PhoneNumber";
|
||||||
|
export const getReportData = (reportName, reportParameters) => {
|
||||||
|
let sql;
|
||||||
|
const sqlParameters = [];
|
||||||
|
switch (reportName) {
|
||||||
|
case "maps-all":
|
||||||
|
sql = "select * from Maps";
|
||||||
|
break;
|
||||||
|
case "maps-formatted":
|
||||||
|
sql = "select mapName as " + mapNameAlias + "," +
|
||||||
|
" mapDescription as " + mapDescriptionAlias + "," +
|
||||||
|
" mapAddress1 as " + mapAddress1Alias + "," +
|
||||||
|
" mapAddress2 as " + mapAddress2Alias + "," +
|
||||||
|
" mapCity as " + mapCityAlias + "," +
|
||||||
|
" mapProvince as " + mapProvinceAlias + "," +
|
||||||
|
" mapPostalCode as " + mapPostalCodeAlias + "," +
|
||||||
|
" mapPhoneNumber as " + mapPhoneNumberAlias +
|
||||||
|
" from Maps" +
|
||||||
|
" where recordDelete_timeMillis is null" +
|
||||||
|
" order by mapName";
|
||||||
|
break;
|
||||||
|
case "lots-all":
|
||||||
|
sql = "select * from Lots";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const database = sqlite(databasePath, {
|
||||||
|
readonly: true
|
||||||
|
});
|
||||||
|
database.function("userFn_dateIntegerToString", dateTimeFunctions.dateIntegerToString);
|
||||||
|
database.function("userFn_timeIntegerToString", dateTimeFunctions.timeIntegerToString);
|
||||||
|
const rows = database.prepare(sql)
|
||||||
|
.all(sqlParameters);
|
||||||
|
database.close();
|
||||||
|
return rows;
|
||||||
|
};
|
||||||
|
export default getReportData;
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
/* eslint-disable no-case-declarations */
|
||||||
|
|
||||||
|
import sqlite from "better-sqlite3";
|
||||||
|
|
||||||
|
import {
|
||||||
|
lotOccupancyDB as databasePath
|
||||||
|
} from "../../data/databasePaths.js";
|
||||||
|
|
||||||
|
import * as configFunctions from "../functions.config.js";
|
||||||
|
import * as dateTimeFunctions from "@cityssm/expressjs-server-js/dateTimeFns.js";
|
||||||
|
|
||||||
|
import camelCase from "camelcase";
|
||||||
|
|
||||||
|
export interface ReportParameters {
|
||||||
|
[parameterName: string]: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const mapCamelCase = camelCase(configFunctions.getProperty("aliases.map"));
|
||||||
|
|
||||||
|
const mapNameAlias = mapCamelCase + "Name";
|
||||||
|
const mapDescriptionAlias = mapCamelCase + "Description";
|
||||||
|
const mapAddress1Alias = mapCamelCase + "Address1";
|
||||||
|
const mapAddress2Alias = mapCamelCase + "Address2";
|
||||||
|
const mapCityAlias = mapCamelCase + "City";
|
||||||
|
const mapProvinceAlias = mapCamelCase + "Province";
|
||||||
|
const mapPostalCodeAlias = mapCamelCase + "PostalCode";
|
||||||
|
const mapPhoneNumberAlias = mapCamelCase + "PhoneNumber";
|
||||||
|
|
||||||
|
export const getReportData = (reportName: string, reportParameters ? : ReportParameters): unknown[] => {
|
||||||
|
|
||||||
|
let sql: string;
|
||||||
|
const sqlParameters = [];
|
||||||
|
|
||||||
|
switch (reportName) {
|
||||||
|
|
||||||
|
case "maps-all":
|
||||||
|
|
||||||
|
sql = "select * from Maps";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "maps-formatted":
|
||||||
|
|
||||||
|
sql = "select mapName as " + mapNameAlias + "," +
|
||||||
|
" mapDescription as " + mapDescriptionAlias + "," +
|
||||||
|
" mapAddress1 as " + mapAddress1Alias + "," +
|
||||||
|
" mapAddress2 as " + mapAddress2Alias + "," +
|
||||||
|
" mapCity as " + mapCityAlias + "," +
|
||||||
|
" mapProvince as " + mapProvinceAlias + "," +
|
||||||
|
" mapPostalCode as " + mapPostalCodeAlias + "," +
|
||||||
|
" mapPhoneNumber as " + mapPhoneNumberAlias +
|
||||||
|
" from Maps" +
|
||||||
|
" where recordDelete_timeMillis is null" +
|
||||||
|
" order by mapName";
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "lots-all":
|
||||||
|
|
||||||
|
sql = "select * from Lots";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
const database = sqlite(databasePath, {
|
||||||
|
readonly: true
|
||||||
|
});
|
||||||
|
|
||||||
|
database.function("userFn_dateIntegerToString", dateTimeFunctions.dateIntegerToString);
|
||||||
|
database.function("userFn_timeIntegerToString", dateTimeFunctions.timeIntegerToString);
|
||||||
|
|
||||||
|
const rows =
|
||||||
|
database.prepare(sql)
|
||||||
|
.all(sqlParameters);
|
||||||
|
|
||||||
|
database.close();
|
||||||
|
|
||||||
|
return rows;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export default getReportData;
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||||
"activedirectory2": "^2.1.0",
|
"activedirectory2": "^2.1.0",
|
||||||
"better-sqlite3": "^7.6.2",
|
"better-sqlite3": "^7.6.2",
|
||||||
|
"camelcase": "^7.0.0",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
"cookie-parser": "^1.4.6",
|
"cookie-parser": "^1.4.6",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
|
@ -28,6 +29,7 @@
|
||||||
"express-session": "^1.17.3",
|
"express-session": "^1.17.3",
|
||||||
"http-errors": "^2.0.0",
|
"http-errors": "^2.0.0",
|
||||||
"leaflet": "^1.8.0",
|
"leaflet": "^1.8.0",
|
||||||
|
"papaparse": "^5.3.2",
|
||||||
"session-file-store": "^1.5.0"
|
"session-file-store": "^1.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
@ -65,7 +67,6 @@
|
||||||
"gulp-minify": "^3.1.0",
|
"gulp-minify": "^3.1.0",
|
||||||
"gulp-sass": "^5.1.0",
|
"gulp-sass": "^5.1.0",
|
||||||
"nodemon": "^2.0.19",
|
"nodemon": "^2.0.19",
|
||||||
"papaparse": "^5.3.2",
|
|
||||||
"sass": "^1.54.5"
|
"sass": "^1.54.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
@ -2105,12 +2106,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/camelcase": {
|
"node_modules/camelcase": {
|
||||||
"version": "3.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz",
|
||||||
"integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==",
|
"integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=14.16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/chalk": {
|
"node_modules/chalk": {
|
||||||
|
|
@ -7621,8 +7624,7 @@
|
||||||
"node_modules/papaparse": {
|
"node_modules/papaparse": {
|
||||||
"version": "5.3.2",
|
"version": "5.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.3.2.tgz",
|
||||||
"integrity": "sha512-6dNZu0Ki+gyV0eBsFKJhYr+MdQYAzFUGlBMNj3GNrmHxmz1lfRa24CjFObPXtjcetlOv5Ad299MhIK0znp3afw==",
|
"integrity": "sha512-6dNZu0Ki+gyV0eBsFKJhYr+MdQYAzFUGlBMNj3GNrmHxmz1lfRa24CjFObPXtjcetlOv5Ad299MhIK0znp3afw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/parent-module": {
|
"node_modules/parent-module": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
|
@ -10502,6 +10504,15 @@
|
||||||
"object.assign": "^4.1.0"
|
"object.assign": "^4.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/yargs-parser/node_modules/camelcase": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/yargs/node_modules/ansi-regex": {
|
"node_modules/yargs/node_modules/ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||||
|
|
@ -10511,6 +10522,15 @@
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/yargs/node_modules/camelcase": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/yargs/node_modules/find-up": {
|
"node_modules/yargs/node_modules/find-up": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
|
||||||
|
|
@ -12293,10 +12313,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"camelcase": {
|
"camelcase": {
|
||||||
"version": "3.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz",
|
||||||
"integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==",
|
"integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"chalk": {
|
"chalk": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
|
|
@ -16588,8 +16607,7 @@
|
||||||
"papaparse": {
|
"papaparse": {
|
||||||
"version": "5.3.2",
|
"version": "5.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.3.2.tgz",
|
||||||
"integrity": "sha512-6dNZu0Ki+gyV0eBsFKJhYr+MdQYAzFUGlBMNj3GNrmHxmz1lfRa24CjFObPXtjcetlOv5Ad299MhIK0znp3afw==",
|
"integrity": "sha512-6dNZu0Ki+gyV0eBsFKJhYr+MdQYAzFUGlBMNj3GNrmHxmz1lfRa24CjFObPXtjcetlOv5Ad299MhIK0znp3afw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"parent-module": {
|
"parent-module": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
|
@ -18850,6 +18868,12 @@
|
||||||
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
|
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"camelcase": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"find-up": {
|
"find-up": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
|
||||||
|
|
@ -18940,6 +18964,14 @@
|
||||||
"requires": {
|
"requires": {
|
||||||
"camelcase": "^3.0.0",
|
"camelcase": "^3.0.0",
|
||||||
"object.assign": "^4.1.0"
|
"object.assign": "^4.1.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"camelcase": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yocto-queue": {
|
"yocto-queue": {
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||||
"activedirectory2": "^2.1.0",
|
"activedirectory2": "^2.1.0",
|
||||||
"better-sqlite3": "^7.6.2",
|
"better-sqlite3": "^7.6.2",
|
||||||
|
"camelcase": "^7.0.0",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
"cookie-parser": "^1.4.6",
|
"cookie-parser": "^1.4.6",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
|
@ -49,6 +50,7 @@
|
||||||
"express-session": "^1.17.3",
|
"express-session": "^1.17.3",
|
||||||
"http-errors": "^2.0.0",
|
"http-errors": "^2.0.0",
|
||||||
"leaflet": "^1.8.0",
|
"leaflet": "^1.8.0",
|
||||||
|
"papaparse": "^5.3.2",
|
||||||
"session-file-store": "^1.5.0"
|
"session-file-store": "^1.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
@ -86,7 +88,6 @@
|
||||||
"gulp-minify": "^3.1.0",
|
"gulp-minify": "^3.1.0",
|
||||||
"gulp-sass": "^5.1.0",
|
"gulp-sass": "^5.1.0",
|
||||||
"nodemon": "^2.0.19",
|
"nodemon": "^2.0.19",
|
||||||
"papaparse": "^5.3.2",
|
|
||||||
"sass": "^1.54.5"
|
"sass": "^1.54.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -896,6 +896,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
lotOccupancyTransactionsContainerElement.querySelector("#lotOccupancyTransactions--grandTotal").textContent = "$" + transactionGrandTotal.toFixed(2);
|
lotOccupancyTransactionsContainerElement.querySelector("#lotOccupancyTransactions--grandTotal").textContent = "$" + transactionGrandTotal.toFixed(2);
|
||||||
const feeGrandTotal = getFeeGrandTotal();
|
const feeGrandTotal = getFeeGrandTotal();
|
||||||
if (feeGrandTotal > transactionGrandTotal) {
|
if (feeGrandTotal > transactionGrandTotal) {
|
||||||
|
lotOccupancyTransactionsContainerElement.insertAdjacentHTML("afterbegin", "<div class=\"message is-warning\">" +
|
||||||
|
"<div class=\"message-body\">" +
|
||||||
|
"<div class=\"level\">" +
|
||||||
|
"<div class=\"level-left\"><div class=\"level-item\">Outstanding Balance</div></div>" +
|
||||||
|
"<div class=\"level-right\"><div class=\"level-item\">$" + (feeGrandTotal - transactionGrandTotal).toFixed(2) + "</div></div>" +
|
||||||
|
"</div>" +
|
||||||
|
"</div>" +
|
||||||
|
"</div>");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
document.querySelector("#button--addTransaction").addEventListener("click", () => {
|
document.querySelector("#button--addTransaction").addEventListener("click", () => {
|
||||||
|
|
|
||||||
|
|
@ -1247,10 +1247,15 @@ declare const bulmaJS: BulmaJS;
|
||||||
|
|
||||||
if (feeGrandTotal > transactionGrandTotal) {
|
if (feeGrandTotal > transactionGrandTotal) {
|
||||||
|
|
||||||
/*
|
|
||||||
lotOccupancyTransactionsContainerElement.insertAdjacentHTML("afterbegin",
|
lotOccupancyTransactionsContainerElement.insertAdjacentHTML("afterbegin",
|
||||||
"<div ")
|
"<div class=\"message is-warning\">" +
|
||||||
*/
|
"<div class=\"message-body\">" +
|
||||||
|
"<div class=\"level\">" +
|
||||||
|
"<div class=\"level-left\"><div class=\"level-item\">Outstanding Balance</div></div>" +
|
||||||
|
"<div class=\"level-right\"><div class=\"level-item\">$" + (feeGrandTotal - transactionGrandTotal).toFixed(2) + "</div></div>" +
|
||||||
|
"</div>" +
|
||||||
|
"</div>" +
|
||||||
|
"</div>");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -301,12 +301,16 @@ function importFromCSV() {
|
||||||
}, user);
|
}, user);
|
||||||
}
|
}
|
||||||
if (masterRow.CM_COMMITTAL_TYPE !== "") {
|
if (masterRow.CM_COMMITTAL_TYPE !== "") {
|
||||||
|
let commitalType = masterRow.CM_COMMITTAL_TYPE;
|
||||||
|
if (commitalType === "GS") {
|
||||||
|
commitalType = "Graveside";
|
||||||
|
}
|
||||||
addOrUpdateLotOccupancyField({
|
addOrUpdateLotOccupancyField({
|
||||||
lotOccupancyId,
|
lotOccupancyId,
|
||||||
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
return occupancyTypeField.occupancyTypeField === "Committal Type";
|
return occupancyTypeField.occupancyTypeField === "Committal Type";
|
||||||
}).occupancyTypeFieldId,
|
}).occupancyTypeFieldId,
|
||||||
lotOccupancyFieldValue: masterRow.CM_COMMITTAL_TYPE
|
lotOccupancyFieldValue: commitalType
|
||||||
}, user);
|
}, user);
|
||||||
}
|
}
|
||||||
if (masterRow.CM_REMARK1 !== "") {
|
if (masterRow.CM_REMARK1 !== "") {
|
||||||
|
|
|
||||||
|
|
@ -487,12 +487,18 @@ function importFromCSV() {
|
||||||
|
|
||||||
if (masterRow.CM_COMMITTAL_TYPE !== "") {
|
if (masterRow.CM_COMMITTAL_TYPE !== "") {
|
||||||
|
|
||||||
|
let commitalType = masterRow.CM_COMMITTAL_TYPE;
|
||||||
|
|
||||||
|
if (commitalType === "GS") {
|
||||||
|
commitalType = "Graveside";
|
||||||
|
}
|
||||||
|
|
||||||
addOrUpdateLotOccupancyField({
|
addOrUpdateLotOccupancyField({
|
||||||
lotOccupancyId,
|
lotOccupancyId,
|
||||||
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
occupancyTypeFieldId: deceasedOccupancyType.occupancyTypeFields.find((occupancyTypeField) => {
|
||||||
return occupancyTypeField.occupancyTypeField === "Committal Type"
|
return occupancyTypeField.occupancyTypeField === "Committal Type"
|
||||||
}).occupancyTypeFieldId,
|
}).occupancyTypeFieldId,
|
||||||
lotOccupancyFieldValue: masterRow.CM_COMMITTAL_TYPE
|
lotOccupancyFieldValue: commitalType
|
||||||
}, user);
|
}, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="panel">
|
||||||
|
<div class="panel-block is-block">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
@ -86,7 +88,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button class="button is-unlock-field-button" type="button" title="Unlock Field">
|
<button class="button is-unlock-field-button" data-tooltip="Unlock Field" type="button" aria-label="Unlock Field">
|
||||||
<i class="fas fa-unlock" aria-hidden="true"></i>
|
<i class="fas fa-unlock" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -124,10 +126,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2 class="title is-4">Geographic Location</h2>
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">Geographic Location</h2>
|
||||||
|
<div class="panel-block is-block">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="lot--lotLatitude">Latitude</label>
|
<label class="label" for="lot--lotLatitude">Latitude</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
|
@ -141,8 +147,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2 class="title is-4">Image</h2>
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">Image</h2>
|
||||||
|
<div class="panel-block is-block">
|
||||||
<label class="label" for="lot--mapId"><%= configFunctions.getProperty("aliases.map") %></label>
|
<label class="label" for="lot--mapId"><%= configFunctions.getProperty("aliases.map") %></label>
|
||||||
<div class="field has-addons">
|
<div class="field has-addons">
|
||||||
<div class="control is-expanded">
|
<div class="control is-expanded">
|
||||||
|
|
@ -173,7 +183,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button class="button is-unlock-field-button" type="button" title="Unlock Field">
|
<button class="button is-unlock-field-button" data-tooltip="Unlock Field" type="button" aria-label="Unlock Field">
|
||||||
<i class="fas fa-unlock" aria-hidden="true"></i>
|
<i class="fas fa-unlock" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -195,13 +205,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="columns">
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<h2 class="title is-4">
|
<div class="panel mb-5">
|
||||||
|
<h2 class="panel-heading">
|
||||||
Additional Details
|
Additional Details
|
||||||
</h2>
|
</h2>
|
||||||
|
<div class="panel-block"></div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<% if (isCreate) { %>
|
<% if (isCreate) { %>
|
||||||
|
|
@ -211,25 +222,51 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="columns is-mobile mt-2">
|
<div class="panel">
|
||||||
<div class="column">
|
<div class="panel-heading">
|
||||||
<h2 class="title is-4">
|
<div class="level is-mobile">
|
||||||
|
<div class="level-left">
|
||||||
|
<div class="level-item">
|
||||||
|
<h2 class="has-text-weight-bold is-size-5">
|
||||||
Comments
|
Comments
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-narrow has-text-right">
|
</div>
|
||||||
|
<div class="level-right">
|
||||||
|
<div class="level-item">
|
||||||
<button class="button is-small is-success" id="lotComments--add" type="button">
|
<button class="button is-small is-success" id="lotComments--add" type="button">
|
||||||
<span class="icon is-small"><i class="fas fa-plus" aria-hidden="true"></i></span>
|
<span class="icon is-small"><i class="fas fa-plus" aria-hidden="true"></i></span>
|
||||||
<span>Add a Comment</span>
|
<span>Add a Comment</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="container--lotComments"></div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="panel-block is-block" id="container--lotComments"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2 class="title is-4 mt-2">
|
<div class="panel">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<div class="level is-mobile">
|
||||||
|
<div class="level-left">
|
||||||
|
<div class="level-item">
|
||||||
|
<h2 class="has-text-weight-bold is-size-5">
|
||||||
<%= configFunctions.getProperty("aliases.occupancies") %>
|
<%= configFunctions.getProperty("aliases.occupancies") %>
|
||||||
<span class="tag"><%= lot.lotOccupancies.length %></span>
|
<span class="tag"><%= lot.lotOccupancies.length %></span>
|
||||||
</h2>
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="level-right">
|
||||||
|
<div class="level-item">
|
||||||
|
<a class="button is-success is-small has-text-weight-normal" href="<%= urlPrefix %>/lotOccupancies/new?lotId=<%= lot.lotId %>">
|
||||||
|
<span class="icon is-small"><i class="fas fa-plus" aria-hidden="true"></i></span>
|
||||||
|
<span>Create New <%= configFunctions.getProperty("aliases.occupancy") %></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% if (lot.lotOccupancies.length === 0) { %>
|
<% if (lot.lotOccupancies.length === 0) { %>
|
||||||
<div class="message is-info">
|
<div class="message is-info">
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,9 @@
|
||||||
|
|
||||||
<% if (user.userProperties.canUpdate) { %>
|
<% if (user.userProperties.canUpdate) { %>
|
||||||
<div class="fixed-container is-fixed-bottom-right mx-4 my-4 has-text-right is-hidden-print">
|
<div class="fixed-container is-fixed-bottom-right mx-4 my-4 has-text-right is-hidden-print">
|
||||||
<a class="button is-circle is-primary has-tooltip-left" data-tooltip="Update <%= configFunctions.getProperty("aliases.lot") %>" href="<%= urlPrefix %>/lots/<%= lot.lotId %>/edit">
|
<a class="button is-circle is-primary has-tooltip-left"
|
||||||
|
data-tooltip="Update <%= configFunctions.getProperty("aliases.lot") %>"
|
||||||
|
href="<%= urlPrefix %>/lots/<%= lot.lotId %>/edit">
|
||||||
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
|
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
|
||||||
<span class="sr-only">Update <%= configFunctions.getProperty("aliases.lot") %></span>
|
<span class="sr-only">Update <%= configFunctions.getProperty("aliases.lot") %></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -30,6 +32,8 @@
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="panel-block is-block">
|
||||||
<div>
|
<div>
|
||||||
<strong><%= configFunctions.getProperty("aliases.map") %></strong><br />
|
<strong><%= configFunctions.getProperty("aliases.map") %></strong><br />
|
||||||
<a href="<%= urlPrefix %>/maps/<%= lot.mapId %>">
|
<a href="<%= urlPrefix %>/maps/<%= lot.mapId %>">
|
||||||
|
|
@ -45,8 +49,12 @@
|
||||||
<%= lot.lotStatus %>
|
<%= lot.lotStatus %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2 class="title is-4">Image</h2>
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">Image</h2>
|
||||||
|
<div class="panel-block is-block">
|
||||||
<% if (lot.mapSVG) { %>
|
<% if (lot.mapSVG) { %>
|
||||||
<% const imageURL = urlPrefix + "/images/maps/" + lot.mapSVG %>
|
<% const imageURL = urlPrefix + "/images/maps/" + lot.mapSVG %>
|
||||||
<div class="image" id="lot--map" data-map-key="<%= lot.mapKey %>">
|
<div class="image" id="lot--map" data-map-key="<%= lot.mapKey %>">
|
||||||
|
|
@ -54,20 +62,25 @@
|
||||||
</div>
|
</div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="message is-info">
|
<div class="message is-info">
|
||||||
<p class="message-body">There are no image associated with this <%= configFunctions.getProperty("aliases.lot").toLowerCase() %>.</p>
|
<p class="message-body">There are no image associated with this
|
||||||
|
<%= configFunctions.getProperty("aliases.lot").toLowerCase() %>.</p>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2 class="title is-4">
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">
|
||||||
<%= configFunctions.getProperty("aliases.occupancies") %>
|
<%= configFunctions.getProperty("aliases.occupancies") %>
|
||||||
<span class="tag"><%= lot.lotOccupancies.length %></span>
|
<span class="tag"><%= lot.lotOccupancies.length %></span>
|
||||||
</h2>
|
</h2>
|
||||||
|
<div class="panel-block is-block">
|
||||||
<% if (lot.lotOccupancies.length === 0) { %>
|
<% if (lot.lotOccupancies.length === 0) { %>
|
||||||
<div class="message is-info">
|
<div class="message is-info">
|
||||||
<p class="message-body">There are no occupancy records asscociated with this <%= configFunctions.getProperty("aliases.lot") %>.</p>
|
<p class="message-body">There are no occupancy records asscociated with this
|
||||||
|
<%= configFunctions.getProperty("aliases.lot") %>.</p>
|
||||||
</div>
|
</div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<table class="table is-fullwidth is-striped is-hoverable">
|
<table class="table is-fullwidth is-striped is-hoverable">
|
||||||
|
|
@ -93,7 +106,8 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="has-text-weight-bold" href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>">
|
<a class="has-text-weight-bold"
|
||||||
|
href="<%= urlPrefix %>/lotOccupancies/<%= lotOccupancy.lotOccupancyId %>">
|
||||||
<%= lotOccupancy.occupancyType %>
|
<%= lotOccupancy.occupancyType %>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -119,6 +133,8 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%- include('_footerA'); -%>
|
<%- include('_footerA'); -%>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,29 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
<table class="table is-fullwidth is-striped is-hoverable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Date</th>
|
||||||
|
<th><%= configFunctions.getProperty("aliases.externalReceiptNumber") %></th>
|
||||||
|
<th class="has-text-right">Amount</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% for (const lotOccupancyTransaction of lotOccupancy.lotOccupancyTransactions) { %>
|
||||||
|
<tr>
|
||||||
|
<td><%= lotOccupancyTransaction.transactionDateString %></td>
|
||||||
|
<td>
|
||||||
|
<%= lotOccupancyTransaction.externalReceiptNumber %><br />
|
||||||
|
<small><%= lotOccupancyTransaction.transactionNote %></small>
|
||||||
|
</td>
|
||||||
|
<td class="has-text-right">
|
||||||
|
$<%= lotOccupancyTransaction.transactionAmount.toFixed(2) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% } %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="panel-block is-block">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="map--mapName"><%= configFunctions.getProperty("aliases.map") %> Name</label>
|
<label class="label" for="map--mapName"><%= configFunctions.getProperty("aliases.map") %> Name</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
|
@ -53,9 +55,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2 class="title is-4">Address</h2>
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">Address</h2>
|
||||||
|
<div class="panel-block is-block">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="map--mapAddress1">Address</label>
|
<label class="label" for="map--mapAddress1">Address</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
|
@ -105,9 +110,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2 class="title is-4">Geographic Location</h2>
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">Geographic Location</h2>
|
||||||
|
<div class="panel-block is-block">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="map--mapLatitude">Latitude</label>
|
<label class="label" for="map--mapLatitude">Latitude</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
|
@ -121,8 +130,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2 class="title is-4">Image</h2>
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">Image</h2>
|
||||||
|
<div class="panel-block is-block">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="map--mapSVG">SVG File</label>
|
<label class="label" for="map--mapSVG">SVG File</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
|
@ -141,6 +154,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="fixed-container is-fixed-bottom-right mx-4 my-4 has-text-right is-hidden-print">
|
<div class="fixed-container is-fixed-bottom-right mx-4 my-4 has-text-right is-hidden-print">
|
||||||
<button class="button is-circle is-primary has-tooltip-left" data-tooltip="Update <%= configFunctions.getProperty("aliases.map") %>" type="submit">
|
<button class="button is-circle is-primary has-tooltip-left" data-tooltip="Update <%= configFunctions.getProperty("aliases.map") %>" type="submit">
|
||||||
<i class="fas fa-save" aria-hidden="true"></i>
|
<i class="fas fa-save" aria-hidden="true"></i>
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<div class="panel">
|
||||||
|
<div class="panel-block is-block">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<% if (map.mapDescription && map.mapDescription !== "") { %>
|
<% if (map.mapDescription && map.mapDescription !== "") { %>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
|
|
@ -58,11 +60,14 @@
|
||||||
<%= map.mapPhoneNumber %>
|
<%= map.mapPhoneNumber %>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2 class="title is-4">Geographic Location</h2>
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">Geographic Location</h2>
|
||||||
|
<div class="panel-block is-block">
|
||||||
<% if (map.mapLatitude && map.mapLongitude) { %>
|
<% if (map.mapLatitude && map.mapLongitude) { %>
|
||||||
<div id="map--leaflet" data-map-latitude="<%= map.mapLatitude %>" data-map-longitude="<%= map.mapLongitude %>" style="height:300px"></div>
|
<div id="map--leaflet" data-map-latitude="<%= map.mapLatitude %>" data-map-longitude="<%= map.mapLongitude %>" style="height:300px"></div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
|
@ -71,8 +76,12 @@
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2 class="title is-4">Image</h2>
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">Image</h2>
|
||||||
|
<div class="panel-block is-block">
|
||||||
<% if (map.mapSVG) { %>
|
<% if (map.mapSVG) { %>
|
||||||
<% const imageURL = urlPrefix + "/images/maps/" + map.mapSVG %>
|
<% const imageURL = urlPrefix + "/images/maps/" + map.mapSVG %>
|
||||||
<a class="image" href="<%= urlPrefix %>/images/maps/<%= map.mapSVG %>" target="_blank">
|
<a class="image" href="<%= urlPrefix %>/images/maps/<%= map.mapSVG %>" target="_blank">
|
||||||
|
|
@ -85,11 +94,14 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2 class="title is-4">
|
<div class="panel">
|
||||||
|
<h2 class="panel-heading">
|
||||||
Related Searches
|
Related Searches
|
||||||
</h2>
|
</h2>
|
||||||
|
<div class="panel-block">
|
||||||
<a class="button is-link" href="<%= urlPrefix %>/lots?mapId=<%= map.mapId %>">
|
<a class="button is-link" href="<%= urlPrefix %>/lots?mapId=<%= map.mapId %>">
|
||||||
<span class="icon is-small"><i class="fas fa-vector-square" aria-hidden="true"></i></span>
|
<span class="icon is-small"><i class="fas fa-vector-square" aria-hidden="true"></i></span>
|
||||||
<span class="mr-2"><%= configFunctions.getProperty("aliases.lots") %></span>
|
<span class="mr-2"><%= configFunctions.getProperty("aliases.lots") %></span>
|
||||||
|
|
@ -98,6 +110,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%- include('_footerA'); -%>
|
<%- include('_footerA'); -%>
|
||||||
|
|
||||||
<script src="<%= urlPrefix %>/javascripts/mapView.min.js"></script>
|
<script src="<%= urlPrefix %>/javascripts/mapView.min.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -3,22 +3,24 @@
|
||||||
<nav class="breadcrumb">
|
<nav class="breadcrumb">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="<%= urlPrefix %>/dashboard">Home</a></li>
|
<li><a href="<%= urlPrefix %>/dashboard">Home</a></li>
|
||||||
<li class="is-active"><a href="#" aria-current="page">
|
<li class="is-active">
|
||||||
|
<a href="#" aria-current="page">
|
||||||
<span class="icon is-small"><i class="fas fa-file" aria-hidden="true"></i></span>
|
<span class="icon is-small"><i class="fas fa-file" aria-hidden="true"></i></span>
|
||||||
<span>Reports</span>
|
<span>Reports</span>
|
||||||
</a></li>
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<h1 class="title is-1">
|
<h1 class="title is-1">
|
||||||
Licence Reports
|
Reports
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<h2 class="panel-heading">Licences</h2>
|
<h2 class="panel-heading"><%= configFunctions.getProperty("aliases.maps") %></h2>
|
||||||
<a class="panel-block align-items-flex-start" href="<%= urlPrefix %>/reports/licences-formatted" download>
|
<a class="panel-block align-items-flex-start" href="<%= urlPrefix %>/reports/maps-formatted" download>
|
||||||
<div class="has-text-centered my-2 ml-2 mr-3">
|
<div class="has-text-centered my-2 ml-2 mr-3">
|
||||||
<span class="icon has-text-info">
|
<span class="icon has-text-info">
|
||||||
<i class="fas fa-2x fa-file" aria-hidden="true"></i>
|
<i class="fas fa-2x fa-file" aria-hidden="true"></i>
|
||||||
|
|
@ -26,23 +28,9 @@
|
||||||
<span class="tag is-info">CSV</span>
|
<span class="tag is-info">CSV</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h3 class="title is-5 is-marginless">Full Licence List</h3>
|
<h3 class="title is-5 is-marginless">Full <%= configFunctions.getProperty("aliases.map") %> List</h3>
|
||||||
<p>
|
<p>
|
||||||
All active licences.
|
All active <%= configFunctions.getProperty("aliases.maps").toLowerCase() %>.
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
<a class="panel-block align-items-flex-start" href="<%= urlPrefix %>/reports/licences-notIssued" download>
|
|
||||||
<div class="has-text-centered my-2 ml-2 mr-3">
|
|
||||||
<span class="icon has-text-info">
|
|
||||||
<i class="fas fa-2x fa-file" aria-hidden="true"></i>
|
|
||||||
</span><br />
|
|
||||||
<span class="tag is-info">CSV</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3 class="title is-5 is-marginless">Licences Not Issued</h3>
|
|
||||||
<p>
|
|
||||||
All licences in the system that have not been issued.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -59,7 +47,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="panel-block align-items-flex-start" href="<%= urlPrefix %>/reports/licences-all" download>
|
<a class="panel-block align-items-flex-start" href="<%= urlPrefix %>/reports/maps-all" download>
|
||||||
<div class="has-text-centered my-2 ml-2 mr-3">
|
<div class="has-text-centered my-2 ml-2 mr-3">
|
||||||
<span class="icon has-text-info">
|
<span class="icon has-text-info">
|
||||||
<i class="fas fa-2x fa-table" aria-hidden="true"></i>
|
<i class="fas fa-2x fa-table" aria-hidden="true"></i>
|
||||||
|
|
@ -67,9 +55,23 @@
|
||||||
<span class="tag is-info">CSV</span>
|
<span class="tag is-info">CSV</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h3 class="title is-5 is-marginless">Full Licences Table</h3>
|
<h3 class="title is-5 is-marginless">Full Maps Table</h3>
|
||||||
<p>
|
<p>
|
||||||
All the data from the Licences table unfiltered.
|
All the data from the Maps (<%= configFunctions.getProperty("aliases.maps") %>) table unfiltered.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="panel-block align-items-flex-start" href="<%= urlPrefix %>/reports/lots-all" download>
|
||||||
|
<div class="has-text-centered my-2 ml-2 mr-3">
|
||||||
|
<span class="icon has-text-info">
|
||||||
|
<i class="fas fa-2x fa-table" aria-hidden="true"></i>
|
||||||
|
</span><br />
|
||||||
|
<span class="tag is-info">CSV</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3 class="title is-5 is-marginless">Full Lots Table</h3>
|
||||||
|
<p>
|
||||||
|
All the data from the Lots (<%= configFunctions.getProperty("aliases.lots") %>) table unfiltered.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue