Skip to content

Commit

Permalink
18068 - Namerequest UI: Editing the Resubmit NR has the first name ch…
Browse files Browse the repository at this point in the history
…oice as empty. (#740)

* updated condition for SP/GP resubmission

* Updated designation checking with designation type

* Simplified conditional and updated flag name

* version up
  • Loading branch information
Rajandeep98 authored Oct 31, 2023
1 parent 3fe5d0c commit ba0d5fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "name-request",
"version": "5.3.4",
"version": "5.3.5",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
Expand Down
5 changes: 3 additions & 2 deletions src/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,14 +489,15 @@ export const resubmit = async ({ commit, getters }): Promise<boolean> => {

// 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
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: getNameDesignation(name),
designation: !checkEntityType ? getNameDesignation(name) : '',
name: name.name,
name_type_cd: name.name_type_cd
}))
Expand Down

0 comments on commit ba0d5fa

Please sign in to comment.