diff --git a/app/client/package-lock.json b/app/client/package-lock.json index 5d18a118..6fc9c7a0 100644 --- a/app/client/package-lock.json +++ b/app/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "epa-csb-rebate-forms-app-client", - "version": "5.0.0", + "version": "5.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "epa-csb-rebate-forms-app-client", - "version": "5.0.0", + "version": "5.0.1", "license": "CC0-1.0", "dependencies": { "@formio/premium": "1.18.4", diff --git a/app/client/package.json b/app/client/package.json index 39143868..d7f88375 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -1,6 +1,6 @@ { "name": "epa-csb-rebate-forms-app-client", - "version": "5.0.0", + "version": "5.0.1", "description": "U.S. EPA CSB Rebate Forms Application (client app)", "homepage": ".", "license": "CC0-1.0", diff --git a/app/package-lock.json b/app/package-lock.json index ece83756..5eaf1573 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,12 +1,12 @@ { "name": "epa-csb-rebate-forms-app", - "version": "5.0.0", + "version": "5.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "epa-csb-rebate-forms-app", - "version": "5.0.0", + "version": "5.0.1", "license": "CC0-1.0", "devDependencies": { "concurrently": "8.2.2", diff --git a/app/package.json b/app/package.json index 21a9e38a..8451cc92 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "epa-csb-rebate-forms-app", - "version": "5.0.0", + "version": "5.0.1", "description": "U.S. EPA CSB Rebate Forms Application", "license": "CC0-1.0", "author": "USEPA (https://www.epa.gov)", diff --git a/app/server/app/utilities/formio.js b/app/server/app/utilities/formio.js index 0d6116d0..54f6be3d 100644 --- a/app/server/app/utilities/formio.js +++ b/app/server/app/utilities/formio.js @@ -29,8 +29,8 @@ function getComboKeyFieldName({ rebateYear }) { return rebateYear === "2022" ? "bap_hidden_entity_combo_key" : rebateYear === "2023" - ? "_bap_entity_combo_key" - : ""; + ? "_bap_entity_combo_key" + : ""; } /** @@ -41,8 +41,8 @@ function getRebateIdFieldName({ rebateYear }) { return rebateYear === "2022" ? "hidden_bap_rebate_id" : rebateYear === "2023" - ? "_bap_rebate_id" - : ""; + ? "_bap_rebate_id" + : ""; } /** @@ -261,10 +261,14 @@ function fetchDataForPRFSubmission({ rebateYear, req, res }) { County__c, } = Account; - const jsonOrg = frf2023RecordJson.data.organizations.find( - (org) => - org.org_orgName === orgName && org.org_contactEmail === Email, - ); + const jsonOrg = frf2023RecordJson.data.organizations.find((org) => { + const matchedName = org?.org_orgName?.trim() === orgName?.trim(); + const matchedEmail = + org.org_contactEmail?.trim()?.toLowerCase() === + Email?.trim()?.toLowerCase(); + + return matchedName && matchedEmail; + }); const orgAlreadyAdded = array.some((org) => org._org_id === orgId); @@ -517,10 +521,10 @@ function uploadS3FileMetadata({ rebateYear, req, res }) { formType === "frf" ? "CSB Application" : formType === "prf" - ? "CSB Payment Request" - : formType === "cof" - ? "CSB Close Out" - : "CSB"; + ? "CSB Payment Request" + : formType === "crf" + ? "CSB Close Out" + : "CSB"; const logMessage = `User with email '${mail}' attempted to upload a file when the ` + diff --git a/app/server/package-lock.json b/app/server/package-lock.json index 28cbdac4..60c82c64 100644 --- a/app/server/package-lock.json +++ b/app/server/package-lock.json @@ -1,12 +1,12 @@ { "name": "epa-csb-rebate-forms-app-server", - "version": "5.0.0", + "version": "5.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "epa-csb-rebate-forms-app-server", - "version": "5.0.0", + "version": "5.0.1", "license": "CC0-1.0", "dependencies": { "axios": "1.6.8", diff --git a/app/server/package.json b/app/server/package.json index a397d662..896dd8a5 100644 --- a/app/server/package.json +++ b/app/server/package.json @@ -1,6 +1,6 @@ { "name": "epa-csb-rebate-forms-app-server", - "version": "5.0.0", + "version": "5.0.1", "description": "U.S. EPA CSB Rebate Forms Application (server app)", "license": "CC0-1.0", "author": "USEPA (https://www.epa.gov)", diff --git a/docs/csb-openapi.json b/docs/csb-openapi.json index fc20330e..f0e591e7 100644 --- a/docs/csb-openapi.json +++ b/docs/csb-openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "epa-csb-server", - "version": "5.0.0", + "version": "5.0.1", "license": { "name": "CC0-1.0" },