diff --git a/dmp-frontend/src/app/app-routing.module.ts b/dmp-frontend/src/app/app-routing.module.ts
index abbcf9ee3..ab3af942c 100644
--- a/dmp-frontend/src/app/app-routing.module.ts
+++ b/dmp-frontend/src/app/app-routing.module.ts
@@ -1,27 +1,32 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PageNotFoundComponent } from './not-found.component';
+import { EmptyComponent } from './empty.component';
import { DynamicFormComponent } from './form/dynamic-form.component';
import { AuthGuard } from './guards/auth.guard';
import { ProjectsComponent } from './projects/projects.component';
import { DatasetsComponent } from './datasets/dataset.component';
import { DmpComponent } from './dmps/dmp.component';
import { AppComponent } from './app.component';
+import { UserWorkspaceComponent } from './user-workspace/user-workspace.component';
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
const appRoutes: Routes = [
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
{ path: 'login', component: MainSignInComponent},
- { path: 'projects', component: ProjectsComponent},
- { path: 'dmps', component: DmpComponent},
- { path: '', redirectTo: '/login', pathMatch: 'full' },
+ //{ path: 'projects', component: ProjectsComponent},
+ //{ path: 'dmps', component: DmpComponent},
+ { path: 'workspace', component: UserWorkspaceComponent},
+ //{ path: '', component: EmptyComponent},
+ //{ path: '', redirectTo: '/login', pathMatch: 'full' },
{ path: '**', component: PageNotFoundComponent },
+ /*
{
path: '',
redirectTo: 'app-root',
pathMatch: 'full'
}
-
+ */
];
@NgModule({
diff --git a/dmp-frontend/src/app/app.component.html b/dmp-frontend/src/app/app.component.html
index 4d428c521..10d34c8ea 100644
--- a/dmp-frontend/src/app/app.component.html
+++ b/dmp-frontend/src/app/app.component.html
@@ -44,10 +44,10 @@
diff --git a/dmp-frontend/src/app/app.module.ts b/dmp-frontend/src/app/app.module.ts
index ec617c3eb..ada17b51e 100644
--- a/dmp-frontend/src/app/app.module.ts
+++ b/dmp-frontend/src/app/app.module.ts
@@ -21,6 +21,7 @@ import { DynamicFormGroupComponent } from './form/dynamic-form-group/dynamic-for
import { AppRoutingModule } from './app-routing.module';
import { AuthGuard } from './guards/auth.guard';
import { PageNotFoundComponent } from './not-found.component';
+import { EmptyComponent } from './empty.component';
import { TocComponent } from './form/tableOfContents/toc.component';
import { PaginationService } from './services/pagination.service';
@@ -60,6 +61,7 @@ import { ModalComponent } from './modal/modal.component';
import { StatusToString } from './pipes/various/status-to-string';
import { SidebarModule } from 'ng-sidebar';
+import { UserWorkspaceComponent } from './user-workspace/user-workspace.component';
@@ -75,11 +77,13 @@ import { SidebarModule } from 'ng-sidebar';
GooggleSignInComponent,
MainSignInComponent,
PageNotFoundComponent,
+ EmptyComponent,
ModalComponent,
ProjectDetailComponent,
ProjectsComponent,
DmpComponent,
DatasetsComponent,
+ UserWorkspaceComponent,
ProjectTableFilterPipe,
DmpVersionFilterPipe,
diff --git a/dmp-frontend/src/app/datasets/dataset.component.ts b/dmp-frontend/src/app/datasets/dataset.component.ts
index b8d4deae9..89c47d5f9 100644
--- a/dmp-frontend/src/app/datasets/dataset.component.ts
+++ b/dmp-frontend/src/app/datasets/dataset.component.ts
@@ -87,8 +87,7 @@ export class DatasetsComponent implements OnInit {
this.datasetProfileDropDown.options = [];
this.saveAndDescribe = false;
this.statusDropDown = new DropdownField();
- this.statusDropDown.options =[];
- this.statusDropDown.options= [{key:'0', value:"active"},{key:'1', value:"inactive"}]
+ this.statusDropDown.options= [{key:'', value:null},{key:'0', value:"Active"},{key:'1', value:"Inactive"}]
}
@@ -115,6 +114,7 @@ export class DatasetsComponent implements OnInit {
)
}
+
SaveDataset(){
if(this.dataset.id ==null){
this.dataset.dmp = { "id": this.dmpIdforDatasets }
@@ -130,7 +130,6 @@ export class DatasetsComponent implements OnInit {
$("#newDatasetModal").modal("hide");
}
-
else{
this.dataset.dmp = { "id": this.dmpIdforDatasets }
this.dataset.profile = { "id": this.dataset.profile }
@@ -166,10 +165,11 @@ export class DatasetsComponent implements OnInit {
editRow(item, event) {
if (event.toElement.id == "editDataset"){
+ this.dataset = item;
this.dataset.label = item.label;
this.dataset.uri = item.uri;
//this.dataset.dmp = item.dmp;
- this.dataset.profile = item.profile.id;
+ this.dataset.profile = item.profile==null ? null : item.profile.id;
this.dataset.id = item.id;
$("#newDatasetModal").modal("show");
}
@@ -196,4 +196,18 @@ export class DatasetsComponent implements OnInit {
this.ngZone.run(() => this.router.navigate(['dynamic-form', {id: item.profile.id, datasetId:item.id}]));
}
+ deleteRow(dataset, $event){
+ this.serverService.deleteDataset(dataset).subscribe(
+ response => {
+ console.log("Deleted Successfully the dataset")
+ },
+ err => {
+ console.log("Could not delete the dataset")
+ }
+ );
+ this.getDatasets();
+ }
+
+
+
}
diff --git a/dmp-frontend/src/app/datasets/dataset.html b/dmp-frontend/src/app/datasets/dataset.html
index 3a417d6a7..6320a38e1 100644
--- a/dmp-frontend/src/app/datasets/dataset.html
+++ b/dmp-frontend/src/app/datasets/dataset.html
@@ -10,10 +10,9 @@
-
|
|