TP-48565 | link integerated

This commit is contained in:
AyushRanjan
2023-12-19 14:17:10 +05:30
parent eee8d06034
commit da5c537855
6 changed files with 51 additions and 17 deletions

View File

@@ -38,6 +38,7 @@
.go-to-link-icon {
display: inline-block;
opacity: 1;
padding-top: 8px;
}
}
}

View File

@@ -6,8 +6,6 @@ export const DashboardHeaderConstants = {
title: 'JIRA tickets',
};
//TO DO: Need to change the API URL
export const FETCH_JIRA_DATA = (payload: string): string => {
// return `${URL_PREFIX}/get-jira-statuses?${payload}`;
return `https://mocki.io/v1/09bc40a5-1e6b-4217-8c82-c1e35f87230f`;
return `${URL_PREFIX}/get-jira-statuses?${payload}`;
};

View File

@@ -35,7 +35,7 @@ const JiraDashboard: FC = () => {
.then(response => {
setIsLoading(false);
dispatch(setJiraDashboardData(response?.data?.data));
setPageDetails(response?.data?.pages);
setPageDetails(response?.data?.page);
})
.catch(error => {
const toastMessage = `${

View File

@@ -54,14 +54,15 @@ const SearchResultsTable: FC<SearchResultTableProps> = ({
}
return {
sNo: ind === 0 ? index : index + ind,
id: item?.id,
id: item?.incidentID,
incidentName: item?.incidentName,
ticketName: item?.ticketName,
ticketType: item?.ticketType,
JiraStatus: 'To Do',
JiraDescription:
'Jira Integration on Houston Dashboard. Jira Integration on Houston Dashboard',
JiraAssignedTo: 'Houston',
ticketName: item?.jiraKey,
ticketType: item?.jiraType,
JiraStatus: item?.jiraStatus,
JiraDescription: item?.jiraSummary,
JiraAssignedTo: item?.teamsInvolved,
JiraCreatedOn: returnFormattedDate(item?.jiraCreateAt),
JiraLink: item?.jiraLink,
};
});
@@ -85,7 +86,7 @@ const SearchResultsTable: FC<SearchResultTableProps> = ({
cellRenderer: params => (
<TicketNameCell
tickerName={params.data.ticketName}
ticketLink={`https://navihq.atlassian.net/browse/TP-48565`}
ticketLink={params.data.JiraLink}
ticketType={params.data.ticketType}
/>
),
@@ -107,7 +108,7 @@ const SearchResultsTable: FC<SearchResultTableProps> = ({
suppressMovable: true,
},
{
field: 'incidentName1',
field: 'JiraCreatedOn',
headerName: 'JIRA created on',
suppressMovable: true,
},

View File

@@ -1,18 +1,17 @@
import React from 'react';
import { useNavigate } from 'react-router-dom';
import GoToLinkIcon from '@src/assets/GoToLinkIcon';
import styles from '../Dashboard.module.scss';
import StoryIcon from '@src/assets/JiraIcons/StoryIcon';
import SubTaskIcon from '@src/assets/JiraIcons/SubTaskIcon';
import TaskIcon from '@src/assets/JiraIcons/TaskIcon';
import EpicIcon from '@src/assets/JiraIcons/EpicIcon';
import BugIcon from '@src/assets/JiraIcons/BugIcon';
import TechTaskIcon from '@src/assets/JiraIcons/TechTaskIcon';
import styles from '../Dashboard.module.scss';
const getTicketIcon = (ticketType: string): JSX.Element | null => {
switch (ticketType) {
case 'Story':
return <StoryIcon />;
case 'SubTask':
case 'Sub-task':
return <SubTaskIcon />;
case 'Task':
return <TaskIcon />;
@@ -20,6 +19,8 @@ const getTicketIcon = (ticketType: string): JSX.Element | null => {
return <EpicIcon />;
case 'Bug':
return <BugIcon />;
case 'Tech Task':
return <TechTaskIcon />;
default:
return null;
}

View File

@@ -0,0 +1,33 @@
import { FC } from 'react';
import { IconProps } from '../types';
const TechTaskIcon: FC<IconProps> = ({
width = '16',
height = '16',
...restProps
}) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
>
<path
d="M13.7143 0H2.28571C1.02335 0 0 1.02335 0 2.28571V13.7143C0 14.9767 1.02335 16 2.28571 16H13.7143C14.9767 16 16 14.9767 16 13.7143V2.28571C16 1.02335 14.9767 0 13.7143 0Z"
fill="#9DA8B5"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M11.4284 8.0001C11.4284 9.89382 9.89357 11.4287 7.99986 11.4287C6.10615 11.4287 4.57129 9.89382 4.57129 8.0001C4.57129 6.10639 6.10615 4.57153 7.99986 4.57153C9.89357 4.57153 11.4284 6.10639 11.4284 8.0001Z"
stroke="white"
strokeWidth="1.5"
/>
</svg>
);
};
export default TechTaskIcon;