YaleSTC / shifts

Application to easily track shifts, reports, and payforms for employees.
MIT License
23 stars 18 forks source link

Remove ability to delete payform categories (or fix delete action for payform categories) #378

Open derekzhao opened 10 years ago

derekzhao commented 10 years ago

Admins can currently delete payform categories which can potentially cause issues as there may be payform items associated with this deleted category.

Admins should probably only be able to deactivate categories instead of deleting them.

OR if we do want admins to delete categories, the app should go through all existing payform items of that category and ask what category it should be moved to (or automatically move them to the misc category).

dgoerger commented 10 years ago

It's probably safer to remove hard-deletion entirely from anything which can be depended upon by anything else, and just go with deactivation instead. That's the route Reservations took. Reservations even has some recursive deactivation code to deactivate anything which depends on a newly-deactivated model. :)