From b2a192c3fd4076ee5bc12727b9cc6110062fff79 Mon Sep 17 00:00:00 2001 From: Jeremy Shimko Date: Wed, 23 Aug 2017 21:40:52 -0400 Subject: [PATCH] [WIP] development to marketplace (#2730) development to marketplace --- .gitignore | 1 + CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 8 +- README.md | 17 +- .../accounts/templates/members/member.js | 1 + client/modules/core/main.js | 5 +- .../plugins/core/components/lib/components.js | 2 +- imports/plugins/core/components/lib/hoc.js | 4 +- .../layout/client/components/coreLayout.js | 1 - .../orders/client/components/ordersList.js | 186 ++++++++++++++++++ .../client/containers/ordersListContainer.js | 3 +- .../client/templates/workflow/workflow.js | 2 +- .../__tests__/__snapshots__/badge.js.snap | 2 +- .../core/ui/client/components/table/index.js | 1 - .../sortableTableComponents/pagination.js | 14 +- .../components/translation/translation.js | 5 +- .../launchdock-connect/server/i18n/ar.json | 18 -- .../launchdock-connect/server/i18n/bg.json | 18 -- .../launchdock-connect/server/i18n/cs.json | 18 -- .../launchdock-connect/server/i18n/de.json | 18 -- .../launchdock-connect/server/i18n/el.json | 18 -- .../launchdock-connect/server/i18n/en.json | 18 -- .../launchdock-connect/server/i18n/es.json | 18 -- .../launchdock-connect/server/i18n/fr.json | 18 -- .../launchdock-connect/server/i18n/he.json | 5 - .../launchdock-connect/server/i18n/hr.json | 18 -- .../launchdock-connect/server/i18n/hu.json | 18 -- .../launchdock-connect/server/i18n/it.json | 18 -- .../launchdock-connect/server/i18n/my.json | 18 -- .../launchdock-connect/server/i18n/nb.json | 5 - .../launchdock-connect/server/i18n/nl.json | 18 -- .../launchdock-connect/server/i18n/pl.json | 18 -- .../launchdock-connect/server/i18n/pt.json | 18 -- .../launchdock-connect/server/i18n/ro.json | 18 -- .../launchdock-connect/server/i18n/ru.json | 18 -- .../launchdock-connect/server/i18n/sl.json | 18 -- .../launchdock-connect/server/i18n/sv.json | 18 -- .../launchdock-connect/server/i18n/tr.json | 18 -- .../launchdock-connect/server/i18n/vi.json | 18 -- .../launchdock-connect/server/i18n/zh.json | 18 -- .../variants/variantForm/childVariant.js | 2 +- .../server/methods/searchcollections.js | 1 + .../lib/containers/searchModalContainer.js | 15 +- lib/collections/collectionFS.js | 1 + server/api/core/core.js | 1 + server/methods/accounts/accounts.js | 1 + server/publications/collections/accounts.js | 2 +- server/publications/collections/product.js | 3 +- server/startup/load-data.js | 84 ++++---- 49 files changed, 293 insertions(+), 477 deletions(-) create mode 100644 imports/plugins/core/orders/client/components/ordersList.js delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/ar.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/bg.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/cs.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/de.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/el.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/en.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/es.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/fr.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/he.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/hr.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/hu.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/it.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/my.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/nb.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/nl.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/pl.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/pt.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/ro.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/ru.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/sl.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/sv.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/tr.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/vi.json delete mode 100644 imports/plugins/included/launchdock-connect/server/i18n/zh.json diff --git a/.gitignore b/.gitignore index 9d84cbedb85..e7e505b0e43 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .fileStorage/ .vscode .idea +.c9 *.csv *.dat *.gz diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index ec44c40455d..a825adacb59 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -8,7 +8,7 @@ Diversity is one of our huge strengths, but it can also lead to communication is This isn’t an exhaustive list of things that you can’t do. Rather, take it in the spirit in which it’s intended - a guide to make it easier to enrich all of us and the broader communities in which we participate. -This code of conduct applies to all spaces managed by Reaction Commerce. This includes our [development chat room](https://gitter.im/reactioncommerce/reaction), [forums](https://forums.reactioncommerce.com), [blog](https://blog.reactioncommerce.com), mailing lists, [issue tracker](https://github.com/reactioncommerce/reaction/issues), [project board](https://waffle.io/reactioncommerce/reaction), Reaction events and meetups, and any other forums or service created by the core project team which the community uses for communication. In addition, violations of this code outside these spaces may affect a person's ability to participate within them. +This code of conduct applies to all spaces managed by Reaction Commerce. This includes our [development chat room](https://gitter.im/reactioncommerce/reaction), [forums](https://forums.reactioncommerce.com), [blog](https://blog.reactioncommerce.com), mailing lists, [issue tracker](https://github.com/reactioncommerce/reaction/issues), [project boards](https://github.com/reactioncommerce/reaction/projects), Reaction events and meetups, and any other forums or service created by the core project team which the community uses for communication. In addition, violations of this code outside these spaces may affect a person's ability to participate within them. If you believe someone is violating the code of conduct, we ask that you report it by emailing [conduct@reactioncommerce.com](mailto:conduct@reactioncommerce.com). For more details, please see our [Reporting Guidelines](https://docs.reactioncommerce.com/reaction-docs/master/reporting-guide). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 848ab71c831..0df068bc614 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,9 @@ Explore the interface and the code to give you a good overview of the product an **Step 3:** -Explore the [GitHub issues already open on our main repo](https://waffle.io/reactioncommerce/reaction). If you find something you want to work on, let us know right there in the comments. If you are interested in a specific aspect of the project but aren't sure where to begin, feel free to ask. Start small and open up a dialogue with us. This will help to get your contributions accepted easily. +Explore the [GitHub issues already open on our main repo](https://github.com/reactioncommerce/reaction/issues) and our [GitHub project boards](https://github.com/reactioncommerce/reaction/projects). If you find something you want to work on, let us know right there in the comments. [`Pull Requests Encouraged`](https://github.com/reactioncommerce/reaction/issues?q=is%3Aissue+is%3Aopen+label%3Apull-requests-encouraged) and [`Verified Reproducible`](https://github.com/reactioncommerce/reaction/issues?q=is%3Aopen+is%3Aissue+label%3Averified-reproducible) labeled issues are a great place to start. + +If you are interested in a specific aspect of the project but aren't sure where to begin, feel free to ask. Start small and open up a dialogue with us. This will help to get your contributions accepted easily. **Step 4:** @@ -28,7 +30,7 @@ Let us know how we can make the contribution process easier. We want to find the [Create a pull request](https://help.github.com/articles/creating-a-pull-request/) to propose and collaborate on changes to Reaction. These changes are proposed in a PR branch, and are reviewed before merge acceptance into `development` for release. - Should reference an issue if one exists, or provide detailed information on the goal of the PR. -- Should pass CI / Tests. New functionality should include new tests. -- Should passing a linter code review and follow Reaction style guidelines. +- Pass both [acceptance tests and unit testing](https://docs.reactioncommerce.com/reaction-docs/master/testing-reaction). New functionality should include new tests. +- Lint and adhere to the [Reaction style guide](https://docs.reactioncommerce.com/reaction-docs/master/styleguide). - Contributors should review the CLA. - Code reviewed before merge acceptance. diff --git a/README.md b/README.md index 547f7d43da4..6c90e07b3da 100644 --- a/README.md +++ b/README.md @@ -52,15 +52,24 @@ Multiple branches, release documentation is found at this.props.handleClick(order, startWorkflow)}> + + + ); + } + + renderOrderInfo(order) { + const { displayMedia } = this.props; + + return ( +
+
+ + Date: + {moment(order.createdAt).fromNow()} | {moment(order.createdAt).format("MM/D/YYYY")} + + + + Order ID: + + + + + Total: {formatPriceString(order.billing[0].invoice.total)} + +
+ +
+ {order.items.map((item, i) => { + return ( +
+
+ +
+
+ ); + })} +
+
+ ); + } + + renderShipmentInfo(order) { + const emailAddress = order.email || ; + return ( +
+
+ + {order.shipping[0].address.fullName} | {emailAddress} +
+
+ + +
+
+ ); + } + + + renderOrderCard(order) { + const { handleClick } = this.props; + + return ( +
+
handleClick(order, false)}> + {this.renderShipmentInfo(order)} + {this.renderOrderInfo(order)} +
+
handleClick(order)}> + {this.renderOrderButton(order)} +
+
+ ); + } + + + render() { + const { orders } = this.props; + + if (orders.length) { + return ( +
+ {orders.map((order, i) => { + return ( +
+ {this.renderOrderCard(order)} +
+ ); + })} +
+ ); + } + + return ( +
+
+ + +
+
+ ); + } +} + +export default OrdersList; diff --git a/imports/plugins/core/orders/client/containers/ordersListContainer.js b/imports/plugins/core/orders/client/containers/ordersListContainer.js index 1df7d76835d..f884599425a 100644 --- a/imports/plugins/core/orders/client/containers/ordersListContainer.js +++ b/imports/plugins/core/orders/client/containers/ordersListContainer.js @@ -4,7 +4,6 @@ import { composeWithTracker } from "@reactioncommerce/reaction-components"; import { Meteor } from "meteor/meteor"; import { Media } from "/lib/collections"; import { Reaction } from "/client/api"; -import { Loading } from "/imports/plugins/core/ui/client/components"; import OrdersList from "../components/orderList.js"; import { PACKAGE_NAME, @@ -168,4 +167,4 @@ const composer = (props, onData) => { } }; -export default composeWithTracker(composer, Loading)(OrdersListContainer); +export default composeWithTracker(composer)(OrdersListContainer); diff --git a/imports/plugins/core/orders/client/templates/workflow/workflow.js b/imports/plugins/core/orders/client/templates/workflow/workflow.js index f8cb886995f..c41f7608688 100644 --- a/imports/plugins/core/orders/client/templates/workflow/workflow.js +++ b/imports/plugins/core/orders/client/templates/workflow/workflow.js @@ -34,7 +34,7 @@ Template.coreOrderWorkflow.helpers({ * @return {Object|Boolean} An order or false */ order() { - const id = this.order._id || Reaction.Router.getQueryParam("_id"); + const id = this.order ? this.order._id : Reaction.Router.getQueryParam("_id"); if (id) { return Orders.findOne(id); } diff --git a/imports/plugins/core/ui/client/components/badge/__tests__/__snapshots__/badge.js.snap b/imports/plugins/core/ui/client/components/badge/__tests__/__snapshots__/badge.js.snap index 87d539bea63..8f9afbdd18e 100644 --- a/imports/plugins/core/ui/client/components/badge/__tests__/__snapshots__/badge.js.snap +++ b/imports/plugins/core/ui/client/components/badge/__tests__/__snapshots__/badge.js.snap @@ -2,7 +2,7 @@ exports[`Badge snapshot test 1`] = `
{ // eslint-disable-line no-unused-vars - if (!canPrevious) return; - this.changePage(page - 1); + onClick={(e) => { // eslint-disable-line no-unused-vars + if (!canPrevious) { + return this.changePage(page - 1); + } }} disabled={!canPrevious} > @@ -125,9 +126,10 @@ class SortableTablePagination extends Component { |
{ // eslint-disable-line no-unused-vars - if (!canNext) return; - this.changePage(page + 1); + onClick={(e) => { // eslint-disable-line no-unused-vars + if (!canNext) { + return this.changePage(page + 1); + } }} disabled={!canNext} > diff --git a/imports/plugins/core/ui/client/components/translation/translation.js b/imports/plugins/core/ui/client/components/translation/translation.js index 438703f5d4d..d05050f3d6d 100644 --- a/imports/plugins/core/ui/client/components/translation/translation.js +++ b/imports/plugins/core/ui/client/components/translation/translation.js @@ -4,17 +4,16 @@ import PropTypes from "prop-types"; import { registerComponent } from "@reactioncommerce/reaction-components"; import { i18next } from "/client/api"; -const Translation = ({ i18nKey, defaultValue, className }) => { +const Translation = ({ i18nKey, defaultValue, ...rest }) => { const key = i18nKey || camelCase(defaultValue); const translation = i18next.t(key, { defaultValue }); return ( - {translation} + {translation} ); }; Translation.propTypes = { - className: PropTypes.string, defaultValue: PropTypes.string, i18nKey: PropTypes.string }; diff --git a/imports/plugins/included/launchdock-connect/server/i18n/ar.json b/imports/plugins/included/launchdock-connect/server/i18n/ar.json deleted file mode 100644 index 4a8133343e6..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/ar.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "ar", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "الاتصال", - "connectTitle": "الاتصال", - "connectDescription": "تواصل ردود الفعل كخدمة نشر" - }, - "settings": { - "reactionConnectLabel": "رد فعل الاتصال" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/bg.json b/imports/plugins/included/launchdock-connect/server/i18n/bg.json deleted file mode 100644 index 1d9181c832b..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/bg.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "bg", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Свържете", - "connectTitle": "Свържете", - "connectDescription": "Свържете Реакция като разгърнати услуга" - }, - "settings": { - "reactionConnectLabel": "реакция Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/cs.json b/imports/plugins/included/launchdock-connect/server/i18n/cs.json deleted file mode 100644 index 47e23fbb43f..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/cs.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "cs", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Připojit", - "connectTitle": "Připojit", - "connectDescription": "Připojit reakce jako rozvinuté služby" - }, - "settings": { - "reactionConnectLabel": "reakce Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/de.json b/imports/plugins/included/launchdock-connect/server/i18n/de.json deleted file mode 100644 index cf07d857577..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/de.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "de", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Verbinden", - "connectTitle": "Verbinden", - "connectDescription": "Verbinden Reaktion als bereitgestellten Dienst" - }, - "settings": { - "reactionConnectLabel": "Die Reaktion Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/el.json b/imports/plugins/included/launchdock-connect/server/i18n/el.json deleted file mode 100644 index f05db90c402..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/el.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "el", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Συνδέω", - "connectTitle": "Συνδέω", - "connectDescription": "Συνδέστε Αντίδραση ως αναπτυχθεί υπηρεσία" - }, - "settings": { - "reactionConnectLabel": "αντίδραση Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/en.json b/imports/plugins/included/launchdock-connect/server/i18n/en.json deleted file mode 100644 index a0c25c447d6..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/en.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "en", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Connect", - "connectTitle": "Connect", - "connectDescription": "Connect Reaction as a deployed service" - }, - "settings": { - "reactionConnectLabel": "Reaction Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/es.json b/imports/plugins/included/launchdock-connect/server/i18n/es.json deleted file mode 100644 index a465cc93ac0..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/es.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "es", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Conectar", - "connectTitle": "Conectar", - "connectDescription": "Conectar reacción como un servicio desplegado" - }, - "settings": { - "reactionConnectLabel": "reacción Conectar" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/fr.json b/imports/plugins/included/launchdock-connect/server/i18n/fr.json deleted file mode 100644 index ad8b73737c7..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/fr.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "fr", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Relier", - "connectTitle": "Relier", - "connectDescription": "Connectez réaction en tant que service déployé" - }, - "settings": { - "reactionConnectLabel": "réaction Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/he.json b/imports/plugins/included/launchdock-connect/server/i18n/he.json deleted file mode 100644 index 506cc4b7719..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/he.json +++ /dev/null @@ -1,5 +0,0 @@ -[{ - "i18n": "he", - "ns": "reaction-connect", - "translation": { } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/hr.json b/imports/plugins/included/launchdock-connect/server/i18n/hr.json deleted file mode 100644 index 5bcca8fc630..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/hr.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "hr", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Spojiti", - "connectTitle": "Spojiti", - "connectDescription": "Povezivanje reakcija kao razmještene usluge" - }, - "settings": { - "reactionConnectLabel": "reakcija Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/hu.json b/imports/plugins/included/launchdock-connect/server/i18n/hu.json deleted file mode 100644 index 348f0ea2969..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/hu.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "hu", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Csatlakozás", - "connectTitle": "Csatlakozás", - "connectDescription": "Csatlakozás Reakció a telepített szolgáltatás" - }, - "settings": { - "reactionConnectLabel": "reakció Csatlakozás" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/it.json b/imports/plugins/included/launchdock-connect/server/i18n/it.json deleted file mode 100644 index 2d70e7cbef4..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/it.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "it", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Collegare", - "connectTitle": "Collegare", - "connectDescription": "Collegare reazione come un servizio distribuito" - }, - "settings": { - "reactionConnectLabel": "reazione Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/my.json b/imports/plugins/included/launchdock-connect/server/i18n/my.json deleted file mode 100644 index 3c882fb8d61..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/my.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "my", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "ဆက်", - "connectTitle": "ဆက်", - "connectDescription": "တစ်တပ်ဖြန့်ဝန်ဆောင်မှုအဖြစ်တုံ့ပြန်မှုချိတ်ဆက်ပါ" - }, - "settings": { - "reactionConnectLabel": "တုံ့ပြန်မှု Connect ကို" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/nb.json b/imports/plugins/included/launchdock-connect/server/i18n/nb.json deleted file mode 100644 index 21ef5f82ef7..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/nb.json +++ /dev/null @@ -1,5 +0,0 @@ -[{ - "i18n": "nb", - "ns": "reaction-connect", - "translation": { } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/nl.json b/imports/plugins/included/launchdock-connect/server/i18n/nl.json deleted file mode 100644 index b53a0000fff..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/nl.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "nl", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Aansluiten", - "connectTitle": "Aansluiten", - "connectDescription": "Sluit Reaction als ingezet dienst" - }, - "settings": { - "reactionConnectLabel": "reactie Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/pl.json b/imports/plugins/included/launchdock-connect/server/i18n/pl.json deleted file mode 100644 index d62f78b5f50..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/pl.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "pl", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Połączyć", - "connectTitle": "Połączyć", - "connectDescription": "Podłączyć reakcyjnej w postaci wdrożonej usługi" - }, - "settings": { - "reactionConnectLabel": "reakcja Połącz" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/pt.json b/imports/plugins/included/launchdock-connect/server/i18n/pt.json deleted file mode 100644 index 9d43ec1def5..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/pt.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "pt", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Conectar", - "connectTitle": "Conectar", - "connectDescription": "Ligue Reaction como um serviço implantado" - }, - "settings": { - "reactionConnectLabel": "reação Ligar" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/ro.json b/imports/plugins/included/launchdock-connect/server/i18n/ro.json deleted file mode 100644 index b5df4b89dd9..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/ro.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "ro", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Conectați", - "connectTitle": "Conectați", - "connectDescription": "Reacția a conecta ca un serviciu implementat" - }, - "settings": { - "reactionConnectLabel": "reacție Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/ru.json b/imports/plugins/included/launchdock-connect/server/i18n/ru.json deleted file mode 100644 index 3c022308793..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/ru.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "ru", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Подключать", - "connectTitle": "Подключать", - "connectDescription": "Подключение реакции в качестве развернутой службы" - }, - "settings": { - "reactionConnectLabel": "Реакция Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/sl.json b/imports/plugins/included/launchdock-connect/server/i18n/sl.json deleted file mode 100644 index c56f3e420e2..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/sl.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "sl", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Poveži", - "connectTitle": "Poveži", - "connectDescription": "Povežite Reakcija kot razporejeno storitev" - }, - "settings": { - "reactionConnectLabel": "reakcija Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/sv.json b/imports/plugins/included/launchdock-connect/server/i18n/sv.json deleted file mode 100644 index 226d33d7959..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/sv.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "sv", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Ansluta", - "connectTitle": "Ansluta", - "connectDescription": "Anslut reaktion som en utvecklad tjänst" - }, - "settings": { - "reactionConnectLabel": "reaktions~~POS=TRUNC Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/tr.json b/imports/plugins/included/launchdock-connect/server/i18n/tr.json deleted file mode 100644 index 1ebc549bdb7..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/tr.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "tr", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Bağlamak", - "connectTitle": "Bağlamak", - "connectDescription": "Açılmış bir hizmet olarak Tepki bağlayın" - }, - "settings": { - "reactionConnectLabel": "reaksiyon Bağlan" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/vi.json b/imports/plugins/included/launchdock-connect/server/i18n/vi.json deleted file mode 100644 index 815b1da038c..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/vi.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "vi", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "Kết nối", - "connectTitle": "Kết nối", - "connectDescription": "Kết nối phản ứng như một dịch vụ triển khai" - }, - "settings": { - "reactionConnectLabel": "phản ứng Connect" - } - } - } - } -}] diff --git a/imports/plugins/included/launchdock-connect/server/i18n/zh.json b/imports/plugins/included/launchdock-connect/server/i18n/zh.json deleted file mode 100644 index e41bdad5347..00000000000 --- a/imports/plugins/included/launchdock-connect/server/i18n/zh.json +++ /dev/null @@ -1,18 +0,0 @@ -[{ - "i18n": "zh", - "ns": "reaction-connect", - "translation": { - "reaction-connect": { - "admin": { - "dashboard": { - "connectLabel": "接", - "connectTitle": "接", - "connectDescription": "连接反应作为部署的服务" - }, - "settings": { - "reactionConnectLabel": "反应连接" - } - } - } - } -}] diff --git a/imports/plugins/included/product-variant/client/templates/products/productDetail/variants/variantForm/childVariant.js b/imports/plugins/included/product-variant/client/templates/products/productDetail/variants/variantForm/childVariant.js index f1b704514c1..ff34f2f9dad 100644 --- a/imports/plugins/included/product-variant/client/templates/products/productDetail/variants/variantForm/childVariant.js +++ b/imports/plugins/included/product-variant/client/templates/products/productDetail/variants/variantForm/childVariant.js @@ -157,7 +157,7 @@ Template.childVariantForm.events({ template.state.set("variant", updated); Meteor.call("products/updateProductField", variant._id, field, value, - error => { + (error) => { if (error) { Alerts.toast(error.message, "error"); } diff --git a/imports/plugins/included/search-mongo/server/methods/searchcollections.js b/imports/plugins/included/search-mongo/server/methods/searchcollections.js index 48635c1f5c4..12ecc630451 100644 --- a/imports/plugins/included/search-mongo/server/methods/searchcollections.js +++ b/imports/plugins/included/search-mongo/server/methods/searchcollections.js @@ -189,6 +189,7 @@ export function buildOrderSearchRecord(orderId) { orderSearch.orderTotal = order.billing[0].invoice.total; orderSearch.orderDate = moment(order.createdAt).format("YYYY/MM/DD"); orderSearch.billingStatus = order.billing[0].paymentMethod.status; + orderSearch.currentWorkflowStatus = order.workflow.status; if (order.shipping[0].shipped) { orderSearch.shippingStatus = "Shipped"; } else if (order.shipping[0].packed) { diff --git a/imports/plugins/included/ui-search/lib/containers/searchModalContainer.js b/imports/plugins/included/ui-search/lib/containers/searchModalContainer.js index a7082090877..45e158fe52f 100644 --- a/imports/plugins/included/ui-search/lib/containers/searchModalContainer.js +++ b/imports/plugins/included/ui-search/lib/containers/searchModalContainer.js @@ -30,6 +30,7 @@ class SearchModalContainer extends Component { this.handleToggle = this.handleToggle.bind(this); this.handleKeyDown = this.handleKeyDown.bind(this); this.dep = new Tracker.Dependency; + this.getWorkflowStatus = this.getWorkflowStatus.bind(this); } componentDidMount() { @@ -150,7 +151,8 @@ class SearchModalContainer extends Component { } Reaction.Router.go("dashboard/orders", {}, { - _id: orderId + _id: orderId, + status: this.getWorkflowStatus(event) }); this.handleChildUnmount(); } @@ -181,6 +183,17 @@ class SearchModalContainer extends Component { this.setState({ renderChild: false }); } + getWorkflowStatus(order) { + let status = "new"; + if (order.currentWorkflowStatus === "coreOrderWorkflow/processing") { + status = "processing"; + } + if (order.currentWorkflowStatus === "coreOrderWorkflow/completed") { + status = "completed"; + } + return status; + } + render() { return (
diff --git a/lib/collections/collectionFS.js b/lib/collections/collectionFS.js index 0a47ecb065a..0e1bf341ad1 100644 --- a/lib/collections/collectionFS.js +++ b/lib/collections/collectionFS.js @@ -1,3 +1,4 @@ + /** * core collectionsFS configurations */ diff --git a/server/api/core/core.js b/server/api/core/core.js index 91bb7f66937..8856af95215 100644 --- a/server/api/core/core.js +++ b/server/api/core/core.js @@ -37,6 +37,7 @@ export default { if (process.env.VERBOSE_JOBS) { Jobs.setLogStream(process.stdout); } + this.loadPackages(); // process imports from packages and any hooked imports this.Import.flush(); diff --git a/server/methods/accounts/accounts.js b/server/methods/accounts/accounts.js index 3ea00559f10..c45a3910073 100644 --- a/server/methods/accounts/accounts.js +++ b/server/methods/accounts/accounts.js @@ -538,6 +538,7 @@ export function inviteShopMember(options) { check(email, String); check(name, String); check(groupId, String); + this.unblock(); const shop = Shops.findOne(shopId); diff --git a/server/publications/collections/accounts.js b/server/publications/collections/accounts.js index 154bf0683f1..f5e0e79287b 100644 --- a/server/publications/collections/accounts.js +++ b/server/publications/collections/accounts.js @@ -26,7 +26,7 @@ Meteor.publish("Accounts", function (userId) { shopId }, { fields: { _id: 1 } - }).fetch().map(group => group._id); + }).fetch().map((group) => group._id); // global admin can get all accounts if (Roles.userIsInRole(this.userId, ["owner"], Roles.GLOBAL_GROUP)) { diff --git a/server/publications/collections/product.js b/server/publications/collections/product.js index 425f2ddd479..3a5ef34a40a 100644 --- a/server/publications/collections/product.js +++ b/server/publications/collections/product.js @@ -67,8 +67,7 @@ Meteor.publish("Product", function (productId) { selector.isVisible = true; selector.isDeleted = { $in: [null, false] }; - if (Roles.userIsInRole(this.userId, ["owner", "admin", "createProduct"], - shopId)) { + if (Roles.userIsInRole(this.userId, ["owner", "admin", "createProduct"], shopId)) { selector.isVisible = { $in: [true, false] }; diff --git a/server/startup/load-data.js b/server/startup/load-data.js index aedb9faf365..2f3345bd6a7 100644 --- a/server/startup/load-data.js +++ b/server/startup/load-data.js @@ -4,49 +4,55 @@ import { Logger, Reaction } from "/server/api"; import { Fixture } from "/server/api/core/import"; export default function () { - /** - * Hook to setup core additional imports during Reaction init (shops process first) - */ - Logger.info("Load default data from /private/data/"); + if (!process.env.SKIP_FIXTURES) { + /** + * Hook to setup core additional imports during Reaction init (shops process first) + */ + Logger.info("Load default data from /private/data/"); - try { - Logger.debug("Loading Shop Data"); - Reaction.Import.process(Assets.getText("data/Shops.json"), ["name"], Reaction.Import.shop); - // ensure Shops are loaded first. - Reaction.Import.flush(Shops); - } catch (error) { - Logger.error(error, "Bypassing loading Shop default data"); - } + // Since import overwrites, only import Shops when none exist + if (!Reaction.getShopId()) { + try { + Logger.debug("Loading Shop Data"); + Reaction.Import.process(Assets.getText("data/Shops.json"), ["name"], Reaction.Import.shop); + // ensure Shops are loaded first. + Reaction.Import.flush(Shops); + } catch (error) { + Logger.error(error, "Bypassing loading Shop default data"); + } + } - // make sure the default shop has been created before going further - while (!Reaction.getShopId()) { - Logger.debug("Loading default shop, waiting until it's ready before moving on..."); - Meteor._sleepForMs(1000); - } - try { - Logger.debug("Loading Shipping Data"); - Fixture.process(Assets.getText("data/Shipping.json"), ["name"], Reaction.Import.shipping); - } catch (error) { - Logger.error(error, "Bypassing loading Shipping default data."); - } + // make sure the default shop has been created before going further + while (!Reaction.getShopId()) { + Logger.debug("Loading default shop, waiting until it's ready before moving on..."); + Meteor._sleepForMs(1000); + } - try { - Logger.debug("Loading Product Data"); - Fixture.process(Assets.getText("data/Products.json"), ["title"], Reaction.Import.product); - } catch (error) { - Logger.error(error, "Bypassing loading Products default data."); - } + try { + Logger.debug("Loading Shipping Data"); + Fixture.process(Assets.getText("data/Shipping.json"), ["name"], Reaction.Import.shipping); + } catch (error) { + Logger.error(error, "Bypassing loading Shipping default data."); + } + + try { + Logger.debug("Loading Product Data"); + Fixture.process(Assets.getText("data/Products.json"), ["title"], Reaction.Import.product); + } catch (error) { + Logger.error(error, "Bypassing loading Products default data."); + } - try { - Logger.debug("Loading Tag Data"); - Fixture.process(Assets.getText("data/Tags.json"), ["name"], Reaction.Import.tag); - } catch (error) { - Logger.error(error, "Bypassing loading Tags default data."); + try { + Logger.debug("Loading Tag Data"); + Fixture.process(Assets.getText("data/Tags.json"), ["name"], Reaction.Import.tag); + } catch (error) { + Logger.error(error, "Bypassing loading Tags default data."); + } + // + // these will flush and import with the rest of the imports from core init. + // but Bulk.find.upsert() = false + // + Fixture.flush(); } - // - // these will flush and import with the rest of the imports from core init. - // but Bulk.find.upsert() = false - // - Fixture.flush(); }