locary-ph / merchant-dashboard

Merchant dashboard for Locary.
https://dashboard.locary.ph
MIT License
0 stars 0 forks source link

Updating order status doesn't update the original data for the component #133

Closed bojonvi closed 3 years ago

bojonvi commented 3 years ago

So each Order Details component has its own data that comes from the Order List. This data is used as a reference to display the details of a specific order transaction. Thus, the data that would be displayed in the Order Details component will be based on the data that was passed from the Order List. Due to this kind of data structure, it has become a bug for the Order Details component to implement the order status update. It's true that the function is working properly and it does update the database for that order. However, the problem is that it doesn't update the original data that was passed to the Order Details component. So, if the user will refresh the component after updating the order status, it will still display the outdated data that comes from the Order List instead of the new data from the server.

Possible fix: