Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloud11PL committed May 10, 2024
1 parent 731138b commit d074291
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-lobsters-give.md
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 12 additions & 4 deletions locale/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -6404,6 +6412,10 @@
"context": "button",
"string": "Done"
},
"eP2yRZ": {
"context": "page availability date label",
"string": "Set availability date"
},
"eQ7bCN": {
"string": "App Webhooks"
},
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,19 @@ export const ChannelAvailabilityItemContent: React.FC<ChannelContentProps> = ({
{intl.formatMessage(availabilityItemMessages.setPublicationDate)}
</Checkbox>
{isPublishedAt && (
<Box display="flex" gap={4} width="100%">
<DateTimeTimezoneField
error={!!formErrors.publishedAt}
disabled={disabled}
name={`channel:publicationTime:${id}`}
value={publishedAt || ""}
onChange={dateTime =>
onChange(id, {
...formData,
publishedAt: dateTime,
})
}
fullWidth
/>
</Box>
<DateTimeTimezoneField
error={!!formErrors.publishedAt}
disabled={disabled}
name={`channel:publicationTime:${id}`}
value={publishedAt || ""}
onChange={dateTime =>
onChange(id, {
...formData,
publishedAt: dateTime,
})
}
fullWidth
/>
)}
</Box>
)}
Expand Down

0 comments on commit d074291

Please sign in to comment.