refactor: update code to use centralized Ant Design imports
- Replaced direct import of '@ant-design/icons' with centralized import from '@/shared/antd-imports'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Button, Card, Checkbox, Dropdown, Flex, Skeleton, Space, Typography } from '@/shared/antd-imports';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { DownOutlined } from '@/shared/antd-imports';
|
||||
import MembersReportsTable from './members-reports-table/members-reports-table';
|
||||
import TimeWiseFilter from '@/components/reporting/time-wise-filter';
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Flex, Typography, theme } from '@/shared/antd-imports';
|
||||
import React, { useEffect, useState, useCallback, useMemo } from 'react';
|
||||
import OverviewStatCard from './overview-stat-card';
|
||||
import { BankOutlined, FileOutlined, UsergroupAddOutlined } from '@ant-design/icons';
|
||||
import { BankOutlined, FileOutlined, UsergroupAddOutlined } from '@/shared/antd-imports';
|
||||
import { colors } from '@/styles/colors';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IRPTOverviewStatistics } from '@/types/reporting/reporting.types';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { setSelectedProjectCategories } from '@/features/reporting/projectReport
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { IProjectCategoryViewModel } from '@/types/project/projectCategory.types';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { CaretDownFilled } from '@/shared/antd-imports';
|
||||
import { Badge, Button, Card, Checkbox, Dropdown, Empty, Flex, Input, InputRef, List } from '@/shared/antd-imports';
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { IProjectHealth } from '@/types/project/projectHealth.types';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { CaretDownFilled } from '@/shared/antd-imports';
|
||||
import { Button, Card, Checkbox, Dropdown, List, Space } from '@/shared/antd-imports';
|
||||
import React, { useEffect, useState, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { setSelectedProjectManagers } from '@/features/reporting/projectReports/
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { IProjectManager } from '@/types/project/projectManager.types';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { CaretDownFilled } from '@/shared/antd-imports';
|
||||
import { Button, Card, Checkbox, Dropdown, Empty, Flex, Input, InputRef, List } from '@/shared/antd-imports';
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { IProjectStatus } from '@/types/project/projectStatus.types';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { CaretDownFilled } from '@/shared/antd-imports';
|
||||
import { Button, Card, Checkbox, Dropdown, List, Space } from '@/shared/antd-imports';
|
||||
import { debounce } from 'lodash';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { MoreOutlined } from '@ant-design/icons';
|
||||
import { MoreOutlined } from '@/shared/antd-imports';
|
||||
import { Button, Card, Checkbox, Dropdown, List, Space } from '@/shared/antd-imports';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useEffect, useState, useMemo, useCallback, memo } from 'react';
|
||||
import { Button, ConfigProvider, Flex, PaginationProps, Table, TableColumnsType } from '@/shared/antd-imports';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { ExpandAltOutlined } from '@ant-design/icons';
|
||||
import { ExpandAltOutlined } from '@/shared/antd-imports';
|
||||
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { DownOutlined } from '@/shared/antd-imports';
|
||||
import { Badge, Card, Dropdown, Flex, Input, InputRef, Menu, MenuProps, Typography } from '@/shared/antd-imports';
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Badge, Card, Dropdown, Flex, Menu, MenuProps, Typography } from '@/shared/antd-imports';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { DownOutlined } from '@/shared/antd-imports';
|
||||
import { colors } from '@/styles/colors';
|
||||
import './project-health-cell.css';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Button, Card, Checkbox, Dropdown, Flex, Space, Typography } from '@/shared/antd-imports';
|
||||
import { useMemo, useCallback, memo } from 'react';
|
||||
import CustomPageHeader from '@/pages/reporting/page-header/custom-page-header';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { DownOutlined } from '@/shared/antd-imports';
|
||||
import ProjectReportsTable from './projects-reports-table/projects-reports-table';
|
||||
import ProjectsReportsFilters from './projects-reports-filters/project-reports-filters';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GlobalOutlined, LeftCircleOutlined, RightCircleOutlined } from '@ant-design/icons';
|
||||
import { GlobalOutlined, LeftCircleOutlined, RightCircleOutlined } from '@/shared/antd-imports';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { colors } from '@/styles/colors';
|
||||
import { Button, Flex, Tooltip, Typography } from '@/shared/antd-imports';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { setSelectOrDeselectBillable } from '@/features/reporting/time-reports/time-reports-overview.slice';
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { CaretDownFilled } from '@/shared/antd-imports';
|
||||
import { Button, Checkbox, Dropdown, MenuProps } from '@/shared/antd-imports';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from '@/features/reporting/time-reports/time-reports-overview.slice';
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { CaretDownFilled } from '@/shared/antd-imports';
|
||||
import { Button, Card, Checkbox, Divider, Dropdown, Input, theme } from '@/shared/antd-imports';
|
||||
import { CheckboxChangeEvent } from 'antd/es/checkbox';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
DownOutlined,
|
||||
RightOutlined,
|
||||
FilterOutlined,
|
||||
} from '@ant-design/icons';
|
||||
} from '@/shared/antd-imports';
|
||||
import {
|
||||
Button,
|
||||
Checkbox,
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { CaretDownFilled } from '@/shared/antd-imports';
|
||||
import { Button, Checkbox, Divider, Dropdown, Input, theme } from '@/shared/antd-imports';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import type { CheckboxChangeEvent } from 'antd/es/checkbox';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ISelectableTeam } from '@/types/reporting/reporting-filters.types';
|
||||
import { reportingApiService } from '@/api/reporting/reporting.api.service';
|
||||
import logger from '@/utils/errorLogger';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import {
|
||||
fetchReportingCategories,
|
||||
fetchReportingProjects,
|
||||
fetchReportingTeams,
|
||||
setSelectOrDeselectAllTeams,
|
||||
setSelectOrDeselectTeam,
|
||||
} from '@/features/reporting/time-reports/time-reports-overview.slice';
|
||||
|
||||
const Team: React.FC = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const [checkedList, setCheckedList] = useState<string[]>([]);
|
||||
const [searchText, setSearchText] = useState('');
|
||||
const [selectAll, setSelectAll] = useState(true);
|
||||
const { t } = useTranslation('time-report');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Button, Checkbox, Dropdown, Space, Typography } from '@/shared/antd-imports';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { DownOutlined } from '@/shared/antd-imports';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import CustomPageHeader from '../../page-header/custom-page-header';
|
||||
import TimeWiseFilter from '../../../../components/reporting/time-wise-filter';
|
||||
|
||||
Reference in New Issue
Block a user