Bulk Order Management - performance and permission fixes

Continuing the discussion from Bulk Order Management:

Performance

  • [ok] Loads really slowly (e.g. South East Food Hub - 25 seconds) . .

Permissions

  • [ok] Limit options in OC, Hub and Producer drop-downs to User permitted
  • [ok] Producers should only show those which are ‘own’ or have given P-OC to my Hubs
  • [ok] Hubs should only display enterprises that are own or any AND that I manage or have given me P-OC (and in OC’s I’m coordinating)
  • [ok] OCs should only include those I coordinate AND those that include Hubs I own or manage
  • [ok] producer and hub drop-downs in alphabetical order

Filters and search

  • is bringing up lines from cancelled orders (see git issue for screen grabs)
  • [ok] can selection of OC clear the dates?
  • When i select an oc and dates are wrong it just shows no products
  • after that, even when i select an OC that fits those dates it doesn’t return any results
  • [ok] seems to be that Hub and OC filters don’t trigger reload
  • If I have an OC selected, can the Producer and Hub lists only offer me relevant enterprises (e.g. in that OC)

New features

  • when i have a product that has Unit (items) and I have integer levels in the variants, it should be able to sum them (whether shared resource or not)

just found another issue. Changed dates and then filtered by clicking on a product name, then the list updated to include a whole bunch of line items that aren’t within the date range

logged in as test@nbc

when we tackle this, think I need to sit with dev and go through it so we can clearly work out what we want to do with it

can’t replicate this now . .

@oeoeaio - here are updated notes re. bulk order management