diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/rule/dataset-profile-editor-rule.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/rule/dataset-profile-editor-rule.component.ts
index e0004a828..d6606e150 100644
--- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/rule/dataset-profile-editor-rule.component.ts
+++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/rule/dataset-profile-editor-rule.component.ts
@@ -90,28 +90,29 @@ export class DatasetProfileEditorRuleComponent implements OnInit{
const result:OptionItem[] = [];
- parentIds.push(form.get('id').value);
- result.push({
+ // parentIds.push(form.get('id').value);
+ const currentOptionItem:OptionItem = {
id: form.get('id').value,
type: type,
label: type ===ToCEntryType.Field? form.get('data').get('label').value :form.get('title').value,
// parentsIds: [form.get('id').value]
- parentsIds: [...parentIds]
- });
+ parentsIds: [...parentIds, form.get('id').value]
+ }
+ result.push(currentOptionItem);
if(sections){
sections.controls.forEach(section=>{
- result.push( ...this.buildOptions(section as FormGroup, ToCEntryType.Section,parentIds) );
+ result.push( ...this.buildOptions(section as FormGroup, ToCEntryType.Section, currentOptionItem.parentsIds) );
});
}
if(fieldSets){
fieldSets.controls.forEach(fieldset=>{
- result.push( ...this.buildOptions(fieldset as FormGroup, ToCEntryType.FieldSet, parentIds) );
+ result.push( ...this.buildOptions(fieldset as FormGroup, ToCEntryType.FieldSet, currentOptionItem.parentsIds) );
});
}
if(fields){
fields.controls.forEach(field=>{
- result.push( ...this.buildOptions(field as FormGroup, ToCEntryType.Field, parentIds) ); //TODO NA TO DOUME
+ result.push( ...this.buildOptions(field as FormGroup, ToCEntryType.Field, currentOptionItem.parentsIds) ); //TODO NA TO DOUME
});
}
diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html
index ee14ab7d8..947ecfaf7 100644
--- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html
+++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html
@@ -248,9 +248,11 @@
Preview and finalize
-
-
-
+
+
+
+
+
diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts
index f2182082d..df9ccb933 100644
--- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts
+++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts
@@ -1,10 +1,10 @@
import { of as observableOf, Observable } from 'rxjs';
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
-import { AfterViewInit, Component, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
+import { AfterViewInit, Component, OnChanges, OnInit, QueryList, SimpleChanges, ViewChild } from '@angular/core';
import { Form, FormArray, FormControl, FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
-import { MatHorizontalStepper } from '@angular/material/stepper';
+import { MatHorizontalStepper, MatStep } from '@angular/material/stepper';
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { map, takeUntil } from 'rxjs/operators';
@@ -35,7 +35,7 @@ import { FieldSetEditorModel } from '../admin/field-set-editor-model';
import { Guid } from '@common/types/guid';
import { FieldEditorModel } from '../admin/field-editor-model';
import { VisibilityRulesService } from '@app/ui/misc/dataset-description-form/visibility-rules/visibility-rules.service';
-import { StepperSelectionEvent } from '@angular/cdk/stepper';
+import { CdkStep, StepperSelectionEvent } from '@angular/cdk/stepper';
import { DatasetDescriptionCompositeFieldEditorModel, DatasetDescriptionFieldEditorModel, DatasetDescriptionFormEditorModel, DatasetDescriptionPageEditorModel, DatasetDescriptionSectionEditorModel } from '@app/ui/misc/dataset-description-form/dataset-description-form.model';
import { Rule } from '@app/core/model/dataset-profile-definition/rule';
@@ -180,6 +180,10 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
this.visibilityRulesService.buildVisibilityRules([],this.form);
}
});
+
+ setTimeout(() => {
+ this.steps = this.stepper.steps;
+ });
}
prepareForm() {
@@ -981,7 +985,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
}
get barPercentage(){
- if(!this.stepper){
+ if(!this.stepper || !this.steps){
return -110;
}
const selectedIndex = this.stepper.selectedIndex + 1;
@@ -993,13 +997,14 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
return {'transform': 'translateX('+this.barPercentage+'%) skewX(-25deg)'}
}
- get steps(){
- if(!this.stepper){
- return [];
- }
+ steps:QueryList;
+ // get steps(){
+ // if(!this.stepper){
+ // return [];
+ // }
- return this.stepper.steps;
- }
+ // return this.stepper.steps;
+ // }
generatePreviewForm(){
diff --git a/dmp-frontend/src/assets/i18n/de.json b/dmp-frontend/src/assets/i18n/de.json
index fb8601a65..a6c80772b 100644
--- a/dmp-frontend/src/assets/i18n/de.json
+++ b/dmp-frontend/src/assets/i18n/de.json
@@ -290,22 +290,24 @@
"UNTITLED": "Untitled"
},
"PAGE-INFO":{
- "PAGE-NAME": "Page Name",
- "PAGE-NAME-HINT": "Set a name for the dataset page.",
+ "PAGE-NAME": "Section Name",
+ "PAGE-NAME-HINT": "Set a name for the dataset section.",
"PAGE-DESCRIPTION": "Description",
- "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the page is about.",
+ "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"ACTIONS":{
- "CREATE-FIRST-PAGE": "Create the first page",
+ "CREATE-FIRST-PAGE": "Create the first Section",
"NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ",
- "START-CREATING-PAGE-END": "creating the first page."
- }
+ "START-CREATING-PAGE-END": "creating the first Section."
+ },
+ "PAGE":"Section"
},
"SECTION-INFO":{
- "SECTION-NAME": "Section Name",
- "SECTION-NAME-HINT": "Set a name for the section.",
+ "SECTION-NAME": "Subsection Name",
+ "SECTION-NAME-HINT": "Set a name for the subsection.",
"SECTION-DESCRIPTION": "Description",
- "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about."
+ "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.",
+ "SECTION": "Subsection"
},
"PAGES": {
"TITLE": "Page Description",
diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json
index 88e13eb7c..effb4273b 100644
--- a/dmp-frontend/src/assets/i18n/en.json
+++ b/dmp-frontend/src/assets/i18n/en.json
@@ -290,22 +290,24 @@
"UNTITLED": "Untitled"
},
"PAGE-INFO":{
- "PAGE-NAME": "Page Name",
- "PAGE-NAME-HINT": "Set a name for the dataset page.",
+ "PAGE-NAME": "Section Name",
+ "PAGE-NAME-HINT": "Set a name for the dataset section.",
"PAGE-DESCRIPTION": "Description",
- "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the page is about.",
+ "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"ACTIONS":{
- "CREATE-FIRST-PAGE": "Create the first page",
+ "CREATE-FIRST-PAGE": "Create the first Section",
"NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ",
- "START-CREATING-PAGE-END": "creating the first page."
- }
+ "START-CREATING-PAGE-END": "creating the first Section."
+ },
+ "PAGE":"Section"
},
"SECTION-INFO":{
- "SECTION-NAME": "Section Name",
- "SECTION-NAME-HINT": "Set a name for the section.",
+ "SECTION-NAME": "Subsection Name",
+ "SECTION-NAME-HINT": "Set a name for the subsection.",
"SECTION-DESCRIPTION": "Description",
- "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about."
+ "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.",
+ "SECTION": "Subsection"
},
"PAGES": {
"TITLE": "Page Description",
diff --git a/dmp-frontend/src/assets/i18n/es.json b/dmp-frontend/src/assets/i18n/es.json
index 00b034dda..2af85f0a2 100644
--- a/dmp-frontend/src/assets/i18n/es.json
+++ b/dmp-frontend/src/assets/i18n/es.json
@@ -290,22 +290,24 @@
"UNTITLED": "Untitled"
},
"PAGE-INFO":{
- "PAGE-NAME": "Page Name",
- "PAGE-NAME-HINT": "Set a name for the dataset page.",
+ "PAGE-NAME": "Section Name",
+ "PAGE-NAME-HINT": "Set a name for the dataset section.",
"PAGE-DESCRIPTION": "Description",
- "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the page is about.",
+ "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"ACTIONS":{
- "CREATE-FIRST-PAGE": "Create the first page",
+ "CREATE-FIRST-PAGE": "Create the first Section",
"NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ",
- "START-CREATING-PAGE-END": "creating the first page."
- }
+ "START-CREATING-PAGE-END": "creating the first Section."
+ },
+ "PAGE":"Section"
},
"SECTION-INFO":{
- "SECTION-NAME": "Section Name",
- "SECTION-NAME-HINT": "Set a name for the section.",
+ "SECTION-NAME": "Subsection Name",
+ "SECTION-NAME-HINT": "Set a name for the subsection.",
"SECTION-DESCRIPTION": "Description",
- "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about."
+ "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.",
+ "SECTION": "Subsection"
},
"PAGES": {
"TITLE": "Descripición de la página",
diff --git a/dmp-frontend/src/assets/i18n/gr.json b/dmp-frontend/src/assets/i18n/gr.json
index 4ff905cbf..5d918d032 100644
--- a/dmp-frontend/src/assets/i18n/gr.json
+++ b/dmp-frontend/src/assets/i18n/gr.json
@@ -290,22 +290,24 @@
"UNTITLED": "Untitled"
},
"PAGE-INFO":{
- "PAGE-NAME": "Page Name",
- "PAGE-NAME-HINT": "Set a name for the dataset page.",
+ "PAGE-NAME": "Section Name",
+ "PAGE-NAME-HINT": "Set a name for the dataset section.",
"PAGE-DESCRIPTION": "Description",
- "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the page is about.",
+ "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"ACTIONS":{
- "CREATE-FIRST-PAGE": "Create the first page",
+ "CREATE-FIRST-PAGE": "Create the first Section",
"NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ",
- "START-CREATING-PAGE-END": "creating the first page."
- }
+ "START-CREATING-PAGE-END": "creating the first Section."
+ },
+ "PAGE":"Section"
},
"SECTION-INFO":{
- "SECTION-NAME": "Section Name",
- "SECTION-NAME-HINT": "Set a name for the section.",
+ "SECTION-NAME": "Subsection Name",
+ "SECTION-NAME-HINT": "Set a name for the subsection.",
"SECTION-DESCRIPTION": "Description",
- "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about."
+ "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.",
+ "SECTION": "Subsection"
},
"PAGES": {
"TITLE": "Περιγραφή Σελίδας",
diff --git a/dmp-frontend/src/assets/i18n/pt.json b/dmp-frontend/src/assets/i18n/pt.json
index ec729c29d..6a69b25a0 100644
--- a/dmp-frontend/src/assets/i18n/pt.json
+++ b/dmp-frontend/src/assets/i18n/pt.json
@@ -290,22 +290,24 @@
"UNTITLED": "Untitled"
},
"PAGE-INFO":{
- "PAGE-NAME": "Page Name",
- "PAGE-NAME-HINT": "Set a name for the dataset page.",
+ "PAGE-NAME": "Section Name",
+ "PAGE-NAME-HINT": "Set a name for the dataset section.",
"PAGE-DESCRIPTION": "Description",
- "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the page is about.",
+ "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"ACTIONS":{
- "CREATE-FIRST-PAGE": "Create the first page",
+ "CREATE-FIRST-PAGE": "Create the first Section",
"NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ",
- "START-CREATING-PAGE-END": "creating the first page."
- }
+ "START-CREATING-PAGE-END": "creating the first Section."
+ },
+ "PAGE":"Section"
},
"SECTION-INFO":{
- "SECTION-NAME": "Section Name",
- "SECTION-NAME-HINT": "Set a name for the section.",
+ "SECTION-NAME": "Subsection Name",
+ "SECTION-NAME-HINT": "Set a name for the subsection.",
"SECTION-DESCRIPTION": "Description",
- "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about."
+ "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.",
+ "SECTION": "Subsection"
},
"PAGES": {
"TITLE": "Descrição da Página",
diff --git a/dmp-frontend/src/assets/i18n/sk.json b/dmp-frontend/src/assets/i18n/sk.json
index 313d3d208..863660562 100644
--- a/dmp-frontend/src/assets/i18n/sk.json
+++ b/dmp-frontend/src/assets/i18n/sk.json
@@ -290,22 +290,24 @@
"UNTITLED": "Untitled"
},
"PAGE-INFO":{
- "PAGE-NAME": "Page Name",
- "PAGE-NAME-HINT": "Set a name for the dataset page.",
+ "PAGE-NAME": "Section Name",
+ "PAGE-NAME-HINT": "Set a name for the dataset section.",
"PAGE-DESCRIPTION": "Description",
- "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the page is about.",
+ "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"ACTIONS":{
- "CREATE-FIRST-PAGE": "Create the first page",
+ "CREATE-FIRST-PAGE": "Create the first Section",
"NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ",
- "START-CREATING-PAGE-END": "creating the first page."
- }
+ "START-CREATING-PAGE-END": "creating the first Section."
+ },
+ "PAGE":"Section"
},
"SECTION-INFO":{
- "SECTION-NAME": "Section Name",
- "SECTION-NAME-HINT": "Set a name for the section.",
+ "SECTION-NAME": "Subsection Name",
+ "SECTION-NAME-HINT": "Set a name for the subsection.",
"SECTION-DESCRIPTION": "Description",
- "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about."
+ "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.",
+ "SECTION": "Subsection"
},
"PAGES": {
"TITLE": "Opis stránky",
diff --git a/dmp-frontend/src/assets/i18n/sr.json b/dmp-frontend/src/assets/i18n/sr.json
index ead4219fe..766fb6204 100644
--- a/dmp-frontend/src/assets/i18n/sr.json
+++ b/dmp-frontend/src/assets/i18n/sr.json
@@ -290,23 +290,25 @@
"UNTITLED": "Untitled"
},
"PAGE-INFO":{
- "PAGE-NAME": "Page Name",
- "PAGE-NAME-HINT": "Set a name for the dataset page.",
- "PAGE-DESCRIPTION": "Description",
- "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the page is about.",
- "ACTIONS":{
- "CREATE-FIRST-PAGE": "Create the first page",
- "NOTHING-HERE-HINT": "Nothing here yet.",
- "START-CREATING-PAGE-START": "Start by ",
- "START-CREATING-PAGE-END": "creating the first page."
- }
- },
- "SECTION-INFO":{
- "SECTION-NAME": "Section Name",
- "SECTION-NAME-HINT": "Set a name for the section.",
- "SECTION-DESCRIPTION": "Description",
- "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about."
- },
+ "PAGE-NAME": "Section Name",
+ "PAGE-NAME-HINT": "Set a name for the dataset section.",
+ "PAGE-DESCRIPTION": "Description",
+ "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
+ "ACTIONS":{
+ "CREATE-FIRST-PAGE": "Create the first Section",
+ "NOTHING-HERE-HINT": "Nothing here yet.",
+ "START-CREATING-PAGE-START": "Start by ",
+ "START-CREATING-PAGE-END": "creating the first Section."
+ },
+ "PAGE":"Section"
+ },
+ "SECTION-INFO":{
+ "SECTION-NAME": "Subsection Name",
+ "SECTION-NAME-HINT": "Set a name for the subsection.",
+ "SECTION-DESCRIPTION": "Description",
+ "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.",
+ "SECTION": "Subsection"
+ },
"PAGES": {
"TITLE": "Opis stranice",
"PAGE-PREFIX": "Stranica",
diff --git a/dmp-frontend/src/assets/i18n/tr.json b/dmp-frontend/src/assets/i18n/tr.json
index 43105fec9..1f7cb6d32 100644
--- a/dmp-frontend/src/assets/i18n/tr.json
+++ b/dmp-frontend/src/assets/i18n/tr.json
@@ -290,22 +290,24 @@
"UNTITLED": "Untitled"
},
"PAGE-INFO":{
- "PAGE-NAME": "Page Name",
- "PAGE-NAME-HINT": "Set a name for the dataset page.",
+ "PAGE-NAME": "Section Name",
+ "PAGE-NAME-HINT": "Set a name for the dataset section.",
"PAGE-DESCRIPTION": "Description",
- "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the page is about.",
+ "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"ACTIONS":{
- "CREATE-FIRST-PAGE": "Create the first page",
+ "CREATE-FIRST-PAGE": "Create the first Section",
"NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ",
- "START-CREATING-PAGE-END": "creating the first page."
- }
+ "START-CREATING-PAGE-END": "creating the first Section."
+ },
+ "PAGE":"Section"
},
"SECTION-INFO":{
- "SECTION-NAME": "Section Name",
- "SECTION-NAME-HINT": "Set a name for the section.",
+ "SECTION-NAME": "Subsection Name",
+ "SECTION-NAME-HINT": "Set a name for the subsection.",
"SECTION-DESCRIPTION": "Description",
- "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about."
+ "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.",
+ "SECTION": "Subsection"
},
"PAGES": {
"TITLE": "Sayfa Tanımı",