Merge pull request #8954 from aignatov-bio/ai-sci-12472-fix-tag-modal-validation

Fix tags modal new tag validation [SCI-12472]
This commit is contained in:
aignatov-bio 2025-10-16 14:37:23 +02:00 committed by GitHub
commit 47d5f21f02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,7 +127,11 @@ export default {
},
computed: {
validNewTag() {
return this.newTag.name.trim() !== '' && !this.allTags.find(t => t.name.toLowerCase() === this.newTag.name.trim().toLowerCase());
return this.newTag.name.trim() !== '' &&
!this.allTags.find(t =>
t.name.toLowerCase() === this.newTag.name.trim().toLowerCase() &&
t.color === this.newTag.color
);
},
tagsManagmentUrl() {
return users_settings_team_tags_path({ team_id: this.teamId });