diff --git a/projects/laji/src/app/+observation/annotations/annotation-item/annotation-item.component.ts b/projects/laji/src/app/+observation/annotations/annotation-item/annotation-item.component.ts index f1b9a6a9b..797bca89e 100644 --- a/projects/laji/src/app/+observation/annotations/annotation-item/annotation-item.component.ts +++ b/projects/laji/src/app/+observation/annotations/annotation-item/annotation-item.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit, Input } from '@angular/core'; -import { AnnotationTag } from '../../../shared/model/AnnotationTag'; +import { components } from 'projects/laji-api-client-b/generated/api.d'; +type AnnotationTag = components['schemas']['tag']; @Component({ selector: 'laji-annotation-item', diff --git a/projects/laji/src/app/+observation/annotations/annotations-list/annotations-list.component.ts b/projects/laji/src/app/+observation/annotations/annotations-list/annotations-list.component.ts index 6bf7398c8..40016c857 100644 --- a/projects/laji/src/app/+observation/annotations/annotations-list/annotations-list.component.ts +++ b/projects/laji/src/app/+observation/annotations/annotations-list/annotations-list.component.ts @@ -2,8 +2,9 @@ import { Component, Input, OnInit } from '@angular/core'; import { PagedResult } from '../../../shared/model/PagedResult'; import {TranslateService} from '@ngx-translate/core'; import { DocumentViewerFacade } from '../../../shared-modules/document-viewer/document-viewer.facade'; -import { AnnotationTag } from '../../../shared/model/AnnotationTag'; +import { components } from 'projects/laji-api-client-b/generated/api.d'; +type AnnotationTag = components['schemas']['tag']; @Component({ selector: 'laji-annotations-list', diff --git a/projects/laji/src/app/+observation/annotations/annotations.component.ts b/projects/laji/src/app/+observation/annotations/annotations.component.ts index 7663ecaf8..73c1b1a15 100644 --- a/projects/laji/src/app/+observation/annotations/annotations.component.ts +++ b/projects/laji/src/app/+observation/annotations/annotations.component.ts @@ -6,8 +6,10 @@ import { TranslateService } from '@ngx-translate/core'; import { WarehouseApi } from '../../shared/api/WarehouseApi'; import { PagedResult } from '../../shared/model/PagedResult'; import { AnnotationService } from '../../shared-modules/document-viewer/service/annotation.service'; -import { AnnotationTag } from '../../shared/model/AnnotationTag'; import { DeleteOwnDocumentService } from '../../shared/service/delete-own-document.service'; +import { components } from 'projects/laji-api-client-b/generated/api.d'; + +type AnnotationTag = components['schemas']['tag']; @Component({ selector: 'laji-annotations', @@ -51,13 +53,12 @@ export class AnnotationsComponent implements OnInit, OnChanges, OnDestroy { private translations: TranslateService, private cd: ChangeDetectorRef, private annotationService: AnnotationService, - private translate: TranslateService, private deleteOwnDocument: DeleteOwnDocumentService ) { } ngOnInit() { this.lang = this.translations.currentLang; - this.annotationTags$ = this.annotationService.getAllTags(this.lang); + this.annotationTags$ = this.annotationService.getAllTags(); this.subscriptionDeleteOwnDocument = this.deleteOwnDocument.childEventListner().subscribe(info => { this.childEvent = info; diff --git a/projects/laji/src/app/+project-form/form/document-form/document-form.facade.ts b/projects/laji/src/app/+project-form/form/document-form/document-form.facade.ts index 7b3aad165..da22483c6 100644 --- a/projects/laji/src/app/+project-form/form/document-form/document-form.facade.ts +++ b/projects/laji/src/app/+project-form/form/document-form/document-form.facade.ts @@ -19,13 +19,14 @@ import * as moment from 'moment'; import { LocalStorage } from 'ngx-webstorage'; import { Global } from 'projects/laji/src/environments/global'; import { Person } from '../../../shared/model/Person'; -import { Annotation } from '../../../shared/model/Annotation'; -import { LajiApi, LajiApiService } from '../../../shared/service/laji-api.service'; import { Logger } from '../../../shared/logger'; import { LajiFormUtil } from 'projects/laji/src/app/+project-form/form/laji-form/laji-form-util.service'; import equals from 'deep-equal'; import { ProjectFormService } from '../../../shared/service/project-form.service'; import { LajiApiClientBService } from 'projects/laji-api-client-b/src/laji-api-client-b.service'; +import { components } from 'projects/laji-api-client-b/generated/api.d'; + +type Annotation = components['schemas']['annotation']; export enum FormError { notFoundForm = 'notFoundForm', @@ -100,7 +101,6 @@ export class DocumentFormFacade { private formPermissionService: FormPermissionService, private namedPlacesService: NamedPlacesService, private documentStorage: DocumentStorage, - private lajiApi: LajiApiService, private logger: Logger, private projectFormService: ProjectFormService, private api: LajiApiClientBService @@ -508,7 +508,7 @@ export class DocumentFormFacade { return this.getAnnotations(documentID).pipe( shareReplay(), map((annotations) => (annotations || []).reduce