From dfd2f3eeffea9fb99a0f6d85522edd3164c2cd55 Mon Sep 17 00:00:00 2001 From: Diamantis Tziotzios Date: Wed, 13 Mar 2024 19:24:01 +0200 Subject: [PATCH] dmp finalizatiion popup --- .../web/src/main/resources/config/deposit.yml | 2 +- .../src/main/resources/config/transformer.yml | 4 +- .../description/description.service.ts | 7 +- .../dmp-finalize-dialog.component.html | 82 ++++++++ .../dmp-finalize-dialog.component.scss | 4 +- .../dmp-finalize-dialog.component.ts | 78 ++++++++ .../dmp-finalize-dialog.module.ts | 15 ++ .../dmp-finalize-dialog.component.html | 188 ------------------ .../dmp-finalize-dialog.component.ts | 113 ----------- .../ui/dmp/overview/dmp-overview.component.ts | 107 +++------- .../ui/dmp/overview/dmp-overview.module.ts | 4 +- .../ui/dmp/user-field/user-field.component.ts | 16 +- .../hybrid-listing.component.html | 4 +- .../user-settings-picker.component.html | 4 +- 14 files changed, 234 insertions(+), 394 deletions(-) create mode 100644 dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.html rename dmp-frontend/src/app/ui/dmp/{editor => }/dmp-finalize-dialog/dmp-finalize-dialog.component.scss (97%) create mode 100644 dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.ts create mode 100644 dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.module.ts delete mode 100644 dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.html delete mode 100644 dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.ts diff --git a/dmp-backend/web/src/main/resources/config/deposit.yml b/dmp-backend/web/src/main/resources/config/deposit.yml index 84b70f957..46cb35c1a 100644 --- a/dmp-backend/web/src/main/resources/config/deposit.yml +++ b/dmp-backend/web/src/main/resources/config/deposit.yml @@ -1,6 +1,6 @@ deposit: sources: - - url: http://localhost:8082 + - url: http://dev04.local.cite.gr:55330/zenodo repositoryId: zenodo pdfTransformerId: docx-file-transformer rdaTransformerId: rda-file-transformer diff --git a/dmp-backend/web/src/main/resources/config/transformer.yml b/dmp-backend/web/src/main/resources/config/transformer.yml index 7cb90d96a..0b7659490 100644 --- a/dmp-backend/web/src/main/resources/config/transformer.yml +++ b/dmp-backend/web/src/main/resources/config/transformer.yml @@ -1,13 +1,13 @@ transformer: sources: - - url: http://localhost:8084 + - url: http://dev04.local.cite.gr:55330/file/docx transformerId: docx-file-transformer codes: [ docx, pdf ] issuer-url: ${IDP_ISSUER_URI_TOKEN:} client-id: ${IDP_APIKEY_CLIENT_ID:} client-secret: ${IDP_APIKEY_CLIENT_SECRET:} scope: ${IDP_APIKEY_SCOPE:} - - url: http://localhost:8086 + - url: http://dev04.local.cite.gr:55330/file/rdajson transformerId: rda-file-transformer codes: [ json ] issuer-url: ${IDP_ISSUER_URI_TOKEN:} diff --git a/dmp-frontend/src/app/core/services/description/description.service.ts b/dmp-frontend/src/app/core/services/description/description.service.ts index e0b02e453..b363ad425 100644 --- a/dmp-frontend/src/app/core/services/description/description.service.ts +++ b/dmp-frontend/src/app/core/services/description/description.service.ts @@ -8,7 +8,7 @@ import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/sing import { QueryResult } from '@common/model/query-result'; import { FilterService } from '@common/modules/text-filter/filter-service'; import { Guid } from '@common/types/guid'; -import { Observable, throwError } from 'rxjs'; +import { Observable, of, throwError } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { nameof } from 'ts-simple-nameof'; import { ConfigurationService } from '../configuration/configuration.service'; @@ -16,6 +16,7 @@ import { BaseHttpV2Service } from '../http/base-http-v2.service'; import { FileFormat } from '@app/core/model/file/file-format.model'; import { BaseHttpParams } from '@common/http/base-http-params'; import { InterceptorType } from '@common/http/interceptors/interceptor-type'; +import { DescriptionValidationResult } from '@app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component'; @Injectable() export class DescriptionService { @@ -90,6 +91,10 @@ export class DescriptionService { catchError((error: any) => throwError(error))); } + public validate(descriptionIds: Guid[]): Observable { + return of(new Array()); + } + // public downloadPDF(id: string): Observable> { // return this.httpClient.get(`${this.apiBase}/${id}/export/Pdf`, { responseType: 'blob', observe: 'response', headers: this.headers }); // } diff --git a/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.html b/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.html new file mode 100644 index 000000000..11cb41d9f --- /dev/null +++ b/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.html @@ -0,0 +1,82 @@ +
+
{{ 'DMP-FINALISE-DIALOG.TITLE' | translate }}
+
+ close +
+
+
+
+ + + + + {{ 'DMP-FINALISE-DIALOG.DMP' | translate }} + + + {{ dmp.label }} + + + {{ dmp.description }} + + + + + {{ 'DMP-FINALISE-DIALOG.DESCRPIPTIONS' | translate }} + + + +
+
+ bookmark + bookmark +

