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() { registerClaim() {
// TODO: replace place holder correlationId with the real thing // TODO: replace place holder correlationId with the real thing
const placeHolderCorrelationId = '00000000-0000-0000-0000-000000000000'; const placeHolderCorrelationId = '00000000-0000-0000-0000-000000000000';
const nonNumberCharRegex = /[^0-9]/g;
globalMethods.callHttpClient({ globalMethods.callHttpClient({
method: endpoints.RegisterClaim.method, method: endpoints.RegisterClaim.method,
endpoint: endpoints.RegisterClaim.url, endpoint: endpoints.RegisterClaim.url,
@ -392,7 +393,7 @@ export const useMainStore = defineStore({
country: 'US' // TODO set from store country: 'US' // TODO set from store
}, },
homePhone: { homePhone: {
number: this.order.customer.phoneNumber.replaceAll('-', '') number: this.order.customer.phoneNumber.replaceAll(nonNumberCharRegex, '')
} }
}, },
caller: { caller: {