-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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");
@spencern ninja fixed it before I could 👍 |
There was a problem hiding this 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.
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.