Fixed Bugs With Some Search Fields and Dataset Locking
This commit is contained in:
parent
2ca29e303b
commit
c33d5ea50a
|
@ -80,7 +80,7 @@ public class Dataset implements DataEntity<Dataset, UUID> {
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
// @Cascade(value=org.hibernate.annotations.CascadeType.ALL)
|
// @Cascade(value=org.hibernate.annotations.CascadeType.ALL)
|
||||||
@JoinColumn(name = "\"DMP\"", nullable = true)
|
@JoinColumn(name = "\"DMP\"", nullable = false)
|
||||||
private DMP dmp;
|
private DMP dmp;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class ResearcherManager {
|
||||||
|
|
||||||
QueryableList<eu.eudat.data.entities.Researcher> items = apiContext.getOperationsContext().getDatabaseRepository().getResearcherDao().getWithCriteria(researcherCriteriaRequest.getCriteria());
|
QueryableList<eu.eudat.data.entities.Researcher> items = apiContext.getOperationsContext().getDatabaseRepository().getResearcherDao().getWithCriteria(researcherCriteriaRequest.getCriteria());
|
||||||
List<eu.eudat.models.data.dmp.Researcher> researchers = items.select(item -> new eu.eudat.models.data.dmp.Researcher().fromDataModel(item));
|
List<eu.eudat.models.data.dmp.Researcher> researchers = items.select(item -> new eu.eudat.models.data.dmp.Researcher().fromDataModel(item));
|
||||||
List<Map<String, String>> remoteRepos = remoteFetcher.getResearchers(researcherCriteriaRequest.getCriteria().getLike(),null);
|
List<Map<String, String>> remoteRepos = remoteFetcher.getResearchers(researcherCriteriaRequest.getCriteria().getName(),null);
|
||||||
ResearchersExternalSourcesModel researchersExternalSourcesModel = new ResearchersExternalSourcesModel().fromExternalItem(remoteRepos);
|
ResearchersExternalSourcesModel researchersExternalSourcesModel = new ResearchersExternalSourcesModel().fromExternalItem(remoteRepos);
|
||||||
for (ExternalSourcesItemModel externalListingItem : researchersExternalSourcesModel) {
|
for (ExternalSourcesItemModel externalListingItem : researchersExternalSourcesModel) {
|
||||||
eu.eudat.models.data.dmp.Researcher researcher = apiContext.getOperationsContext().getBuilderFactory().getBuilder(ResearcherBuilder.class)
|
eu.eudat.models.data.dmp.Researcher researcher = apiContext.getOperationsContext().getBuilderFactory().getBuilder(ResearcherBuilder.class)
|
||||||
|
|
|
@ -44,7 +44,15 @@
|
||||||
<urlConfig>
|
<urlConfig>
|
||||||
<ordinal>1</ordinal>
|
<ordinal>1</ordinal>
|
||||||
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url>
|
<url>https://eestore.paas2.uninett.no/api/projectrepo/</url>
|
||||||
<datapath>$['data'][*]['attributes']['pid','name','uri','description']</datapath>
|
<data>
|
||||||
|
<path>$['data'][*]['attributes']</path>
|
||||||
|
<fields>
|
||||||
|
<id>'pid'</id>
|
||||||
|
<name>'name'</name>
|
||||||
|
<uri>'uri'</uri>
|
||||||
|
<description>'description'</description>
|
||||||
|
</fields>
|
||||||
|
</data>
|
||||||
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
<paginationpath>$['meta']['pagination']['page','pages','count']</paginationpath>
|
||||||
</urlConfig>
|
</urlConfig>
|
||||||
<externalFieldId>pid</externalFieldId>
|
<externalFieldId>pid</externalFieldId>
|
||||||
|
|
|
@ -1,19 +1,18 @@
|
||||||
<div class="dataset-wizard">
|
<div class="dataset-wizard">
|
||||||
<h3 *ngIf="isNew">{{ 'DATASET-WIZARD.TITLE.NEW' | translate }}</h3>
|
<h3 *ngIf="isNew">{{ 'DATASET-WIZARD.TITLE.NEW' | translate }}</h3>
|
||||||
<div class="flex-container">
|
<div fxLayout="row" fxLayoutAlign="space-between center">
|
||||||
<div fxLayout="row">
|
<h3 *ngIf="!isNew">{{datasetWizardModel?.label}} {{ 'GENERAL.NAMES.DATASET' | translate }}</h3>
|
||||||
<h3 *ngIf="!isNew">{{datasetWizardModel?.label}} {{ 'GENERAL.NAMES.DATASET' | translate }}</h3>
|
<h3 *ngIf="this.formGroup && this.formGroup.dirty"> - {{ 'GENERAL.STATUSES.EDIT' | translate }}</h3>
|
||||||
<h3 *ngIf="this.formGroup && this.formGroup.dirty"> - {{ 'GENERAL.STATUSES.EDIT' | translate }}</h3>
|
<h3 *ngIf="this.formGroup && viewOnly"> - {{ 'GENERAL.STATUSES.FINALISED' | translate }}</h3>
|
||||||
<h3 *ngIf="this.formGroup && viewOnly"> - {{ 'GENERAL.STATUSES.FINALISED' | translate }}</h3>
|
|
||||||
<button *ngIf="!editMode " mat-icon-button (click)="enableForm()">
|
<button *ngIf="!editMode" mat-icon-button (click)="enableForm()">
|
||||||
<mat-icon class="mat-24">edit</mat-icon>
|
<mat-icon class="mat-24">edit</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="editMode" mat-icon-button (click)="disableForm()">
|
<button *ngIf="editMode" mat-icon-button (click)="disableForm()">
|
||||||
<mat-icon class="mat-24">lock</mat-icon>
|
<mat-icon class="mat-24">lock</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-container" *ngIf="this.datasetProfileDefinitionModel">
|
<div *ngIf="this.datasetProfileDefinitionModel">
|
||||||
<button mat-raised-button color="primary" *ngIf="datasetWizardModel&&datasetWizardModel?.status != 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"
|
<button mat-raised-button color="primary" *ngIf="datasetWizardModel&&datasetWizardModel?.status != 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"
|
||||||
(click)="save();" type="button">{{ 'DATASET-WIZARD.ACTIONS.SAVE' | translate }}</button>
|
(click)="save();" type="button">{{ 'DATASET-WIZARD.ACTIONS.SAVE' | translate }}</button>
|
||||||
<button mat-raised-button color="primary" *ngIf="datasetWizardModel&&datasetWizardModel?.status != 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"
|
<button mat-raised-button color="primary" *ngIf="datasetWizardModel&&datasetWizardModel?.status != 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"
|
||||||
|
@ -84,7 +83,7 @@
|
||||||
[formControl]="suggestion.get('info')">
|
[formControl]="suggestion.get('info')">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2" *ngIf='!viewOnly'>
|
||||||
<button mat-button (click)="callback(i)">
|
<button mat-button (click)="callback(i)">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>close</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
@ -129,7 +128,7 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<button mat-button (click)="callback(i)">
|
<button mat-button (click)="callback(i)" *ngIf='!viewOnly'>
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>close</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -159,7 +158,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<button mat-button (click)="callback(i)">
|
<button mat-button (click)="callback(i)" *ngIf='!viewOnly'>
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>close</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -180,7 +179,6 @@
|
||||||
[parentTemplate]='servicesTemplate' [displayFunction]='servicesDisplayFunc' [formGroup]="formGroup.get('services')"
|
[parentTemplate]='servicesTemplate' [displayFunction]='servicesDisplayFunc' [formGroup]="formGroup.get('services')"
|
||||||
[viewOnly]='viewOnly' [subtitleFunction]='dataRepositoryDisplaySubtitleFunc' [autoCompleteConfiguration]="servicesAutoCompleteConfiguration"
|
[viewOnly]='viewOnly' [subtitleFunction]='dataRepositoryDisplaySubtitleFunc' [autoCompleteConfiguration]="servicesAutoCompleteConfiguration"
|
||||||
(onItemChange)="servicesOnItemChange($event)">
|
(onItemChange)="servicesOnItemChange($event)">
|
||||||
|
|
||||||
</app-external-item-listing>
|
</app-external-item-listing>
|
||||||
|
|
||||||
<ng-template #servicesTemplate let-suggestion let-i="index" let-callback="function">
|
<ng-template #servicesTemplate let-suggestion let-i="index" let-callback="function">
|
||||||
|
@ -190,7 +188,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<button mat-button (click)="callback(i)">
|
<button mat-button (click)="callback(i)" *ngIf='!viewOnly'>
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>close</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -207,7 +205,6 @@
|
||||||
placeholder="{{'DATASET-EDITOR.FIELDS.TAGS' | translate}}" [parentTemplate]='tagsTemplate' [displayFunction]='tagsDisplayFunc'
|
placeholder="{{'DATASET-EDITOR.FIELDS.TAGS' | translate}}" [parentTemplate]='tagsTemplate' [displayFunction]='tagsDisplayFunc'
|
||||||
[formGroup]="formGroup.get('tags')" [viewOnly]='viewOnly' [subtitleFunction]='tagsDisplaySubtitleFunc'
|
[formGroup]="formGroup.get('tags')" [viewOnly]='viewOnly' [subtitleFunction]='tagsDisplaySubtitleFunc'
|
||||||
[autoCompleteConfiguration]="tagsAutoCompleteConfiguration" (onItemChange)="tagsOnItemChange($event)">
|
[autoCompleteConfiguration]="tagsAutoCompleteConfiguration" (onItemChange)="tagsOnItemChange($event)">
|
||||||
|
|
||||||
</app-external-item-listing>
|
</app-external-item-listing>
|
||||||
|
|
||||||
<ng-template #tagsTemplate let-suggestion let-i="index" let-callback="function">
|
<ng-template #tagsTemplate let-suggestion let-i="index" let-callback="function">
|
||||||
|
@ -217,7 +214,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<button mat-button (click)="callback(i)">
|
<button mat-button (click)="callback(i)" *ngIf='!viewOnly'>
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>close</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -41,6 +41,7 @@ import { DataRepositoryReferencedModelHelperComponent } from '../dataset-referen
|
||||||
import { RegistryReferencedModelHelperComponent } from '../dataset-referenced-models-helper/registry/registry-referenced-model-helper.component';
|
import { RegistryReferencedModelHelperComponent } from '../dataset-referenced-models-helper/registry/registry-referenced-model-helper.component';
|
||||||
import { ExternalDatasetReferencedModelHelperComponent } from '../dataset-referenced-models-helper/externalDataset/externaldataset-referenced-model-helper.component';
|
import { ExternalDatasetReferencedModelHelperComponent } from '../dataset-referenced-models-helper/externalDataset/externaldataset-referenced-model-helper.component';
|
||||||
import { ServicesReferencedModelHelperComponent } from '../dataset-referenced-models-helper/services/services-referenced-model-helper.component';
|
import { ServicesReferencedModelHelperComponent } from '../dataset-referenced-models-helper/services/services-referenced-model-helper.component';
|
||||||
|
import { BehaviorSubject } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dataset-wizard-component',
|
selector: 'app-dataset-wizard-component',
|
||||||
|
@ -114,23 +115,28 @@ export class DatasetWizardComponent implements OnInit, AfterViewInit, IBreadCrum
|
||||||
|
|
||||||
const externalDatasetRequestItem: RequestItem<ExternalDatasetCriteria> = new RequestItem();
|
const externalDatasetRequestItem: RequestItem<ExternalDatasetCriteria> = new RequestItem();
|
||||||
externalDatasetRequestItem.criteria = new ExternalDatasetCriteria();
|
externalDatasetRequestItem.criteria = new ExternalDatasetCriteria();
|
||||||
this.externalDatasetAutoCompleteConfiguration = new AutoCompleteConfiguration(this.externalSourcesService.searchDatasetSExternalDatasetservice.bind(this.externalSourcesService), externalDatasetRequestItem);
|
this.externalDatasetAutoCompleteConfiguration = new AutoCompleteConfiguration(this.externalSourcesService.searchDatasetSExternalDatasetservice.bind(this.externalSourcesService),
|
||||||
|
externalDatasetRequestItem, new BehaviorSubject(false));
|
||||||
|
|
||||||
const registriesRequestItem: RequestItem<RegistryCriteria> = new RequestItem();
|
const registriesRequestItem: RequestItem<RegistryCriteria> = new RequestItem();
|
||||||
registriesRequestItem.criteria = new RegistryCriteria();
|
registriesRequestItem.criteria = new RegistryCriteria();
|
||||||
this.registriesAutoCompleteConfiguration = new AutoCompleteConfiguration(this.externalSourcesService.searchDatasetRegistry.bind(this.externalSourcesService), registriesRequestItem);
|
this.registriesAutoCompleteConfiguration = new AutoCompleteConfiguration(this.externalSourcesService.searchDatasetRegistry.bind(this.externalSourcesService),
|
||||||
|
registriesRequestItem, new BehaviorSubject(false));
|
||||||
|
|
||||||
const dataRepositoriesRequestItem: RequestItem<DataRepositoryCriteria> = new RequestItem();
|
const dataRepositoriesRequestItem: RequestItem<DataRepositoryCriteria> = new RequestItem();
|
||||||
dataRepositoriesRequestItem.criteria = new DataRepositoryCriteria();
|
dataRepositoriesRequestItem.criteria = new DataRepositoryCriteria();
|
||||||
this.dataRepositoriesAutoCompleteConfiguration = new AutoCompleteConfiguration(this.externalSourcesService.searchDatasetRepository.bind(this.externalSourcesService), dataRepositoriesRequestItem);
|
this.dataRepositoriesAutoCompleteConfiguration = new AutoCompleteConfiguration(this.externalSourcesService.searchDatasetRepository.bind(this.externalSourcesService),
|
||||||
|
dataRepositoriesRequestItem, new BehaviorSubject(false));
|
||||||
|
|
||||||
const servicesRequestItem: RequestItem<ServicesCriteria> = new RequestItem();
|
const servicesRequestItem: RequestItem<ServicesCriteria> = new RequestItem();
|
||||||
servicesRequestItem.criteria = new ServicesCriteria();
|
servicesRequestItem.criteria = new ServicesCriteria();
|
||||||
this.servicesAutoCompleteConfiguration = new AutoCompleteConfiguration(this.externalSourcesService.searchDatasetService.bind(this.externalSourcesService), servicesRequestItem);
|
this.servicesAutoCompleteConfiguration = new AutoCompleteConfiguration(this.externalSourcesService.searchDatasetService.bind(this.externalSourcesService),
|
||||||
|
servicesRequestItem, new BehaviorSubject(false));
|
||||||
|
|
||||||
const tagsRequestItem: RequestItem<TagsCriteria> = new RequestItem();
|
const tagsRequestItem: RequestItem<TagsCriteria> = new RequestItem();
|
||||||
tagsRequestItem.criteria = new TagsCriteria();
|
tagsRequestItem.criteria = new TagsCriteria();
|
||||||
this.tagsAutoCompleteConfiguration = new AutoCompleteConfiguration(this.externalSourcesService.searchDatasetTags.bind(this.externalSourcesService), tagsRequestItem);
|
this.tagsAutoCompleteConfiguration = new AutoCompleteConfiguration(this.externalSourcesService.searchDatasetTags.bind(this.externalSourcesService),
|
||||||
|
tagsRequestItem, new BehaviorSubject(false));
|
||||||
|
|
||||||
this.externalSourcesConfigurationService.getExternalSourcesConfiguration().subscribe(result => {
|
this.externalSourcesConfigurationService.getExternalSourcesConfiguration().subscribe(result => {
|
||||||
this.externalSourcesConfiguration = result;
|
this.externalSourcesConfiguration = result;
|
||||||
|
@ -465,12 +471,14 @@ export class DatasetWizardComponent implements OnInit, AfterViewInit, IBreadCrum
|
||||||
|
|
||||||
public enableForm() {
|
public enableForm() {
|
||||||
this.editMode = true;
|
this.editMode = true;
|
||||||
|
this.viewOnly = false;
|
||||||
this.formGroup.enable();
|
this.formGroup.enable();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public disableForm() {
|
public disableForm() {
|
||||||
this.editMode = false;
|
this.editMode = false;
|
||||||
|
this.viewOnly = true;
|
||||||
this.formGroup.disable();
|
this.formGroup.disable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,6 @@ export class ProjectEditorComponent implements OnInit, IBreadCrumbComponent {
|
||||||
this.editMode = true;
|
this.editMode = true;
|
||||||
this.formGroup.enable();
|
this.formGroup.enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public disableForm() {
|
public disableForm() {
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
import { BaseCriteria } from '../../../models/criteria/BaseCriteria';
|
import { BaseCriteria } from '../../../models/criteria/BaseCriteria';
|
||||||
import { RequestItem } from '../../../models/criteria/RequestItem';
|
import { RequestItem } from '../../../models/criteria/RequestItem';
|
||||||
|
import { BehaviorSubject } from 'rxjs';
|
||||||
|
|
||||||
export class AutoCompleteConfiguration {
|
export class AutoCompleteConfiguration {
|
||||||
public callback: Function;
|
public callback: Function;
|
||||||
|
public refreshEvent: BehaviorSubject<boolean>;
|
||||||
public requestItem: RequestItem<any>;
|
public requestItem: RequestItem<any>;
|
||||||
constructor(callback: Function, requestItem: RequestItem<any>) {
|
constructor(callback: Function, requestItem: RequestItem<any>, refreshEvent = null) {
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
this.requestItem = requestItem;
|
this.requestItem = requestItem;
|
||||||
|
this.refreshEvent = refreshEvent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Input, OnInit, Component, AfterViewInit, Output, EventEmitter, OnChanges } from '@angular/core';
|
import { Input, OnInit, Component, AfterViewInit, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { FormGroup, FormControl, FormGroupDirective, NgForm } from '@angular/forms';
|
import { FormGroup, FormControl, FormGroupDirective, NgForm } from '@angular/forms';
|
||||||
import { ErrorStateMatcher } from '@angular/material';
|
import { ErrorStateMatcher } from '@angular/material';
|
||||||
import { AutoCompleteConfiguration } from './AutoCompleteConfiguration';
|
import { AutoCompleteConfiguration } from './AutoCompleteConfiguration';
|
||||||
|
@ -39,7 +39,13 @@ export class AutoCompleteComponent implements OnInit, ErrorStateMatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.inputData.refreshEvent.subscribe(x => {
|
||||||
|
if (x) {
|
||||||
|
this.formCtrl.patchValue(null);
|
||||||
|
this.textFormCtrl.patchValue(null);
|
||||||
|
this.options = [];
|
||||||
|
}
|
||||||
|
});
|
||||||
this.textFormCtrl = new FormControl();
|
this.textFormCtrl = new FormControl();
|
||||||
if (this.disabled) { this.textFormCtrl.disable(); }
|
if (this.disabled) { this.textFormCtrl.disable(); }
|
||||||
this.formCtrl.registerOnDisabledChange(isDisabled => {
|
this.formCtrl.registerOnDisabledChange(isDisabled => {
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<app-external-item class="col-md-9" [autoCompleteConfiguration]="autoCompleteConfiguration" [formGroup]="formGroup"
|
<app-external-item class="col-md-9" [autoCompleteConfiguration]="autoCompleteConfiguration"
|
||||||
[displayFunction]="displayFunction" [placeholder]="placeholder" [subtitleFunction]="subtitleFunction"
|
[formGroup]="formGroup" [displayFunction]="displayFunction" [placeholder]="placeholder" [subtitleFunction]="subtitleFunction"
|
||||||
(onItemChange)="this.onItemChangeFunc($event)" [formCtrl]="formControl" [disabled]="disabled">
|
(onItemChange)="this.onItemChangeFunc($event)" [formCtrl]="formControl" [disabled]="disabled">
|
||||||
</app-external-item>
|
</app-external-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,63 +4,64 @@ import { ExternalSourcesUrlModel } from '../../../../models/external-sources/Ext
|
||||||
import { AutoCompleteConfiguration } from '../../auto-complete/AutoCompleteConfiguration';
|
import { AutoCompleteConfiguration } from '../../auto-complete/AutoCompleteConfiguration';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-external-item-listing',
|
selector: 'app-external-item-listing',
|
||||||
templateUrl: './external-item-listing.component.html',
|
templateUrl: './external-item-listing.component.html',
|
||||||
styleUrls: ['./external-item-listing.component.scss']
|
styleUrls: ['./external-item-listing.component.scss']
|
||||||
})
|
})
|
||||||
export class ExternalItemListingComponent implements OnInit {
|
export class ExternalItemListingComponent implements OnInit {
|
||||||
@Input()
|
@Input()
|
||||||
public placeholder: string;
|
public placeholder: string;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public formGroup: AbstractControl;
|
public formGroup: AbstractControl;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public autoCompleteConfiguration: AutoCompleteConfiguration;
|
public autoCompleteConfiguration: AutoCompleteConfiguration;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public displayFunction: Function;
|
public displayFunction: Function;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public subtitleFunction: Function;
|
public subtitleFunction: Function;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public disabled = true;
|
public disabled = true;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public viewOnly = false;
|
public viewOnly = false;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public titleKey: string;
|
public titleKey: string;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
parentTemplate;
|
parentTemplate;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
public options: Array<ExternalSourcesUrlModel>;
|
public options: Array<ExternalSourcesUrlModel>;
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
public onItemChange = new EventEmitter<any>();
|
public onItemChange = new EventEmitter<any>();
|
||||||
|
|
||||||
public choice: string;
|
public choice: string;
|
||||||
public formControl = new FormControl();
|
public formControl = new FormControl();
|
||||||
|
enabled = true;
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
if (this.disabled) { this.formControl.disable(); }
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
onItemChangeFunc(event) {
|
||||||
if (this.disabled) { this.formControl.disable(); }
|
if (event) { this.onItemChange.emit(event); }
|
||||||
}
|
}
|
||||||
|
|
||||||
onItemChangeFunc(event) {
|
selectionChange(event) {
|
||||||
if (event) { this.onItemChange.emit(event); }
|
if (this.formControl.disabled) { this.formControl.enable(); }
|
||||||
}
|
this.autoCompleteConfiguration.requestItem.criteria['type'] = event.value;
|
||||||
|
this.autoCompleteConfiguration.refreshEvent.next(true);
|
||||||
|
}
|
||||||
|
|
||||||
selectionChange(event) {
|
deleteItem(name: number) {
|
||||||
if (this.formControl.disabled) { this.formControl.enable(); }
|
(<FormArray>this.formGroup).removeAt(name);
|
||||||
this.autoCompleteConfiguration.requestItem.criteria['type'] = event.value;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
deleteItem(name: number) {
|
|
||||||
(<FormArray>this.formGroup).removeAt(name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,8 @@
|
||||||
"GO-TO-DATASETS": "Go To Datasets",
|
"GO-TO-DATASETS": "Go To Datasets",
|
||||||
"SAVE": "Save",
|
"SAVE": "Save",
|
||||||
"CANCEL": "Cancel",
|
"CANCEL": "Cancel",
|
||||||
"DELETE": "Remove"
|
"DELETE": "Remove",
|
||||||
|
"FINALISE": "Finalise"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"CRITERIA": {
|
"CRITERIA": {
|
||||||
|
@ -408,5 +409,11 @@
|
||||||
"TITLE": "DMP Organisations",
|
"TITLE": "DMP Organisations",
|
||||||
"FILTER": "Filter Organisations"
|
"FILTER": "Filter Organisations"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"DMP-FINALISE-DIALOG": {
|
||||||
|
"SUBMIT": "Submit",
|
||||||
|
"FINALISE-TITLE": "Do you want to finalise any of the following Datasets?",
|
||||||
|
"ALREADY-FINALISED-DATASETS": "Already Finalised Datasets",
|
||||||
|
"NONE": "None"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false,
|
production: false,
|
||||||
Server: 'http://devel-21.local.cite.gr:5000/api/',
|
Server: 'http://devel-21.local.cite.gr:8080/api/',
|
||||||
App: 'http://localhost:4200/',
|
App: 'http://localhost:4200/',
|
||||||
HelpService: {
|
HelpService: {
|
||||||
Enabled: false,
|
Enabled: false,
|
||||||
|
|
Loading…
Reference in New Issue