Drop "manage products" permission requirement to view orders (#2248)

* Bump version

* Remove useless styles

* Ise isAvailableForPurchase field
This commit is contained in:
Dominik Żegleń 2022-08-25 10:35:07 +02:00 committed by GitHub
parent 6c79170d9f
commit ea87abda3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 102 additions and 579 deletions

View file

@ -93,7 +93,7 @@ const AssignContainerDialog: React.FC<AssignContainerDialogProps> = props => {
maxWidth="sm"
>
<DialogTitle>{labels.title}</DialogTitle>
<DialogContent className={scrollableDialogClasses.topArea}>
<DialogContent>
<TextField
name="query"
value={query}

View file

@ -89,7 +89,7 @@ const AssignProductDialog: React.FC<AssignProductDialogProps> = props => {
<DialogTitle>
<FormattedMessage {...messages.assignVariantDialogHeader} />
</DialogTitle>
<DialogContent className={scrollableDialogClasses.topArea}>
<DialogContent>
<TextField
name="query"
value={query}

View file

@ -97,7 +97,7 @@ const AssignVariantDialog: React.FC<AssignVariantDialogProps> = props => {
<DialogTitle>
<FormattedMessage {...messages.assignVariantDialogHeader} />
</DialogTitle>
<DialogContent className={scrollableDialogClasses.topArea}>
<DialogContent>
<TextField
name="query"
value={query}

View file

@ -33,11 +33,6 @@ export const useStyles = makeStyles(
overflow: {
overflowY: "hidden",
},
topArea: {
overflowY: "hidden",
paddingBottom: theme.spacing(6),
margin: theme.spacing(0, 3, 3, 3),
},
productCheckboxCell: {
"&:first-child": {
paddingLeft: 0,

View file

@ -93,14 +93,7 @@ export const fragmentOrderLine = gql`
}
product {
id
channelListings {
id
isPublished
isAvailableForPurchase
channel {
id
}
}
isAvailableForPurchase
}
}
productName

View file

@ -1242,14 +1242,7 @@ export const OrderLineFragmentDoc = gql`
}
product {
id
channelListings {
id
isPublished
isAvailableForPurchase
channel {
id
}
}
isAvailableForPurchase
}
}
productName
@ -8767,12 +8760,15 @@ export const OrderLineDeleteDocument = gql`
...OrderError
}
order {
...OrderDetails
id
lines {
...OrderLine
}
}
}
}
${OrderErrorFragmentDoc}
${OrderDetailsFragmentDoc}`;
${OrderLineFragmentDoc}`;
export type OrderLineDeleteMutationFn = Apollo.MutationFunction<Types.OrderLineDeleteMutation, Types.OrderLineDeleteMutationVariables>;
/**
@ -8806,12 +8802,15 @@ export const OrderLinesAddDocument = gql`
...OrderError
}
order {
...OrderDetails
id
lines {
...OrderLine
}
}
}
}
${OrderErrorFragmentDoc}
${OrderDetailsFragmentDoc}`;
${OrderLineFragmentDoc}`;
export type OrderLinesAddMutationFn = Apollo.MutationFunction<Types.OrderLinesAddMutation, Types.OrderLinesAddMutationVariables>;
/**
@ -8845,13 +8844,13 @@ export const OrderLineUpdateDocument = gql`
errors {
...OrderError
}
order {
...OrderDetails
orderLine {
...OrderLine
}
}
}
${OrderErrorFragmentDoc}
${OrderDetailsFragmentDoc}`;
${OrderLineFragmentDoc}`;
export type OrderLineUpdateMutationFn = Apollo.MutationFunction<Types.OrderLineUpdateMutation, Types.OrderLineUpdateMutationVariables>;
/**
@ -13062,18 +13061,6 @@ export const SearchOrderVariantDocument = gql`
}
onSale
}
channelListings {
channel {
id
isActive
name
currencyCode
}
price {
amount
currency
}
}
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -125,7 +125,6 @@ const OrderDraftDetailsProducts: React.FC<OrderDraftDetailsProductsProps> = prop
<TableLine
{...orderLineDiscountProps}
line={line}
channelId={order.channel.id}
error={formErrors.find(error =>
error.orderLines?.some(id => id === line.id),
)}

View file

@ -55,7 +55,6 @@ const useStyles = makeStyles(
interface TableLineProps extends OrderLineDiscountContextConsumerProps {
line: OrderLineFragment;
channelId: string;
error?: OrderErrorFragment;
onOrderLineChange: (id: string, data: OrderLineInput) => void;
onOrderLineRemove: (id: string) => void;
@ -63,7 +62,6 @@ interface TableLineProps extends OrderLineDiscountContextConsumerProps {
const TableLine: React.FC<TableLineProps> = ({
line,
channelId,
error,
onOrderLineChange,
onOrderLineRemove,
@ -84,7 +82,6 @@ const TableLine: React.FC<TableLineProps> = ({
const alerts = useLineAlerts({
line,
channelId,
error,
});

View file

@ -7,39 +7,30 @@ import { lineAlertMessages } from "./messages";
interface UseLineAlertsOpts {
line: OrderLineFragment;
channelId: string;
error?: OrderErrorFragment;
}
const useLineAlerts = ({ line, channelId, error }: UseLineAlertsOpts) => {
const useLineAlerts = ({ line, error }: UseLineAlertsOpts) => {
const intl = useIntl();
const alerts = useMemo(() => {
const {
variant: {
product: { channelListings },
product: { isAvailableForPurchase },
},
} = line;
const channelListing = channelListings.find(
channelListing => channelListing.channel.id === channelId,
);
const isPublished = channelListing?.isPublished;
const isAvailable = channelListing?.isAvailableForPurchase;
const alerts: string[] = [];
if (error) {
alerts.push(getOrderErrorMessage(error, intl));
}
if (!isPublished) {
alerts.push(intl.formatMessage(lineAlertMessages.notPublished));
}
if (!isAvailable) {
if (!isAvailableForPurchase) {
alerts.push(intl.formatMessage(lineAlertMessages.notAvailable));
}
return alerts;
}, [line, channelId, error]);
}, [line, error, intl]);
return alerts;
};

View file

@ -24,7 +24,7 @@ import useSearchQuery from "@saleor/hooks/useSearchQuery";
import { buttonMessages } from "@saleor/intl";
import { ConfirmButtonTransitionState } from "@saleor/macaw-ui";
import { maybe, renderCollection } from "@saleor/misc";
import { ChannelProps, FetchMoreProps, RelayToFlat } from "@saleor/types";
import { FetchMoreProps, RelayToFlat } from "@saleor/types";
import getOrderErrorMessage from "@saleor/utils/errors/order";
import React from "react";
import InfiniteScroll from "react-infinite-scroll-component";
@ -40,9 +40,7 @@ import {
onVariantAdd,
} from "./utils";
export interface OrderProductAddDialogProps
extends FetchMoreProps,
ChannelProps {
export interface OrderProductAddDialogProps extends FetchMoreProps {
confirmButtonState: ConfirmButtonTransitionState;
errors: OrderErrorFragment[];
open: boolean;
@ -64,7 +62,6 @@ const OrderProductAddDialog: React.FC<OrderProductAddDialogProps> = props => {
loading,
hasMore,
products,
selectedChannelId,
onFetch,
onFetchMore,
onClose,
@ -84,19 +81,9 @@ const OrderProductAddDialog: React.FC<OrderProductAddDialogProps> = props => {
});
const isValidVariant = ({
channelListings,
}: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"][0]) => {
const currentListing = channelListings.find(
listing => listing.channel.id === selectedChannelId,
);
const listingPrice = currentListing?.price?.amount;
const isVariantPriceSet =
listingPrice !== null && listingPrice !== undefined;
return !!currentListing && isVariantPriceSet;
};
pricing,
}: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"][0]) =>
!!pricing;
const getValidProductVariants = ({
variants,
@ -138,7 +125,7 @@ const OrderProductAddDialog: React.FC<OrderProductAddDialogProps> = props => {
<DialogTitle>
<FormattedMessage {...messages.title} />
</DialogTitle>
<DialogContent className={classes.topArea} data-test-id="search-query">
<DialogContent data-test-id="search-query">
<TextField
name="query"
value={query}

View file

@ -33,11 +33,6 @@ export const useStyles = makeStyles(
overflow: {
overflowY: "hidden",
},
topArea: {
overflowY: "hidden",
paddingBottom: theme.spacing(6),
margin: theme.spacing(0, 3, 3, 3),
},
productCheckboxCell: {
"&:first-child": {
paddingLeft: 0,

View file

@ -1136,7 +1136,7 @@ export const order = (placeholder: string): OrderDetailsFragment => ({
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
stocks: [
{
@ -1250,7 +1250,7 @@ export const order = (placeholder: string): OrderDetailsFragment => ({
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
stocks: [
{
@ -1372,7 +1372,7 @@ export const order = (placeholder: string): OrderDetailsFragment => ({
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
stocks: [
{
@ -1472,7 +1472,7 @@ export const order = (placeholder: string): OrderDetailsFragment => ({
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
stocks: [
{
@ -1710,7 +1710,7 @@ export const draftOrder = (placeholder: string): OrderDetailsFragment => ({
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
stocks: [
{
@ -1809,7 +1809,7 @@ export const draftOrder = (placeholder: string): OrderDetailsFragment => ({
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
stocks: [
{
@ -2009,38 +2009,6 @@ export const orderLineSearch = (
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
channelListings: [
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "123",
isActive: true,
name: "Channel1",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "124",
isActive: true,
name: "Channel2",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
],
id: "UHJvZHVjdFZhcmlhbnQ6MjAy",
name: "500ml",
sku: "93855755",
@ -2067,38 +2035,6 @@ export const orderLineSearch = (
},
{
__typename: "ProductVariant" as "ProductVariant",
channelListings: [
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "123",
isActive: true,
name: "Channel1",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "124",
isActive: true,
name: "Channel2",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
],
id: "UHJvZHVjdFZhcmlhbnQ6MjAz",
name: "1l",
sku: "43226647",
@ -2125,38 +2061,6 @@ export const orderLineSearch = (
},
{
__typename: "ProductVariant" as "ProductVariant",
channelListings: [
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "123",
isActive: true,
name: "Channel1",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "124",
isActive: true,
name: "Channel2",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
],
id: "UHJvZHVjdFZhcmlhbnQ6MjA0",
name: "2l",
sku: "80884671",
@ -2194,38 +2098,6 @@ export const orderLineSearch = (
variants: [
{
__typename: "ProductVariant" as "ProductVariant",
channelListings: [
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "123",
isActive: true,
name: "Channel1",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "124",
isActive: true,
name: "Channel2",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
],
id: "UHJvZHVjdFZhcmlhbnQ6MjEx",
name: "500ml",
sku: "43200242",
@ -2252,38 +2124,6 @@ export const orderLineSearch = (
},
{
__typename: "ProductVariant" as "ProductVariant",
channelListings: [
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "123",
isActive: true,
name: "Channel1",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "124",
isActive: true,
name: "Channel2",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
],
id: "UHJvZHVjdFZhcmlhbnQ6MjEy",
name: "1l",
sku: "79129513",
@ -2310,38 +2150,6 @@ export const orderLineSearch = (
},
{
__typename: "ProductVariant" as "ProductVariant",
channelListings: [
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "123",
isActive: true,
name: "Channel1",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
{
__typename: "ProductVariantChannelListing",
channel: {
__typename: "Channel",
currencyCode: "USD",
id: "124",
isActive: true,
name: "Channel2",
},
price: {
__typename: "Money",
amount: 1,
currency: "USD",
},
},
],
id: "UHJvZHVjdFZhcmlhbnQ6MjEz",
name: "2l",
sku: "75799450",

View file

@ -384,7 +384,10 @@ export const orderLineDeleteMutation = gql`
...OrderError
}
order {
...OrderDetails
id
lines {
...OrderLine
}
}
}
}
@ -397,7 +400,10 @@ export const orderLinesAddMutation = gql`
...OrderError
}
order {
...OrderDetails
id
lines {
...OrderLine
}
}
}
}
@ -409,8 +415,8 @@ export const orderLineUpdateMutation = gql`
errors {
...OrderError
}
order {
...OrderDetails
orderLine {
...OrderLine
}
}
}

View file

@ -541,8 +541,8 @@ describe("Get the total value of all replaced products", () => {
__typename: "ProductVariant",
product: {
__typename: "Product",
isAvailableForPurchase: true,
id: "UHJvZHVjdDo1",
channelListings: [],
},
stocks: [
{
@ -668,7 +668,7 @@ describe("Get the total value of all replaced products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -768,7 +768,7 @@ describe("Get the total value of all replaced products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "T-shirt",
@ -874,7 +874,7 @@ describe("Get the total value of all replaced products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -979,7 +979,7 @@ describe("Get the total value of all replaced products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -1084,7 +1084,7 @@ describe("Get the total value of all replaced products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "T-shirt",
@ -1189,7 +1189,7 @@ describe("Get the total value of all replaced products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -1294,7 +1294,7 @@ describe("Get the total value of all replaced products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -1533,7 +1533,7 @@ describe("Get the total value of all selected products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -1633,7 +1633,7 @@ describe("Get the total value of all selected products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -1733,7 +1733,7 @@ describe("Get the total value of all selected products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "T-shirt",
@ -1839,7 +1839,7 @@ describe("Get the total value of all selected products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -1944,7 +1944,7 @@ describe("Get the total value of all selected products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -2049,7 +2049,7 @@ describe("Get the total value of all selected products", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "T-shirt",
@ -2282,7 +2282,7 @@ describe("Merge repeated order lines of fulfillment lines", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -2387,7 +2387,7 @@ describe("Merge repeated order lines of fulfillment lines", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "Lake Tunes",
@ -2492,7 +2492,7 @@ describe("Merge repeated order lines of fulfillment lines", () => {
product: {
__typename: "Product",
id: "UHJvZHVjdDo1",
channelListings: [],
isAvailableForPurchase: true,
},
},
productName: "T-shirt",

View file

@ -288,7 +288,6 @@ export const OrderDraftDetails: React.FC<OrderDraftDetailsProps> = ({
open={params.action === "add-order-line"}
hasMore={variantSearchOpts.data?.search.pageInfo.hasNextPage}
products={mapEdgesToItems(variantSearchOpts?.data?.search)}
selectedChannelId={order?.channel?.id}
onClose={closeModal}
onFetch={variantSearch}
onFetchMore={loadMore}

View file

@ -301,7 +301,6 @@ export const OrderUnconfirmedDetails: React.FC<OrderUnconfirmedDetailsProps> = (
open={params.action === "add-order-line"}
hasMore={variantSearchOpts.data?.search.pageInfo.hasNextPage}
products={mapEdgesToItems(variantSearchOpts?.data?.search)}
selectedChannelId={order?.channel?.id}
onClose={closeModal}
onFetch={variantSearch}
onFetchMore={loadMore}

View file

@ -50,18 +50,6 @@ export const searchOrderVariant = gql`
}
onSale
}
channelListings {
channel {
id
isActive
name
currencyCode
}
price {
amount
currency
}
}
}
}
}

View file

@ -141718,44 +141718,8 @@ exports[`Storyshots Views / Orders / Order draft default 1`] = `
class="MuiTableRow-root-id MuiTableRow-hover-id"
>
<td
class="MuiTableCell-root-id MuiTableCell-body-id"
>
<button
class="TooltipMountWrapper-wrapper-id"
>
<span
class="Indicator-wrapper-id Indicator-wrapper-id Indicator-wrapperOutline-id Indicator-wrapperOutline-id"
>
<svg
class="Indicator-absolute-id"
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
class="Indicator-absolute-id Indicator-circleOutline-id Indicator-circleOutline-id"
cx="12"
cy="12"
r="11.25"
stroke="currentColor"
stroke-width="1.5"
/>
</svg>
<svg
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 6v7m0 4v1"
stroke="currentColor"
stroke-linecap="round"
stroke-width="1.5"
/>
</svg>
</span>
</button>
</td>
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-id"
/>
<td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
data-test-id="table-cell-avatar"
@ -141881,44 +141845,8 @@ exports[`Storyshots Views / Orders / Order draft default 1`] = `
class="MuiTableRow-root-id MuiTableRow-hover-id"
>
<td
class="MuiTableCell-root-id MuiTableCell-body-id"
>
<button
class="TooltipMountWrapper-wrapper-id"
>
<span
class="Indicator-wrapper-id Indicator-wrapper-id Indicator-wrapperOutline-id Indicator-wrapperOutline-id"
>
<svg
class="Indicator-absolute-id"
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
class="Indicator-absolute-id Indicator-circleOutline-id Indicator-circleOutline-id"
cx="12"
cy="12"
r="11.25"
stroke="currentColor"
stroke-width="1.5"
/>
</svg>
<svg
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 6v7m0 4v1"
stroke="currentColor"
stroke-linecap="round"
stroke-width="1.5"
/>
</svg>
</span>
</button>
</td>
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-id"
/>
<td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
data-test-id="table-cell-avatar"
@ -142744,44 +142672,8 @@ exports[`Storyshots Views / Orders / Order draft no user permissions 1`] = `
class="MuiTableRow-root-id MuiTableRow-hover-id"
>
<td
class="MuiTableCell-root-id MuiTableCell-body-id"
>
<button
class="TooltipMountWrapper-wrapper-id"
>
<span
class="Indicator-wrapper-id Indicator-wrapper-id Indicator-wrapperOutline-id Indicator-wrapperOutline-id"
>
<svg
class="Indicator-absolute-id"
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
class="Indicator-absolute-id Indicator-circleOutline-id Indicator-circleOutline-id"
cx="12"
cy="12"
r="11.25"
stroke="currentColor"
stroke-width="1.5"
/>
</svg>
<svg
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 6v7m0 4v1"
stroke="currentColor"
stroke-linecap="round"
stroke-width="1.5"
/>
</svg>
</span>
</button>
</td>
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-id"
/>
<td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
data-test-id="table-cell-avatar"
@ -142907,44 +142799,8 @@ exports[`Storyshots Views / Orders / Order draft no user permissions 1`] = `
class="MuiTableRow-root-id MuiTableRow-hover-id"
>
<td
class="MuiTableCell-root-id MuiTableCell-body-id"
>
<button
class="TooltipMountWrapper-wrapper-id"
>
<span
class="Indicator-wrapper-id Indicator-wrapper-id Indicator-wrapperOutline-id Indicator-wrapperOutline-id"
>
<svg
class="Indicator-absolute-id"
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
class="Indicator-absolute-id Indicator-circleOutline-id Indicator-circleOutline-id"
cx="12"
cy="12"
r="11.25"
stroke="currentColor"
stroke-width="1.5"
/>
</svg>
<svg
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 6v7m0 4v1"
stroke="currentColor"
stroke-linecap="round"
stroke-width="1.5"
/>
</svg>
</span>
</button>
</td>
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-id"
/>
<td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
data-test-id="table-cell-avatar"
@ -143512,44 +143368,8 @@ exports[`Storyshots Views / Orders / Order draft with errors 1`] = `
class="MuiTableRow-root-id MuiTableRow-hover-id"
>
<td
class="MuiTableCell-root-id MuiTableCell-body-id"
>
<button
class="TooltipMountWrapper-wrapper-id"
>
<span
class="Indicator-wrapper-id Indicator-wrapper-id Indicator-wrapperOutline-id Indicator-wrapperOutline-id"
>
<svg
class="Indicator-absolute-id"
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
class="Indicator-absolute-id Indicator-circleOutline-id Indicator-circleOutline-id"
cx="12"
cy="12"
r="11.25"
stroke="currentColor"
stroke-width="1.5"
/>
</svg>
<svg
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 6v7m0 4v1"
stroke="currentColor"
stroke-linecap="round"
stroke-width="1.5"
/>
</svg>
</span>
</button>
</td>
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-id"
/>
<td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
data-test-id="table-cell-avatar"
@ -143675,44 +143495,8 @@ exports[`Storyshots Views / Orders / Order draft with errors 1`] = `
class="MuiTableRow-root-id MuiTableRow-hover-id"
>
<td
class="MuiTableCell-root-id MuiTableCell-body-id"
>
<button
class="TooltipMountWrapper-wrapper-id"
>
<span
class="Indicator-wrapper-id Indicator-wrapper-id Indicator-wrapperOutline-id Indicator-wrapperOutline-id"
>
<svg
class="Indicator-absolute-id"
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<circle
class="Indicator-absolute-id Indicator-circleOutline-id Indicator-circleOutline-id"
cx="12"
cy="12"
r="11.25"
stroke="currentColor"
stroke-width="1.5"
/>
</svg>
<svg
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 6v7m0 4v1"
stroke="currentColor"
stroke-linecap="round"
stroke-width="1.5"
/>
</svg>
</span>
</button>
</td>
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-id"
/>
<td
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
data-test-id="table-cell-avatar"

View file

@ -21,7 +21,6 @@ const props: OrderProductAddDialogProps = {
onSubmit: () => undefined,
open: true,
products,
selectedChannelId: products[0].variants[0].channelListings[0].channel.id,
};
storiesOf("Orders / OrderProductAddDialog", module)

View file

@ -19,10 +19,6 @@ const useScrollableDialogStyle = makeStyles(
justifyContent: "center",
marginTop: theme.spacing(3),
},
topArea: {
overflowY: "visible",
marginBottom: theme.spacing(3),
},
scrollArea: {
overflowY: "scroll",
paddingTop: 0,