Changes on dataset comp
This commit is contained in:
parent
b4fb82d5f4
commit
ab0faf998a
|
@ -73,15 +73,7 @@ export class DatasetsComponent implements OnInit {
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private ngZone: NgZone) {
|
private ngZone: NgZone) {
|
||||||
this.dataset = {
|
this.dataset = this.createEmptyDataset();
|
||||||
id: null,
|
|
||||||
label: '',
|
|
||||||
reference: '',
|
|
||||||
uri: '',
|
|
||||||
properties: '',
|
|
||||||
profile: { "id": '' },
|
|
||||||
dmp: { "id": '' }
|
|
||||||
}
|
|
||||||
|
|
||||||
this.datasetProfileDropDown = new DropdownField();
|
this.datasetProfileDropDown = new DropdownField();
|
||||||
this.datasetProfileDropDown.options = [];
|
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(){
|
SaveDataset(){
|
||||||
if(this.dataset.id ==null){
|
if(this.dataset.id ==null){
|
||||||
|
@ -180,10 +183,9 @@ export class DatasetsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
newDataset() {
|
newDataset() {
|
||||||
this.dataset.label = "";
|
this.dataset = this.createEmptyDataset();
|
||||||
this.dataset.uri = "";
|
|
||||||
this.dataset.dmp =this.dmpLabelforDatasets;
|
this.dataset.dmp =this.dmpLabelforDatasets;
|
||||||
this.dataset.profile = "";
|
this.dataset.status = 0;
|
||||||
$("#newDatasetModal").modal("show");
|
$("#newDatasetModal").modal("show");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 {}
|
|
||||||
|
|
||||||
*/
|
|
Loading…
Reference in New Issue