Drop "manage products" permission requirement to view orders (#2248)
* Bump version * Remove useless styles * Ise isAvailableForPurchase field
This commit is contained in:
parent
6c79170d9f
commit
ea87abda3c
21 changed files with 102 additions and 579 deletions
|
@ -93,7 +93,7 @@ const AssignContainerDialog: React.FC<AssignContainerDialogProps> = props => {
|
||||||
maxWidth="sm"
|
maxWidth="sm"
|
||||||
>
|
>
|
||||||
<DialogTitle>{labels.title}</DialogTitle>
|
<DialogTitle>{labels.title}</DialogTitle>
|
||||||
<DialogContent className={scrollableDialogClasses.topArea}>
|
<DialogContent>
|
||||||
<TextField
|
<TextField
|
||||||
name="query"
|
name="query"
|
||||||
value={query}
|
value={query}
|
||||||
|
|
|
@ -89,7 +89,7 @@ const AssignProductDialog: React.FC<AssignProductDialogProps> = props => {
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<FormattedMessage {...messages.assignVariantDialogHeader} />
|
<FormattedMessage {...messages.assignVariantDialogHeader} />
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent className={scrollableDialogClasses.topArea}>
|
<DialogContent>
|
||||||
<TextField
|
<TextField
|
||||||
name="query"
|
name="query"
|
||||||
value={query}
|
value={query}
|
||||||
|
|
|
@ -97,7 +97,7 @@ const AssignVariantDialog: React.FC<AssignVariantDialogProps> = props => {
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<FormattedMessage {...messages.assignVariantDialogHeader} />
|
<FormattedMessage {...messages.assignVariantDialogHeader} />
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent className={scrollableDialogClasses.topArea}>
|
<DialogContent>
|
||||||
<TextField
|
<TextField
|
||||||
name="query"
|
name="query"
|
||||||
value={query}
|
value={query}
|
||||||
|
|
|
@ -33,11 +33,6 @@ export const useStyles = makeStyles(
|
||||||
overflow: {
|
overflow: {
|
||||||
overflowY: "hidden",
|
overflowY: "hidden",
|
||||||
},
|
},
|
||||||
topArea: {
|
|
||||||
overflowY: "hidden",
|
|
||||||
paddingBottom: theme.spacing(6),
|
|
||||||
margin: theme.spacing(0, 3, 3, 3),
|
|
||||||
},
|
|
||||||
productCheckboxCell: {
|
productCheckboxCell: {
|
||||||
"&:first-child": {
|
"&:first-child": {
|
||||||
paddingLeft: 0,
|
paddingLeft: 0,
|
||||||
|
|
|
@ -93,14 +93,7 @@ export const fragmentOrderLine = gql`
|
||||||
}
|
}
|
||||||
product {
|
product {
|
||||||
id
|
id
|
||||||
channelListings {
|
|
||||||
id
|
|
||||||
isPublished
|
|
||||||
isAvailableForPurchase
|
isAvailableForPurchase
|
||||||
channel {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
productName
|
productName
|
||||||
|
|
|
@ -1242,14 +1242,7 @@ export const OrderLineFragmentDoc = gql`
|
||||||
}
|
}
|
||||||
product {
|
product {
|
||||||
id
|
id
|
||||||
channelListings {
|
|
||||||
id
|
|
||||||
isPublished
|
|
||||||
isAvailableForPurchase
|
isAvailableForPurchase
|
||||||
channel {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
productName
|
productName
|
||||||
|
@ -8767,12 +8760,15 @@ export const OrderLineDeleteDocument = gql`
|
||||||
...OrderError
|
...OrderError
|
||||||
}
|
}
|
||||||
order {
|
order {
|
||||||
...OrderDetails
|
id
|
||||||
|
lines {
|
||||||
|
...OrderLine
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${OrderErrorFragmentDoc}
|
${OrderErrorFragmentDoc}
|
||||||
${OrderDetailsFragmentDoc}`;
|
${OrderLineFragmentDoc}`;
|
||||||
export type OrderLineDeleteMutationFn = Apollo.MutationFunction<Types.OrderLineDeleteMutation, Types.OrderLineDeleteMutationVariables>;
|
export type OrderLineDeleteMutationFn = Apollo.MutationFunction<Types.OrderLineDeleteMutation, Types.OrderLineDeleteMutationVariables>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8806,12 +8802,15 @@ export const OrderLinesAddDocument = gql`
|
||||||
...OrderError
|
...OrderError
|
||||||
}
|
}
|
||||||
order {
|
order {
|
||||||
...OrderDetails
|
id
|
||||||
|
lines {
|
||||||
|
...OrderLine
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${OrderErrorFragmentDoc}
|
${OrderErrorFragmentDoc}
|
||||||
${OrderDetailsFragmentDoc}`;
|
${OrderLineFragmentDoc}`;
|
||||||
export type OrderLinesAddMutationFn = Apollo.MutationFunction<Types.OrderLinesAddMutation, Types.OrderLinesAddMutationVariables>;
|
export type OrderLinesAddMutationFn = Apollo.MutationFunction<Types.OrderLinesAddMutation, Types.OrderLinesAddMutationVariables>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8845,13 +8844,13 @@ export const OrderLineUpdateDocument = gql`
|
||||||
errors {
|
errors {
|
||||||
...OrderError
|
...OrderError
|
||||||
}
|
}
|
||||||
order {
|
orderLine {
|
||||||
...OrderDetails
|
...OrderLine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${OrderErrorFragmentDoc}
|
${OrderErrorFragmentDoc}
|
||||||
${OrderDetailsFragmentDoc}`;
|
${OrderLineFragmentDoc}`;
|
||||||
export type OrderLineUpdateMutationFn = Apollo.MutationFunction<Types.OrderLineUpdateMutation, Types.OrderLineUpdateMutationVariables>;
|
export type OrderLineUpdateMutationFn = Apollo.MutationFunction<Types.OrderLineUpdateMutation, Types.OrderLineUpdateMutationVariables>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13062,18 +13061,6 @@ export const SearchOrderVariantDocument = gql`
|
||||||
}
|
}
|
||||||
onSale
|
onSale
|
||||||
}
|
}
|
||||||
channelListings {
|
|
||||||
channel {
|
|
||||||
id
|
|
||||||
isActive
|
|
||||||
name
|
|
||||||
currencyCode
|
|
||||||
}
|
|
||||||
price {
|
|
||||||
amount
|
|
||||||
currency
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -125,7 +125,6 @@ const OrderDraftDetailsProducts: React.FC<OrderDraftDetailsProductsProps> = prop
|
||||||
<TableLine
|
<TableLine
|
||||||
{...orderLineDiscountProps}
|
{...orderLineDiscountProps}
|
||||||
line={line}
|
line={line}
|
||||||
channelId={order.channel.id}
|
|
||||||
error={formErrors.find(error =>
|
error={formErrors.find(error =>
|
||||||
error.orderLines?.some(id => id === line.id),
|
error.orderLines?.some(id => id === line.id),
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -55,7 +55,6 @@ const useStyles = makeStyles(
|
||||||
|
|
||||||
interface TableLineProps extends OrderLineDiscountContextConsumerProps {
|
interface TableLineProps extends OrderLineDiscountContextConsumerProps {
|
||||||
line: OrderLineFragment;
|
line: OrderLineFragment;
|
||||||
channelId: string;
|
|
||||||
error?: OrderErrorFragment;
|
error?: OrderErrorFragment;
|
||||||
onOrderLineChange: (id: string, data: OrderLineInput) => void;
|
onOrderLineChange: (id: string, data: OrderLineInput) => void;
|
||||||
onOrderLineRemove: (id: string) => void;
|
onOrderLineRemove: (id: string) => void;
|
||||||
|
@ -63,7 +62,6 @@ interface TableLineProps extends OrderLineDiscountContextConsumerProps {
|
||||||
|
|
||||||
const TableLine: React.FC<TableLineProps> = ({
|
const TableLine: React.FC<TableLineProps> = ({
|
||||||
line,
|
line,
|
||||||
channelId,
|
|
||||||
error,
|
error,
|
||||||
onOrderLineChange,
|
onOrderLineChange,
|
||||||
onOrderLineRemove,
|
onOrderLineRemove,
|
||||||
|
@ -84,7 +82,6 @@ const TableLine: React.FC<TableLineProps> = ({
|
||||||
|
|
||||||
const alerts = useLineAlerts({
|
const alerts = useLineAlerts({
|
||||||
line,
|
line,
|
||||||
channelId,
|
|
||||||
error,
|
error,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,39 +7,30 @@ import { lineAlertMessages } from "./messages";
|
||||||
|
|
||||||
interface UseLineAlertsOpts {
|
interface UseLineAlertsOpts {
|
||||||
line: OrderLineFragment;
|
line: OrderLineFragment;
|
||||||
channelId: string;
|
|
||||||
error?: OrderErrorFragment;
|
error?: OrderErrorFragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useLineAlerts = ({ line, channelId, error }: UseLineAlertsOpts) => {
|
const useLineAlerts = ({ line, error }: UseLineAlertsOpts) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
const alerts = useMemo(() => {
|
const alerts = useMemo(() => {
|
||||||
const {
|
const {
|
||||||
variant: {
|
variant: {
|
||||||
product: { channelListings },
|
product: { isAvailableForPurchase },
|
||||||
},
|
},
|
||||||
} = line;
|
} = line;
|
||||||
const channelListing = channelListings.find(
|
|
||||||
channelListing => channelListing.channel.id === channelId,
|
|
||||||
);
|
|
||||||
const isPublished = channelListing?.isPublished;
|
|
||||||
const isAvailable = channelListing?.isAvailableForPurchase;
|
|
||||||
|
|
||||||
const alerts: string[] = [];
|
const alerts: string[] = [];
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
alerts.push(getOrderErrorMessage(error, intl));
|
alerts.push(getOrderErrorMessage(error, intl));
|
||||||
}
|
}
|
||||||
if (!isPublished) {
|
if (!isAvailableForPurchase) {
|
||||||
alerts.push(intl.formatMessage(lineAlertMessages.notPublished));
|
|
||||||
}
|
|
||||||
if (!isAvailable) {
|
|
||||||
alerts.push(intl.formatMessage(lineAlertMessages.notAvailable));
|
alerts.push(intl.formatMessage(lineAlertMessages.notAvailable));
|
||||||
}
|
}
|
||||||
|
|
||||||
return alerts;
|
return alerts;
|
||||||
}, [line, channelId, error]);
|
}, [line, error, intl]);
|
||||||
|
|
||||||
return alerts;
|
return alerts;
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,7 +24,7 @@ import useSearchQuery from "@saleor/hooks/useSearchQuery";
|
||||||
import { buttonMessages } from "@saleor/intl";
|
import { buttonMessages } from "@saleor/intl";
|
||||||
import { ConfirmButtonTransitionState } from "@saleor/macaw-ui";
|
import { ConfirmButtonTransitionState } from "@saleor/macaw-ui";
|
||||||
import { maybe, renderCollection } from "@saleor/misc";
|
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 getOrderErrorMessage from "@saleor/utils/errors/order";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import InfiniteScroll from "react-infinite-scroll-component";
|
import InfiniteScroll from "react-infinite-scroll-component";
|
||||||
|
@ -40,9 +40,7 @@ import {
|
||||||
onVariantAdd,
|
onVariantAdd,
|
||||||
} from "./utils";
|
} from "./utils";
|
||||||
|
|
||||||
export interface OrderProductAddDialogProps
|
export interface OrderProductAddDialogProps extends FetchMoreProps {
|
||||||
extends FetchMoreProps,
|
|
||||||
ChannelProps {
|
|
||||||
confirmButtonState: ConfirmButtonTransitionState;
|
confirmButtonState: ConfirmButtonTransitionState;
|
||||||
errors: OrderErrorFragment[];
|
errors: OrderErrorFragment[];
|
||||||
open: boolean;
|
open: boolean;
|
||||||
|
@ -64,7 +62,6 @@ const OrderProductAddDialog: React.FC<OrderProductAddDialogProps> = props => {
|
||||||
loading,
|
loading,
|
||||||
hasMore,
|
hasMore,
|
||||||
products,
|
products,
|
||||||
selectedChannelId,
|
|
||||||
onFetch,
|
onFetch,
|
||||||
onFetchMore,
|
onFetchMore,
|
||||||
onClose,
|
onClose,
|
||||||
|
@ -84,19 +81,9 @@ const OrderProductAddDialog: React.FC<OrderProductAddDialogProps> = props => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const isValidVariant = ({
|
const isValidVariant = ({
|
||||||
channelListings,
|
pricing,
|
||||||
}: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"][0]) => {
|
}: SearchOrderVariantQuery["search"]["edges"][0]["node"]["variants"][0]) =>
|
||||||
const currentListing = channelListings.find(
|
!!pricing;
|
||||||
listing => listing.channel.id === selectedChannelId,
|
|
||||||
);
|
|
||||||
|
|
||||||
const listingPrice = currentListing?.price?.amount;
|
|
||||||
|
|
||||||
const isVariantPriceSet =
|
|
||||||
listingPrice !== null && listingPrice !== undefined;
|
|
||||||
|
|
||||||
return !!currentListing && isVariantPriceSet;
|
|
||||||
};
|
|
||||||
|
|
||||||
const getValidProductVariants = ({
|
const getValidProductVariants = ({
|
||||||
variants,
|
variants,
|
||||||
|
@ -138,7 +125,7 @@ const OrderProductAddDialog: React.FC<OrderProductAddDialogProps> = props => {
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<FormattedMessage {...messages.title} />
|
<FormattedMessage {...messages.title} />
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent className={classes.topArea} data-test-id="search-query">
|
<DialogContent data-test-id="search-query">
|
||||||
<TextField
|
<TextField
|
||||||
name="query"
|
name="query"
|
||||||
value={query}
|
value={query}
|
||||||
|
|
|
@ -33,11 +33,6 @@ export const useStyles = makeStyles(
|
||||||
overflow: {
|
overflow: {
|
||||||
overflowY: "hidden",
|
overflowY: "hidden",
|
||||||
},
|
},
|
||||||
topArea: {
|
|
||||||
overflowY: "hidden",
|
|
||||||
paddingBottom: theme.spacing(6),
|
|
||||||
margin: theme.spacing(0, 3, 3, 3),
|
|
||||||
},
|
|
||||||
productCheckboxCell: {
|
productCheckboxCell: {
|
||||||
"&:first-child": {
|
"&:first-child": {
|
||||||
paddingLeft: 0,
|
paddingLeft: 0,
|
||||||
|
|
|
@ -1136,7 +1136,7 @@ export const order = (placeholder: string): OrderDetailsFragment => ({
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
stocks: [
|
stocks: [
|
||||||
{
|
{
|
||||||
|
@ -1250,7 +1250,7 @@ export const order = (placeholder: string): OrderDetailsFragment => ({
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
stocks: [
|
stocks: [
|
||||||
{
|
{
|
||||||
|
@ -1372,7 +1372,7 @@ export const order = (placeholder: string): OrderDetailsFragment => ({
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
stocks: [
|
stocks: [
|
||||||
{
|
{
|
||||||
|
@ -1472,7 +1472,7 @@ export const order = (placeholder: string): OrderDetailsFragment => ({
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
stocks: [
|
stocks: [
|
||||||
{
|
{
|
||||||
|
@ -1710,7 +1710,7 @@ export const draftOrder = (placeholder: string): OrderDetailsFragment => ({
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
stocks: [
|
stocks: [
|
||||||
{
|
{
|
||||||
|
@ -1809,7 +1809,7 @@ export const draftOrder = (placeholder: string): OrderDetailsFragment => ({
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
stocks: [
|
stocks: [
|
||||||
{
|
{
|
||||||
|
@ -2009,38 +2009,6 @@ export const orderLineSearch = (
|
||||||
variants: [
|
variants: [
|
||||||
{
|
{
|
||||||
__typename: "ProductVariant" as "ProductVariant",
|
__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",
|
id: "UHJvZHVjdFZhcmlhbnQ6MjAy",
|
||||||
name: "500ml",
|
name: "500ml",
|
||||||
sku: "93855755",
|
sku: "93855755",
|
||||||
|
@ -2067,38 +2035,6 @@ export const orderLineSearch = (
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductVariant" as "ProductVariant",
|
__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",
|
id: "UHJvZHVjdFZhcmlhbnQ6MjAz",
|
||||||
name: "1l",
|
name: "1l",
|
||||||
sku: "43226647",
|
sku: "43226647",
|
||||||
|
@ -2125,38 +2061,6 @@ export const orderLineSearch = (
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductVariant" as "ProductVariant",
|
__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",
|
id: "UHJvZHVjdFZhcmlhbnQ6MjA0",
|
||||||
name: "2l",
|
name: "2l",
|
||||||
sku: "80884671",
|
sku: "80884671",
|
||||||
|
@ -2194,38 +2098,6 @@ export const orderLineSearch = (
|
||||||
variants: [
|
variants: [
|
||||||
{
|
{
|
||||||
__typename: "ProductVariant" as "ProductVariant",
|
__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",
|
id: "UHJvZHVjdFZhcmlhbnQ6MjEx",
|
||||||
name: "500ml",
|
name: "500ml",
|
||||||
sku: "43200242",
|
sku: "43200242",
|
||||||
|
@ -2252,38 +2124,6 @@ export const orderLineSearch = (
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductVariant" as "ProductVariant",
|
__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",
|
id: "UHJvZHVjdFZhcmlhbnQ6MjEy",
|
||||||
name: "1l",
|
name: "1l",
|
||||||
sku: "79129513",
|
sku: "79129513",
|
||||||
|
@ -2310,38 +2150,6 @@ export const orderLineSearch = (
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "ProductVariant" as "ProductVariant",
|
__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",
|
id: "UHJvZHVjdFZhcmlhbnQ6MjEz",
|
||||||
name: "2l",
|
name: "2l",
|
||||||
sku: "75799450",
|
sku: "75799450",
|
||||||
|
|
|
@ -384,7 +384,10 @@ export const orderLineDeleteMutation = gql`
|
||||||
...OrderError
|
...OrderError
|
||||||
}
|
}
|
||||||
order {
|
order {
|
||||||
...OrderDetails
|
id
|
||||||
|
lines {
|
||||||
|
...OrderLine
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -397,7 +400,10 @@ export const orderLinesAddMutation = gql`
|
||||||
...OrderError
|
...OrderError
|
||||||
}
|
}
|
||||||
order {
|
order {
|
||||||
...OrderDetails
|
id
|
||||||
|
lines {
|
||||||
|
...OrderLine
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -409,8 +415,8 @@ export const orderLineUpdateMutation = gql`
|
||||||
errors {
|
errors {
|
||||||
...OrderError
|
...OrderError
|
||||||
}
|
}
|
||||||
order {
|
orderLine {
|
||||||
...OrderDetails
|
...OrderLine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -541,8 +541,8 @@ describe("Get the total value of all replaced products", () => {
|
||||||
__typename: "ProductVariant",
|
__typename: "ProductVariant",
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
|
isAvailableForPurchase: true,
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
|
||||||
},
|
},
|
||||||
stocks: [
|
stocks: [
|
||||||
{
|
{
|
||||||
|
@ -668,7 +668,7 @@ describe("Get the total value of all replaced products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -768,7 +768,7 @@ describe("Get the total value of all replaced products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "T-shirt",
|
productName: "T-shirt",
|
||||||
|
@ -874,7 +874,7 @@ describe("Get the total value of all replaced products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -979,7 +979,7 @@ describe("Get the total value of all replaced products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -1084,7 +1084,7 @@ describe("Get the total value of all replaced products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "T-shirt",
|
productName: "T-shirt",
|
||||||
|
@ -1189,7 +1189,7 @@ describe("Get the total value of all replaced products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -1294,7 +1294,7 @@ describe("Get the total value of all replaced products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -1533,7 +1533,7 @@ describe("Get the total value of all selected products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -1633,7 +1633,7 @@ describe("Get the total value of all selected products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -1733,7 +1733,7 @@ describe("Get the total value of all selected products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "T-shirt",
|
productName: "T-shirt",
|
||||||
|
@ -1839,7 +1839,7 @@ describe("Get the total value of all selected products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -1944,7 +1944,7 @@ describe("Get the total value of all selected products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -2049,7 +2049,7 @@ describe("Get the total value of all selected products", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "T-shirt",
|
productName: "T-shirt",
|
||||||
|
@ -2282,7 +2282,7 @@ describe("Merge repeated order lines of fulfillment lines", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -2387,7 +2387,7 @@ describe("Merge repeated order lines of fulfillment lines", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "Lake Tunes",
|
productName: "Lake Tunes",
|
||||||
|
@ -2492,7 +2492,7 @@ describe("Merge repeated order lines of fulfillment lines", () => {
|
||||||
product: {
|
product: {
|
||||||
__typename: "Product",
|
__typename: "Product",
|
||||||
id: "UHJvZHVjdDo1",
|
id: "UHJvZHVjdDo1",
|
||||||
channelListings: [],
|
isAvailableForPurchase: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
productName: "T-shirt",
|
productName: "T-shirt",
|
||||||
|
|
|
@ -288,7 +288,6 @@ export const OrderDraftDetails: React.FC<OrderDraftDetailsProps> = ({
|
||||||
open={params.action === "add-order-line"}
|
open={params.action === "add-order-line"}
|
||||||
hasMore={variantSearchOpts.data?.search.pageInfo.hasNextPage}
|
hasMore={variantSearchOpts.data?.search.pageInfo.hasNextPage}
|
||||||
products={mapEdgesToItems(variantSearchOpts?.data?.search)}
|
products={mapEdgesToItems(variantSearchOpts?.data?.search)}
|
||||||
selectedChannelId={order?.channel?.id}
|
|
||||||
onClose={closeModal}
|
onClose={closeModal}
|
||||||
onFetch={variantSearch}
|
onFetch={variantSearch}
|
||||||
onFetchMore={loadMore}
|
onFetchMore={loadMore}
|
||||||
|
|
|
@ -301,7 +301,6 @@ export const OrderUnconfirmedDetails: React.FC<OrderUnconfirmedDetailsProps> = (
|
||||||
open={params.action === "add-order-line"}
|
open={params.action === "add-order-line"}
|
||||||
hasMore={variantSearchOpts.data?.search.pageInfo.hasNextPage}
|
hasMore={variantSearchOpts.data?.search.pageInfo.hasNextPage}
|
||||||
products={mapEdgesToItems(variantSearchOpts?.data?.search)}
|
products={mapEdgesToItems(variantSearchOpts?.data?.search)}
|
||||||
selectedChannelId={order?.channel?.id}
|
|
||||||
onClose={closeModal}
|
onClose={closeModal}
|
||||||
onFetch={variantSearch}
|
onFetch={variantSearch}
|
||||||
onFetchMore={loadMore}
|
onFetchMore={loadMore}
|
||||||
|
|
|
@ -50,18 +50,6 @@ export const searchOrderVariant = gql`
|
||||||
}
|
}
|
||||||
onSale
|
onSale
|
||||||
}
|
}
|
||||||
channelListings {
|
|
||||||
channel {
|
|
||||||
id
|
|
||||||
isActive
|
|
||||||
name
|
|
||||||
currencyCode
|
|
||||||
}
|
|
||||||
price {
|
|
||||||
amount
|
|
||||||
currency
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141718,44 +141718,8 @@ exports[`Storyshots Views / Orders / Order draft default 1`] = `
|
||||||
class="MuiTableRow-root-id MuiTableRow-hover-id"
|
class="MuiTableRow-root-id MuiTableRow-hover-id"
|
||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-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>
|
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
||||||
data-test-id="table-cell-avatar"
|
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"
|
class="MuiTableRow-root-id MuiTableRow-hover-id"
|
||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-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>
|
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
||||||
data-test-id="table-cell-avatar"
|
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"
|
class="MuiTableRow-root-id MuiTableRow-hover-id"
|
||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-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>
|
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
||||||
data-test-id="table-cell-avatar"
|
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"
|
class="MuiTableRow-root-id MuiTableRow-hover-id"
|
||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-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>
|
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
||||||
data-test-id="table-cell-avatar"
|
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"
|
class="MuiTableRow-root-id MuiTableRow-hover-id"
|
||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-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>
|
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
||||||
data-test-id="table-cell-avatar"
|
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"
|
class="MuiTableRow-root-id MuiTableRow-hover-id"
|
||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id OrderDraftDetailsProducts-colStatusEmpty-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>
|
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id OrderDraftDetailsProducts-colName-id"
|
||||||
data-test-id="table-cell-avatar"
|
data-test-id="table-cell-avatar"
|
||||||
|
|
|
@ -21,7 +21,6 @@ const props: OrderProductAddDialogProps = {
|
||||||
onSubmit: () => undefined,
|
onSubmit: () => undefined,
|
||||||
open: true,
|
open: true,
|
||||||
products,
|
products,
|
||||||
selectedChannelId: products[0].variants[0].channelListings[0].channel.id,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
storiesOf("Orders / OrderProductAddDialog", module)
|
storiesOf("Orders / OrderProductAddDialog", module)
|
||||||
|
|
|
@ -19,10 +19,6 @@ const useScrollableDialogStyle = makeStyles(
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
marginTop: theme.spacing(3),
|
marginTop: theme.spacing(3),
|
||||||
},
|
},
|
||||||
topArea: {
|
|
||||||
overflowY: "visible",
|
|
||||||
marginBottom: theme.spacing(3),
|
|
||||||
},
|
|
||||||
scrollArea: {
|
scrollArea: {
|
||||||
overflowY: "scroll",
|
overflowY: "scroll",
|
||||||
paddingTop: 0,
|
paddingTop: 0,
|
||||||
|
|
Loading…
Reference in a new issue