Swapping string replacement with non number regex
This commit is contained in:
parent
18c161ef96
commit
154fdbc8b9
1 changed files with 2 additions and 1 deletions
|
|
@ -373,6 +373,7 @@ export const useMainStore = defineStore({
|
|||
registerClaim() {
|
||||
// TODO: replace place holder correlationId with the real thing
|
||||
const placeHolderCorrelationId = '00000000-0000-0000-0000-000000000000';
|
||||
const nonNumberCharRegex = /[^0-9]/g;
|
||||
globalMethods.callHttpClient({
|
||||
method: endpoints.RegisterClaim.method,
|
||||
endpoint: endpoints.RegisterClaim.url,
|
||||
|
|
@ -392,7 +393,7 @@ export const useMainStore = defineStore({
|
|||
country: 'US' // TODO set from store
|
||||
},
|
||||
homePhone: {
|
||||
number: this.order.customer.phoneNumber.replaceAll('-', '')
|
||||
number: this.order.customer.phoneNumber.replaceAll(nonNumberCharRegex, '')
|
||||
}
|
||||
},
|
||||
caller: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue