diff --git a/web/components/api-token/delete-token-modal.tsx b/web/components/api-token/delete-token-modal.tsx index 2966bf4ae..08f2000ef 100644 --- a/web/components/api-token/delete-token-modal.tsx +++ b/web/components/api-token/delete-token-modal.tsx @@ -2,13 +2,14 @@ import { useState, Fragment, FC } from "react"; import { useRouter } from "next/router"; import { mutate } from "swr"; import { Dialog, Transition } from "@headlessui/react"; -// hooks -import { useEventTracker } from "hooks/store"; import { IApiToken } from "@plane/types"; // services import { Button, TOAST_TYPE, setToast } from "@plane/ui"; +import { API_TOKEN_DELETED } from "@/constants/event-tracker"; import { API_TOKENS_LIST } from "@/constants/fetch-keys"; import { APITokenService } from "@/services/api_token.service"; +// hooks +import { useEventTracker } from "hooks/store"; // ui // types // fetch-keys diff --git a/web/components/api-token/modal/create-token-modal.tsx b/web/components/api-token/modal/create-token-modal.tsx index 40992db23..400872cb0 100644 --- a/web/components/api-token/modal/create-token-modal.tsx +++ b/web/components/api-token/modal/create-token-modal.tsx @@ -2,18 +2,18 @@ import React, { useState } from "react"; import { useRouter } from "next/router"; import { mutate } from "swr"; import { Dialog, Transition } from "@headlessui/react"; -// hooks -import { useEventTracker } from "hooks/store"; import { IApiToken } from "@plane/types"; -// services -import { TOAST_TYPE, setToast } from "@plane/ui"; +import { TOAST_TYPE, setToast } from "@plane/ui"; import { CreateApiTokenForm, GeneratedTokenDetails } from "@/components/api-token"; // constants -import { API_TOKEN_CREATED } from "constants/event-tracker"; +import { API_TOKEN_CREATED } from "@/constants/event-tracker"; import { API_TOKENS_LIST } from "@/constants/fetch-keys"; import { renderFormattedDate } from "@/helpers/date-time.helper"; import { csvDownload } from "@/helpers/download.helper"; +// hooks +import { useEventTracker } from "@/hooks/store"; +// services import { APITokenService } from "@/services/api_token.service"; // ui // components diff --git a/web/components/automation/auto-archive-automation.tsx b/web/components/automation/auto-archive-automation.tsx index 53df8fca6..19f92c182 100644 --- a/web/components/automation/auto-archive-automation.tsx +++ b/web/components/automation/auto-archive-automation.tsx @@ -8,7 +8,7 @@ import { CustomSelect, Loader, ToggleSwitch } from "@plane/ui"; import { SelectMonthModal } from "@/components/automation"; // icon // constants -import { AUTO_ARCHIVE_TOGGLED, AUTO_ARCHIVE_UPDATED } from "constants/event-tracker"; +import { AUTO_ARCHIVE_TOGGLED, AUTO_ARCHIVE_UPDATED } from "@/constants/event-tracker"; import { EUserProjectRoles, PROJECT_AUTOMATION_MONTHS } from "@/constants/project"; import { useEventTracker, useProject, useUser } from "@/hooks/store"; // types diff --git a/web/components/automation/auto-close-automation.tsx b/web/components/automation/auto-close-automation.tsx index cc84374c5..387c9a885 100644 --- a/web/components/automation/auto-close-automation.tsx +++ b/web/components/automation/auto-close-automation.tsx @@ -6,7 +6,7 @@ import { IProject } from "@plane/types"; import { CustomSelect, CustomSearchSelect, ToggleSwitch, StateGroupIcon, DoubleCircleIcon, Loader } from "@plane/ui"; import { SelectMonthModal } from "@/components/automation"; // constants -import { AUTO_CLOSE_Toggled, AUTO_CLOSE_UPDATED } from "constants/event-tracker"; +import { AUTO_CLOSE_Toggled, AUTO_CLOSE_UPDATED } from "@/constants/event-tracker"; import { EUserProjectRoles, PROJECT_AUTOMATION_MONTHS } from "@/constants/project"; import { useEventTracker, useProject, useProjectState, useUser } from "@/hooks/store"; // component diff --git a/web/components/command-palette/actions/project-actions.tsx b/web/components/command-palette/actions/project-actions.tsx index df4d0d278..cc57f23d8 100644 --- a/web/components/command-palette/actions/project-actions.tsx +++ b/web/components/command-palette/actions/project-actions.tsx @@ -1,9 +1,9 @@ import { Command } from "cmdk"; import { ContrastIcon, FileText } from "lucide-react"; -// constants -import { E_COMMAND_PALETTE } from "constants/event-tracker"; -// hooks import { DiceIcon, PhotoFilterIcon } from "@plane/ui"; +// constants +import { E_COMMAND_PALETTE } from "@/constants/event-tracker"; +// hooks import { useApplication, useEventTracker } from "@/hooks/store"; // ui diff --git a/web/components/command-palette/command-modal.tsx b/web/components/command-palette/command-modal.tsx index 8b0a1f80c..8652dae06 100644 --- a/web/components/command-palette/command-modal.tsx +++ b/web/components/command-palette/command-modal.tsx @@ -21,7 +21,9 @@ import { CommandPaletteSearchResults, } from "@/components/command-palette"; import { EmptyState } from "@/components/empty-state"; +// constants import { EmptyStateType } from "@/constants/empty-state"; +import { E_COMMAND_PALETTE } from "@/constants/event-tracker"; import { ISSUE_DETAILS } from "@/constants/fetch-keys"; import { useApplication, useEventTracker, useProject } from "@/hooks/store"; import useDebounce from "@/hooks/use-debounce"; @@ -33,8 +35,6 @@ import { WorkspaceService } from "@/services/workspace.service"; // components // types // fetch-keys -// constants -import { E_COMMAND_PALETTE } from "constants/event-tracker"; const workspaceService = new WorkspaceService(); const issueService = new IssueService(); diff --git a/web/components/command-palette/command-palette.tsx b/web/components/command-palette/command-palette.tsx index d28455699..cb26480a9 100644 --- a/web/components/command-palette/command-palette.tsx +++ b/web/components/command-palette/command-palette.tsx @@ -18,7 +18,7 @@ import { CreateUpdateProjectViewModal } from "@/components/views"; // helpers // services // fetch keys -import { E_SHORTCUT_KEY } from "constants/event-tracker"; +import { E_SHORTCUT_KEY } from "@/constants/event-tracker"; import { ISSUE_DETAILS } from "@/constants/fetch-keys"; import { EIssuesStoreType } from "@/constants/issue"; import { EUserProjectRoles } from "@/constants/project"; diff --git a/web/components/core/activity.tsx b/web/components/core/activity.tsx index b57628411..f6a1c090c 100644 --- a/web/components/core/activity.tsx +++ b/web/components/core/activity.tsx @@ -19,10 +19,10 @@ import { UsersIcon, Inbox, } from "lucide-react"; -// constants -import { ISSUE_OPENED, elementFromPath } from "constants/event-tracker"; import { IIssueActivity } from "@plane/types"; import { Tooltip, BlockedIcon, BlockerIcon, RelatedIcon, LayersIcon, DiceIcon } from "@plane/ui"; +// constants +import { ISSUE_OPENED, elementFromPath } from "@/constants/event-tracker"; // helpers import { renderFormattedDate } from "@/helpers/date-time.helper"; import { capitalizeFirstLetter } from "@/helpers/string.helper"; diff --git a/web/components/cycles/active-cycle/upcoming-cycles-list-item.tsx b/web/components/cycles/active-cycle/upcoming-cycles-list-item.tsx index 601bf809e..ba0a818ed 100644 --- a/web/components/cycles/active-cycle/upcoming-cycles-list-item.tsx +++ b/web/components/cycles/active-cycle/upcoming-cycles-list-item.tsx @@ -8,7 +8,7 @@ import { Avatar, AvatarGroup, setPromiseToast } from "@plane/ui"; import { FavoriteStar } from "@/components/core"; import { CycleQuickActions } from "@/components/cycles"; // constants -import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_LIST_LAYOUT } from "constants/event-tracker"; +import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_LIST_LAYOUT } from "@/constants/event-tracker"; // helpers import { renderFormattedDate } from "@/helpers/date-time.helper"; // hooks diff --git a/web/components/cycles/board/cycles-board-card.tsx b/web/components/cycles/board/cycles-board-card.tsx index cd09f1745..eb0093bec 100644 --- a/web/components/cycles/board/cycles-board-card.tsx +++ b/web/components/cycles/board/cycles-board-card.tsx @@ -12,7 +12,7 @@ import { FavoriteStar } from "@/components/core"; import { CycleQuickActions } from "@/components/cycles"; // constants import { CYCLE_STATUS } from "@/constants/cycle"; -import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_GRID_LAYOUT } from "constants/event-tracker"; +import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_GRID_LAYOUT } from "@/constants/event-tracker"; import { EUserWorkspaceRoles } from "@/constants/workspace"; // helpers import { findHowManyDaysLeft, getDate, renderFormattedDate } from "@/helpers/date-time.helper"; diff --git a/web/components/cycles/list/cycles-list-item.tsx b/web/components/cycles/list/cycles-list-item.tsx index b81117e97..1bbcf7909 100644 --- a/web/components/cycles/list/cycles-list-item.tsx +++ b/web/components/cycles/list/cycles-list-item.tsx @@ -13,7 +13,7 @@ import { FavoriteStar } from "@/components/core"; import { CycleQuickActions } from "@/components/cycles"; // constants import { CYCLE_STATUS } from "@/constants/cycle"; -import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_LIST_LAYOUT } from "constants/event-tracker"; +import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_LIST_LAYOUT } from "@/constants/event-tracker"; import { EUserProjectRoles } from "@/constants/project"; // helpers import { findHowManyDaysLeft, getDate, renderFormattedDate } from "@/helpers/date-time.helper"; diff --git a/web/components/cycles/quick-actions.tsx b/web/components/cycles/quick-actions.tsx index 5287ed419..73229b1df 100644 --- a/web/components/cycles/quick-actions.tsx +++ b/web/components/cycles/quick-actions.tsx @@ -8,7 +8,7 @@ import { ArchiveIcon, CustomMenu, TOAST_TYPE, setToast } from "@plane/ui"; // components import { ArchiveCycleModal, CycleCreateUpdateModal, CycleDeleteModal } from "@/components/cycles"; // constants -import { E_CYCLES_LIST_LAYOUT } from "constants/event-tracker"; +import { E_CYCLES_LIST_LAYOUT } from "@/constants/event-tracker"; import { EUserProjectRoles } from "@/constants/project"; // helpers import { copyUrlToClipboard } from "@/helpers/string.helper"; diff --git a/web/components/dashboard/project-empty-state.tsx b/web/components/dashboard/project-empty-state.tsx index adc3d7aac..f9f24dcfb 100644 --- a/web/components/dashboard/project-empty-state.tsx +++ b/web/components/dashboard/project-empty-state.tsx @@ -2,13 +2,13 @@ import { observer } from "mobx-react-lite"; import Image from "next/image"; // hooks import { Button } from "@plane/ui"; +// constants +import { E_PROJECT_EMPTY_STATE } from "@/constants/event-tracker"; import { EUserWorkspaceRoles } from "@/constants/workspace"; import { useApplication, useEventTracker, useUser } from "@/hooks/store"; // ui // assets import ProjectEmptyStateImage from "public/empty-state/dashboard/project.svg"; -// constants -import { E_PROJECT_EMPTY_STATE } from "constants/event-tracker"; export const DashboardProjectEmptyState = observer(() => { // store hooks diff --git a/web/components/dashboard/widgets/issue-panels/issues-list.tsx b/web/components/dashboard/widgets/issue-panels/issues-list.tsx index 71671b6cf..d5fff7e24 100644 --- a/web/components/dashboard/widgets/issue-panels/issues-list.tsx +++ b/web/components/dashboard/widgets/issue-panels/issues-list.tsx @@ -15,7 +15,7 @@ import { IssueListItemProps, } from "@/components/dashboard/widgets"; // constants -import { E_DASHBOARD, ISSUE_OPENED } from "constants/event-tracker"; +import { E_DASHBOARD, ISSUE_OPENED } from "@/constants/event-tracker"; // ui // helpers import { cn } from "@/helpers/common.helper"; diff --git a/web/components/dashboard/widgets/recent-projects.tsx b/web/components/dashboard/widgets/recent-projects.tsx index 39720069c..dabdbc2db 100644 --- a/web/components/dashboard/widgets/recent-projects.tsx +++ b/web/components/dashboard/widgets/recent-projects.tsx @@ -7,15 +7,15 @@ import { TRecentProjectsWidgetResponse } from "@plane/types"; import { Avatar, AvatarGroup } from "@plane/ui"; import { WidgetLoader, WidgetProps } from "@/components/dashboard/widgets"; import { ProjectLogo } from "@/components/project"; +// constants import { PROJECT_BACKGROUND_COLORS } from "@/constants/dashboard"; +import { E_SIDEBAR } from "@/constants/event-tracker"; import { EUserWorkspaceRoles } from "@/constants/workspace"; import { useApplication, useEventTracker, useDashboard, useProject, useUser } from "@/hooks/store"; // components // ui // helpers // types -// constants -import { E_SIDEBAR } from "constants/event-tracker"; const WIDGET_KEY = "recent_projects"; diff --git a/web/components/estimates/create-update-estimate-modal.tsx b/web/components/estimates/create-update-estimate-modal.tsx index 8d3b796ef..7a72e4499 100644 --- a/web/components/estimates/create-update-estimate-modal.tsx +++ b/web/components/estimates/create-update-estimate-modal.tsx @@ -7,7 +7,7 @@ import { IEstimate, IEstimateFormData } from "@plane/types"; // store hooks import { Button, Input, TextArea, TOAST_TYPE, setToast } from "@plane/ui"; // constants -import { ESTIMATE_CREATED, ESTIMATE_UPDATED } from "constants/event-tracker"; +import { ESTIMATE_CREATED, ESTIMATE_UPDATED } from "@/constants/event-tracker"; import { checkDuplicates } from "@/helpers/array.helper"; import { useEstimate, useEventTracker } from "@/hooks/store"; // ui diff --git a/web/components/estimates/delete-estimate-modal.tsx b/web/components/estimates/delete-estimate-modal.tsx index eb5ec8ef0..a659793eb 100644 --- a/web/components/estimates/delete-estimate-modal.tsx +++ b/web/components/estimates/delete-estimate-modal.tsx @@ -6,11 +6,11 @@ import { Dialog, Transition } from "@headlessui/react"; import { IEstimate } from "@plane/types"; // store hooks import { Button, TOAST_TYPE, setToast } from "@plane/ui"; -import { useEstimate, useEventTracker } from "hooks/store"; +// constants +import { ESTIMATE_DELETED } from "@/constants/event-tracker"; +import { useEstimate, useEventTracker } from "@/hooks/store"; // types // ui -// constants -import { ESTIMATE_DELETED } from "constants/event-tracker"; type Props = { isOpen: boolean; diff --git a/web/components/estimates/estimate-list-item.tsx b/web/components/estimates/estimate-list-item.tsx index ffe7360de..8023dbb18 100644 --- a/web/components/estimates/estimate-list-item.tsx +++ b/web/components/estimates/estimate-list-item.tsx @@ -6,7 +6,7 @@ import { Pencil, Trash2 } from "lucide-react"; import { IEstimate } from "@plane/types"; import { Button, CustomMenu, TOAST_TYPE, setToast } from "@plane/ui"; // constants -import { ESTIMATE_USED } from "constants/event-tracker"; +import { ESTIMATE_USED } from "@/constants/event-tracker"; import { orderArrayBy } from "@/helpers/array.helper"; import { useProject, useEventTracker } from "@/hooks/store"; // ui diff --git a/web/components/estimates/estimates-list.tsx b/web/components/estimates/estimates-list.tsx index abdc8e491..e15f82cc3 100644 --- a/web/components/estimates/estimates-list.tsx +++ b/web/components/estimates/estimates-list.tsx @@ -7,14 +7,14 @@ import { Button, Loader, TOAST_TYPE, setToast } from "@plane/ui"; import { EmptyState } from "@/components/empty-state"; import { CreateUpdateEstimateModal, DeleteEstimateModal, EstimateListItem } from "@/components/estimates"; import { EmptyStateType } from "@/constants/empty-state"; +// constants +import { ESTIMATE_DISABLED } from "@/constants/event-tracker"; import { orderArrayBy } from "@/helpers/array.helper"; import { useEstimate, useProject, useEventTracker } from "@/hooks/store"; // components // ui // types // helpers -// constants -import { ESTIMATE_DISABLED } from "constants/event-tracker"; export const EstimatesList: React.FC = observer(() => { // states diff --git a/web/components/exporter/export-modal.tsx b/web/components/exporter/export-modal.tsx index c6cf7aa30..e417b4e20 100644 --- a/web/components/exporter/export-modal.tsx +++ b/web/components/exporter/export-modal.tsx @@ -5,13 +5,12 @@ import { Dialog, Transition } from "@headlessui/react"; import { IUser, IImporterService } from "@plane/types"; // hooks import { Button, CustomSearchSelect, TOAST_TYPE, setToast } from "@plane/ui"; - -import { useEventTracker, useProject } from "hooks/store"; +// constants +import { ISSUES_EXPORTED } from "@/constants/event-tracker"; +import { useEventTracker, useProject } from "@/hooks/store"; // services import { ProjectExportService } from "@/services/project"; // ui -// constants -import { ISSUES_EXPORTED } from "constants/event-tracker"; type Props = { isOpen: boolean; diff --git a/web/components/headers/cycle-issues.tsx b/web/components/headers/cycle-issues.tsx index 9d646a047..b5da779de 100644 --- a/web/components/headers/cycle-issues.tsx +++ b/web/components/headers/cycle-issues.tsx @@ -11,6 +11,18 @@ import { ProjectAnalyticsModal } from "@/components/analytics"; import { BreadcrumbLink } from "@/components/common"; import { DisplayFiltersSelection, FiltersDropdown, FilterSelection, LayoutSelection } from "@/components/issues"; import { ProjectLogo } from "@/components/project"; +// constants +import { + DP_APPLIED, + DP_REMOVED, + E_CYCLE_ISSUES, + elementFromPath, + FILTER_APPLIED, + FILTER_REMOVED, + FILTER_SEARCHED, + LAYOUT_CHANGED, + LP_UPDATED, +} from "@/constants/event-tracker"; import { EIssueFilterType, EIssuesStoreType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue"; import { EUserProjectRoles } from "@/constants/project"; import { cn } from "@/helpers/common.helper"; @@ -32,18 +44,6 @@ import useLocalStorage from "@/hooks/use-local-storage"; // helpers // types import { usePlatformOS } from "@/hooks/use-platform-os"; -// constants -import { - DP_APPLIED, - DP_REMOVED, - E_CYCLE_ISSUES, - elementFromPath, - FILTER_APPLIED, - FILTER_REMOVED, - FILTER_SEARCHED, - LAYOUT_CHANGED, - LP_UPDATED, -} from "constants/event-tracker"; const CycleDropdownOption: React.FC<{ cycleId: string }> = ({ cycleId }) => { // router @@ -274,9 +274,7 @@ export const CycleIssuesHeader: React.FC = observer(() => { className="ml-1.5 flex-shrink-0 truncate" placement="bottom-start" > - {currentProjectCycleIds?.map((cycleId) => ( - - ))} + {currentProjectCycleIds?.map((cycleId) => )} } /> diff --git a/web/components/headers/cycles.tsx b/web/components/headers/cycles.tsx index c8ec9f216..970edc88c 100644 --- a/web/components/headers/cycles.tsx +++ b/web/components/headers/cycles.tsx @@ -10,7 +10,7 @@ import { Breadcrumbs, Button, ContrastIcon } from "@plane/ui"; import { BreadcrumbLink } from "@/components/common"; import { ProjectLogo } from "@/components/project"; // constants -import { E_CYCLES } from "constants/event-tracker"; +import { E_CYCLES } from "@/constants/event-tracker"; import { EUserProjectRoles } from "@/constants/project"; import { useApplication, useEventTracker, useProject, useUser } from "@/hooks/store"; diff --git a/web/components/headers/global-issues.tsx b/web/components/headers/global-issues.tsx index e44e69044..ff8138031 100644 --- a/web/components/headers/global-issues.tsx +++ b/web/components/headers/global-issues.tsx @@ -21,7 +21,7 @@ import { FILTER_REMOVED, FILTER_SEARCHED, LP_UPDATED, -} from "constants/event-tracker"; +} from "@/constants/event-tracker"; import { EIssueFilterType, EIssuesStoreType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue"; import { EUserWorkspaceRoles } from "@/constants/workspace"; import { useLabel, useMember, useUser, useIssues, useEventTracker } from "@/hooks/store"; diff --git a/web/components/headers/module-issues.tsx b/web/components/headers/module-issues.tsx index bc0d1d2f4..e9b23fd74 100644 --- a/web/components/headers/module-issues.tsx +++ b/web/components/headers/module-issues.tsx @@ -10,6 +10,18 @@ import { ProjectAnalyticsModal } from "@/components/analytics"; import { BreadcrumbLink } from "@/components/common"; import { DisplayFiltersSelection, FiltersDropdown, FilterSelection, LayoutSelection } from "@/components/issues"; import { ProjectLogo } from "@/components/project"; +// constants +import { + DP_APPLIED, + DP_REMOVED, + E_MODULE_ISSUES, + elementFromPath, + FILTER_APPLIED, + FILTER_REMOVED, + FILTER_SEARCHED, + LAYOUT_CHANGED, + LP_UPDATED, +} from "@/constants/event-tracker"; import { EIssuesStoreType, EIssueFilterType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue"; import { EUserProjectRoles } from "@/constants/project"; import { cn } from "@/helpers/common.helper"; @@ -33,18 +45,6 @@ import useLocalStorage from "@/hooks/use-local-storage"; // helpers // types import { usePlatformOS } from "@/hooks/use-platform-os"; -// constants -import { - DP_APPLIED, - DP_REMOVED, - E_MODULE_ISSUES, - elementFromPath, - FILTER_APPLIED, - FILTER_REMOVED, - FILTER_SEARCHED, - LAYOUT_CHANGED, - LP_UPDATED, -} from "constants/event-tracker"; const ModuleDropdownOption: React.FC<{ moduleId: string }> = ({ moduleId }) => { // router @@ -273,9 +273,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => { className="ml-1.5 flex-shrink-0" placement="bottom-start" > - {projectModuleIds?.map((moduleId) => ( - - ))} + {projectModuleIds?.map((moduleId) => )} } /> diff --git a/web/components/headers/modules-list.tsx b/web/components/headers/modules-list.tsx index d7bb740c6..4fa2c3ee6 100644 --- a/web/components/headers/modules-list.tsx +++ b/web/components/headers/modules-list.tsx @@ -9,7 +9,7 @@ import { BreadcrumbLink } from "@/components/common"; import { FiltersDropdown } from "@/components/issues"; import { ModuleFiltersSelection, ModuleOrderByDropdown } from "@/components/modules"; import { ProjectLogo } from "@/components/project"; -import { E_MODULES } from "constants/event-tracker"; +import { E_MODULES } from "@/constants/event-tracker"; import { MODULE_VIEW_LAYOUTS } from "@/constants/module"; import { EUserProjectRoles } from "@/constants/project"; import { cn } from "@/helpers/common.helper"; diff --git a/web/components/headers/pages.tsx b/web/components/headers/pages.tsx index 78d988843..52a2c4f84 100644 --- a/web/components/headers/pages.tsx +++ b/web/components/headers/pages.tsx @@ -6,8 +6,8 @@ import { FileText, Plus } from "lucide-react"; import { Breadcrumbs, Button } from "@plane/ui"; // helpers import { BreadcrumbLink } from "@/components/common"; -import { E_PAGES } from "constants/event-tracker"; import { ProjectLogo } from "@/components/project"; +import { E_PAGES } from "@/constants/event-tracker"; import { EUserProjectRoles } from "@/constants/project"; // constants // components diff --git a/web/components/headers/project-issues.tsx b/web/components/headers/project-issues.tsx index 19ad333c3..0c3a49d11 100644 --- a/web/components/headers/project-issues.tsx +++ b/web/components/headers/project-issues.tsx @@ -9,6 +9,18 @@ import { ProjectAnalyticsModal } from "@/components/analytics"; import { BreadcrumbLink } from "@/components/common"; import { DisplayFiltersSelection, FiltersDropdown, FilterSelection, LayoutSelection } from "@/components/issues"; import { ProjectLogo } from "@/components/project"; +// constants +import { + DP_APPLIED, + DP_REMOVED, + E_PROJECT_ISSUES, + elementFromPath, + FILTER_APPLIED, + FILTER_REMOVED, + FILTER_SEARCHED, + LAYOUT_CHANGED, + LP_UPDATED, +} from "@/constants/event-tracker"; import { EIssueFilterType, EIssuesStoreType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue"; import { EUserProjectRoles } from "@/constants/project"; import { @@ -25,18 +37,6 @@ import { useIssues } from "@/hooks/store/use-issues"; // ui // types import { usePlatformOS } from "@/hooks/use-platform-os"; -// constants -import { - DP_APPLIED, - DP_REMOVED, - E_PROJECT_ISSUES, - elementFromPath, - FILTER_APPLIED, - FILTER_REMOVED, - FILTER_SEARCHED, - LAYOUT_CHANGED, - LP_UPDATED, -} from "constants/event-tracker"; // helper export const ProjectIssuesHeader: React.FC = observer(() => { diff --git a/web/components/headers/project-view-issues.tsx b/web/components/headers/project-view-issues.tsx index 96c348704..9149c00fa 100644 --- a/web/components/headers/project-view-issues.tsx +++ b/web/components/headers/project-view-issues.tsx @@ -24,7 +24,7 @@ import { FILTER_SEARCHED, LAYOUT_CHANGED, LP_UPDATED, -} from "constants/event-tracker"; +} from "@/constants/event-tracker"; import { EIssuesStoreType, EIssueFilterType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue"; import { EUserProjectRoles } from "@/constants/project"; import { truncateText } from "@/helpers/string.helper"; diff --git a/web/components/headers/project-views.tsx b/web/components/headers/project-views.tsx index 2aa296262..edea39671 100644 --- a/web/components/headers/project-views.tsx +++ b/web/components/headers/project-views.tsx @@ -7,7 +7,7 @@ import { Breadcrumbs, PhotoFilterIcon, Button } from "@plane/ui"; import { BreadcrumbLink } from "@/components/common"; // helpers import { ProjectLogo } from "@/components/project"; -import { E_VIEWS } from "constants/event-tracker"; +import { E_VIEWS } from "@/constants/event-tracker"; import { EUserProjectRoles } from "@/constants/project"; // constants import { useApplication, useProject, useUser, useEventTracker } from "@/hooks/store"; diff --git a/web/components/headers/projects.tsx b/web/components/headers/projects.tsx index f1b7516c1..f2e513b38 100644 --- a/web/components/headers/projects.tsx +++ b/web/components/headers/projects.tsx @@ -11,7 +11,7 @@ import { BreadcrumbLink } from "@/components/common"; // constants import { FiltersDropdown } from "@/components/issues"; import { ProjectFiltersSelection, ProjectOrderByDropdown } from "@/components/project"; -import { E_PROJECTS } from "constants/event-tracker"; +import { E_PROJECTS } from "@/constants/event-tracker"; import { EUserWorkspaceRoles } from "@/constants/workspace"; import { cn } from "@/helpers/common.helper"; import { useApplication, useEventTracker, useMember, useProjectFilter, useUser } from "@/hooks/store"; diff --git a/web/components/inbox/content/issue-root.tsx b/web/components/inbox/content/issue-root.tsx index 545e96677..dc122fc51 100644 --- a/web/components/inbox/content/issue-root.tsx +++ b/web/components/inbox/content/issue-root.tsx @@ -89,7 +89,7 @@ export const InboxIssueMainContent: React.FC = observer((props) => { changed_property: Object.keys(data).join(","), change_details: Object.values(data).join(","), }, - path: router.asPath, + routePath: router.asPath, }); } catch (error) { setToast({ @@ -104,7 +104,7 @@ export const InboxIssueMainContent: React.FC = observer((props) => { changed_property: Object.keys(data).join(","), change_details: Object.values(data).join(","), }, - path: router.asPath, + routePath: router.asPath, }); } }, diff --git a/web/components/inbox/modals/create-edit-modal/create-root.tsx b/web/components/inbox/modals/create-edit-modal/create-root.tsx index de8e0d3ce..e317e0879 100644 --- a/web/components/inbox/modals/create-edit-modal/create-root.tsx +++ b/web/components/inbox/modals/create-edit-modal/create-root.tsx @@ -88,7 +88,7 @@ export const InboxIssueCreateRoot: FC = observer((props) state: "SUCCESS", element: "Inbox page", }, - path: router.pathname, + routePath: router.pathname, }); setToast({ type: TOAST_TYPE.SUCCESS, @@ -105,7 +105,7 @@ export const InboxIssueCreateRoot: FC = observer((props) state: "FAILED", element: "Inbox page", }, - path: router.pathname, + routePath: router.pathname, }); setToast({ type: TOAST_TYPE.ERROR, diff --git a/web/components/inbox/modals/create-edit-modal/edit-root.tsx b/web/components/inbox/modals/create-edit-modal/edit-root.tsx index 6ffb6efee..252fad886 100644 --- a/web/components/inbox/modals/create-edit-modal/edit-root.tsx +++ b/web/components/inbox/modals/create-edit-modal/edit-root.tsx @@ -91,7 +91,7 @@ export const InboxIssueEditRoot: FC = observer((props) => { state: "SUCCESS", element: "Inbox page", }, - path: router.pathname, + routePath: router.pathname, }); setToast({ type: TOAST_TYPE.SUCCESS, @@ -110,7 +110,7 @@ export const InboxIssueEditRoot: FC = observer((props) => { state: "FAILED", element: "Inbox page", }, - path: router.pathname, + routePath: router.pathname, }); setToast({ type: TOAST_TYPE.ERROR, diff --git a/web/components/inbox/modals/create-issue-modal.tsx b/web/components/inbox/modals/create-issue-modal.tsx index 82f0cf027..c8222b4aa 100644 --- a/web/components/inbox/modals/create-issue-modal.tsx +++ b/web/components/inbox/modals/create-issue-modal.tsx @@ -13,7 +13,7 @@ import { Button, Input, ToggleSwitch, TOAST_TYPE, setToast } from "@plane/ui"; import { GptAssistantPopover } from "@/components/core"; import { PriorityDropdown } from "@/components/dropdowns"; import { RichTextEditor } from "@/components/editor/rich-text-editor/rich-text-editor"; -import { E_INBOX, ISSUE_CREATED } from "constants/event-tracker"; +import { E_INBOX, ISSUE_CREATED } from "@/constants/event-tracker"; import { useApplication, useEventTracker, useWorkspace, useProjectInbox } from "@/hooks/store"; // services import { AIService } from "@/services/ai.service"; diff --git a/web/components/integration/github/root.tsx b/web/components/integration/github/root.tsx index 3d0bc09b8..227107a99 100644 --- a/web/components/integration/github/root.tsx +++ b/web/components/integration/github/root.tsx @@ -22,12 +22,12 @@ import { } from "@/components/integration"; // icons // images -import { GITHUB_ISSUES_IMPORTED } from "constants/event-tracker"; +import { GITHUB_ISSUES_IMPORTED } from "@/constants/event-tracker"; import { APP_INTEGRATIONS, IMPORTER_SERVICES_LIST, WORKSPACE_INTEGRATIONS } from "@/constants/fetch-keys"; +// hooks +import { useEventTracker } from "@/hooks/store"; import { IntegrationService, GithubIntegrationService } from "@/services/integrations"; import GithubLogo from "public/services/github.png"; -// hooks -import { useEventTracker } from "hooks/store"; // components // icons // images diff --git a/web/components/integration/jira/give-details.tsx b/web/components/integration/jira/give-details.tsx index a271194c4..08b4df0d0 100644 --- a/web/components/integration/jira/give-details.tsx +++ b/web/components/integration/jira/give-details.tsx @@ -8,7 +8,7 @@ import { IJiraImporterForm } from "@plane/types"; // components import { CustomSelect, Input } from "@plane/ui"; // constants -import { E_JIRA_IMPORT } from "constants/event-tracker"; +import { E_JIRA_IMPORT } from "@/constants/event-tracker"; // helpers import { checkEmailValidity } from "@/helpers/string.helper"; import { useApplication, useEventTracker, useProject } from "@/hooks/store"; diff --git a/web/components/integration/jira/root.tsx b/web/components/integration/jira/root.tsx index 537ff7b4b..7b1644030 100644 --- a/web/components/integration/jira/root.tsx +++ b/web/components/integration/jira/root.tsx @@ -4,8 +4,6 @@ import Link from "next/link"; import { useRouter } from "next/router"; import { FormProvider, useForm } from "react-hook-form"; import { mutate } from "swr"; -// hooks -import { useEventTracker } from "hooks/store"; // icons import { ArrowLeft, Check, List, Settings } from "lucide-react"; import { IJiraImporterForm } from "@plane/types"; @@ -13,7 +11,11 @@ import { IJiraImporterForm } from "@plane/types"; // fetch keys // components import { Button, UserGroupIcon } from "@plane/ui"; +// constants +import { JIRA_ISSUES_IMPORTED } from "@/constants/event-tracker"; import { IMPORTER_SERVICES_LIST } from "@/constants/fetch-keys"; +// hooks +import { useEventTracker } from "@/hooks/store"; // assets import { JiraImporterService } from "@/services/integrations"; import JiraLogo from "public/services/jira.svg"; @@ -27,8 +29,6 @@ import { TJiraIntegrationSteps, IJiraIntegrationData, } from "."; -// constants -import { JIRA_ISSUES_IMPORTED } from "constants/event-tracker"; const integrationWorkflowData: Array<{ title: string; diff --git a/web/components/issues/attachment/root.tsx b/web/components/issues/attachment/root.tsx index bc7c4dfa7..d984bb0bc 100644 --- a/web/components/issues/attachment/root.tsx +++ b/web/components/issues/attachment/root.tsx @@ -1,13 +1,13 @@ import { FC, useMemo } from "react"; // hooks import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/ui"; +// constants +import { E_ISSUE_DETAILS } from "@/constants/event-tracker"; import { useEventTracker, useIssueDetail } from "@/hooks/store"; // ui // components import { IssueAttachmentUpload } from "./attachment-upload"; import { IssueAttachmentsList } from "./attachments-list"; -// constants -import { E_ISSUE_DETAILS } from "constants/event-tracker"; export type TIssueAttachmentRoot = { workspaceSlug: string; diff --git a/web/components/issues/issue-detail/issue-activity/root.tsx b/web/components/issues/issue-detail/issue-activity/root.tsx index 596f5c0cf..cf1481b10 100644 --- a/web/components/issues/issue-detail/issue-activity/root.tsx +++ b/web/components/issues/issue-detail/issue-activity/root.tsx @@ -1,6 +1,6 @@ import { FC, useMemo, useState } from "react"; -import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; +import { useRouter } from "next/router"; import { History, LucideIcon, MessageCircle } from "lucide-react"; // types import { TIssueComment } from "@plane/types"; @@ -9,7 +9,7 @@ import { TOAST_TYPE, setToast } from "@plane/ui"; // components import { IssueActivityCommentRoot, IssueCommentRoot, IssueCommentCreate } from "@/components/issues"; // constants -import { COMMENT_CREATED, COMMENT_DELETED, COMMENT_UPDATED } from "constants/event-tracker"; +import { COMMENT_CREATED, COMMENT_DELETED, COMMENT_UPDATED } from "@/constants/event-tracker"; // hooks import { useIssueDetail, useProject, useEventTracker } from "@/hooks/store"; diff --git a/web/components/issues/issue-detail/root.tsx b/web/components/issues/issue-detail/root.tsx index 7508047d6..ac3d4e3dd 100644 --- a/web/components/issues/issue-detail/root.tsx +++ b/web/components/issues/issue-detail/root.tsx @@ -6,7 +6,7 @@ import { TIssue } from "@plane/types"; import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/ui"; import { EmptyState } from "@/components/common"; import { IssuePeekOverview } from "@/components/issues"; -import { ISSUE_UPDATED, ISSUE_DELETED, ISSUE_ARCHIVED, E_ISSUE_DETAILS } from "constants/event-tracker"; +import { ISSUE_UPDATED, ISSUE_DELETED, ISSUE_ARCHIVED, E_ISSUE_DETAILS } from "@/constants/event-tracker"; import { EIssuesStoreType } from "@/constants/issue"; import { EUserProjectRoles } from "@/constants/project"; import { useApplication, useEventTracker, useIssueDetail, useIssues, useUser } from "@/hooks/store"; diff --git a/web/components/issues/issue-layouts/calendar/quick-add-issue-form.tsx b/web/components/issues/issue-layouts/calendar/quick-add-issue-form.tsx index 730e83717..2d5637c7e 100644 --- a/web/components/issues/issue-layouts/calendar/quick-add-issue-form.tsx +++ b/web/components/issues/issue-layouts/calendar/quick-add-issue-form.tsx @@ -8,7 +8,7 @@ import { ISearchIssueResponse, TIssue } from "@plane/types"; import { TOAST_TYPE, setPromiseToast, setToast, CustomMenu } from "@plane/ui"; import { ExistingIssuesListModal } from "@/components/core"; // hooks -import { E_CALENDAR_QUICK_ADD, ISSUE_CREATED } from "constants/event-tracker"; +import { E_CALENDAR_QUICK_ADD, ISSUE_CREATED } from "@/constants/event-tracker"; import { cn } from "@/helpers/common.helper"; import { createIssuePayload } from "@/helpers/issue.helper"; import { useEventTracker, useIssueDetail, useProject } from "@/hooks/store"; diff --git a/web/components/issues/issue-layouts/empty-states/global-view.tsx b/web/components/issues/issue-layouts/empty-states/global-view.tsx index 98876eed0..e0b0f6066 100644 --- a/web/components/issues/issue-layouts/empty-states/global-view.tsx +++ b/web/components/issues/issue-layouts/empty-states/global-view.tsx @@ -2,13 +2,13 @@ import { observer } from "mobx-react-lite"; import { Plus, PlusIcon } from "lucide-react"; // hooks import { EmptyState } from "@/components/common"; +// constants +import { E_GLOBAL_ISSUES_EMPTY_STATE } from "@/constants/event-tracker"; import { useApplication, useEventTracker, useProject } from "@/hooks/store"; // components // assets import emptyIssue from "public/empty-state/issue.svg"; import emptyProject from "public/empty-state/project.svg"; -// constants -import { E_GLOBAL_ISSUES_EMPTY_STATE } from "constants/event-tracker"; export const GlobalViewEmptyState: React.FC = observer(() => { // store hooks diff --git a/web/components/issues/issue-layouts/empty-states/project-view.tsx b/web/components/issues/issue-layouts/empty-states/project-view.tsx index 7b0d24551..138af9758 100644 --- a/web/components/issues/issue-layouts/empty-states/project-view.tsx +++ b/web/components/issues/issue-layouts/empty-states/project-view.tsx @@ -2,13 +2,13 @@ import { observer } from "mobx-react-lite"; import { PlusIcon } from "lucide-react"; // hooks import { EmptyState } from "@/components/common"; +// constants +import { E_VIEW_ISSUES_EMPTY_STATE } from "@/constants/event-tracker"; import { EIssuesStoreType } from "@/constants/issue"; import { useApplication, useEventTracker } from "@/hooks/store"; // components // assets import emptyIssue from "public/empty-state/issue.svg"; -// constants -import { E_VIEW_ISSUES_EMPTY_STATE } from "constants/event-tracker"; export const ProjectViewEmptyState: React.FC = observer(() => { // store hooks diff --git a/web/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx b/web/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx index e2cc5ae43..8fc969789 100644 --- a/web/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx +++ b/web/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx @@ -2,8 +2,7 @@ import { useEffect, useState } from "react"; import { observer } from "mobx-react-lite"; import { Search, X } from "lucide-react"; import { IIssueFilterOptions, IIssueLabel, IState } from "@plane/types"; -// hooks -import useDebounce from "hooks/use-debounce"; + import { FilterAssignees, FilterMentions, @@ -19,7 +18,9 @@ import { FilterModule, } from "@/components/issues"; import { ILayoutDisplayFiltersOptions } from "@/constants/issue"; +// hooks import { useApplication } from "@/hooks/store"; +import useDebounce from "@/hooks/use-debounce"; // components // types // constants diff --git a/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx b/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx index 09da8f703..d19e5ced2 100644 --- a/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx +++ b/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx @@ -10,12 +10,11 @@ import { CustomMenu, TOAST_TYPE, setToast } from "@plane/ui"; import { ExistingIssuesListModal } from "@/components/core"; import { CreateUpdateIssueModal } from "@/components/issues"; // constants +import { E_KANBAN_LAYOUT } from "@/constants/event-tracker"; // hooks import { useEventTracker } from "@/hooks/store"; // types import { KanbanStoreType } from "../base-kanban-root"; -// constants -import { E_KANBAN_LAYOUT } from "constants/event-tracker"; interface IHeaderGroupByCard { sub_group_by: TIssueGroupByOptions | undefined; diff --git a/web/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx b/web/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx index 137741913..9404c9c5f 100644 --- a/web/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx +++ b/web/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx @@ -9,6 +9,8 @@ import { ArchiveIcon, CustomMenu, TOAST_TYPE, setToast } from "@plane/ui"; import { ArchiveIssueModal, CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues"; // ui // components +// constants +import { E_GLOBAL_ISSUES } from "@/constants/event-tracker"; import { EIssuesStoreType } from "@/constants/issue"; import { STATE_GROUPS } from "@/constants/state"; import { copyUrlToClipboard } from "@/helpers/string.helper"; @@ -17,8 +19,6 @@ import { useEventTracker, useProjectState } from "@/hooks/store"; // helpers // types import { IQuickActionProps } from "../list/list-view-types"; -// constants -import { E_GLOBAL_ISSUES } from "constants/event-tracker"; export const AllIssueQuickActions: React.FC = observer((props) => { const { diff --git a/web/components/issues/issue-layouts/roots/cycle-layout-root.tsx b/web/components/issues/issue-layouts/roots/cycle-layout-root.tsx index 903ae8ef1..13cd083f7 100644 --- a/web/components/issues/issue-layouts/roots/cycle-layout-root.tsx +++ b/web/components/issues/issue-layouts/roots/cycle-layout-root.tsx @@ -20,7 +20,7 @@ import { } from "@/components/issues"; import { ActiveLoader } from "@/components/ui"; // constants -import { EIssueFilterType, EIssuesStoreType } from "constants/issue"; +import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { useCycle, useEventTracker, useIssues } from "hooks/store"; // types diff --git a/web/components/issues/issue-layouts/spreadsheet/columns/cycle-column.tsx b/web/components/issues/issue-layouts/spreadsheet/columns/cycle-column.tsx index d44868df6..8f58eaf1f 100644 --- a/web/components/issues/issue-layouts/spreadsheet/columns/cycle-column.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/columns/cycle-column.tsx @@ -4,12 +4,12 @@ import { useRouter } from "next/router"; import { TIssue } from "@plane/types"; // hooks import { CycleDropdown } from "@/components/dropdowns"; +// constants +import { E_SPREADSHEET_LAYOUT } from "@/constants/event-tracker"; import { EIssuesStoreType } from "@/constants/issue"; import { useEventTracker, useIssues } from "@/hooks/store"; // components // types -// constants -import { E_SPREADSHEET_LAYOUT } from "constants/event-tracker"; type Props = { issue: TIssue; diff --git a/web/components/issues/issue-layouts/spreadsheet/columns/module-column.tsx b/web/components/issues/issue-layouts/spreadsheet/columns/module-column.tsx index ac96f1c95..b1a36c7ad 100644 --- a/web/components/issues/issue-layouts/spreadsheet/columns/module-column.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/columns/module-column.tsx @@ -5,12 +5,12 @@ import { useRouter } from "next/router"; import { TIssue } from "@plane/types"; // hooks import { ModuleDropdown } from "@/components/dropdowns"; +// constants +import { E_SPREADSHEET_LAYOUT } from "@/constants/event-tracker"; import { EIssuesStoreType } from "@/constants/issue"; import { useEventTracker, useIssues } from "@/hooks/store"; // components // types -// constants -import { E_SPREADSHEET_LAYOUT } from "constants/event-tracker"; type Props = { issue: TIssue; diff --git a/web/components/labels/create-label-modal.tsx b/web/components/labels/create-label-modal.tsx index a40179d3f..653527bdb 100644 --- a/web/components/labels/create-label-modal.tsx +++ b/web/components/labels/create-label-modal.tsx @@ -8,14 +8,14 @@ import { Dialog, Popover, Transition } from "@headlessui/react"; import type { IIssueLabel, IState } from "@plane/types"; // hooks import { Button, Input, TOAST_TYPE, setToast } from "@plane/ui"; +// constants +import { E_LABELS, LABEL_CREATED } from "@/constants/event-tracker"; import { LABEL_COLOR_OPTIONS, getRandomLabelColor } from "@/constants/label"; import { useLabel, useEventTracker } from "@/hooks/store"; // ui // types -// constants -import { E_LABELS, LABEL_CREATED } from "constants/event-tracker"; - // types + type Props = { isOpen: boolean; projectId: string; diff --git a/web/components/labels/project-setting-label-list.tsx b/web/components/labels/project-setting-label-list.tsx index 9d7b3d6f3..8de57e8b2 100644 --- a/web/components/labels/project-setting-label-list.tsx +++ b/web/components/labels/project-setting-label-list.tsx @@ -12,7 +12,7 @@ import { ProjectSettingLabelItem, } from "@/components/labels"; import { EmptyStateType } from "@/constants/empty-state"; -import { useLabel, useEventTracker } from "@/hooks/store"; +import { useLabel } from "@/hooks/store"; // components // ui // types @@ -29,8 +29,7 @@ export const ProjectSettingsLabelList: React.FC = observer(() => { const router = useRouter(); const { workspaceSlug, projectId } = router.query; // store hooks - const { projectLabels, updateLabelPosition, projectLabelsTree, getLabelById } = useLabel(); - const { captureLabelDragNDropEvent } = useEventTracker(); + const { projectLabels, updateLabelPosition, projectLabelsTree } = useLabel(); const newLabel = () => { setIsUpdating(false); diff --git a/web/components/modules/module-card-item.tsx b/web/components/modules/module-card-item.tsx index 789fa0f68..3ffde1659 100644 --- a/web/components/modules/module-card-item.tsx +++ b/web/components/modules/module-card-item.tsx @@ -9,7 +9,7 @@ import { Avatar, AvatarGroup, LayersIcon, Tooltip, setPromiseToast } from "@plan import { FavoriteStar } from "@/components/core"; import { ModuleQuickActions } from "@/components/modules"; // constants -import { E_GRID_LAYOUT, E_MODULES_GRID_LAYOUT, MODULE_FAVORITED, MODULE_UNFAVORITED } from "@/constants/event-tracker"; +import { E_GRID_LAYOUT, MODULE_FAVORITED, MODULE_UNFAVORITED } from "@/constants/event-tracker"; import { MODULE_STATUS } from "@/constants/module"; import { EUserProjectRoles } from "@/constants/project"; // helpers @@ -139,8 +139,8 @@ export const ModuleCardItem: React.FC = observer((props) => { ? !moduleTotalIssues || moduleTotalIssues === 0 ? "0 Issue" : moduleTotalIssues === moduleDetails.completed_issues - ? `${moduleTotalIssues} Issue${moduleTotalIssues > 1 ? "s" : ""}` - : `${moduleDetails.completed_issues}/${moduleTotalIssues} Issues` + ? `${moduleTotalIssues} Issue${moduleTotalIssues > 1 ? "s" : ""}` + : `${moduleDetails.completed_issues}/${moduleTotalIssues} Issues` : "0 Issue"; return ( diff --git a/web/components/modules/module-list-item.tsx b/web/components/modules/module-list-item.tsx index 6dc9d56c3..17de76591 100644 --- a/web/components/modules/module-list-item.tsx +++ b/web/components/modules/module-list-item.tsx @@ -9,7 +9,7 @@ import { Avatar, AvatarGroup, CircularProgressIndicator, Tooltip, setPromiseToas import { FavoriteStar } from "@/components/core"; import { ModuleQuickActions } from "@/components/modules"; // constants -import { E_GRID_LAYOUT, E_MODULES_LIST_LAYOUT, MODULE_FAVORITED, MODULE_UNFAVORITED } from "@/constants/event-tracker"; +import { E_GRID_LAYOUT, MODULE_FAVORITED, MODULE_UNFAVORITED } from "@/constants/event-tracker"; import { MODULE_STATUS } from "@/constants/module"; import { EUserProjectRoles } from "@/constants/project"; // helpers diff --git a/web/components/onboarding/invite-members.tsx b/web/components/onboarding/invite-members.tsx index d64522c1c..4b8a955c3 100644 --- a/web/components/onboarding/invite-members.tsx +++ b/web/components/onboarding/invite-members.tsx @@ -26,7 +26,7 @@ import { EUserWorkspaceRoles, ROLE } from "@/constants/workspace"; // helpers import { getUserRole } from "@/helpers/user.helper"; // hooks -import { useEventTracker } from "@/hooks/store"; +import { useEventTracker, useApplication } from "@/hooks/store"; import useDynamicDropdownPosition from "@/hooks/use-dynamic-dropdown"; // assets import { WorkspaceService } from "@/services/workspace.service"; diff --git a/web/components/project/member-list-item.tsx b/web/components/project/member-list-item.tsx index ef0ad4fac..5fd837883 100644 --- a/web/components/project/member-list-item.tsx +++ b/web/components/project/member-list-item.tsx @@ -12,10 +12,10 @@ import { ConfirmProjectMemberRemove } from "@/components/project"; import { E_PROJECT_MEMBERS, PM_ROLE_CHANGED, PROJECT_MEMBER_LEFT, PROJECT_MEMBER_REMOVED } from "@/constants/event-tracker"; import { EUserProjectRoles } from "@/constants/project"; import { ROLE } from "@/constants/workspace"; +import { getUserRole } from "@/helpers/user.helper"; // hooks import { useEventTracker, useMember, useProject, useUser } from "@/hooks/store"; import { usePlatformOS } from "@/hooks/use-platform-os"; -import { getUserRole } from "@/helpers/user.helper"; type Props = { userId: string; diff --git a/web/components/project/sidebar-list-item.tsx b/web/components/project/sidebar-list-item.tsx index 84b685b17..7c42393cb 100644 --- a/web/components/project/sidebar-list-item.tsx +++ b/web/components/project/sidebar-list-item.tsx @@ -31,7 +31,7 @@ import { } from "@plane/ui"; import { LeaveProjectModal, ProjectLogo, PublishProjectModal } from "@/components/project"; // constants -import { E_SIDEBAR } from "constants/event-tracker"; +import { E_SIDEBAR } from "@/constants/event-tracker"; import { EUserProjectRoles } from "@/constants/project"; import { cn } from "@/helpers/common.helper"; // hooks diff --git a/web/components/project/sidebar-list.tsx b/web/components/project/sidebar-list.tsx index 23880c124..6f5095b6d 100644 --- a/web/components/project/sidebar-list.tsx +++ b/web/components/project/sidebar-list.tsx @@ -9,7 +9,7 @@ import { IProject } from "@plane/types"; import { TOAST_TYPE, setToast } from "@plane/ui"; import { CreateProjectModal, ProjectSidebarListItem } from "@/components/project"; // constants -import { E_SIDEBAR } from "constants/event-tracker"; +import { E_SIDEBAR } from "@/constants/event-tracker"; import { EUserWorkspaceRoles } from "@/constants/workspace"; import { cn } from "@/helpers/common.helper"; import { orderJoinedProjects } from "@/helpers/project.helper"; diff --git a/web/components/states/project-setting-state-list.tsx b/web/components/states/project-setting-state-list.tsx index 479b9ccaa..685ec5d95 100644 --- a/web/components/states/project-setting-state-list.tsx +++ b/web/components/states/project-setting-state-list.tsx @@ -7,7 +7,7 @@ import { Plus } from "lucide-react"; import { Loader } from "@plane/ui"; import { CreateUpdateStateInline, DeleteStateModal, StateGroup, StatesListItem } from "@/components/states"; // constants -import { E_STATES } from "constants/event-tracker"; +import { E_STATES } from "@/constants/event-tracker"; import { STATES_LIST } from "@/constants/fetch-keys"; import { sortByField } from "@/helpers/array.helper"; import { orderStateGroups } from "@/helpers/state.helper"; diff --git a/web/components/views/delete-view-modal.tsx b/web/components/views/delete-view-modal.tsx index 36d48af1d..f7114e2d0 100644 --- a/web/components/views/delete-view-modal.tsx +++ b/web/components/views/delete-view-modal.tsx @@ -6,7 +6,7 @@ import { Dialog, Transition } from "@headlessui/react"; import { IProjectView } from "@plane/types"; // ui import { Button, TOAST_TYPE, setToast } from "@plane/ui"; -import { E_VIEWS, VIEW_DELETED } from "constants/event-tracker"; +import { E_VIEWS, VIEW_DELETED } from "@/constants/event-tracker"; // hooks import { useProjectView, useEventTracker } from "@/hooks/store"; // types diff --git a/web/components/views/modal.tsx b/web/components/views/modal.tsx index 7ca1c3441..499250031 100644 --- a/web/components/views/modal.tsx +++ b/web/components/views/modal.tsx @@ -1,6 +1,6 @@ import { FC, Fragment } from "react"; -import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; +import { useRouter } from "next/router"; import { Dialog, Transition } from "@headlessui/react"; import { IProjectView } from "@plane/types"; // ui diff --git a/web/components/web-hooks/create-webhook-modal.tsx b/web/components/web-hooks/create-webhook-modal.tsx index 8ca272f75..614d8a6de 100644 --- a/web/components/web-hooks/create-webhook-modal.tsx +++ b/web/components/web-hooks/create-webhook-modal.tsx @@ -4,18 +4,18 @@ import { useRouter } from "next/router"; import { Dialog, Transition } from "@headlessui/react"; import { IWebhook, IWorkspace, TWebhookEventTypes } from "@plane/types"; import { TOAST_TYPE, setToast } from "@plane/ui"; -// hooks -import { useEventTracker } from "hooks/store"; -// components +// constants +import { WEBHOOK_CREATED } from "@/constants/event-tracker"; // helpers import { csvDownload } from "@/helpers/download.helper"; +// hooks +import { useEventTracker } from "@/hooks/store"; +// components // types import { WebhookForm } from "./form"; import { GeneratedHookDetails } from "./generated-hook-details"; // utils import { getCurrentHookAsCSV } from "./utils"; -// constants -import { WEBHOOK_CREATED } from "constants/event-tracker"; // ui interface ICreateWebhookModal { diff --git a/web/components/web-hooks/delete-webhook-modal.tsx b/web/components/web-hooks/delete-webhook-modal.tsx index 11279b650..8b3d5ef91 100644 --- a/web/components/web-hooks/delete-webhook-modal.tsx +++ b/web/components/web-hooks/delete-webhook-modal.tsx @@ -7,7 +7,7 @@ import { Button, TOAST_TYPE, setToast } from "@plane/ui"; // constants import { WEBHOOK_DELETED } from "@/constants/event-tracker"; // hooks -import { useWebhook } from "@/hooks/store"; +import { useWebhook, useEventTracker } from "@/hooks/store"; interface IDeleteWebhook { isOpen: boolean; diff --git a/web/layouts/auth-layout/project-wrapper.tsx b/web/layouts/auth-layout/project-wrapper.tsx index f2cfc5ac1..a01714ab2 100644 --- a/web/layouts/auth-layout/project-wrapper.tsx +++ b/web/layouts/auth-layout/project-wrapper.tsx @@ -24,7 +24,7 @@ import { // images import emptyProject from "public/empty-state/project.svg"; // constants -import { E_PAGES_EMPTY_STATE } from "constants/event-tracker"; +import { E_PAGES_EMPTY_STATE } from "@/constants/event-tracker"; interface IProjectAuthWrapper { children: ReactNode; diff --git a/web/lib/posthog-provider.tsx b/web/lib/posthog-provider.tsx index 8fd481f4d..b5733f73b 100644 --- a/web/lib/posthog-provider.tsx +++ b/web/lib/posthog-provider.tsx @@ -5,8 +5,6 @@ import { PostHogProvider as PHProvider } from "posthog-js/react"; import { IUser } from "@plane/types"; // constants import { GROUP_WORKSPACE } from "@/constants/event-tracker"; -// helpers -import { getUserRole } from "@/helpers/user.helper"; // types export interface IPosthogWrapper { diff --git a/web/pages/[workspaceSlug]/analytics.tsx b/web/pages/[workspaceSlug]/analytics.tsx index 8022df25c..db9b8a3c6 100644 --- a/web/pages/[workspaceSlug]/analytics.tsx +++ b/web/pages/[workspaceSlug]/analytics.tsx @@ -12,8 +12,8 @@ import { WorkspaceAnalyticsHeader } from "@/components/headers"; // type // constants import { ANALYTICS_TABS } from "@/constants/analytics"; -import { E_ANALYTICS_EMPTY_STATE } from "@/constants/event-tracker"; import { EmptyStateType } from "@/constants/empty-state" +import { E_ANALYTICS_EMPTY_STATE } from "@/constants/event-tracker"; import { useApplication, useEventTracker, useProject, useWorkspace } from "@/hooks/store"; import { AppLayout } from "@/layouts/app-layout"; import { NextPageWithLayout } from "@/lib/types"; diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx index 35cfc3ac3..f0c7bc070 100644 --- a/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx +++ b/web/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx @@ -16,9 +16,9 @@ import CyclesListMobileHeader from "@/components/cycles/cycles-list-mobile-heade import { EmptyState } from "@/components/empty-state"; import { CyclesHeader } from "@/components/headers"; import { CycleModuleBoardLayout, CycleModuleListLayout, GanttLayoutLoader } from "@/components/ui"; -import { E_CYCLES_EMPTY_STATE } from "@/constants/event-tracker"; import { CYCLE_TABS_LIST } from "@/constants/cycle"; import { EmptyStateType } from "@/constants/empty-state"; +import { E_CYCLES_EMPTY_STATE } from "@/constants/event-tracker"; import { calculateTotalFilters } from "@/helpers/filter.helper"; import { useEventTracker, useCycle, useProject, useCycleFilter } from "@/hooks/store"; // layouts