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

[WIP] - Marketplace: Admin role permissions for sellers, Allow guests to become sellers, Create a shop and Post products #1591

Closed
wants to merge 42 commits into from

Conversation

lcampanis
Copy link
Collaborator

@lcampanis lcampanis commented Nov 23, 2016

This branch is WIP.
Please code review when you can.

  • Allow Sellers to add products via Add Productto their shop only, when they have the createProduct role
  • Amended shopIdAutoValue to check loggedIn user has a shop, or fallback on parent shop
  • Amended getCurrentShop as a start towards shop switching UI
  • Amended Product publication to allow sub-sellers (admin) to add products to their shop
  • Amended gridControls so that sub-sellers with createProduct permission can edit their products from the grid (create a new grid view for this to work)
  • Allow guests to become sellers when marketplace module is enabled, defaultSellerRoles in Account Schema
  • Added Become a seller panel in user profile page only when Marketplace plugin is enabled and AllowGuestSeller option is enabled
  • Amended shop/createShop to allow guests to create a shop only once, when marketplace is enabled
  • New meteor method shop/getSellerShopId to safely get seller shop Id, or default to parent shopId
  • New lib/api/core for Reaction
  • New core functions Reaction.addRolesToVisitors and Reaction.isPackageEnabled
  • Fixed Reaction.getPackagesSettings
  • Marketplace dashboard settings under Catalog settings with option to allowGuestSellers (might be better under Settings?)
  • Fix loggedIn User dropdown perms - PR 1622 Add audience permissions to registry items #1639

In Progress

  1. Fix Permission issues
  2. Allow Sellers to edit their shop settings
  3. New Products Grid View and Publications showing products from multiple sellers, with permissions for logged in seller to edit directly from the grid

To Do

  1. Product cart flow to allow products from multiple sellers TBD
  2. Payment flow to allow payments from multiple sellers TBD
  3. Allow Sellers to edit their shop URL by updating Shop.domains (domain, subdomain, path based URLs)
  4. Allow Tag management per shop
  5. Expand on dashboard settings, with enableBanAccounts see [Marketplace] Ban account + Close account functionality #1578, etc)

…admin role, amended shopIdAutoValue, product publication, gridControls
@CLAassistant
Copy link

CLAassistant commented Nov 23, 2016

CLA assistant check
All committers have signed the CLA.

@lcampanis lcampanis changed the title WIP - Marketplace: Shop switching UI, admin role permissions, Allow guests to become sellers [WIP] - Marketplace: Shop switching UI, admin role permissions, Allow guests to become sellers Nov 23, 2016
…faultSellerRoles in Account Schema, add ShopTaxes in shop schema, added become seller panel in accounts when MP is enabled, amended shop/createShop to allow guests to create a shop once when marketplace is enabled
@aaronjudd aaronjudd self-assigned this Nov 27, 2016
@aaronjudd
Copy link
Contributor

@lcampanis I had a few issues while testing with my user account/shop logging out on my unexpectedly, but I suspect that it's an exaggeration of an existing issue. Curious if you've seen that? I'm testing your PR now with release-0.18 merged in as well. Small conflict in core.js, but otherwise seems to be fine with all the updates coming soon.

Not sure I understand why you added the ShopTaxes schema, could you elaborate?

@lcampanis
Copy link
Collaborator Author

lcampanis commented Dec 1, 2016

@aaronjudd Very happy with your feedback. Thanks for that!
Re logout - yes I noticed, we'll fix that now that we're on the same page.
ShopTaxes had to be added in the Shop schema as the new shop is cloned/taken from the 1 shop in the DB (and the original has Taxes in it) which aren't in the default Shop Schema for the check to pass. It was hitting on line 38 here https://github.com/reactioncommerce/reaction/pull/1591/files#diff-a85b4a331f34703f51a72e9728869fe2R38
Passing a clean shop object as an argument in the createShop function would solve that, assuming Taxes aren't in it. (Or we can remove them from the clone) just wasn't sure if we need them, so a Schema was the safest.

