TP-48565 | mocking added

This commit is contained in:
AyushRanjan
2023-11-30 18:46:34 +05:30
parent 1edd09afca
commit fd3e554747
3 changed files with 19 additions and 11 deletions

View File

@@ -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`;
};

View File

@@ -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 (
<div className={styles['houston-id-wrapper']}>
<a
href={`your-link-prefix/${value}`}
target="_blank"
rel="noopener noreferrer"
<div
onClick={handleClick}
className={styles['hyperlink']}
style={{ cursor: 'pointer' }}
>
{value}
</a>
</div>
<div className={styles['go-to-link-icon']}>
<GoToLinkIcon color="#0276FE" />
</div>

View File

@@ -70,10 +70,15 @@ const SearchResultsTable: FC<SearchResultTableProps> = ({
//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 => (
<HyperlinkCellRenderer
value={params.data.incidentName}
id={params.data.id}
/>
),
},
{
field: 'incidentName1',