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

feat: add resolver to get displayStatus from database #5236

Merged

Conversation

kieckhafer
Copy link
Member

@kieckhafer kieckhafer commented Jun 26, 2019

Impact: minor
Type: feature

Issue

Fulfillment group statuses are not translated into a human readable version, they are displayed as a workflow string, such as coreOrderWorkflow/packed

Solution

Add a human readable translation, similar to how it's done with Order Statuses (See #4981)

Breaking changes

none

Testing

  1. Start up reaction, and add the following into the Shops collection:
"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"
        }
    ]
}
  1. Create and order
  2. use the orderByReferenceId query to query the order, and see that displayStatus is available on fulfillment groups.
orderByReferenceId(id: {referenceId}, shopId: {shopId}) {
      _id
      ... {any required fields}
      fulfillmentGroups {
        ... {any required fields}
        displayStatus(language: "en")
      }
}

@kieckhafer kieckhafer requested a review from willopez June 26, 2019 05:49
Signed-off-by: Erik Kieckhafer <[email protected]>
@kieckhafer
Copy link
Member Author

@willopez I believe the snyk issues have been fixed in another PR.

@willopez
Copy link
Member

OK, I'll take a look in the AM.

…feat-kieckhafer-addHumanReadableStatusForFulfillment
Copy link
Member

@willopez willopez left a comment

Choose a reason for hiding this comment

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

LGTM

@willopez willopez merged commit ad08298 into develop Jun 27, 2019
@jeffcorpuz jeffcorpuz mentioned this pull request Jul 2, 2019
@kieckhafer kieckhafer deleted the feat-kieckhafer-addHumanReadableStatusForFulfillment branch July 9, 2019 06:01
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.

2 participants