Copy link
Collaborator Author

@lcampanis lcampanis left a comment

Choose a reason for hiding this comment

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

Updated core functionality.

  • We have introduced a new Reaction from /lib/api so that common libraries have access to it (since ReactionCore is deprecated) - only a suggestion and waiting on your feedback
  • New core functions Reaction.addRolesToVisitors and Reaction.isPackageEnabled
  • Fixed Reaction.getPackagesSettings
  • Marketplace dashboard settings with options to allow guest sellers
  • Merged release 0.18

Make sure to show outdated comments


/**
* Hook to make additional configuration changes
*/
Hooks.Events.add("afterCoreInit", function() {

//Reaction.addRolesToVisitors("marketplace/");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Packages can now add permissions like this


// Export Reaction using commonJS style for common libraries to use Reaction.*
// https://docs.meteor.com/packages/modules.html#CommonJS
let Reaction;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need a common Reaction object for common libs to use safely.

This is only a suggestion and we'd like your feedback on this to see if it suits everyones needs.
Meteor suggests to use commonJS require() style as the only way to include modules conditionally (see page for more)

@@ -122,24 +122,6 @@ export const BrandAsset = new SimpleSchema({
});

/**
* Shop Taxes
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No need for this anymore. We trust the owner's cloned shop from the DB and only check(shop) when a shop is passed as an argument. Should be safe for creating shops on the fly - but needs testing (as does creating shop after reset - WIP)

* Add default roles for new visitors
* @param {String|Array} roles A string or array of roles and routes
*/
addRolesToVisitors(roles) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's flexible to add an array of roles or simply a string

Copy link
Contributor

Choose a reason for hiding this comment

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

More linting. Reassignment of function args is a no-no.

try {
Collections.Shops.insert(shop);
} catch (error) {
return Logger.error("Failed to shop/createShop", sanitizedError);
return Logger.error("Failed to shop/createShop", error);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure where sanitizedError is coming from, but error should be it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, looks like a typo, plus our preference is to always use "error".

Copy link
Contributor

Choose a reason for hiding this comment

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

The error object also needs to be the first arg to the logger method to be parsed correctly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Logger.error(error, "Some message string")

@lcampanis lcampanis changed the base branch from development to release-0.18.0 December 7, 2016 21:32
@@ -26,11 +26,11 @@
</div>
</div>
<div id="general" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="General">
<div class="panel-body">
<div class="panel-body">-
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these - dashes, remnants? Debug?

return true;
}

const packageSettings = Reaction.getPackageSettings('reaction-marketplace');
Copy link
Contributor

Choose a reason for hiding this comment

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

getPackageSettings is a much cleaner implementation . We should create an issue to clean up the implementation in the rest of the core packages, and make sure that docs are updated with these new methods.

A comment on styles, eslint should be warning on these, but http://eslint.org/docs/rules/no-extra-semi and http://eslint.org/docs/rules/quotes are common offenders in this code. eslint -fix is the easiest way to clean all those up. Generally, we've been "double quote" advocates.

/**
* Hook to make additional configuration changes
*/
Hooks.Events.add("afterCoreInit", function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a dangling block now? Did marketplace/ work with the trailing /?

@@ -162,6 +174,11 @@ export default {
_id: 1
}
}).fetch()[0];

if (!shop) {
Logger.debug(domain, "Add a domain entry to shops for ");
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably warrants Logger.warn.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. Definitely feels like a warn scenario. And I think it'd be a good idea to clarify the output a little. I usually make the first arg an object so it's a little clearer what you're seeing when that outputs to the console (or wherever). So...

Logger.warn({ domain }, "Shop not found");

Otherwise, when you use a string for that first arg, it renders that as if it's the main log message.

Or maybe better yet, just use a single arg as a string...

Logger.warn(`Add a domain entry to shops for ${domain}`);

But I also think it could use a more helpful message for debugging. Perhaps...

Logger.warn(`getShopId: Shop not found with domain ${domain}`);

That tells you where and why it happened.

// page

// Dashboard card
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should just place the settings under the Catalog card, and not give Marketplace it's own dashboard card (we're trying to consolidate these as much as possible). All the registry entries would still be here. Easy to move later one way or another though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added in Catalog for now. Commented dashboard card for now.

let shopId;

if(user) {
shopId = Roles.getGroupsForUser(userId, 'admin')[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

More linting here with http://eslint.org/docs/rules/quotes


// Export Reaction using commonJS style for common libraries to use Reaction
// https://docs.meteor.com/packages/modules.html#CommonJS
let Reaction;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this makes sense, @jshimko care to comment on this? I think this make some thing easier, is this something we should also do for Schemas, Collections?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I guess that makes sense. We'd probably want to update all of the imports all over the app too. And yes, it should probably extend with Collections/Schemas there instead of doing it redundantly on both the client and server.

However, I definitely don't think that's the right file for that stuff. It should probably live in /lib/api/core.js.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, it just occurred to me that pulling the Collections/Schemas into there and removing from the client/server locations would be a breaking change for anyone not importing Reaction from /lib/api. I think we need to leave that part alone for now.

import { Packages } from "/lib/collections";
import { Reaction } from "/lib/api";

const name = "reaction-marketplace";
Copy link
Contributor

Choose a reason for hiding this comment

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

Unused var declaration here.

@jshimko
Copy link
Contributor

jshimko commented Dec 8, 2016

Lots of linting errors in this PR. Check out the style guide for setting up your editor to detect that stuff.

https://docs.reactioncommerce.com/reaction-docs/development/styleguide

@lcampanis
Copy link
Collaborator Author

lcampanis commented Dec 18, 2016

Hi all,
Requested changes are all done and code is clean ready to review. :)
We'll create separate PRs for the rest.
Updated description at the top to see where we are, only missing a couple of things to call it marketplace-ready.

Spencer Norman and others added 2 commits December 20, 2016 10:17
* Move Template editing to Sidebar

* Removed logs

* Linting fixes

* i18n updates

* renamed filed to remove email designation

* package name update

* add info box around React message
Aaron Judd and others added 6 commits December 20, 2016 13:38
Fix i18next reference typo
…-perms

1622 Add audience permissions to registry items
Fix Safari websocket connection browser policy
* add applyProductRevision to Products.findOne

* fix price range for revisions

* fix isVisible price updates

* fix for price object not initially being created

* add product.range updating to non-revision enabled app
* Fix typo in CircularProgress

indetermate -> indeterminate

* Enabled false for Express on initial startup

* Updated payments method

- Replaces `payments/paymentMethod` with `payments/cart/apply`
- add discounts/codes/remove
- add discounts/codes/apply

* Initial DiscountList DiscountForm components

* functional discount code input

* basic discount calculations in cart

* Updated discount input loader

* Only display shipping, discounts, taxes gt 0

* Order discount not to exceed 0 (no neg values)

* Update plugin structure

* fix typo in taxes input

numericInputProps "taxes"

* apply discounts in order process

- DiscountList and DiscountForm components can be used for Orders or
Cart collection
- working CODES as discounts through order process
- a number of outstanding TODO’s remain for discount conditional logic
and limit handling
- Order process is easily broken, and will need modification to payment
handling to check for authorization below above current authorization
if discount is removed.

* Fix event handling in FF

* disable delete discount in admin ui

* Format discount

* Implement credit/debit payment method selectors

- Replace order.billing[0] with credit selector
- update and enforce that paymentMethod.method should be “credit”,
“debit”.
- refactor Order updates to allow for credit to be in any position

* Minor lint updates

* Updated billing constants

* Updated billing constants

* Updated selector constants

* Set min-height on cart-items

- prevent some of the ugly transitions. Needs loader.

* add fallback paymentMethod for email

- add processor in case there isn’t a storedCard

* Add calculation method to schema/forms

* info -> debug

- for `not creating default admin user”`
- for `Reaction.init() has run`

* implement hooks for per processor calculation methods

* Info -> debug logging

* discount, credit, sale, shipping calculations

* Discount code form cleanup

- add a few additional checks on fresh carts

* import indexOf

* Codes disabled by default

* autoEnable discount-codes

- is actually required right now, as the logic in payment doesn’t
extend to enabling the package.

* Patch link for non-configured payments

* Add default calculation method

- ensure that rates/discount exists
- cleanup jsdocs

* Updated orders discounts/credit/shipping summary
@lcampanis lcampanis changed the title [WIP] - Marketplace: Shop switching UI, admin role permissions, Allow guests to become sellers [WIP] - Marketplace: Admin role permissions for sellers, Allow guests to become sellers, Create a shop and Post products Dec 21, 2016
* Register template (#1362)

* added email templates package

Added ability to register html and react templates with new helper
Reaction.registerTemplate.

* Schema updates and render render functions

Added handlebars render functions, as well as the ability to register a
custom template renderer.
Added caching for handlebars templates.
Updated templates schema with more properties.

* Updated tests and template registration functionality

* add handlebars

* Quick fixes for template registration (#1518)

Fixed import of "Import" module.
Fixed type in jsDoc comments for "Import.template" function.

* Remove unused imports

* Add templates to database (#1522)

* Register all email templates

* Fetch email templates from database

* Add helper to get email template file without any extra dependencies

* Update method for fetching email template file

* Fix template paths

* Re-added missing comment

* Fixed path to core order "new" email template

* Admin Invite & Password reset emails (#1523)

* added some comments to break up html table

* reorganized data for email template

removed all [0]. type variables from new.html email template, so all
variables are set in orders.js for easy manipulation

* welcome to the shop email template

* extract social from template, add on/off switch

* invite shop member email

* shopName variable updates

* update reaction address

This was driving me crazy seeing the wrong address in all these emails
being tested.

* add Collections imports for Accounts, Cart, Shopts

* password reset emails

* update subject of order confirmation email

* lint fix

* renamed file for email template

* removed test text

* update const to conform to new file name (#1528)

Will take care of `WARN Reaction: Template not found:
accounts/reset_password. Falling back to coreDefault.html` error

* Add registry settings to package

* Conditionally show search

* Make naming consistent

* Look up in registry to determine whether to show search, and if so which template

* Add migration to update existing registries

* Modify all search-ui record

* Loop until missing record is available to modify

* Logging

* No hook, no conditional

* Make field label more explicit

* Set name which is required for some reason

* Make registry consistent with migration. I guess schema is not validated here either?

* Remove logging

* Update package.json to reflect release number

* Discounts (#1556)

* discount skeleton

- remove from core
- add core/discounts
- add discounts-rates
- add discount-codes
- new discount schemas [WIP]

* local module import of translations

- adds `loadTranslations` and `loadTranslation` methods
- removes necessity to add translations to core
- `import { loadTranslations } from "/server/startup/i18n”;`
- multiple file import illustrated in reaction-taxes
- single import illustrated in reaction-discounts
- introduces mergeDeep helper in i18n/startup and updates to
translation resource structure to accommodate additional
namespaces for package (uses package name).

* updated i18n namespace and handling

- add i18n handling for griddle column headers
- add local i18n imports to discounts
- updated i18n taxSettings namespace (into packages + admin)

* change info logging to debug

* schemas, forms, ui, i18n for discount modules

* updated Discount schemas

- implement client collections for DiscountCodes, DiscountRates
- implement multi-schema on server Discounts collection

* updated discounts pub

- split security out

* Meteor 1.4.2.1

updated to Meteor 1.4.2.1.

*  group payments packages

- resolves #1408
- consolidates all payment packages into a single admin group
- rename include payment package folders `payment-`
- add initial local i18n, moved from en.json (TODO, other lang).
- move “default method” setting from shop to new `core/payments`
package.
- move checkout/payment templates from core to `core/payments` package.
- expose icon in public registry

* PDP Package Layout - ReactionLayout (#1536)

* Build product detail page from JS object

* Allow for nested blocks, custom styling.

Removed old code.
Added default columns of 12 if block columns not specified.

* Fix responsive image issues in media gallery

* Fix pdp add to cart button styles

* ReactionLayout for react

Moved layout generator to "layout" core module.
Added permission check for top level blocks.

* Permissions for components in React ReactionLayout renderer

* Pass ProductDetail props to component in layout tree.

* Style updates for product detail page configuration.

* Remove logger, as it doesn't provide useful data in its current form

* Adds ability to add react template layout to database to render full page views

* Adds ability to use media queries when defining blocks

* add missing dependency for radium

* fix broken template tests

* More email templates (#1557)

* added some comments to break up html table

* reorganized data for email template

removed all [0]. type variables from new.html email template, so all
variables are set in orders.js for easy manipulation

* welcome to the shop email template

* extract social from template, add on/off switch

* invite shop member email

* shopName variable updates

* update reaction address

This was driving me crazy seeing the wrong address in all these emails
being tested.

* add Collections imports for Accounts, Cart, Shopts

* password reset emails

* update subject of order confirmation email

* lint fix

* renamed file for email template

* removed test text

* path file organization

* mail -> SMTP for clarification

* Merge branch 'release-0.18.0' into email-template-expansion-v2

# Conflicts:
#	imports/plugins/included/email-templates/lib/paths.js

* i18n for email template admin

* publication for Templates

* conflict fix

* add email subject into saved DB data

* add server methods for deleting email templates

* Add a duplicate, editable template to the template collection (#1548)

Mark one of those templates and an original, which can be used to
revert editable templates.

* server methods for updating email templates

* added check for original template

* new translations

* Merge branch 'release-0.18.0' into email-template-expansion-v2

* core workflow emails - processing & completed

* test - new workflow email exports

* Update email schema

* shipping email

* conflict fixes

* removed comments

* removed comments

* import new email schema

* template updates

* removed commented code

* organize templates

* added todo to schema

* updated comments

* cleanup methods file

* updated error messaging

* schema update

* update comments

* i18n updates

* removed testing alerts

* i18n updates

* file organization

* Revision control for images (#1555)

* Add media hook. Rename file to "hooks'"

* Only return published images for non-admin users

* Only set product images as unpublished

* Capture revision record and show Publish button when image changes are made

* Adding images deferred until published

* Removing images deferred until published

* Capturing and deferring other changes to metadata (priority really)

* Combine revisions when making multiple changes before publishing

* Properly handle non-product revisions in applyProductRevision so that product doesn't get wiped.

* Find the product correctly based on revision type

* Fix regression where images weren't being published because revision data was wrong

* Setting priceRange should be in an `else` statement

* If you add an image and then delete it before publishing it, just remove it.

* Update revisions with media

* Show visual indicator on image if there are pending revisions

* Discard drafts of image revisions

* Sometimes rendering the "edited" marker

* Reset revisions so that removals take effect

* Set priority to revision priority

* Fix issue where changing order wouldn't stick

* Remove logging

* Change lost in merge

* Another change from merge

* Green flash on fields in PDP page after change success (#1558)

* Green flash on fields in PDP page after change success

* Updated tags and metafields with a flash of green on success submit

* Fixed broken PDP template

Removed duplicate Templates publication

* Patched 0.18 tests (#1566)

* updated tests for discount methods

* updated meteor versions

- includes update johanbrook:publication-collector

* move discount rates to catalog/codes to payments

* restore default method data

* Expandable cards

PDP admin panel now has expandable cards with selecting fields to edit
from PDP page.

* Loading component added for reactionLayout

* Add missing NPM dependency

* Use App helper rather than ad-hoc query

* change templates importing to use Assets collection

* renamed templates function

* fixed listing errors

* add flush & changed onCoreInit -> afterCoreInit

* removed isOriginalTemplate, which is no longer used

* InitTemplates() -> initTemplates()

* move import settings (#1573)

- moved “Import” from settings/settings.html to import/import.html
- is currently not used and won’t be visible, but can be basis for
import settings.

resolves #1050

* Update Order Progress Workflow (#1580)

* update workflow when process is not done the traditional way

* update import order

* fixed linting issues

* removed old / unused nom packages

* PDP 500 (#1572)

* Added add button for variant list.

Hide available options divider, if there are no available options.

* UX tweaks for varying numbers of variants in list

- Hide options label when there is only one top level variant
- add tooltip to add button

* Hide add button for non-admin users

* More UI tweaks for products without variants

Hide add to cart button if there are no variant options available.
Hide options separator if there are no variant options and use is not
an admin.

* Added i18n

* i18n updates for the Templates package (#1571)

* fix for templates not loading on initial reaction startup

* changed the order

* move i18n to new modular style

* formatting

* Update core.js

* Update core.js

* Update index.js

* Update email.html

* removed "moo"

* Fix remove icon not displaying / revision change (#1564)

* Add media hook. Rename file to "hooks'"

* Only return published images for non-admin users

* Only set product images as unpublished

* Capture revision record and show Publish button when image changes are made

* Adding images deferred until published

* Removing images deferred until published

* Capturing and deferring other changes to metadata (priority really)

* Combine revisions when making multiple changes before publishing

* Properly handle non-product revisions in applyProductRevision so that product doesn't get wiped.

* Find the product correctly based on revision type

* Fix regression where images weren't being published because revision data was wrong

* Setting priceRange should be in an `else` statement

* If you add an image and then delete it before publishing it, just remove it.

* Update revisions with media

* Show visual indicator on image if there are pending revisions

* Discard drafts of image revisions

* Sometimes rendering the "edited" marker

* Reset revisions so that removals take effect

* Set priority to revision priority

* Fix issue where changing order wouldn't stick

* Remove logging

* Change lost in merge

* Another change from merge

* Don't show remove icon once an item has been removed.

* Protect against a non-existent product

* updated subject to use SSR

* update templates to use SSR

* update templates to use SSR

* added new field to update

* update schema for email templates

* removed unused fields

* converted old shipping code to email template

* Added ecmascript dependency to gridfs package

* updated npm dependencies

 country-data          ^0.0.30  →     ^0.0.31
 griddle-react          ^0.6.1  →      ^0.7.0
 i18next                ^3.4.3  →      ^4.0.0
 sortablejs             ^1.4.2  →  ^1.5.0-rc1
 sweetalert2            ^5.3.8  →      ^6.1.0
 wdio-mocha-framework   ^0.4.3  →      ^0.5.4

* removed no longer needs isOriginalTemplate

* remove old console.logs

* fixed type

* add ecmascript to gridfs to enable strict

* Fixed issue with closing cards on edit

cleanup of various eslint issues.

* fixed prop validation

* updated welcome email to use SSR for subject

* Upgrade to react-komposer v2

Added composeWithTracker wrapper around v2 features in lib.
Updated all react-komposer imports to use version from lib.

* Fix alerts

Was trying to call Alerts on the server, instead of the client. Fixed.

* New Email: Refunds

* remove unused email templates

* finalizing email templates - recovery commit

* email template registration

* linting fixes

* launchdock verification email

* removed errant console

* subject update

* camelCasing some things

* updated subject for unavailable templates

* disabled form fields that shouldn't be touched

* send order notification when user adds email

* [WIP] Updates to package registry

* updated reaction Apps

Updated package registry handling, updates for payments.

* Add localhost WS browser-policy

Resolve `websocket because it does not appear in the connect-src
directive of the Content Security Policy` error in safari when using
—production build.

* Payment package updates, removes name

- removes name from some payment method registry entries
- use name if separate settings and permissions are needed
- applies permission checks in package publication for filtering
enabled views
- uses package name as default settings key,  used when no name

* Move mergeDeep into /lib/api/helpers

* Update settings handling

- Cleanup handling in taxes, discounts, catalog package handling
- Fix error where registry update was overwriting existing settings
- use mergeDeep for registry updates

* Cleanup panels in payments, taxes

- remove excessive panels
- add i18n
- generic alerts
- convert panel-title to alert info
- show alert message only pre-setup

* Updated package

momentjs:moment  upgraded from 2.16.0 to 2.17.0

* PayPal as split payment methods

- Process multiple matching entries in registry
- adds i18n for PayPal client views
- splits PayPal into two payment methods for settings/checkout
- todo add migration for express_enabled to express.enabled
- todo add migration for payflow_enabled to payflow.enabled
- add browser policy akamai.mathtag.com
- apply standard button style + i18n to all payment settings

* Add Month Translations to monthOptions helper

* updated payments styling, missing i18n

- single card payment layout
- removes default payment method and collapse handling in checkout
- commented in dashboard payment settings. TBD.
- resolves #1408

* object-curly-spacing lint rules applied

* Avoid localLocale.defineLocale warning

* Clarify Auth.net credentials messaging

* Only display enabled payment methods to admin in checkout

- could have just used if in template, or alternate display
- but this is clean and simple for now.

* Updated import/requires for moment

Fix error loading moment for template helpers.

* Updated translation

* Update styling for payment settings

- remove Authnet/dashboard - unused legacy settings?

* Templates fixes (#1600)

* Remove unused settings icon

* Fix "required" name field

* Update sidebar Reactively when changes are made

* Removed references to "email"

Templates are not just for emails, so I removed references to “Email”
in all the i18n translations

* Removed "email" as Templates are more than email

* Remove unused functions

* Updated i18n

* Renamed variable away from "template"

* Use description for HTML description (#1606)

* Fix permissions on Order when "guest" user (#1607)

* Don't publish changes on a product when product is not found (happens during tests) (#1603)

* Fix bug that causes duplicated variants to be missing images. (#1611)

* Fix bug that causes duplicated variants to be missing images.

Added a copyFile helper that will bypass revision control to copy a
file.

* Add missing export

* Don't blank out titles (#1617)

* fix browser-policy for websockets in Safari

* Fix for page title not updating when selecting product. (#1623)

This fix also ensures all metadata related to a product is updated when
the product is selected.

* Default product to blank object for instances where it may be undefined. (#1619)

* Build index immediately on startup so that search doesn't throw an error (#1621)

* added audience permissions to registry schema, and Reaction.Apps now checks audience perms against user roles and registry item audience if any

* Fix typo in i18n file so that error message showed key instead of text (#1635)

* audience is passed as an array to match any user role, excluded owner from audience check

* Prerender.io Integration - Feature #1249 (#1643)

* Move Template editing to Sidebar (#1612)

* Move Template editing to Sidebar

* Removed logs

* Linting fixes

* i18n updates

* renamed filed to remove email designation

* package name update

* add info box around React message

* Fix price updates (#1633)

* add applyProductRevision to Products.findOne

* fix price range for revisions

* fix isVisible price updates

* fix for price object not initially being created

* add product.range updating to non-revision enabled app

* Checkout discount code input (#1620)

* Fix typo in CircularProgress

indetermate -> indeterminate

* Enabled false for Express on initial startup

* Updated payments method

- Replaces `payments/paymentMethod` with `payments/cart/apply`
- add discounts/codes/remove
- add discounts/codes/apply

* Initial DiscountList DiscountForm components

* functional discount code input

* basic discount calculations in cart

* Updated discount input loader

* Only display shipping, discounts, taxes gt 0

* Order discount not to exceed 0 (no neg values)

* Update plugin structure

* fix typo in taxes input

numericInputProps "taxes"

* apply discounts in order process

- DiscountList and DiscountForm components can be used for Orders or
Cart collection
- working CODES as discounts through order process
- a number of outstanding TODO’s remain for discount conditional logic
and limit handling
- Order process is easily broken, and will need modification to payment
handling to check for authorization below above current authorization
if discount is removed.

* Fix event handling in FF

* disable delete discount in admin ui

* Format discount

* Implement credit/debit payment method selectors

- Replace order.billing[0] with credit selector
- update and enforce that paymentMethod.method should be “credit”,
“debit”.
- refactor Order updates to allow for credit to be in any position

* Minor lint updates

* Updated billing constants

* Updated billing constants

* Updated selector constants

* Set min-height on cart-items

- prevent some of the ugly transitions. Needs loader.

* add fallback paymentMethod for email

- add processor in case there isn’t a storedCard

* Add calculation method to schema/forms

* info -> debug

- for `not creating default admin user”`
- for `Reaction.init() has run`

* implement hooks for per processor calculation methods

* Info -> debug logging

* discount, credit, sale, shipping calculations

* Discount code form cleanup

- add a few additional checks on fresh carts

* import indexOf

* Codes disabled by default

* autoEnable discount-codes

- is actually required right now, as the logic in payment doesn’t
extend to enabling the package.

* Patch link for non-configured payments

* Add default calculation method

- ensure that rates/discount exists
- cleanup jsdocs

* Updated orders discounts/credit/shipping summary

* Attempt to make tests more consistent (#1565)

* Fixes to inventory tests

* Create new versions of cart fixtures that create less "random" versions so that db impact is minimized.

* Eliminate unneeded originals entries

* Put expectations in callbacks rather than putting in sleeps

* Make this global wait more visible

* The quantity on remove quantity should always be 1 now that we are using the custom fixture.

* Allow direct importing of inventory function

* creating createCart function

* test for createCart function

* Directly call registerInventory to avoid permissions check that doesn't apply

* Add singleVariant version of addProduct

* Trying to get these tests to run reliably by trying to normalize the inventory beforehand

* createCart function

* test for createCart function

* Change currency symbol for PHP (wut?)

* Db-normalized inventory tests

* Just blindly increase this timeout

* Add comment explaining why we need this long timeout

* Remove Logger

* Extend timeout on cart test

* Add sleep for createVariant tests

* Quiet inventory register logging that I should not have put there anyway

* Don't operate on product if it's not found

* Update to fixed publication-collector

* Increase timeout on discount test

* Update publication-collector

* Don't call Alert in a server method

* Lint cleanup
@kieckhafer kieckhafer closed this Dec 21, 2016
@aaronjudd aaronjudd changed the base branch from release-0.18.0 to development December 21, 2016 19:56
@aaronjudd aaronjudd reopened this Dec 21, 2016
@lcampanis
Copy link
Collaborator Author

@aaronjudd Not sure why this PR is showing more files and commits, as we've now merged and checked across all ends since release 18 was closed and there shouldn't be any additional commits, and only 28 files changed.

Creating an identical PR with the same base/branch combo will actually give you the correct files. Weirdest thing! But to save us time give it a go rather than trying to fix this one ;)

@aaronjudd
Copy link
Contributor

aaronjudd commented Dec 24, 2016

@lcampanis that is weird.. I'm sure the base got screwed up somehow with some magic.. the changes happened automatically when I merged release-0.18. In any case, a new PR would be fine, just reference this one and we'll close this. (edit-looks like I was seeing an outdated PR 👍 )

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.

10 participants