The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Reorganize files properly (#14262)
martmull7c195b3bfd0d
diff --git a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsxindex 0f207290d69..b30c958871e 100644--- a/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx+++ b/packages/twenty-front/src/modules/app/components/SettingsRoutes.tsx@@ -125,11 +125,17 @@ const SettingsWorkspace = lazy(() =>);const SettingsDomains = lazy(() =>- import('~/pages/settings/domains').then((module) => ({+ import('~/pages/settings/domains/SettingsDomains').then((module) => ({default: module.SettingsDomains,})),);+const SettingsDomain = lazy(() =>+ import('~/pages/settings/domains/SettingsDomain').then((module) => ({+ default: module.SettingsDomain,+ })),+);+const SettingsApiWebhooks = lazy(() =>import('~/pages/settings/workspace/SettingsApiWebhooks').then((module) => ({default: module.SettingsApiWebhooks,@@ -148,12 +154,6 @@ const SettingsAgentForm = lazy(() =>})),);-const SettingsDomain = lazy(() =>- import('~/pages/settings/workspace/SettingsDomain').then((module) => ({- default: module.SettingsDomain,- })),-);-const SettingsWorkspaceMembers = lazy(() =>import('~/pages/settings/SettingsWorkspaceMembers').then((module) => ({default: module.SettingsWorkspaceMembers,diff --git a/packages/twenty-front/src/pages/settings/workspace/CheckCustomDomainValidRecordsEffect.tsx b/packages/twenty-front/src/modules/settings/domains/CheckCustomDomainValidRecordsEffect.tsxsimilarity index 77%rename from packages/twenty-front/src/pages/settings/workspace/CheckCustomDomainValidRecordsEffect.tsxrename to packages/twenty-front/src/modules/settings/domains/CheckCustomDomainValidRecordsEffect.tsxindex 3e9195ef57e..0e4e579bf62 100644--- a/packages/twenty-front/src/pages/settings/workspace/CheckCustomDomainValidRecordsEffect.tsx+++ b/packages/twenty-front/src/modules/settings/domains/CheckCustomDomainValidRecordsEffect.tsx@@ -1,6 +1,6 @@/* @license Enterprise */-import { useCheckCustomDomainValidRecords } from '~/pages/settings/workspace/hooks/useCheckCustomDomainValidRecords';import { useEffect } from 'react';+import { useCheckCustomDomainValidRecords } from '@/settings/domains/hooks/useCheckCustomDomainValidRecords';export const CheckCustomDomainValidRecordsEffect = () => {const { checkCustomDomainRecords } = useCheckCustomDomainValidRecords();diff --git a/packages/twenty-front/src/pages/settings/workspace/SettingsCustomDomain.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsxsimilarity index 87%rename from packages/twenty-front/src/pages/settings/workspace/SettingsCustomDomain.tsxrename to packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsxindex 05973873a44..80c37e24abc 100644--- a/packages/twenty-front/src/pages/settings/workspace/SettingsCustomDomain.tsx+++ b/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomain.tsx@@ -8,10 +8,10 @@ import { useRecoilValue } from 'recoil';import { H2Title, IconReload, IconTrash } from 'twenty-ui/display';import { Button, ButtonGroup } from 'twenty-ui/input';import { Section } from 'twenty-ui/layout';-import { CheckCustomDomainValidRecordsEffect } from '~/pages/settings/workspace/CheckCustomDomainValidRecordsEffect';-import { SettingsCustomDomainRecords } from '~/pages/settings/workspace/SettingsCustomDomainRecords';-import { useCheckCustomDomainValidRecords } from '~/pages/settings/workspace/hooks/useCheckCustomDomainValidRecords';-import { customDomainRecordsState } from '~/pages/settings/workspace/states/customDomainRecordsState';+import { SettingsCustomDomainRecords } from '@/settings/domains/components/SettingsCustomDomainRecords';+import { CheckCustomDomainValidRecordsEffect } from '@/settings/domains/CheckCustomDomainValidRecordsEffect';+import { useCheckCustomDomainValidRecords } from '@/settings/domains/hooks/useCheckCustomDomainValidRecords';+import { customDomainRecordsState } from '@/settings/domains/states/customDomainRecordsState';const StyledDomainFormWrapper = styled.div`display: flex;diff --git a/packages/twenty-front/src/pages/settings/workspace/SettingsCustomDomainRecords.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomainRecords.tsxsimilarity index 97%rename from packages/twenty-front/src/pages/settings/workspace/SettingsCustomDomainRecords.tsxrename to packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomainRecords.tsxindex c3c4f0148ab..a13aa151c59 100644--- a/packages/twenty-front/src/pages/settings/workspace/SettingsCustomDomainRecords.tsx+++ b/packages/twenty-front/src/modules/settings/domains/components/SettingsCustomDomainRecords.tsx@@ -13,10 +13,10 @@ import {import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';import { capitalize } from 'twenty-shared/utils';import { useRecoilValue } from 'recoil';-import { customDomainRecordsState } from '~/pages/settings/workspace/states/customDomainRecordsState';import { type ThemeColor } from 'twenty-ui/theme';import { Status } from 'twenty-ui/display';import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';+import { customDomainRecordsState } from '@/settings/domains/states/customDomainRecordsState';const StyledTable = styled(Table)`border-bottom: 1px solid ${({ theme }) => theme.border.color.light};diff --git a/packages/twenty-front/src/pages/settings/workspace/SettingsSubdomain.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingsSubdomain.tsxsimilarity index 100%rename from packages/twenty-front/src/pages/settings/workspace/SettingsSubdomain.tsxrename to packages/twenty-front/src/modules/settings/domains/components/SettingsSubdomain.tsxdiff --git a/packages/twenty-front/src/pages/settings/domains/components/SettingsWorkspaceDomainCard.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingsWorkspaceDomainCard.tsxsimilarity index 100%rename from packages/twenty-front/src/pages/settings/domains/components/SettingsWorkspaceDomainCard.tsxrename to packages/twenty-front/src/modules/settings/domains/components/SettingsWorkspaceDomainCard.tsxdiff --git a/packages/twenty-front/src/pages/settings/workspace/hooks/useCheckCustomDomainValidRecords.ts b/packages/twenty-front/src/modules/settings/domains/hooks/useCheckCustomDomainValidRecords.tssimilarity index 92%rename from packages/twenty-front/src/pages/settings/workspace/hooks/useCheckCustomDomainValidRecords.tsrename to packages/twenty-front/src/modules/settings/domains/hooks/useCheckCustomDomainValidRecords.tsindex 4c5fcf9db12..78d66ff963e 100644--- a/packages/twenty-front/src/pages/settings/workspace/hooks/useCheckCustomDomainValidRecords.ts+++ b/packages/twenty-front/src/modules/settings/domains/hooks/useCheckCustomDomainValidRecords.ts@@ -1,8 +1,8 @@-import { customDomainRecordsState } from '~/pages/settings/workspace/states/customDomainRecordsState';import { useCheckCustomDomainValidRecordsMutation } from '~/generated-metadata/graphql';import { useSetRecoilState } from 'recoil';import { isDefined } from 'twenty-shared/utils';import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';+import { customDomainRecordsState } from '@/settings/domains/states/customDomainRecordsState';export const useCheckCustomDomainValidRecords = () => {const [checkCustomDomainValidRecords] =diff --git a/packages/twenty-front/src/pages/settings/workspace/states/customDomainRecordsState.ts b/packages/twenty-front/src/modules/settings/domains/states/customDomainRecordsState.tssimilarity index 100%rename from packages/twenty-front/src/pages/settings/workspace/states/customDomainRecordsState.tsrename to packages/twenty-front/src/modules/settings/domains/states/customDomainRecordsState.tsdiff --git a/packages/twenty-front/src/modules/types/SettingsPath.ts b/packages/twenty-front/src/modules/types/SettingsPath.tsindex 98c1d678fa6..908d93df7b1 100644--- a/packages/twenty-front/src/modules/types/SettingsPath.ts+++ b/packages/twenty-front/src/modules/types/SettingsPath.ts@@ -21,8 +21,9 @@ export enum SettingsPath {ServerlessFunctionDetail = 'functions/:serverlessFunctionId',WorkspaceMembersPage = 'members',Workspace = 'general',- Domain = 'general/domain',Domains = 'domains',+ Domain = 'domains/domain',+ NewApprovedAccessDomain = 'domains/approved-access-domain/new',Releases = 'releases',AI = 'ai',AINewAgent = 'ai/new-agent',@@ -42,7 +43,6 @@ export enum SettingsPath {IntegrationNewDatabaseConnection = 'integrations/:databaseKey/new',Security = 'security',NewSSOIdentityProvider = 'security/sso/new',- NewApprovedAccessDomain = 'security/approved-access-domain/new',AdminPanel = 'admin-panel',AdminPanelHealthStatus = 'admin-panel#health-status',diff --git a/packages/twenty-front/src/pages/settings/workspace/SettingsDomain.tsx b/packages/twenty-front/src/pages/settings/domains/SettingsDomain.tsxsimilarity index 97%rename from packages/twenty-front/src/pages/settings/workspace/SettingsDomain.tsxrename to packages/twenty-front/src/pages/settings/domains/SettingsDomain.tsxindex 15f92f1fd8a..13cc4a31e7c 100644--- a/packages/twenty-front/src/pages/settings/workspace/SettingsDomain.tsx+++ b/packages/twenty-front/src/pages/settings/domains/SettingsDomain.tsx@@ -19,8 +19,8 @@ import { isDefined } from 'twenty-shared/utils';import { z } from 'zod';import { useUpdateWorkspaceMutation } from '~/generated-metadata/graphql';import { useNavigateSettings } from '~/hooks/useNavigateSettings';-import { SettingsCustomDomain } from '~/pages/settings/workspace/SettingsCustomDomain';-import { SettingsSubdomain } from '~/pages/settings/workspace/SettingsSubdomain';+import { SettingsCustomDomain } from '@/settings/domains/components/SettingsCustomDomain';+import { SettingsSubdomain } from '@/settings/domains/components/SettingsSubdomain';import { getSettingsPath } from '~/utils/navigation/getSettingsPath';export const SUBDOMAIN_CHANGE_CONFIRMATION_MODAL_ID =diff --git a/packages/twenty-front/src/pages/settings/domains/SettingsDomains.tsx b/packages/twenty-front/src/pages/settings/domains/SettingsDomains.tsxindex 96a4fdbd37e..7563bc42670 100644--- a/packages/twenty-front/src/pages/settings/domains/SettingsDomains.tsx+++ b/packages/twenty-front/src/pages/settings/domains/SettingsDomains.tsx@@ -8,7 +8,7 @@ import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBaimport { H2Title } from 'twenty-ui/display';import { Section } from 'twenty-ui/layout';import { getSettingsPath } from '~/utils/navigation/getSettingsPath';-import { SettingsWorkspaceDomainCard } from './components';+import { SettingsWorkspaceDomainCard } from '@/settings/domains/components/SettingsWorkspaceDomainCard';const StyledMainContent = styled.div`display: flex;diff --git a/packages/twenty-front/src/pages/settings/domains/components/index.ts b/packages/twenty-front/src/pages/settings/domains/components/index.tsdeleted file mode 100644index 1d79856ba45..00000000000--- a/packages/twenty-front/src/pages/settings/domains/components/index.ts+++ /dev/null@@ -1 +0,0 @@-export { SettingsWorkspaceDomainCard } from './SettingsWorkspaceDomainCard';diff --git a/packages/twenty-front/src/pages/settings/domains/index.ts b/packages/twenty-front/src/pages/settings/domains/index.tsdeleted file mode 100644index b2acb9460ce..00000000000--- a/packages/twenty-front/src/pages/settings/domains/index.ts+++ /dev/null@@ -1 +0,0 @@-export { SettingsDomains } from './SettingsDomains';