Skip to content

Commit

Permalink
feat: mv pages/Invoices/ListView to pages/InvoicesListView, update Li…
Browse files Browse the repository at this point in the history
…stView args
  • Loading branch information
trevor-anderson committed Feb 20, 2024
1 parent 3170f87 commit f322b81
Show file tree
Hide file tree
Showing 8 changed files with 300 additions and 307 deletions.
117 changes: 0 additions & 117 deletions src/pages/Invoices/ListView/ListItem.tsx

This file was deleted.

86 changes: 0 additions & 86 deletions src/pages/Invoices/ListView/ListView.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/pages/Invoices/ListView/index.ts

This file was deleted.

103 changes: 0 additions & 103 deletions src/pages/Invoices/ListView/tableProps.tsx

This file was deleted.

58 changes: 58 additions & 0 deletions src/pages/InvoicesListView/InvoicesListView.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import {
withMockApolloDecorator,
withHomePageLayoutDecorator,
type MockApolloDecoratorArgs,
} from "@/../.storybook/decorators";
import { QUERIES } from "@/graphql/queries";
import { MOCK_INVOICES } from "@/tests/mockItems/mockInvoices";
import { InvoicesListView } from "./InvoicesListView";
import type { Meta, StoryObj } from "@storybook/react";

const meta = {
title: "Pages/InvoicesListView",
component: InvoicesListView,
decorators: [withHomePageLayoutDecorator, withMockApolloDecorator],
parameters: {
layout: "fullscreen",
},
} satisfies Meta<MockApolloDecoratorArgs>;

export default meta;

///////////////////////////////////////////////////////////
// STORIES

type Story = StoryObj<typeof meta>;

export const WithMockInvoices = {
args: {
_mock_apollo_decorator_args: {
mocks: [
{
request: { query: QUERIES.MY_INVOICES },
result: { data: MOCK_INVOICES },
},
],
},
},
} satisfies Story;

export const EmptyList = {
args: {
_mock_apollo_decorator_args: {
mocks: [
{
request: { query: QUERIES.MY_INVOICES },
result: {
data: {
myInvoices: {
createdByUser: [],
assignedToUser: [],
},
},
},
},
],
},
},
} satisfies Story;
Loading

0 comments on commit f322b81

Please sign in to comment.