-
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
[Marketplace] Set order(s) to a specific status #2613
Merged
Merged
Changes from 250 commits
Commits
Show all changes
328 commits
Select commit
Hold shift + click to select a range
ca8c102
more props passed to wrapper
kieckhafer c3467f5
fixes for email table
kieckhafer 7ac944f
update Email table to use ReactTable
kieckhafer 48b0893
email table convert to ReactTable
kieckhafer dd0a77b
Bunyan and Loggly updates (#2425)
jshimko b64ee84
refactor default admin user creation (#2453)
jshimko 72d1ad3
update memory usage in CircleCI build (#2462)
jshimko 18778df
finished implementing design
25e8942
Navbar hover issue (#2451)
rhenshaw56 cea9557
set css property overflow on horizontal to hidden (#2458)
rhenshaw56 1d0fd64
[WIP] 2452 fix on UI icon toolbar (#2460)
rhenshaw56 1a6a8f3
[WIP] 2356 fix on tag menu-sidebar glitch (#2472)
rhenshaw56 d3e7da5
format price string for invoice details
b59263b
update media gallery new / deleted image indicators (#2469)
kieckhafer 2c58cba
Merge branch 'development' into ek-newGriddle
kieckhafer c9a0b28
Remove random regex checks on names. Fixes #2461 (#2471)
brent-hoover 670ee6b
remove older Blaze based launchdock plugin (#2467)
jshimko e87ea72
2459 router range error fix (#2476)
prosf 8166dc1
custom pagination component for React-Table
kieckhafer bcb1fa3
update Avalara to use ReactTable
kieckhafer ee7d9a7
add spacing below tables
kieckhafer e083bb0
Merge branch 'development' into ek-newGriddle
kieckhafer c737ac9
2422 Fix on email invite link leading to blank screen (#2437)
rhenshaw56 c27f70e
Update current user's name on Navbar and profile page when address is…
698ed21
Merge branch 'development' into ek-newGriddle
0b97a00
add invoice actions
3144dc3
Updated dependencies (#2463)
b16eb03
Merge branch 'development' into ek-newGriddle
kieckhafer 9c07755
remove leftover console.logs
kieckhafer df80998
lint fixes
kieckhafer ab14f03
lint fix
kieckhafer 1c36848
query prop validation
kieckhafer 8545717
pagination updates
kieckhafer 3f252fe
Revert minifier to abernix fork (#2486)
jshimko 6bbbef6
componetize pagination
kieckhafer 990574d
Merge branch 'development' into ek-newGriddle
kieckhafer db4e8d2
Release 1.3.0 (#2417)
543ddc0
Fix error when inviting already invited user (#2433)
6c60ea1
Merge branch 'development' of github.com:reactioncommerce/reaction in…
1e11e68
Merge branch 'marketplace' of github.com:reactioncommerce/reaction in…
dc76234
Merge branch 'development' into ek-newGriddle
kieckhafer f1016d9
move emailconfig css to LESS file
kieckhafer b2460bd
Updated timeout time. (#2492)
rymorgan e47dfd9
style updates for sortableTable
kieckhafer f04c46f
update translations
kieckhafer a55229a
custom full-table filter for ReactTable
kieckhafer 075defe
Fixed product images not displaying on order completed page (#2490)
5a91d9f
custom full table filter
kieckhafer b089d03
Merge branch 'development' into ek-newGriddle
kieckhafer 430815a
new match-sorter package for custom filter
kieckhafer f7e1c4c
Fix hard refresh on clicking tag link on product detail page (#2489)
34162e0
Remove redundant risul:moment-timezone (#2491)
6e05c46
Merge 1.3.0 master into development
809bbb9
add translations for default table text
kieckhafer 921e423
translations
kieckhafer e0cf90b
Merge branch 'development' into ek-newGriddle
kieckhafer 751d7df
kill translations for the moment, something is acting up
kieckhafer ea9a4f1
add catch for error when no data is available
kieckhafer 6d3dc05
List view toggle
joykare 0481dfc
Merge branch 'development' into joykare-orders-listview-2323
joykare dd98eee
Merge branch 'ek-newGriddle' into joykare-orders-listview-2323
joykare 9ba62c8
Use sortableTable to display list
joykare bef35d9
finish order line item popover functionality
a6c941b
Merge branch 'marketplace' of github.com:reactioncommerce/reaction in…
907f54f
First styling iteration
joykare 7dc1840
Add table classname
joykare 50c75f1
allow only users with the orders and dashboard/orders permission to v…
588c794
Merge branch 'michael-marketplace-line-items-refund-2377' into joykar…
joykare af54492
Merge with marketplace
joykare e8da685
Styling second iteration
joykare d0babc2
Rewrite orders.js into React; Remve filters on orders
f34865b
Add onto checking capabilty
joykare 89c24aa
Merge branch 'joykare-orders-listview-2323' of https://github.com/rea…
joykare c8a1eca
Buyah
joykare 8722120
Replace span toggles with buttons
joykare 6f3f887
Styling iteration
joykare 82c130b
Toggle bulk order actions bar on checkbox select
ab9f6b2
Select all checkbox
joykare c023440
Change import to match style guide
joykare ff54605
Fix conflicts with base branch
3137366
Handle multiple select of orders (part 1)
9fc7708
Toggle ReactTable header visibility on order(s) select
d1e700c
Handle multiple select of orders (part 2)
b58a840
Handle multiple select of orders: fully working
6595954
Check all
joykare cc482d8
Massive refactor
joykare ac491f8
Fix conflicts with base branch
27c5fef
few style additions
joykare ca2a285
Merge remote-tracking branch 'origin/marketplace' into joykare-orders…
joykare c37eef0
Hide columns on screen size change
joykare 6c83d1a
Checkbox multi select tweak
joykare 5d5569f
Fix conflicts with base branch
207d4ab
Select all orders on 'Check All' even if one was already selected
bbfcaa5
Vertically align bulk actions bar contents
14b86fc
Corrections from review
joykare 5e2c06b
Center align checkbox/avatar with parent check-all box
ae5e284
Center column data
joykare 69d9667
Change checkbox class name
be43f08
Change checkbox class name
8054401
Change checked icon to font-awesome check
f32e595
Merge with remote
c8dc32f
Add className prop to badge component
32e8a06
Allow for selected rows to be styled in React Table
0d56e30
Style selected order rows
4326811
Styling merge with checkboxes
joykare 1c06ab2
Pagination reorder
joykare c430114
Match padding between top and bottom in bulk order actions bar
7e8d495
Toggle, control buttons
joykare 55fe0f9
Remove border from selected orders
72f708e
Add i18n for bulk order actiobs bar elements
3792290
Update badge snapshot to include provided className
3dcfdac
Change sortable bar color
joykare dcc74f3
Toggle buttons within container and pagination margin increse
joykare f4a9e25
Remove old pagination
joykare 86e18ad
Checkboxes add
joykare 25d07b5
Fix collapsable column problem
joykare be42bfa
Center align row data
joykare d36580d
Merge branch 'joykare-orders-listview-2323' into kieha-select-orders-…
ec28de5
Merge branch 'joykare-orders-listview-2323' into kieha-select-orders-…
05cdec9
Bulk order actions bar styling based on new order table styles (part 1)
a306623
Fix row size change
joykare 05916fc
Merge branch 'joykare-orders-listview-2323' into kieha-select-orders-…
62f9109
Bulk order actions bar styling based on new order table styles (part 2)
50c3637
Fix bithound issues
356cb95
Merge remote-tracking branch 'origin/marketplace' into joykare-orders…
joykare dbf2f7d
Add @reactioncommerce/reaction-collections
joykare 6ba33ae
Merge branch 'joykare-orders-listview-2323' into kieha-select-orders-…
f97db7e
Fix bithound issues
9283c39
Remove line items code from merged in PR
joykare e18e14d
Fix minor issues as commented on PR
joykare 42107a3
Use assign as opposed to extend
joykare e252336
Fix button new/prrocessing change
joykare 0198d98
Make button unresizable
joykare 9accb83
Use less files to style table
joykare 425233f
Fix conflicts with base branch
5bbf553
Remove hardcoded selected row background color, give selected row a c…
5a5104f
Refactor code
joykare e00a960
Fix lint issues
joykare 21b3cdb
Fix table moving up and down
joykare 672c007
Fix conflicts with base branch
f18df54
Merge branch 'joykare-orders-listview-2323' into kieha-select-orders-…
59066e8
Modify list component to receive className, change undefined data to …
43d5d74
Bulk order actions button list onClick
01cdc15
Toggle background color and icons on list items click
84e3ab0
Further styling of shipping list
f303673
Remove hardcoded styles in the table
3b9fcf2
remove order actions files not being used anymore(might be reason for…
joykare 3c81615
Prefer this.props over long destructuring statement
6331480
Merge branch 'kieha-select-orders-2325' into kieha-bulk-order-status-…
3b18108
Select Orders from main orders screen (#2549)
3db5597
Merge in main order-list-view branch
ffebdd0
Final styling of shipping list
adefa91
Final styling of shipping list
b4af025
Iteration 1 of order select and set status
ab31de3
First working instance for new Orders detail view
joykare 0edf42b
Refactor code
joykare 5c3deba
Wrap up on styling
joykare 37d07b4
Fix broken bulk order select
joykare 0c77e32
Merge branch 'marketplace' into joykare-orders-listview-2323
joykare c1e0633
Fix header padding
joykare 1e4a12f
Iteration 2 of order select and set status
0a5dcfc
Merge marketplace changes
182cdc5
Merge changes from parent branch; code edits
b8a2e92
Fix toggle of shipping flow list, rename labels
f8cbd95
Merge branch 'marketplace' into joykare-orders-listview-2323
brent-hoover 09f04be
Merge branch 'joykare-orders-listview-2323' into kieha-bulk-order-sta…
6777666
Create back end methods for labeled and picked shipping statuses, ref…
da73d48
Implement skipping flow statuses
b6c224f
Add event to order history showing bulk action state setting
1af4b6b
Remove bulk order bar on orders detail view
joykare 816bd3d
Merge branch 'joykare-orders-listview-2323' into kieha-bulk-order-sta…
0600ce5
Merge branch 'marketplace' into joykare-orders-listview-2323
joykare 7432962
Merge branch 'joykare-orders-listview-2323' into kieha-bulk-order-sta…
cfe7b00
Fix lint error
999231a
Merge branch 'joykare-orders-listview-2323' into kieha-bulk-order-sta…
4d4d336
Fix moving table
98d5dc7
Break down shippingStatus function into smaller functions
aacebe1
Reorder shipping flow
9a8c92f
Fix merge conflicts
8ce785e
Set bulk selected orders to a specific state (iteration 1)
a8b1aa3
Merge branch 'marketplace' into kieha-bulk-order-status-2341
24d4ae5
Remove unnecessary ordersContainer
03e7317
Refactor repeated code into common function that's re-usable
6633579
Remove unnecessary method binding
ed15acd
Set multiple orders to labeled state
df28375
Provide optional shipped param to shipmentShipped method
711a526
Set multiple orders to shipped state
3c05af4
Move bulk actions bar code to it's own component
6c8f08b
Add allowOutsideClick and cancelButtonText as alert options
e15f625
Document and add comments for shipping methods
cb9bfcb
Use reaction color variables over hardcoded colors
d736644
Oops
a5a8901
Delay success modal until all orders' state has been set
fb566c4
Fix interchanged states
5513bba
Merge branch 'marketplace' into kieha-bulk-order-status-2341
5561e57
Translation (part 1)
b456aec
Merge branch 'kieha-bulk-order-status-2341' of https://github.com/rea…
c743187
Correct i18nKeyLabel typo
e270c06
Translation (part 2), extract alerts to common function that's reusable
1f1907e
Merge branch 'marketplace' into kieha-bulk-order-status-2341
8246459
Merge branch 'marketplace' into kieha-bulk-order-status-2341
brent-hoover 6a148fa
Standardise case in translation key
6a1d4d9
Fix typo in comment
b05fd6e
Remove testing of truthiness of order object, prefer 'check' of object
f2c4802
Move shipping string states to constant
263eb22
Remove unneeded call to shop for currency display
97cc49a
Merge branch 'kieha-bulk-order-status-2341' of https://github.com/rea…
2c80e65
Standardise naming of shipping flow steps
333ed7a
Rethink wording of alerts
426d7b3
Merge branch 'marketplace' into kieha-bulk-order-status-2341
2ce2523
Merge branch 'marketplace' into kieha-bulk-order-status-2341
cd81d1d
Use workflow object to store/determine shipping status (part 1)
b649bce
Remove shipping booleans from shipping schema
e08f839
Rewrite shipping status methods to fit use of workflow status (part 1)
cf524d8
Merge branch 'marketplace' into kieha-bulk-order-status-2341
c1bba88
Merge branch 'marketplace' into kieha-bulk-order-status-2341
95d962c
Merge branch 'marketplace' into kieha-bulk-order-status-2341
e729461
Rewrite shipping status methods to fit use of workflow status (part 2)
29ca951
Tests for orders/shipmentPicked and orders/shipmentLabeled; tweak tes…
f7caaed
Import order
dbfd24b
Merge branch 'marketplace' into kieha-bulk-order-status-2341
444405c
Remove unnecessary closing brace
f1f6260
Render spinner while waiting for action on bulk orders
d46245d
UI consistency when selecting bulk actions
7e908b5
Show bottom pagination on bulk orders select
bf46c0c
Merge branch 'marketplace' into kieha-bulk-order-status-2341
a21497b
Implement regression alert
bc9dc81
Merge branch 'kieha-bulk-order-status-2341' of https://github.com/rea…
da20f96
Refine regression alert
d981b9c
Commenting shipping state methods
2cdc1ad
remove deprecated use of number as first argument of Meteor.Error
7239bde
Switch order of shipping flow checks
a7fdb4e
Tweak 'picked' status regression method
39c9348
Merge branch 'marketplace' into kieha-bulk-order-status-2341
dff2ee5
Fix line length
dc73ba1
Rename variable
487b97f
Add back missing 'Processing' translation
79f9034
Fix random opening of status bar
993ca17
Use props as passed down from parent container
e4ce99d
Merge branch 'marketplace' into kieha-bulk-order-status-2341
09917fe
Merge branch 'marketplace' into kieha-bulk-order-status-2341
ea2131b
Turn all avatars to checkboxes on order select
ec80a2d
Add printing step to flow list
6dc056f
Merge branch 'kieha-bulk-order-status-2341' of https://github.com/rea…
2e63b52
Enable Capture button
c76d9d3
Merge branch 'marketplace' into kieha-bulk-order-status-2341
63aa52a
Set loading state of captore button to false on error
ab35062
Rename file names
678321d
Fix error on payment approving
1748247
Fix conflicts with marketplace branch
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
179 changes: 179 additions & 0 deletions
179
imports/plugins/core/orders/client/components/orderBulkActionsBar.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
import React, { Component } from "react"; | ||
import PropTypes from "prop-types"; | ||
import { Translation, Checkbox, Button, Icon, List, ListItem } from "@reactioncommerce/reaction-ui"; | ||
|
||
class OrderBulkActionsBar extends Component { | ||
static propTypes = { | ||
isLoading: PropTypes.object, | ||
multipleSelect: PropTypes.bool, | ||
orders: PropTypes.array, | ||
renderFlowList: PropTypes.bool, | ||
selectAllOrders: PropTypes.func, | ||
selectedItems: PropTypes.array, | ||
setShippingStatus: PropTypes.func, | ||
shipping: PropTypes.object | ||
}; | ||
|
||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
renderFlowList: props.renderFlowList, | ||
shipping: props.shipping, | ||
isLoading: props.isLoading | ||
}; | ||
} | ||
|
||
componentWillReceiveProps = (nextProps) => { | ||
this.setState({ | ||
shipping: nextProps.shipping, | ||
isLoading: nextProps.isLoading, | ||
renderFlowList: nextProps.renderFlowList | ||
}); | ||
} | ||
|
||
toggleShippingFlowList = () => { | ||
this.setState({ | ||
renderFlowList: !this.state.renderFlowList | ||
}); | ||
this.setListItemsToDefault(); | ||
} | ||
|
||
renderLoadingSpinner(status) { | ||
return this.state.isLoading[status] ? | ||
<Icon className="bulk-actions-icons-select" icon="fa fa-spinner fa-pulse" /> | ||
: | ||
<Icon className="bulk-actions-icons-select" icon="fa fa-circle-o"/>; | ||
} | ||
|
||
renderShippingFLowList() { | ||
if (this.state.renderFlowList) { | ||
return ( | ||
<List className="shipping-flow-list"> | ||
<ListItem | ||
label={this.state.shipping.picked ? "Generate Picking Report" : "Picked"} | ||
i18nKeyLabel={this.state.shipping.picked ? "order.generatePickingReport" : "order.picked"} | ||
value="picked" | ||
onClick={this.handleListItemClick} | ||
listItemClassName={this.state.shipping.picked ? "selected" : ""} | ||
> | ||
{this.state.shipping.picked ? | ||
<div> | ||
<Icon className="bulk-actions-icons" icon="fa fa-print"/> | ||
<Icon className="bulk-actions-icons-select" icon="fa fa-check"/> | ||
</div> | ||
: | ||
this.renderLoadingSpinner("picked") | ||
} | ||
</ListItem> | ||
<ListItem | ||
label="Packed" | ||
i18nKeyLabel="order.packed" | ||
value="packed" | ||
onClick={this.handleListItemClick} | ||
listItemClassName={this.state.shipping.packed ? "selected" : ""} | ||
> | ||
{this.state.shipping.packed ? | ||
<Icon className="bulk-actions-icons-select" icon="fa fa-check"/> | ||
: | ||
this.renderLoadingSpinner("packed") | ||
} | ||
</ListItem> | ||
<ListItem | ||
label={this.state.shipping.labeled ? "Generate Label" : "Labeled"} | ||
i18nKeyLabel={this.state.shipping.labeled ? "order.generateLabel" : "order.labeled"} | ||
value="labeled" | ||
onClick={this.handleListItemClick} | ||
listItemClassName={this.state.shipping.labeled ? "selected" : ""} | ||
> | ||
{this.state.shipping.labeled ? | ||
<div> | ||
<Icon className="bulk-actions-icons" icon="fa fa-print"/> | ||
<Icon className="bulk-actions-icons-select" icon="fa fa-check"/> | ||
</div> | ||
: | ||
this.renderLoadingSpinner("labeled") | ||
} | ||
</ListItem> | ||
<ListItem | ||
label="Shipped" | ||
i18nKeyLabel="order.shipped" | ||
value="shipped" | ||
onClick={this.handleListItemClick} | ||
listItemClassName={this.state.shipping.shipped ? "selected" : ""} | ||
> | ||
{this.state.shipping.shipped ? | ||
<div> | ||
<Icon className="bulk-actions-icons" icon="fa fa-paper-plane-o" /> | ||
<Icon className="bulk-actions-icons-select" icon="fa fa-check"/> | ||
</div> | ||
: | ||
this.renderLoadingSpinner("shipped") | ||
} | ||
</ListItem> | ||
</List> | ||
); | ||
} | ||
} | ||
|
||
handleListItemClick = (event, value) => { | ||
if (this.props.setShippingStatus) { | ||
this.props.setShippingStatus(value, this.props.selectedItems); | ||
} | ||
} | ||
|
||
setListItemsToDefault() { | ||
if (this.state.renderFlowList === false) { | ||
this.setState({ | ||
shipping: { | ||
picked: false, | ||
packed: false, | ||
labeled: false, | ||
shipped: false | ||
} | ||
}); | ||
} | ||
} | ||
|
||
render() { | ||
const { orders, multipleSelect, selectedItems, selectAllOrders } = this.props; | ||
|
||
if (selectedItems.length > 0) { | ||
return ( | ||
<div className="bulk-order-actions-bar"> | ||
<Checkbox | ||
className="checkbox-large orders-checkbox" | ||
checked={selectedItems.length === orders.length || multipleSelect} | ||
name="orders-checkbox" | ||
onChange={() => selectAllOrders(orders, (selectedItems.length === orders.length || multipleSelect))} | ||
/> | ||
<Translation | ||
className="selected-orders" | ||
defaultValue={`${selectedItems.length} Selected`} | ||
i18nKey={`${selectedItems.length} order.selected`} | ||
/> | ||
<Button | ||
status="success" | ||
bezelStyle="solid" | ||
className="capture-orders-button" | ||
label="Capture" | ||
i18nKeyLabel="order.capture" | ||
/> | ||
<Button | ||
status="default" | ||
bezelStyle="solid" | ||
className="bulk-actions-button" | ||
label="Bulk Actions" | ||
i18nKeyLabel="order.bulkActions" | ||
icon="fa fa-chevron-down" | ||
iconAfter={true} | ||
onClick={this.toggleShippingFlowList} | ||
/> | ||
{this.renderShippingFLowList()} | ||
</div> | ||
); | ||
} | ||
return null; | ||
} | ||
} | ||
|
||
export default OrderBulkActionsBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
How does this work if there is a shipping workflow that has additional or fewer steps?