Skip to content

Commit

Permalink
Issue feat:call fetch entity api when we add new unmatched entities
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshataKatwal16 committed Nov 10, 2024
1 parent 86a2a08 commit 4a7ba58
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/pages/observation/[observationId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,22 @@ setEntityData(result)
const observationId = Id;
if (entity === ObservationEntityType.CENTER && unmatchedCohortIds.length !== 0) {
await addEntities({ data, observationId });
const urlPath = window.location.pathname;

const solutionId = urlPath.split('/observation/')[1];

const response = await fetchEntities({ solutionId });
setFetchEntityResponse(response?.result?.entities)
} else if (unmatchedUserIds.length !== 0) {
await addEntities({ data, observationId });
const urlPath = window.location.pathname;

const solutionId = urlPath.split('/observation/')[1];

const response = await fetchEntities({ solutionId });
setFetchEntityResponse(response?.result?.entities)
}

}
};

Expand Down

0 comments on commit 4a7ba58

Please sign in to comment.