Skip to content

Commit

Permalink
misc: use Table component for plan list
Browse files Browse the repository at this point in the history
  • Loading branch information
ansmonjol committed Dec 31, 2024
1 parent 065f14a commit 06e9001
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 376 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/10-resources/t40-create-plan.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Create plan', () => {

it('should be able to access plans', () => {
cy.get('[data-test="create-plan"]').should('exist')
cy.get('[data-test="empty"]').should('exist')
cy.get('[data-test="empty-state"]').should('exist')
})

it('should be able to create a simple plan', () => {
Expand Down
1 change: 1 addition & 0 deletions src/components/GenericPlaceholder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const GenericPlaceholder = ({
},
className,
)}
data-test="empty-state"
{...props}
>
{image}
Expand Down
202 changes: 0 additions & 202 deletions src/components/plans/PlanItem.tsx

This file was deleted.

42 changes: 21 additions & 21 deletions src/generated/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7163,8 +7163,6 @@ export type GraduatedPercentageChargeFragment = { __typename?: 'Properties', gra

export type PackageChargeFragment = { __typename?: 'Properties', amount?: string | null, packageSize?: any | null, freeUnits?: any | null };

export type PlanItemFragment = { __typename?: 'Plan', id: string, name: string, code: string, chargesCount: number, activeSubscriptionsCount: number, createdAt: any, draftInvoicesCount: number };

export type TaxForPlanSettingsSectionFragment = { __typename?: 'Tax', id: string, code: string, name: string, rate: number };

export type PlanForSettingsSectionFragment = { __typename?: 'Plan', id: string, amountCurrency: CurrencyEnum, code: string, description?: string | null, interval: PlanInterval, name: string, taxes?: Array<{ __typename?: 'Tax', id: string, code: string, name: string, rate: number }> | null };
Expand Down Expand Up @@ -8692,6 +8690,8 @@ export type GetPlanForDetailsQueryVariables = Exact<{

export type GetPlanForDetailsQuery = { __typename?: 'Query', plan?: { __typename?: 'Plan', id: string, name: string, code: string, draftInvoicesCount: number, activeSubscriptionsCount: number, parent?: { __typename?: 'Plan', id: string } | null } | null };

export type PlanItemFragment = { __typename?: 'Plan', id: string, name: string, code: string, chargesCount: number, activeSubscriptionsCount: number, createdAt: any, draftInvoicesCount: number };

export type PlansQueryVariables = Exact<{
page?: InputMaybe<Scalars['Int']['input']>;
limit?: InputMaybe<Scalars['Int']['input']>;
Expand Down Expand Up @@ -9712,25 +9712,6 @@ export const BillableMetricForChargeSectionFragmentDoc = gql`
}
}
`;
export const DeletePlanDialogFragmentDoc = gql`
fragment DeletePlanDialog on Plan {
id
name
draftInvoicesCount
activeSubscriptionsCount
}
`;
export const PlanItemFragmentDoc = gql`
fragment PlanItem on Plan {
id
name
code
chargesCount
activeSubscriptionsCount
createdAt
...DeletePlanDialog
}
${DeletePlanDialogFragmentDoc}`;
export const PlanSubscriptionListItemForSubscriptionListFragmentDoc = gql`
fragment PlanSubscriptionListItemForSubscriptionList on Subscription {
id
Expand Down Expand Up @@ -11781,6 +11762,25 @@ export const SalesforceIntegrationInfosForInvoiceOverviewFragmentDoc = gql`
instanceId
}
`;
export const DeletePlanDialogFragmentDoc = gql`
fragment DeletePlanDialog on Plan {
id
name
draftInvoicesCount
activeSubscriptionsCount
}
`;
export const PlanItemFragmentDoc = gql`
fragment PlanItem on Plan {
id
name
code
chargesCount
activeSubscriptionsCount
createdAt
...DeletePlanDialog
}
${DeletePlanDialogFragmentDoc}`;
export const ApiKeyRevealedForApiKeysListFragmentDoc = gql`
fragment ApiKeyRevealedForApiKeysList on ApiKey {
id
Expand Down
Loading

0 comments on commit 06e9001

Please sign in to comment.