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:
Kanav Arora 2023-10-24 21:43:22 +05:30 committed by GitHub
parent 20f5b9def7
commit 0b33880cc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 0 deletions

View File

@ -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>
}
/>

View File

@ -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',

View File

@ -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>
);
};