Switch create/update url segments to new/edit
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -160,7 +160,7 @@ export function OrganizationSwitcher({
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem asChild>
|
||||
<Link
|
||||
to="/organizations/create"
|
||||
to="/organizations/new"
|
||||
className="gap-2 p-2 cursor-pointer"
|
||||
>
|
||||
<div className="flex size-6 items-center justify-center rounded-md border bg-background">
|
||||
|
||||
@@ -64,7 +64,7 @@ export default function OrganizationSelectionPage() {
|
||||
<CardFooter>
|
||||
<Button
|
||||
className="w-full"
|
||||
onClick={() => navigate("/organizations/create")}
|
||||
onClick={() => navigate("/organizations/new")}
|
||||
>
|
||||
<Plus className="mr-2 h-4 w-4" /> Create Organization
|
||||
</Button>
|
||||
@@ -116,7 +116,7 @@ export default function OrganizationSelectionPage() {
|
||||
<Button
|
||||
variant="outline"
|
||||
className="w-full"
|
||||
onClick={() => navigate("/organizations/create")}
|
||||
onClick={() => navigate("/organizations/new")}
|
||||
>
|
||||
<Plus className="mr-2 h-4 w-4" /> Create Organization
|
||||
</Button>
|
||||
|
||||
@@ -69,12 +69,12 @@ export default function NoOrganizationLayout() {
|
||||
<Routes>
|
||||
<Route path="*" element={<BreadcrumbHome />}>
|
||||
<Route
|
||||
path="create"
|
||||
path="new"
|
||||
element={
|
||||
<>
|
||||
<BreadcrumbSeparator />
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbPage>Create Organization</BreadcrumbPage>
|
||||
<BreadcrumbPage>New Organization</BreadcrumbPage>
|
||||
</BreadcrumbItem>
|
||||
</>
|
||||
}
|
||||
|
||||
@@ -463,9 +463,9 @@ export function BreadCrumb() {
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route path="update" element={<Edit />} />
|
||||
<Route path="edit" element={<Edit />} />
|
||||
</Route>
|
||||
<Route path="create" element={<New />} />
|
||||
<Route path="new" element={<New />} />
|
||||
</Route>
|
||||
<Route path="people" element={<BreadcrumbPeopleList />}>
|
||||
<Route
|
||||
@@ -476,7 +476,7 @@ export function BreadCrumb() {
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route path="create" element={<New />} />
|
||||
<Route path="new" element={<New />} />
|
||||
</Route>
|
||||
<Route path="vendors" element={<BreadcrumbVendorList />}>
|
||||
<Route
|
||||
@@ -497,9 +497,9 @@ export function BreadCrumb() {
|
||||
</Suspense>
|
||||
}
|
||||
>
|
||||
<Route path="update" element={<Edit />} />
|
||||
<Route path="edit" element={<Edit />} />
|
||||
</Route>
|
||||
<Route path="create" element={<New />} />
|
||||
<Route path="new" element={<New />} />
|
||||
</Route>
|
||||
<Route
|
||||
path="settings"
|
||||
@@ -516,7 +516,7 @@ export function BreadCrumb() {
|
||||
|
||||
<Route path="*" element={<BreadcrumbHome />}>
|
||||
<Route
|
||||
path="create"
|
||||
path="new"
|
||||
element={
|
||||
<>
|
||||
<BreadcrumbSeparator />
|
||||
|
||||
@@ -34,17 +34,17 @@ export function OrganizationsRoutes() {
|
||||
<Route path=":organizationId/*" element={<OrganizationLayout />}>
|
||||
<Route index element={<HomePage />} />
|
||||
<Route path="people" element={<PeopleListPage />} />
|
||||
<Route path="people/create" element={<CreatePeoplePage />} />
|
||||
<Route path="people/new" element={<CreatePeoplePage />} />
|
||||
<Route path="people/:peopleId" element={<PeoplePage />} />
|
||||
<Route path="vendors" element={<VendorListPage />} />
|
||||
<Route path="frameworks" element={<FrameworkListPage />} />
|
||||
<Route path="frameworks/create" element={<CreateFrameworkPage />} />
|
||||
<Route path="frameworks/new" element={<CreateFrameworkPage />} />
|
||||
<Route path="frameworks/:frameworkId/*">
|
||||
<Route element={<FrameworkLayout />}>
|
||||
<Route index element={<FrameworkPage />} />
|
||||
<Route path="controls/:controlId" element={<ControlPage />} />
|
||||
</Route>
|
||||
<Route path="update" element={<UpdateFrameworkPage />} />
|
||||
<Route path="edit" element={<UpdateFrameworkPage />} />
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Route>
|
||||
<Route path="mitigations" element={<MitigationListPage />} />
|
||||
@@ -56,12 +56,9 @@ export function OrganizationsRoutes() {
|
||||
/>
|
||||
<Route path="vendors/:vendorId" element={<VendorPage />} />
|
||||
<Route path="policies" element={<PolicyListPage />} />
|
||||
<Route path="policies/create" element={<CreatePolicyPage />} />
|
||||
<Route path="policies/new" element={<CreatePolicyPage />} />
|
||||
<Route path="policies/:policyId" element={<PolicyPage />} />
|
||||
<Route
|
||||
path="policies/:policyId/update"
|
||||
element={<UpdatePolicyPage />}
|
||||
/>
|
||||
<Route path="policies/:policyId/edit" element={<UpdatePolicyPage />} />
|
||||
<Route path="risks" element={<RiskListPage />} />
|
||||
<Route path="risks/new" element={<NewRiskPage />} />
|
||||
<Route path="risks/:riskId" element={<ShowRiskView />} />
|
||||
@@ -70,7 +67,7 @@ export function OrganizationsRoutes() {
|
||||
</Route>
|
||||
|
||||
<Route path="*" element={<NoOrganizationLayout />}>
|
||||
<Route path="create" element={<CreateOrganizationPage />} />
|
||||
<Route path="new" element={<CreateOrganizationPage />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
);
|
||||
|
||||
@@ -147,7 +147,7 @@ function FrameworkListViewContent({
|
||||
Import Framework
|
||||
</Button>
|
||||
<Button asChild>
|
||||
<Link to={`/organizations/${organizationId}/frameworks/create`}>
|
||||
<Link to={`/organizations/${organizationId}/frameworks/new`}>
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
Create Framework
|
||||
</Link>
|
||||
|
||||
@@ -185,7 +185,7 @@ function PeopleListContent({
|
||||
style={{ borderRadius: "0.5rem" }}
|
||||
className="gap-2"
|
||||
>
|
||||
<Link to={`/organizations/${organizationId}/people/create`}>
|
||||
<Link to={`/organizations/${organizationId}/people/new`}>
|
||||
<UserPlus className="h-4 w-4" />
|
||||
Add a person
|
||||
</Link>
|
||||
|
||||
@@ -225,7 +225,7 @@ function PolicyListViewContent({
|
||||
description="Manage your organization's policies"
|
||||
actions={
|
||||
<Button asChild>
|
||||
<Link to={`/organizations/${organizationId}/policies/create`}>
|
||||
<Link to={`/organizations/${organizationId}/policies/new`}>
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
Create Policy
|
||||
</Link>
|
||||
@@ -335,7 +335,7 @@ function PolicyListViewContent({
|
||||
</Button>
|
||||
) : (
|
||||
<Button asChild>
|
||||
<Link to={`/organizations/${organizationId}/policies/create`}>
|
||||
<Link to={`/organizations/${organizationId}/policies/new`}>
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
Create Policy
|
||||
</Link>
|
||||
|
||||
@@ -178,7 +178,7 @@ function PolicyViewContent({
|
||||
<div className="flex gap-2">
|
||||
<Button variant="outline" size="sm" asChild>
|
||||
<Link
|
||||
to={`/organizations/${organizationId}/policies/${policy.id}/update`}
|
||||
to={`/organizations/${organizationId}/policies/${policy.id}/edit`}
|
||||
>
|
||||
<Edit className="h-4 w-4 mr-2" />
|
||||
Edit
|
||||
@@ -357,7 +357,7 @@ function PolicyViewContent({
|
||||
|
||||
<Button asChild className="w-full">
|
||||
<Link
|
||||
to={`/organizations/${organizationId}/policies/${policy.id}/update`}
|
||||
to={`/organizations/${organizationId}/policies/${policy.id}/edit`}
|
||||
>
|
||||
<Edit className="mr-2 h-4 w-4" />
|
||||
Edit Policy
|
||||
|
||||
Reference in New Issue
Block a user