From bdcc628862c84f6fd99033deb558a1c45a23c43d Mon Sep 17 00:00:00 2001 From: Ioannis Kalyvas Date: Tue, 30 Oct 2018 13:03:02 +0200 Subject: [PATCH] Introducing component for showing pending and unanswered questions --- .../dataset-wizard.component.html | 15 +++---- .../dataset-wizard.component.ts | 5 +-- .../editor/dataset-editor.component.html | 39 ++++++++++--------- .../editor/dataset-editor.component.ts | 3 -- .../dynamic-form/dynamic-form.component.ts | 11 ++---- ...m-pending-questions-display.component.html | 0 ...m-pending-questions-display.component.scss | 0 ...orm-pending-questions-display.component.ts | 17 ++++++++ 8 files changed, 48 insertions(+), 42 deletions(-) create mode 100644 dmp-frontend/src/app/form/helpers/dynamic-form-pending-questions/dynamic-form-pending-questions-display.component.html create mode 100644 dmp-frontend/src/app/form/helpers/dynamic-form-pending-questions/dynamic-form-pending-questions-display.component.scss create mode 100644 dmp-frontend/src/app/form/helpers/dynamic-form-pending-questions/dynamic-form-pending-questions-display.component.ts diff --git a/dmp-frontend/src/app/datasets/dataset-wizard/dataset-wizard.component.html b/dmp-frontend/src/app/datasets/dataset-wizard/dataset-wizard.component.html index 3052a0cb5..8f1cd3d30 100644 --- a/dmp-frontend/src/app/datasets/dataset-wizard/dataset-wizard.component.html +++ b/dmp-frontend/src/app/datasets/dataset-wizard/dataset-wizard.component.html @@ -15,20 +15,17 @@
- - + +
- -
diff --git a/dmp-frontend/src/app/datasets/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/datasets/dataset-wizard/dataset-wizard.component.ts index 967cb2388..7b51294f0 100644 --- a/dmp-frontend/src/app/datasets/dataset-wizard/dataset-wizard.component.ts +++ b/dmp-frontend/src/app/datasets/dataset-wizard/dataset-wizard.component.ts @@ -6,7 +6,6 @@ import { JsonSerializer } from '../../utilities/JsonSerializer'; import { DataManagementPlanCriteria } from '../../models/criteria/data-management-plan/DataManagementPlanCriteria'; import { RequestItem } from '../../models/criteria/RequestItem'; import { DatasetService } from '../../services/dataset/dataset.service'; -import { ExternalSourcesItemModel } from '../../models/external-sources/ExternalSourcesItemModel'; import { DatasetProfileModel } from '../../models/datasetprofile/DatasetProfileModel'; import { DatasetProfileDefinitionModel } from '../../models/DatasetProfileDefinitionModel'; import { DatasetWizardModel, DatasetStatus } from '../../models/datasets/DatasetWizardModel'; @@ -16,9 +15,9 @@ import { DatasetWizardService } from '../../services/dataset-wizard/dataset-wiza import { TranslateService } from '@ngx-translate/core'; import { ActivatedRoute, Router, Params } from '@angular/router'; import { Component, ViewChild, OnInit, AfterViewInit, ViewEncapsulation, TemplateRef, ChangeDetectionStrategy } from '@angular/core'; -import { FormGroup, Validators, FormBuilder, FormArray } from '@angular/forms'; +import { FormGroup, FormBuilder, FormArray } from '@angular/forms'; import * as FileSaver from 'file-saver'; -import { MatPaginator, MatSort, MatSnackBar, MatStepper, MatDialog } from '@angular/material'; +import { MatSnackBar, MatStepper, MatDialog } from '@angular/material'; import { ExternalDatasetCriteria } from '../../models/criteria/external-dataset/ExternalDatasetCriteria'; import { ExternalDatasetModel } from '../../models/external-dataset/ExternalDatasetModel'; import { RegistryCriteria } from '../../models/criteria/registry/RegistryCriteria'; diff --git a/dmp-frontend/src/app/datasets/editor/dataset-editor.component.html b/dmp-frontend/src/app/datasets/editor/dataset-editor.component.html index 0be37320a..fc71f0002 100644 --- a/dmp-frontend/src/app/datasets/editor/dataset-editor.component.html +++ b/dmp-frontend/src/app/datasets/editor/dataset-editor.component.html @@ -1,27 +1,28 @@
-
+ - - - {{baseErrorModel.label}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + + + {{baseErrorModel.label}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + - - - {{baseErrorModel.uri}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + + + {{baseErrorModel.uri}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + - - - {{errorModel.description}} - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + + + {{errorModel.description}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + -
- + +
diff --git a/dmp-frontend/src/app/datasets/editor/dataset-editor.component.ts b/dmp-frontend/src/app/datasets/editor/dataset-editor.component.ts index 74e22444b..40e329a34 100644 --- a/dmp-frontend/src/app/datasets/editor/dataset-editor.component.ts +++ b/dmp-frontend/src/app/datasets/editor/dataset-editor.component.ts @@ -36,9 +36,6 @@ export class DatasetEditorComponent implements AfterViewInit { // filteredServices: ExternalSourcesItemModel[]; constructor( - private datasetService: DatasetService, - private externalSourcesService: ExternalSourcesService, - private route: ActivatedRoute, public snackBar: MatSnackBar, public router: Router, public language: TranslateService, diff --git a/dmp-frontend/src/app/form/dynamic-form/dynamic-form.component.ts b/dmp-frontend/src/app/form/dynamic-form/dynamic-form.component.ts index de723a597..fe13f31c5 100644 --- a/dmp-frontend/src/app/form/dynamic-form/dynamic-form.component.ts +++ b/dmp-frontend/src/app/form/dynamic-form/dynamic-form.component.ts @@ -6,15 +6,11 @@ import { BaseHttpService } from '../../utilities/cite-http-service-module/base-h import { VisibilityRulesService } from '../../utilities/visibility-rules/visibility-rules.service'; import { DatasetProfileDefinitionModel } from '../../models/DatasetProfileDefinitionModel'; import { DatasetWizardModel } from '../../models/datasets/DatasetWizardModel'; -import { Component, Input, OnInit, AfterViewChecked, ViewChild, forwardRef, ViewEncapsulation, AfterViewInit, ChangeDetectionStrategy } from '@angular/core'; -import { FormGroup, Validators, ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; -import { NgForm } from '@angular/forms'; -import { Router, ActivatedRoute, ParamMap, Params } from '@angular/router'; +import { Component, Input, OnInit, ViewEncapsulation, AfterViewInit } from '@angular/core'; +import { FormGroup } from '@angular/forms'; +import { Router, ActivatedRoute } from '@angular/router'; import 'rxjs/add/operator/switchMap'; import { Location } from '@angular/common'; -import { MatSidenavModule } from '@angular/material/sidenav'; - -declare function simple_notifier(type: string, title: string, message: string): any; @Component({ selector: 'app-dynamic-form', @@ -36,7 +32,6 @@ export class DynamicFormComponent implements OnInit, AfterViewInit { private progressbar = false; private currentPageIndex = 0; - private fragment: string; @Input() dataModel: DatasetWizardModel = new DatasetWizardModel(); @Input() path: string; @Input() form: FormGroup; diff --git a/dmp-frontend/src/app/form/helpers/dynamic-form-pending-questions/dynamic-form-pending-questions-display.component.html b/dmp-frontend/src/app/form/helpers/dynamic-form-pending-questions/dynamic-form-pending-questions-display.component.html new file mode 100644 index 000000000..e69de29bb diff --git a/dmp-frontend/src/app/form/helpers/dynamic-form-pending-questions/dynamic-form-pending-questions-display.component.scss b/dmp-frontend/src/app/form/helpers/dynamic-form-pending-questions/dynamic-form-pending-questions-display.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/dmp-frontend/src/app/form/helpers/dynamic-form-pending-questions/dynamic-form-pending-questions-display.component.ts b/dmp-frontend/src/app/form/helpers/dynamic-form-pending-questions/dynamic-form-pending-questions-display.component.ts new file mode 100644 index 000000000..d20f2ffcd --- /dev/null +++ b/dmp-frontend/src/app/form/helpers/dynamic-form-pending-questions/dynamic-form-pending-questions-display.component.ts @@ -0,0 +1,17 @@ +import { Component, ViewEncapsulation, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-dynamic-form-pending-questions-display', + templateUrl: './dynamic-form-pending-questions-display.component.html', + styleUrls: [ + './dynamic-form-pending-questions-display.component.scss' + ], + providers: [ + ], + encapsulation: ViewEncapsulation.None, +}) +export class DynamicFormPendingQuestionsDisplayComponent implements OnInit { + ngOnInit(): void { + throw new Error('Method not implemented.'); + } +}