no message
This commit is contained in:
parent
9b62f914b6
commit
bac6d12b42
|
@ -14,6 +14,7 @@ import { ProjectListingComponent } from './projects/project-listing.component';
|
|||
import { DataManagementPlanListingComponent } from './dmps/dmp-listing.component';
|
||||
import { ProjectEditorComponent } from './projects/editor/project-editor.component';
|
||||
import { DataManagementPlanEditorComponent } from './dmps/editor/dmp-editor.component';
|
||||
import { DataManagementPlanWizardComponent } from './dmp-wizard/dmp-wizard.component';
|
||||
|
||||
|
||||
const appRoutes: Routes = [
|
||||
|
@ -24,8 +25,10 @@ const appRoutes: Routes = [
|
|||
{ path: 'project/:id', component: ProjectEditorComponent, canActivate: [AuthGuard]},
|
||||
{ path: 'projects/new', component: ProjectEditorComponent, canActivate: [AuthGuard]},
|
||||
{ path: 'dmps', component: DataManagementPlanListingComponent, canActivate: [AuthGuard]},
|
||||
{ path: 'dmp/new', component: DataManagementPlanWizardComponent, canActivate: [AuthGuard]},
|
||||
{ path: 'dmp/:id', component: DataManagementPlanEditorComponent, canActivate: [AuthGuard]},
|
||||
{ path: 'dmps/new', component: DataManagementPlanEditorComponent, canActivate: [AuthGuard]},
|
||||
|
||||
{ path: 'login', component: MainSignInComponent},
|
||||
{ path: "unauthorized", loadChildren: './unauthorized/unauthorized.module#UnauthorizedModule' },
|
||||
{ path: 'welcome', component: HomepageComponent, canActivate: [AuthGuard]},
|
||||
|
|
|
@ -111,6 +111,7 @@ import { ProjectEditorComponent } from './projects/editor/project-editor.compone
|
|||
import { DataManagementPlanEditorComponent } from './dmps/editor/dmp-editor.component';
|
||||
|
||||
import { FigurecardComponent } from './shared/components/figurecard/figurecard.component';
|
||||
import { DataManagementPlanWizardComponent } from './dmp-wizard/dmp-wizard.component';
|
||||
|
||||
|
||||
|
||||
|
@ -152,7 +153,8 @@ import { FigurecardComponent } from './shared/components/figurecard/figurecard.c
|
|||
BreadcrumbComponent, DmpDetailedComponent, ProjectDetailedComponent,
|
||||
ProjectEditorComponent,
|
||||
DataManagementPlanEditorComponent,
|
||||
FigurecardComponent
|
||||
FigurecardComponent,
|
||||
DataManagementPlanWizardComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<div class="data-management-plan-editor">
|
||||
<mat-horizontal-stepper [linear]="isLinear">
|
||||
<mat-step [stepControl]="firstFormGroup">
|
||||
<form [formGroup]="firstFormGroup">
|
||||
<ng-template matStepLabel>Fill out your name</ng-template>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Last name, First name" formControlName="firstCtrl" required>
|
||||
</mat-form-field>
|
||||
<div>
|
||||
<button mat-button matStepperNext>Next</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-step>
|
||||
<mat-step [stepControl]="secondFormGroup">
|
||||
<form [formGroup]="secondFormGroup">
|
||||
<ng-template matStepLabel>Fill out your address</ng-template>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Address" formControlName="secondCtrl" required>
|
||||
</mat-form-field>
|
||||
<div>
|
||||
<button mat-button matStepperPrevious>Back</button>
|
||||
<button mat-button matStepperNext>Next</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-step>
|
||||
<mat-step>
|
||||
<ng-template matStepLabel>Done</ng-template>
|
||||
You are now done.
|
||||
<div>
|
||||
<button mat-button matStepperPrevious>Back</button>
|
||||
</div>
|
||||
</mat-step>
|
||||
</mat-horizontal-stepper>
|
||||
</div>
|
|
@ -0,0 +1,35 @@
|
|||
.full-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-table {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.table-card .mat-grid-tile {
|
||||
background: rgba(0, 0, 0, 0.32);
|
||||
}
|
||||
|
||||
.data-management-plan-editor {
|
||||
mat-form-field {
|
||||
width: 100%;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.mat-card {
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
.left-button {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.description-area {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
import { Component, ViewChild, OnInit, AfterViewInit, ViewEncapsulation } from "@angular/core";
|
||||
import { DataManagementPlanService } from "../services/data-management-plan/data-management-plan.service";
|
||||
import { FormGroup, Validators, FormBuilder } from "@angular/forms";
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-dmp-wizard-component',
|
||||
templateUrl: 'dmp-wizard.component.html',
|
||||
styleUrls: ['./dmp-wizard.component.scss'],
|
||||
providers: [DataManagementPlanService],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class DataManagementPlanWizardComponent implements AfterViewInit {
|
||||
|
||||
constructor(
|
||||
private dataManagementPlanService: DataManagementPlanService,
|
||||
private formBuilder: FormBuilder
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
isLinear = false;
|
||||
firstFormGroup: FormGroup;
|
||||
secondFormGroup: FormGroup;
|
||||
|
||||
ngOnInit() {
|
||||
this.firstFormGroup = this.formBuilder.group({
|
||||
firstCtrl: ['', Validators.required]
|
||||
});
|
||||
this.secondFormGroup = this.formBuilder.group({
|
||||
secondCtrl: ['', Validators.required]
|
||||
});
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
// this.route.params.subscribe((params: Params) => {
|
||||
// const itemId = params['id'];
|
||||
|
||||
// if (itemId != null) {
|
||||
// this.isNew = false;
|
||||
// this.dataManagementPlanService.getSingle(itemId).map(data => data as DataManagementPlanModel)
|
||||
// .subscribe(data => {
|
||||
// this.dataManagementPlan = new JsonSerializer<DataManagementPlanModel>().fromJSONObject(data, DataManagementPlanModel);
|
||||
// this.formGroup = this.dataManagementPlan.buildForm();
|
||||
// });
|
||||
// } else {
|
||||
// this.dataManagementPlan = new DataManagementPlanModel();
|
||||
// setTimeout(() => {
|
||||
// this.formGroup = this.dataManagementPlan.buildForm();
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
|
||||
public cancel(): void {
|
||||
//this.router.navigate(['/dataManagementPlans']);
|
||||
}
|
||||
}
|
|
@ -23,7 +23,8 @@ import {
|
|||
DateAdapter,
|
||||
MatTooltipModule,
|
||||
MatCheckboxModule,
|
||||
MatTabsModule
|
||||
MatTabsModule,
|
||||
MatStepperModule
|
||||
} from '@angular/material';
|
||||
import { CdkTableModule } from '@angular/cdk/table';
|
||||
import { SnackBarNotificationComponent } from '../components/notificaiton/snack-bar-notification.component';
|
||||
|
@ -60,7 +61,8 @@ import { CovalentLayoutModule, CovalentChipsModule, CovalentDialogsModule } from
|
|||
MatTabsModule,
|
||||
CovalentLayoutModule,
|
||||
CovalentChipsModule,
|
||||
CovalentDialogsModule
|
||||
CovalentDialogsModule,
|
||||
MatStepperModule
|
||||
],
|
||||
|
||||
providers: [
|
||||
|
|
Loading…
Reference in New Issue