Merge remote-tracking branch 'origin/Development' into roadmap
This commit is contained in:
commit
d6e89cd440
|
@ -28,13 +28,15 @@ public class PrefillingManager {
|
|||
private final ConfigLoader configLoader;
|
||||
private final ObjectMapper objectMapper;
|
||||
private final DatasetManager datasetManager;
|
||||
private final LicenseManager licenseManager;
|
||||
|
||||
@Autowired
|
||||
public PrefillingManager(ApiContext apiContext, ConfigLoader configLoader, DatasetManager datasetManager) {
|
||||
public PrefillingManager(ApiContext apiContext, ConfigLoader configLoader, DatasetManager datasetManager, LicenseManager licenseManager) {
|
||||
this.apiContext = apiContext;
|
||||
this.configLoader = configLoader;
|
||||
this.objectMapper = new ObjectMapper();
|
||||
this.datasetManager = datasetManager;
|
||||
this.licenseManager = licenseManager;
|
||||
}
|
||||
|
||||
public List<Prefilling> getPrefillings(String like, String configId) {
|
||||
|
@ -50,7 +52,7 @@ public class PrefillingManager {
|
|||
PrefillingGet prefillingGet = prefillingConfig.getPrefillingGet();
|
||||
Map<String, Object> prefillingEntity = getSingle(prefillingGet.getUrl(), prefillId);
|
||||
DatasetProfile datasetProfile = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(profileId);
|
||||
return PrefillingMapper.mapPrefilledEntityToDatasetWizard(prefillingEntity, prefillingGet, prefillingConfig.getType(), datasetProfile, datasetManager);
|
||||
return PrefillingMapper.mapPrefilledEntityToDatasetWizard(prefillingEntity, prefillingGet, prefillingConfig.getType(), datasetProfile, datasetManager, licenseManager);
|
||||
}
|
||||
|
||||
private Map<String, Object> getSingle(String url, String id) {
|
||||
|
|
|
@ -9,10 +9,13 @@ import eu.eudat.data.entities.DatasetProfile;
|
|||
import eu.eudat.elastic.entities.Tag;
|
||||
import eu.eudat.logic.managers.DatasetManager;
|
||||
import eu.eudat.logic.managers.DatasetProfileManager;
|
||||
import eu.eudat.logic.managers.LicenseManager;
|
||||
import eu.eudat.logic.proxy.config.entities.DefaultPrefillingMapping;
|
||||
import eu.eudat.logic.proxy.config.entities.PrefillingFixedMapping;
|
||||
import eu.eudat.logic.proxy.config.entities.PrefillingGet;
|
||||
import eu.eudat.logic.proxy.config.entities.PrefillingMapping;
|
||||
import eu.eudat.logic.proxy.config.exceptions.HugeResultSet;
|
||||
import eu.eudat.logic.proxy.config.exceptions.NoURLFound;
|
||||
import eu.eudat.logic.utilities.helpers.StreamDistinctBy;
|
||||
import eu.eudat.logic.utilities.json.JsonSearcher;
|
||||
import eu.eudat.models.data.components.commons.datafield.AutoCompleteData;
|
||||
|
@ -20,6 +23,7 @@ import eu.eudat.models.data.datasetprofile.DatasetProfileOverviewModel;
|
|||
import eu.eudat.models.data.datasetprofile.RenderStyle;
|
||||
import eu.eudat.models.data.datasetwizard.DatasetWizardModel;
|
||||
import eu.eudat.models.data.externaldataset.ExternalAutocompleteFieldModel;
|
||||
import eu.eudat.models.data.license.LicenseModel;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
@ -33,7 +37,7 @@ public class PrefillingMapper {
|
|||
private static final ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
|
||||
|
||||
public static DatasetWizardModel mapPrefilledEntityToDatasetWizard(Map<String, Object> prefilledEntity, PrefillingGet prefillingGet, String type,
|
||||
DatasetProfile profile, DatasetManager datasetManager) throws Exception {
|
||||
DatasetProfile profile, DatasetManager datasetManager, LicenseManager licenseManager) throws Exception {
|
||||
DatasetWizardModel datasetWizardModel = new DatasetWizardModel();
|
||||
datasetWizardModel.setProfile(new DatasetProfileOverviewModel().fromDataModel(profile));
|
||||
Dataset dataset = new Dataset();
|
||||
|
@ -50,17 +54,17 @@ public class PrefillingMapper {
|
|||
sourceValue = ((Map)sourceValue).get(sourceKey);
|
||||
}
|
||||
}
|
||||
setValue(prefillingMapping, mapper.writeValueAsString(sourceValue), datasetWizardModel, parentNode, properties, type);
|
||||
setValue(prefillingMapping, mapper.writeValueAsString(sourceValue), datasetWizardModel, parentNode, properties, type, licenseManager);
|
||||
}
|
||||
for (PrefillingFixedMapping fixedMapping: prefillingGet.getFixedMappings()) {
|
||||
setValue(fixedMapping, fixedMapping.getValue(), datasetWizardModel, parentNode, properties, type);
|
||||
setValue(fixedMapping, fixedMapping.getValue(), datasetWizardModel, parentNode, properties, type, licenseManager);
|
||||
}
|
||||
dataset.setProperties(mapper.writeValueAsString(properties));
|
||||
datasetWizardModel.setDatasetProfileDefinition(datasetManager.getPagedProfile(datasetWizardModel, dataset));
|
||||
return datasetWizardModel;
|
||||
}
|
||||
|
||||
private static void setValue(PrefillingMapping prefillingMapping, String value, DatasetWizardModel datasetWizardModel, JsonNode parentNode, Map<String, Object> properties, String type) throws InvocationTargetException, IllegalAccessException, JsonProcessingException {
|
||||
private static void setValue(PrefillingMapping prefillingMapping, String value, DatasetWizardModel datasetWizardModel, JsonNode parentNode, Map<String, Object> properties, String type, LicenseManager licenseManager) throws InvocationTargetException, IllegalAccessException, JsonProcessingException {
|
||||
String trimRegex = prefillingMapping.getTrimRegex() != null ? prefillingMapping.getTrimRegex() : "";
|
||||
if (!value.startsWith("\"") && !value.startsWith("[") && !value.equals("null")) {
|
||||
value = "\"" + value + "\"";
|
||||
|
@ -158,6 +162,17 @@ public class PrefillingMapper {
|
|||
}
|
||||
properties.put(id, datasetID.toString());
|
||||
break;
|
||||
case LICENSES:
|
||||
try {
|
||||
List<LicenseModel> licenses = licenseManager.getLicenses("", "");
|
||||
String finalParsedValue = parsedValue;
|
||||
licenses = licenses.stream().filter(license -> license.getPid().equals(finalParsedValue)).collect(Collectors.toList());
|
||||
properties.put(id, licenses);
|
||||
}
|
||||
catch (NoURLFound | HugeResultSet e){
|
||||
properties.put(id, parsedValue);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!parsedValues.isEmpty())
|
||||
properties.put(id, String.join(", ", parsedValues));
|
||||
|
|
|
@ -1214,9 +1214,6 @@ but not
|
|||
<fixedMapping maDmpTarget="dataset.distribution.host.description" value="Repository hosted by Zenodo" />
|
||||
<fixedMapping maDmpTarget="dataset.distribution.host.url" value="https://zenodo.org" />
|
||||
<fixedMapping maDmpTarget="dataset.distribution.host.pid_system" value="doi" />
|
||||
<fixedMapping maDmpTarget="dataset.security_and_privacy.title" value="TBD" />
|
||||
<fixedMapping maDmpTarget="dataset.security_and_privacy.description" value="TBD" />
|
||||
<fixedMapping maDmpTarget="dataset.preservation_statement" value="TBD" />
|
||||
</fixedMappings>
|
||||
</prefillingGet>
|
||||
</config>
|
||||
|
|
|
@ -8,7 +8,8 @@ import {FormControl} from "@angular/forms";
|
|||
<div class="editor-wrapper" [class]="wrapperClasses" [formGroup]="parentFormGroup">
|
||||
<angular-editor class="full-width editor" [ngClass]="editable ? '': 'disabled'" [id]="id"
|
||||
[config]="editorConfig" [formControlName]="controlName"
|
||||
placeholder="{{(placeholder? (placeholder | translate) : '') + (required ? ' *': '')}}"></angular-editor>
|
||||
placeholder="{{(placeholder? (placeholder | translate) : '') + (required ? ' *': '')}}"
|
||||
(paste)="pasteWithoutFormatting($event)"></angular-editor>
|
||||
<mat-icon *ngIf="formInput.value" (click)="formInput.patchValue('')" class="clear">close</mat-icon>
|
||||
</div>
|
||||
`,
|
||||
|
@ -40,6 +41,14 @@ export class RichTextEditorComponent {
|
|||
defaultFontSize: '',
|
||||
sanitize: true,
|
||||
toolbarPosition: 'top',
|
||||
customClasses: [
|
||||
{ name: 'H1 header', class: '', tag: 'h1' },
|
||||
{ name: 'H2 header', class: '', tag: 'h2' },
|
||||
{ name: 'H3 header', class: '', tag: 'h3' },
|
||||
{ name: 'H4 header', class: '', tag: 'h4' },
|
||||
{ name: 'H5 header', class: '', tag: 'h5'},
|
||||
{ name: 'H6 header', class: '', tag: 'h6'}
|
||||
],
|
||||
toolbarHiddenButtons: [
|
||||
[
|
||||
'heading',
|
||||
|
@ -48,10 +57,10 @@ export class RichTextEditorComponent {
|
|||
[
|
||||
'fontSize',
|
||||
'backgroundColor',
|
||||
'customClasses',
|
||||
// 'customClasses',
|
||||
'insertImage',
|
||||
'insertVideo',
|
||||
'removeFormat',
|
||||
// 'removeFormat',
|
||||
'toggleEditorMode'
|
||||
]
|
||||
]
|
||||
|
@ -64,4 +73,10 @@ export class RichTextEditorComponent {
|
|||
ngAfterContentInit() {
|
||||
this.editorConfig.editable = this.editable;
|
||||
}
|
||||
|
||||
pasteWithoutFormatting($event) {
|
||||
$event.preventDefault();
|
||||
const text = $event.clipboardData.getData("text/plain");
|
||||
window.document.execCommand("insertText", false, text);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,122 +7,98 @@
|
|||
|
||||
|
||||
<!-- Total steps: {{stepper.steps.length}} -->
|
||||
<div id="header-outer-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-12 d-flex" id="title-column">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 d-flex" id="title-column">
|
||||
<div style="padding-left: 2em;">
|
||||
<h3 *ngIf="isNew && !isClone && !isNewVersion">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE' | translate}}</h3>
|
||||
<h3 *ngIf="isNew && isClone">
|
||||
<span *ngIf="isClone">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE-CLONE' | translate}}</span>
|
||||
{{form.get('label').value}}
|
||||
</h3>
|
||||
<h3 *ngIf="isNew && isNewVersion">
|
||||
<span *ngIf="isNewVersion">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE-VERSION' | translate}}</span>
|
||||
{{form.get('label').value}}
|
||||
</h3>
|
||||
|
||||
<div style="padding-left: 2em;">
|
||||
<h3 *ngIf="isNew && !isClone && !isNewVersion">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE' | translate}}</h3>
|
||||
<h3 *ngIf="isNew && isClone">
|
||||
<span *ngIf="isClone">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE-CLONE' | translate}}</span>
|
||||
{{form.get('label').value}}
|
||||
</h3>
|
||||
<h3 *ngIf="isNew && isNewVersion">
|
||||
<span *ngIf="isNewVersion">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE-VERSION' | translate}}</span>
|
||||
{{form.get('label').value}}
|
||||
</h3>
|
||||
<h3 *ngIf="!isNew">{{form.get('label').value}}</h3>
|
||||
</div>
|
||||
<ng-container *ngTemplateOutlet="actions"></ng-container>
|
||||
|
||||
<h3 *ngIf="!isNew">{{form.get('label').value}}</h3>
|
||||
|
||||
<!-- <div class="d-flex justify-content-end" style="gap: 1em">
|
||||
<button mat-raised-button *ngIf="form.get('status').value==1" class="template_action_btn" (click)="downloadXML();" type="button" [@action-btn]>{{
|
||||
'DATASET-WIZARD.ACTIONS.DOWNLOAD-XML' | translate }}</button>
|
||||
|
||||
<ng-container *ngIf="!viewOnly">
|
||||
<button mat-raised-button class="template_action_btn" type="button"
|
||||
*ngIf="stepper.selectedIndex !=2 && !newVersionId"
|
||||
[@action-btn]
|
||||
(click)='finalize()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |
|
||||
translate}}</button>
|
||||
<button mat-raised-button class="template_action_btn" type="button" [@action-btn]
|
||||
*ngIf="!newVersionId || (newVersionId && stepper.selectedIndex !=2)"
|
||||
(click)='onSubmit()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |
|
||||
translate}}</button>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="showUpdateButton()">
|
||||
<button mat-raised-button class="template_action_btn" type="button"
|
||||
*ngIf="stepper.selectedIndex !=2 && !newVersionId"
|
||||
[@action-btn]
|
||||
(click)='updateFinalized()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |
|
||||
translate}}</button>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!isNew">
|
||||
<button mat-raised-button class="template_action_btn" (click)="delete()" [@action-btn]>
|
||||
<mat-icon>delete</mat-icon>{{'DATASET-PROFILE-EDITOR.ACTIONS.DELETE' | translate}}
|
||||
</button>
|
||||
</ng-container>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- <div class="d-flex justify-content-end" style="gap: 1em">
|
||||
<button mat-raised-button *ngIf="form.get('status').value==1" class="template_action_btn" (click)="downloadXML();" type="button" [@action-btn]>{{
|
||||
'DATASET-WIZARD.ACTIONS.DOWNLOAD-XML' | translate }}</button>
|
||||
|
||||
<ng-container *ngIf="!viewOnly">
|
||||
<button mat-raised-button class="template_action_btn" type="button"
|
||||
*ngIf="stepper.selectedIndex !=2 && !newVersionId"
|
||||
[@action-btn]
|
||||
(click)='finalize()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |
|
||||
translate}}</button>
|
||||
<button mat-raised-button class="template_action_btn" type="button" [@action-btn]
|
||||
*ngIf="!newVersionId || (newVersionId && stepper.selectedIndex !=2)"
|
||||
(click)='onSubmit()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |
|
||||
translate}}</button>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="showUpdateButton()">
|
||||
<button mat-raised-button class="template_action_btn" type="button"
|
||||
*ngIf="stepper.selectedIndex !=2 && !newVersionId"
|
||||
[@action-btn]
|
||||
(click)='updateFinalized()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |
|
||||
translate}}</button>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!isNew">
|
||||
<button mat-raised-button class="template_action_btn" (click)="delete()" [@action-btn]>
|
||||
<mat-icon>delete</mat-icon>{{'DATASET-PROFILE-EDITOR.ACTIONS.DELETE' | translate}}
|
||||
</button>
|
||||
</ng-container>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row stepper-navigation-outer-wrapper" >
|
||||
<div class="row stepper-navigation-outer-wrapper" >
|
||||
|
||||
|
||||
<!-- Steps Navigation -->
|
||||
<div id="stepper-navigation-wrapper">
|
||||
<div class="col-12 d-flex" *ngIf="steps" id="stepper-navigation">
|
||||
<div class="col-7 bg-white" style="overflow: hidden; padding: 0px" id="progress-container">
|
||||
<div id="progress" [ngStyle]="progressStyle"></div>
|
||||
<div class="row h-100">
|
||||
<div class="col text-center align-self-center" *ngFor="let step of steps; index as idx">
|
||||
<span (click)="stepper.selectedIndex=idx"
|
||||
class="stepper-title-label"
|
||||
[ngClass]="{'stepper-title-label-locked': !isStepUnlocked(idx),'stepper-title-label-completed':idx < stepper.selectedIndex} ">
|
||||
<ng-container *ngIf="(step.completed &&(idx!=steps.length-1)) else numberLabel">
|
||||
<mat-icon style="font-size:0.7em; height: 0px;">done</mat-icon>
|
||||
</ng-container>
|
||||
<ng-template #numberLabel>
|
||||
{{idx+1}}
|
||||
</ng-template>
|
||||
{{step.label}}
|
||||
</span>
|
||||
<!-- Steps Navigation -->
|
||||
<div id="stepper-navigation-wrapper">
|
||||
<div class="col-12 d-flex" *ngIf="steps" id="stepper-navigation">
|
||||
<!-- <button [@previous_btn] mat-button class="navigate-btn mr-3" (click)="stepper.previous()"-->
|
||||
<!-- [class.navigate-btn-disabled]="stepper.selectedIndex ==0">-->
|
||||
<!-- <mat-icon class="back-icon pointer">chevron_left</mat-icon>-->
|
||||
<!-- {{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}-->
|
||||
<!-- </button>-->
|
||||
|
||||
<div class="col-7 bg-white" style="overflow: hidden; padding: 0px" id="progress-container">
|
||||
<div id="progress" [ngStyle]="progressStyle"></div>
|
||||
<div class="row h-100 progress-min-height">
|
||||
<div class="col text-center align-self-center" *ngFor="let step of steps; index as idx">
|
||||
<span (click)="stepper.selectedIndex=idx"
|
||||
class="stepper-title-label"
|
||||
[ngClass]="{'stepper-title-label-locked': !isStepUnlocked(idx),'stepper-title-label-completed':idx < stepper.selectedIndex} ">
|
||||
<ng-container *ngIf="(step.completed &&(idx!=steps.length-1)) else numberLabel">
|
||||
<mat-icon style="font-size:0.7em; height: 0px;">done</mat-icon>
|
||||
</ng-container>
|
||||
<ng-template #numberLabel>
|
||||
{{idx+1}}
|
||||
</ng-template>
|
||||
{{step.label}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <button mat-button class="navigate-btn ml-3"-->
|
||||
<!-- [@next_btn]-->
|
||||
<!-- (click)="validateStep(stepper.selectedIndex);stepper.next();"-->
|
||||
<!-- [ngClass]="{'navigate-btn-disabled': !isStepCompleted(stepper.selectedIndex) || (stepper.selectedIndex === (steps.length-1))}">-->
|
||||
<!-- <span>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}</span>-->
|
||||
<!-- <mat-icon class="back-icon pointer">chevron_right</mat-icon>-->
|
||||
<!-- </button>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col d-flex justify-content-end" style="padding-right: 0px;">
|
||||
<button [@previous_btn] mat-button class="navigate-btn" (click)="stepper.previous()" *ngIf="stepper.selectedIndex !=0">
|
||||
<!-- <mat-icon>navigate_before</mat-icon> -->
|
||||
{{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}
|
||||
</button>
|
||||
<button mat-button class="navigate-btn ml-3"
|
||||
[@next_btn]
|
||||
(click)="validateStep(stepper.selectedIndex);stepper.next();"
|
||||
*ngIf="stepper.selectedIndex != (steps.length-1)"
|
||||
[ngClass]="{'navigate-btn-disabled': !isStepCompleted(stepper.selectedIndex)}">
|
||||
|
||||
<mat-icon style="font-size: 1.66em;">navigate_next</mat-icon>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}
|
||||
</button>
|
||||
|
||||
|
||||
<ng-container *ngIf="steps.length-1 === stepper.selectedIndex">
|
||||
<button [@finalize_btn] mat-button class="finalize-btn ml-3"
|
||||
[disabled]="!form.valid"
|
||||
(click)="updateAndFinalize()"
|
||||
>
|
||||
|
||||
<ng-container *ngIf="form.get('status').value==1">
|
||||
<ng-container *ngIf="newVersionId else updateText">
|
||||
{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |translate}}
|
||||
</ng-container>
|
||||
<ng-template #updateText>
|
||||
{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |translate}}
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="form.get('status').value!=1">
|
||||
{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |translate}}
|
||||
</ng-container>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -134,12 +110,7 @@
|
|||
<mat-step [label]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.TITLE' | translate" [completed]="(!form.get('label').invalid && !form.get('description').invalid && !form.get('language').invalid)" >
|
||||
<!-- <ng-template matStepLabel>{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.TITLE' | translate}}
|
||||
</ng-template> -->
|
||||
<div class="row">
|
||||
<div class="col-3 side-actions">
|
||||
<ng-container *ngTemplateOutlet="actions">
|
||||
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div class="col">
|
||||
<div class="col-12">
|
||||
<div class="heading">1.1 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NAME'| translate}} *</div>
|
||||
|
@ -267,10 +238,6 @@
|
|||
(dataNeedsRefresh)="onDataNeedsRefresh($event)"
|
||||
[colorizeInvalid]="colorizeInvalid">
|
||||
</dataset-profile-table-of-contents>
|
||||
<ng-container *ngIf="true then actions">
|
||||
|
||||
</ng-container>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -281,7 +248,7 @@
|
|||
<div class="row">
|
||||
|
||||
<div class="col">
|
||||
<div class="row" *ngIf="selectedTocEntry">
|
||||
<div class="col-12" *ngIf="selectedTocEntry">
|
||||
|
||||
<!-- PAGE INFO -->
|
||||
<div class="col-12 content-displayer" *ngIf="selectedTocEntry.type === tocEntryEnumValues.Page" [@fade-in-fast]>
|
||||
|
@ -370,17 +337,13 @@
|
|||
<!-- {{'DATASET-PROFILE-EDITOR.ACTIONS.PREVIEW-AND-FINALIZE' | translate}} -->
|
||||
<!-- <button (click)="generatePreviewForm()">foo</button> -->
|
||||
<ng-container *ngIf="formGroup">
|
||||
<div class="row">
|
||||
<div class="col-3 sticky-top" style="display: flex; height: 40vh;">
|
||||
|
||||
<ng-container *ngTemplateOutlet="actions">
|
||||
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div class="col">
|
||||
<div class="col-12">
|
||||
<app-final-preview-component [formGroup]="formGroup" [visibilityRules]="visibilityRules">
|
||||
|
||||
</app-final-preview-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -441,13 +404,37 @@
|
|||
|
||||
</ng-container> -->
|
||||
|
||||
<div class="scroll-on-top">
|
||||
<button mat-fab (click)="scrollOnTop()" *ngIf="showScrollOnTopButton" [@scroll-on-top-btn] [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.BACK-TO-TOP'| translate">
|
||||
<mat-icon>
|
||||
keyboard_arrow_up
|
||||
</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<!-- <div class="scroll-on-top">-->
|
||||
<!-- <button mat-fab (click)="scrollOnTop()" *ngIf="showScrollOnTopButton" [@scroll-on-top-btn] [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.BACK-TO-TOP'| translate">-->
|
||||
<!-- <mat-icon>-->
|
||||
<!-- keyboard_arrow_up-->
|
||||
<!-- </mat-icon>-->
|
||||
<!-- </button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<a class="scroll-on-top d-flex flex-column align-items-center" (click)="scrollOnTop()" *ngIf="showScrollOnTopButton" [@scroll-on-top-btn] [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.BACK-TO-TOP'| translate">
|
||||
<mat-icon>
|
||||
arrow_upward
|
||||
</mat-icon>
|
||||
<div>SCROLL</div>
|
||||
</a>
|
||||
|
||||
<ng-container *ngIf="steps && stepper">
|
||||
<div class="floating-btn">
|
||||
<button *ngIf="stepper?.selectedIndex > 0" [@previous_btn] mat-button
|
||||
class="navigate-btn" (click)="stepper?.previous()">
|
||||
<mat-icon class="back-icon pointer">chevron_left</mat-icon>
|
||||
{{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}
|
||||
</button>
|
||||
<button *ngIf="stepper?.selectedIndex < (steps.length-1)" mat-button
|
||||
class="navigate-btn ml-3" [@next_btn]
|
||||
(click)="validateStep(stepper?.selectedIndex);stepper?.next();"
|
||||
[ngClass]="{'navigate-btn-disabled': !isStepCompleted(stepper?.selectedIndex)}">
|
||||
<span>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}</span>
|
||||
<mat-icon class="back-icon pointer">chevron_right</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<!-- <div class="row">
|
||||
<button (click)="printForm()">
|
||||
|
@ -479,9 +466,29 @@
|
|||
|
||||
|
||||
<ng-template #actions>
|
||||
<div class="actions-template">
|
||||
<button mat-raised-button class="template_action_btn" (click)="discardChanges()">{{'DATASET-WIZARD.ACTIONS.BACK' | translate}}</button>
|
||||
<button *ngIf="!viewOnly" mat-raised-button class="template_action_btn save-btn" (click)="onSubmit()" [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |translate}}</button>
|
||||
<button *ngIf="viewOnly" [@finalize_btn] mat-raised-button class="template_action_btn save-btn" (click)="updateAndFinalize()">{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |translate}}</button>
|
||||
<div>
|
||||
<button mat-raised-button class="template_action_btn mr-3" (click)="discardChanges()">{{'DATASET-WIZARD.ACTIONS.CLOSE' | translate}}</button>
|
||||
<button *ngIf="!viewOnly" mat-raised-button class="template_action_btn save-btn" (click)="onSubmit()" [disabled]="!form.valid">
|
||||
{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |translate}}
|
||||
<mat-icon (click)="$event.stopPropagation();" style="width: 14px;" [matMenuTriggerFor]="menuSave">expand_more</mat-icon>
|
||||
</button>
|
||||
<mat-menu #menuSave="matMenu">
|
||||
<button [disabled]="!form.valid" mat-menu-item (click)="onSubmit(true)" type="button">{{ 'DATASET-WIZARD.ACTIONS.SAVE-AND-CLOSE' | translate }}</button>
|
||||
<button [disabled]="!form.valid" mat-menu-item (click)="onSubmit()" type="button">{{ 'DATASET-WIZARD.ACTIONS.SAVE-AND-CONTINUE' | translate }}</button>
|
||||
</mat-menu>
|
||||
|
||||
<button *ngIf="viewOnly" [@finalize_btn] mat-raised-button class="template_action_btn save-btn" [disabled]="!form.valid" (click)="updateAndFinalize()">
|
||||
{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |translate}}
|
||||
</button>
|
||||
|
||||
<button *ngIf="!viewOnly && steps?.length-1 === stepper?.selectedIndex"
|
||||
[@finalize_btn] mat-button class="finalize-btn ml-3"
|
||||
[disabled]="!form.valid"
|
||||
[class.invisible]="steps?.length-1 !== stepper?.selectedIndex"
|
||||
(click)="updateAndFinalize()">
|
||||
<ng-container *ngIf="form.get('status').value!=1">
|
||||
{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |translate}}
|
||||
</ng-container>
|
||||
</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.dataset-profile-editor {
|
||||
margin-top: 1.3rem;
|
||||
//margin-top: 1.3rem;
|
||||
|
||||
.full-width {
|
||||
width: 100%;
|
||||
|
@ -146,7 +146,7 @@ $blue-color-light: #5cf7f2;
|
|||
padding-right: 2em;
|
||||
box-shadow: 0px 3px 6px #1E202029;
|
||||
color: #212121;
|
||||
|
||||
|
||||
transition-property: background-color, color;
|
||||
transition-duration: 200ms;
|
||||
transition-delay: 50ms;
|
||||
|
@ -317,11 +317,25 @@ $blue-color-light: #5cf7f2;
|
|||
text-align: center;
|
||||
}
|
||||
.scroll-on-top{
|
||||
position: fixed;
|
||||
bottom: 20em;
|
||||
right: 2em;
|
||||
color: #129D99 !important;
|
||||
cursor: pointer;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.floating-btn {
|
||||
position: fixed;
|
||||
bottom: 2em;
|
||||
right: 2em;
|
||||
}
|
||||
|
||||
.progress-min-height {
|
||||
min-height: 35px;
|
||||
}
|
||||
|
||||
|
||||
#stepper-navigation-wrapper{
|
||||
z-index: 99;
|
||||
|
@ -343,6 +357,14 @@ $blue-color-light: #5cf7f2;
|
|||
.stepper-navigation-outer-wrapper{
|
||||
padding: 2em;
|
||||
margin-bottom: 1em;
|
||||
//background: #f4f4f4;
|
||||
//position: sticky;
|
||||
//top: 0.01em;
|
||||
//z-index: 9999;
|
||||
}
|
||||
|
||||
#header-outer-wrapper {
|
||||
padding-top: 1.3rem;
|
||||
background: #f4f4f4;
|
||||
position: sticky;
|
||||
top: 0.01em;
|
||||
|
@ -359,4 +381,4 @@ $blue-color-light: #5cf7f2;
|
|||
height: 40vh;
|
||||
position: sticky;
|
||||
top: 2em;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ export class DatasetProfileEditorComponent extends CheckDeactivateBaseComponent
|
|||
inputUserState: 'untriggered'| 'triggered' = 'untriggered';
|
||||
private _inputUserField$:BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
private _inputUserButton$:BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
showScrollOnTopButton:boolean = false;
|
||||
showScrollOnTopButton:boolean = true;
|
||||
|
||||
private stepperNavigationObserver: IntersectionObserver;
|
||||
|
||||
|
@ -246,34 +246,34 @@ export class DatasetProfileEditorComponent extends CheckDeactivateBaseComponent
|
|||
if(tocentries && tocentries.length){
|
||||
this.selectedTocEntry = tocentries[0];
|
||||
}
|
||||
setTimeout(() => {
|
||||
// const stepperNavigation = document.getElementById('stepper-navigation');
|
||||
const titleColumn = document.getElementById('title-column');
|
||||
// const stepperNavigationWrapper = document.getElementById('stepper-navigation-wrapper');
|
||||
|
||||
if(titleColumn){
|
||||
if(this.stepperNavigationObserver){
|
||||
this.stepperNavigationObserver.disconnect();
|
||||
this.stepperNavigationObserver = null;
|
||||
}
|
||||
this.stepperNavigationObserver = new IntersectionObserver((e)=>{
|
||||
e.forEach(_=>{
|
||||
if(_.isIntersecting){
|
||||
this.showScrollOnTopButton = false;
|
||||
// stepperNavigation.classList.remove('fixed-navigation');
|
||||
// stepperNavigationWrapper.classList.remove('fixed-navigation');
|
||||
}else{
|
||||
this.showScrollOnTopButton = true;
|
||||
// stepperNavigation.classList.add('fixed-navigation');
|
||||
// stepperNavigationWrapper.classList.add('fixed-navigation');
|
||||
}
|
||||
})
|
||||
}, {root:null, rootMargin:'0px', threshold:0});
|
||||
this.stepperNavigationObserver.observe(titleColumn);
|
||||
}else{
|
||||
console.log('Could not load scroll On Top Observer')
|
||||
}
|
||||
}, 400);
|
||||
// setTimeout(() => {
|
||||
// // const stepperNavigation = document.getElementById('stepper-navigation');
|
||||
// // const titleColumn = document.getElementById('title-column');
|
||||
// // const stepperNavigationWrapper = document.getElementById('stepper-navigation-wrapper');
|
||||
//
|
||||
// if(titleColumn){
|
||||
// if(this.stepperNavigationObserver){
|
||||
// this.stepperNavigationObserver.disconnect();
|
||||
// this.stepperNavigationObserver = null;
|
||||
// }
|
||||
// this.stepperNavigationObserver = new IntersectionObserver((e)=>{
|
||||
// e.forEach(_=>{
|
||||
// if(_.isIntersecting){
|
||||
// this.showScrollOnTopButton = false;
|
||||
// // stepperNavigation.classList.remove('fixed-navigation');
|
||||
// // stepperNavigationWrapper.classList.remove('fixed-navigation');
|
||||
// }else{
|
||||
// this.showScrollOnTopButton = true;
|
||||
// // stepperNavigation.classList.add('fixed-navigation');
|
||||
// // stepperNavigationWrapper.classList.add('fixed-navigation');
|
||||
// }
|
||||
// })
|
||||
// }, {root:null, rootMargin:'0px', threshold:0});
|
||||
// this.stepperNavigationObserver.observe(titleColumn);
|
||||
// }else{
|
||||
// console.log('Could not load scroll On Top Observer')
|
||||
// }
|
||||
// }, 400);
|
||||
// this._initializeFormValidity(tocentries);
|
||||
|
||||
//Checking invalid visibilty RULES
|
||||
|
@ -424,7 +424,7 @@ export class DatasetProfileEditorComponent extends CheckDeactivateBaseComponent
|
|||
// (<FormArray>this.form.get('sections')).removeAt(index);
|
||||
// }
|
||||
|
||||
onSubmit() {
|
||||
onSubmit(close: boolean = false) {
|
||||
let data = this.form.value;
|
||||
|
||||
if (this.datasetProfileId) {
|
||||
|
@ -432,7 +432,9 @@ export class DatasetProfileEditorComponent extends CheckDeactivateBaseComponent
|
|||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(() => {
|
||||
this.form.markAsPristine();//deactivate guard
|
||||
this.router.navigate(['/dataset-profiles']);
|
||||
if(close) {
|
||||
this.router.navigate(['/dataset-profiles']);
|
||||
}
|
||||
this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-PROFILE-EDITOR.FEEDBACK-MESSAGES.SAVE-SUCCESS'), SnackBarNotificationLevel.Success);
|
||||
},error=> this.onCallbackError(error));
|
||||
} else if (this.newVersionId) {
|
||||
|
@ -442,8 +444,10 @@ export class DatasetProfileEditorComponent extends CheckDeactivateBaseComponent
|
|||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(() => {
|
||||
this.form.markAsPristine();//deactivate guard
|
||||
this.router.navigate(['/dataset-profiles']);
|
||||
this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-PROFILE-EDITOR.FEEDBACK-MESSAGES.SAVE-SUCCESS'), SnackBarNotificationLevel.Success);
|
||||
if(close) {
|
||||
this.router.navigate(['/dataset-profiles']);
|
||||
}
|
||||
this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-PROFILE-EDITOR.FEEDBACK-MESSAGES.SAVE-SUCCESS'), SnackBarNotificationLevel.Success);
|
||||
},
|
||||
error => this.onCallbackErrorNewVersion(error)
|
||||
);
|
||||
|
@ -456,7 +460,9 @@ export class DatasetProfileEditorComponent extends CheckDeactivateBaseComponent
|
|||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(() => {
|
||||
this.form.markAsPristine();//deactivate guard
|
||||
this.router.navigate(['/dataset-profiles']);
|
||||
if(close) {
|
||||
this.router.navigate(['/dataset-profiles']);
|
||||
}
|
||||
this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-PROFILE-EDITOR.FEEDBACK-MESSAGES.SAVE-SUCCESS'), SnackBarNotificationLevel.Success);
|
||||
}, error=> this.onCallbackError(error));
|
||||
}
|
||||
|
|
|
@ -82,12 +82,12 @@
|
|||
<div>{{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}</div>
|
||||
</div>
|
||||
<div *ngIf="this.step < this.maxStep" mat-raised-button type="button" class="col-auto stepper-btn dataset-next ml-auto" (click)="nextStep()">
|
||||
<span class="material-icons">chevron_right</span>
|
||||
<div>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}</div>
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</div>
|
||||
<div *ngIf="!formGroup.get('profile').value" mat-raised-button type="button" class="col-auto stepper-btn dataset-next next-disabled ml-auto">
|
||||
<span class="material-icons">chevron_right</span>
|
||||
<div>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}</div>
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</div>
|
||||
<button [disabled]="saving" (click)="save(saveAnd.addNew)" *ngIf="(step === maxStep) && !lockStatus && formGroup.get('profile').value && !viewOnly" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto">
|
||||
{{ 'DATASET-WIZARD.ACTIONS.SAVE-AND-ADD' | translate }}
|
||||
|
|
|
@ -775,6 +775,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
|
|||
const errorMessages = this._buildSemiFormErrorMessages();
|
||||
this.showValidationErrorsDialog(undefined, errorMessages);
|
||||
this.hintErrors = true;
|
||||
this.saving = false;
|
||||
return;
|
||||
}
|
||||
this.submit(saveType);
|
||||
|
@ -853,7 +854,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
|
|||
|
||||
saveFinalize() {
|
||||
// this.formService.touchAllFormFields(this.formGroup);
|
||||
|
||||
this.saving = true;
|
||||
if (!this.isSemiFormValid(this.formGroup) || (this.table0fContents && this.table0fContents.hasVisibleInvalidFields())) {
|
||||
// this.showValidationErrorsDialog();
|
||||
this.dialog.open(FormValidationErrorsDialogComponent, {
|
||||
|
@ -865,6 +866,7 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
|
|||
|
||||
this.touchForm();
|
||||
this.hintErrors = true;
|
||||
this.saving = false;
|
||||
return;
|
||||
}
|
||||
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||
|
|
|
@ -90,8 +90,8 @@
|
|||
<div>{{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}</div>
|
||||
</div>
|
||||
<div *ngIf="this.step < 3" mat-raised-button type="button" class="col-auto stepper-btn ml-auto" [ngClass]="{ 'next-disabled': this.step === this.maxStep, 'next': this.step < stepsBeforeDatasets, 'dataset-next': this.step >= stepsBeforeDatasets }" (click)="nextStep()">
|
||||
<span class="material-icons">chevron_right</span>
|
||||
<div>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}</div>
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</div>
|
||||
<div *ngIf="this.step >= 3 && hasProfile() && !isFinalized" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto" (click)="addDataset()" target="_blank">
|
||||
<mat-icon>add</mat-icon>
|
||||
|
|
|
@ -69,8 +69,8 @@
|
|||
<div>{{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}</div>
|
||||
</div>
|
||||
<div *ngIf="this.step < 3" mat-raised-button type="button" class="col-auto stepper-btn ml-auto" [ngClass]="{ 'next-disabled': this.step === this.maxStep, 'next': this.step < stepsBeforeDatasets, 'dataset-next': this.step >= stepsBeforeDatasets }" (click)="nextStep()">
|
||||
<span class="material-icons">chevron_right</span>
|
||||
<div>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}</div>
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</div>
|
||||
<!-- <div *ngIf="this.step >= 3 && hasProfile() && !isFinalized" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto" (click)="addDataset()" target="_blank"> -->
|
||||
<button [disabled]="saving" *ngIf="this.step >= 3 && !isFinalized" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto" (click)="addDataset()" target="_blank">
|
||||
|
|
|
@ -20,6 +20,44 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Visibility field-->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="heading">3.2 {{'DMP-EDITOR.FIELDS.VISIBILITY' | translate}}</div>
|
||||
<div class="hint">{{'DMP-EDITOR.FIELDS.VISIBILITY-HINT' | translate}}</div>
|
||||
<div class="visibility-form">
|
||||
<mat-form-field>
|
||||
<mat-select [formControl]="formGroup.get('extraProperties').get('visible')" placeholder="{{'DMP-EDITOR.FIELDS.VISIBILITY' | translate}}">
|
||||
<mat-option *ngFor="let vis of visibles" [value]="vis.value">
|
||||
{{vis.name | translate}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('visible').hasError('backendError')">
|
||||
{{formGroup.get('extraProperties').get('visible').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('visible').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Publication Field -->
|
||||
<div class="row" *ngIf="formGroup.get('extraProperties').get('visible').value">
|
||||
<div class="col-12">
|
||||
<div class="heading">3.3 {{'DMP-EDITOR.FIELDS.PUBLICATION' | translate}}*</div>
|
||||
<!-- <div class="hint">{{'DMP-EDITOR.LICENSE-INFO.HINT' | translate}}</div> -->
|
||||
<div class="publication-form">
|
||||
<mat-form-field>
|
||||
<input matInput [matDatepicker]="picker" [formControl]="formGroup.get('extraProperties').get('publicDate')" placeholder="{{'DMP-EDITOR.FIELDS.PUBLICATION' | translate}}" [required]="formGroup.get('extraProperties').get('visible').value">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('publicDate').hasError('backendError')">
|
||||
{{formGroup.get('extraProperties').get('publicDate').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('publicDate').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row">
|
||||
<div class="col-12">
|
||||
<div class="heading">4.6 {{'DMP-EDITOR.FIELDS.COST' | translate}}</div>
|
||||
|
|
|
@ -15,7 +15,10 @@ import { LicenseCriteria } from '@app/core/query/license/license-criteria';
|
|||
import { AddCostComponent } from '../cost-editor/add-cost/add-cost.component';
|
||||
import { CostEditorModel } from '../cost-editor/add-cost/add-cost.model';
|
||||
|
||||
|
||||
interface Visible {
|
||||
value: boolean;
|
||||
name: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'license-info',
|
||||
|
@ -33,6 +36,11 @@ export class LicenseInfoComponent extends BaseComponent implements OnInit {
|
|||
|
||||
public formControl = new FormControl();
|
||||
|
||||
visibles: Visible[] = [
|
||||
{ value: true, name: 'DMP-EDITOR.VISIBILITY.PUBLIC' },
|
||||
{ value: false, name: 'DMP-EDITOR.VISIBILITY.RESTRICTED' }
|
||||
]
|
||||
|
||||
licenseAutoCompleteConfiguration: SingleAutoCompleteConfiguration = {
|
||||
filterFn: this.licenseSearch.bind(this),
|
||||
initialItems: (excludedItems: any[]) => this.licenseSearch('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
|
||||
|
|
|
@ -31,50 +31,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Language field -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="heading">1.3 {{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}*</div>
|
||||
<div class="hint">{{'DMP-EDITOR.FIELDS.LANGUAGE-HINT' | translate}}</div>
|
||||
<div class="language-form">
|
||||
<mat-form-field>
|
||||
<mat-select [formControl]="formGroup.get('extraProperties').get('language')" placeholder="{{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}" required>
|
||||
<mat-option *ngFor="let lang of getLanguageInfos()" [value]="lang.code">
|
||||
{{ lang.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('language').hasError('backendError')">
|
||||
{{formGroup.get('extraProperties').get('language').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('language').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Visibility field-->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="heading">1.4 {{'DMP-EDITOR.FIELDS.VISIBILITY' | translate}}</div>
|
||||
<div class="hint">{{'DMP-EDITOR.FIELDS.VISIBILITY-HINT' | translate}}</div>
|
||||
<div class="visibility-form">
|
||||
<mat-form-field>
|
||||
<mat-select [formControl]="formGroup.get('extraProperties').get('visible')" placeholder="{{'DMP-EDITOR.FIELDS.VISIBILITY' | translate}}">
|
||||
<mat-option *ngFor="let vis of visibles" [value]="vis.value">
|
||||
{{vis.name | translate}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('visible').hasError('backendError')">
|
||||
{{formGroup.get('extraProperties').get('visible').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('visible').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Researchers field-->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="heading">1.5 {{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}</div>
|
||||
<div class="heading">1.3 {{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}</div>
|
||||
<div class="hint">
|
||||
<div class="pb-1">{{'DMP-EDITOR.FIELDS.RESEARCHERS-HINT' | translate}}</div>
|
||||
<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
|
||||
|
@ -102,7 +62,7 @@
|
|||
<!-- Organizations Field -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="heading">1.6 {{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}</div>
|
||||
<div class="heading">1.4 {{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}</div>
|
||||
<div class="hint">
|
||||
<div class="pb-1">{{'DMP-EDITOR.FIELDS.ORGANISATIONS-HINT' | translate}}</div>
|
||||
<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
|
||||
|
@ -126,10 +86,30 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Language field -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="heading">1.5 {{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}*</div>
|
||||
<div class="hint">{{'DMP-EDITOR.FIELDS.LANGUAGE-HINT' | translate}}</div>
|
||||
<div class="language-form">
|
||||
<mat-form-field>
|
||||
<mat-select [formControl]="formGroup.get('extraProperties').get('language')" placeholder="{{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}" required>
|
||||
<mat-option *ngFor="let lang of getLanguageInfos()" [value]="lang.code">
|
||||
{{ lang.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('language').hasError('backendError')">
|
||||
{{formGroup.get('extraProperties').get('language').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('language').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Contact Field -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="heading">1.7 {{'DMP-EDITOR.FIELDS.CONTACT' | translate}}*</div>
|
||||
<div class="heading">1.6 {{'DMP-EDITOR.FIELDS.CONTACT' | translate}}*</div>
|
||||
<!-- <div class="hint">{{'DMP-EDITOR.LICENSE-INFO.HINT' | translate}}</div> -->
|
||||
<div class="contact-form">
|
||||
<mat-form-field>
|
||||
|
@ -146,23 +126,5 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Publication Field -->
|
||||
<div class="row" *ngIf="formGroup.get('extraProperties').get('visible').value">
|
||||
<div class="col-12">
|
||||
<div class="heading">1.8 {{'DMP-EDITOR.FIELDS.PUBLICATION' | translate}}*</div>
|
||||
<!-- <div class="hint">{{'DMP-EDITOR.LICENSE-INFO.HINT' | translate}}</div> -->
|
||||
<div class="publication-form">
|
||||
<mat-form-field>
|
||||
<input matInput [matDatepicker]="picker" [formControl]="formGroup.get('extraProperties').get('publicDate')" placeholder="{{'DMP-EDITOR.FIELDS.PUBLICATION' | translate}}" [required]="formGroup.get('extraProperties').get('visible').value">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('publicDate').hasError('backendError')">
|
||||
{{formGroup.get('extraProperties').get('publicDate').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('extraProperties').get('publicDate').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -25,11 +25,6 @@ import { AuthService } from '@app/core/services/auth/auth.service';
|
|||
import { Principal } from '@app/core/model/auth/principal';
|
||||
import { OrganisationService } from '@app/core/services/organisation/organisation.service';
|
||||
|
||||
interface Visible {
|
||||
value: boolean;
|
||||
name: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'main-info',
|
||||
templateUrl: './main-info.component.html',
|
||||
|
@ -45,10 +40,6 @@ export class MainInfoComponent extends BaseComponent implements OnInit {
|
|||
|
||||
@Output() onFormChanged: EventEmitter<any> = new EventEmitter();
|
||||
public formControl = new FormControl();
|
||||
visibles: Visible[] = [
|
||||
{ value: true, name: 'DMP-EDITOR.VISIBILITY.PUBLIC' },
|
||||
{ value: false, name: 'DMP-EDITOR.VISIBILITY.RESTRICTED' }
|
||||
]
|
||||
|
||||
private associates: UserModel[] = [];
|
||||
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"ACTIONS": {
|
||||
"NEXT": "Weiter",
|
||||
"BACK": "Zurück",
|
||||
"CLOSE": "Schließen",
|
||||
"BACK-TO": "Back to",
|
||||
"DELETE": "Löschen",
|
||||
"GO-TO-GRANT": "Gehe zu Datansatzbeschreibung Förderung",
|
||||
|
@ -1658,7 +1659,7 @@
|
|||
},
|
||||
"USER-PROFILE": {
|
||||
"MERGING-EMAILS-DIALOG": {
|
||||
"TITLE": "Link new account",
|
||||
"TITLE": "Verify linked account",
|
||||
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
|
||||
},
|
||||
"SETTINGS": {
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"ACTIONS": {
|
||||
"NEXT": "Next",
|
||||
"BACK": "Back",
|
||||
"CLOSE": "Close",
|
||||
"BACK-TO": "Back to",
|
||||
"DELETE": "Delete",
|
||||
"GO-TO-GRANT": "Go to Dataset's Grant",
|
||||
|
@ -1032,8 +1033,8 @@
|
|||
"LANGUAGE": "Language",
|
||||
"LANGUAGE-HINT": "Select the language of your DMP",
|
||||
"LICENSE": "License",
|
||||
"VISIBILITY": "Visibility",
|
||||
"VISIBILITY-HINT": "Choose how the DMP is displayed in Argos. By choosing Public, the DMP is automatically made available to all users from the “Public DMPs” collection.",
|
||||
"VISIBILITY": "Access Rights",
|
||||
"VISIBILITY-HINT": "Choose how the DMP is displayed after is published on Zenodo. By choosing Open Access, the DMP will be open on Zenodo after the Publication Date. By choosing Restricted Access, the DMP will be restricted after the publication is made.",
|
||||
"PUBLICATION": "Publication Date",
|
||||
"CONTACT": "Contact",
|
||||
"COST": "Costs",
|
||||
|
@ -1071,16 +1072,16 @@
|
|||
"OK": "OK"
|
||||
},
|
||||
"VISIBILITY": {
|
||||
"PUBLIC": "Public",
|
||||
"RESTRICTED": "Restricted"
|
||||
"PUBLIC": "Open Access",
|
||||
"RESTRICTED": "Restricted Access"
|
||||
},
|
||||
"STEPPER": {
|
||||
"USER-GUIDE": "Guide steps",
|
||||
"MAIN-INFO": "Main info",
|
||||
"FUNDING-INFO": "Funding info",
|
||||
"FUNDING-INFO": "Funding",
|
||||
"DATASET-SELECTION": "Dataset selection",
|
||||
"DATASET-INFO": "Dataset info",
|
||||
"LICENSE-INFO": "License info",
|
||||
"LICENSE-INFO": "License",
|
||||
"DATASET": "Dataset",
|
||||
"PREVIOUS": "Previous",
|
||||
"NEXT": "Next"
|
||||
|
@ -1658,7 +1659,7 @@
|
|||
},
|
||||
"USER-PROFILE": {
|
||||
"MERGING-EMAILS-DIALOG": {
|
||||
"TITLE": "Link new account",
|
||||
"TITLE": "Verify linked account",
|
||||
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
|
||||
},
|
||||
"SETTINGS": {
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"ACTIONS": {
|
||||
"NEXT": "Siguiente",
|
||||
"BACK": "Volver",
|
||||
"CLOSE": "Cerrar",
|
||||
"BACK-TO": "Back to",
|
||||
"DELETE": "Borrar",
|
||||
"GO-TO-GRANT": "Ir a la subvención de la descripción del dataset",
|
||||
|
@ -1658,7 +1659,7 @@
|
|||
},
|
||||
"USER-PROFILE": {
|
||||
"MERGING-EMAILS-DIALOG": {
|
||||
"TITLE": "Link new account",
|
||||
"TITLE": "Verify linked account",
|
||||
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
|
||||
},
|
||||
"SETTINGS": {
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"ACTIONS": {
|
||||
"NEXT": "Επόμενο",
|
||||
"BACK": "Πίσω",
|
||||
"CLOSE": "Κλείσιμο",
|
||||
"BACK-TO": "Back to",
|
||||
"DELETE": "Διαγραφή",
|
||||
"GO-TO-GRANT": "Μετάβαση σε Περιγραφή Συνόλου Δεδομένων της Επιχορήγησης",
|
||||
|
@ -1658,7 +1659,7 @@
|
|||
},
|
||||
"USER-PROFILE": {
|
||||
"MERGING-EMAILS-DIALOG": {
|
||||
"TITLE": "Link new account",
|
||||
"TITLE": "Verify linked account",
|
||||
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
|
||||
},
|
||||
"SETTINGS": {
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"ACTIONS": {
|
||||
"NEXT": "Sljedeće",
|
||||
"BACK": "Prethodno",
|
||||
"CLOSE": "Ζatvori",
|
||||
"BACK-TO": "Natrag na",
|
||||
"DELETE": "Obriši",
|
||||
"GO-TO-GRANT": "Idi na potporu za skupove podataka",
|
||||
|
@ -1658,7 +1659,7 @@
|
|||
},
|
||||
"USER-PROFILE": {
|
||||
"MERGING-EMAILS-DIALOG": {
|
||||
"TITLE": "Link new account",
|
||||
"TITLE": "Verify linked account",
|
||||
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
|
||||
},
|
||||
"SETTINGS": {
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"ACTIONS": {
|
||||
"NEXT": "Seguinte",
|
||||
"BACK": "Voltar",
|
||||
"CLOSE": "Fechar",
|
||||
"BACK-TO": "Voltar para",
|
||||
"DELETE": "Eliminar",
|
||||
"GO-TO-GRANT": "Ir para o Grant do Dataset",
|
||||
|
@ -1658,7 +1659,7 @@
|
|||
},
|
||||
"USER-PROFILE": {
|
||||
"MERGING-EMAILS-DIALOG": {
|
||||
"TITLE": "Link new account",
|
||||
"TITLE": "Verify linked account",
|
||||
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
|
||||
},
|
||||
"SETTINGS": {
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"ACTIONS": {
|
||||
"NEXT": "Ďalej",
|
||||
"BACK": "Späť",
|
||||
"CLOSE": "Ζavrieť",
|
||||
"BACK-TO": "Späť na",
|
||||
"DELETE": "Vymazať",
|
||||
"GO-TO-GRANT": "Prejsť na Grant súboru dát",
|
||||
|
@ -1658,7 +1659,7 @@
|
|||
},
|
||||
"USER-PROFILE": {
|
||||
"MERGING-EMAILS-DIALOG": {
|
||||
"TITLE": "Link new account",
|
||||
"TITLE": "Verify linked account",
|
||||
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
|
||||
},
|
||||
"SETTINGS": {
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"ACTIONS": {
|
||||
"NEXT": "Sledeći",
|
||||
"BACK": "Nazad",
|
||||
"CLOSE": "Zatvorite",
|
||||
"BACK-TO": "Nazad na",
|
||||
"DELETE": "Obrišite",
|
||||
"GO-TO-GRANT": "Pređite na grant za skupove podataka",
|
||||
|
@ -1658,7 +1659,7 @@
|
|||
},
|
||||
"USER-PROFILE": {
|
||||
"MERGING-EMAILS-DIALOG": {
|
||||
"TITLE": "Link new account",
|
||||
"TITLE": "Verify linked account",
|
||||
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
|
||||
},
|
||||
"SETTINGS": {
|
||||
|
|
|
@ -716,6 +716,7 @@
|
|||
"ACTIONS": {
|
||||
"NEXT": "Sonraki",
|
||||
"BACK": "Geri",
|
||||
"CLOSE": "Kapat",
|
||||
"BACK-TO": "Geriye",
|
||||
"DELETE": "Sil",
|
||||
"GO-TO-GRANT": "Veri Seti Hibesine Git",
|
||||
|
@ -1658,7 +1659,7 @@
|
|||
},
|
||||
"USER-PROFILE": {
|
||||
"MERGING-EMAILS-DIALOG": {
|
||||
"TITLE": "Link new account",
|
||||
"TITLE": "Verify linked account",
|
||||
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
|
||||
},
|
||||
"SETTINGS": {
|
||||
|
|
Loading…
Reference in New Issue