Browse Source

Fix problems after applying prettier

pull/1839/head
Hironsan 2 years ago
parent
commit
73850b3b66
4 changed files with 15 additions and 15 deletions
  1. 18
      frontend/components/label/FormCreate.vue
  2. 2
      frontend/plugins/services.ts
  3. 6
      frontend/repositories/tasks/textClassification/apiTextClassification.ts
  4. 4
      frontend/services/application/tasks/textClassification/textClassificationData.ts

18
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.'
},

2
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'

6
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<TextClassificationItem> {
export class APITextClassificationRepository extends AnnotationRepository<CategoryItem> {
constructor() {
super(TextClassificationItem)
super(CategoryItem)
}
protected baseUrl(projectId: string, docId: number): string {

4
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

Loading…
Cancel
Save