pet-rescue icon indicating copy to clipboard operation
pet-rescue copied to clipboard

Default Pet Tasks: tasks should be assigned to a general category, or a species

Open kasugaijin opened this issue 9 months ago • 12 comments

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, default 0 (the all 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 with all and dog species.
  • Update tests

kasugaijin avatar May 14 '24 15:05 kasugaijin