From fd3e5547472541fa2255140c9d5d6d711747f731 Mon Sep 17 00:00:00 2001 From: AyushRanjan Date: Thu, 30 Nov 2023 18:46:34 +0530 Subject: [PATCH] TP-48565 | mocking added --- src/Pages/JiraDashboard/constants.ts | 2 +- .../partials/HyperlinkCellRenderer.tsx | 19 +++++++++++-------- .../partials/SearchResultsTable.tsx | 9 +++++++-- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/Pages/JiraDashboard/constants.ts b/src/Pages/JiraDashboard/constants.ts index 8eabc79..29f380e 100644 --- a/src/Pages/JiraDashboard/constants.ts +++ b/src/Pages/JiraDashboard/constants.ts @@ -5,5 +5,5 @@ export const DashboardHeaderConstants = { //TO DO: Need to change the API URL export const FETCH_JIRA_DATA = (payload: string): string => { - return `${window?.config?.BASE_API_URL}/incidents?${payload}`; + return `https://mocki.io/v1/8d6f5f75-cef2-4881-970d-f720570da7f7`; }; diff --git a/src/Pages/JiraDashboard/partials/HyperlinkCellRenderer.tsx b/src/Pages/JiraDashboard/partials/HyperlinkCellRenderer.tsx index 56602e8..0ce60c2 100644 --- a/src/Pages/JiraDashboard/partials/HyperlinkCellRenderer.tsx +++ b/src/Pages/JiraDashboard/partials/HyperlinkCellRenderer.tsx @@ -1,20 +1,23 @@ import React from 'react'; +import { useNavigate } from 'react-router-dom'; import GoToLinkIcon from '@src/assets/GoToLinkIcon'; import styles from '../Dashboard.module.scss'; -//TO DO: will change once backend is ready -const HyperlinkCellRenderer = props => { - const { value } = props; +const HyperlinkCellRenderer = ({ value, id }) => { + const navigate = useNavigate(); + const handleClick = () => { + navigate(`/incident/${id}`); + }; + return (
- {value} - +
diff --git a/src/Pages/JiraDashboard/partials/SearchResultsTable.tsx b/src/Pages/JiraDashboard/partials/SearchResultsTable.tsx index 6981030..57e6027 100644 --- a/src/Pages/JiraDashboard/partials/SearchResultsTable.tsx +++ b/src/Pages/JiraDashboard/partials/SearchResultsTable.tsx @@ -70,10 +70,15 @@ const SearchResultsTable: FC = ({ //TO DO: column data will change once backend is ready const columnData = [ { - field: 'incidentName1', + field: 'incidentName', headerName: 'Linked Houston I.D.', suppressMovable: true, - cellRenderer: HyperlinkCellRenderer, + cellRenderer: params => ( + + ), }, { field: 'incidentName1',