This commit is contained in:
Diamantis Tziotzios 2023-10-19 17:27:37 +03:00
parent d60cc144d5
commit 8a41a7dcd9
11 changed files with 125 additions and 151 deletions

View File

@ -481,7 +481,7 @@ public class DataManagementPlanManager {
DMP newDmp = dataManagementPlan.toDataModel(); DMP newDmp = dataManagementPlan.toDataModel();
if(dataManagementPlan.getProfile() != null){ if(dataManagementPlan.getProfile() != null){
DMPProfile dmpProfile = apiContext.getOperationsContext().getDatabaseRepository().getDmpProfileDao().find(dataManagementPlan.getProfile().getId()); DMPProfile dmpProfile = apiContext.getOperationsContext().getDatabaseRepository().getDmpProfileDao().find(dataManagementPlan.getProfile());
newDmp.setProfile(dmpProfile); newDmp.setProfile(dmpProfile);
} }
if (newDmp.getStatus() == (int) DMP.DMPStatus.FINALISED.getValue()) { if (newDmp.getStatus() == (int) DMP.DMPStatus.FINALISED.getValue()) {
@ -2050,16 +2050,14 @@ public class DataManagementPlanManager {
DataManagementPlanEditorModel dm = new DataManagementPlanEditorModel(); DataManagementPlanEditorModel dm = new DataManagementPlanEditorModel();
DmpProfileImportModel dmpProfileImportModel = dataManagementPlans.get(0).getDmpProfile(); DmpProfileImportModel dmpProfileImportModel = dataManagementPlans.get(0).getDmpProfile();
Tuple<UUID, String> tupleProfile = new Tuple<>(); UUID profileId = null;
if (dmpProfileImportModel != null) { if (dmpProfileImportModel != null) {
tupleProfile.setId(dmpProfileImportModel.getDmpProfileId()); profileId = dmpProfileImportModel.getDmpProfileId();
tupleProfile.setLabel(dmpProfileImportModel.getDmpProfileName());
} }
else { else {
tupleProfile.setId(UUID.fromString("86635178-36a6-484f-9057-a934e4eeecd5")); profileId = UUID.fromString("86635178-36a6-484f-9057-a934e4eeecd5");
tupleProfile.setLabel("Dmp Default Blueprint");
} }
dm.setProfile(tupleProfile); dm.setProfile(profileId);
Map<String, Object> dmpPropertiesMap = new HashMap<>(); Map<String, Object> dmpPropertiesMap = new HashMap<>();

View File

@ -23,7 +23,7 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
private UUID id; private UUID id;
private String label; private String label;
private UUID groupId; private UUID groupId;
private Tuple<UUID, String> profile; private UUID profile;
private int version; private int version;
private int status; private int status;
private boolean lockable; private boolean lockable;
@ -53,10 +53,10 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
this.id = id; this.id = id;
} }
public Tuple<UUID, String> getProfile() { public UUID getProfile() {
return profile; return profile;
} }
public void setProfile(Tuple<UUID, String> profile) { public void setProfile(UUID profile) {
this.profile = profile; this.profile = profile;
} }
@ -226,7 +226,7 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
@Override @Override
public DataManagementPlanEditorModel fromDataModel(DMP entity) { public DataManagementPlanEditorModel fromDataModel(DMP entity) {
this.id = entity.getId(); this.id = entity.getId();
this.profile = entity.getProfile() != null ? new Tuple<UUID, String>(entity.getProfile().getId(), entity.getProfile().getLabel()) : null; this.profile = entity.getProfile() != null ? entity.getProfile().getId() : null;
this.organisations = entity.getOrganisations().stream().map(item -> new Organisation().fromDataModel(item)).collect(Collectors.toList()); this.organisations = entity.getOrganisations().stream().map(item -> new Organisation().fromDataModel(item)).collect(Collectors.toList());
this.researchers = entity.getResearchers().stream().map(item -> new Researcher().fromDataModel(item)).collect(Collectors.toList()); this.researchers = entity.getResearchers().stream().map(item -> new Researcher().fromDataModel(item)).collect(Collectors.toList());
this.version = entity.getVersion(); this.version = entity.getVersion();
@ -289,7 +289,7 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
DMP dataManagementPlanEntity = new DMP(); DMP dataManagementPlanEntity = new DMP();
if (this.profile != null) { if (this.profile != null) {
DMPProfile dmpProfile = new DMPProfile(); DMPProfile dmpProfile = new DMPProfile();
dmpProfile.setId(this.profile.getId()); dmpProfile.setId(this.profile);
dataManagementPlanEntity.setProfile(dmpProfile); dataManagementPlanEntity.setProfile(dmpProfile);
} }
dataManagementPlanEntity.setId(this.id); dataManagementPlanEntity.setId(this.id);

View File

@ -1,15 +1,15 @@
dmp.domain = http://localhost:4200 dmp.domain = http://localhost:4200
####################PERSISTENCE OVERRIDES CONFIGURATIONS########## ####################PERSISTENCE OVERRIDES CONFIGURATIONS##########
database.url= database.url= jdbc:postgresql://dbserver02.local.cite.gr:5432/dmptool
database.username= database.username= dmtadm
database.password= database.password= t00L4DM@18!
spring.datasource.maxIdle=10 spring.datasource.maxIdle=10
spring.datasource.minIdle=5 spring.datasource.minIdle=5
spring.datasource.maxActive=10 spring.datasource.maxActive=10
####################ELASTIIC SEARCH TAGS OVERRIDES CONFIGURATIONS########## ####################ELASTIIC SEARCH TAGS OVERRIDES CONFIGURATIONS##########
elasticsearch.host = localhost elasticsearch.host = dmp-elastic-heal.lib.auth.gr
elasticsearch.port = 9200 elasticsearch.port = 9200
elasticsearch.username=elastic elasticsearch.username=elastic
elasticsearch.password= elasticsearch.password=
@ -42,7 +42,7 @@ facebook.login.clientSecret=
facebook.login.namespace= facebook.login.namespace=
#############GOOGLE LOGIN CONFIGURATIONS######### #############GOOGLE LOGIN CONFIGURATIONS#########
google.login.clientId= google.login.clientId=524432312250-sc9qsmtmbvlv05r44onl6l93ia3k9deo.apps.googleusercontent.com
#############LINKEDIN LOGIN CONFIGURATIONS######### #############LINKEDIN LOGIN CONFIGURATIONS#########
linkedin.login.clientId= linkedin.login.clientId=

View File

@ -141,6 +141,7 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
data => { data => {
this.dmpBlueprintModel = new DmpBlueprintEditor().fromModel(data); this.dmpBlueprintModel = new DmpBlueprintEditor().fromModel(data);
this.dmpBlueprintModel.id = null; this.dmpBlueprintModel.id = null;
this.dmpBlueprintModel.created = null;
this.dmpBlueprintModel.status = DmpProfileStatus.Draft; this.dmpBlueprintModel.status = DmpProfileStatus.Draft;
this.formGroup = this.dmpBlueprintModel.buildForm(); this.formGroup = this.dmpBlueprintModel.buildForm();
this.buildSystemFields(); this.buildSystemFields();

View File

@ -64,7 +64,7 @@
<mat-form-field> <mat-form-field>
<mat-select placeholder="{{'DATASET-WIZARD.FIRST-STEP.PROFILE'| translate}}" [required]="true" [compareWith]="compareWith" formControlName="profile"> <mat-select placeholder="{{'DATASET-WIZARD.FIRST-STEP.PROFILE'| translate}}" [required]="true" [compareWith]="compareWith" formControlName="profile">
<mat-option *ngFor="let profile of availableProfiles" [value]="profile"> <mat-option *ngFor="let profile of availableProfiles" [value]="profile">
<div (click)="checkMinMax($event, profile)"> <div>
{{profile.label}} {{profile.label}}
</div> </div>
</mat-option> </mat-option>

View File

@ -49,43 +49,40 @@ export class DatasetEditorComponent extends BaseComponent {
] ]
}; };
checkMinMax(event, profile: DatasetProfileModel) { ngOnInit() {
event.stopPropagation(); this.formGroup.get('profile').valueChanges.pipe(takeUntil(this._destroyed)).subscribe(x => {
this.checkMinMax(x);
});
}
checkMinMax(profile: DatasetProfileModel) {
const dmpSectionIndex = this.formGroup.get('dmpSectionIndex').value; const dmpSectionIndex = this.formGroup.get('dmpSectionIndex').value;
const blueprintId = this.formGroup.get('dmp').value.profile.id; const blueprintId = this.formGroup.get('dmp').value.profile.id;
this.dmpProfileService.getSingleBlueprint(blueprintId) this.dmpProfileService.getSingleBlueprint(blueprintId)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(result => { .subscribe(result => {
const section = result.definition.sections[dmpSectionIndex]; const section = result.definition.sections[dmpSectionIndex];
if(section.hasTemplates){ if (section.hasTemplates) {
const foundTemplate = section.descriptionTemplates.find(template => template.descriptionTemplateId === profile.id); const foundTemplate = section.descriptionTemplates.find(template => template.descriptionTemplateId === profile.id);
if (foundTemplate !== undefined) { if (foundTemplate !== undefined) {
let count = 0; let count = 0;
if(this.formGroup.get('dmp').value.datasets != null){ if (this.formGroup.get('dmp').value.datasets != null) {
for(let dataset of this.formGroup.get('dmp').value.datasets){ for (let dataset of this.formGroup.get('dmp').value.datasets) {
if(dataset.dmpSectionIndex === dmpSectionIndex && dataset.profile.id === foundTemplate.descriptionTemplateId){ if (dataset.dmpSectionIndex === dmpSectionIndex && dataset.profile.id === foundTemplate.descriptionTemplateId) {
count++; count++;
} }
} }
if(count === foundTemplate.maxMultiplicity){ if (count === foundTemplate.maxMultiplicity) {
this.dialog.open(PopupNotificationDialogComponent, { this.dialog.open(PopupNotificationDialogComponent, {
data: { data: {
title: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.TITLE'), title: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.TITLE'),
message: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.MESSAGE') message: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.MESSAGE')
}, maxWidth: '30em' }, maxWidth: '30em'
}); });
} this.formGroup.get('profile').reset();
else{
this.formGroup.get('profile').setValue(profile);
} }
} }
} }
else {
this.formGroup.get('profile').setValue(profile);
}
}
else {
this.formGroup.get('profile').setValue(profile);
} }
}); });
} }

View File

@ -27,7 +27,7 @@
<mat-form-field class="col-md-12"> <mat-form-field class="col-md-12">
<mat-select placeholder="{{'DATASET-CREATE-WIZARD.PREFILL-STEP.PROFILE'| translate}}" [required]="true" [compareWith]="compareWith" formControlName="profile"> <mat-select placeholder="{{'DATASET-CREATE-WIZARD.PREFILL-STEP.PROFILE'| translate}}" [required]="true" [compareWith]="compareWith" formControlName="profile">
<mat-option *ngFor="let profile of data.availableProfiles" [value]="profile"> <mat-option *ngFor="let profile of data.availableProfiles" [value]="profile">
<div (click)="checkMinMax($event, profile)"> <div>
{{profile.label}} {{profile.label}}
</div> </div>
</mat-option> </mat-option>

View File

@ -55,6 +55,10 @@ export class PrefillDatasetComponent extends BaseComponent implements OnInit {
titleFn: (item) => item['name'], titleFn: (item) => item['name'],
subtitleFn: (item) => item['pid'] subtitleFn: (item) => item['pid']
}; };
this.prefillForm.get('profile').valueChanges.pipe(takeUntil(this._destroyed)).subscribe(x => {
this.checkMinMax(x);
});
} }
addProfileIfUsedLessThanMax(profile: DatasetProfileModel) { addProfileIfUsedLessThanMax(profile: DatasetProfileModel) {
@ -89,8 +93,7 @@ export class PrefillDatasetComponent extends BaseComponent implements OnInit {
}); });
} }
checkMinMax(event, profile: DatasetProfileModel) { checkMinMax(profile: DatasetProfileModel) {
event.stopPropagation();
const dmpSectionIndex = this.data.datasetFormGroup.get('dmpSectionIndex').value; const dmpSectionIndex = this.data.datasetFormGroup.get('dmpSectionIndex').value;
const blueprintId = this.data.datasetFormGroup.get('dmp').value.profile.id; const blueprintId = this.data.datasetFormGroup.get('dmp').value.profile.id;
this.dmpProfileService.getSingleBlueprint(blueprintId) this.dmpProfileService.getSingleBlueprint(blueprintId)
@ -114,18 +117,10 @@ export class PrefillDatasetComponent extends BaseComponent implements OnInit {
message: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.MESSAGE') message: this.language.instant('DATASET-EDITOR.MAX-DESCRIPTION-DIALOG.MESSAGE')
}, maxWidth: '30em' }, maxWidth: '30em'
}); });
} this.prefillForm.get('profile').reset();
else{
this.prefillForm.get('profile').setValue(profile);
} }
} }
} }
else {
this.prefillForm.get('profile').setValue(profile);
}
}
else {
this.prefillForm.get('profile').setValue(profile);
} }
}); });
} }

