@@ -98,6 +98,8 @@ export const indexedEmptyAddress = (index: number): Address =>
9898 } ) ,
9999 ) ;
100100
101+ export const defaultLocation = { value : "0" , text : "Mailing address" } ;
102+
101103export const emptyAddress = ( ) : Address => indexedEmptyAddress ( 0 ) ;
102104
103105export const formatAddresses = ( addresses : Address [ ] ) : Address [ ] => {
@@ -107,7 +109,7 @@ export const formatAddresses = (addresses: Address[]): Address[] => {
107109 locationName : toSentenceCase ( address . locationName ) ,
108110 } ) ) ;
109111 }
110- return [ { ...emptyAddress ( ) , locationName : locationName . text } ] ;
112+ return [ { ...emptyAddress ( ) , locationName : defaultLocation . text } ] ;
111113} ;
112114
113115export const indexedEmptyContact = ( index : number ) : Contact =>
@@ -127,8 +129,6 @@ export const indexedEmptyContact = (index: number): Contact =>
127129
128130export const emptyContact : Contact = indexedEmptyContact ( 0 ) ;
129131
130- export const locationName = { value : "0" , text : "Mailing address" } ;
131-
132132export const formDataDto : FormDataDto = {
133133 businessInformation : {
134134 district : "" ,
@@ -158,10 +158,8 @@ export const formDataDto: FormDataDto = {
158158 notifyClientInd : ""
159159} ;
160160
161- export const newFormDataDto = ( ) : FormDataDto => JSON . parse ( JSON . stringify ( formDataDto ) ) ;
162-
163- export const newFormDataDtoExternal = ( ) : FormDataDto => {
164- const value = newFormDataDto ( ) ;
165- value . location . addresses [ 0 ] . locationName = locationName . text ;
161+ export const newFormDataDto = ( ) : FormDataDto => {
162+ const value = JSON . parse ( JSON . stringify ( formDataDto ) ) ;
163+ value . location . addresses [ 0 ] . locationName = defaultLocation . text ;
166164 return value ;
167165} ;
0 commit comments