Fixes bug on editor in case of dataset is finalized but dmp not
This commit is contained in:
parent
9708a0c82d
commit
5e31820e49
|
@ -13,20 +13,22 @@
|
||||||
width: 2.5em;
|
width: 2.5em;
|
||||||
height: 2.5em;
|
height: 2.5em;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
background-color: #F7DD72;
|
background-color: #f7dd72;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-mini-fab-icon, .status-icon {
|
.mat-mini-fab-icon,
|
||||||
|
.status-icon {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions-btn:hover {
|
.actions-btn:hover,
|
||||||
background-color: #129D99;
|
.finalize-btn:hover {
|
||||||
color: #FFFFFF;
|
background-color: #129d99;
|
||||||
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-icon {
|
.status-icon {
|
||||||
color: #A7A7A7;
|
color: #a7a7a7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.check-icon {
|
.check-icon {
|
||||||
|
@ -48,7 +50,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.id-btn {
|
.id-btn {
|
||||||
background: url('../../../../assets/images/NoPath.png') no-repeat center;
|
background: url("../../../../assets/images/NoPath.png") no-repeat center;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
margin-right: 0.3em;
|
margin-right: 0.3em;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
@ -57,14 +59,15 @@
|
||||||
.dmp-btn {
|
.dmp-btn {
|
||||||
width: 35em;
|
width: 35em;
|
||||||
min-height: 2.3em;
|
min-height: 2.3em;
|
||||||
background-color: #129D99;
|
background-color: #129d99;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dmp-btn, .dmp-btn > mat-icon {
|
.dmp-btn,
|
||||||
|
.dmp-btn > mat-icon {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
@ -73,22 +76,23 @@
|
||||||
width: 31.6em;
|
width: 31.6em;
|
||||||
padding: 0 1em;
|
padding: 0 1em;
|
||||||
background-color: #ffffff00;
|
background-color: #ffffff00;
|
||||||
color: #129D99;
|
color: #129d99;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.frame-btn {
|
.frame-btn {
|
||||||
border: 1px solid #212121;
|
border: 1px solid #212121;
|
||||||
color: black;
|
color: black;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.finalize-btn {
|
.finalize-btn {
|
||||||
border: 1px solid #F7DD72;
|
// border: 1px solid #F7DD72;
|
||||||
background: #F5DB71;
|
background: #f5db71;
|
||||||
}
|
}
|
||||||
|
|
||||||
.frame-btn, .finalize-btn {
|
.frame-btn,
|
||||||
|
.finalize-btn {
|
||||||
box-shadow: 0px 2px 6px #00000029;
|
box-shadow: 0px 2px 6px #00000029;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,18 +104,18 @@
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.invite-btn{
|
.invite-btn {
|
||||||
width: 9.4em;
|
width: 9.4em;
|
||||||
height: 2.9em;
|
height: 2.9em;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
box-shadow: 0px 3px 6px #1E202029;
|
box-shadow: 0px 3px 6px #1e202029;
|
||||||
border: 2px solid #212121;
|
border: 2px solid #212121;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.account_btn {
|
.account_btn {
|
||||||
background: white;
|
background: white;
|
||||||
color: #D5D5D5;
|
color: #d5d5d5;
|
||||||
border: none;
|
border: none;
|
||||||
height: 2.9em;
|
height: 2.9em;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +125,7 @@
|
||||||
.dataset-logo {
|
.dataset-logo {
|
||||||
width: 6em;
|
width: 6em;
|
||||||
height: 2.6em;
|
height: 2.6em;
|
||||||
background: #F7DD72;
|
background: #f7dd72;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
// color: #212121;
|
// color: #212121;
|
||||||
|
@ -137,7 +141,8 @@
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-txt, .label2-txt {
|
.label-txt,
|
||||||
|
.label2-txt {
|
||||||
color: #848484;
|
color: #848484;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
@ -155,7 +160,7 @@
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
color: #008887;
|
color: #008887;
|
||||||
padding-right: 0.5em;
|
padding-right: 0.5em;
|
||||||
align-self: center;;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
@ -164,7 +169,8 @@
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-label, .header {
|
.dataset-label,
|
||||||
|
.header {
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
}
|
}
|
||||||
|
@ -179,7 +185,7 @@
|
||||||
.dmp-btn-label {
|
.dmp-btn-label {
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #FFFFFF;
|
color: #ffffff;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
@ -194,7 +200,7 @@
|
||||||
.doi-txt {
|
.doi-txt {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
letter-spacing: 0.009em;
|
letter-spacing: 0.009em;
|
||||||
color: #7D7D7D;
|
color: #7d7d7d;
|
||||||
width: 12em;
|
width: 12em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -204,8 +210,8 @@
|
||||||
|
|
||||||
.doi-panel {
|
.doi-panel {
|
||||||
height: 3.5em;
|
height: 3.5em;
|
||||||
background: #FAFAFA;
|
background: #fafafa;
|
||||||
border: 1px solid #D1D1D1;
|
border: 1px solid #d1d1d1;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -216,7 +222,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.frame {
|
.frame {
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
box-shadow: 0px 1px 5px #00000026;
|
box-shadow: 0px 1px 5px #00000026;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -226,7 +232,8 @@
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.frame-txt, .finalize-txt {
|
.frame-txt,
|
||||||
|
.finalize-txt {
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
|
@ -235,7 +242,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.hr-line {
|
.hr-line {
|
||||||
border: 1px solid #DBDBDB;
|
border: 1px solid #dbdbdb;
|
||||||
// width: 274px;
|
// width: 274px;
|
||||||
// width: 17em;
|
// width: 17em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -257,22 +264,29 @@
|
||||||
|
|
||||||
.authors-role {
|
.authors-role {
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
color: #A8A8A8;
|
color: #a8a8a8;
|
||||||
height: 1.4em;
|
height: 1.4em;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ********CENTER ELEMENTS********
|
// ********CENTER ELEMENTS********
|
||||||
|
|
||||||
.mat-mini-fab, .mat-mini-fab-icon, .actions-btn,
|
.mat-mini-fab,
|
||||||
.status-icon, .dataset-logo, .frame-btn, .finalize-btn {
|
.mat-mini-fab-icon,
|
||||||
|
.actions-btn,
|
||||||
|
.status-icon,
|
||||||
|
.dataset-logo,
|
||||||
|
.frame-btn,
|
||||||
|
.finalize-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-label, .dmp-btn,
|
.dataset-label,
|
||||||
.doi-panel, .researcher {
|
.dmp-btn,
|
||||||
|
.doi-panel,
|
||||||
|
.researcher {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<app-dataset-external-references-editor-component [formGroup]="formGroup" [viewOnly]="viewOnly"></app-dataset-external-references-editor-component>
|
<app-dataset-external-references-editor-component [formGroup]="formGroup" [viewOnly]="viewOnly"></app-dataset-external-references-editor-component>
|
||||||
<app-dataset-description [form]="formGroup.get('datasetProfileDefinition')" [datasetProfileId]="formGroup.get('profile').value">
|
<app-dataset-description [form]="formGroup.get('datasetProfileDefinition')" [datasetProfileId]="formGroup.get('profile').value"></app-dataset-description>
|
||||||
</app-dataset-description>
|
|
||||||
<!-- <app-dataset-description [form]="formGroup.get('datasetProfileDefinition')" [visibilityRules]="formGroup.get('datasetProfileDefinition').get('rules')" [datasetProfileId]="formGroup.get('profile').value">
|
<!-- <app-dataset-description [form]="formGroup.get('datasetProfileDefinition')" [visibilityRules]="formGroup.get('datasetProfileDefinition').get('rules')" [datasetProfileId]="formGroup.get('profile').value">
|
||||||
</app-dataset-description> -->
|
</app-dataset-description> -->
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,10 @@ export class DatasetEditorDetailsComponent extends BaseComponent implements OnIn
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.datasetId) {
|
if (this.formGroup.get('status').value === 1) {
|
||||||
|
this.formGroup.disable();
|
||||||
|
}
|
||||||
|
if (this.datasetId) { // never gets in here
|
||||||
this.datasetWizardService.getSingle(this.datasetId)
|
this.datasetWizardService.getSingle(this.datasetId)
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(data => {
|
.subscribe(data => {
|
||||||
|
@ -141,7 +144,7 @@ export class DatasetEditorDetailsComponent extends BaseComponent implements OnIn
|
||||||
tourId: 'only-dmp-tour',
|
tourId: 'only-dmp-tour',
|
||||||
useOrb: true,
|
useOrb: true,
|
||||||
steps: [
|
steps: [
|
||||||
{
|
{
|
||||||
title: this.dmpText,
|
title: this.dmpText,
|
||||||
content: 'Step 1',
|
content: 'Step 1',
|
||||||
orientation: Orientation.Bottom,
|
orientation: Orientation.Bottom,
|
||||||
|
@ -168,7 +171,7 @@ export class DatasetEditorDetailsComponent extends BaseComponent implements OnIn
|
||||||
this.setDashboardTourDmp(label);
|
this.setDashboardTourDmp(label);
|
||||||
console.log(this.dashboardTourDmp.steps[0].selector);
|
console.log(this.dashboardTourDmp.steps[0].selector);
|
||||||
this.guidedTourService.startTour(this.dashboardTourDmp);
|
this.guidedTourService.startTour(this.dashboardTourDmp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
registerFormListeners() {
|
registerFormListeners() {
|
||||||
|
|
|
@ -79,7 +79,9 @@
|
||||||
<li *ngIf="!isNewDataset" (click)="changeStep(2)" [ngClass]="{'active': this.step === 2}">{{'DMP-EDITOR.STEPPER.DATASET-INFO' | translate}}</li>
|
<li *ngIf="!isNewDataset" (click)="changeStep(2)" [ngClass]="{'active': this.step === 2}">{{'DMP-EDITOR.STEPPER.DATASET-INFO' | translate}}</li>
|
||||||
|
|
||||||
<li *ngFor="let dataset of datasets.controls; let i = index" (click)="changeStep(i + stepsBeforeDatasets, dataset)" [ngClass]="{'active-dataset': this.step === i + stepsBeforeDatasets}">
|
<li *ngFor="let dataset of datasets.controls; let i = index" (click)="changeStep(i + stepsBeforeDatasets, dataset)" [ngClass]="{'active-dataset': this.step === i + stepsBeforeDatasets}">
|
||||||
<div>{{'DMP-EDITOR.STEPPER.DATASET' | translate}}</div>
|
<div>{{'DMP-EDITOR.STEPPER.DATASET' | translate}}
|
||||||
|
<span *ngIf="dataset.value.status === 1"><mat-icon class="status-icon check-icon">check</mat-icon>{{'TYPES.DATASET-STATUS.FINALISED' | translate}}</span>
|
||||||
|
</div>
|
||||||
<ul class="dataset-list">
|
<ul class="dataset-list">
|
||||||
<li [ngClass]="{'active': this.step === i + stepsBeforeDatasets}">{{ dataset.get('label').value }} (8)</li>
|
<li [ngClass]="{'active': this.step === i + stepsBeforeDatasets}">{{ dataset.get('label').value }} (8)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -108,6 +110,7 @@
|
||||||
|
|
||||||
<dataset-info *ngIf="!isNewDataset" [hidden]="this.step !== 2" [formGroup]="formGroup" [dmp]="dmp" [isPublic]="isPublic" [isFinalized]="isFinalized || lockStatus" [isUserOwner]="isUserOwner" [isNewDataset]="isNewDataset" (onFormChanged)="formChanged()"></dataset-info>
|
<dataset-info *ngIf="!isNewDataset" [hidden]="this.step !== 2" [formGroup]="formGroup" [dmp]="dmp" [isPublic]="isPublic" [isFinalized]="isFinalized || lockStatus" [isUserOwner]="isUserOwner" [isNewDataset]="isNewDataset" (onFormChanged)="formChanged()"></dataset-info>
|
||||||
<dataset-info *ngIf="isNewDataset" [hidden]="this.step !== 1" [formGroup]="formGroup" [dmp]="dmp" [isPublic]="isPublic" [isFinalized]="isFinalized || lockStatus" [isUserOwner]="isUserOwner" [isNewDataset]="isNewDataset" (onFormChanged)="formChanged()"></dataset-info>
|
<dataset-info *ngIf="isNewDataset" [hidden]="this.step !== 1" [formGroup]="formGroup" [dmp]="dmp" [isPublic]="isPublic" [isFinalized]="isFinalized || lockStatus" [isUserOwner]="isUserOwner" [isNewDataset]="isNewDataset" (onFormChanged)="formChanged()"></dataset-info>
|
||||||
|
|
||||||
<div *ngFor="let dataset of datasets.controls; let i = index" [hidden]="this.step !== i + stepsBeforeDatasets">
|
<div *ngFor="let dataset of datasets.controls; let i = index" [hidden]="this.step !== i + stepsBeforeDatasets">
|
||||||
<dataset-editor-details [formGroup]="dataset" [dmpId]="formGroup.get('id').value" (formChanged)="datasetFormChanged($event)"></dataset-editor-details>
|
<dataset-editor-details [formGroup]="dataset" [dmpId]="formGroup.get('id').value" (formChanged)="datasetFormChanged($event)"></dataset-editor-details>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -376,6 +376,11 @@ a:hover {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.status-icon {
|
||||||
|
font-size: 1.2em;
|
||||||
|
color: #a7a7a7;
|
||||||
|
}
|
||||||
|
|
||||||
// ::ng-deep .mat-tab-labels {
|
// ::ng-deep .mat-tab-labels {
|
||||||
// justify-content: space-between;
|
// justify-content: space-between;
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -9,30 +9,35 @@
|
||||||
<div class="heading">1.1 {{'DMP-EDITOR.FIELDS.NAME' | translate}}*</div>
|
<div class="heading">1.1 {{'DMP-EDITOR.FIELDS.NAME' | translate}}*</div>
|
||||||
<div class="hint">{{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}</div>
|
<div class="hint">{{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}</div>
|
||||||
<div class="title-form">
|
<div class="title-form">
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field *ngIf="!isNewDataset">
|
||||||
<input matInput placeholder="{{'DMP-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label" formControlName="label" required>
|
<input matInput placeholder="{{'DMP-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label" formControlName="label" required>
|
||||||
<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
|
<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
|
||||||
{{formGroup.get('label').getError('backendError').message}}</mat-error>
|
{{formGroup.get('label').getError('backendError').message}}</mat-error>
|
||||||
<mat-error *ngIf="formGroup.get('label').hasError('required')">
|
<mat-error *ngIf="formGroup.get('label').hasError('required')">
|
||||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field *ngIf="isNewDataset">
|
||||||
|
<app-single-auto-complete [required]="true" placeholder="{{'DATASET-EDITOR.FIELDS.SELECT-DMP' | translate}}" [configuration]="dmpAutoCompleteConfiguration"></app-single-auto-complete>
|
||||||
|
<!-- <app-single-auto-complete [required]="true" [formControl]="formGroup" placeholder="{{'DATASET-EDITOR.FIELDS.SELECT-DMP' | translate}}" [configuration]="dmpAutoCompleteConfiguration">
|
||||||
|
</app-single-auto-complete> -->
|
||||||
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Description field -->
|
<!-- Description field -->
|
||||||
<div class="row">
|
<div class="row" *ngIf="!isNewDataset">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="heading">1.2 {{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}}</div>
|
<div class="heading">1.2 {{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}}</div>
|
||||||
<div class="hint">{{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}</div>
|
<div class="hint">{{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}</div>
|
||||||
<div class="description-form">
|
<div class="description-form">
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field>
|
||||||
<textarea rows="3" matInput class="description-area" placeholder="{{'DMP-EDITOR.PLACEHOLDER.DESCRIPTION' | translate}}" formControlName="description"></textarea>
|
<textarea rows="3" matInput class="description-area" placeholder="{{'DMP-EDITOR.PLACEHOLDER.DESCRIPTION' | translate}}" formControlName="description"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Researchers field-->
|
<!-- Researchers field-->
|
||||||
<div class="row">
|
<div class="row" *ngIf="!isNewDataset">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="heading">1.3 {{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}</div>
|
<div class="heading">1.3 {{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}</div>
|
||||||
<div class="hint">
|
<div class="hint">
|
||||||
|
@ -40,7 +45,7 @@
|
||||||
<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
|
<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="author-form">
|
<div class="author-form">
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field>
|
||||||
<app-multiple-auto-complete [formControl]="formGroup.get('researchers')" placeholder="{{'DMP-EDITOR.PLACEHOLDER.RESEARCHERS' | translate}}" [configuration]="researchersAutoCompleteConfiguration">
|
<app-multiple-auto-complete [formControl]="formGroup.get('researchers')" placeholder="{{'DMP-EDITOR.PLACEHOLDER.RESEARCHERS' | translate}}" [configuration]="researchersAutoCompleteConfiguration">
|
||||||
</app-multiple-auto-complete>
|
</app-multiple-auto-complete>
|
||||||
<mat-error *ngIf="formGroup.get('researchers').hasError('backendError')">
|
<mat-error *ngIf="formGroup.get('researchers').hasError('backendError')">
|
||||||
|
@ -55,7 +60,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Organizations Field -->
|
<!-- Organizations Field -->
|
||||||
<div class="row">
|
<div class="row" *ngIf="!isNewDataset">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="heading">1.4 {{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}</div>
|
<div class="heading">1.4 {{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}</div>
|
||||||
<div class="hint">
|
<div class="hint">
|
||||||
|
@ -63,7 +68,7 @@
|
||||||
<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
|
<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="organizations-form">
|
<div class="organizations-form">
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field>
|
||||||
<app-multiple-auto-complete [formControl]="formGroup.get('organisations')" placeholder="{{'DMP-EDITOR.PLACEHOLDER.ORGANIZATION' | translate}}" [configuration]="organisationsAutoCompleteConfiguration">
|
<app-multiple-auto-complete [formControl]="formGroup.get('organisations')" placeholder="{{'DMP-EDITOR.PLACEHOLDER.ORGANIZATION' | translate}}" [configuration]="organisationsAutoCompleteConfiguration">
|
||||||
</app-multiple-auto-complete>
|
</app-multiple-auto-complete>
|
||||||
<mat-error *ngIf="formGroup.get('organisations').hasError('backendError')">
|
<mat-error *ngIf="formGroup.get('organisations').hasError('backendError')">
|
||||||
|
|
|
@ -12,6 +12,12 @@ import { isNullOrUndefined } from 'util';
|
||||||
import { MatDialog } from '@angular/material';
|
import { MatDialog } from '@angular/material';
|
||||||
import { AddOrganizationComponent } from '../add-organization/add-organization.component';
|
import { AddOrganizationComponent } from '../add-organization/add-organization.component';
|
||||||
import { AddResearcherComponent } from '../add-researcher/add-researcher.component';
|
import { AddResearcherComponent } from '../add-researcher/add-researcher.component';
|
||||||
|
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration';
|
||||||
|
import { DmpListingModel } from '@app/core/model/dmp/dmp-listing';
|
||||||
|
import { DataTableRequest } from '@app/core/model/data-table/data-table-request';
|
||||||
|
import { DmpCriteria } from '@app/core/query/dmp/dmp-criteria';
|
||||||
|
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
||||||
|
import { DmpService } from '@app/core/services/dmp/dmp.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'main-info',
|
selector: 'main-info',
|
||||||
|
@ -22,6 +28,7 @@ export class MainInfoComponent extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
@Input() formGroup: FormGroup = null;
|
@Input() formGroup: FormGroup = null;
|
||||||
@Input() isNewVersion: boolean;
|
@Input() isNewVersion: boolean;
|
||||||
|
@Input() isNewDataset: boolean;
|
||||||
@Input() isUserOwner: boolean;
|
@Input() isUserOwner: boolean;
|
||||||
@Input() isClone: boolean;
|
@Input() isClone: boolean;
|
||||||
@Output() onFormChanged: EventEmitter<any> = new EventEmitter();
|
@Output() onFormChanged: EventEmitter<any> = new EventEmitter();
|
||||||
|
@ -41,10 +48,19 @@ export class MainInfoComponent extends BaseComponent implements OnInit {
|
||||||
subtitleFn: (item) => item['tag'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['tag'] : (item['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'))
|
subtitleFn: (item) => item['tag'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['tag'] : (item['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dmpAutoCompleteConfiguration: SingleAutoCompleteConfiguration = {
|
||||||
|
filterFn: this.searchDmp.bind(this),
|
||||||
|
initialItems: (extraData) => this.searchDmp(''),
|
||||||
|
displayFn: (item) => this.getDatasetDisplay(item),
|
||||||
|
titleFn: (item) => item['label'],
|
||||||
|
subtitleFn: (item) => this.language.instant('DATASET-WIZARD.FIRST-STEP.SUB-TITLE') + new Date(item['creationTime']).toISOString()
|
||||||
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private language: TranslateService,
|
private language: TranslateService,
|
||||||
private configurationService: ConfigurationService,
|
private configurationService: ConfigurationService,
|
||||||
private externalSourcesService: ExternalSourcesService,
|
private externalSourcesService: ExternalSourcesService,
|
||||||
|
private dmpService: DmpService,
|
||||||
private dialog: MatDialog
|
private dialog: MatDialog
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
@ -136,4 +152,22 @@ export class MainInfoComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
searchDmp(query: string): Observable<DmpListingModel[]> {
|
||||||
|
const fields: Array<string> = new Array<string>();
|
||||||
|
fields.push('-created');
|
||||||
|
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
|
||||||
|
dmpDataTableRequest.criteria = new DmpCriteria();
|
||||||
|
dmpDataTableRequest.criteria.like = query;
|
||||||
|
dmpDataTableRequest.criteria.status = DmpStatus.Draft;
|
||||||
|
return this.dmpService.getPaged(dmpDataTableRequest, "autocomplete").pipe(map(x => x.data));
|
||||||
|
}
|
||||||
|
|
||||||
|
getDatasetDisplay(item: any): string {
|
||||||
|
// if (!this.isPublic) {
|
||||||
|
// return (item['status'] ? this.language.instant('TYPES.DATASET-STATUS.FINALISED').toUpperCase() : this.language.instant('TYPES.DATASET-STATUS.DRAFT').toUpperCase()) + ': ' + item['label'];
|
||||||
|
// }
|
||||||
|
// else { return item['label']; }
|
||||||
|
return item['label'] ? item['label'] : null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -689,7 +689,9 @@
|
||||||
"TITLE": {
|
"TITLE": {
|
||||||
"NEW": "Neuer Datenmanagementplan",
|
"NEW": "Neuer Datenmanagementplan",
|
||||||
"EDIT": "Bearbeiten",
|
"EDIT": "Bearbeiten",
|
||||||
"SUBTITLE": "DOI"
|
"SUBTITLE": "DOI",
|
||||||
|
"EDIT-DATASET": "Editing Dataset",
|
||||||
|
"CREATE-DATASET": "Creating Dataset Description"
|
||||||
},
|
},
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
"NAME": "Titel",
|
"NAME": "Titel",
|
||||||
|
@ -822,6 +824,7 @@
|
||||||
"PROFILE": "Vorlage",
|
"PROFILE": "Vorlage",
|
||||||
"URI": "URI",
|
"URI": "URI",
|
||||||
"DMP": "DMP",
|
"DMP": "DMP",
|
||||||
|
"SELECT-DMP": "Select DMP",
|
||||||
"DATAREPOSITORIES": "Datenrepositorien",
|
"DATAREPOSITORIES": "Datenrepositorien",
|
||||||
"REGISTRIES": "Verzeichnisse",
|
"REGISTRIES": "Verzeichnisse",
|
||||||
"SERVICES": "Dienste",
|
"SERVICES": "Dienste",
|
||||||
|
|
|
@ -760,6 +760,7 @@
|
||||||
"EDIT": "Edit",
|
"EDIT": "Edit",
|
||||||
"EDIT-DMP": "Editing DMP",
|
"EDIT-DMP": "Editing DMP",
|
||||||
"EDIT-DATASET": "Editing Dataset",
|
"EDIT-DATASET": "Editing Dataset",
|
||||||
|
"CREATE-DATASET": "Creating Dataset Description",
|
||||||
"SUBTITLE": "DOI"
|
"SUBTITLE": "DOI"
|
||||||
},
|
},
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
|
@ -944,6 +945,7 @@
|
||||||
"PROFILE": "Template",
|
"PROFILE": "Template",
|
||||||
"URI": "Uri",
|
"URI": "Uri",
|
||||||
"DMP": "DMP",
|
"DMP": "DMP",
|
||||||
|
"SELECT-DMP": "Select DMP",
|
||||||
"DATAREPOSITORIES": "Data Repositories",
|
"DATAREPOSITORIES": "Data Repositories",
|
||||||
"REGISTRIES": "Registries",
|
"REGISTRIES": "Registries",
|
||||||
"SERVICES": "Services",
|
"SERVICES": "Services",
|
||||||
|
|
|
@ -754,6 +754,7 @@
|
||||||
"EDIT": "Editar",
|
"EDIT": "Editar",
|
||||||
"EDIT-DMP": "Editing DMP",
|
"EDIT-DMP": "Editing DMP",
|
||||||
"EDIT-DATASET": "Editing Dataset",
|
"EDIT-DATASET": "Editing Dataset",
|
||||||
|
"CREATE-DATASET": "Creating Dataset Description",
|
||||||
"SUBTITLE": "DOI"
|
"SUBTITLE": "DOI"
|
||||||
},
|
},
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
|
@ -936,6 +937,7 @@
|
||||||
"PROFILE": "Plantilla",
|
"PROFILE": "Plantilla",
|
||||||
"URI": "Uri",
|
"URI": "Uri",
|
||||||
"DMP": "PGD",
|
"DMP": "PGD",
|
||||||
|
"SELECT-DMP": "Select DMP",
|
||||||
"DATAREPOSITORIES": "Repositorios de Datos",
|
"DATAREPOSITORIES": "Repositorios de Datos",
|
||||||
"REGISTRIES": "Registros",
|
"REGISTRIES": "Registros",
|
||||||
"SERVICES": "Servicios",
|
"SERVICES": "Servicios",
|
||||||
|
|
|
@ -928,6 +928,8 @@
|
||||||
"TITLE": {
|
"TITLE": {
|
||||||
"NEW": "Νέο Σχέδιο Διαχείρισης Δεδομένων",
|
"NEW": "Νέο Σχέδιο Διαχείρισης Δεδομένων",
|
||||||
"EDIT": "Επεξεργασία",
|
"EDIT": "Επεξεργασία",
|
||||||
|
"EDIT-DATASET": "Editing Dataset",
|
||||||
|
"CREATE-DATASET": "Creating Dataset Description",
|
||||||
"INTRO": "A Data Management Plan (DMP) consist of your Data Management Plans closer to where they are generated, analysed and stored. argos is an open, extensible, collaborative tool supporting Open and FAIR Data Management Plans."
|
"INTRO": "A Data Management Plan (DMP) consist of your Data Management Plans closer to where they are generated, analysed and stored. argos is an open, extensible, collaborative tool supporting Open and FAIR Data Management Plans."
|
||||||
},
|
},
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
|
@ -937,6 +939,7 @@
|
||||||
"PROFILE": "Template",
|
"PROFILE": "Template",
|
||||||
"URI": "Uri",
|
"URI": "Uri",
|
||||||
"DMP": "Σχέδιο Διαχείρισης Δεδομένων",
|
"DMP": "Σχέδιο Διαχείρισης Δεδομένων",
|
||||||
|
"SELECT-DMP": "Select DMP",
|
||||||
"DATAREPOSITORIES": "Αποθετήρια Δεδομένων",
|
"DATAREPOSITORIES": "Αποθετήρια Δεδομένων",
|
||||||
"REGISTRIES": "Κατάλογοι",
|
"REGISTRIES": "Κατάλογοι",
|
||||||
"SERVICES": "Υπηρεσίες",
|
"SERVICES": "Υπηρεσίες",
|
||||||
|
|
|
@ -813,7 +813,9 @@
|
||||||
"DATASET-EDITOR": {
|
"DATASET-EDITOR": {
|
||||||
"TITLE": {
|
"TITLE": {
|
||||||
"NEW": "Yeni Veri Yönetim Planı",
|
"NEW": "Yeni Veri Yönetim Planı",
|
||||||
"EDIT": "Düzenle"
|
"EDIT": "Düzenle",
|
||||||
|
"EDIT-DATASET": "Editing Dataset",
|
||||||
|
"CREATE-DATASET": "Creating Dataset Description"
|
||||||
},
|
},
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
"NAME": "Veriseti Tanımının Adı",
|
"NAME": "Veriseti Tanımının Adı",
|
||||||
|
@ -821,6 +823,7 @@
|
||||||
"PROFILE": "Şablon",
|
"PROFILE": "Şablon",
|
||||||
"URI": "Uri",
|
"URI": "Uri",
|
||||||
"DMP": "VYP",
|
"DMP": "VYP",
|
||||||
|
"SELECT-DMP": "Select DMP",
|
||||||
"DATAREPOSITORIES": "Veri Deposu",
|
"DATAREPOSITORIES": "Veri Deposu",
|
||||||
"REGISTRIES": "Kayıtçılar",
|
"REGISTRIES": "Kayıtçılar",
|
||||||
"SERVICES": "Hizmetler",
|
"SERVICES": "Hizmetler",
|
||||||
|
|
Loading…
Reference in New Issue