no message
This commit is contained in:
parent
18cbd7468c
commit
66952722ba
|
@ -65,7 +65,7 @@
|
|||
{{option.name}}
|
||||
</div>
|
||||
</ng-template>
|
||||
<mat-progress-bar [style.height.px]="2" *ngIf="filteringServicesAsync" mode="indeterminate"></mat-progress-bar>
|
||||
<mat-progress-bar [style.height.px]="2" *ngIf="filteredServicesAsync" mode="indeterminate"></mat-progress-bar>
|
||||
</td-chips>
|
||||
|
||||
<td-chips color="accent" [items]="filteredExternalDatasets" formControlName="externalDatasets" placeholder="{{'DATASET-EDITOR.FIELDS.EXTERNAL-DATASETS' | translate}}"
|
||||
|
@ -79,7 +79,7 @@
|
|||
{{option.label}}
|
||||
</div>
|
||||
</ng-template>
|
||||
<mat-progress-bar [style.height.px]="2" *ngIf="filteringExternalDatasetsAsync" mode="indeterminate"></mat-progress-bar>
|
||||
<mat-progress-bar [style.height.px]="2" mode="indeterminate"></mat-progress-bar>
|
||||
</td-chips>
|
||||
|
||||
<div class="navigation-buttons-container">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<div class="container-fluid">
|
||||
<h3>{{'DATASET-LISTING.TITLE' | translate}}</h3>
|
||||
<h3>{{titlePrefix}} {{'DATASET-LISTING.TITLE' | translate}}</h3>
|
||||
|
||||
|
||||
<app-datasets-criteria-component></app-datasets-criteria-component>
|
||||
<mat-card class="mat-card">
|
||||
|
@ -45,11 +46,11 @@
|
|||
</ng-container>
|
||||
|
||||
<!-- Column Definition: Status -->
|
||||
<ng-container cdkColumnDef="status">
|
||||
<!-- <ng-container cdkColumnDef="status">
|
||||
<mat-header-cell *matHeaderCellDef>{{'DATASET-LISTING.COLUMNS.STATUS' | translate}}</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.status}}
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
</ng-container> -->
|
||||
|
||||
<!-- Column Definition: Description -->
|
||||
<ng-container cdkColumnDef="description">
|
||||
|
@ -77,7 +78,7 @@
|
|||
</mat-paginator>
|
||||
</mat-card>
|
||||
|
||||
<button mat-fab class="mat-fab-bottom-right" color="primary" [routerLink]=" ['/dataset/new'] ">
|
||||
<button *ngIf="dmpId" mat-fab class="mat-fab-bottom-right" color="primary" [routerLink]="['/dataset/new/'+dmpId] ">
|
||||
<mat-icon class="mat-24">add</mat-icon>
|
||||
</button>
|
||||
</div>
|
|
@ -12,13 +12,15 @@ import { SnackBarNotificationComponent } from "../shared/components/notificaiton
|
|||
import { DatasetService } from "../services/dataset/dataset.service";
|
||||
import { DatasetListingModel } from "../models/datasets/DatasetListingModel";
|
||||
import { PageEvent } from '@angular/material';
|
||||
import { DataManagementPlanService } from "@app/services/data-management-plan/data-management-plan.service";
|
||||
import { DataManagementPlanModel } from "@app/models/data-managemnt-plans/DataManagementPlanModel";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-dataset-listing-component',
|
||||
templateUrl: 'dataset-listing.component.html',
|
||||
styleUrls: ['./dataset-listing.component.scss'],
|
||||
providers: [DatasetService]
|
||||
providers: [DatasetService, DataManagementPlanService]
|
||||
})
|
||||
export class DatasetListingComponent implements OnInit {
|
||||
|
||||
|
@ -26,9 +28,12 @@ export class DatasetListingComponent implements OnInit {
|
|||
@ViewChild(MatSort) sort: MatSort;
|
||||
@ViewChild(DatasetCriteriaComponent) criteria: DatasetCriteriaComponent;
|
||||
|
||||
|
||||
dataSource: DatasetDataSource | null;
|
||||
displayedColumns: String[] = ['label', 'dmp', 'profile', 'dataRepositories', 'registries', 'services', 'status', 'description', 'created', 'actions'];
|
||||
displayedColumns: String[] = ['label', 'dmp', 'profile', 'dataRepositories', 'registries', 'services', 'description', 'created', 'actions'];
|
||||
pageEvent: PageEvent;
|
||||
titlePrefix: String;
|
||||
dmpId: String;
|
||||
|
||||
statuses = [
|
||||
{ value: '0', viewValue: 'Active' },
|
||||
|
@ -40,7 +45,8 @@ export class DatasetListingComponent implements OnInit {
|
|||
private router: Router,
|
||||
private languageService: TranslateService,
|
||||
public snackBar: MatSnackBar,
|
||||
public route: ActivatedRoute
|
||||
public route: ActivatedRoute,
|
||||
public dataManagementPlanService: DataManagementPlanService
|
||||
) {
|
||||
|
||||
}
|
||||
|
@ -48,12 +54,20 @@ export class DatasetListingComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe((params: Params) => {
|
||||
const dmpId = params['dmpId'];
|
||||
this.criteria.setCriteria(this.getDefaultCriteria(dmpId));
|
||||
this.dmpId = params['dmpId'];
|
||||
if(this.dmpId != null) this.setDmpTitle(this.dmpId);
|
||||
this.criteria.setCriteria(this.getDefaultCriteria(this.dmpId));
|
||||
this.refresh();
|
||||
this.criteria.setRefreshCallback(() => this.refresh());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setDmpTitle(dmpId: String) {
|
||||
this.dataManagementPlanService.getSingle(dmpId).map(data => data as DataManagementPlanModel)
|
||||
.subscribe(data => {
|
||||
this.titlePrefix = data.label;
|
||||
});
|
||||
}
|
||||
|
||||
refresh() {
|
||||
this.dataSource = new DatasetDataSource(this.datasetService, this._paginator, this.sort, this.languageService, this.snackBar, this.criteria);
|
||||
|
@ -63,7 +77,7 @@ export class DatasetListingComponent implements OnInit {
|
|||
this.router.navigate(['/dataset/' + rowId]);
|
||||
}
|
||||
|
||||
getDefaultCriteria(dmpId: string): DatasetCriteria {
|
||||
getDefaultCriteria(dmpId: String): DatasetCriteria {
|
||||
const defaultCriteria = new DatasetCriteria();
|
||||
if (dmpId != null) {
|
||||
defaultCriteria.dmpIds.push(dmpId);
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
</ng-container>
|
||||
|
||||
<!-- Column Definition: Profile -->
|
||||
<ng-container cdkColumnDef="profile">
|
||||
<!-- <ng-container cdkColumnDef="profile">
|
||||
<mat-header-cell *matHeaderCellDef>{{'DMP-LISTING.COLUMNS.PROFILE' | translate}}</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row"> {{row.profile}} </mat-cell>
|
||||
</ng-container>
|
||||
</ng-container> -->
|
||||
|
||||
<!-- Column Definition: Researchers -->
|
||||
<ng-container cdkColumnDef="researchers">
|
||||
|
@ -50,9 +50,9 @@
|
|||
<mat-cell *matCellDef="let row">
|
||||
<mat-menu #actionsMenu="matMenu">
|
||||
<button mat-menu-item (click)="rowClick(row.id)"><mat-icon>mode_edit</mat-icon>{{'DMP-LISTING.ACTIONS.EDIT' | translate}}</button>
|
||||
<button mat-menu-item (click)="openShareDialog(row.id,row.label)"><mat-icon>insert_invitation</mat-icon>{{'DMP-LISTING.ACTIONS.INVITE' | translate}}</button>
|
||||
<button mat-menu-item (click)="addDataset(row.id)"><mat-icon>insert_invitation</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DATASET' | translate}}</button>
|
||||
<button mat-menu-item (click)="showDatasets(row.id)"><mat-icon>insert_invitation</mat-icon>{{'DMP-LISTING.ACTIONS.DATASETS' | translate}}</button>
|
||||
<button mat-menu-item (click)="openShareDialog(row.id,row.label)"><mat-icon>share</mat-icon>{{'DMP-LISTING.ACTIONS.INVITE' | translate}}</button>
|
||||
<button mat-menu-item (click)="addDataset(row.id)"><mat-icon>add</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DATASET' | translate}}</button>
|
||||
<button mat-menu-item (click)="showDatasets(row.id)"><mat-icon>list</mat-icon>{{'DMP-LISTING.ACTIONS.DATASETS' | translate}}</button>
|
||||
</mat-menu>
|
||||
<button mat-icon-button [matMenuTriggerFor]="actionsMenu">
|
||||
<mat-icon>more_vert</mat-icon>
|
||||
|
|
|
@ -27,7 +27,7 @@ export class DataManagementPlanListingComponent implements OnInit {
|
|||
@ViewChild(DataManagementPlanCriteriaComponent) criteria: DataManagementPlanCriteriaComponent;
|
||||
|
||||
dataSource: DataManagementPlanDataSource | null;
|
||||
displayedColumns: String[] = ['name', 'project', 'profile', 'researchers', 'organisations', 'version', 'actions'];
|
||||
displayedColumns: String[] = ['name', 'project', 'researchers', 'organisations', 'version', 'actions'];
|
||||
|
||||
constructor(
|
||||
private dataManagementPlanService: DataManagementPlanService,
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
<div layout="row" class="full-width text-right" align="end">
|
||||
<button mat-raised-button color="primary" (click)="cancel()" type="button">{{'DMP-EDITOR.ACTIONS.CANCEL' | translate}}</button>
|
||||
<button *ngIf="!isNew" mat-raised-button color="primary" (click)="invite()" type="button">{{'DMP-EDITOR.ACTIONS.INVITE' | translate}}</button>
|
||||
<!-- <button *ngIf="!isNew" mat-raised-button color="primary" (click)="invite()" type="button">{{'DMP-EDITOR.ACTIONS.INVITE' | translate}}</button> -->
|
||||
<button mat-raised-button color="primary" type="submit">{{'DMP-EDITOR.ACTIONS.SAVE' | translate}}</button>
|
||||
<button *ngIf="!isNew" mat-raised-button color="primary" type="submit" (click)="delete()">{{'DMP-EDITOR.ACTIONS.DELETE' | translate}}</button>
|
||||
</div>
|
||||
|
|
|
@ -64,7 +64,6 @@ export class AutocompleteRemoteComponent implements OnInit/* , ControlValueAcces
|
|||
// }); */
|
||||
// },
|
||||
// error => {
|
||||
// console.log(error);
|
||||
// }
|
||||
// );
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ export class DynamicFormFieldComponent {
|
|||
}
|
||||
|
||||
clearInput(){
|
||||
debugger;
|
||||
}
|
||||
|
||||
get isValid() {
|
||||
|
|
|
@ -22,7 +22,6 @@ export class DynamicFormCompositeFieldComponent implements OnInit {
|
|||
constructor(private visibilityRulesService: VisibilityRulesService) { }
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.form);
|
||||
}
|
||||
|
||||
addMultipleField(fieldIndex: number) {
|
||||
|
|
|
@ -26,7 +26,6 @@ export class DynamicFormGroupComponent implements OnInit {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.group);
|
||||
//let st = this.group.style == "any" ? "" : this.group.style;
|
||||
//this.classFromJson = this.group.class == "" ? "" : this.group.class;
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ export class DynamicFormSectionComponent implements OnInit {
|
|||
constructor(private visibilityRulesService: VisibilityRulesService) { }
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.section);
|
||||
}
|
||||
|
||||
addMultipleField(fieldsetIndex: number) {
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
}
|
||||
|
||||
.mat-progress-bar {
|
||||
.form-progress-bar {
|
||||
|
||||
margin: 20px 0;
|
||||
|
||||
|
|
|
@ -6,31 +6,31 @@
|
|||
|
||||
<mat-sidenav-content>
|
||||
<!-- <button mat-raised-button color="primary" style="margin: 15px;" (click)="toggleSidebar()" icon="fa-arrow-left">Table Of Contents</button> -->
|
||||
<button mat-raised-button color="primary" *ngIf="datasetProfileDefinitionModel&&datasetProfileDefinitionModel.status != 1"
|
||||
style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;" type="submit">Save</button>
|
||||
<button mat-raised-button color="primary" *ngIf="datasetProfileDefinitionModel&&datasetProfileDefinitionModel?.status != 1"
|
||||
style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;" (click)="submit();">Save and Finalize</button>
|
||||
<div>
|
||||
<div class="alignment-center">
|
||||
<!-- <ngb-pagination *ngIf="pages" [collectionSize]="pages.length*10" [page]="currentPageIndex" (pageChange)="changePageIndex($event)" aria-label="Default pagination"></ngb-pagination> -->
|
||||
<progress-bar *ngIf="form" [formGroup]="form"></progress-bar>
|
||||
<form *ngIf="form" novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||
<button mat-raised-button color="primary" *ngIf="datasetProfileDefinitionModel&&datasetProfileDefinitionModel.status != 1"
|
||||
style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;" type="submit">Save</button>
|
||||
<!-- <button mat-raised-button color="primary" *ngIf="datasetProfileDefinitionModel&&datasetProfileDefinitionModel?.status != 1"
|
||||
style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;" (click)="submit();">Save and Finalize</button> -->
|
||||
<div>
|
||||
<div class="alignment-center">
|
||||
<!-- <ngb-pagination *ngIf="pages" [collectionSize]="pages.length*10" [page]="currentPageIndex" (pageChange)="changePageIndex($event)" aria-label="Default pagination"></ngb-pagination> -->
|
||||
<progress-bar *ngIf="form" [formGroup]="form"></progress-bar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<!-- <progress-bar *ngIf="form" [formGroup]="form"></progress-bar> -->
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" id="form-container">
|
||||
<form *ngIf="form" novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||
<mat-vertical-stepper [linear]="false">
|
||||
<div class="col-md-12" id="form-container">
|
||||
<!-- <form *ngIf="form" novalidate [formGroup]="form" (ngSubmit)="onSubmit()"> -->
|
||||
<mat-vertical-stepper #stepper [linear]="false">
|
||||
<div *ngFor="let page of pages let z=index;">
|
||||
<div *ngFor="let section of datasetProfileDefinitionModel.sections; let i = index;">
|
||||
<div *ngIf="section.page == z">
|
||||
<mat-step [stepControl]="section">
|
||||
<df-section [section]="section" [form]="form.get('sections').get(''+i)" [path]="i+1" [pathName]="'sections.'+i"></df-section>
|
||||
<ng-template matStepLabel>{{section.title}}</ng-template>
|
||||
<div>
|
||||
<div *ngIf="stepper.selectedIndex == z">
|
||||
<df-section [section]="section" [form]="form.get('sections').get(''+i)" [path]="i+1" [pathName]="'sections.'+i"></df-section>
|
||||
<!-- <div>
|
||||
<button mat-button matStepperNext>Next</button>
|
||||
</div> -->
|
||||
</div>
|
||||
</mat-step>
|
||||
</div>
|
||||
|
@ -41,8 +41,9 @@
|
|||
<df-section *ngIf='this.shouldDisplaySection(section)' [section]="section" [form]="form.get('sections').get(''+i)" [path]="i+1"
|
||||
[pathName]="'sections.'+i"></df-section>
|
||||
</div> -->
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</mat-sidenav-content>
|
||||
</mat-sidenav-container>
|
||||
</div>
|
||||
|
|
|
@ -34,7 +34,7 @@ export class DynamicFormComponent implements OnInit {
|
|||
@Input() path: string;
|
||||
form: FormGroup;
|
||||
id: string;
|
||||
datasetId: string;
|
||||
// @Input() datasetId: string;
|
||||
pathName: string;
|
||||
pages: Array<number>;
|
||||
activeStepperIndex: number = 1;
|
||||
|
@ -51,7 +51,7 @@ export class DynamicFormComponent implements OnInit {
|
|||
private http: BaseHttpService,
|
||||
private datasetWizardService: DatasetWizardService,
|
||||
) {
|
||||
this.datasetId = route.snapshot.params['id'];
|
||||
//this.datasetId = route.snapshot.params['id'];
|
||||
}
|
||||
|
||||
getSubForm(subformName) {
|
||||
|
@ -94,8 +94,8 @@ export class DynamicFormComponent implements OnInit {
|
|||
}
|
||||
|
||||
onSubmit(){
|
||||
this.datasetWizardService.saveDataset(this.datasetId, this.form.value).subscribe(data => {
|
||||
this.router.navigateByUrl("/datasets");
|
||||
this.datasetWizardService.saveDataset(this.dataModel.id, this.form.value).subscribe(data => {
|
||||
this.router.navigateByUrl("/datasets/" + this.dataModel.dmp.id);
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- <p-progressBar [value]="value" [style]="{'height': '30px'}" [styleClass]="'alwaysVisible'"></p-progressBar> -->
|
||||
|
||||
<div class="demo-progress-bar-container">
|
||||
<mat-progress-bar mode="determinate" [value]="value" [color]="color"></mat-progress-bar>
|
||||
<mat-progress-bar class="form-progress-bar" mode="determinate" [value]="value" [color]="color"></mat-progress-bar>
|
||||
</div>
|
|
@ -2,5 +2,5 @@ import { BaseCriteria } from "../BaseCriteria";
|
|||
|
||||
export class DatasetCriteria extends BaseCriteria {
|
||||
public status: Number;
|
||||
public dmpIds: string[] = [];
|
||||
public dmpIds: String[] = [];
|
||||
}
|
||||
|
|
|
@ -124,7 +124,6 @@ export class AuthService {
|
|||
}
|
||||
|
||||
public onLogOutError(errorMessage: string) {
|
||||
console.log(errorMessage);
|
||||
this.snackBar.openFromComponent(SnackBarNotificationComponent, {
|
||||
data: { message: 'GENERAL.SNACK-BAR.UNSUCCESSFUL-LOGOUT', language: this.language },
|
||||
duration: 3000,
|
||||
|
|
|
@ -33,7 +33,7 @@ export class DataManagementPlanService {
|
|||
return this.http.post<DataTableData<DataManagementPlanListingModel>>(this.actionUrl + 'getPaged', dataTableRequest, { headers: this.headers });
|
||||
}
|
||||
|
||||
getSingle(id: string): Observable<DataManagementPlanModel> {
|
||||
getSingle(id: String): Observable<DataManagementPlanModel> {
|
||||
return this.http.get<DataManagementPlanModel>(this.actionUrl + 'getSingle/' + id, { headers: this.headers });
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,6 @@ export class LoginService {
|
|||
}
|
||||
|
||||
public onLogInError(errorMessage: string) {
|
||||
console.log(errorMessage);
|
||||
this.snackBar.openFromComponent(SnackBarNotificationComponent, {
|
||||
data: { message: 'GENERAL.SNACK-BAR.UNSUCCESSFUL-LOGIN', language: this.language },
|
||||
duration: 3000,
|
||||
|
|
Loading…
Reference in New Issue