@ -4,26 +4,26 @@ import { AppPath } from '@/types/AppPath';
|
|||||||
import { SettingsPath } from '@/types/SettingsPath';
|
import { SettingsPath } from '@/types/SettingsPath';
|
||||||
import { DefaultLayout } from '@/ui/layout/components/DefaultLayout';
|
import { DefaultLayout } from '@/ui/layout/components/DefaultLayout';
|
||||||
import { PageTitle } from '@/ui/utilities/page-title/PageTitle';
|
import { PageTitle } from '@/ui/utilities/page-title/PageTitle';
|
||||||
|
import { CommandMenuEffect } from '~/effect-components/CommandMenuEffect';
|
||||||
|
import { GotoHotkeysEffect } from '~/effect-components/GotoHotkeysEffect';
|
||||||
import { CreateProfile } from '~/pages/auth/CreateProfile';
|
import { CreateProfile } from '~/pages/auth/CreateProfile';
|
||||||
import { CreateWorkspace } from '~/pages/auth/CreateWorkspace';
|
import { CreateWorkspace } from '~/pages/auth/CreateWorkspace';
|
||||||
import { SignInUp } from '~/pages/auth/SignInUp';
|
import { SignInUp } from '~/pages/auth/SignInUp';
|
||||||
import { VerifyEffect } from '~/pages/auth/VerifyEffect';
|
import { VerifyEffect } from '~/pages/auth/VerifyEffect';
|
||||||
import { Companies } from '~/pages/companies/Companies';
|
import { Companies } from '~/pages/companies/Companies';
|
||||||
import { CompanyShow } from '~/pages/companies/CompanyShow';
|
import { CompanyShow } from '~/pages/companies/CompanyShow';
|
||||||
|
import { ImpersonateEffect } from '~/pages/impersonate/ImpersonateEffect';
|
||||||
|
import { NotFound } from '~/pages/not-found/NotFound';
|
||||||
import { Opportunities } from '~/pages/opportunities/Opportunities';
|
import { Opportunities } from '~/pages/opportunities/Opportunities';
|
||||||
import { People } from '~/pages/people/People';
|
import { People } from '~/pages/people/People';
|
||||||
import { PersonShow } from '~/pages/people/PersonShow';
|
import { PersonShow } from '~/pages/people/PersonShow';
|
||||||
import { SettingsExperience } from '~/pages/settings/SettingsExperience';
|
import { SettingsExperience } from '~/pages/settings/SettingsExperience';
|
||||||
|
import { SettingsObjects } from '~/pages/settings/SettingsObjects';
|
||||||
import { SettingsProfile } from '~/pages/settings/SettingsProfile';
|
import { SettingsProfile } from '~/pages/settings/SettingsProfile';
|
||||||
import { SettingsWorkspace } from '~/pages/settings/SettingsWorkspace';
|
import { SettingsWorkspace } from '~/pages/settings/SettingsWorkspace';
|
||||||
import { SettingsWorkspaceMembers } from '~/pages/settings/SettingsWorkspaceMembers';
|
import { SettingsWorkspaceMembers } from '~/pages/settings/SettingsWorkspaceMembers';
|
||||||
import { Tasks } from '~/pages/tasks/Tasks';
|
import { Tasks } from '~/pages/tasks/Tasks';
|
||||||
|
import { getPageTitleFromPath } from '~/utils/title-utils';
|
||||||
import { CommandMenuEffect } from './effect-components/CommandMenuEffect';
|
|
||||||
import { GotoHotkeysEffect } from './effect-components/GotoHotkeysEffect';
|
|
||||||
import { ImpersonateEffect } from './pages/impersonate/ImpersonateEffect';
|
|
||||||
import { NotFound } from './pages/not-found/NotFound';
|
|
||||||
import { getPageTitleFromPath } from './utils/title-utils';
|
|
||||||
|
|
||||||
export const App = () => {
|
export const App = () => {
|
||||||
const { pathname } = useLocation();
|
const { pathname } = useLocation();
|
||||||
@ -71,6 +71,10 @@ export const App = () => {
|
|||||||
path={SettingsPath.Workspace}
|
path={SettingsPath.Workspace}
|
||||||
element={<SettingsWorkspace />}
|
element={<SettingsWorkspace />}
|
||||||
/>
|
/>
|
||||||
|
<Route
|
||||||
|
path={SettingsPath.Objects}
|
||||||
|
element={<SettingsObjects />}
|
||||||
|
/>
|
||||||
</Routes>
|
</Routes>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { useAuth } from '@/auth/hooks/useAuth';
|
|||||||
import { AppPath } from '@/types/AppPath';
|
import { AppPath } from '@/types/AppPath';
|
||||||
import {
|
import {
|
||||||
IconColorSwatch,
|
IconColorSwatch,
|
||||||
|
IconHierarchy2,
|
||||||
IconLogout,
|
IconLogout,
|
||||||
IconSettings,
|
IconSettings,
|
||||||
IconUserCircle,
|
IconUserCircle,
|
||||||
@ -72,6 +73,17 @@ export const SettingsNavbar = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<NavItem
|
||||||
|
label="Data model"
|
||||||
|
to="/settings/objects"
|
||||||
|
Icon={IconHierarchy2}
|
||||||
|
active={
|
||||||
|
!!useMatch({
|
||||||
|
path: useResolvedPath('/settings/objects').pathname,
|
||||||
|
end: true,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/>
|
||||||
<NavTitle label="Other" />
|
<NavTitle label="Other" />
|
||||||
<NavItem label="Logout" onClick={handleLogout} Icon={IconLogout} />
|
<NavItem label="Logout" onClick={handleLogout} Icon={IconLogout} />
|
||||||
</SubMenuNavbar>
|
</SubMenuNavbar>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
export enum SettingsPath {
|
export enum SettingsPath {
|
||||||
ProfilePage = 'profile',
|
ProfilePage = 'profile',
|
||||||
Experience = 'profile/experience',
|
Experience = 'profile/experience',
|
||||||
|
Objects = 'objects',
|
||||||
WorkspaceMembersPage = 'workspace-members',
|
WorkspaceMembersPage = 'workspace-members',
|
||||||
Workspace = 'workspace',
|
Workspace = 'workspace',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,6 +43,7 @@ export {
|
|||||||
IconHeart,
|
IconHeart,
|
||||||
IconHeartOff,
|
IconHeartOff,
|
||||||
IconHelpCircle,
|
IconHelpCircle,
|
||||||
|
IconHierarchy2,
|
||||||
IconInbox,
|
IconInbox,
|
||||||
IconLayoutKanban,
|
IconLayoutKanban,
|
||||||
IconLayoutSidebarLeftCollapse,
|
IconLayoutSidebarLeftCollapse,
|
||||||
|
|||||||
18
front/src/pages/settings/SettingsObjects.tsx
Normal file
18
front/src/pages/settings/SettingsObjects.tsx
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import styled from '@emotion/styled';
|
||||||
|
|
||||||
|
import { IconSettings } from '@/ui/icon';
|
||||||
|
import { SubMenuTopBarContainer } from '@/ui/layout/components/SubMenuTopBarContainer';
|
||||||
|
import { H1Title } from '@/ui/typography/components/H1Title';
|
||||||
|
|
||||||
|
const StyledContainer = styled.div`
|
||||||
|
padding: ${({ theme }) => theme.spacing(8)};
|
||||||
|
width: 350px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const SettingsObjects = () => (
|
||||||
|
<SubMenuTopBarContainer Icon={IconSettings} title="Settings">
|
||||||
|
<StyledContainer>
|
||||||
|
<H1Title title="Objects" />
|
||||||
|
</StyledContainer>
|
||||||
|
</SubMenuTopBarContainer>
|
||||||
|
);
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
import { Meta, StoryObj } from '@storybook/react';
|
||||||
|
import { within } from '@storybook/testing-library';
|
||||||
|
|
||||||
|
import {
|
||||||
|
PageDecorator,
|
||||||
|
type PageDecoratorArgs,
|
||||||
|
} from '~/testing/decorators/PageDecorator';
|
||||||
|
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||||
|
import { sleep } from '~/testing/sleep';
|
||||||
|
|
||||||
|
import { SettingsObjects } from '../SettingsObjects';
|
||||||
|
|
||||||
|
const meta: Meta<PageDecoratorArgs> = {
|
||||||
|
title: 'Pages/Settings/SettingsObjects',
|
||||||
|
component: SettingsObjects,
|
||||||
|
decorators: [PageDecorator],
|
||||||
|
args: { routePath: '/settings/objects' },
|
||||||
|
parameters: {
|
||||||
|
docs: { story: 'inline', iframeHeight: '500px' },
|
||||||
|
msw: graphqlMocks,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default meta;
|
||||||
|
|
||||||
|
export type Story = StoryObj<typeof SettingsObjects>;
|
||||||
|
|
||||||
|
export const Default: Story = {
|
||||||
|
play: async ({ canvasElement }) => {
|
||||||
|
const canvas = within(canvasElement);
|
||||||
|
|
||||||
|
await sleep(1000);
|
||||||
|
|
||||||
|
await canvas.getByRole('heading', {
|
||||||
|
level: 2,
|
||||||
|
name: 'Objects',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
@ -6,6 +6,7 @@ import {
|
|||||||
type PageDecoratorArgs,
|
type PageDecoratorArgs,
|
||||||
} from '~/testing/decorators/PageDecorator';
|
} from '~/testing/decorators/PageDecorator';
|
||||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||||
|
import { sleep } from '~/testing/sleep';
|
||||||
|
|
||||||
import { SettingsWorkspaceMembers } from '../SettingsWorkspaceMembers';
|
import { SettingsWorkspaceMembers } from '../SettingsWorkspaceMembers';
|
||||||
|
|
||||||
@ -27,6 +28,9 @@ export type Story = StoryObj<typeof SettingsWorkspaceMembers>;
|
|||||||
export const Default: Story = {
|
export const Default: Story = {
|
||||||
play: async ({ canvasElement }) => {
|
play: async ({ canvasElement }) => {
|
||||||
const canvas = within(canvasElement);
|
const canvas = within(canvasElement);
|
||||||
await canvas.findByText('Copy link');
|
|
||||||
|
await sleep(1000);
|
||||||
|
|
||||||
|
await canvas.getByRole('button', { name: 'Copy link' });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user