+ {{ 'TYPES.DATASET-STATUS.DRAFT' | translate }} + + ({{'DMP-FINALISE-DIALOG.INVALID' | translate}}) + + : + {{ description.label }} + +

+

{{ description.label }}

+
+
+
{{ 'DMP-FINALISE-DIALOG.EMPTY' | translate }}
+
+
+ +
+

{{'DMP-FINALISE-DIALOG.FINALISE-TITLE' | translate}}

+ +
+ + {{ description.label }} + +
+
+
+ + {{'DMP-FINALISE-DIALOG.VALIDATION.AT-LEAST-ONE-DESCRPIPTION-FINALISED' | translate}} + +
+
+
+
+ {{ 'DMP-FINALISE-DIALOG.IMPACT' | translate }} +
+
+ {{ 'DMP-FINALISE-DIALOG.PUBLIC-DMP-MESSAGE' | translate }} +
+
+ {{ 'DMP-FINALISE-DIALOG.RESTRICTED-DMP-MESSAGE' | translate }} +
+
+ +
+
+ +
+
+ +
+
\ No newline at end of file diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.scss b/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.scss similarity index 97% rename from dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.scss rename to dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.scss index ef8f400c4..c18623a32 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.scss +++ b/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.scss @@ -25,7 +25,7 @@ } } -.dataset-card { +.description-card { display: flex; flex-direction: column; min-width: 0; @@ -65,7 +65,7 @@ cursor: pointer; } -.datasets span { +.descriptions span { color: var(--primary-color-3); } diff --git a/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.ts b/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.ts new file mode 100644 index 000000000..892d9091d --- /dev/null +++ b/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component.ts @@ -0,0 +1,78 @@ +import { Component, Inject, OnInit } from '@angular/core'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { Router } from '@angular/router'; +import { DescriptionStatus } from '@app/core/common/enum/description-status'; +import { DmpAccessType } from '@app/core/common/enum/dmp-access-type'; +import { Dmp } from '@app/core/model/dmp/dmp'; +import { DescriptionService } from '@app/core/services/description/description.service'; +import { BaseComponent } from '@common/base/base.component'; +import { Guid } from '@common/types/guid'; +import { takeUntil } from 'rxjs/operators'; + + +@Component({ + selector: 'app-dmp-finalize-dialog-component', + templateUrl: 'dmp-finalize-dialog.component.html', + styleUrls: ['./dmp-finalize-dialog.component.scss'] +}) +export class DmpFinalizeDialogComponent extends BaseComponent implements OnInit { + + dmp: Dmp; + dmpAccessTypeEnum = DmpAccessType; + descriptionStatusEnum = DescriptionStatus; + descriptionValidationOutputEnum = DescriptionValidationOutput; + validationResults: DescriptionValidationResult[] = []; + descriptionsToBeFinalized: Guid[] = []; + + constructor( + public router: Router, + public dialogRef: MatDialogRef, + public descriptionService: DescriptionService, + @Inject(MAT_DIALOG_DATA) public data: any + ) { + super(); + this.dmp = data.dmp; + } + + ngOnInit(): void { + this.validateDescriptions(this.dmp); + } + + isDescriptionValid(descriptionId: Guid): boolean { + return this.validationResults.find(x => x.descriptionId == descriptionId)?.result === DescriptionValidationOutput.Valid; + } + + onSubmit() { + this.dialogRef.close(this.descriptionsToBeFinalized); + } + + getFinalizedDescriptions() { + return this.dmp.descriptions.filter(x => x.status === DescriptionStatus.Finalized); + } + + close() { + this.dialogRef.close(null); + } + + validateDescriptions(dmp: Dmp) { + if (!dmp.descriptions.some(x => x.status == DescriptionStatus.Draft)) return; + this.descriptionService.validate(dmp.descriptions.filter(x => x.status == DescriptionStatus.Draft).map(x => x.id)).pipe(takeUntil(this._destroyed), + ).subscribe(result => { + this.validationResults = result; + }); + } + + get validDraftDescriptions() { + return this.dmp.descriptions.filter(x => this.validationResults.some(y => y.descriptionId == x.id && y.result == DescriptionValidationOutput.Valid)); + } +} + +export interface DescriptionValidationResult { + descriptionId: Guid; + result: DescriptionValidationOutput; +} + +export enum DescriptionValidationOutput { + Valid = 1, + Invalid = 2 +} diff --git a/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.module.ts b/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.module.ts new file mode 100644 index 000000000..3ba72d62f --- /dev/null +++ b/dmp-frontend/src/app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { AutoCompleteModule } from '@app/library/auto-complete/auto-complete.module'; +import { RichTextEditorModule } from "@app/library/rich-text-editor/rich-text-editor.module"; +import { CommonUiModule } from '@common/ui/common-ui.module'; +import { DmpFinalizeDialogComponent } from './dmp-finalize-dialog.component'; + +@NgModule({ + imports: [CommonUiModule, FormsModule, ReactiveFormsModule, AutoCompleteModule, RichTextEditorModule], + declarations: [DmpFinalizeDialogComponent], + exports: [DmpFinalizeDialogComponent] +}) +export class DmpFinalizeDialogModule { + constructor() { } +} diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.html b/dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.html deleted file mode 100644 index a19f9cc0d..000000000 --- a/dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.html +++ /dev/null @@ -1,188 +0,0 @@ -
-
{{ data.message }}
-
- close -
-
-
-
- - - - - {{ 'DMP-FINALISE-DIALOG.DMP' | translate }} - - - {{ inputModel.dmpLabel }} - - - {{ inputModel.dmpDescription }} - - - - - {{ 'DMP-FINALISE-DIALOG.DATASETS' | translate }} - - - -
-
- bookmark - bookmark -

- {{ 'TYPES.DATASET-STATUS.DRAFT' | translate }} - - ({{'DMP-FINALISE-DIALOG.INVALID' | translate}}) - - : - {{ dataset.label }} - -

-

{{ dataset.label }}

-
-
-
{{ 'DMP-FINALISE-DIALOG.EMPTY' | translate }}
-
-
- -
-

{{'DMP-FINALISE-DIALOG.FINALISE-TITLE' | translate}}

- -
- - {{ dataset.label }} - -
-
-
- - {{'DMP-FINALISE-DIALOG.VALIDATION.AT-LEAST-ONE-DATASET-FINALISED' | translate}} - -
-
-
-
- {{ 'DMP-FINALISE-DIALOG.IMPACT' | translate }} -
-
- {{ 'DMP-FINALISE-DIALOG.AFTER-FINALIZATION-PUBLISH' | translate }} -
-
- {{ 'DMP-FINALISE-DIALOG.AFTER-FINALIZATION-RESTRICT-ACCESS' | translate }} -
-
- -
-
- -
-
- -
-
- - diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.ts b/dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.ts deleted file mode 100644 index 8c7475e2e..000000000 --- a/dmp-frontend/src/app/ui/dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { Component, Inject, OnInit } from '@angular/core'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; -import { Router } from '@angular/router'; -import { BaseComponent } from '@common/base/base.component'; -import { Observable, of } from 'rxjs'; -import { catchError, map, takeUntil } from 'rxjs/operators'; - - -@Component({ - selector: 'app-dmp-finalize-dialog-component', - templateUrl: 'dmp-finalize-dialog.component.html', - styleUrls: ['./dmp-finalize-dialog.component.scss'] -}) -export class DmpFinalizeDialogComponent extends BaseComponent implements OnInit { - - inputModel: DmpFinalizeDialogInput; - outputModel: DmpFinalizeDialogOutput; - - protected datasetLookupStatus:DatasetStatusLookup[] = []; - protected datasetLookupStatusEnum = DatasetStatusLookup; - constructor( - public router: Router, - public dialogRef: MatDialogRef, - public datasetService: DatasetService, - @Inject(MAT_DIALOG_DATA) public data: any - ) { - super(); - this.inputModel = data['dialogInputModel']; - this.outputModel = { datasetsToBeFinalized: [] }; - } - - ngOnInit(): void { - this.inputModel.datasets.forEach(ds=>{ - - this.validateDataset(ds.id).subscribe(_=>{ - console.log('response', _); - }); - }) - - const drafts = this.getDraftDatasets(); - - drafts.forEach(draft=>{ - this.datasetLookupStatus[draft.id] == DatasetStatusLookup.PENDING_VALIDATION; - this.validateDataset(draft.id) - .subscribe(isValid=>{ - if(isValid){ - this.datasetLookupStatus[draft.id] = DatasetStatusLookup.VALID; - }else{ - this.datasetLookupStatus[draft.id] = DatasetStatusLookup.INVALID; - } - }) - }); - - - } - - onSubmit() { - this.dialogRef.close(this.outputModel); - } - - getFinalizedDatasets() { - return this.inputModel.datasets.filter(x => x.status === DatasetStatus.Finalized); - } - - getDraftDatasets() { - return this.inputModel.datasets.filter(x => x.status === DatasetStatus.Draft); - } - - close() { - this.dialogRef.close({ cancelled: true } as DmpFinalizeDialogOutput); - } - - validateDataset(datasetId: string) : Observable{ - return this.datasetService - .validateDataset(datasetId) - .pipe( - takeUntil(this._destroyed), - map(_=>{ - return true - }), - catchError(error=>{ - return of(false); - }) - ); - } - - get validDrafts(){ - return this.getDraftDatasets().filter(x=> this.datasetLookupStatus[x.id] && (this.datasetLookupStatus[x.id] == DatasetStatusLookup.VALID)); - } -} - -export interface DmpFinalizeDialogInput { - dmpLabel: string; - dmpDescription: string; - datasets: DmpFinalizeDialogDataset[]; - accessRights: boolean; -} - -export interface DmpFinalizeDialogDataset { - label: string; - id?: string; - status: DatasetStatus; -} - -export interface DmpFinalizeDialogOutput { - cancelled?: boolean; - datasetsToBeFinalized?: string[]; -} -enum DatasetStatusLookup{ - VALID = "VALID", - INVALID = "INVALID", - PENDING_VALIDATION = "PENDING" -} diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts index 811c45bb3..920584906 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts @@ -44,6 +44,7 @@ import { NewVersionDmpDialogComponent } from '../new-version-dialog/dmp-new-vers import { AppPermission } from '@app/core/common/enum/permission.enum'; import { ReferenceType } from '@app/core/model/reference-type/reference-type'; import { IsActive } from '@app/core/common/enum/is-active.enum'; +import { DmpFinalizeDialogComponent } from '../dmp-finalize-dialog/dmp-finalize-dialog.component'; @Component({ selector: 'app-dmp-overview', @@ -115,9 +116,9 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { .pipe(takeUntil(this._destroyed)) .subscribe(data => { this.dmp = data; - this.dmp.dmpUsers = data.dmpUsers.filter(x=> x.isActive === IsActive.Active); - if(this.dmp.descriptions) this.dmp.descriptions = data.descriptions.filter(x=> x.isActive === IsActive.Active); - this.selectedBlueprint= data.blueprint; + this.dmp.dmpUsers = data.dmpUsers.filter(x => x.isActive === IsActive.Active); + if (this.dmp.descriptions) this.dmp.descriptions = data.descriptions.filter(x => x.isActive === IsActive.Active); + this.selectedBlueprint = data.blueprint; this.researchers = this.referenceService.getReferencesForTypes(this.dmp?.dmpReferences, [this.referenceTypeService.getResearcherReferenceType()]); if (!this.hasDoi()) { this.selectedModel = this.dmp.entityDois[0]; @@ -166,14 +167,14 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { }); } }); - if(this.isAuthenticated()){ + if (this.isAuthenticated()) { this.depositRepositoriesService.getAvailableRepos() - .pipe(takeUntil(this._destroyed)) - .subscribe( - repos => { - this.depositRepos = repos; - }, - error => this.depositRepos = []); + .pipe(takeUntil(this._destroyed)) + .subscribe( + repos => { + this.depositRepos = repos; + }, + error => this.depositRepos = []); } } @@ -199,7 +200,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { if (principalId) return !!this.dmp.dmpUsers?.find(x => (x.role === DmpUserRole.Owner) && (principalId === x.id)); } - canEditDmp(): boolean{ + canEditDmp(): boolean { return (this.isDraftDmp()) && (this.isDmpOwner() || this.authentication.hasPermission(AppPermission.EditDmp)) && this.isPublicView == false; } @@ -493,69 +494,27 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { } finalize() { - //TODO: add this - // const extraProperties = new ExtraPropertiesFormModel(); - // this.dmpService.getSingle(this.dmp.id).pipe(map(data => data as Dmp)) - // .pipe(takeUntil(this._destroyed)) - // .subscribe(data => { + const dialogRef = this.dialog.open(DmpFinalizeDialogComponent, { + maxWidth: '500px', + restoreFocus: false, + autoFocus: false, + data: { + dmp: this.dmp + } + }); + dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe((descriptionsToBeFinalized: Guid[]) => { + if (descriptionsToBeFinalized && descriptionsToBeFinalized.length > 0) { - // if (!isNullOrUndefined(data.extraProperties)) { - // extraProperties.fromModel(data.extraProperties); - // } - // const dialogInputModel: DmpFinalizeDialogInput = { - // dmpLabel: this.dmp.label, - // dmpDescription: this.dmp.description, - // descriptions: this.dmp.descriptions.map(x => { - // return { label: x.label, id: x.id, status: x.status } - // }), - // accessRights: extraProperties.visible - // } - - // const dialogRef = this.dialog.open(DmpFinalizeDialogComponent, { - // maxWidth: '500px', - // restoreFocus: false, - // autoFocus: false, - // data: { - // dialogInputModel: dialogInputModel, - // message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.FINALIZE-ITEM'), - // confirmButton: this.language.instant('DMP-FINALISE-DIALOG.SUBMIT'), - // cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'), - // } - // }); - // dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe((result: DmpFinalizeDialogOutput) => { - // if (result && !result.cancelled) { - // this.checkIfAnyProfileIsUsedLessThanMin(data).subscribe(checked => { - // if (!checked) { - // var descriptionsToBeFinalized: DescriptionsToBeFinalized = { - // uuids: result.descriptionsToBeFinalized - // }; - // this.dmpService.finalize(descriptionsToBeFinalized, this.dmp.id) - // .pipe(takeUntil(this._destroyed)) - // .subscribe( - // complete => { - // if (extraProperties.visible) { - // //this.publish(this.dmp.id); - // this.dmpService.publish(this.dmp.id) - // .pipe(takeUntil(this._destroyed)) - // .subscribe(() => { - // //this.hasPublishButton = false; - // this.dmp.status = DmpStatus.Finalized; - // this.onUpdateCallbackSuccess(); - // }); - // } - // else { - // this.dmp.status = DmpStatus.Finalized; - // this.onUpdateCallbackSuccess(); - // } - // }, - // error => this.onUpdateCallbackError(error) - // ); - // } - // }) - // } - // }); - - // }); + // this.dmpService.finalize(descriptionsToBeFinalized, this.dmp.id) + // .pipe(takeUntil(this._destroyed)) + // .subscribe( + // complete => { + + // }, + // error => this.onUpdateCallbackError(error) + // ); + } + }); } @@ -793,7 +752,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { [nameof(x => x.blueprint), nameof(x => x.definition)].join('.'), [nameof(x => x.blueprint), nameof(x => x.definition), nameof(x => x.sections), nameof(x => x.id)].join('.'), [nameof(x => x.blueprint), nameof(x => x.definition), nameof(x => x.sections), nameof(x => x.label)].join('.'), - + nameof(x => x.hash), ] } diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.module.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.module.ts index f94e89ffd..4df17f6f4 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.module.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.module.ts @@ -7,6 +7,7 @@ import { CommonFormsModule } from '@common/forms/common-forms.module'; import { ConfirmationDialogModule } from '@common/modules/confirmation-dialog/confirmation-dialog.module'; import { CommonUiModule } from '@common/ui/common-ui.module'; import { NgDialogAnimationService } from 'ng-dialog-animation'; +import { DmpFinalizeDialogModule } from '../dmp-finalize-dialog/dmp-finalize-dialog.module'; import { DmpOverviewRoutingModule } from './dmp-overview.routing'; @NgModule({ @@ -16,7 +17,8 @@ import { DmpOverviewRoutingModule } from './dmp-overview.routing'; ConfirmationDialogModule, FormattingModule, AutoCompleteModule, - DmpOverviewRoutingModule + DmpOverviewRoutingModule, + DmpFinalizeDialogModule ], declarations: [ DmpOverviewComponent, diff --git a/dmp-frontend/src/app/ui/dmp/user-field/user-field.component.ts b/dmp-frontend/src/app/ui/dmp/user-field/user-field.component.ts index 3ef6f78fb..1bd5b72f6 100644 --- a/dmp-frontend/src/app/ui/dmp/user-field/user-field.component.ts +++ b/dmp-frontend/src/app/ui/dmp/user-field/user-field.component.ts @@ -1,15 +1,15 @@ +import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'; import { Component, Input, OnInit } from '@angular/core'; -import { FormArray, UntypedFormArray, UntypedFormGroup } from '@angular/forms'; +import { FormArray } from '@angular/forms'; +import { DmpUserRole } from '@app/core/common/enum/dmp-user-role'; +import { DmpUserType } from '@app/core/common/enum/dmp-user-type'; +import { DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint'; +import { UserService } from '@app/core/services/user/user.service'; import { EnumUtils } from '@app/core/services/utilities/enum-utils.service'; import { MultipleAutoCompleteConfiguration } from '@app/library/auto-complete/multiple/multiple-auto-complete-configuration'; import { BaseComponent } from '@common/base/base.component'; -import { DmpEditorModel, DmpUserEditorModel } from '../dmp-editor-blueprint/dmp-editor.model'; import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model'; -import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'; -import { DmpUserType } from '@app/core/common/enum/dmp-user-type'; -import { DmpUserRole } from '@app/core/common/enum/dmp-user-role'; -import { UserService } from '@app/core/services/user/user.service'; -import { DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint'; +import { DmpEditorModel, DmpUserEditorModel } from '../dmp-editor-blueprint/dmp-editor.model'; @Component({ selector: 'app-user-field-component', @@ -42,7 +42,7 @@ export class UserFieldComponent extends BaseComponent implements OnInit { addUser(): void { const userArray = this.form.get('users') as FormArray; const dmpUser: DmpUserEditorModel = new DmpUserEditorModel(this.validationErrorModel); - userArray.push(dmpUser.buildForm({rootPath: "users[" + userArray.length + "]."})); + userArray.push(dmpUser.buildForm({ rootPath: "users[" + userArray.length + "]." })); } removeUser(userIndex: number): void { diff --git a/dmp-frontend/src/common/modules/hybrid-listing/hybrid-listing.component.html b/dmp-frontend/src/common/modules/hybrid-listing/hybrid-listing.component.html index 66952b0ad..e8607f816 100644 --- a/dmp-frontend/src/common/modules/hybrid-listing/hybrid-listing.component.html +++ b/dmp-frontend/src/common/modules/hybrid-listing/hybrid-listing.component.html @@ -63,13 +63,13 @@ -