diff --git a/handlers/admin-get/occupancyTypes.d.ts b/handlers/admin-get/occupancyTypes.d.ts new file mode 100644 index 00000000..9621c611 --- /dev/null +++ b/handlers/admin-get/occupancyTypes.d.ts @@ -0,0 +1,3 @@ +import type { RequestHandler } from "express"; +export declare const handler: RequestHandler; +export default handler; diff --git a/handlers/admin-get/occupancyTypes.js b/handlers/admin-get/occupancyTypes.js new file mode 100644 index 00000000..b3900305 --- /dev/null +++ b/handlers/admin-get/occupancyTypes.js @@ -0,0 +1,11 @@ +import { getOccupancyTypes } from "../../helpers/functions.cache.js"; +import * as configFunctions from "../../helpers/functions.config.js"; +export const handler = (_request, response) => { + const occupancyTypes = getOccupancyTypes(); + response.render("admin-occupancyTypes", { + headTitle: configFunctions.getProperty("aliases.occupancy") + + " Type Management", + occupancyTypes + }); +}; +export default handler; diff --git a/handlers/admin-get/occupancyTypes.ts b/handlers/admin-get/occupancyTypes.ts new file mode 100644 index 00000000..84a6e7d7 --- /dev/null +++ b/handlers/admin-get/occupancyTypes.ts @@ -0,0 +1,18 @@ +import type { RequestHandler } from "express"; + +import { getOccupancyTypes } from "../../helpers/functions.cache.js"; + +import * as configFunctions from "../../helpers/functions.config.js"; + +export const handler: RequestHandler = (_request, response) => { + const occupancyTypes = getOccupancyTypes(); + + response.render("admin-occupancyTypes", { + headTitle: + configFunctions.getProperty("aliases.occupancy") + + " Type Management", + occupancyTypes + }); +}; + +export default handler; diff --git a/public-typescript/adminOccupancyTypes.d.ts b/public-typescript/adminOccupancyTypes.d.ts new file mode 100644 index 00000000..e69de29b diff --git a/public-typescript/adminOccupancyTypes.js b/public-typescript/adminOccupancyTypes.js new file mode 100644 index 00000000..8afef300 --- /dev/null +++ b/public-typescript/adminOccupancyTypes.js @@ -0,0 +1,2 @@ +(() => { +})(); diff --git a/public-typescript/adminOccupancyTypes.ts b/public-typescript/adminOccupancyTypes.ts new file mode 100644 index 00000000..9afd6e69 --- /dev/null +++ b/public-typescript/adminOccupancyTypes.ts @@ -0,0 +1,3 @@ +(() => { + +})(); \ No newline at end of file diff --git a/public/javascripts/adminOccupancyTypes.min.js b/public/javascripts/adminOccupancyTypes.min.js new file mode 100644 index 00000000..e69de29b diff --git a/routes/admin.ts b/routes/admin.ts index 991fb51b..47952623 100644 --- a/routes/admin.ts +++ b/routes/admin.ts @@ -18,6 +18,10 @@ import handler_doMoveFeeUp from "../handlers/admin-post/doMoveFeeUp.js"; import handler_doMoveFeeDown from "../handlers/admin-post/doMoveFeeDown.js"; import handler_doDeleteFee from "../handlers/admin-post/doDeleteFee.js"; +// Occupancy Type Management + +import handler_occupancyTypes from "../handlers/admin-get/occupancyTypes.js"; + // Config Table Management import handler_tables from "../handlers/admin-get/tables.js"; @@ -104,8 +108,16 @@ router.post( handler_doDeleteFee ); +/* + * Occupancy Type Management + */ +router.get( + "/occupancyTypes", permissionHandlers.adminGetHandler, + handler_occupancyTypes +); + /* * Config Tables */ diff --git a/views/admin-occupancyTypes.ejs b/views/admin-occupancyTypes.ejs new file mode 100644 index 00000000..eefd620c --- /dev/null +++ b/views/admin-occupancyTypes.ejs @@ -0,0 +1,56 @@ +<%- include('_header'); -%> + +
+
+ <%- include('_menu-admin'); -%> +
+
+ + +
+
+
+

+ <%= configFunctions.getProperty("aliases.occupancy") %> Type Management +

+
+
+
+
+ +
+
+
+ +
+
+
+ +<%- include('_footerA'); -%> + + + + + +<%- include('_footerB'); -%>