diff --git a/src/components/customers/CustomerMainInfos.tsx b/src/components/customers/CustomerMainInfos.tsx index e86b82e32..e6a0ec0f2 100644 --- a/src/components/customers/CustomerMainInfos.tsx +++ b/src/components/customers/CustomerMainInfos.tsx @@ -12,6 +12,7 @@ import { buildHubspotObjectUrl, buildNetsuiteCustomerUrl, buildSalesforceUrl, + buildStripeCustomerUrl, buildXeroCustomerUrl, } from '~/core/constants/externalUrls' import { getTargetedObjectTranslationKey } from '~/core/constants/form' @@ -463,7 +464,23 @@ export const CustomerMainInfos = ({ loading, customer, onEdit }: CustomerMainInf {linkedProvider?.name} {!!providerCustomer && !!providerCustomer?.providerCustomerId && ( - {providerCustomer?.providerCustomerId} + <> + {paymentProvider === ProviderTypeEnum?.Stripe ? ( + + + {providerCustomer?.providerCustomerId} + + + ) : ( + + {providerCustomer?.providerCustomerId} + + )} + )} {paymentProvider === ProviderTypeEnum?.Stripe && !!providerCustomer?.providerPaymentMethods?.length && ( @@ -502,7 +519,7 @@ export const CustomerMainInfos = ({ loading, customer, onEdit }: CustomerMainInf customer?.netsuiteCustomer?.externalCustomerId, )} > - + {customer?.netsuiteCustomer?.externalCustomerId} @@ -532,7 +549,7 @@ export const CustomerMainInfos = ({ loading, customer, onEdit }: CustomerMainInf rel="noopener noreferrer" to={buildXeroCustomerUrl(customer?.xeroCustomer?.externalCustomerId)} > - + {customer?.xeroCustomer?.externalCustomerId} @@ -567,7 +584,7 @@ export const CustomerMainInfos = ({ loading, customer, onEdit }: CustomerMainInf customer?.anrokCustomer?.externalCustomerId, )} > - + {customer?.anrokCustomer?.externalCustomerId} @@ -648,7 +665,7 @@ export const CustomerMainInfos = ({ loading, customer, onEdit }: CustomerMainInf externalCustomerId: customer.salesforceCustomer.externalCustomerId, })} > - + {customer?.salesforceCustomer?.externalCustomerId} @@ -725,6 +742,7 @@ const MetadataValue = styled(Typography)` const InlineLink = styled(Link)` width: fit-content; line-break: anywhere; + box-shadow: none; &:hover { text-decoration: none; diff --git a/src/core/constants/externalUrls.ts b/src/core/constants/externalUrls.ts index 0063fde06..2cae5a1fa 100644 --- a/src/core/constants/externalUrls.ts +++ b/src/core/constants/externalUrls.ts @@ -105,3 +105,7 @@ export const buildSalesforceUrl = ({ return `${baseUrl}/${externalCustomerId}` } + +export const buildStripeCustomerUrl = (stripeCustomerId: string) => { + return `https://dashboard.stripe.com/customers/${stripeCustomerId}` +}