vuestorefront-community / vendure

Vue Storefront 2 integration for Vendure
https://docs.vuestorefront.io/vendure/
MIT License
72 stars 51 forks source link

expose getCode on order setters #198

Closed macrozone closed 2 years ago

macrozone commented 2 years ago

Description

expose getCode on order setters.

An order's code in vendure is the orders unique reference that can be communicated with the customer.

Currently, only the (numeric) ID is shown in the frontend. However the id should not be used externally as it is autoincremented and therefore can be guessed. In communication with the customer (e.g. in customer support), you should always use the order's code, not its id.

This PR only exposes the getter, i did not do any adjustment on the frontend. However, it would be good to change the Order Id on the order history to the code.

Related Issue

https://github.com/vuestorefront-community/vendure/issues/203

Motivation and Context

See above

How Has This Been Tested?

tried it in a project, added test

Screenshots (if appropriate):

Types of changes

Checklist:

Baroshem commented 2 years ago

Thanks @macrozone

Would you mind creating an issue first and then updating the changelog as well?

Also, could you update the frontend so that this feature will be fully implemented? :)

macrozone commented 2 years ago

Thanks @macrozone

Would you mind creating an issue first and then updating the changelog as well?

ok done. why is an issue needed?

For changelog i recommend to adopt something like semantic release that creates changelogs based on (semantic) commits.

Also, could you update the frontend so that this feature will be fully implemented? :)

Done. Be aware that this might be a breaking change for users.

Baroshem commented 2 years ago

Thanks @macrozone Would you mind creating an issue first and then updating the changelog as well?

ok done. why is an issue needed?

For changelog i recommend to adopt something like semantic release that creates changelogs based on (semantic) commits.

Also, could you update the frontend so that this feature will be fully implemented? :)

Done. Be aware that this might be a breaking change for users.

It wont be a breaking change as you are introducing a new getter, new unit test and a change in the frontend code that is not shipped to the final users. For changes in theme, the users have to adjust their projects by themselves.

Issues are used to keep track of changes. I know that there are different ways to do that but in VSF we are using this approach. If you add an issue and changelog entry, this PR would be ready to be merged :)