From 4d78de329c69624d3039f418943cbe25253e7eb0 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Wed, 15 Jan 2025 12:23:24 +0530 Subject: [PATCH] integrate checker (#3730) * enable sync with checker on pool creation and apply * add in review Applicaitons Button * wire in view application * fix route * show only checker --- .../src/components/grants/ApplicationCard.tsx | 12 +- .../src/components/rounds/ViewApplication.tsx | 262 ------------------ packages/builder/src/index.tsx | 5 - packages/builder/src/routes.tsx | 7 - packages/common/src/allo/backends/allo-v2.ts | 26 ++ .../src/features/round/GrantApplications.tsx | 20 ++ 6 files changed, 50 insertions(+), 282 deletions(-) delete mode 100644 packages/builder/src/components/rounds/ViewApplication.tsx diff --git a/packages/builder/src/components/grants/ApplicationCard.tsx b/packages/builder/src/components/grants/ApplicationCard.tsx index 7ffb41b608..3f0e539801 100644 --- a/packages/builder/src/components/grants/ApplicationCard.tsx +++ b/packages/builder/src/components/grants/ApplicationCard.tsx @@ -10,7 +10,6 @@ import { useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Link } from "react-router-dom"; import { loadRound } from "../../actions/rounds"; -import { roundApplicationViewPath } from "../../routes"; import { ApplicationCardType, RoundSupport } from "../../types"; import { formatDate, @@ -196,6 +195,9 @@ export default function ApplicationCard({ return null; } + const applicationViewLink = `https://beta.checker.gitcoin.co/view/application/ + ${applicationData.chainId}/${applicationData.roundID}/${applicationData.application.id}`; + return (

)} - + - -
-
-

Grant Round

-

{props.round.programName ?? ""}

-

{props.round.roundMetadata.name}

- {isDirectRound && hasProperStatus && ( - <> -

Contact Information:

- - {props.round.roundMetadata.support?.info} - - - )} - {!isDirectRound && ( - <> -

Application Period:

-

- {formatDate(props.round.applicationsStartTime * 1000)} -{" "} - {isInfinite(props.round.applicationsEndTime) || - !props.round.applicationsEndTime - ? "No End Date" - : formatDate(props.round.applicationsEndTime * 1000)} -

- - )} -

Round Dates:

-

- {formatDate(props.round.roundStartTime * 1000)} -{" "} - {isInfinite(props.round.applicationsEndTime) || - !props.round.applicationsEndTime - ? "No End Date" - : formatDate(props.round.roundEndTime * 1000)} -

-

- Need Help? Check out the{" "} - - Builder Guide. - -

-
-
- {!props.applicationMetadata === undefined && ( - - )} - {props.applicationMetadata && ( -
{ - if (allo === null) { - return; - } - dispatch( - submitApplication( - props.round!.id, - answers, - allo, - createLinkedProject, - dataLayer - ) - ); - }} - readOnly - setCreateLinkedProject={() => {}} - /> - )} -
-
- - ); -} - -export default ViewApplication; diff --git a/packages/builder/src/index.tsx b/packages/builder/src/index.tsx index 669fc512a3..b067a84dee 100644 --- a/packages/builder/src/index.tsx +++ b/packages/builder/src/index.tsx @@ -23,7 +23,6 @@ import NewProject from "./components/grants/New"; import Project from "./components/grants/Show"; import RoundApply from "./components/rounds/Apply"; import RoundShow from "./components/rounds/Show"; -import ViewApplication from "./components/rounds/ViewApplication"; import history from "./history"; import reportWebVitals from "./reportWebVitals"; import { slugs } from "./routes"; @@ -138,10 +137,6 @@ root.render( path={slugs.roundApplication} element={} /> - } - /> } /> diff --git a/packages/builder/src/routes.tsx b/packages/builder/src/routes.tsx index 680381b1d6..13da633925 100644 --- a/packages/builder/src/routes.tsx +++ b/packages/builder/src/routes.tsx @@ -6,7 +6,6 @@ export const slugs = { newGrant: `/projects/new`, round: `/chains/:chainId/rounds/:roundId`, roundApplication: `/chains/:chainId/rounds/:roundId/apply`, - roundApplicationView: `/chains/:chainId/rounds/:roundId/view/:ipfsHash`, }; export const rootPath = () => slugs.root; @@ -39,9 +38,3 @@ export const roundApplicationPathForProject = ( roundId: string, projectId: string ) => `/round/${chainId}/${roundId}/${projectId}`; - -export const roundApplicationViewPath = ( - chainId: string, - roundId: string, - ipfsHash: string -) => `/chains/${chainId}/rounds/${roundId}/view/${ipfsHash}`; diff --git a/packages/common/src/allo/backends/allo-v2.ts b/packages/common/src/allo/backends/allo-v2.ts index 17a10886af..ef4e05e3a5 100644 --- a/packages/common/src/allo/backends/allo-v2.ts +++ b/packages/common/src/allo/backends/allo-v2.ts @@ -630,6 +630,19 @@ export class AlloV2 implements Allo { blockNumber: receipt.blockNumber, }); + // sync pool with checker + await fetch("https://api.checker.gitcoin.co/api/pools", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + alloPoolId: parseInt(poolCreatedEvent.poolId, 10).toString(), + chainId: this.chainId, + skipEvaluation: false, + }), + }); + emit("indexingStatus", success(void 0)); return success({ @@ -749,6 +762,19 @@ export class AlloV2 implements Allo { blockNumber: receipt.blockNumber, }); + // sync pool with checker + await fetch("https://api.checker.gitcoin.co/api/pools", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + alloPoolId: args.roundId.toString(), + chainId: this.chainId, + skipEvaluation: false, + }), + }); + emit("indexingStatus", success(null)); return success(args.projectId); diff --git a/packages/round-manager/src/features/round/GrantApplications.tsx b/packages/round-manager/src/features/round/GrantApplications.tsx index 8974de9052..d783c84247 100644 --- a/packages/round-manager/src/features/round/GrantApplications.tsx +++ b/packages/round-manager/src/features/round/GrantApplications.tsx @@ -13,6 +13,7 @@ import { Tab } from "@headlessui/react"; import { horizontalTabStyles } from "../common/Utils"; import { MdRateReview } from "react-icons/md"; import { TabApplicationCounter } from "../common/styles"; +import { Link } from "react-router-dom"; function GrantApplications(props: { isDirectRound?: boolean; @@ -55,6 +56,25 @@ function GrantApplications(props: { isDirectRound={props.isDirectRound!} />
+
+
+
+ Checker is now in Beta +
+
+ Use our AI-powered application assistant to process + applicants with confidence +
+
+
+ + Review Applications + +
+
Manual Review