From fa62f17b9b3572c4677e9fefdec3acff3c59809e Mon Sep 17 00:00:00 2001 From: mgtennant <100305096+mgtennant@users.noreply.github.com> Date: Wed, 29 Nov 2023 16:56:10 -0800 Subject: [PATCH 1/2] nfr display data instead of lur for grazing lease --- frontend/public/js/util.js | 1 - frontend/src/app.controller.ts | 14 ++---- frontend/views/pages/grazing-lease.hbs | 67 +++++++++----------------- 3 files changed, 28 insertions(+), 54 deletions(-) diff --git a/frontend/public/js/util.js b/frontend/public/js/util.js index 52117d25..0096474f 100644 --- a/frontend/public/js/util.js +++ b/frontend/public/js/util.js @@ -20,7 +20,6 @@ async function generateReport(documentType) { .catch(() => { location.reload(); }); - console.log(reportName) const data = { prdid: prdid, dtid: dtid, diff --git a/frontend/src/app.controller.ts b/frontend/src/app.controller.ts index 0aafb32b..ac80068b 100644 --- a/frontend/src/app.controller.ts +++ b/frontend/src/app.controller.ts @@ -406,16 +406,10 @@ export class AppController { console.log(err); console.log(err.response.data); }); - ttlsJSON = await this.ttlsService.sendToBackend(response); - ttlsJSON["cityProvPostal"] = this.ttlsService.concatCityProvPostal( - response.tenantAddr ? response.tenantAddr[0] : null - ); - if (ttlsJSON.inspected_date) { - ttlsJSON["inspected_date"] = this.ttlsService.formatInspectedDate( - ttlsJSON.inspected_date.toString() - ); - } - primaryContactName = ttlsJSON.licence_holder_name; + ttlsJSON = await this.ttlsService.formatNFRData(response); + primaryContactName = ttlsJSON.licenceHolderName; + const interestedParties = nfrInterestedParties(response.tenantAddr); + ttlsJSON["interestedParties"] = interestedParties; return res.render("grazing-lease", { title: title, idirUsername: session.data.activeAccount diff --git a/frontend/views/pages/grazing-lease.hbs b/frontend/views/pages/grazing-lease.hbs index 182e19fc..90b3cfc2 100644 --- a/frontend/views/pages/grazing-lease.hbs +++ b/frontend/views/pages/grazing-lease.hbs @@ -7,51 +7,30 @@
DTID: {{message.dtid}}
-
Tenure File Number: {{message.tenure_file_number}}
+
Tenure File Number: {{message.fileNum}}
Primary Contact Name: {{primaryContactName}}
Disposition Transaction ID Details @@ -62,49 +41,51 @@
Type
-
{{ message.type_name }}
+
{{ message.type }}
Subtype
-
{{message.sub_type_name}}
+
{{message.subType}}
Purpose
-
{{ message.purpose_name }}
+
{{ message.purpose }}
Subpurpose
-
{{message.sub_purpose_name}}
+
{{message.subPurpose}}
Mailing Address
-
{{message.mailing_address}}
+
{{message.addrLine1}}
+
{{message.addrLine2}}
+
{{message.addrLine3}}
{{message.cityProvPostal}}
-
{{message.mailing_country}}
+
{{message.country}}
Location of Land
-
{{message.location_description}}
+
{{message.locLand}}
- Area + Interested Parties