diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 91792aa4d..2c5b1f8bc 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -1799,6 +1799,10 @@ "ClFzoD": { "string": "Selected values will be used to create variants for the configurable product." }, + "ClKKID": { + "context": "channel publication status", + "string": "Not published" + }, "Co2U4u": { "string": "No plugins found" }, @@ -1870,10 +1874,6 @@ "DILs4b": { "string": "Unsupported media provider or incorrect URL" }, - "DIrxt7": { - "context": "channel publication date", - "string": "Visible since {date}" - }, "DJFPzq": { "context": "button", "string": "Confirm" @@ -2892,10 +2892,6 @@ "KRqgfo": { "string": "User is out of your permissions scope" }, - "KSp+8B": { - "context": "product available for purchase date", - "string": "will become available on {date}" - }, "KXkdMH": { "context": "order discount removed title", "string": "Order discount was removed by" @@ -5125,10 +5121,6 @@ "context": "voucher", "string": "Applies to" }, - "beuxAP": { - "context": "channel publication status", - "string": "Hidden" - }, "bgO+7G": { "context": "order return amount button", "string": "Return & Replace products" @@ -5710,10 +5702,6 @@ "context": "voucher", "string": "Times used" }, - "hAcUEl": { - "context": "product publication date label", - "string": "will become published on {date}" - }, "hHOI7D": { "context": "product type name", "string": "Type Name" @@ -5746,6 +5734,10 @@ "context": "delete webhook", "string": "Are you sure you want to delete this webhook?" }, + "hTLCC2": { + "context": "channel publication date", + "string": "Will become published on {date}" + }, "hWO1SD": { "context": "order history message", "string": "Draft order was created" @@ -6108,6 +6100,10 @@ "context": "product updated at", "string": "Last updated" }, + "kYYbrv": { + "context": "channel publication date", + "string": "Published since {date}" + }, "kZfIl/": { "string": "These are general information about this Content Type." }, @@ -6302,10 +6298,6 @@ "context": "order draft creation date", "string": "Date" }, - "mDgOmP": { - "context": "channel publication status", - "string": "Visible" - }, "mE+fru": { "context": "tag filter label", "string": "Tags" @@ -6489,10 +6481,6 @@ "context": "attribute internal name", "string": "Slug" }, - "nfbabo": { - "context": "channel publication date", - "string": "Will become available on {date}" - }, "njBulj": { "context": "check to require attribute to have value", "string": "Value Required" @@ -7861,6 +7849,10 @@ "context": "button refreshing page", "string": "Refresh page" }, + "ys0jH2": { + "context": "channel publication status", + "string": "Published" + }, "yuiyES": { "string": "General Settings" }, @@ -7972,6 +7964,10 @@ "context": "header", "string": "Translation Sale \"{saleName}\" - {languageCode}" }, + "znbVYT": { + "context": "product available for purchase date", + "string": "Will become available on {date}" + }, "zqarUF": { "context": "modal information under title", "string": "Select an address you want to use from the list below" diff --git a/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx b/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx index 77a79db64..e0915d3c2 100644 --- a/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx +++ b/src/channels/ChannelsWithVariantsAvailabilityCard/ChannelWithVariantAvailabilityItemWrapper.tsx @@ -98,9 +98,9 @@ const ChannelWithVariantsAvailabilityItemWrapper: React.FC { - const expanderClasses = useExpanderStyles({}); - const summaryClasses = useSummaryStyles({}); - const classes = useStyles({}); + const expanderClasses = useExpanderStyles(); + const summaryClasses = useSummaryStyles(); + const classes = useStyles(); const intl = useIntl(); const { name } = channels.find(getById(channelId)); diff --git a/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemWrapper.tsx b/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemWrapper.tsx index bbaeac254..894c186df 100644 --- a/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemWrapper.tsx +++ b/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemWrapper.tsx @@ -2,6 +2,7 @@ import { Accordion, AccordionSummary, Typography } from "@material-ui/core"; import { ChannelData } from "@saleor/channels/utils"; import IconChevronDown from "@saleor/icons/ChevronDown"; import { makeStyles } from "@saleor/macaw-ui"; +import Label from "@saleor/orders/components/OrderHistory/Label"; import React from "react"; import { Messages } from "../types"; @@ -55,6 +56,16 @@ const useSummaryStyles = makeStyles( { name: "ChannelContentWrapperExpanderSummary" }, ); +const useStyles = makeStyles( + () => ({ + container: { + display: "flex", + flexDirection: "column", + }, + }), + { name: "ChannelWithVariantAvailabilityItemWrapper" }, +); + export interface ChannelContentWrapperProps { data: ChannelData; children: React.ReactNode; @@ -66,8 +77,9 @@ const ChannelContentWrapper: React.FC = ({ messages, children, }) => { - const expanderClasses = useExpanderStyles({}); - const summaryClasses = useSummaryStyles({}); + const expanderClasses = useExpanderStyles(); + const summaryClasses = useSummaryStyles(); + const classes = useStyles(); const { name } = data; @@ -80,8 +92,10 @@ const ChannelContentWrapper: React.FC = ({ expandIcon={} classes={summaryClasses} > - {name} - {messages.availableDateText} +
+ {name} +
{children} diff --git a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx index c7418589c..a9f59dc1c 100644 --- a/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx +++ b/src/components/ChannelsAvailabilityCard/ChannelsAvailabilityCard.tsx @@ -70,7 +70,11 @@ export const ChannelsAvailability: React.FC = pro errors?.filter(error => error.channels.includes(data.id)) || []; return ( - + - Visible since Jul 30, 2020 + Published since Jul 30, 2020 @@ -3097,7 +3097,7 @@ exports[`Storyshots Channels / Channels with variants availability card default class="MuiTypography-root-id MuiTypography-caption-id MuiTypography-colorTextSecondary-id" style="font-size:12px" > - Visible since Jul 30, 2020 + Published since Jul 30, 2020 @@ -4866,14 +4866,19 @@ exports[`Storyshots Generics / Channels availability card with onChange 1`] = ` class="MuiAccordionSummary-content-id ChannelContentWrapperExpanderSummary-content-id" >
- Channel1 -
-
- available from 07/30/2020 +
+ Channel1 +
+
+ Published since Jul 14, 2020 +
- Channel2 -
-
- available from 07/30/2020 +
+ Channel2 +
+
+ Will become published on Jul 30, 2020 +
- will become published on Jul 30, 2020 + Will become published on Jul 30, 2020 @@ -54557,13 +54567,20 @@ exports[`Storyshots Views / Collections / Collection detailsCollection details d class="MuiAccordionSummary-content-id ChannelContentWrapperExpanderSummary-content-id" >
- Channel +
+ Channel +
+
+ Not published +
-
- Channel +
+ Channel +
+
+ Not published +
-
- Channel +
+ Channel +
+
+ Not published +
-
- Channel +
+ Channel +
+
+ Not published +
-
- Test +
+ Test +
+
+ Not published +
-
- Channel +
+ Channel +
+
+ Not published +
-
- Channel test +
+ Channel test +
+
+ Not published +
-
- Channel USD +
+ Channel USD +
+
+ Not published +
-
- Channel +
+ Channel +
+
+ Not published +
-
- Channel test +
+ Channel test +
+
+ Not published +
-
- Channel USD +
+ Channel USD +
+
+ Not published +
-
- Test +
+ Test +
+
+ Not published +
-
- Channel +
+ Channel +
+
+ Not published +
-
- Channel test +
+ Channel test +
+
+ Not published +
-
- Channel USD +
+ Channel USD +
+
+ Not published +
-
- Channel +
+ Channel +
+
+ Not published +
-
- Channel test +
+ Channel test +
+
+ Not published +
-
- Channel USD +
+ Channel USD +
+
+ Not published +
-
- Test +
+ Test +
+
+ Not published +
-
- Channel +
+ Channel +
+
+ Not published +
-
- Channel test +
+ Channel test +
+
+ Not published +
-
- Channel USD +
+ Channel USD +
+
+ Not published +
-
- Channel +
+ Channel +
+
+ Not published +
-
- Channel test +
+ Channel test +
+
+ Not published +
-
- Channel USD +
+ Channel USD +
+
+ Not published +
-