Skip to content

Commit

Permalink
Fixed issues with label
Browse files Browse the repository at this point in the history
  • Loading branch information
sahalali committed Aug 5, 2024
1 parent bf02573 commit 0957633
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/helper/reconciliation-service.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ export class ReconciliationServiceHelper {
}

for (const currentId of uniqueIds) {
const currentBinding = bindings.filter((binding: any) => binding["entity"].value === currentId);
const currentBindings = bindings.filter((binding: any) => binding["entity"].value === currentId);

const nameValues: MultilingualValues[] = [];
const descriptionValues: MultilingualValues[] = [];

const resultCandidate = new ResultCandidates();
const uri = currentBinding.find((binding: any) => binding["entity"].value === currentId)["entity"].value;
const currentBinding = currentBindings.find((binding: any) => binding["entity"].value === currentId);
const uri = currentBinding["entity"].value;
resultCandidate.id = uri?.split("http://kg.artsdata.ca/resource/").pop();

//NAME
Expand Down Expand Up @@ -64,14 +65,11 @@ export class ReconciliationServiceHelper {
resultCandidate.match = currentBinding["name"]?.value.toLowerCase() === query.toLowerCase();
}

const types: { id: string; name: string; }[] = currentBinding.map((binding: any) => ({
resultCandidate.type = currentBindings.map((binding: any) => ({
id: binding["type_additional"]?.value,
name: binding["type_label"]?.value
}));

resultCandidate.type = types;
candidates.push(resultCandidate);

}
}
return candidates;
Expand Down

0 comments on commit 0957633

Please sign in to comment.