organisations without chips
This commit is contained in:
parent
5d635d0bb5
commit
7c6815fef0
|
@ -41,11 +41,11 @@
|
|||
<!-- <button mat-button (click)="availableProfiles()">View All</button> -->
|
||||
<a style="float:right" href="#" (click)="availableProfiles()">View All</a>
|
||||
|
||||
<auto-complete-chip class="mat-form-field-full-width" placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}" [configuration]="organisationsAutoCompleteConfiguration"
|
||||
<!-- <auto-complete-chip class="mat-form-field-full-width" placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}" [configuration]="organisationsAutoCompleteConfiguration"
|
||||
titleKey="name" [control]="formGroup.get('organisations')" [required]="true">
|
||||
</auto-complete-chip>
|
||||
</auto-complete-chip> -->
|
||||
|
||||
<!-- <td-chips color="accent" [items]="filteredOrganisations" formControlName="organisations" placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}"
|
||||
<td-chips color="accent" [items]="filteredOrganisations" formControlName="organisations" placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}"
|
||||
(inputChange)="filterOrganisations($event)" requireMatch>
|
||||
<ng-template td-chip let-chip="chip">
|
||||
<div class="tc-grey-100 bgc-teal-700" td-chip-avatar>{{chip.name.substring(0, 1).toUpperCase()}}</div>
|
||||
|
@ -57,7 +57,7 @@
|
|||
</div>
|
||||
</ng-template>
|
||||
<mat-progress-bar [style.height.px]="2" *ngIf="filteringOrganisationsAsync" mode="indeterminate"></mat-progress-bar>
|
||||
</td-chips> -->
|
||||
</td-chips>
|
||||
|
||||
<div layout="row" layout-align="start center">
|
||||
<td-chips style="margin-bottom:25px; display:inline-block; width:90%" color="accent" [items]="filteredResearchers" formControlName="researchers"
|
||||
|
@ -80,6 +80,10 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<mat-form-field class="example-full-width">
|
||||
<input matInput placeholder="Version" disabled [value]="formGroup.get('version').value== undefined ?0 :formGroup.get('version').value">
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-list *ngIf="associatedUsers?.length" role="list">
|
||||
<h3 mat-subheader>Associated Users</h3>
|
||||
|
|
|
@ -148,24 +148,24 @@ export class DataManagementPlanEditorComponent implements AfterViewInit {
|
|||
this.router.navigate(['/invite/' + this.dataManagementPlan.id]);
|
||||
}
|
||||
|
||||
// filterOrganisations(value: string): void {
|
||||
filterOrganisations(value: string): void {
|
||||
|
||||
// this.filteredOrganisations = undefined;
|
||||
// if (value) {
|
||||
// this.filteringOrganisationsAsync = true;
|
||||
this.filteredOrganisations = undefined;
|
||||
if (value) {
|
||||
this.filteringOrganisationsAsync = true;
|
||||
|
||||
// this.externalSourcesService.searchDMPOrganizations(value).subscribe(items => {
|
||||
// this.filteredOrganisations = items;
|
||||
// this.filteringOrganisationsAsync = false;
|
||||
this.externalSourcesService.searchDMPOrganizations(value).subscribe(items => {
|
||||
this.filteredOrganisations = items;
|
||||
this.filteringOrganisationsAsync = false;
|
||||
|
||||
// // this.filteredOrganisations = items.filter((filteredObj: any) => {
|
||||
// // return this.objectsModel ? this.objectsModel.indexOf(filteredObj) < 0 : true;
|
||||
// // });
|
||||
// this.filteredOrganisations = items.filter((filteredObj: any) => {
|
||||
// return this.objectsModel ? this.objectsModel.indexOf(filteredObj) < 0 : true;
|
||||
// });
|
||||
|
||||
// });
|
||||
});
|
||||
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
filterResearchers(value: string): void {
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
<mat-error style="font-size:10.5px" *ngIf="formGroup.get('profiles').errors?.required">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</td-chips>
|
||||
|
||||
<auto-complete-chip class="mat-form-field-full-width" placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}" [configuration]="organisationsAutoCompleteConfiguration"
|
||||
<!-- <auto-complete-chip class="mat-form-field-full-width" placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}" [configuration]="organisationsAutoCompleteConfiguration"
|
||||
titleKey="name" [control]="formGroup.get('organisations')" [required]="true">
|
||||
</auto-complete-chip>
|
||||
</auto-complete-chip> -->
|
||||
|
||||
<!-- <td-chips color="accent" [items]="filteredOrganisations" formControlName="organisations" placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}"
|
||||
<td-chips color="accent" [items]="filteredOrganisations" formControlName="organisations" placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}"
|
||||
(inputChange)="filterOrganisations($event)" requireMatch>
|
||||
<ng-template td-chip let-chip="chip">
|
||||
<div class="tc-grey-100 bgc-teal-700" td-chip-avatar>{{chip.name.substring(0, 1).toUpperCase()}}</div>
|
||||
|
@ -50,7 +50,7 @@
|
|||
</div>
|
||||
</ng-template>
|
||||
<mat-progress-bar [style.height.px]="2" *ngIf="filteringOrganisationsAsync" mode="indeterminate"></mat-progress-bar>
|
||||
</td-chips> -->
|
||||
</td-chips>
|
||||
|
||||
<td-chips style="margin-bottom:25px;" color="accent" [items]="filteredResearchers" formControlName="researchers" placeholder="{{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}"
|
||||
(inputChange)="filterResearchers($event)" requireMatch>
|
||||
|
|
|
@ -117,20 +117,20 @@ export class DataManagementPlanWizardEditorComponent implements AfterViewInit {
|
|||
filterOrganisations(value: string): void {
|
||||
|
||||
this.filteredOrganisations = undefined;
|
||||
// if (value) {
|
||||
// this.filteringOrganisationsAsync = true;
|
||||
if (value) {
|
||||
this.filteringOrganisationsAsync = true;
|
||||
|
||||
// this.externalSourcesService.searchDMPOrganizations(value).subscribe(items => {
|
||||
// this.filteredOrganisations = items;
|
||||
// this.filteringOrganisationsAsync = false;
|
||||
this.externalSourcesService.searchDMPOrganizations(value).subscribe(items => {
|
||||
this.filteredOrganisations = items;
|
||||
this.filteringOrganisationsAsync = false;
|
||||
|
||||
// // this.filteredOrganisations = items.filter((filteredObj: any) => {
|
||||
// // return this.objectsModel ? this.objectsModel.indexOf(filteredObj) < 0 : true;
|
||||
// // });
|
||||
// this.filteredOrganisations = items.filter((filteredObj: any) => {
|
||||
// return this.objectsModel ? this.objectsModel.indexOf(filteredObj) < 0 : true;
|
||||
// });
|
||||
|
||||
// });
|
||||
});
|
||||
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
filterResearchers(value: string): void {
|
||||
|
|
|
@ -44,9 +44,9 @@ export class ExternalSourcesService {
|
|||
return this.http.get<ExternalSourcesItemModel[]>(this.actionUrl + "researchers" + "?query=" + like, { headers: this.headers });
|
||||
}
|
||||
|
||||
public searchDMPOrganizations(organizationscriteria: RequestItem<BaseCriteria>): Observable<ExternalSourcesItemModel[]> {
|
||||
return this.http.get<ExternalSourcesItemModel[]>(this.actionUrl + "organisations" + "?query=" + organizationscriteria.criteria.like, { headers: this.headers });
|
||||
}
|
||||
public searchDMPOrganizations(like: string): Observable<ExternalSourcesItemModel[]> {
|
||||
return this.http.get<ExternalSourcesItemModel[]>(this.actionUrl + "organisations" + "?query=" + like, { headers: this.headers });
|
||||
}//organizationscriteria.criteria.like
|
||||
|
||||
public searchDMPProfiles(like: string): Observable<ExternalSourcesItemModel[]> {
|
||||
return this.http.get<ExternalSourcesItemModel[]>(this.actionUrl + "datasetprofiles/get" + "?query=" + like, { headers: this.headers });
|
||||
|
|
Loading…
Reference in New Issue