coopcycle / coopcycle-web

Logistics & marketplace platform. Only for worker-owned business.
https://coopcycle.org
Other
571 stars 130 forks source link

Add a page to display all Recurrence rules #4718

Closed vladimir-8 closed 1 week ago

vladimir-8 commented 4 weeks ago

Screenshot 2024-10-31 at 16 04 00

includes:

Atala commented 2 weeks ago

I made it crash :

image

Atala commented 2 weeks ago

it does seem to me that the dropdown list to select a store when creating a recurrent rule in the dispatch does not display all the stores. is that expected? i can look deeper

vladimir-8 commented 2 weeks ago

in french breadcrumb it is still abonnements ("subscription")

Are you sure it was the right branch? Looks good on my machine:

Screenshot 2024-11-07 at 11 47 56

vladimir-8 commented 2 weeks ago

i am not 100% convinced to redirect the user to the "deliveries pages" when you have succesfully edited a subscription (you dont have feedback on what happenned), maybe redirect to the subscription list page or just add a flash message? (so the user knows the change has been taken into account)

In a normal flow, it goes to the previous page (the list of recurrence rules, if you opened a recurrence rule from there), see RedirectToRefererType. It goes to the "deliveries pages" only as a fallback it it does not know what the previous page is. It happens if you refresh a page, for example.

vladimir-8 commented 2 weeks ago

actually i thought the recurrence rules list page would be in the sidebar on "http://localhost/admin/deliveries" not on the store level. i guess admin users would like to see all the subscriptions for all his store. what do you think?

Yeah, I discussed it with Paul and we decided to put it on a store level for now. Maybe, at some point, we will make a global one as well

vladimir-8 commented 2 weeks ago

it does seem to me that the dropdown list to select a store when creating a recurrent rule in the dispatch does not display all the stores. is that expected? i can look deeper

For me, it displays everything. I'd say don't spend time on it, as we want to migrate away from that flow

vladimir-8 commented 2 weeks ago

I made it crash :

go to the dispatch and create a delivery rule with just 1 dropoff
go to recurrence rules list page for the store

It seems you were not running the latest version locally. The code in your stack trace is different from the last commit in this branch.

Now it handles both one pickup or one dropoff:

Screenshot 2024-11-07 at 13 10 40