54 lines
919 B
TypeScript
54 lines
919 B
TypeScript
import { Router } from "express";
|
|
|
|
import * as permissionHandlers from "../handlers/permissions.js";
|
|
import * as configFunctions from "../helpers/functions.config.js";
|
|
|
|
import handler_view from "../handlers/lots-get/view.js";
|
|
import handler_new from "../handlers/lots-get/new.js";
|
|
import handler_edit from "../handlers/lots-get/edit.js";
|
|
import handler_print from "../handlers/lots-get/print.js";
|
|
|
|
|
|
export const router = Router();
|
|
|
|
|
|
/*
|
|
* Lot Search
|
|
*/
|
|
|
|
|
|
router.get("/", (_request, response) => {
|
|
|
|
response.render("lot-search", {
|
|
headTitle: configFunctions.getProperty("aliases.lots")
|
|
});
|
|
|
|
});
|
|
|
|
|
|
/*
|
|
* Lot View / Edit
|
|
*/
|
|
|
|
|
|
router.get("/new",
|
|
permissionHandlers.updateGetHandler,
|
|
handler_new);
|
|
|
|
|
|
|
|
router.get("/:licenceID",
|
|
handler_view);
|
|
|
|
|
|
router.get("/:licenceID/edit",
|
|
permissionHandlers.updateGetHandler,
|
|
handler_edit);
|
|
|
|
|
|
router.get("/:licenceID/print",
|
|
handler_print);
|
|
|
|
|
|
export default router;
|