From d074291d889483e5f31ab0a8106420407dfc5922 Mon Sep 17 00:00:00 2001 From: Wojciech Date: Fri, 10 May 2024 11:07:12 +0200 Subject: [PATCH] cleanup --- .changeset/forty-lobsters-give.md | 5 ++++ locale/defaultMessages.json | 16 ++++++++--- .../ChannelAvailabilityItemContent.tsx | 28 +++++++++---------- 3 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 .changeset/forty-lobsters-give.md diff --git a/.changeset/forty-lobsters-give.md b/.changeset/forty-lobsters-give.md new file mode 100644 index 00000000000..471a6739c64 --- /dev/null +++ b/.changeset/forty-lobsters-give.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Dashboard will now allow to set publication date and availability date with time. This change also replaces deprecated date fileds with datetime fields. diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index e6a594902af..19cdac35ce2 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -399,6 +399,10 @@ "context": "dialog header", "string": "Create Menu" }, + "0ReyKr": { + "context": "VariantDetailsChannelsAvailabilityCard item subtitle published", + "string": "Published since {publishedAt}" + }, "0TQuo4": { "context": "dialog header", "string": "Unassign Collection From Sale" @@ -2886,6 +2890,10 @@ "context": "dialog content", "string": "You are not able to modify this group members. Solve this problem to continue with request." }, + "H/xj8R": { + "context": "VariantDetailsChannelsAvailabilityCard item subtitle published", + "string": "Published since {getPublishedAt}" + }, "H27/Gy": { "context": "error message", "string": "Maximum weight cannot be lower than minimum" @@ -6404,6 +6412,10 @@ "context": "button", "string": "Done" }, + "eP2yRZ": { + "context": "page availability date label", + "string": "Set availability date" + }, "eQ7bCN": { "string": "App Webhooks" }, @@ -8220,10 +8232,6 @@ "context": "Status label when object is unpublished in a channel", "string": "Unpublished" }, - "rJ3lkW": { - "context": "VariantDetailsChannelsAvailabilityCard item subtitle published", - "string": "Published since {publicationDate}" - }, "rKf4LU": { "context": "dialog title", "string": "Delete attributes" diff --git a/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemContent.tsx b/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemContent.tsx index 393116cd31f..b2d9269a7a1 100644 --- a/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemContent.tsx +++ b/src/components/ChannelsAvailabilityCard/Channel/ChannelAvailabilityItemContent.tsx @@ -100,21 +100,19 @@ export const ChannelAvailabilityItemContent: React.FC = ({ {intl.formatMessage(availabilityItemMessages.setPublicationDate)} {isPublishedAt && ( - - - onChange(id, { - ...formData, - publishedAt: dateTime, - }) - } - fullWidth - /> - + + onChange(id, { + ...formData, + publishedAt: dateTime, + }) + } + fullWidth + /> )} )}