From b91ec46be6751a1038cbbbc5c5f709d335dd450e Mon Sep 17 00:00:00 2001 From: = Date: Thu, 26 Oct 2023 09:24:12 -0700 Subject: [PATCH 1/4] updated condition for SP/GP resubmission --- package-lock.json | 4 ++-- package.json | 2 +- src/store/actions.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d992d5142..3c32c5b16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "name-request", - "version": "5.3.2", + "version": "5.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "name-request", - "version": "5.3.2", + "version": "5.3.3", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/breadcrumb": "2.1.24", diff --git a/package.json b/package.json index f17939342..90e0a3d7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "name-request", - "version": "5.3.2", + "version": "5.3.3", "private": true, "appName": "Name Request UI", "sbcName": "SBC Common Components", diff --git a/src/store/actions.ts b/src/store/actions.ts index 45434ea92..af139e98c 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -525,6 +525,7 @@ function getNameDesignation (name: any): string { if (name.designation) return name.designation const words = name.name.split(' ') const len = words.length + if (EntityTypes.FR || EntityTypes.GP || EntityTypes.DBA || EntityTypes.FI || EntityTypes.PA || EntityTypes.PAR) return '' return words[len - 1] } From 766f8c8d5035cf8825ff15d94b3d72c82aacb019 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 27 Oct 2023 15:32:40 -0700 Subject: [PATCH 2/4] Updated designation checking with designation type --- src/store/actions.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/store/actions.ts b/src/store/actions.ts index af139e98c..91ece34de 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -489,14 +489,18 @@ export const resubmit = async ({ commit, getters }): Promise => { // add resubmit NR number (for internal use only - API ignores it) nrTypeData['resubmitNrNum'] = nrData['nrNum'] - + // check against entity types if it should have designation or not : if length returns to be 0 then NR should not have any designation otherwise work as getNameDesignation + let flag = false + if (Designations[nrData['entity_type_cd']].words.length === 0) { + flag = true + } // clean names data nrTypeData['names'] = nrData.names.map(name => ({ choice: name.choice, consent_words: '', conflict1: '', conflict1_num: '', - designation: getNameDesignation(name), + designation: !flag ? getNameDesignation(name) : '', name: name.name, name_type_cd: name.name_type_cd })) @@ -525,7 +529,6 @@ function getNameDesignation (name: any): string { if (name.designation) return name.designation const words = name.name.split(' ') const len = words.length - if (EntityTypes.FR || EntityTypes.GP || EntityTypes.DBA || EntityTypes.FI || EntityTypes.PA || EntityTypes.PAR) return '' return words[len - 1] } From d80f9d25945f26dd5ebdeb79779b7c6d6d1c9198 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 30 Oct 2023 09:06:28 -0700 Subject: [PATCH 3/4] Simplified conditional and updated flag name --- src/store/actions.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/store/actions.ts b/src/store/actions.ts index 91ece34de..2d2adad35 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -490,17 +490,14 @@ export const resubmit = async ({ commit, getters }): Promise => { // add resubmit NR number (for internal use only - API ignores it) nrTypeData['resubmitNrNum'] = nrData['nrNum'] // check against entity types if it should have designation or not : if length returns to be 0 then NR should not have any designation otherwise work as getNameDesignation - let flag = false - if (Designations[nrData['entity_type_cd']].words.length === 0) { - flag = true - } + const checkEntityType = Designations[nrData['entity_type_cd']].words.length === 0 // clean names data nrTypeData['names'] = nrData.names.map(name => ({ choice: name.choice, consent_words: '', conflict1: '', conflict1_num: '', - designation: !flag ? getNameDesignation(name) : '', + designation: !checkEntityType ? getNameDesignation(name) : '', name: name.name, name_type_cd: name.name_type_cd })) From e5f45acc81e605bcdcdec71b149356ab9ff083e5 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 31 Oct 2023 14:18:19 -0700 Subject: [PATCH 4/4] version up --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c32c5b16..d38eb6acb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "name-request", - "version": "5.3.3", + "version": "5.3.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "name-request", - "version": "5.3.3", + "version": "5.3.5", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/breadcrumb": "2.1.24", diff --git a/package.json b/package.json index 90e0a3d7d..a5414697f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "name-request", - "version": "5.3.3", + "version": "5.3.5", "private": true, "appName": "Name Request UI", "sbcName": "SBC Common Components",