Swapping string replacement with non number regex

This commit is contained in:
brydon1 2023-07-14 08:53:25 -04:00
parent 18c161ef96
commit 154fdbc8b9

View file

@ -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: {