howdykolache / admin

0 stars 0 forks source link

Admin order creation page - allow multiple orders for same client in same day #62

Closed ezl closed 2 years ago

ezl commented 2 years ago

I think we discussed this previously, and I previously said we should assume only one per day.

This has now been proven incorrect - we have some users who will place more than one order per day (Chicago Food Planet)

HOW I THINK THIS WORKS NOW

If an order is attempted to be added via the Admin Order Creation page for a case where (A) the date (B) the client match an order that already exists (C) that order was creaetd via the admin order creation page

then instead of creating an order, it will:

It is important for Eric to understand if this is true - please confirm / qualify

HOW I WANT IT TO WORK

(A) Instead, now, if a user enters the same order again, just allow a duplicate to be created. No "magic". Just allow the user to create duplicates. (B) Bonus, if it's relatively easy (less than 2 hours of work for you) - IF the user selects the same CLIENT in the dropdown box, just display a warning (can be simple javascript alert with alert("Warning: client ___ already has an order on this day.")). If we press ok and proceed, then that's on us.