TP-48565 | comment resolved
This commit is contained in:
@@ -8,6 +8,6 @@ export const DashboardHeaderConstants = {
|
||||
|
||||
//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}`;
|
||||
return `https://mocki.io/v1/09bc40a5-1e6b-4217-8c82-c1e35f87230f`;
|
||||
};
|
||||
|
||||
@@ -29,7 +29,6 @@ const JiraDashboard: FC = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const startJiraSearch = (param): void => {
|
||||
console.log('param', param);
|
||||
const endPoint = FETCH_JIRA_DATA(param);
|
||||
setIsLoading(true);
|
||||
ApiService.get(endPoint)
|
||||
@@ -67,8 +66,7 @@ const JiraDashboard: FC = () => {
|
||||
}
|
||||
const searchParam = searchParams.toString();
|
||||
updateURLAndFetchData(searchParam);
|
||||
//console.log('searchParam', searchParam);
|
||||
}, [searchParams.toString()]);
|
||||
}, [searchParams]);
|
||||
|
||||
const handlePageNumber = (pageNumber: number): void => {
|
||||
searchParams.set('page_number', (pageNumber - 1).toString());
|
||||
@@ -93,7 +91,7 @@ const JiraDashboard: FC = () => {
|
||||
startJiraSearch(`${finalParams}`);
|
||||
};
|
||||
|
||||
const updateURLAndFetchData = (updatedQuery: string) => {
|
||||
const updateURLAndFetchData = (updatedQuery: string): void => {
|
||||
navigate({
|
||||
search: updatedQuery,
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ const DashboardHeader: FC<DashboardHeaderProps> = ({ fetchJiraData }) => {
|
||||
const [searchValue, setSearchValue] = useState<string>('');
|
||||
const navigate = useNavigate();
|
||||
|
||||
const updateURLAndFetchData = (updatedQuery: string) => {
|
||||
const updateURLAndFetchData = (updatedQuery: string): void => {
|
||||
navigate({
|
||||
search: updatedQuery,
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import styles from '../Dashboard.module.scss';
|
||||
|
||||
const HyperlinkCellRenderer = ({ value, id }) => {
|
||||
const navigate = useNavigate();
|
||||
const handleClick = () => {
|
||||
const handleClick = (): void => {
|
||||
navigate(`/incident/${id}`);
|
||||
};
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import styles from '../SearchResultsTable.module.scss';
|
||||
import cx from 'classnames';
|
||||
import HyperlinkCellRenderer from './HyperlinkCellRenderer';
|
||||
import TicketNameCell from './ticketNameCell';
|
||||
import { DropDownPosition } from '@navi/web-ui/lib/components/Pagination/constant';
|
||||
//TO DO: will be moved to constants file
|
||||
interface SearchResultTableProps {
|
||||
currentPageData: any;
|
||||
@@ -128,7 +129,7 @@ const SearchResultsTable: FC<SearchResultTableProps> = ({
|
||||
<AgTable
|
||||
PaginationComponent={
|
||||
<Pagination
|
||||
pageNumberDropDownPosition={'POSITION_BOTTOM' as any}
|
||||
pageNumberDropDownPosition={DropDownPosition.BOTTOM}
|
||||
pageSize={currentPageSize}
|
||||
currentPage={pageNumber + 1}
|
||||
totalCount={totalElements}
|
||||
|
||||
@@ -27,7 +27,7 @@ const SmartSearch: FC<SmartSearchProps> = ({
|
||||
}
|
||||
}, [searchParams]);
|
||||
|
||||
const handleSearchInput = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const handleSearchInput = (e: React.ChangeEvent<HTMLInputElement>): void => {
|
||||
setSearchValue(e.target.value);
|
||||
};
|
||||
const clearSearch = () => {
|
||||
@@ -38,7 +38,7 @@ const SmartSearch: FC<SmartSearchProps> = ({
|
||||
//TO DO: will be moved to constants file
|
||||
const placeHolder = 'Search by Houston I.D.';
|
||||
|
||||
const onKeyPressClickHandler = (event: React.KeyboardEvent) => {
|
||||
const onKeyPressClickHandler = (event: React.KeyboardEvent): void => {
|
||||
if (event.key === 'Enter') {
|
||||
if (searchValue === '') {
|
||||
clearSearch();
|
||||
|
||||
@@ -8,7 +8,7 @@ import TaskIcon from '@src/assets/JiraIcons/TaskIcon';
|
||||
import EpicIcon from '@src/assets/JiraIcons/EpicIcon';
|
||||
import BugIcon from '@src/assets/JiraIcons/BugIcon';
|
||||
|
||||
const getTicketIcon = ticketType => {
|
||||
const getTicketIcon = (ticketType: string): JSX.Element | null => {
|
||||
switch (ticketType) {
|
||||
case 'Story':
|
||||
return <StoryIcon />;
|
||||
@@ -26,7 +26,7 @@ const getTicketIcon = ticketType => {
|
||||
};
|
||||
|
||||
const TicketNameCell = ({ tickerName, ticketLink, ticketType }) => {
|
||||
const handleClick = () => {
|
||||
const handleClick = (): void => {
|
||||
window.open(ticketLink, '_blank');
|
||||
};
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user