refactor: update Ant Design imports to centralized path
- Replaced direct imports from 'antd' with centralized imports from '@/shared/antd-imports' to align with new import rules and improve maintainability.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ConfigProvider, Table, TableColumnsType } from 'antd';
|
||||
import { ConfigProvider, Table, TableColumnsType } from '@/shared/antd-imports';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Avatar, Flex, Typography } from 'antd';
|
||||
import { Avatar, Flex, Typography } from '@/shared/antd-imports';
|
||||
import CustomAvatar from '@components/CustomAvatar';
|
||||
|
||||
type ProjectMangerCellProps = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Flex, Tooltip, Typography } from 'antd';
|
||||
import { Flex, Tooltip, Typography } from '@/shared/antd-imports';
|
||||
import { colors } from '@/styles/colors';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, Card, Checkbox, Dropdown, Flex, Skeleton, Space, Typography } from 'antd';
|
||||
import { Button, Card, Checkbox, Dropdown, Flex, Skeleton, Space, Typography } from '@/shared/antd-imports';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import MembersReportsTable from './members-reports-table/members-reports-table';
|
||||
import TimeWiseFilter from '@/components/reporting/time-wise-filter';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useCallback, useMemo } from 'react';
|
||||
import { Button, Card, Checkbox, Flex, Typography } from 'antd';
|
||||
import { Button, Card, Checkbox, Flex, Typography } from '@/shared/antd-imports';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useDocumentTitle } from '@/hooks/useDoumentTItle';
|
||||
import { useMixpanelTracking } from '@/hooks/useMixpanelTracking';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Card, Flex, Typography, theme } from 'antd';
|
||||
import { Card, Flex, Typography, theme } from '@/shared/antd-imports';
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
interface InsightCardProps {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Flex, Typography, theme } from 'antd';
|
||||
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';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { memo, useEffect, useState, useCallback, useMemo } from 'react';
|
||||
import { ConfigProvider, Table, TableColumnsType } from 'antd';
|
||||
import { ConfigProvider, Table, TableColumnsType } from '@/shared/antd-imports';
|
||||
import { useAppDispatch } from '../../../../hooks/useAppDispatch';
|
||||
import CustomTableTitle from '../../../../components/CustomTableTitle';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { IProjectCategoryViewModel } from '@/types/project/projectCategory.types';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { Badge, Button, Card, Checkbox, Dropdown, Empty, Flex, Input, InputRef, List } from 'antd';
|
||||
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';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { IProjectHealth } from '@/types/project/projectHealth.types';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { Button, Card, Checkbox, Dropdown, List, Space } from 'antd';
|
||||
import { Button, Card, Checkbox, Dropdown, List, Space } from '@/shared/antd-imports';
|
||||
import React, { useEffect, useState, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import debounce from 'lodash/debounce'; // Install lodash if not already present
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { IProjectManager } from '@/types/project/projectManager.types';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { Button, Card, Checkbox, Dropdown, Empty, Flex, Input, InputRef, List } from 'antd';
|
||||
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';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Flex } from 'antd';
|
||||
import { Flex } from '@/shared/antd-imports';
|
||||
import { useMemo, useCallback, memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ProjectStatusFilterDropdown from './project-status-filter-dropdown';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { IProjectStatus } from '@/types/project/projectStatus.types';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { Button, Card, Checkbox, Dropdown, List, Space } from 'antd';
|
||||
import { Button, Card, Checkbox, Dropdown, List, Space } from '@/shared/antd-imports';
|
||||
import { debounce } from 'lodash';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { MoreOutlined } from '@ant-design/icons';
|
||||
import { Button, Card, Checkbox, Dropdown, List, Space } from 'antd';
|
||||
import { Button, Card, Checkbox, Dropdown, List, Space } from '@/shared/antd-imports';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { toggleColumnHidden } from '@/features/reporting/projectReports/project-reports-table-column-slice/project-reports-table-column-slice';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState, useMemo, useCallback, memo } from 'react';
|
||||
import { Button, ConfigProvider, Flex, PaginationProps, Table, TableColumnsType } from 'antd';
|
||||
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';
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { Bar } from 'react-chartjs-2';
|
||||
import { Chart, BarElement, CategoryScale, LinearScale } from 'chart.js';
|
||||
import { ChartOptions } from 'chart.js';
|
||||
import { Typography } from 'antd';
|
||||
import { Typography } from '@/shared/antd-imports';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
Chart.register(BarElement, CategoryScale, LinearScale);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Tooltip, Typography } from 'antd';
|
||||
import { Tooltip, Typography } from '@/shared/antd-imports';
|
||||
import React from 'react';
|
||||
|
||||
const LastActivityCell = ({ activity }: { activity: string }) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { Badge, Card, Dropdown, Flex, Input, InputRef, Menu, MenuProps, Typography } from 'antd';
|
||||
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';
|
||||
import { colors } from '@/styles/colors';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Badge, Flex, Space, Tooltip, Typography } from 'antd';
|
||||
import { Badge, Flex, Space, Tooltip, Typography } from '@/shared/antd-imports';
|
||||
import React from 'react';
|
||||
|
||||
type ProjectCellProps = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Typography } from 'antd';
|
||||
import { Typography } from '@/shared/antd-imports';
|
||||
import React from 'react';
|
||||
|
||||
const ProjectClientCell = ({ client }: { client: string }) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DatePicker, Flex, Typography } from 'antd';
|
||||
import { DatePicker, Flex, Typography } from '@/shared/antd-imports';
|
||||
import { useEffect } from 'react';
|
||||
import { colors } from '@/styles/colors';
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Typography } from 'antd';
|
||||
import { Typography } from '@/shared/antd-imports';
|
||||
import React from 'react';
|
||||
import { colors } from '../../../../../../styles/colors';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Badge, Card, Dropdown, Flex, Menu, MenuProps, Typography } from 'antd';
|
||||
import { Badge, Card, Dropdown, Flex, Menu, MenuProps, Typography } from '@/shared/antd-imports';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { colors } from '@/styles/colors';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Avatar, Flex, Typography } from 'antd';
|
||||
import { Avatar, Flex, Typography } from '@/shared/antd-imports';
|
||||
import CustomAvatar from '@components/CustomAvatar';
|
||||
import { ITeamMemberViewModel } from '@/types/teamMembers/teamMembersGetResponse.types';
|
||||
import SingleAvatar from '@/components/common/single-avatar/single-avatar';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ConfigProvider, Select, Typography } from 'antd';
|
||||
import { ConfigProvider, Select, Typography } from '@/shared/antd-imports';
|
||||
import { colors } from '@/styles/colors';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Tag } from 'antd';
|
||||
import { Tag } from '@/shared/antd-imports';
|
||||
import React from 'react';
|
||||
import { colors } from '../../../../../../styles/colors';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Typography } from 'antd';
|
||||
import { Typography } from '@/shared/antd-imports';
|
||||
import React from 'react';
|
||||
|
||||
type ProjectUpdateCellProps = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Flex, Tooltip, Typography } from 'antd';
|
||||
import { Flex, Tooltip, Typography } from '@/shared/antd-imports';
|
||||
import React from 'react';
|
||||
import { colors } from '../../../../../../styles/colors';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, Card, Checkbox, Dropdown, Flex, Space, Typography } from 'antd';
|
||||
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';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GlobalOutlined, LeftCircleOutlined, RightCircleOutlined } from '@ant-design/icons';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { colors } from '@/styles/colors';
|
||||
import { Button, Flex, Tooltip, Typography } from 'antd';
|
||||
import { Button, Flex, Tooltip, Typography } from '@/shared/antd-imports';
|
||||
import { themeWiseColor } from '@utils/themeWiseColor';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ConfigProvider, Flex, Menu, MenuProps } from 'antd';
|
||||
import { ConfigProvider, Flex, Menu, MenuProps } from '@/shared/antd-imports';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { colors } from '@/styles/colors';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -16,7 +16,7 @@ import { useAppSelector } from '../../../../hooks/useAppSelector';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { reportingTimesheetApiService } from '@/api/reporting/reporting.timesheet.api.service';
|
||||
import { IRPTTimeProject } from '@/types/reporting/reporting.types';
|
||||
import { Empty, Spin } from 'antd';
|
||||
import { Empty, Spin } from '@/shared/antd-imports';
|
||||
import logger from '@/utils/errorLogger';
|
||||
|
||||
// Lazy load the Bar chart component
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { MemberLoggedTimeType } from '@/types/timeSheet/project.types';
|
||||
import { Empty, Progress, Spin } from 'antd';
|
||||
import { Empty, Progress, Spin } from '@/shared/antd-imports';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { reportingTimesheetApiService } from '@/api/reporting/reporting.timesheet.api.service';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Card, Flex, Segmented } from 'antd';
|
||||
import { Card, Flex, Segmented } from '@/shared/antd-imports';
|
||||
import TimeReportPageHeader from '@/pages/reporting/timeReports/page-header/time-report-page-header';
|
||||
import EstimatedVsActualTimeSheet, {
|
||||
EstimatedVsActualTimeSheetRef,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Card, Flex } from 'antd';
|
||||
import { Card, Flex } from '@/shared/antd-imports';
|
||||
import TimeReportPageHeader from '@/pages/reporting/timeReports/page-header/time-report-page-header';
|
||||
import MembersTimeSheet, {
|
||||
MembersTimeSheetRef,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import TimeReportPageHeader from '@/pages/reporting/timeReports/page-header/time-report-page-header';
|
||||
import { Flex } from 'antd';
|
||||
import { Flex } from '@/shared/antd-imports';
|
||||
import TimeSheetTable from '@/pages/reporting/time-reports/time-sheet-table/time-sheet-table';
|
||||
import TimeReportingRightHeader from './timeReportingRightHeader/TimeReportingRightHeader';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { setSelectOrDeselectBillable } from '@/features/reporting/time-reports/t
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { Button, Checkbox, Dropdown, MenuProps } from 'antd';
|
||||
import { Button, Checkbox, Dropdown, MenuProps } from '@/shared/antd-imports';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { Button, Card, Checkbox, Divider, Dropdown, Input, theme } from 'antd';
|
||||
import { Button, Card, Checkbox, Divider, Dropdown, Input, theme } from '@/shared/antd-imports';
|
||||
import { CheckboxChangeEvent } from 'antd/es/checkbox';
|
||||
import React, { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
Space,
|
||||
Tooltip,
|
||||
Empty,
|
||||
} from 'antd';
|
||||
} from '@/shared/antd-imports';
|
||||
import { CheckboxChangeEvent } from 'antd/es/checkbox';
|
||||
import React, { useState, useMemo, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { CaretDownFilled } from '@ant-design/icons';
|
||||
import { Button, Checkbox, Divider, Dropdown, Input, theme } from 'antd';
|
||||
import { Button, Checkbox, Divider, Dropdown, Input, theme } from '@/shared/antd-imports';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import type { CheckboxChangeEvent } from 'antd/es/checkbox';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Card, Flex } from 'antd';
|
||||
import { Card, Flex } from '@/shared/antd-imports';
|
||||
import TimeReportPageHeader from '@/pages/reporting/timeReports/page-header/time-report-page-header';
|
||||
import ProjectTimeSheetChart, {
|
||||
ProjectTimeSheetChartRef,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Button, Checkbox, Dropdown, Space, Typography } from 'antd';
|
||||
import { Button, Checkbox, Dropdown, Space, Typography } from '@/shared/antd-imports';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import CustomPageHeader from '../../page-header/custom-page-header';
|
||||
|
||||
Reference in New Issue
Block a user