diff --git a/frontend/components/label/FormCreate.vue b/frontend/components/label/FormCreate.vue index 6a39b387..5421ee83 100644 --- a/frontend/components/label/FormCreate.vue +++ b/frontend/components/label/FormCreate.vue @@ -117,15 +117,15 @@ export default Vue.extend({ valid: false, rules: { required: (v: string) => !!v || 'Required', - // @ts-ignore - counter: (v: string) => - (v && v.length <= 100) || this.$t('rules.labelNameRules').labelLessThan100Chars, - // @ts-ignore - nameDuplicated: (v: string) => - !this.isUsedName(v) || this.$t('rules.labelNameRules').duplicated, - // @ts-ignore - keyDuplicated: (v: string) => - !this.isUsedSuffixKey(v) || this.$t('rules.keyNameRules').duplicated, + counter: ( + v: string // @ts-ignore + ) => (v && v.length <= 100) || this.$t('rules.labelNameRules').labelLessThan100Chars, + nameDuplicated: ( + v: string // @ts-ignore + ) => !this.isUsedName(v) || this.$t('rules.labelNameRules').duplicated, + keyDuplicated: ( + v: string // @ts-ignore + ) => !this.isUsedSuffixKey(v) || this.$t('rules.keyNameRules').duplicated, validColor: (v: string) => /^#[0-9A-F]{6}$/i.test(v) || 'This string is NOT a valid hex color.' }, diff --git a/frontend/plugins/services.ts b/frontend/plugins/services.ts index 3cc7d247..b320b20a 100644 --- a/frontend/plugins/services.ts +++ b/frontend/plugins/services.ts @@ -33,7 +33,7 @@ import { Seq2seqApplicationService } from '~/services/application/tasks/seq2seq/ import { ConfigApplicationService } from '~/services/application/autoLabeling/configApplicationService' import { TemplateApplicationService } from '~/services/application/autoLabeling/templateApplicationService' import { APITextClassificationRepository } from '~/repositories/tasks/textClassification/apiTextClassification' -import { TextClassificationService } from '~/services/application/tasks/textClassification/TextClassificationApplicationService' +import { TextClassificationService } from '~/services/application/tasks/textClassification/textClassificationApplicationService' import { AuthApplicationService } from '~/services/application/auth/authApplicationService' import { APIDownloadFormatRepository } from '~/repositories/download/apiDownloadFormatRepository' import { APIDownloadRepository } from '~/repositories/download/apiDownloadRepository' diff --git a/frontend/repositories/tasks/textClassification/apiTextClassification.ts b/frontend/repositories/tasks/textClassification/apiTextClassification.ts index ea535798..a920be67 100644 --- a/frontend/repositories/tasks/textClassification/apiTextClassification.ts +++ b/frontend/repositories/tasks/textClassification/apiTextClassification.ts @@ -1,9 +1,9 @@ import { AnnotationRepository } from '@/domain/models/tasks/annotationRepository' -import { TextClassificationItem } from '~/domain/models/tasks/textClassification' +import { CategoryItem } from '~/domain/models/tasks/textClassification' -export class APITextClassificationRepository extends AnnotationRepository { +export class APITextClassificationRepository extends AnnotationRepository { constructor() { - super(TextClassificationItem) + super(CategoryItem) } protected baseUrl(projectId: string, docId: number): string { diff --git a/frontend/services/application/tasks/textClassification/textClassificationData.ts b/frontend/services/application/tasks/textClassification/textClassificationData.ts index ada2edd8..330eaf53 100644 --- a/frontend/services/application/tasks/textClassification/textClassificationData.ts +++ b/frontend/services/application/tasks/textClassification/textClassificationData.ts @@ -1,11 +1,11 @@ -import { TextClassificationItem } from '~/domain/models/tasks/textClassification' +import { CategoryItem } from '~/domain/models/tasks/textClassification' export class TextClassificationDTO { id: number label: number user: number - constructor(item: TextClassificationItem) { + constructor(item: CategoryItem) { this.id = item.id this.label = item.label this.user = item.user