diff --git a/frontend/src/app/core/services/file-transformer/file-transformer.http.service.ts b/frontend/src/app/core/services/file-transformer/file-transformer.http.service.ts index 0c6f1a3c6..bcbd719d7 100644 --- a/frontend/src/app/core/services/file-transformer/file-transformer.http.service.ts +++ b/frontend/src/app/core/services/file-transformer/file-transformer.http.service.ts @@ -26,13 +26,11 @@ export class FileTransformerHttpService extends BaseService { } exportPlan(planId: Guid, repositoryId: string, format: string): Observable { - //TODO: implement const url = `${this.apiBase}/export-plan`; return this.http.post(url, {id: planId, repositoryId: repositoryId, format: format}, {responseType: 'blob', observe: 'response'}).pipe(catchError((error: any) => throwError(error))); } exportDescription(id: Guid, repositoryId: string, format: string): Observable { - //TODO: implement const url = `${this.apiBase}/export-description`; return this.http.post(url, {id: id, repositoryId: repositoryId, format: format}, {responseType: 'blob', observe: 'response'}).pipe(catchError((error: any) => throwError(error))); } diff --git a/frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.ts b/frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.ts index 9e204735f..a860836f1 100644 --- a/frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.ts +++ b/frontend/src/app/ui/admin/description-template/editor/components/section-fieldset/description-template-editor-section-fieldset.component.ts @@ -138,8 +138,7 @@ export class DescriptionTemplateEditorSectionFieldSetComponent implements OnInit this._selectedFieldSetId = this.tocentry.id; this.scroller.next(this.tocentry.id); - } else {//scroll on top - // this._scrollOnTop(); + } else { this.scroller.next(null); } } diff --git a/frontend/src/app/ui/admin/language/listing/language-listing.component.ts b/frontend/src/app/ui/admin/language/listing/language-listing.component.ts index 250beb84d..2b819039c 100644 --- a/frontend/src/app/ui/admin/language/listing/language-listing.component.ts +++ b/frontend/src/app/ui/admin/language/listing/language-listing.component.ts @@ -33,7 +33,6 @@ export class LanguageListingComponent extends BaseListingComponent; @ViewChild('actions', { static: true }) actions?: TemplateRef; @ViewChild(HybridListingComponent, { static: true }) hybridListingComponent: HybridListingComponent; diff --git a/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.ts b/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.ts index 282a37c0d..3195c4a97 100644 --- a/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.ts +++ b/frontend/src/app/ui/admin/prefilling-source/listing/prefilling-source-listing.component.ts @@ -33,7 +33,6 @@ export class PrefillingSourceListingComponent extends BaseListingComponent; @ViewChild('actions', { static: true }) actions?: TemplateRef; @ViewChild(HybridListingComponent, { static: true }) hybridListingComponent: HybridListingComponent; diff --git a/frontend/src/app/ui/admin/reference-type/listing/reference-type-listing.component.ts b/frontend/src/app/ui/admin/reference-type/listing/reference-type-listing.component.ts index b76619c73..da50ea322 100644 --- a/frontend/src/app/ui/admin/reference-type/listing/reference-type-listing.component.ts +++ b/frontend/src/app/ui/admin/reference-type/listing/reference-type-listing.component.ts @@ -32,9 +32,7 @@ export class ReferenceTypeListingComponent extends BaseListingComponent; @ViewChild('actions', { static: true }) actions?: TemplateRef; @ViewChild(HybridListingComponent, { static: true }) hybridListingComponent: HybridListingComponent; diff --git a/frontend/src/app/ui/admin/tenant/listing/tenant-listing.component.ts b/frontend/src/app/ui/admin/tenant/listing/tenant-listing.component.ts index 1a1e48f77..e0e03b55b 100644 --- a/frontend/src/app/ui/admin/tenant/listing/tenant-listing.component.ts +++ b/frontend/src/app/ui/admin/tenant/listing/tenant-listing.component.ts @@ -33,7 +33,6 @@ export class TenantListingComponent extends BaseListingComponent; @ViewChild('actions', { static: true }) actions?: TemplateRef; @ViewChild(HybridListingComponent, { static: true }) hybridListingComponent: HybridListingComponent; diff --git a/frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.ts b/frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.ts index 027d0b183..52ae223c2 100644 --- a/frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.ts +++ b/frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.ts @@ -113,7 +113,6 @@ export class AnnotationDialogComponent extends BaseComponent { } replyThread(threadId: Guid) { - // if (!this.threadReplyTexts[threadId.toString()] || this.threadReplyTexts[threadId.toString()].length === 0) { return; } this.formService.removeAllBackEndErrors(this.threadReplyTextsFG[threadId.toString()]); this.formService.touchAllFormFields(this.threadReplyTextsFG[threadId.toString()]); if (!this.isFormValid(this.threadReplyTextsFG[threadId.toString()])) { @@ -178,7 +177,6 @@ export class AnnotationDialogComponent extends BaseComponent { this.resetFormGroup(); this.comments = data.items.sort((a1, a2) => new Date(a2.timeStamp).getTime() - new Date(a1.timeStamp).getTime()); this.comments.forEach(element => { - // this.threadReplyTextsFG.addControl(element.id.toString(), new FormControl(null)); this.threadReplyTextsFG[element.threadId.toString()] = this.formBuilder.group({ replyText: new FormControl(null, [Validators.required]) }); this.annotationsPerThread[element.threadId.toString()] = data.items.filter(x => x.threadId === element.threadId && x.id !== element.id).sort((a1, a2) => new Date(a1.timeStamp).getTime() - new Date(a2.timeStamp).getTime()); this.parentAnnotationsPerThread[element.threadId.toString()] = data.items.filter(x => x.threadId === element.threadId && x.id === element.id)[0]; @@ -257,11 +255,6 @@ export class AnnotationDialogComponent extends BaseComponent { this.dialogRef.close(this.changesMade); } - startWizard() { // not used - this.router.navigate([this.routerUtils.generateUrl('/plans/new')]); - this.close(); - } - showReplies(threadId: string): void { this.showRepliesPerThread[threadId] = true; } diff --git a/frontend/src/app/ui/auth/login/login.routing.ts b/frontend/src/app/ui/auth/login/login.routing.ts index ef810dd29..05ca35964 100644 --- a/frontend/src/app/ui/auth/login/login.routing.ts +++ b/frontend/src/app/ui/auth/login/login.routing.ts @@ -5,7 +5,6 @@ import { MergeEmailConfirmation } from './merge-email-confirmation/merge-email-c import { UnlinkEmailConfirmation } from './unlink-email-confirmation/unlink-email-confirmation.component'; import { AuthGuard } from '@app/core/auth-guard.service'; import { UserInviteConfirmation } from './user-invite-confirmation/user-invite-confirmation.component'; -// import { PostLoginComponent } from './post-login/post-login.component'; const routes: Routes = [ { path: '', component: LoginComponent }, @@ -14,10 +13,6 @@ const routes: Routes = [ component: MergeEmailConfirmation, canActivate: [AuthGuard] }, - // { - // path: 'post', - // component: PostLoginComponent - // }, { path: 'unlink/confirmation/:token', component: UnlinkEmailConfirmation }, { path: 'invitation/confirmation/:token', component: UserInviteConfirmation }, diff --git a/frontend/src/app/ui/auth/logout/logout.component.ts b/frontend/src/app/ui/auth/logout/logout.component.ts index 483613234..02cc0fb4d 100644 --- a/frontend/src/app/ui/auth/logout/logout.component.ts +++ b/frontend/src/app/ui/auth/logout/logout.component.ts @@ -16,7 +16,6 @@ export class LogoutComponent implements OnInit { this.authService.clear(); this.keycloak.logout(location.origin).then(() => { localStorage.clear(); - // this.router.navigate(['./'], { replaceUrl: true }); }); } } diff --git a/frontend/src/app/ui/description/description-copy-dialog/description-copy-dialog.component.ts b/frontend/src/app/ui/description/description-copy-dialog/description-copy-dialog.component.ts index 0e81ada00..dd9b5d597 100644 --- a/frontend/src/app/ui/description/description-copy-dialog/description-copy-dialog.component.ts +++ b/frontend/src/app/ui/description/description-copy-dialog/description-copy-dialog.component.ts @@ -31,7 +31,7 @@ export class DescriptionCopyDialogComponent { sections: PlanBlueprintDefinitionSection[] = []; descriptionDescriptionTemplateLabel: String; - planAutoCompleteConfiguration: SingleAutoCompleteConfiguration = { //TODO: add filter to only get plans that have connection with the same Description Template group. + planAutoCompleteConfiguration: SingleAutoCompleteConfiguration = { initialItems: (data?: any) => this.planService.query(this.buildPlanLookup(null,null,null, this.planDescriptionTemplateLookup)).pipe(map(x => x.items)), filterFn: (searchQuery: string, data?: any) => this.planService.query(this.buildPlanLookup(searchQuery, null, null, this.planDescriptionTemplateLookup)).pipe(map(x => x.items)), getSelectedItem: (selectedItem: any) => this.planService.query(this.buildPlanLookup(null, null, [selectedItem])).pipe(map(x => x.items[0])), diff --git a/frontend/src/app/ui/description/editor/description-editor.component.ts b/frontend/src/app/ui/description/editor/description-editor.component.ts index 319eaf744..3700ef61a 100644 --- a/frontend/src/app/ui/description/editor/description-editor.component.ts +++ b/frontend/src/app/ui/description/editor/description-editor.component.ts @@ -501,7 +501,6 @@ export class DescriptionEditorComponent extends BaseEditor { if (key === 'required') { - // errors.push(this.language.instant(name + ": " + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.REQUIRED'))); if (name == 'label') errors.push(this.language.instant(this.language.instant('DESCRIPTION-EDITOR.BASE-INFO.FIELDS.TITLE') + ": " + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.REQUIRED'))); else if (name == 'descriptionTemplateId') errors.push(this.language.instant(this.language.instant('DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION-TEMPLATE') + ": " + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.REQUIRED'))); } @@ -539,7 +538,7 @@ export class DescriptionEditorComponent extends BaseEditor this.getNestedSectionIdsByField(subsection, fieldSetId)) if (subNestedSectionIds.length > 0) return [section.id, ...subNestedSectionIds]; - // return [section.id, ...section.sections.flatMap((subsection: DescriptionTemplateSection) => this.getNestedSectionIdsByField(subsection, fieldSetId))]; } else if (section.fieldSets.find(fieldSet => fieldSet.id == fieldSetId)) return [section.id]; diff --git a/frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.ts b/frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.ts index 29f0dcd41..bee984270 100644 --- a/frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.ts +++ b/frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.ts @@ -241,7 +241,7 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn let messages: string[] = []; if (this.filesToUpload.length == 0) { - messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.NO-FILES-SELECTED')); // fix + messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.NO-FILES-SELECTED')); return; } else { let fileToUpload = this.filesToUpload[0]; @@ -253,9 +253,9 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn this.upload(); } else { this.filesToUpload = null; - messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.LARGE-FILE-OR-UNACCEPTED-TYPE')); // fix - messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-UPLOAD-MAX-FILE-SIZE', { 'maxfilesize': data.maxFileSizeInMB })); // fix FIELD-UPLOAD-MAX-FILE-SIZE - messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.ACCEPTED-FILE-TRANSFOMER') + data.types.map(type => type.value).join(", ")); // fix + messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.LARGE-FILE-OR-UNACCEPTED-TYPE')); + messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-UPLOAD-MAX-FILE-SIZE', { 'maxfilesize': data.maxFileSizeInMB })); + messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.ACCEPTED-FILE-TRANSFOMER') + data.types.map(type => type.value).join(", ")); } if (messages && messages.length > 0) { diff --git a/frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.ts b/frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.ts index bbbe82951..e2b43f9e3 100644 --- a/frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.ts +++ b/frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.ts @@ -27,10 +27,6 @@ export class DescriptionFormSectionComponent extends BaseComponent implements On @Input() path: string; @Input() descriptionId: Guid; @Input() planUsers: PlanUser[] = []; - - - // @Input() descriptionTemplateId: String; - // @Input() form: UntypedFormGroup; @Input() tocentry: ToCEntry; @Input() pathName: string; @Input() linkToScroll: LinkToScroll; diff --git a/frontend/src/app/ui/description/listing/description-listing.routing.ts b/frontend/src/app/ui/description/listing/description-listing.routing.ts index 5df456f55..d998841fd 100644 --- a/frontend/src/app/ui/description/listing/description-listing.routing.ts +++ b/frontend/src/app/ui/description/listing/description-listing.routing.ts @@ -7,7 +7,6 @@ const routes: Routes = [ { path: '', component: DescriptionListingComponent, - // canActivate: [AuthGuard], data: { breadcrumb: true }, diff --git a/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.ts b/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.ts index f64415366..23d72ef42 100644 --- a/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.ts +++ b/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.ts @@ -134,8 +134,6 @@ export class DescriptionListingItemComponent extends BaseComponent implements On openShareDialog() { // TODO: This is a shared component. Put it in a seperate module. const dialogRef = this.dialog.open(PlanInvitationDialogComponent, { - // height: '250px', - // width: '700px', autoFocus: false, restoreFocus: false, data: { diff --git a/frontend/src/app/ui/plan/listing/plan-listing.routing.ts b/frontend/src/app/ui/plan/listing/plan-listing.routing.ts index 937f41a25..41c38e15d 100644 --- a/frontend/src/app/ui/plan/listing/plan-listing.routing.ts +++ b/frontend/src/app/ui/plan/listing/plan-listing.routing.ts @@ -6,7 +6,6 @@ const routes: Routes = [ { path: '', component: PlanListingComponent, - // canActivate: [AuthGuard], data: { breadcrumb: true },