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:
There are 2 different opened carriers
Create order and make it ready for carriers
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.
Carrier2: Delete order ID from local storage, because the order is already saved inside.
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
Finish the order. Change "Carrier Work Competition" to enabled. Create another order
Repeat 3 and 4.
Refresh: the Order appearing again and go to local storage again. // Because "Carrier Work Competition " setting is enabled
Carrier1: Click "I'm there and Got it" (that send the order to the next state)
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
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:
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