ever-co / ever-demand

Ever® Demand™ - Open Commerce Platform - https://everdemand.co
https://everdemand.co
GNU Affero General Public License v3.0
1.72k stars 461 forks source link

Feat/#1271 carrier order competition #1289

Closed valiopld closed 4 years ago

valiopld commented 4 years ago

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.


@evereq issue: #1271 https://www.loom.com/share/c067a720d51044c0b52b3106b84adaa1

This code is not responsible for what happens after the order is saved in local storage. It just filters orders depending on which status they are before to be saved in the locale storage. That is why in the video I should clear the local storage/order.

Video's explanation:

  1. There are 2 different opened carriers
  2. Create order and make it ready for carriers
  3. The order is visible for both carriers /and saved in local storage /. Click "take work" with Carrier1 ** I think one of the issues that when one of the carriers click "take work" the status of the order is changing and the view automatically updates in both carriers.
  4. Carrier2: Delete order ID from local storage, because the order is already saved inside.
  5. Refresh: the order in no more visible for Carrier2 // Because "Carrier Work Competition " setting is disabled ** Another issue is that language is changing sometimes unwanted
  6. Finish the order. Change "Carrier Work Competition" to enabled. Create another order
  7. Repeat 3 and 4.
  8. Refresh: the Order appearing again and go to local storage again. // Because "Carrier Work Competition " setting is enabled
  9. Carrier1: Click "I'm there and Got it" (that send the order to the next state)
  10. Check if the Order is visible again - It is not ...

Also once the order is inside the local storage( "3" of the video explanation) It is possible to complete it no matter that another carrier already takes it or finishes it. This is again an issue that is not related to this code. I think it should be fixed by adding additional checks - In which state the order is at the moment of clicking the button "take work" .. per example