pet-rescue
pet-rescue copied to clipboard
Default Pet Tasks: tasks should be assigned to a general category, or a species
Currently default pet tasks are assigned to all new pets, regardless of species. This is not as practical as grouping default pet tasks by species. We can also have a general category, that applies to all species.
- On the Pet model, add an enum at 0 index
all
- In the form used to update/create a pet, do not show the
all
option in the select - Add a new column to the DefaultPetTasks table,
species
,string
, default0
(theall
enum) - Add this new attribute to the Default Pet task form as a select showing all enums for pet species
- Update the default pet task index table in the UI to show species column
- Organize default pet tasks in the index alphabetically on species
- Update the default pet task service so that when a new pet is created, it's associated tasks will be the tasks with
all
AND the same species as the Pet. E.g., A new dog will get tasks withall
anddog
species. - Update tests