All too cumbersome, stupor.
And you know why? Reason number one - goat variable names, object properties, etc. for Example, if your groups contain projects, and would call the appropriate property projects, not arr. Projects contain tasks so their list is called tasks, and not arr. And so you have two different arr - and no one outright will not say what it is. Already enough to get confused.
Selected group/project instead of indexes it is better to keep a reference to the object itself, in case the project his own, and to pass into the component - so it will be available a list of the existing problems and your problem with their conclusion will be solved by itself.
When adding a new task grind their list - why?
Slightly tweaked your code, like here
. It looks like what you wanted?