Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kieckhafer
Copy link
Member

@kieckhafer kieckhafer commented May 1, 2019

Resolves #5157
Impact: major
Type: refactor

All of the UI work, queries, mutations and tests have already been reviewed and merged in the PR's listed below. Therefore an in-depth test of all NEW functionality / code here is not the goal of this PR. The goal of this particular PR is to make this new Orders UI the official Orders UI (seen in this Routing change), and to remove the old UI, meteor methods, and related files.

Changes already implemented:

Issue

Operator UI Orders panel currently

  • uses our old Meteor methods to preform necessary functions, which don't include new mutations to split fulfillment groups and move items between them
  • isn't updated to easily use multiple fulfillment methods, it currently combines all products into a single group

Solution

Update the Orders admin to use GraphQL for all data, instead of the existing Meteor methods. In addition, update the panel to preform actions against multiple fulfillment groups, instead of a single combined Order for all groups.

Breaking changes

Meteor methods will no longer work. All orders functionality is now GQL.

Testing

  • Add orderStatusLabels to the Shops collection shop object. This will provide translations for all the Chip style order status badges in the Orders Fulfillment UI.
"orderStatusLabels": {
    "new" : [ 
        {
            "language" : "en",
            "label" : "Order received"
        }, 
        {
            "language" : "es",
            "label" : "Recibido"
        }
    ],
    "coreOrderWorkflow/processing" : [ 
        {
            "language" : "en",
            "label" : "Order received"
        }, 
        {
            "language" : "es",
            "label" : "Recibido"
        }
    ],
    "coreOrderWorkflow/completed" : [ 
        {
            "language" : "en",
            "label" : "Shipped"
        }, 
        {
            "language" : "es",
            "label" : "Enviado"
        }
    ],
    "coreOrderWorkflow/canceled" : [ 
        {
            "language" : "en",
            "label" : "Canceled"
        }, 
        {
            "language" : "es",
            "label" : "Cancelado"
        }
    ],
    "coreOrderWorkflow/picked" : [ 
        {
            "language" : "en",
            "label" : "Picked"
        }
    ],
    "coreOrderWorkflow/packed" : [ 
        {
            "language" : "en",
            "label" : "packed"
        }
    ],
    "coreOrderWorkflow/shipped" : [ 
        {
            "language" : "en",
            "label" : "shipped"
        }
    ]
}
  • Create orders
  • See that the ProductImage works as it should, as this component was moved out of the Orders package and into Checkout where it's used: 3356ff1
  • See the orders appear correctly in the Orders table
  • See that when you click an order, it goes to the new UI, not the old UI, and the url is just /orders/{order-id}, not /orders-beta/{order-id}
  • Run through any fulfillment scenarios you wish, but as mentioned, these have already been fully tested and merged into the codebase in the above listed PR's.

@kieckhafer kieckhafer changed the title [WIP] refactor: update Reaction Admin Orders panel [BLOCKED] refactor: update Reaction Admin Orders panel Aug 8, 2019
Copy link
Contributor

@aldeed aldeed left a comment

Choose a reason for hiding this comment

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

❤️ all the deletions. Left one comment. Are you sure there aren't some Meteor methods that were only called from the deleted files that could also be deleted from the server?

template: "OrderInvoice",
label: "Invoice",
workflow: "coreOrderShipmentWorkflow",
audience: ["dashboard/orders"]
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like OrderInvoice and some of the others here were also deleted. Maybe most if not all of this can go?

@machikoyasuda
Copy link
Contributor

machikoyasuda commented Aug 12, 2019

Outcome of the design review today:

  • @cassytaylor + @rymorgan OK'd the way the refund portion of the UI diverged from the comps. We need to note in Zeplin that this override has been made, and approved.
  • Catalyst ticket already made: Typography (esp. font size, letter-spacing, line-spacing) needs to be addressed via Catalyst MUI variables. Ticket for this is already made in Catalyst.
  • New Catalyst ticket to come: Make the Tab correctly with Catalyst designs, and use it in the Tag page and the Order Details page.
  • New Catalyst docs ticket to come: Make a new Catalyst ticket to correctly define and document what colors are associated with what order statuses. These statuses are defined in the PR notes.
  • New Reaction ticket needed: Create ticket to redesign the Print Invoice.
  • New Reaction ticket needed: Get the detailed styled right for Order Summary.

Open questions for the future:

  • Should the Order Summary component from the Storefront Component Library include Refunds? It's used in this feature and is currently not showing any refund data. (But will probably be required for future Storefront tickets).

@kieckhafer
Copy link
Member Author

@aldeed removed another batch of files with old meteor methods. I'm not entirely familiar with the layout workflows that are still registered. I think this is ready to go, sans that, maybe we can pair for 15 min and knock that file out before this gets re-reviewed?

@kieckhafer kieckhafer requested a review from aldeed August 20, 2019 21:42
@kieckhafer kieckhafer merged commit d39c071 into develop Aug 21, 2019
@kieckhafer kieckhafer deleted the ref-kieckhafer-ordersUiWithMultipleFulfillmentGroups branch August 21, 2019 20:17
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.

4 participants