From 7adb53d5e0f14893c9cb95b9e94fc58f4148a37a Mon Sep 17 00:00:00 2001 From: mgtennant <100305096+mgtennant@users.noreply.github.com> Date: Thu, 16 Nov 2023 09:06:29 -0800 Subject: [PATCH] replace dash & endash --- frontend/src/app.controller.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/app.controller.ts b/frontend/src/app.controller.ts index 506bb823..857963ba 100644 --- a/frontend/src/app.controller.ts +++ b/frontend/src/app.controller.ts @@ -103,8 +103,10 @@ export class AppController { @Res() res: Response ) { console.log('rendering NFR / GL page!!!') - const decodedDocumentType = decodeURIComponent(documentType).toUpperCase(); - if (decodedDocumentType == "GRAZING LEASE" || decodedDocumentType == "AGRICULTURAL LEASE - U - GRAZING – MP") { + let decodedDocumentType = decodeURIComponent(documentType) + decodedDocumentType = decodedDocumentType.toUpperCase().replace(/\s+/g, "").replace(/-/g, "").replace(/–/g,""); + console.log(decodedDocumentType) + if (decodedDocumentType == "GRAZINGLEASE" || decodedDocumentType == "AGRICULTURALLEASEUGRAZINGMP") { return this.getGrazingLeaseDisplayData(session, dtid, res); } else { return this.getNfrDisplayData(session, dtid, documentType, res);