mirror of
https://github.com/twentyhq/twenty.git
synced 2025-01-07 09:17:31 +03:00
feat(frontend): Object Field Edit page created (#2218)
* feat(frontend): Object Field Edit page created * fix(frontend): PR requested changes done
This commit is contained in:
parent
20f5b9def7
commit
0b33880cc9
@ -32,6 +32,7 @@ import { Tasks } from '~/pages/tasks/Tasks';
|
||||
import { getPageTitleFromPath } from '~/utils/title-utils';
|
||||
|
||||
import { ObjectTablePage } from './modules/metadata/components/ObjectTablePage';
|
||||
import { SettingsObjectFieldEdit } from './pages/settings/data-model/SettingsObjectFieldEdit';
|
||||
import { SettingsObjectNewFieldStep1 } from './pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep1';
|
||||
import { SettingsObjectNewFieldStep2 } from './pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2';
|
||||
|
||||
@ -126,6 +127,10 @@ export const App = () => {
|
||||
path={SettingsPath.ObjectNewFieldStep2}
|
||||
element={<SettingsObjectNewFieldStep2 />}
|
||||
/>
|
||||
<Route
|
||||
path={SettingsPath.ObjectFieldEdit}
|
||||
element={<SettingsObjectFieldEdit />}
|
||||
/>
|
||||
</Routes>
|
||||
}
|
||||
/>
|
||||
|
@ -6,6 +6,7 @@ export enum SettingsPath {
|
||||
ObjectEdit = 'objects/:pluralObjectName/edit',
|
||||
ObjectNewFieldStep1 = 'objects/:pluralObjectName/new-field/step-1',
|
||||
ObjectNewFieldStep2 = 'objects/:pluralObjectName/new-field/step-2',
|
||||
ObjectFieldEdit = 'objects/:pluralObjectName/:fieldName',
|
||||
NewObject = 'objects/new',
|
||||
WorkspaceMembersPage = 'workspace-members',
|
||||
Workspace = 'workspace',
|
||||
|
@ -0,0 +1,31 @@
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
import { SettingsHeaderContainer } from '@/settings/components/SettingsHeaderContainer';
|
||||
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
|
||||
import { IconSettings } from '@/ui/display/icon';
|
||||
import { SubMenuTopBarContainer } from '@/ui/layout/page/SubMenuTopBarContainer';
|
||||
import { Breadcrumb } from '@/ui/navigation/bread-crumb/components/Breadcrumb';
|
||||
|
||||
export const SettingsObjectFieldEdit = () => {
|
||||
const { pluralObjectName = '', fieldName = '' } = useParams();
|
||||
return (
|
||||
<SubMenuTopBarContainer Icon={IconSettings} title="Settings">
|
||||
<SettingsPageContainer>
|
||||
<SettingsHeaderContainer>
|
||||
<Breadcrumb
|
||||
links={[
|
||||
{ children: 'Objects', href: '/settings/objects' },
|
||||
{
|
||||
children: `${pluralObjectName}`,
|
||||
href: `/settings/objects/${pluralObjectName}`,
|
||||
},
|
||||
{
|
||||
children: `${fieldName}`,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</SettingsHeaderContainer>
|
||||
</SettingsPageContainer>
|
||||
</SubMenuTopBarContainer>
|
||||
);
|
||||
};
|
Loading…
Reference in New Issue
Block a user