From a77d674099ca36f84ad984d5435165747ab08f45 Mon Sep 17 00:00:00 2001 From: Harinder Singh Date: Fri, 22 Nov 2024 20:06:10 +0530 Subject: [PATCH] INFRA-3971 | Harinder | Changes in ReviewsInfo type as the JitReviewDto was updated (extended from JitRequestDto) --- src/components/just-in-time-access/RequestsComponent.tsx | 2 +- src/components/just-in-time-access/ReviewsComponent.tsx | 2 +- src/components/just-in-time-access/structs.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/just-in-time-access/RequestsComponent.tsx b/src/components/just-in-time-access/RequestsComponent.tsx index c519aba..ecb1b83 100644 --- a/src/components/just-in-time-access/RequestsComponent.tsx +++ b/src/components/just-in-time-access/RequestsComponent.tsx @@ -84,7 +84,7 @@ export const RequestsComponent = () => { onClick={() => { reviewRequest(id, 'close'); }} - disabled={status === 'APPROVED' || status === 'REJECTED' || status === 'CLOSED'} + disabled={status !== 'PENDING'} /> ), diff --git a/src/components/just-in-time-access/ReviewsComponent.tsx b/src/components/just-in-time-access/ReviewsComponent.tsx index 96e0106..39ede1b 100644 --- a/src/components/just-in-time-access/ReviewsComponent.tsx +++ b/src/components/just-in-time-access/ReviewsComponent.tsx @@ -34,7 +34,7 @@ export const ReviewsComponent = () => { }, { key: 'ID', - value: ({ jitRequestId }: ReviewsInfo) => jitRequestId, + value: ({ id }: ReviewsInfo) => id, }, { key: 'User', diff --git a/src/components/just-in-time-access/structs.tsx b/src/components/just-in-time-access/structs.tsx index 7aa15c4..55a0e2e 100644 --- a/src/components/just-in-time-access/structs.tsx +++ b/src/components/just-in-time-access/structs.tsx @@ -34,8 +34,8 @@ export type RequestsInfo = { }; export type ReviewsInfo = { + id: number; jitApprovalId: number; - jitRequestId: number; requestedFor: string; team: string; vertical: string;