Clean-up Order Cycle Index for readability and faster loading

the Order Cycles index page is becoming unruly and takes a very long time to load. Couple of changes to clean it up and make it more manageable (especially as Super-Admin)

  • Do not load Order Cycles that closed more than a month a go (so a lot of the grey ones should disappear) . . continue to load all currently open (green) and scheduled future (yellow)
  • Create a ‘Load All’ button at the top of the page, next to New Order

  • remove the Suppliers column
  • create a soft delete for Order Cycles (that removes them). Only available if there are no orders through that OC

  • remove the hover / pop-up over the # variants

This is done.

Regarding the soft delete. The consensus was that we’ll just allow admins to delete order cycles as long as there are not any orders attached to it.

“remove the Suppliers column” - The supplier column hasn’t been removed.

“The consensus was that we’ll just allow admins to delete order cycles as long as there are not any orders attached to it.” - Non SuperAdmin users can also delete OCs that contain no orders.

@Kirsten @klarsen

See test here: Can’t delete Enterprises, Shipping Methods etc
It seems that doesn’t work as long as someone has opened the front end store of the order cycle… because it creates an uncompleted order with a status “cart”…

file this as new/separate bug on github . .

pinging @danielle

Hi @MyriamBoure, @Kirsten, has this been added to GitHub? I couldn’t see it on there, but maybe I didn’t search for the right thing… :smile:

@danielle I’m sorry I’m just reconnecting after a family trip :slight_smile: I create the issue now.

@danielle here it is: https://github.com/openfoodfoundation/openfoodnetwork/issues/768

Thanks @MyriamBoure :smiley: