diff --git a/frontend/pages/projects/_id/labels/index.vue b/frontend/pages/projects/_id/labels/index.vue index 238b3783..ab5617a3 100644 --- a/frontend/pages/projects/_id/labels/index.vue +++ b/frontend/pages/projects/_id/labels/index.vue @@ -96,7 +96,7 @@ export default Vue.extend({ } else { return ['span', 'relation'][this.tab!] } - } else if (this.project.projectType.endsWith('Classification')) { + } else if (this.project.canDefineCategory) { return 'category' } else { return 'span' @@ -113,7 +113,7 @@ export default Vue.extend({ } else { return [this.$services.spanType, this.$services.relationType][this.tab!] } - } else if (this.project.projectType.endsWith('Classification')) { + } else if (this.project.canDefineCategory) { return this.$services.categoryType } else { return this.$services.spanType diff --git a/frontend/services/application/project/projectData.ts b/frontend/services/application/project/projectData.ts index 908759b3..a752edcb 100644 --- a/frontend/services/application/project/projectData.ts +++ b/frontend/services/application/project/projectData.ts @@ -14,6 +14,7 @@ export class ProjectDTO { tags: Object[] | string[] canDefineLabel: boolean canDefineRelation: boolean + canDefineCategory: boolean isTextProject: boolean allowOverlapping: boolean graphemeMode: boolean @@ -36,6 +37,7 @@ export class ProjectDTO { this.tags = item.tags this.canDefineLabel = item.canDefineLabel this.canDefineRelation = item.canDefineRelation + this.canDefineCategory = item.canDefineCategory this.isTextProject = item.isTextProject this.allowOverlapping = item.allowOverlapping this.graphemeMode = item.graphemeMode