Merge branch 'Development' of https://gitlab.eudat.eu/dmp/OpenAIRE-EUDAT-DMP-service-pilot into Development
This commit is contained in:
commit
ae9b12744d
|
@ -15,7 +15,7 @@ import { ProjectDetailedComponent } from './viewers/project-detailed/project-det
|
|||
|
||||
const appRoutes: Routes = [
|
||||
|
||||
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'dynamic-form/:id', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'dataset', component: DatasetsComponent },
|
||||
{ path: 'login', component: MainSignInComponent},
|
||||
{ path: 'projects', component: ProjectsComponent},
|
||||
|
|
|
@ -240,7 +240,7 @@ export class DatasetsComponent implements OnInit {
|
|||
}
|
||||
|
||||
describeDataset(item) {
|
||||
this.router.navigate(['/dynamic-form'], { queryParams: {id: item.profile.id, datasetId:item.id, label: item.label}});
|
||||
this.router.navigate(['/dynamic-form/'+item.id]);
|
||||
//this.ngZone.run(() => this.router.navigate(['dynamic-form', {id: item.profile.id, datasetId:item.id, label: item.label}]));
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,8 @@ export class DynamicFormComponent implements OnInit {
|
|||
|
||||
constructor(private qcs: FieldControlService, private serverService: ServerService, private router: Router, private pdfService: PDFService,
|
||||
private _location: Location, private route: ActivatedRoute, private pagerService: PaginationService, private tokenService: TokenService, private visibilityRulesService: VisibilityRulesService) {
|
||||
}
|
||||
this.datasetId = route.snapshot.params['id'];
|
||||
}
|
||||
|
||||
getSubForm(subformName) {
|
||||
return this.form.controls[subformName];
|
||||
|
@ -108,10 +109,7 @@ export class DynamicFormComponent implements OnInit {
|
|||
}
|
||||
];
|
||||
|
||||
let sub = this.route.queryParams.subscribe(params => {
|
||||
|
||||
let dmpid = params.id;
|
||||
this.datasetId = params.datasetId;
|
||||
this.serverService.getDmp(this.datasetId).subscribe(
|
||||
response => {
|
||||
this.dataModel = new JsonSerializer<DatasetModel>().fromJSONObject(response, DatasetModel);
|
||||
|
@ -135,7 +133,6 @@ export class DynamicFormComponent implements OnInit {
|
|||
this.visibilityRulesService.formGroup = this.form;
|
||||
let rules:Rule[] = new JsonSerializer<Rule>().fromJSONArray(TestModel.rules,Rule);
|
||||
this.visibilityRulesService.buildVisibilityRules(rules) */
|
||||
});
|
||||
}
|
||||
|
||||
submit(){
|
||||
|
|
|
@ -4,6 +4,6 @@ export class BaseTableOfContent{
|
|||
constructor(public router: Router,public route:ActivatedRoute){}
|
||||
|
||||
scrollToId(elementId) {
|
||||
this.router.navigate([this.route.snapshot.url], { fragment: elementId });
|
||||
this.router.navigate([this.route.snapshot.url[0]+"/"+this.route.snapshot.url[1]], { fragment: elementId });
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue