Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix publish and available for purchase behaviour #780

Merged
merged 9 commits into from Oct 21, 2020

Conversation

bmigirl
Copy link
Contributor

@bmigirl bmigirl commented Oct 19, 2020

I want to merge this change because it fixes sending isPublished and isAvailable data to the api when creating / updating product, category or page.

SALEOR-1317
also fixes
SALEOR-1344

  • Add DateVisibilitySelector component to handle hide / display logic for the date input and labels

PR intended to be tested with API branch: use_is_visible_to_determine_if_product_is_publish_for_2_11

Screenshots

Pull Request Checklist

  1. All visible strings are translated with proper context.
  2. All data-formatting is locale-aware (dates, numbers, and so on).
  3. Translated strings are extracted.
  4. Number of API calls is optimized.
  5. The changes are tested.
  6. Data-test are added for new elements.
  7. Type definitions are up to date.
  8. Changes are mentioned in the changelog.

Test environment config

API_URI=https://test-deployment.api.saleor.rocks/graphql/

Magdalena Markusik added 3 commits October 19, 2020 11:19
@patrys
Copy link
Member

patrys commented Oct 19, 2020

@github-actions github-actions bot temporarily deployed to fix-publish-and-available-for-purchase-behaviour October 19, 2020 11:02 Inactive
@github-actions github-actions bot temporarily deployed to storybook fix-publish-and-available-for-purchase-behaviour October 19, 2020 11:02 Inactive
@bmigirl bmigirl marked this pull request as ready for review October 19, 2020 11:09
@github-actions github-actions bot temporarily deployed to fix-publish-and-available-for-purchase-behaviour October 19, 2020 11:09 Inactive
@github-actions github-actions bot temporarily deployed to storybook fix-publish-and-available-for-purchase-behaviour October 19, 2020 11:09 Inactive
<div className={classes.icon} onClick={handleCloseIconClick}>
<img
src={closeIcon}
alt=""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add close icon or something similar as alt

@github-actions github-actions bot temporarily deployed to fix-publish-and-available-for-purchase-behaviour October 20, 2020 08:16 Inactive
@github-actions github-actions bot temporarily deployed to storybook fix-publish-and-available-for-purchase-behaviour October 20, 2020 08:16 Inactive
Copy link
Contributor

@AlicjaSzu AlicjaSzu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests are failing

@github-actions github-actions bot temporarily deployed to fix-publish-and-available-for-purchase-behaviour October 20, 2020 09:08 Inactive
@github-actions github-actions bot temporarily deployed to storybook fix-publish-and-available-for-purchase-behaviour October 20, 2020 09:08 Inactive
@github-actions github-actions bot temporarily deployed to fix-publish-and-available-for-purchase-behaviour October 20, 2020 09:33 Inactive
@github-actions github-actions bot temporarily deployed to storybook fix-publish-and-available-for-purchase-behaviour October 20, 2020 09:33 Inactive
@github-actions github-actions bot temporarily deployed to fix-publish-and-available-for-purchase-behaviour October 20, 2020 09:51 Inactive
@github-actions github-actions bot temporarily deployed to storybook fix-publish-and-available-for-purchase-behaviour October 20, 2020 09:51 Inactive
}: ProductAvailabilityArgs) => ({
isAvailable: isAvailableForPurchase,
productId,
startDate: availableForPurchase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

startDate should be set to null if isAvailableForPurchase is set to true,
(or maybe it should be changed in ProductUpdatePage)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually not. The idea behind this PR is because this piece of logic was changed for 2.11 - when sending a date for available / published the isAvailable is also to be set to true

@github-actions github-actions bot temporarily deployed to fix-publish-and-available-for-purchase-behaviour October 21, 2020 09:08 Inactive
@bmigirl bmigirl requested review from AlicjaSzu and orzechdev and removed request for orzechdev October 21, 2020 09:09
@bmigirl bmigirl merged commit 6fa2d58 into master Oct 21, 2020
@bmigirl bmigirl deleted the Fix-publish-and-available-for-purchase-behaviour branch October 21, 2020 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants