occupancy type management - development
parent
3e15918d6d
commit
765bb5220b
|
|
@ -0,0 +1,3 @@
|
||||||
|
import type { RequestHandler } from "express";
|
||||||
|
export declare const handler: RequestHandler;
|
||||||
|
export default handler;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
(() => {
|
||||||
|
})();
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
(() => {
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
@ -18,6 +18,10 @@ import handler_doMoveFeeUp from "../handlers/admin-post/doMoveFeeUp.js";
|
||||||
import handler_doMoveFeeDown from "../handlers/admin-post/doMoveFeeDown.js";
|
import handler_doMoveFeeDown from "../handlers/admin-post/doMoveFeeDown.js";
|
||||||
import handler_doDeleteFee from "../handlers/admin-post/doDeleteFee.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
|
// Config Table Management
|
||||||
|
|
||||||
import handler_tables from "../handlers/admin-get/tables.js";
|
import handler_tables from "../handlers/admin-get/tables.js";
|
||||||
|
|
@ -104,8 +108,16 @@ router.post(
|
||||||
handler_doDeleteFee
|
handler_doDeleteFee
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Occupancy Type Management
|
||||||
|
*/
|
||||||
|
|
||||||
|
router.get(
|
||||||
|
"/occupancyTypes",
|
||||||
permissionHandlers.adminGetHandler,
|
permissionHandlers.adminGetHandler,
|
||||||
|
handler_occupancyTypes
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Config Tables
|
* Config Tables
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
<%- include('_header'); -%>
|
||||||
|
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column is-3 is-hidden-mobile">
|
||||||
|
<%- include('_menu-admin'); -%>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<nav class="breadcrumb">
|
||||||
|
<ul>
|
||||||
|
<li><a href="<%= urlPrefix %>/dashboard">Home</a></li>
|
||||||
|
<li>
|
||||||
|
<a href="#">
|
||||||
|
|
||||||
|
<span class="icon is-small"><i class="fas fa-cog" aria-hidden="true"></i></span>
|
||||||
|
<span>Administrator Tools</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="is-active">
|
||||||
|
<a href="#" aria-current="page">
|
||||||
|
<%= configFunctions.getProperty("aliases.occupancy") %> Type Management
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="level is-mobile">
|
||||||
|
<div class="level-left">
|
||||||
|
<div class="level-item">
|
||||||
|
<h1 class="title is-1">
|
||||||
|
<%= configFunctions.getProperty("aliases.occupancy") %> Type Management
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="level-right">
|
||||||
|
<div class="level-item">
|
||||||
|
<button class="button is-success" id="button--addOccupancy Type" type="button">
|
||||||
|
<span class="icon is-small"><i class="fas fa-plus" aria-hidden="true"></i></span>
|
||||||
|
<span>Add <%= configFunctions.getProperty("aliases.occupancy") %> Type</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="container--occupancyTypes"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%- include('_footerA'); -%>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
exports.occupancyTypes = <%- JSON.stringify(occupancyTypes) %>;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="<%= urlPrefix %>/javascripts/adminOccupancyTypes.min.js"></script>
|
||||||
|
|
||||||
|
<%- include('_footerB'); -%>
|
||||||
Loading…
Reference in New Issue