Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add missing stories
dominik-zeglenca15ca3b40ad
diff --git a/saleor/static/dashboard-next/attributes/components/AttributeValueBulkDeleteDialog/AttributeValueBulkDeleteDialog.tsx b/saleor/static/dashboard-next/attributes/components/AttributeValueBulkDeleteDialog/AttributeValueBulkDeleteDialog.tsxdeleted file mode 100644index 9944acd618..0000000000--- a/saleor/static/dashboard-next/attributes/components/AttributeValueBulkDeleteDialog/AttributeValueBulkDeleteDialog.tsx+++ /dev/null@@ -1,9 +0,0 @@-import * as React from "react";--export interface AttributeValueBulkDeleteDialogProps {--}--const AttributeValueBulkDeleteDialog: React.StatelessComponent<AttributeValueBulkDeleteDialogProps> = () => <div />;-AttributeValueBulkDeleteDialog.displayName = "AttributeValueBulkDeleteDialog";-export default AttributeValueBulkDeleteDialog;diff --git a/saleor/static/dashboard-next/attributes/components/AttributeValueBulkDeleteDialog/index.ts b/saleor/static/dashboard-next/attributes/components/AttributeValueBulkDeleteDialog/index.tsdeleted file mode 100644index 8394647b55..0000000000--- a/saleor/static/dashboard-next/attributes/components/AttributeValueBulkDeleteDialog/index.ts+++ /dev/null@@ -1,2 +0,0 @@-export { default } from './AttributeValueBulkDeleteDialog';-export * from './AttributeValueBulkDeleteDialog';\ No newline at end of filediff --git a/saleor/static/dashboard-next/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx b/saleor/static/dashboard-next/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsxindex 755aa17bae..8f86efbb9f 100644--- a/saleor/static/dashboard-next/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx+++ b/saleor/static/dashboard-next/attributes/components/AttributeValueEditDialog/AttributeValueEditDialog.tsx@@ -65,6 +65,7 @@ const AttributeValueEditDialog: React.StatelessComponent<disabled={disabled}error={!!formErrors.slug}fullWidth+ helperText={formErrors.slug}name={"slug" as keyof AttributeValueEditDialogFormData}label={i18n.t("Admin name", {context: "attribute slug"@@ -77,6 +78,7 @@ const AttributeValueEditDialog: React.StatelessComponent<disabled={disabled}error={!!formErrors.name}fullWidth+ helperText={formErrors.name}name={"name" as keyof AttributeValueEditDialogFormData}label={i18n.t("Default Storefront Name", {context: "attribute name"diff --git a/saleor/static/dashboard-next/storybook/config.js b/saleor/static/dashboard-next/storybook/config.jsindex c57cb39cac..dffb7d3a85 100644--- a/saleor/static/dashboard-next/storybook/config.js+++ b/saleor/static/dashboard-next/storybook/config.js@@ -45,8 +45,12 @@ function loadStories() {require("./stories/auth/LoginLoading");// Attributes- require("./stories/attributes/AttributePage");+ require("./stories/attributes/AttributeBulkDeleteDialog");+ require("./stories/attributes/AttributeDeleteDialog");require("./stories/attributes/AttributeListPage");+ require("./stories/attributes/AttributePage");+ require("./stories/attributes/AttributeValueDeleteDialog");+ require("./stories/attributes/AttributeValueEditDialog");// Categoriesrequire("./stories/categories/CategoryProducts");diff --git a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeBulkDeleteDialog.tsx b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeBulkDeleteDialog.tsxindex 5a8a177dbc..8973192aa7 100644--- a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeBulkDeleteDialog.tsx+++ b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeBulkDeleteDialog.tsx@@ -7,9 +7,13 @@ import AttributeBulkDeleteDialog, {import Decorator from "../../Decorator";const props: AttributeBulkDeleteDialogProps = {-+ confirmButtonState: "default",+ onClose: () => undefined,+ onConfirm: () => undefined,+ open: true,+ quantity: "5"};-storiesOf("Attributes / AttributeBulkDeleteDialog", module)+storiesOf("Attributes / Delete multiple attributes", module).addDecorator(Decorator).add("default", () => <AttributeBulkDeleteDialog {...props} />);diff --git a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeDeleteDialog.tsx b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeDeleteDialog.tsxindex dfb017543f..44c3724986 100644--- a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeDeleteDialog.tsx+++ b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeDeleteDialog.tsx@@ -7,9 +7,13 @@ import AttributeDeleteDialog, {import Decorator from "../../Decorator";const props: AttributeDeleteDialogProps = {-+ confirmButtonState: "default",+ name: "Size",+ onClose: () => undefined,+ onConfirm: () => undefined,+ open: true};-storiesOf("Attributes / AttributeDeleteDialog", module)+storiesOf("Attributes / Attribute delete", module).addDecorator(Decorator).add("default", () => <AttributeDeleteDialog {...props} />);diff --git a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueBulkDeleteDialog.tsx b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueBulkDeleteDialog.tsxdeleted file mode 100644index 02e51eb604..0000000000--- a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueBulkDeleteDialog.tsx+++ /dev/null@@ -1,15 +0,0 @@-import { storiesOf } from "@storybook/react";-import * as React from "react";--import AttributeValueBulkDeleteDialog, {- AttributeValueBulkDeleteDialogProps-} from "../../../attributes/components/AttributeValueBulkDeleteDialog";-import Decorator from "../../Decorator";--const props: AttributeValueBulkDeleteDialogProps = {--};--storiesOf("Attributes / AttributeValueBulkDeleteDialog", module)- .addDecorator(Decorator)- .add("default", () => <AttributeValueBulkDeleteDialog {...props} />);diff --git a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueDeleteDialog.tsx b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueDeleteDialog.tsxindex 325d436f31..b6da18df77 100644--- a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueDeleteDialog.tsx+++ b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueDeleteDialog.tsx@@ -7,9 +7,13 @@ import AttributeValueDeleteDialog, {import Decorator from "../../Decorator";const props: AttributeValueDeleteDialogProps = {-+ confirmButtonState: "default",+ name: "XS",+ onClose: () => undefined,+ onConfirm: () => undefined,+ open: true};-storiesOf("Attributes / AttributeValueDeleteDialog", module)+storiesOf("Attributes / Attribute value delete", module).addDecorator(Decorator).add("default", () => <AttributeValueDeleteDialog {...props} />);diff --git a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueEditDialog.tsx b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueEditDialog.tsxindex 2cf9e5da4b..7175551afe 100644--- a/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueEditDialog.tsx+++ b/saleor/static/dashboard-next/storybook/stories/attributes/AttributeValueEditDialog.tsx@@ -1,15 +1,34 @@import { storiesOf } from "@storybook/react";import * as React from "react";+import { attributes } from "@saleor/attributes/fixtures";+import { formError } from "@saleor/storybook/misc";import AttributeValueEditDialog, {AttributeValueEditDialogProps} from "../../../attributes/components/AttributeValueEditDialog";import Decorator from "../../Decorator";const props: AttributeValueEditDialogProps = {-+ attributeValue: {+ ...attributes[0].values[0],+ sortOrder: 0,+ type: "STRING",+ value: ""+ },+ confirmButtonState: "default",+ disabled: false,+ errors: [],+ onClose: () => undefined,+ onSubmit: () => undefined,+ open: true};-storiesOf("Attributes / AttributeValueEditDialog", module)+storiesOf("Attributes / Attribute value edit", module).addDecorator(Decorator)- .add("default", () => <AttributeValueEditDialog {...props} />);+ .add("default", () => <AttributeValueEditDialog {...props} />)+ .add("form errors", () => (+ <AttributeValueEditDialog+ {...props}+ errors={["name", "slug"].map(formError)}+ />+ ));