Ramin-RX7 / CafeMenu

Café management website with custom dashboard panel for staff
MIT License
2 stars 4 forks source link

Add a new relation between staff and `Order` models #140

Closed Ramin-RX7 closed 1 year ago

Ramin-RX7 commented 1 year ago

When staff approve an order, the order has to be owned by the staff (means anything related to that order has to be done by them.

This means each order must have a nullable field named responsible_staff which is linked to User model. When the approve button is clicked on an order in the staff dashboard, the approve method in the model has to take the current staff and set the responsible_staff field as it.

Also add a new button in edit order page where a staff can own an order. Also the current responsible staff of the order has to be shown in the edit order page.