Skip to content

Commit

Permalink
chore: remove debug info dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed Dec 23, 2024
1 parent 011e96e commit d09c29b
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 125 deletions.
13 changes: 1 addition & 12 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
import { ApolloClient, ApolloProvider, NormalizedCacheObject } from '@apollo/client'
import { loadDevMessages, loadErrorMessages } from '@apollo/client/dev'
import { StyledEngineProvider, ThemeProvider } from '@mui/material'
import { useEffect, useRef, useState } from 'react'
import { useEffect, useState } from 'react'
import { BrowserRouter } from 'react-router-dom'

import { DebugInfoDialog, DebugInfoDialogRef } from '~/components/DebugInfoDialog'
import { ToastContainer } from '~/components/designSystem/Toasts'
import { ErrorBoundary } from '~/components/ErrorBoundary'
import { RouteWrapper } from '~/components/RouteWrapper'
import { UserIdentifier } from '~/components/UserIdentifier'
import { envGlobalVar, initializeApolloClient, initializeTranslations } from '~/core/apolloClient'
import { initializeYup } from '~/formValidation/initializeYup'
import { useShortcuts } from '~/hooks/ui/useShortcuts'
import { theme } from '~/styles'

import { AppEnvEnum } from './core/constants/globalTypes'

const App = () => {
const [client, setClient] = useState<ApolloClient<NormalizedCacheObject> | null>(null)
const debugInfoDialogRef = useRef<DebugInfoDialogRef>(null)
const { appEnv } = envGlobalVar()

useShortcuts([
{
keys: ['Ctrl', 'KeyI'],
action: () => debugInfoDialogRef.current?.openDialog(),
},
])

useEffect(() => {
async function initApolloClient() {
const apolloClient = await initializeApolloClient()
Expand Down Expand Up @@ -58,7 +48,6 @@ const App = () => {
</ErrorBoundary>
<UserIdentifier />
<ToastContainer />
<DebugInfoDialog ref={debugInfoDialogRef} />
</ThemeProvider>
</StyledEngineProvider>
</ApolloProvider>
Expand Down
98 changes: 0 additions & 98 deletions src/components/DebugInfoDialog.tsx

This file was deleted.

70 changes: 64 additions & 6 deletions src/generated/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1207,13 +1207,22 @@ export type CreateCustomerWalletTransactionInput = {
walletId: Scalars['ID']['input'];
};

/** Autogenerated input type of CreateCreditNotesDataExport */
export type CreateDataExportsCreditNotesInput = {
/** A unique identifier for the client performing the mutation. */
clientMutationId?: InputMaybe<Scalars['String']['input']>;
filters: DataExportCreditNoteFiltersInput;
format: DataExportFormatTypeEnum;
resourceType: CreditNoteExportTypeEnum;
};

/** Autogenerated input type of CreateInvoicesDataExport */
export type CreateDataExportsInvoicesInput = {
/** A unique identifier for the client performing the mutation. */
clientMutationId?: InputMaybe<Scalars['String']['input']>;
filters: DataExportInvoiceFiltersInput;
format: DataExportFormatTypeEnum;
resourceType: ExportTypeEnum;
resourceType: InvoiceExportTypeEnum;
};

/** Autogenerated input type of CreateDunningCampaign */
Expand Down Expand Up @@ -1492,6 +1501,11 @@ export type CreditNoteEstimate = {
taxesRate: Scalars['Float']['output'];
};

export enum CreditNoteExportTypeEnum {
CreditNoteItems = 'credit_note_items',
CreditNotes = 'credit_notes'
}

export type CreditNoteItem = {
__typename?: 'CreditNoteItem';
amountCents: Scalars['BigInt']['output'];
Expand Down Expand Up @@ -2112,6 +2126,23 @@ export type DataExport = {
status: DataExportStatusEnum;
};

/** Export credit notes search query and filters input argument */
export type DataExportCreditNoteFiltersInput = {
amountFrom?: InputMaybe<Scalars['Int']['input']>;
amountTo?: InputMaybe<Scalars['Int']['input']>;
creditStatus?: InputMaybe<Array<CreditNoteCreditStatusEnum>>;
currency?: InputMaybe<CurrencyEnum>;
customerExternalId?: InputMaybe<Scalars['String']['input']>;
/** Uniq ID of the customer */
customerId?: InputMaybe<Scalars['ID']['input']>;
invoiceNumber?: InputMaybe<Scalars['String']['input']>;
issuingDateFrom?: InputMaybe<Scalars['ISO8601Date']['input']>;
issuingDateTo?: InputMaybe<Scalars['ISO8601Date']['input']>;
reason?: InputMaybe<Array<CreditNoteReasonEnum>>;
refundStatus?: InputMaybe<Array<CreditNoteRefundStatusEnum>>;
searchTerm?: InputMaybe<Scalars['String']['input']>;
};

export enum DataExportFormatTypeEnum {
Csv = 'csv'
}
Expand Down Expand Up @@ -2468,11 +2499,6 @@ export type EventCollection = {
metadata: CollectionMetadata;
};

export enum ExportTypeEnum {
InvoiceFees = 'invoice_fees',
Invoices = 'invoices'
}

export type Fee = InvoiceItem & {
__typename?: 'Fee';
adjustedFee: Scalars['Boolean']['output'];
Expand Down Expand Up @@ -2975,6 +3001,11 @@ export type InvoiceCustomSectionCollection = {
metadata: CollectionMetadata;
};

export enum InvoiceExportTypeEnum {
InvoiceFees = 'invoice_fees',
Invoices = 'invoices'
}

/** Invoice Item */
export type InvoiceItem = {
amountCents: Scalars['BigInt']['output'];
Expand Down Expand Up @@ -3256,6 +3287,8 @@ export type Mutation = {
createCoupon?: Maybe<Coupon>;
/** Creates a new Credit Note */
createCreditNote?: Maybe<CreditNote>;
/** Request data export of credit notes */
createCreditNotesDataExport?: Maybe<DataExport>;
/** Creates a new customer */
createCustomer?: Maybe<Customer>;
/** Creates a new Customer Wallet Transaction from Customer Portal */
Expand Down Expand Up @@ -3530,6 +3563,11 @@ export type MutationCreateCreditNoteArgs = {
};


export type MutationCreateCreditNotesDataExportArgs = {
input: CreateDataExportsCreditNotesInput;
};


export type MutationCreateCustomerArgs = {
input: CreateCustomerInput;
};
Expand Down Expand Up @@ -4233,6 +4271,7 @@ export type Permissions = {
couponsUpdate: Scalars['Boolean']['output'];
couponsView: Scalars['Boolean']['output'];
creditNotesCreate: Scalars['Boolean']['output'];
creditNotesExport: Scalars['Boolean']['output'];
creditNotesUpdate: Scalars['Boolean']['output'];
creditNotesView: Scalars['Boolean']['output'];
creditNotesVoid: Scalars['Boolean']['output'];
Expand Down Expand Up @@ -4458,6 +4497,8 @@ export type Query = {
currentVersion: CurrentVersion;
/** Query a single customer of an organization */
customer?: Maybe<Customer>;
/** Query selected invoice_custom_sections of a customer */
customerInvoiceCustomSections?: Maybe<InvoiceCustomSectionCollection>;
/** Query invoices of a customer */
customerInvoices: InvoiceCollection;
/** Query the usage of the customer on the current billing period */
Expand Down Expand Up @@ -4631,9 +4672,19 @@ export type QueryCreditNoteEstimateArgs = {


export type QueryCreditNotesArgs = {
amountFrom?: InputMaybe<Scalars['Int']['input']>;
amountTo?: InputMaybe<Scalars['Int']['input']>;
creditStatus?: InputMaybe<Array<CreditNoteCreditStatusEnum>>;
currency?: InputMaybe<CurrencyEnum>;
customerExternalId?: InputMaybe<Scalars['String']['input']>;
customerId?: InputMaybe<Scalars['ID']['input']>;
invoiceNumber?: InputMaybe<Scalars['String']['input']>;
issuingDateFrom?: InputMaybe<Scalars['ISO8601Date']['input']>;
issuingDateTo?: InputMaybe<Scalars['ISO8601Date']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>;
page?: InputMaybe<Scalars['Int']['input']>;
reason?: InputMaybe<Array<CreditNoteReasonEnum>>;
refundStatus?: InputMaybe<Array<CreditNoteRefundStatusEnum>>;
searchTerm?: InputMaybe<Scalars['String']['input']>;
};

Expand All @@ -4643,6 +4694,13 @@ export type QueryCustomerArgs = {
};


export type QueryCustomerInvoiceCustomSectionsArgs = {
customerId: Scalars['ID']['input'];
limit?: InputMaybe<Scalars['Int']['input']>;
page?: InputMaybe<Scalars['Int']['input']>;
};


export type QueryCustomerInvoicesArgs = {
customerId: Scalars['ID']['input'];
limit?: InputMaybe<Scalars['Int']['input']>;
Expand Down
10 changes: 1 addition & 9 deletions translations/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,14 +460,6 @@
"text_6684044e95fa220048a145a7": "Netsuite credit note url",
"text_6650b36fc702a4014c8788fd": "Sync invoice to NetSuite",
"text_665d742ee9853200e3a6be7f": "Sync credit note to NetSuite",
"text_62f50d3cc15266f3bd1d83ce": "Infos copied to clipboard",
"text_62f50d26c989ab0319688498": "Environment information",
"text_62f50d26c989ab031968849a": "Use and share this information if you’re <a rel=\"external\" target=\"_blank\" href=\"https://github.com/getlago/lago-front/issues/new?labels=%F0%9F%90%9E+bug&template=bug.md&title=%5BBUG%5D\">reporting a bug to Lago</a>",
"text_62f50d26c989ab031968849e": "App environment ",
"text_62f50d26c989ab03196884a2": "API URL",
"text_62f50d26c989ab03196884a6": "User ID",
"text_62f50d26c989ab03196884aa": "Front version",
"text_62f50d26c989ab03196884ac": "Copy all info",
"text_62f50d26c989ab03196884ae": "Close",
"text_62ea7cd44cd4b14bb9ac1db7": "Billing time",
"text_62ea7cd44cd4b14bb9ac1db9": "Beginning of month",
Expand Down Expand Up @@ -2725,4 +2717,4 @@
"text_1734452833961ix7z38723pg": "A customer represents your client and can be associated with subscriptions, invoices, and other objects.",
"text_1734452833961s338w0x3b4s": "Create a customer",
"text_1734452833961chacuky8218": "Active sub."
}
}

0 comments on commit d09c29b

Please sign in to comment.