TP-48565 | added proper types
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
} from '@src/slices/jiraDashboardSlice';
|
||||
import { ApiService } from '@src/services/api';
|
||||
import { JiraDashboardData, JiraDashboardState } from '@src/types';
|
||||
import { FetchJiraDataProps } from './types';
|
||||
import { FETCH_JIRA_DATA } from './constants';
|
||||
import SearchResultsTable from './partials/SearchResultsTable';
|
||||
import DashboardHeader from './partials/DashboardHeader';
|
||||
@@ -83,7 +84,7 @@ const JiraDashboard: FC = () => {
|
||||
updateURLAndFetchData(updatedQuery);
|
||||
};
|
||||
|
||||
const fetchJiraData = (props: any): void => {
|
||||
const fetchJiraData = (props: FetchJiraDataProps): void => {
|
||||
const { filterQuery = '', isDrawer = false } = props;
|
||||
const finalParams = filterQuery ? `${filterQuery}` : '';
|
||||
dispatch(setCurrentPageNumber(0));
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { FC, useState, useRef, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { FC } from 'react';
|
||||
import { AgTable, Pagination } from '@navi/web-ui/lib/components';
|
||||
import { DropDownPosition } from '@navi/web-ui/lib/components/Pagination/constant';
|
||||
import { returnFormattedDate } from '@src/services/globalUtils';
|
||||
import { JiraDashboardData } from '@src/types';
|
||||
import cx from 'classnames';
|
||||
import { FetchJiraDataProps } from '../types';
|
||||
import { FetchJiraDataProps, JiraTableRow } from '../types';
|
||||
import HyperlinkCellRenderer from './HyperlinkCellRenderer';
|
||||
import TeamAssignedCellRenderer from './TeamAssignedCellRenderer';
|
||||
import TicketNameCell from './ticketNameCell';
|
||||
@@ -46,7 +45,7 @@ const SearchResultsTable: FC<SearchResultTableProps> = ({
|
||||
enableColResize: true,
|
||||
};
|
||||
|
||||
const rowData = currentPageData?.map((item: any, ind: number) => {
|
||||
const rowData = currentPageData?.map((item: JiraTableRow, ind: number) => {
|
||||
let index = 1;
|
||||
|
||||
if (pageNumber === 0) {
|
||||
|
||||
@@ -2,3 +2,15 @@ export type FetchJiraDataProps = {
|
||||
filterQuery?: string;
|
||||
isDrawer?: boolean;
|
||||
};
|
||||
|
||||
export type JiraTableRow = {
|
||||
incidentID: number;
|
||||
incidentName: string;
|
||||
jiraKey: string;
|
||||
jiraLink: string;
|
||||
jiraType: string;
|
||||
jiraSummary: string;
|
||||
jiraStatus: string;
|
||||
teamsInvolved: string[];
|
||||
jiraCreateAt: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user