@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
34 lines (31 loc) • 1.1 kB
JavaScript
import { getRouteLocals } from '../../../../utils/localsHelper.js';
import { setNestedPath } from '../../../../utils/urlHelper.js';
class MissingReportSubmittedController {
layoutPath;
constructor(layoutPath) {
this.layoutPath = layoutPath;
}
GET = async (req, res, next) => {
const { nestedBaseUrl } = getRouteLocals(res);
const cataloguePath = setNestedPath('/', nestedBaseUrl);
const { reportId, variantId, reportName, name } = req.query;
try {
res.render(`dpr/routes/journeys/request-missing-report/submitted/view`, {
title: 'Request submitted',
report: {
reportId,
variantId,
reportName,
name,
},
cataloguePath,
layoutPath: this.layoutPath,
});
}
catch (error) {
next(error);
}
};
}
export { MissingReportSubmittedController, MissingReportSubmittedController as default };
//# sourceMappingURL=controller.js.map