coopcycle-web icon indicating copy to clipboard operation
coopcycle-web copied to clipboard

Do not show tasks in the dashboard until order is accepted

Open alexsegura opened this issue 4 years ago • 1 comments

Currently, when the "Create orders" setting is enabled on a store, we create an order (containing the price), and we also create a delivery. This results in tasks being displayed on the dashboard, while the order has not been accepted yet.

To respect the workflow, tasks should not show up until the order has been accepted.

Ideally, no data should land in the delivery and task tables until the order has been accepted (see the delivery-product branch for storing delivery data in the product variant).

BUT the problem is that in the back office, we display a list of deliveries (the data contained in the delivery table). So if we don't create a delivery, store owners won't see anything in their back office, until the order has been accepted. We could say them that the delivery will appear once the order has been accepted, but this would be a breaking change in the current workflow.

A simple "hack" would be to create the tasks as "cancelled" (so that they don't appear in the dashboard), and "restore" them when the order is accepted. This is still not 100% satisfying, but would avoid problems (tasks being scheduled while order not accepted yet)

In any case, storing the delivery data at the variant level is a good idea, to keep information.

alexsegura avatar Aug 27 '21 08:08 alexsegura

⚠️ A potential risk is that right now, admins/dispatchers are used to see deliveries appearing directly in the dashboard. Most of them don't care about accepting orders, they assign the tasks right away. If tasks don't appear directly in the dashboard, we could miss some deliveries.

Maybe we need #425 first?

alexsegura avatar Feb 16 '22 15:02 alexsegura

I think we may be trying to force a user flow here that isn´t necessary, mostly because many of these orders come in with significant lead time... We should discuss the UX generally

Paul-Eraman-CoopCycle avatar Apr 27 '23 16:04 Paul-Eraman-CoopCycle