View File

@ -267,7 +267,7 @@
</div> </div>
</div> --> </div> -->
</div> </div>
<div *ngIf="field.category === 'EXTRA'"> <div *ngIf="field.category === 'EXTRA' && formGroup.get('extraFields')?.controls?.length > 0">
<div *ngIf="field.type === extraFieldTypesEnum.TEXT"> <div *ngIf="field.type === extraFieldTypesEnum.TEXT">
<mat-form-field> <mat-form-field>
<input matInput placeholder="{{field.placeholder}}" type="text" name="value" [formControl]="formGroup.get('extraFields').get(getExtraFieldIndex(field.id)).get('value')" [required]="field.required"> <input matInput placeholder="{{field.placeholder}}" type="text" name="value" [formControl]="formGroup.get('extraFields').get(getExtraFieldIndex(field.id)).get('value')" [required]="field.required">

View File

@ -161,81 +161,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
if (itemId != null) { if (itemId != null) {
this.isNew = false; this.isNew = false;
this.dmpService.getSingle(itemId).pipe(map(data => data as DmpModel)) this.getItem(itemId);
.pipe(takeUntil(this._destroyed))
.subscribe(async data => {
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus;
this.dmp = new DmpEditorModel();
this.dmp.grant = new GrantTabModel();
this.dmp.project = new ProjectFormModel();
this.dmp.funder = new FunderFormModel();
this.dmp.extraProperties = new ExtraPropertiesFormModel();
this.dmp.fromModel(data);
this.formGroup = this.dmp.buildForm();
this.datasets = this.formGroup.get('datasets') as FormArray;
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
if (!isNullOrUndefined(this.formGroup.get('profile').value)) {
this.dmpProfileService.getSingleBlueprint(this.formGroup.get('profile').value)
.pipe(takeUntil(this._destroyed))
.subscribe(result => {
this.selectedDmpBlueprintDefinition = result.definition;
this.checkForGrant();
this.checkForFunder();
this.checkForProject();
this.buildExtraFields();
this.formGroup.get('profile').setValue(result);
this.maxStep = this.selectedDmpBlueprintDefinition.sections.length;
this.step = 1;
this.addProfiles(this.dmp.profiles);
});
}
this.maxStep = this.formGroup.get('datasets') ? this.maxStep + this.formGroup.get('datasets').value.length - 1 : this.maxStep;
this.setIsUserOwner();
if (!this.isUserOwner) {
if(this.isUserMember()){
this.router.navigate(['plans', 'overview', itemId]);
return;
}
this.isFinalized = true;
this.formGroup.disable();
}
if (this.dmp.status === DmpStatus.Finalized || lockStatus) {
this.isFinalized = true;
this.formGroup.disable();
}
if (this.authService.current() != null) {
if (!lockStatus) {
this.lock = new LockModel(data.id, this.getUserFromDMP());
this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
this.lock.id = Guid.parse(result);
interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
});
}
}
this.associatedUsers = data.associatedUsers;
this.people = data.users;
this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
.subscribe(x => {
this.formChanged();
});
if(this.lockStatus){
this.dialog.open(PopupNotificationDialogComponent,{data:{
title:this.language.instant('DMP-EDITOR.LOCKED.TITLE'),
message:this.language.instant('DMP-EDITOR.LOCKED.MESSAGE')
}, maxWidth:'30em'});
}
});
});
} }
else { else {
this.dmp = new DmpEditorModel(); this.dmp = new DmpEditorModel();
@ -258,7 +184,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
this.checkForFunder(); this.checkForFunder();
this.checkForProject(); this.checkForProject();
this.buildExtraFields(); this.buildExtraFields();
this.formGroup.get('profile').setValue(result); this.formGroup.get('profile').setValue(result.id);
this.maxStep = this.selectedDmpBlueprintDefinition.sections.length; this.maxStep = this.selectedDmpBlueprintDefinition.sections.length;
this.step = 1; this.step = 1;
this.addProfiles(); this.addProfiles();
@ -308,6 +234,84 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
}; };
} }
private getItem(itemId: String) {
this.dmpService.getSingle(itemId).pipe(map(data => data as DmpModel))
.pipe(takeUntil(this._destroyed))
.subscribe(async data => {
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus;
this.dmp = new DmpEditorModel();
this.dmp.grant = new GrantTabModel();
this.dmp.project = new ProjectFormModel();
this.dmp.funder = new FunderFormModel();
this.dmp.extraProperties = new ExtraPropertiesFormModel();
this.dmp.fromModel(data);
this.formGroup = this.dmp.buildForm();
this.datasets = this.formGroup.get('datasets') as FormArray;
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
if (!isNullOrUndefined(this.formGroup.get('profile').value)) {
this.dmpProfileService.getSingleBlueprint(this.formGroup.get('profile').value)
.pipe(takeUntil(this._destroyed))
.subscribe(result => {
this.selectedDmpBlueprintDefinition = result.definition;
this.checkForGrant();
this.checkForFunder();
this.checkForProject();
this.buildExtraFields();
this.formGroup.get('profile').setValue(result.id);
this.maxStep = this.selectedDmpBlueprintDefinition.sections.length;
this.step = 1;
this.addProfiles(this.dmp.profiles);
});
}
this.maxStep = this.formGroup.get('datasets') ? this.maxStep + this.formGroup.get('datasets').value.length - 1 : this.maxStep;
this.setIsUserOwner();
if (!this.isUserOwner) {
if(this.isUserMember()){
this.router.navigate(['plans', 'overview', itemId]);
return;
}
this.isFinalized = true;
this.formGroup.disable();
}
if (this.dmp.status === DmpStatus.Finalized || lockStatus) {
this.isFinalized = true;
this.formGroup.disable();
}
if (this.authService.current() != null) {
if (!lockStatus) {
this.lock = new LockModel(data.id, this.getUserFromDMP());
this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
this.lock.id = Guid.parse(result);
interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
});
}
}
this.associatedUsers = data.associatedUsers;
this.people = data.users;
this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
.subscribe(x => {
this.formChanged();
});
if(this.lockStatus){
this.dialog.open(PopupNotificationDialogComponent,{data:{
title:this.language.instant('DMP-EDITOR.LOCKED.TITLE'),
message:this.language.instant('DMP-EDITOR.LOCKED.MESSAGE')
}, maxWidth:'30em'});
}
});
});
}
extraFieldsArray(): FormArray { extraFieldsArray(): FormArray {
return this.formGroup.get('extraFields') as FormArray; return this.formGroup.get('extraFields') as FormArray;
} }
@ -437,7 +441,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(result => { .subscribe(result => {
this.selectedDmpBlueprintDefinition = result.definition; this.selectedDmpBlueprintDefinition = result.definition;
this.formGroup.get('profile').setValue(result); this.formGroup.get('profile').setValue(result.id);
this.maxStep = this.selectedDmpBlueprintDefinition.sections.length; this.maxStep = this.selectedDmpBlueprintDefinition.sections.length;
this.nextStep(); this.nextStep();
}); });
@ -511,7 +515,9 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
onSubmit(addNew?: boolean, showAddDatasetDialog?: boolean): void { onSubmit(addNew?: boolean, showAddDatasetDialog?: boolean): void {
this.scrollTop = document.getElementById('editor-form').scrollTop; this.scrollTop = document.getElementById('editor-form').scrollTop;
// return; // return;
this.dmpService.createDmp(this.formGroup.getRawValue()) const rawvalue = this.formGroup.getRawValue();
if (rawvalue.profile instanceof Object) rawvalue.profile = rawvalue.profile.id;
this.dmpService.createDmp(rawvalue)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe( .subscribe(
complete => { complete => {
@ -578,24 +584,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
if(this.isNew){ if(this.isNew){
this.router.navigate(['/plans', 'edit', dmp.id]); this.router.navigate(['/plans', 'edit', dmp.id]);
} }
let dmpEditorModel: DmpEditorModel; this.getItem(dmp.id);
dmpEditorModel = new DmpEditorModel();
dmpEditorModel.grant = new GrantTabModel();
dmpEditorModel.project = new ProjectFormModel();
dmpEditorModel.funder = new FunderFormModel();
dmpEditorModel.extraProperties = new ExtraPropertiesFormModel();
dmpEditorModel.fromModel(dmp);
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
this.associatedUsers = dmp.associatedUsers;
this.people = dmp.users;
setTimeout(() => { this.formGroup = null; });
setTimeout(() => {
this.formGroup = dmpEditorModel.buildForm();
this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
.subscribe(x => {
this.formChanged();
});});
setTimeout(() => { document.getElementById('editor-form').scrollTop = this.scrollTop; }); setTimeout(() => { document.getElementById('editor-form').scrollTop = this.scrollTop; });
this.saving = false; this.saving = false;
this.isNew = false; this.isNew = false;
@ -870,13 +859,7 @@ export class DmpEditorBlueprintComponent extends CheckDeactivateBaseComponent im
} }
getExtraFieldIndex(id: string): string { getExtraFieldIndex(id: string): string {
let foundFieldIndex: number; return (this.formGroup.get('extraFields') as FormArray).controls.findIndex((element) => element.value.id == id).toString();
(this.formGroup.get('extraFields') as FormArray).controls.forEach((element, index) => {
if(element.value.id === id) {
foundFieldIndex = index;
}
});
return foundFieldIndex.toString();
} }
private checkForGrant() { private checkForGrant() {

View File

@ -57,7 +57,7 @@
"loginProviders": { "loginProviders": {
"enabled": [1, 2, 3, 4, 5, 6, 7, 8], "enabled": [1, 2, 3, 4, 5, 6, 7, 8],
"facebookConfiguration": { "clientId": "" }, "facebookConfiguration": { "clientId": "" },
"googleConfiguration": { "clientId": "" }, "googleConfiguration": { "clientId": "524432312250-sc9qsmtmbvlv05r44onl6l93ia3k9deo.apps.googleusercontent.com" },
"linkedInConfiguration": { "linkedInConfiguration": {
"clientId": "", "clientId": "",
"oauthUrl": "https://www.linkedin.com/oauth/v2/authorization", "oauthUrl": "https://www.linkedin.com/oauth/v2/authorization",