This repository was archived by the owner on Feb 10, 2025. It is now read-only.
File tree 3 files changed +18
-6
lines changed
pages/SubmitFinalEvaluationPage
3 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { Address } from "viem" ;
2
2
3
- import { ApplicationStatus , PoolType } from "@/components/Badges" ;
3
+ import { PoolType } from "@/components/Badges" ;
4
4
import { useCheckerContext } from "@/features/checker/store/hooks/useCheckerContext" ;
5
5
6
- import { ReviewBody } from "~checker/pages/SubmitFinalEvaluationPage" ;
6
+ import { ReviewBody , ApplicationStatus } from "~checker/pages/SubmitFinalEvaluationPage" ;
7
7
import { generatePoolUUID } from "~checker/utils/generatePoolUUID" ;
8
8
import { categorizeProjectReviews } from "~checker/utils/mapApplicationsForOverviewPage" ;
9
9
@@ -26,7 +26,7 @@ export const useGetApplicationsFinalEvaluationPage = () => {
26
26
applicationsToUpdate : [ ] ,
27
27
currentApplications : Object . values ( poolData . applications ) . map ( ( app ) => ( {
28
28
index : Number ( app . id ) ,
29
- status : app . status as ApplicationStatus ,
29
+ status : app . status === "APPROVED" ? ApplicationStatus . APPROVED : ApplicationStatus . REJECTED ,
30
30
} ) ) ,
31
31
strategy : poolData . applications [ 0 ] ?. round . strategyName === PoolType . QuadraticFunding ? 0 : 1 ,
32
32
} ;
Original file line number Diff line number Diff line change @@ -60,7 +60,13 @@ export const SubmitFinalEvaluationPage = ({
60
60
) ;
61
61
62
62
const handleRecordEvaluationsOnchain = ( ) => {
63
- setReviewBody ( reviewBody ?? null ) ;
63
+ setReviewBody ( {
64
+ ...reviewBody ,
65
+ applicationsToUpdate : Object . entries ( projectEvaluations ) . map ( ( [ projectId , isApproved ] ) => ( {
66
+ index : Number ( projectId ) ,
67
+ status : isApproved ? "APPROVED" : "REJECTED" ,
68
+ } ) ) ,
69
+ } as ReviewBody ) ;
64
70
setIsModalOpen ( true ) ;
65
71
} ;
66
72
Original file line number Diff line number Diff line change 1
1
import { Address } from "viem" ;
2
2
3
- import { ApplicationStatus } from "@/components/Badges" ;
4
-
3
+ export enum ApplicationStatus {
4
+ PENDING = "PENDING" ,
5
+ APPROVED = "APPROVED" ,
6
+ REJECTED = "REJECTED" ,
7
+ APPEAL = "APPEAL" ,
8
+ IN_REVIEW = "IN_REVIEW" ,
9
+ CANCELLED = "CANCELLED" ,
10
+ }
5
11
export enum RoundCategory {
6
12
QuadraticFunding ,
7
13
Direct ,
You can’t perform that action at this time.
0 commit comments