diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts index 2ada995c2..256a522fc 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { FormArray, FormControl, FormGroup } from '@angular/forms'; import { FieldEditorModel } from '../../../admin/field-editor-model'; +import { FieldSetEditorModel } from '../../../admin/field-set-editor-model'; @Component({ selector: 'app-dataset-profile-editor-composite-field-component', @@ -35,6 +36,10 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit { } (this.form.get('fields') as FormArray).controls.splice(1); } + if ((this.form.get('fields')).length === 0) { + const field: FieldEditorModel = new FieldEditorModel(); + (this.form.get('fields')).push(field.buildForm()); + } } onIsMultiplicityEnabledChange(isMultiplicityEnabled: boolean) { diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section/dataset-profile-editor-section.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section/dataset-profile-editor-section.component.html index 355a94f4b..f34dc1eee 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section/dataset-profile-editor-section.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section/dataset-profile-editor-section.component.html @@ -22,7 +22,7 @@ - + diff --git a/dmp-frontend/src/app/ui/dataset-create-wizard/dmp-selector/dataset-dmp-selector.model.ts b/dmp-frontend/src/app/ui/dataset-create-wizard/dmp-selector/dataset-dmp-selector.model.ts deleted file mode 100644 index 0d61eb041..000000000 --- a/dmp-frontend/src/app/ui/dataset-create-wizard/dmp-selector/dataset-dmp-selector.model.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { DmpModel } from "../../../core/model/dmp/dmp"; -import { DatasetProfileModel } from "../../../core/model/dataset/dataset-profile"; - -export class DatasetDmpSelectorModel{ - label?: string; - status?: number; -} diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.html b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.html index f7e9ceff5..8c85c9e7f 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.html +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.html @@ -18,18 +18,18 @@ -->
- - -
diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.scss b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.scss index e5fd8c323..56bc9cb23 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.scss +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.scss @@ -11,4 +11,29 @@ .description-action-row { margin-top: 1em; } + .deleteButton { + margin-top: 15px; + margin-bottom: 15px; + margin-right: 15px; + } + .saveButton { + margin-top: 15px; + margin-bottom: 15px; + margin-right: 15px; + } + .saveAndFinalizeButton { + margin-top: 15px; + margin-bottom: 15px; + margin-right: 15px; + } + .downloadPDF { + margin-top: 15px; + margin-bottom: 15px; + margin-right: 15px; + } + .downloadXML { + margin-top: 15px; + margin-bottom: 15px; + margin-right: 15px; + } } diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field/form-composite-field.component.html b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field/form-composite-field.component.html index 8ac054ea8..2f675c6dd 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field/form-composite-field.component.html +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field/form-composite-field.component.html @@ -36,10 +36,10 @@ {{form.get('title').value}} info - -
{{form.get('description').value}}
-
- {{form.get('extendedDescription').value}}
+ +
{{form.get('description').value}}
+
+ {{form.get('extendedDescription').value}}
- \ No newline at end of file + diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section.component.html b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section.component.html index d978a7f7f..e159a3c75 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section.component.html +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section.component.html @@ -14,14 +14,10 @@
-
- -
+ +
@@ -35,6 +31,12 @@
+
+ +
diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section.component.scss b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section.component.scss index b0da624db..d9df0bba6 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section.component.scss +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section.component.scss @@ -2,6 +2,10 @@ .expansion-panel { margin-bottom: 1em; } + .addOneFieldButton { + margin-top: -15px; + margin-left: -11px; + } } .styleBorder{ border: 0.2em solid lightgray; @@ -12,3 +16,4 @@ padding-bottom: 18px; color: black; } + diff --git a/dmp-frontend/src/app/ui/quick-wizard/dataset-editor/dataset-editor-wizard.component.html b/dmp-frontend/src/app/ui/quick-wizard/dataset-editor/dataset-editor-wizard.component.html index 0d859eb8a..0a663a6d2 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/dataset-editor/dataset-editor-wizard.component.html +++ b/dmp-frontend/src/app/ui/quick-wizard/dataset-editor/dataset-editor-wizard.component.html @@ -4,10 +4,10 @@
- + format_align_left - + add @@ -45,7 +45,7 @@ - +
diff --git a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.html b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.html index 527fca52e..696a86617 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.html +++ b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.html @@ -59,12 +59,14 @@ - \ No newline at end of file + diff --git a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.scss b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.scss index e69de29bb..3e178b79b 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.scss +++ b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.scss @@ -0,0 +1,7 @@ +.saveAndFinalizeButton{ + float:right; +} +.saveButton{ + float:right; + margin-right: 15px; +} diff --git a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts index 893a6cd7e..c31583ec1 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts +++ b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts @@ -15,7 +15,6 @@ import { ProjectEditorWizardModel } from '../project-editor/project-editor-wizar import { QuickWizardEditorWizardModel } from './quick-wizard-editor.model'; - @Component({ selector: 'app-quick-wizard-editor-component', templateUrl: 'quick-wizard-editor.component.html', @@ -24,15 +23,10 @@ import { QuickWizardEditorWizardModel } from './quick-wizard-editor.model'; export class QuickWizardEditorComponent extends BaseComponent implements OnInit, IBreadCrumbComponent { breadCrumbs: Observable = Observable.of([]); - @ViewChild('stepper') stepper: MatStepper; isNew = true; - quickWizard: QuickWizardEditorWizardModel formGroup: FormGroup = null; - firstStepFormGroup: FormGroup; - secondFormGroup: FormGroup; - constructor( public snackBar: MatSnackBar, @@ -72,13 +66,18 @@ export class QuickWizardEditorComponent extends BaseComponent implements OnInit, formSubmit(): void { this.touchAllFormFields(this.formGroup); - if (!this.isFormValid()) { return; } if (this.formGroup.get('datasets') && this.formGroup.get('datasets').get('datasetsList') && (this.formGroup.get('datasets').get('datasetsList') as FormArray).length > 0) { this.onSubmit(); } else { return; } - } + } + + saveFinalize() { + if (!this.isFormValid()) { return; } + this.formGroup.get('status').setValue('1'); + this.onSubmit(); + } public isFormValid() { return this.formGroup.valid; @@ -100,7 +99,6 @@ export class QuickWizardEditorComponent extends BaseComponent implements OnInit, } onSubmit(): void { - if (!this.isFormValid()) { return; } this.quickWizardService.createQuickWizard(this.formGroup.getRawValue()) .pipe(takeUntil(this._destroyed)) .subscribe( @@ -109,7 +107,6 @@ export class QuickWizardEditorComponent extends BaseComponent implements OnInit, ); } - onCallbackSuccess(): void { this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); this.router.navigate(['/home']); @@ -148,9 +145,4 @@ export class QuickWizardEditorComponent extends BaseComponent implements OnInit, return this.formGroup.get('project').get('label').value; } } - - - - - } diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index c1fbc369e..6c882cf8a 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -98,7 +98,7 @@ "ADDITIONAL-INFORMATION":"Additional Information", "MULTIPLICITY-MIN": "Multiplicity Min", "MULTIPLICITY-MAX": "Multiplicity Max", - "MULTIPLICITY-ADD-ONE-FIELD": "Add one more fieldset +", + "MULTIPLICITY-ADD-ONE-FIELD": "Add one more fieldset", "ORDER": "Order" }, "ACTIONS": { @@ -680,6 +680,7 @@ "ACTIONS": { "DELETE": "Delete", "SAVE": "Save", + "SAVE-AND-FINALIZE":"Save and Finalize", "NEXT": "Next", "BACK": "Back", "CREATE-NEW":"Create new project",