25 lines
771 B
TypeScript
25 lines
771 B
TypeScript
import type { Request, Response } from 'express'
|
|
|
|
import getMaps from '../../database/getMaps.js'
|
|
import { getLotStatuses, getBurialSiteTypes } from '../../helpers/functions.cache.js'
|
|
import { getConfigProperty } from '../../helpers/config.helpers.js'
|
|
|
|
export default async function handler(
|
|
request: Request,
|
|
response: Response
|
|
): Promise<void> {
|
|
const maps = await getMaps()
|
|
const lotTypes = await getBurialSiteTypes()
|
|
const lotStatuses = await getLotStatuses()
|
|
|
|
response.render('lot-search', {
|
|
headTitle: `${getConfigProperty('aliases.lot')} Search`,
|
|
maps,
|
|
lotTypes,
|
|
lotStatuses,
|
|
cemeteryId: request.query.cemeteryId,
|
|
burialSiteTypeId: request.query.burialSiteTypeId,
|
|
burialSiteStatusId: request.query.burialSiteStatusId
|
|
})
|
|
}
|