Skip to content

Commit

Permalink
Remove pathfinder pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ibolton336 committed Aug 30, 2023
1 parent 0072127 commit 01ca3db
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 14 deletions.
25 changes: 25 additions & 0 deletions client/src/app/api/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,3 +719,28 @@ export interface CategorizedTag {
category: TagCategory;
tag: Tag;
}

//TODO: update to use new api
export interface AssessmentRisk {
assessmentId: number;
applicationId: number;
risk: Risk;
}
export interface AssessmentRisk {
assessmentId: number;
applicationId: number;
risk: Risk;
}

export interface AssessmentQuestionRisk {
category: string;
question: string;
answer: string;
applications: number[];
}

export interface AssessmentConfidence {
assessmentId: number;
applicationId: number;
confidence: number;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { useQuery } from "@tanstack/react-query";
import { ConditionalRender } from "@app/components/ConditionalRender";
import { StateError } from "@app/components/StateError";
import { EFFORT_ESTIMATE_LIST, PROPOSED_ACTION_LIST } from "@app/Constants";
import { getAssessmentConfidence } from "@app/api/rest";
// import { getAssessmentConfidence } from "@app/api/rest";
import {
Application,
AssessmentConfidence,
Expand Down Expand Up @@ -136,11 +136,12 @@ export const AdoptionCandidateGraph: React.FC = () => {
} = useQuery<AssessmentConfidence[]>(
["assessmentconfidence"],
async () =>
(
await getAssessmentConfidence(
applications.length > 0 ? applications.map((f) => f.id!) : []
)
).data,
// (
// await getAssessmentConfidence(
// applications.length > 0 ? applications.map((f) => f.id!) : []
// )
// ).data,
[],
{
onError: (error) => console.log("error, ", error),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { AppTableWithControls } from "@app/components/AppTableWithControls";

import { Application, AssessmentQuestionRisk } from "@app/api/models";
import { getAssessmentIdentifiedRisks } from "@app/api/rest";
// import { getAssessmentIdentifiedRisks } from "@app/api/rest";

import { ApplicationSelectionContext } from "../../application-selection-context";
import { useLegacyPaginationState } from "@app/hooks/useLegacyPaginationState";
Expand Down Expand Up @@ -48,11 +48,12 @@ export const IdentifiedRisksTable: React.FC<
} = useQuery<AssessmentQuestionRisk[]>(
["assessmentquestionrisks"],
async () =>
(
await getAssessmentIdentifiedRisks(
allApplications.length > 0 ? allApplications.map((f) => f.id!) : []
)
).data,
// (
// await getAssessmentIdentifiedRisks(
// allApplications.length > 0 ? allApplications.map((f) => f.id!) : []
// )
// ).data,
[],
{
onError: (error) => console.log("error, ", error),
}
Expand Down
5 changes: 3 additions & 2 deletions client/src/app/queries/risks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useQuery } from "@tanstack/react-query";
import { AssessmentRisk } from "@app/api/models";
import { getAssessmentLandscape } from "@app/api/rest";

export const RisksQueryKey = "risks";

Expand All @@ -9,7 +8,9 @@ export const useFetchRisks = (applicationIDs: number[]) => {
["assessmentrisks", applicationIDs],
async () => {
if (applicationIDs.length > 0)
return (await getAssessmentLandscape(applicationIDs)).data;
// return (await getAssessmentLandscape(applicationIDs)).data;
//TODO see if we still need this
return [];
else return [];
},
{
Expand Down

0 comments on commit 01ca3db

Please sign in to comment.