Browse Source

Support label creation for new tasks

pull/1899/head
Hironsan 2 years ago
parent
commit
dbc1771099
2 changed files with 4 additions and 2 deletions
  1. 4
      frontend/pages/projects/_id/labels/index.vue
  2. 2
      frontend/services/application/project/projectData.ts

4
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

2
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

Loading…
Cancel
Save