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

Adds the ability to set shops to active / disabled #3049

Merged
merged 10 commits into from
Oct 6, 2017

Conversation

mikemurray
Copy link
Member

@mikemurray mikemurray commented Oct 6, 2017

Fixes items 2 and 3 for #2864

This PR adds a simple table to set marketplace shops to active / disabled

  • As a customer
    If a shop is disabled, its products are de-listed from the product grid if using the default Products publication.

  • As an admin
    You can see all shops and all products from all shops at the moment.

This is the start of a full-on marketplace shop management tools.

Copy link
Contributor

@machikoyasuda machikoyasuda left a comment

Choose a reason for hiding this comment

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

comments + jsdocs 👍
added reactioncommerce/reaction-docs#295

return {
Header: <Components.Translation i18nKey={`marketplaceShops.headers.${field}`} defaultValue={field} />,
accessor: field,
Cell: (data) => ( // eslint-disable-line
Copy link
Contributor

Choose a reason for hiding this comment

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

What's disabled here? It's a little more clear if we can use eslint-disable-line rule-name so future us/others can understand why we disabled and what for

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm actually not seeing any lint errors when removing this, so perhaps not needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's usually a react issue of defining more than one component per file.

check(workflowStatus, String);

if (shopId === Reaction.getPrimaryShopId()) {
throw new Meteor.Error(403, "Cannot change shop status");
Copy link
Contributor

Choose a reason for hiding this comment

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

We're no longer using error codes here, this should be `Meteor.Error("access-denied", "Cannot change shop status");

@mikemurray
Copy link
Member Author

@spencern ninja fixed it before I could 👍

Copy link
Contributor

@spencern spencern left a comment

Choose a reason for hiding this comment

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

Great start, provides basic enable/disable functionality for shops and a good base to build more complex merchant shop management functionality on top of.

@spencern spencern merged commit 2d0f779 into release-1.5.0 Oct 6, 2017
@spencern spencern deleted the mm-shop-manager-2864 branch October 6, 2017 22:22
This was referenced Oct 6, 2017
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.

3 participants