From b4fb82d5f4c1638a573c52d13f9620c183a2ad8d Mon Sep 17 00:00:00 2001 From: Nikolaos Laskaris Date: Tue, 7 Nov 2017 10:48:11 +0100 Subject: [PATCH 1/2] added "Description" field on {Dataset, DatasetProfile, DMP, Project} entities --- dmp-db-scema/DataManagementPlanDB.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dmp-db-scema/DataManagementPlanDB.sql b/dmp-db-scema/DataManagementPlanDB.sql index b7c54b14f..8d0ce0a6c 100644 --- a/dmp-db-scema/DataManagementPlanDB.sql +++ b/dmp-db-scema/DataManagementPlanDB.sql @@ -53,6 +53,7 @@ CREATE TABLE "DMP" ( "Status" smallint not null default 0, "Created" timestamp not null default NOW(), "Modified" timestamp not null default NOW(), + "Description" text, "Profile" uuid ); @@ -118,6 +119,7 @@ CREATE TABLE "Dataset" ( "Status" smallint not null default 0, "Created" timestamp not null default NOW(), "Modified" timestamp not null default NOW(), + "Description" text, "Profile" uuid ); @@ -139,6 +141,7 @@ CREATE TABLE "DatasetProfile" ( "Status" smallint not null default 0, "Created" timestamp not null default NOW(), "Modified" timestamp not null default NOW(), + "Description" text, "Definition" xml NOT NULL ); @@ -216,6 +219,7 @@ CREATE TABLE "Project" ( "Modified" timestamp not null default NOW(), "StartDate" timestamp, "EndDate" timestamp, + "Description" text, "Definition" xml ); From ab0faf998a54b815e94ed6ef386f240540c9fd1c Mon Sep 17 00:00:00 2001 From: Nikolaos Laskaris Date: Tue, 7 Nov 2017 12:13:54 +0200 Subject: [PATCH 2/2] Changes on dataset comp --- .../src/app/datasets/dataset.component.ts | 26 ++++++++------- dmp-frontend/src/app/dmps/dmp.module.ts | 32 ------------------- 2 files changed, 14 insertions(+), 44 deletions(-) delete mode 100644 dmp-frontend/src/app/dmps/dmp.module.ts diff --git a/dmp-frontend/src/app/datasets/dataset.component.ts b/dmp-frontend/src/app/datasets/dataset.component.ts index 1cd55a7d0..9f0599768 100644 --- a/dmp-frontend/src/app/datasets/dataset.component.ts +++ b/dmp-frontend/src/app/datasets/dataset.component.ts @@ -73,15 +73,7 @@ export class DatasetsComponent implements OnInit { private route: ActivatedRoute, private router: Router, private ngZone: NgZone) { - this.dataset = { - id: null, - label: '', - reference: '', - uri: '', - properties: '', - profile: { "id": '' }, - dmp: { "id": '' } - } + this.dataset = this.createEmptyDataset(); this.datasetProfileDropDown = new DropdownField(); this.datasetProfileDropDown.options = []; @@ -114,6 +106,17 @@ export class DatasetsComponent implements OnInit { ) } + createEmptyDataset(){ + return { + id: null, + label: '', + reference: '', + uri: '', + properties: '', + profile: { "id": '' }, + dmp: { "id": '' } + } + } SaveDataset(){ if(this.dataset.id ==null){ @@ -180,10 +183,9 @@ export class DatasetsComponent implements OnInit { } newDataset() { - this.dataset.label = ""; - this.dataset.uri = ""; + this.dataset = this.createEmptyDataset(); this.dataset.dmp =this.dmpLabelforDatasets; - this.dataset.profile = ""; + this.dataset.status = 0; $("#newDatasetModal").modal("show"); } diff --git a/dmp-frontend/src/app/dmps/dmp.module.ts b/dmp-frontend/src/app/dmps/dmp.module.ts deleted file mode 100644 index 29815a9d3..000000000 --- a/dmp-frontend/src/app/dmps/dmp.module.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -//import {DataTableModule } from 'angular-4-data-table-bootstrap-4'; -import {DataTableModule} from 'angular2-datatable'; -import { DmpComponent } from './dmp.component'; - -import { DmpTableFilterPipe } from '../pipes/dmp-table-filter.pipe'; -import { DmpVersionFilterPipe } from '../pipes/dmp-version-filter.pipe'; - -import { DmpRoutingModule } from './dmp-routing.module'; -import { DatasetsModule } from '../datasets/dataset.module'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - DmpRoutingModule, - DataTableModule, - DatasetsModule - ], - declarations: [ - DmpTableFilterPipe, - DmpVersionFilterPipe, - DmpComponent - ], - providers: [ ] -}) -export class DmpModule {} - -*/ \ No newline at end of file