Fix stories

This commit is contained in:
dominik-zeglen 2020-01-03 10:16:37 +01:00
parent 43a72d8436
commit 8b2aeaf58a
2 changed files with 17 additions and 3 deletions

View file

@ -34,7 +34,6 @@ import { OrderDraftBulkCancel } from "../../types/OrderDraftBulkCancel";
import { OrderDraftCreate } from "../../types/OrderDraftCreate"; import { OrderDraftCreate } from "../../types/OrderDraftCreate";
import { import {
orderDraftListUrl, orderDraftListUrl,
OrderDraftListUrlFilters,
OrderDraftListUrlQueryParams, OrderDraftListUrlQueryParams,
orderUrl, orderUrl,
OrderDraftListUrlDialog OrderDraftListUrlDialog
@ -204,7 +203,7 @@ export const OrderDraftList: React.FC<OrderDraftListProps> = ({ params }) => {
initialSearch={params.query || ""} initialSearch={params.query || ""}
onSearchChange={handleSearchChange} onSearchChange={handleSearchChange}
onFilterChange={changeFilters} onFilterChange={changeFilters}
onAll={() => navigate(orderDraftListUrl())} onAll={resetFilters}
onTabChange={handleTabChange} onTabChange={handleTabChange}
onTabDelete={() => openModal("delete-search")} onTabDelete={() => openModal("delete-search")}
onTabSave={() => openModal("save-search")} onTabSave={() => openModal("save-search")}

View file

@ -7,7 +7,8 @@ import {
pageListProps, pageListProps,
searchPageProps, searchPageProps,
tabPageProps, tabPageProps,
sortPageProps sortPageProps,
filterPageProps
} from "../../../fixtures"; } from "../../../fixtures";
import OrderDraftListPage, { import OrderDraftListPage, {
OrderDraftListPageProps OrderDraftListPageProps
@ -21,6 +22,20 @@ const props: OrderDraftListPageProps = {
...searchPageProps, ...searchPageProps,
...sortPageProps, ...sortPageProps,
...tabPageProps, ...tabPageProps,
...filterPageProps,
filterOpts: {
created: {
active: false,
value: {
max: undefined,
min: undefined
}
},
customer: {
active: false,
value: undefined
}
},
onAdd: () => undefined, onAdd: () => undefined,
orders, orders,
sort: { sort: {