From 3a7ec1ce2113ab35ad4cbac2ff73cbffece8b0b4 Mon Sep 17 00:00:00 2001 From: Kelly Phan Date: Mon, 13 Jan 2025 17:05:34 +0100 Subject: [PATCH] feat: customer creation revamp (#1966) * feat: new customer page * refactor: update customer information UI * refactor: update billing section UI * refactor: update metadata section UI * refactor: update external app section UI * feat: use new route and remove old drawer * fix: e2e updates * refactor: rename folder * fix: add missing field in query * fix: code review --- .../10-resources/t20-create-customer.cy.ts | 14 +- .../BillingAccordion.tsx | 114 +++++++----- .../CustomerInformation.tsx | 69 ++++---- .../AccountingProvidersAccordion.tsx | 0 .../CRMProvidersAccordion.tsx | 0 .../ExternalAppsAccordionLayout.tsx | 0 .../PaymentProvidersAccordion.tsx | 0 .../TaxProvidersAccordion.tsx | 0 .../ExternalAppsAccordion/index.tsx | 22 +-- .../ExternalAppsAccordion/utils.ts | 0 .../MetadataAccordion.tsx | 10 +- src/components/designSystem/Accordion.tsx | 14 +- src/core/router/ObjectsRoutes.tsx | 10 ++ src/generated/graphql.tsx | 79 +++++++-- src/hooks/useCreateEditCustomer.ts | 124 +++++++++----- .../CreateCustomer.tsx} | 162 +++++++++--------- src/pages/CustomerDetails.tsx | 22 ++- src/pages/CustomersList.tsx | 25 ++- translations/base.json | 31 ++-- 19 files changed, 393 insertions(+), 303 deletions(-) rename src/components/customers/{addDrawer => createCustomer}/BillingAccordion.tsx (68%) rename src/components/customers/{addDrawer => createCustomer}/CustomerInformation.tsx (77%) rename src/components/customers/{addDrawer => createCustomer}/ExternalAppsAccordion/AccountingProvidersAccordion.tsx (100%) rename src/components/customers/{addDrawer => createCustomer}/ExternalAppsAccordion/CRMProvidersAccordion.tsx (100%) rename src/components/customers/{addDrawer => createCustomer}/ExternalAppsAccordion/ExternalAppsAccordionLayout.tsx (100%) rename src/components/customers/{addDrawer => createCustomer}/ExternalAppsAccordion/PaymentProvidersAccordion.tsx (100%) rename src/components/customers/{addDrawer => createCustomer}/ExternalAppsAccordion/TaxProvidersAccordion.tsx (100%) rename src/components/customers/{addDrawer => createCustomer}/ExternalAppsAccordion/index.tsx (91%) rename src/components/customers/{addDrawer => createCustomer}/ExternalAppsAccordion/utils.ts (100%) rename src/components/customers/{addDrawer => createCustomer}/MetadataAccordion.tsx (95%) rename src/{components/customers/addDrawer/AddCustomerDrawer.tsx => pages/CreateCustomer.tsx} (70%) diff --git a/cypress/e2e/10-resources/t20-create-customer.cy.ts b/cypress/e2e/10-resources/t20-create-customer.cy.ts index 5b335cb02..efb64071a 100644 --- a/cypress/e2e/10-resources/t20-create-customer.cy.ts +++ b/cypress/e2e/10-resources/t20-create-customer.cy.ts @@ -7,11 +7,15 @@ describe('Create customer', () => { it('should create customer', () => { cy.get('[data-test="create-customer"]').click() - cy.get('input[name="name"]').should('exist').type(customerName, { scrollBehavior: false }) + cy.url().should('include', '/customer/create') + + cy.get('[data-test="submit-customer"]').should('be.disabled') - cy.get('[data-test="submit"]').should('be.disabled') cy.get('input[name="externalId"]').type('id-george-de-la-jungle') - cy.get('[data-test="submit"]').click() + + cy.get('input[name="name"]').should('exist').type(customerName, { scrollBehavior: false }) + + cy.get('[data-test="submit-customer"]').click() cy.url().should('include', '/customer/') @@ -26,9 +30,9 @@ describe('Create customer', () => { cy.get('[data-test="create-customer"]').click() cy.get('input[name="name"]').type(randomId, { scrollBehavior: false }) - cy.get('[data-test="submit"]').should('be.disabled') + cy.get('[data-test="submit-customer"]').should('be.disabled') cy.get('input[name="externalId"]').type(randomId) - cy.get('[data-test="submit"]').click() + cy.get('[data-test="submit-customer"]').click() cy.url().should('include', '/customer/') cy.contains(randomId).should('exist') diff --git a/src/components/customers/addDrawer/BillingAccordion.tsx b/src/components/customers/createCustomer/BillingAccordion.tsx similarity index 68% rename from src/components/customers/addDrawer/BillingAccordion.tsx rename to src/components/customers/createCustomer/BillingAccordion.tsx index 2adf9279d..881a7f594 100644 --- a/src/components/customers/addDrawer/BillingAccordion.tsx +++ b/src/components/customers/createCustomer/BillingAccordion.tsx @@ -14,7 +14,7 @@ import { import { useInternationalization } from '~/hooks/core/useInternationalization' const billingFields: Array< - { name: keyof CustomerAddress; label?: string; placeholder?: string } & ( + { name: keyof CustomerAddress; label?: string; placeholder?: string; className?: string } & ( | { type: 'text' } @@ -27,34 +27,43 @@ const billingFields: Array< { name: 'addressLine1', type: 'text', - label: 'text_626c0c09812bbc00e4c59e1b', - placeholder: 'text_626c0c09812bbc00e4c59e1d', + label: 'text_626c0c09812bbc00e4c59e1d', + placeholder: 'text_1735653854525cemtriccmuh', + className: 'col-span-2', }, { name: 'addressLine2', type: 'text', - placeholder: 'text_626c0c09812bbc00e4c59e1f', + label: 'text_626c0c09812bbc00e4c59e1f', + placeholder: 'text_1735653854525dq6plq7exd3', + className: 'col-span-2', }, { name: 'zipcode', type: 'text', - placeholder: 'text_626c0c09812bbc00e4c59e21', + label: 'text_626c0c09812bbc00e4c59e21', + placeholder: 'text_1735654189136h4rgi3zdwaa', }, { name: 'city', type: 'text', - placeholder: 'text_626c0c09812bbc00e4c59e23', + label: 'text_626c0c09812bbc00e4c59e23', + placeholder: 'text_1735654189136vn4mbzp4jhs', }, { name: 'state', type: 'text', - placeholder: 'text_626c0c09812bbc00e4c59e25', + label: 'text_626c0c09812bbc00e4c59e25', + placeholder: 'text_173565418913690jb89ypb63', + className: 'col-span-2', }, { name: 'country', type: 'combobox', - placeholder: 'text_626c0c09812bbc00e4c59e27', + label: 'text_626c0c09812bbc00e4c59e27', data: countryDataForCombobox, + placeholder: 'text_1735654189136s548dkluunb', + className: 'col-span-2', }, ] @@ -97,16 +106,16 @@ export const BillingAccordion: FC = ({ return ( {translate('text_632b49e2620ea4c6d96c9662')} +
+ {translate('text_632b49e2620ea4c6d96c9662')} + {translate('text_1735653854525b68ew2qbpdp')} +
} >
- - {translate('text_626c0c09812bbc00e4c59dff')} - = ({
- {translate('text_626c0c09812bbc00e4c59e19')} + {translate('text_626c0c301a16a600ea06148d')} - {billingFields.map((field) => { - if (field.type === 'text') { +
+ {billingFields.map((field) => { + if (field.type === 'text') { + return ( + + ) + } + return ( - ) - } - - return ( - - ) - })} + })} +
@@ -201,32 +215,38 @@ export const BillingAccordion: FC = ({ value={isShippingEqualBillingAddress} onChange={() => setIsShippingEqualBillingAddress((prev) => !prev)} /> - {billingFields.map((field) => { - if (field.type === 'text') { + +
+ {billingFields.map((field) => { + if (field.type === 'text') { + return ( + + ) + } + return ( - ) - } - - return ( - - ) - })} + })} +
diff --git a/src/components/customers/addDrawer/CustomerInformation.tsx b/src/components/customers/createCustomer/CustomerInformation.tsx similarity index 77% rename from src/components/customers/addDrawer/CustomerInformation.tsx rename to src/components/customers/createCustomer/CustomerInformation.tsx index a95903e21..31f742d6f 100644 --- a/src/components/customers/addDrawer/CustomerInformation.tsx +++ b/src/components/customers/createCustomer/CustomerInformation.tsx @@ -1,9 +1,8 @@ -import { Grid } from '@mui/material' import { FormikProps } from 'formik' import { FC } from 'react' import { TRANSLATIONS_MAP_CUSTOMER_TYPE } from '~/components/customers/utils' -import { Card, Typography } from '~/components/designSystem' +import { Typography } from '~/components/designSystem' import { ComboBoxField, TextInputField } from '~/components/form' import { ORGANIZATION_INFORMATIONS_ROUTE } from '~/core/router' import { getTimezoneConfig } from '~/core/timezone' @@ -34,8 +33,21 @@ export const CustomerInformation: FC = ({ const { timezoneConfig } = useOrganizationInfos() return ( - - {translate('text_626c0c09812bbc00e4c59df1')} +
+
+ {translate('text_6419c64eace749372fc72b07')} + {translate('text_1735652987833k0i3l9ill5g')} +
+ + = ({ }))} /> - - - - - - - - - +
+ + + +
= ({ helperText={translate('text_651fd41846f44c0064408b07')} formikProps={formikProps} /> - +
) } diff --git a/src/components/customers/addDrawer/ExternalAppsAccordion/AccountingProvidersAccordion.tsx b/src/components/customers/createCustomer/ExternalAppsAccordion/AccountingProvidersAccordion.tsx similarity index 100% rename from src/components/customers/addDrawer/ExternalAppsAccordion/AccountingProvidersAccordion.tsx rename to src/components/customers/createCustomer/ExternalAppsAccordion/AccountingProvidersAccordion.tsx diff --git a/src/components/customers/addDrawer/ExternalAppsAccordion/CRMProvidersAccordion.tsx b/src/components/customers/createCustomer/ExternalAppsAccordion/CRMProvidersAccordion.tsx similarity index 100% rename from src/components/customers/addDrawer/ExternalAppsAccordion/CRMProvidersAccordion.tsx rename to src/components/customers/createCustomer/ExternalAppsAccordion/CRMProvidersAccordion.tsx diff --git a/src/components/customers/addDrawer/ExternalAppsAccordion/ExternalAppsAccordionLayout.tsx b/src/components/customers/createCustomer/ExternalAppsAccordion/ExternalAppsAccordionLayout.tsx similarity index 100% rename from src/components/customers/addDrawer/ExternalAppsAccordion/ExternalAppsAccordionLayout.tsx rename to src/components/customers/createCustomer/ExternalAppsAccordion/ExternalAppsAccordionLayout.tsx diff --git a/src/components/customers/addDrawer/ExternalAppsAccordion/PaymentProvidersAccordion.tsx b/src/components/customers/createCustomer/ExternalAppsAccordion/PaymentProvidersAccordion.tsx similarity index 100% rename from src/components/customers/addDrawer/ExternalAppsAccordion/PaymentProvidersAccordion.tsx rename to src/components/customers/createCustomer/ExternalAppsAccordion/PaymentProvidersAccordion.tsx diff --git a/src/components/customers/addDrawer/ExternalAppsAccordion/TaxProvidersAccordion.tsx b/src/components/customers/createCustomer/ExternalAppsAccordion/TaxProvidersAccordion.tsx similarity index 100% rename from src/components/customers/addDrawer/ExternalAppsAccordion/TaxProvidersAccordion.tsx rename to src/components/customers/createCustomer/ExternalAppsAccordion/TaxProvidersAccordion.tsx diff --git a/src/components/customers/addDrawer/ExternalAppsAccordion/index.tsx b/src/components/customers/createCustomer/ExternalAppsAccordion/index.tsx similarity index 91% rename from src/components/customers/addDrawer/ExternalAppsAccordion/index.tsx rename to src/components/customers/createCustomer/ExternalAppsAccordion/index.tsx index af7677360..c887b961c 100644 --- a/src/components/customers/addDrawer/ExternalAppsAccordion/index.tsx +++ b/src/components/customers/createCustomer/ExternalAppsAccordion/index.tsx @@ -9,7 +9,6 @@ import { ADD_CUSTOMER_TAX_PROVIDER_ACCORDION, MUI_BUTTON_BASE_ROOT_CLASSNAME, } from '~/core/constants/form' -import { INTEGRATIONS_ROUTE } from '~/core/router' import { CreateCustomerInput, IntegrationTypeEnum, @@ -17,7 +16,6 @@ import { UpdateCustomerInput, } from '~/generated/graphql' import { useInternationalization } from '~/hooks/core/useInternationalization' -import PSPIcons from '~/public/images/psp-icons.svg' import { MenuPopper } from '~/styles' import { AccountingProvidersAccordion } from './AccountingProvidersAccordion' @@ -66,29 +64,15 @@ export const ExternalAppsAccordion = ({ formikProps, isEdition }: TExternalAppsA return ( -
- -
+
{translate('text_66423cad72bbad009f2f5689')} + {translate('text_1735828930375zjo8m3yh5ra')}
} >
-
- - {translate('text_66423dbab233e60111c49461')} - - -
{showPaymentSection && ( = ({ formikProps }) = return ( {translate('text_63fcc3218d35b9377840f59b')} +
+ {translate('text_63fcc3218d35b9377840f59b')} + {translate('text_1735655045719sl0z0pooptb')} +
} >
- - {translate('text_63fcc3218d35b9377840f59f')} - {!!formikProps?.values?.metadata?.length && (
*:nth-child(3)]:col-span-2')}> diff --git a/src/components/designSystem/Accordion.tsx b/src/components/designSystem/Accordion.tsx index 5c8655bbc..4b34f4efc 100644 --- a/src/components/designSystem/Accordion.tsx +++ b/src/components/designSystem/Accordion.tsx @@ -60,12 +60,12 @@ export const Accordion = ({ return ( {summary} diff --git a/src/core/router/ObjectsRoutes.tsx b/src/core/router/ObjectsRoutes.tsx index 0ebb96444..cb8a51bcf 100644 --- a/src/core/router/ObjectsRoutes.tsx +++ b/src/core/router/ObjectsRoutes.tsx @@ -12,6 +12,7 @@ const InvoicesPage = lazyLoad(() => import('~/pages/InvoicesPage')) // Creation const ApiKeysForm = lazyLoad(() => import('~/pages/developers/ApiKeysForm')) const CreateBillableMetric = lazyLoad(() => import('~/pages/CreateBillableMetric')) +const CreateCustomer = lazyLoad(() => import('~/pages/CreateCustomer')) const CreatePlan = lazyLoad(() => import('~/pages/CreatePlan')) const CreateTax = lazyLoad(() => import('~/pages/CreateTax')) const CreateInvoice = lazyLoad(() => import('~/pages/CreateInvoice')) @@ -36,6 +37,9 @@ export const INVOICES_ROUTE = '/invoices' export const INVOICES_TAB_ROUTE = '/invoices/:tab' // Creation +export const CREATE_CUSTOMER_ROUTE = `/customer/create` +export const UPDATE_CUSTOMER_ROUTE = `/customer/:customerId/edit` + export const CREATE_API_KEYS_ROUTE = `/api-keys/create` export const UPDATE_API_KEYS_ROUTE = `/api-keys/:apiKeyId/edit` @@ -108,6 +112,12 @@ export const objectListRoutes: CustomRouteObject[] = [ ] export const objectCreationRoutes: CustomRouteObject[] = [ + { + path: [CREATE_CUSTOMER_ROUTE, UPDATE_CUSTOMER_ROUTE], + private: true, + element: , + permissions: ['customersCreate', 'customersUpdate'], + }, { path: [CREATE_API_KEYS_ROUTE, UPDATE_API_KEYS_ROUTE], private: true, diff --git a/src/generated/graphql.tsx b/src/generated/graphql.tsx index b88d1db4b..3fcdaa701 100644 --- a/src/generated/graphql.tsx +++ b/src/generated/graphql.tsx @@ -1889,6 +1889,8 @@ export type Customer = { addressLine1?: Maybe; addressLine2?: Maybe; anrokCustomer?: Maybe; + /** Invoice custom sections applicable to the customer */ + applicableInvoiceCustomSections?: Maybe>; applicableTimezone: TimezoneEnum; appliedAddOns?: Maybe>; appliedCoupons?: Maybe>; @@ -1921,6 +1923,8 @@ export type Customer = { hasCreditNotes: Scalars['Boolean']['output']; /** Define if a customer has overdue invoices */ hasOverdueInvoices: Scalars['Boolean']['output']; + /** Define if the customer has custom invoice custom sections selection */ + hasOverwrittenInvoiceCustomSectionsSelection?: Maybe; hubspotCustomer?: Maybe; id: Scalars['ID']['output']; invoiceGracePeriod?: Maybe; @@ -1942,6 +1946,8 @@ export type Customer = { salesforceCustomer?: Maybe; sequentialId: Scalars['String']['output']; shippingAddress?: Maybe; + /** Skip invoice custom sections for the customer */ + skipInvoiceCustomSections?: Maybe; slug: Scalars['String']['output']; state?: Maybe; /** Query subscriptions of a customer */ @@ -4506,8 +4512,6 @@ export type Query = { currentVersion: CurrentVersion; /** Query a single customer of an organization */ customer?: Maybe; - /** Query selected invoice_custom_sections of a customer */ - customerInvoiceCustomSections?: Maybe; /** Query invoices of a customer */ customerInvoices: InvoiceCollection; /** Query the usage of the customer on the current billing period */ @@ -4703,13 +4707,6 @@ export type QueryCustomerArgs = { }; -export type QueryCustomerInvoiceCustomSectionsArgs = { - customerId: Scalars['ID']['input']; - limit?: InputMaybe; - page?: InputMaybe; -}; - - export type QueryCustomerInvoicesArgs = { customerId: Scalars['ID']['input']; limit?: InputMaybe; @@ -5822,6 +5819,7 @@ export type UpdateCreditNoteInput = { export type UpdateCustomerInput = { addressLine1?: InputMaybe; addressLine2?: InputMaybe; + applicableInvoiceCustomSectionIds?: InputMaybe>; appliedDunningCampaignId?: InputMaybe; billingConfiguration?: InputMaybe; city?: InputMaybe; @@ -5851,6 +5849,7 @@ export type UpdateCustomerInput = { phone?: InputMaybe; providerCustomer?: InputMaybe; shippingAddress?: InputMaybe; + skipInvoiceCustomSections?: InputMaybe; state?: InputMaybe; taxCodes?: InputMaybe>; taxIdentificationNumber?: InputMaybe; @@ -5976,6 +5975,7 @@ export type UpdateInviteInput = { export type UpdateInvoiceCustomSectionInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; + code?: InputMaybe; description?: InputMaybe; details?: InputMaybe; displayName?: InputMaybe; @@ -8179,23 +8179,30 @@ export type UpdateCouponMutationVariables = Exact<{ export type UpdateCouponMutation = { __typename?: 'Mutation', updateCoupon?: { __typename?: 'Coupon', id: string, name: string, customersCount: number, status: CouponStatusEnum, amountCurrency?: CurrencyEnum | null, amountCents?: any | null, expiration: CouponExpiration, expirationAt?: any | null, couponType: CouponTypeEnum, percentageRate?: number | null, frequency: CouponFrequency, frequencyDuration?: number | null } | null }; -export type CustomerForExternalAppsAccordionFragment = { __typename?: 'Customer', id: string, customerType?: CustomerTypeEnum | null, currency?: CurrencyEnum | null, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, syncWithProvider?: boolean | null, providerPaymentMethods?: Array | null } | null }; +export type CustomerForExternalAppsAccordionFragment = { __typename?: 'Customer', id: string, customerType?: CustomerTypeEnum | null, currency?: CurrencyEnum | null, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null, targetedObject?: HubspotTargetedObjectsEnum | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, syncWithProvider?: boolean | null, providerPaymentMethods?: Array | null } | null }; -export type AddCustomerDrawerFragment = { __typename?: 'Customer', id: string, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalId: string, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, name?: string | null, firstname?: string | null, lastname?: string | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, syncWithProvider?: boolean | null, providerPaymentMethods?: Array | null } | null }; +export type AddCustomerDrawerFragment = { __typename?: 'Customer', id: string, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalId: string, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, name?: string | null, firstname?: string | null, lastname?: string | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null, targetedObject?: HubspotTargetedObjectsEnum | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, syncWithProvider?: boolean | null, providerPaymentMethods?: Array | null } | null }; export type CreateCustomerMutationVariables = Exact<{ input: CreateCustomerInput; }>; -export type CreateCustomerMutation = { __typename?: 'Mutation', createCustomer?: { __typename?: 'Customer', id: string, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalId: string, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, name?: string | null, firstname?: string | null, lastname?: string | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, displayName: string, createdAt: any, activeSubscriptionsCount: number, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, providerPaymentMethods?: Array | null, syncWithProvider?: boolean | null } | null } | null }; +export type CreateCustomerMutation = { __typename?: 'Mutation', createCustomer?: { __typename?: 'Customer', id: string, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalId: string, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, name?: string | null, firstname?: string | null, lastname?: string | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, displayName: string, createdAt: any, activeSubscriptionsCount: number, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, targetedObject?: HubspotTargetedObjectsEnum | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, providerPaymentMethods?: Array | null, syncWithProvider?: boolean | null } | null } | null }; export type UpdateCustomerMutationVariables = Exact<{ input: UpdateCustomerInput; }>; -export type UpdateCustomerMutation = { __typename?: 'Mutation', updateCustomer?: { __typename?: 'Customer', id: string, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalId: string, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, name?: string | null, firstname?: string | null, lastname?: string | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, displayName: string, createdAt: any, activeSubscriptionsCount: number, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, providerPaymentMethods?: Array | null, syncWithProvider?: boolean | null } | null } | null }; +export type UpdateCustomerMutation = { __typename?: 'Mutation', updateCustomer?: { __typename?: 'Customer', id: string, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalId: string, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, name?: string | null, firstname?: string | null, lastname?: string | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, displayName: string, createdAt: any, activeSubscriptionsCount: number, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, targetedObject?: HubspotTargetedObjectsEnum | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, providerPaymentMethods?: Array | null, syncWithProvider?: boolean | null } | null } | null }; + +export type GetSingleCustomerQueryVariables = Exact<{ + id: Scalars['ID']['input']; +}>; + + +export type GetSingleCustomerQuery = { __typename?: 'Query', customer?: { __typename?: 'Customer', id: string, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalId: string, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, name?: string | null, firstname?: string | null, lastname?: string | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null, targetedObject?: HubspotTargetedObjectsEnum | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, syncWithProvider?: boolean | null, providerPaymentMethods?: Array | null } | null } | null }; export type DunningCampaignFormFragment = { __typename?: 'DunningCampaign', name: string, code: string, description?: string | null, daysBetweenAttempts: number, maxAttempts: number, appliedToOrganization: boolean, thresholds: Array<{ __typename?: 'DunningCampaignThreshold', amountCents: any, currency: CurrencyEnum }> }; @@ -8587,7 +8594,7 @@ export type CreatePaymentRequestMutationVariables = Exact<{ export type CreatePaymentRequestMutation = { __typename?: 'Mutation', createPaymentRequest?: { __typename?: 'PaymentRequest', id: string } | null }; -export type CustomerItemFragment = { __typename?: 'Customer', id: string, name?: string | null, displayName: string, firstname?: string | null, lastname?: string | null, externalId: string, createdAt: any, activeSubscriptionsCount: number, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, syncWithProvider?: boolean | null, providerPaymentMethods?: Array | null } | null }; +export type CustomerItemFragment = { __typename?: 'Customer', id: string, name?: string | null, displayName: string, firstname?: string | null, lastname?: string | null, externalId: string, createdAt: any, activeSubscriptionsCount: number, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null, targetedObject?: HubspotTargetedObjectsEnum | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, syncWithProvider?: boolean | null, providerPaymentMethods?: Array | null } | null }; export type CustomersQueryVariables = Exact<{ page?: InputMaybe; @@ -8596,7 +8603,7 @@ export type CustomersQueryVariables = Exact<{ }>; -export type CustomersQuery = { __typename?: 'Query', customers: { __typename?: 'CustomerCollection', metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalPages: number }, collection: Array<{ __typename?: 'Customer', id: string, name?: string | null, displayName: string, firstname?: string | null, lastname?: string | null, externalId: string, createdAt: any, activeSubscriptionsCount: number, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, syncWithProvider?: boolean | null, providerPaymentMethods?: Array | null } | null }> } }; +export type CustomersQuery = { __typename?: 'Query', customers: { __typename?: 'CustomerCollection', metadata: { __typename?: 'CollectionMetadata', currentPage: number, totalPages: number }, collection: Array<{ __typename?: 'Customer', id: string, name?: string | null, displayName: string, firstname?: string | null, lastname?: string | null, externalId: string, createdAt: any, activeSubscriptionsCount: number, addressLine1?: string | null, addressLine2?: string | null, applicableTimezone: TimezoneEnum, canEditAttributes: boolean, city?: string | null, country?: CountryCode | null, currency?: CurrencyEnum | null, email?: string | null, externalSalesforceId?: string | null, legalName?: string | null, legalNumber?: string | null, taxIdentificationNumber?: string | null, customerType?: CustomerTypeEnum | null, phone?: string | null, state?: string | null, timezone?: TimezoneEnum | null, zipcode?: string | null, url?: string | null, paymentProvider?: ProviderTypeEnum | null, paymentProviderCode?: string | null, shippingAddress?: { __typename?: 'CustomerAddress', addressLine1?: string | null, addressLine2?: string | null, city?: string | null, country?: CountryCode | null, state?: string | null, zipcode?: string | null } | null, metadata?: Array<{ __typename?: 'CustomerMetadata', id: string, key: string, value: string, displayInInvoice: boolean }> | null, netsuiteCustomer?: { __typename: 'NetsuiteCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, subsidiaryId?: string | null, syncWithProvider?: boolean | null } | null, anrokCustomer?: { __typename: 'AnrokCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, xeroCustomer?: { __typename: 'XeroCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, hubspotCustomer?: { __typename: 'HubspotCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null, targetedObject?: HubspotTargetedObjectsEnum | null } | null, salesforceCustomer?: { __typename: 'SalesforceCustomer', id: string, integrationId?: string | null, externalCustomerId?: string | null, integrationCode?: string | null, integrationType?: IntegrationTypeEnum | null, syncWithProvider?: boolean | null } | null, providerCustomer?: { __typename?: 'ProviderCustomer', id: string, providerCustomerId?: string | null, syncWithProvider?: boolean | null, providerPaymentMethods?: Array | null } | null }> } }; export type GetinviteQueryVariables = Exact<{ token: Scalars['String']['input']; @@ -11016,6 +11023,7 @@ export const CustomerForExternalAppsAccordionFragmentDoc = gql` integrationCode integrationType syncWithProvider + targetedObject } salesforceCustomer { __typename @@ -20337,6 +20345,47 @@ export function useUpdateCustomerMutation(baseOptions?: Apollo.MutationHookOptio export type UpdateCustomerMutationHookResult = ReturnType; export type UpdateCustomerMutationResult = Apollo.MutationResult; export type UpdateCustomerMutationOptions = Apollo.BaseMutationOptions; +export const GetSingleCustomerDocument = gql` + query GetSingleCustomer($id: ID!) { + customer(id: $id) { + id + ...AddCustomerDrawer + } +} + ${AddCustomerDrawerFragmentDoc}`; + +/** + * __useGetSingleCustomerQuery__ + * + * To run a query within a React component, call `useGetSingleCustomerQuery` and pass it any options that fit your needs. + * When your component renders, `useGetSingleCustomerQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetSingleCustomerQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useGetSingleCustomerQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: GetSingleCustomerQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetSingleCustomerDocument, options); + } +export function useGetSingleCustomerLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetSingleCustomerDocument, options); + } +export function useGetSingleCustomerSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(GetSingleCustomerDocument, options); + } +export type GetSingleCustomerQueryHookResult = ReturnType; +export type GetSingleCustomerLazyQueryHookResult = ReturnType; +export type GetSingleCustomerSuspenseQueryHookResult = ReturnType; +export type GetSingleCustomerQueryResult = Apollo.QueryResult; export const GetSingleCampaignDocument = gql` query GetSingleCampaign($id: ID!) { dunningCampaign(id: $id) { diff --git a/src/hooks/useCreateEditCustomer.ts b/src/hooks/useCreateEditCustomer.ts index 8635ae116..cea315f88 100644 --- a/src/hooks/useCreateEditCustomer.ts +++ b/src/hooks/useCreateEditCustomer.ts @@ -1,8 +1,9 @@ import { FetchResult, gql } from '@apollo/client' -import { generatePath, useNavigate } from 'react-router-dom' +import { useEffect } from 'react' +import { generatePath, useNavigate, useParams } from 'react-router-dom' -import { addToast } from '~/core/apolloClient' -import { CUSTOMER_DETAILS_ROUTE } from '~/core/router' +import { addToast, hasDefinedGQLError } from '~/core/apolloClient' +import { CUSTOMER_DETAILS_ROUTE, CUSTOMERS_LIST_ROUTE, ERROR_404_ROUTE } from '~/core/router' import { AddCustomerDrawerFragment, CreateCustomerInput, @@ -13,6 +14,7 @@ import { UpdateCustomerInput, UpdateCustomerMutation, useCreateCustomerMutation, + useGetSingleCustomerQuery, useUpdateCustomerMutation, } from '~/generated/graphql' import { useInternationalization } from '~/hooks/core/useInternationalization' @@ -61,6 +63,7 @@ gql` integrationCode integrationType syncWithProvider + targetedObject } salesforceCustomer { __typename @@ -135,11 +138,21 @@ gql` } } + query GetSingleCustomer($id: ID!) { + customer(id: $id) { + id + ...AddCustomerDrawer + } + } + ${CustomerItemFragmentDoc} ` -type UseCreateEditCustomer = (props: { customer?: AddCustomerDrawerFragment | null }) => { +type UseCreateEditCustomer = () => { isEdition: boolean + loading: boolean + customer: AddCustomerDrawerFragment | undefined + onClose: () => void onSave: ( values: CreateCustomerInput | UpdateCustomerInput, ) => Promise< @@ -148,9 +161,21 @@ type UseCreateEditCustomer = (props: { customer?: AddCustomerDrawerFragment | nu > } -export const useCreateEditCustomer: UseCreateEditCustomer = ({ customer }) => { +export const useCreateEditCustomer: UseCreateEditCustomer = () => { const { translate } = useInternationalization() const navigate = useNavigate() + const { customerId } = useParams<{ customerId: string }>() + + const { + data: { customer } = {}, + loading, + error, + } = useGetSingleCustomerQuery({ + variables: { + id: customerId as string, + }, + skip: !customerId, + }) const [create] = useCreateCustomerMutation({ context: { silentErrorCodes: [LagoApiError.UnprocessableEntity] }, @@ -164,6 +189,7 @@ export const useCreateEditCustomer: UseCreateEditCustomer = ({ customer }) => { } }, }) + const [update] = useUpdateCustomerMutation({ context: { silentErrorCodes: [LagoApiError.UnprocessableEntity] }, onCompleted({ updateCustomer }) { @@ -172,49 +198,59 @@ export const useCreateEditCustomer: UseCreateEditCustomer = ({ customer }) => { message: translate('text_626162c62f790600f850b7da'), severity: 'success', }) + navigate(generatePath(CUSTOMER_DETAILS_ROUTE, { customerId: updateCustomer.id })) } }, }) + useEffect(() => { + if (hasDefinedGQLError('NotFound', error, 'customer')) { + navigate(ERROR_404_ROUTE) + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [error]) + + const onSave = async (values: CreateCustomerInput | UpdateCustomerInput) => { + const { paymentProvider, providerCustomer } = values + + const input = { + ...values, + paymentProvider, + providerCustomer: { + providerCustomerId: !paymentProvider ? null : providerCustomer?.providerCustomerId, + syncWithProvider: !paymentProvider ? null : providerCustomer?.syncWithProvider, + providerPaymentMethods: !providerCustomer?.providerPaymentMethods?.length + ? [ProviderPaymentMethodsEnum.Card] + : providerCustomer?.providerPaymentMethods, + }, + } + + if (customer && customerId) { + return await update({ + variables: { + input: { + id: customer?.id as string, + ...input, + }, + }, + }) + } + + return await create({ + variables: { + input, + }, + }) + } + return { - isEdition: !!customer, - onSave: !!customer - ? async ({ providerCustomer, paymentProvider, ...values }) => - await update({ - variables: { - input: { - id: customer?.id as string, - paymentProvider, - providerCustomer: { - providerCustomerId: !paymentProvider - ? null - : providerCustomer?.providerCustomerId, - syncWithProvider: !paymentProvider ? null : providerCustomer?.syncWithProvider, - providerPaymentMethods: !providerCustomer?.providerPaymentMethods?.length - ? [ProviderPaymentMethodsEnum.Card] - : providerCustomer?.providerPaymentMethods, - }, - ...values, - }, - }, - }) - : async ({ providerCustomer, paymentProvider, ...values }) => - await create({ - variables: { - input: { - ...values, - paymentProvider, - providerCustomer: { - providerCustomerId: !paymentProvider - ? null - : providerCustomer?.providerCustomerId, - syncWithProvider: !paymentProvider ? null : providerCustomer?.syncWithProvider, - providerPaymentMethods: !providerCustomer?.providerPaymentMethods?.length - ? [ProviderPaymentMethodsEnum.Card] - : providerCustomer?.providerPaymentMethods, - }, - }, - }, - }), + loading, + isEdition: !!customerId, + customer: customer || undefined, + onClose: () => + customerId + ? navigate(generatePath(CUSTOMER_DETAILS_ROUTE, { customerId })) + : navigate(CUSTOMERS_LIST_ROUTE), + onSave, } } diff --git a/src/components/customers/addDrawer/AddCustomerDrawer.tsx b/src/pages/CreateCustomer.tsx similarity index 70% rename from src/components/customers/addDrawer/AddCustomerDrawer.tsx rename to src/pages/CreateCustomer.tsx index 668dacaf7..b75534b06 100644 --- a/src/components/customers/addDrawer/AddCustomerDrawer.tsx +++ b/src/pages/CreateCustomer.tsx @@ -1,12 +1,20 @@ import { useFormik } from 'formik' -import { forwardRef, RefObject, useImperativeHandle, useRef, useState } from 'react' -import { array, object, string } from 'yup' +import { RefObject, useRef } from 'react' +import { array, object, ref, string } from 'yup' -import { Button, Drawer, DrawerRef, Typography } from '~/components/designSystem' +import { BillingAccordion } from '~/components/customers/createCustomer/BillingAccordion' +import { CustomerInformation } from '~/components/customers/createCustomer/CustomerInformation' +import { ExternalAppsAccordion } from '~/components/customers/createCustomer/ExternalAppsAccordion' +import { + LocalCustomerMetadata, + MetadataAccordion, +} from '~/components/customers/createCustomer/MetadataAccordion' +import { Button, DrawerRef, Typography } from '~/components/designSystem' +import { CenteredPage } from '~/components/layouts/Pages' +import { WarningDialog, WarningDialogRef } from '~/components/WarningDialog' import { hasDefinedGQLError } from '~/core/apolloClient' import { metadataSchema } from '~/formValidation/metadataSchema' import { - AddCustomerDrawerFragment, AnrokCustomer, CreateCustomerInput, CurrencyEnum, @@ -22,26 +30,13 @@ import { } from '~/generated/graphql' import { useInternationalization } from '~/hooks/core/useInternationalization' import { useCreateEditCustomer } from '~/hooks/useCreateEditCustomer' -import { DrawerContent, DrawerSubmitButton, DrawerTitle } from '~/styles' - -import { BillingAccordion } from './BillingAccordion' -import { CustomerInformation } from './CustomerInformation' -import { ExternalAppsAccordion } from './ExternalAppsAccordion' -import { LocalCustomerMetadata, MetadataAccordion } from './MetadataAccordion' - -export interface AddCustomerDrawerRef { - openDrawer: (customer?: AddCustomerDrawerFragment | null) => unknown - closeDrawer: () => unknown -} +import { FormLoadingSkeleton } from '~/styles/mainObjectsForm' -export const AddCustomerDrawer = forwardRef((_, ref) => { +const CreateCustomer = () => { const { translate } = useInternationalization() - const drawerRef = useRef(null) - const [customer, setCustomer] = useState(null) + const warningDialogRef = useRef(null) - const { isEdition, onSave } = useCreateEditCustomer({ - customer, - }) + const { isEdition, onSave, customer, loading, onClose } = useCreateEditCustomer() const formikProps = useFormik({ initialValues: { @@ -224,72 +219,77 @@ export const AddCustomerDrawer = forwardRef((_, ref) => { }, }) - useImperativeHandle(ref, () => ({ - openDrawer: (data) => { - setCustomer(data) - drawerRef.current?.openDrawer() - }, - closeDrawer: () => drawerRef.current?.closeDrawer(), - })) + const onAbort = () => { + formikProps.dirty ? warningDialogRef.current?.openDialog() : onClose() + } return ( - { - formikProps.resetForm() - formikProps.validateForm() - }} - showCloseWarningDialog={formikProps.dirty} - > - - - - {translate( - isEdition ? 'text_632b4acf0c41206cbcb8c2f8' : 'text_632b49e2620ea4c6d96c9652', - )} - - - {translate( - isEdition ? 'text_632b4acf0c41206cbcb8c2fa' : 'text_632b49e2620ea4c6d96c9654', - )} - - + + + + {isEdition + ? translate('text_1735651472114fzhjvrrcumw') + : translate('text_1734452833961s338w0x3b4s')} + + + + - - - - - + + ) -}) +} -AddCustomerDrawer.displayName = 'AddCustomerDrawer' +export default CreateCustomer diff --git a/src/pages/CustomerDetails.tsx b/src/pages/CustomerDetails.tsx index 97b010f6e..a6d84c4e1 100644 --- a/src/pages/CustomerDetails.tsx +++ b/src/pages/CustomerDetails.tsx @@ -7,10 +7,6 @@ import { AddCouponToCustomerDialog, AddCouponToCustomerDialogRef, } from '~/components/customers/AddCouponToCustomerDialog' -import { - AddCustomerDrawer, - AddCustomerDrawerRef, -} from '~/components/customers/addDrawer/AddCustomerDrawer' import { CustomerCreditNotesList } from '~/components/customers/CustomerCreditNotesList' import { CustomerInvoicesTab } from '~/components/customers/CustomerInvoicesTab' import { CustomerMainInfos } from '~/components/customers/CustomerMainInfos' @@ -41,6 +37,7 @@ import { CUSTOMER_DETAILS_TAB_ROUTE, CUSTOMER_REQUEST_OVERDUE_PAYMENT_ROUTE, CUSTOMERS_LIST_ROUTE, + UPDATE_CUSTOMER_ROUTE, } from '~/core/router' import { handleDownloadFile } from '~/core/utils/downloadFiles' import { @@ -101,7 +98,6 @@ export enum CustomerDetailsTabsOptions { const CustomerDetails = () => { const deleteDialogRef = useRef(null) - const editDialogRef = useRef(null) const addCouponDialogRef = useRef(null) const premiumWarningDialogRef = useRef(null) const { translate } = useInternationalization() @@ -273,8 +269,11 @@ const CustomerDetails = () => { variant="quaternary" align="left" onClick={() => { - editDialogRef.current?.openDrawer(data?.customer) - closePopper() + navigate( + generatePath(UPDATE_CUSTOMER_ROUTE, { + customerId: customerId as string, + }), + ) }} > {translate('text_626162c62f790600f850b718')} @@ -319,7 +318,13 @@ const CustomerDetails = () => { editDialogRef.current?.openDrawer(data?.customer)} + onEdit={() => + navigate( + generatePath(UPDATE_CUSTOMER_ROUTE, { + customerId: customerId as string, + }), + ) + } /> @@ -458,7 +463,6 @@ const CustomerDetails = () => { - diff --git a/src/pages/CustomersList.tsx b/src/pages/CustomersList.tsx index 23515d7e3..7d63ed9db 100644 --- a/src/pages/CustomersList.tsx +++ b/src/pages/CustomersList.tsx @@ -1,11 +1,7 @@ import { gql } from '@apollo/client' import { useRef } from 'react' -import { generatePath } from 'react-router-dom' +import { generatePath, useNavigate } from 'react-router-dom' -import { - AddCustomerDrawer, - AddCustomerDrawerRef, -} from '~/components/customers/addDrawer/AddCustomerDrawer' import { DeleteCustomerDialog, DeleteCustomerDialogRef, @@ -14,7 +10,7 @@ import { computeCustomerInitials } from '~/components/customers/utils' import { Avatar, Button, InfiniteScroll, Table, Typography } from '~/components/designSystem' import { PaymentProviderChip } from '~/components/PaymentProviderChip' import { SearchInput } from '~/components/SearchInput' -import { CUSTOMER_DETAILS_ROUTE } from '~/core/router' +import { CREATE_CUSTOMER_ROUTE, CUSTOMER_DETAILS_ROUTE, UPDATE_CUSTOMER_ROUTE } from '~/core/router' import { AddCustomerDrawerFragmentDoc, CustomerItemFragmentDoc, @@ -59,6 +55,7 @@ const CustomersList = () => { const { translate } = useInternationalization() const { hasPermissions } = usePermissions() const { formatTimeOrgaTZ } = useOrganizationInfos() + const navigate = useNavigate() const [getCustomers, { data, error, loading, fetchMore, variables }] = useCustomersLazyQuery({ variables: { limit: 20 }, @@ -67,7 +64,6 @@ const CustomersList = () => { nextFetchPolicy: 'network-only', }) - const addCustomerDrawerRef = useRef(null) const deleteDialogRef = useRef(null) const { debouncedSearch, isLoading } = useDebouncedSearch(getCustomers, loading) @@ -84,10 +80,7 @@ const CustomersList = () => { placeholder={translate('text_63befc65efcd9374da45b801')} /> {hasPermissions(['customersCreate']) && ( - )} @@ -174,7 +167,12 @@ const CustomersList = () => { ? { startIcon: 'pen', title: translate('text_6261640f28a49700f1290df3'), - onAction: () => addCustomerDrawerRef?.current?.openDrawer(customer), + onAction: () => + navigate( + generatePath(UPDATE_CUSTOMER_ROUTE, { + customerId: customer.id, + }), + ), } : null, hasPermissions(['customersDelete']) @@ -209,7 +207,7 @@ const CustomersList = () => { title: translate('text_17344528339611v83lf47q5m'), subtitle: translate('text_1734452833961ix7z38723pg'), buttonTitle: translate('text_1734452833961s338w0x3b4s'), - buttonAction: () => addCustomerDrawerRef.current?.openDrawer(), + buttonAction: () => navigate(CREATE_CUSTOMER_ROUTE), buttonVariant: 'primary', } : { @@ -220,7 +218,6 @@ const CustomersList = () => { /> -
) diff --git a/translations/base.json b/translations/base.json index 027999cc7..0c04119b4 100644 --- a/translations/base.json +++ b/translations/base.json @@ -449,8 +449,6 @@ "text_66423cad72bbad009f2f56a0": "Subsidiary", "text_66423cad72bbad009f2f56a2": "Select and search a subsidiary name or external ID", "text_66423cad72bbad009f2f56a4": "This customer will be created to NetSuite after editing in Lago", - "text_66423dbab233e60111c49461": "Link this customer to external connections", - "text_66423dbab233e60111c49462": "Choose an integration already connected with Lago. If you haven't connected yet, feel free to do so in the Integrations section.", "text_6645daa0468420011304aded": "Please connect your external tools in the Settings → Integration section", "text_66461b36b4b38c006e8b5067": "Map your credit notes with a {{integrationType}} item", "text_66461b36b4b38c006e8b5068": "To link Lago credit notes with {{integrationType}}, please choose the corresponding credit note item in your {{integrationType}} account.", @@ -488,7 +486,6 @@ "text_6328e70de459381ed4ba50d6": "The subscription upgrade will take effect immediately for your customer\nHowever, the downgrade will be effective after {{subscriptionEndDate}}", "text_632a2d437e341dcc76817556": "Code already existing, please type a new one", "text_63fcc3218d35b9377840f59b": "Metadata", - "text_63fcc3218d35b9377840f59f": "Add metadata to the customer account and choose whether or not it should appear on the invoice.", "text_63fcc3218d35b9377840f5a3": "Key", "text_63fcc3218d35b9377840f5a7": "Enter a key", "text_63fcc3218d35b9377840f5ab": "Value", @@ -519,15 +516,8 @@ "text_6405cac5c833dcf18cad0198": "Edit", "text_6405cac5c833dcf18cad0204": "Metadata successfully added to the invoice", "text_6405cac5c833dcf18cad01fb": "Metadata successfully edited on invoice", - "text_632b49e2620ea4c6d96c9650": "Add a plan to {{customerName}}", - "text_632b49e2620ea4c6d96c9652": "Add a customer", - "text_632b49e2620ea4c6d96c9654": "To create a customer, please fill out this form", "text_632b49e2620ea4c6d96c9662": "Billing information", "text_632b49e2620ea4c6d96c9666": "Create customer", - "text_632b4acf0c41206cbcb8c2f6": "Edit customer information", - "text_632b4acf0c41206cbcb8c2f8": "Edit customer information", - "text_632b4acf0c41206cbcb8c2fa": "Edit the customer’s information which will be displayed in the app and on the invoices.", - "text_632b4acf0c41206cbcb8c30c": "Edit customer information", "text_632b4acf0c41206cbcb8c324": "Currency", "text_632c6e59b73f9a54d4c7223f": "Your currency selection will be locked once customer carries a coupon, add-on, wallet or a subscription", "text_632c6e59b73f9a54d4c72247": "Currency", @@ -1738,10 +1728,10 @@ "text_624453d52e945301380e49c4": "Type a trial period number", "text_624453d52e945301380e49c6": "days", "text_6246b6bc6b25f500b779aa7a": "No billable metrics", - "text_624aa732d6af4e0103d40e61": "Collapse section", + "text_624aa732d6af4e0103d40e61": "Collapse", "text_624aa732d6af4e0103d40e65": "Delete charge", "text_624aa732d6af4e0103d40e6f": "Standard pricing", - "text_624aa79870f60300a3c4d074": "Expand section", + "text_624aa79870f60300a3c4d074": "Expand", "text_624ea7c29103fd010732ab7d": "Enter a number to move forward (use “.” for decimal)", "text_62a30bc79dae432fb055330b": "Apply charges monthly", "text_62b32ec6b0434070791c2d4c": "Weekly", @@ -1881,7 +1871,6 @@ "text_624efab67eb2570101d117c6": "Type a name", "text_624efab67eb2570101d117ce": "Customer external ID", "text_624efab67eb2570101d117d6": "Type an external ID", - "text_624efab67eb2570101d117de": "Use customer external ID defined in your backend", "text_6250304370f0f700a8fdc27d": "Details", "text_6250304370f0f700a8fdc283": "External ID", "text_6250304370f0f700a8fdc28b": "Assign a plan", @@ -1905,8 +1894,6 @@ "text_6335e50b0b089e1d8ed50960": "{{planName}} will be activated on {{startDate}}", "text_6335e50b0b089e1d8ed508da": "As the subscription is pending, the new plan will take effect on the start date defined previously", "text_6335e8900c69f8ebdfef5312": "Subscription information", - "text_626c0c09812bbc00e4c59df1": "Account information", - "text_626c0c09812bbc00e4c59dff": "Company information (optional)", "text_626c0c09812bbc00e4c59e01": "Legal name", "text_626c0c09812bbc00e4c59e03": "Type a legal name", "text_626c0c09812bbc00e4c59e05": "Legal number", @@ -1915,7 +1902,6 @@ "text_626c0c09812bbc00e4c59e0b": "Type an email", "text_626c0c09812bbc00e4c59e0d": "Phone number", "text_626c0c09812bbc00e4c59e0f": "Type a phone number", - "text_626c0c09812bbc00e4c59e19": "Billing address (optional)", "text_626c0c09812bbc00e4c59e1b": "Address", "text_626c0c09812bbc00e4c59e1d": "Address line 1", "text_626c0c09812bbc00e4c59e1f": "Address line 2", @@ -2754,5 +2740,16 @@ "text_173255335844629sa49oljif": "Preview invoice", "text_1735045451930tezr0et3e6l": "Invoice is pending finalization.", "text_1735045451931zfgc6yvvcfm": "This invoice is in the queue, waiting to be finalized. It may take a bit of time. Please refresh or check back later.", - "text_17364422965884zgujkr1l7j": "Deleting this coupon will make it permanently unavailable and remove the applied instance. This action is irreversible. Are you sure you want to proceed?|Deleting this coupon will make it permanently unavailable and remove all {{appliedCouponsCount}} applied instances. This action is irreversible. Are you sure you want to proceed?" + "text_17364422965884zgujkr1l7j": "Deleting this coupon will make it permanently unavailable and remove the applied instance. This action is irreversible. Are you sure you want to proceed?|Deleting this coupon will make it permanently unavailable and remove all {{appliedCouponsCount}} applied instances. This action is irreversible. Are you sure you want to proceed?", + "text_1735651472114fzhjvrrcumw": "Edit a customer", + "text_1735652987833k0i3l9ill5g": "Define the customer information to easily identify it.", + "text_1735653854525b68ew2qbpdp": "Define the customer information to use in the invoices.", + "text_1735653854525cemtriccmuh": "Type an address line 1", + "text_1735653854525dq6plq7exd3": "Type an address line 2", + "text_1735654189136h4rgi3zdwaa": "Type a zip code", + "text_1735654189136vn4mbzp4jhs": "Type a city", + "text_173565418913690jb89ypb63": "Type a state", + "text_1735654189136s548dkluunb": "Search and select a country", + "text_1735655045719sl0z0pooptb": "Add metadata to the customer and decide if it appears on the invoice.", + "text_1735828930375zjo8m3yh5ra": "Sync this customer data to an integration connected to Lago." }