🚧 create policy form

This commit is contained in:
Fred KISSIE
2026-02-18 05:08:27 +01:00
parent 7177ab7f77
commit e409a34a09
3 changed files with 644 additions and 4 deletions

View File

@@ -1,7 +1,11 @@
import { CreatePolicyForm } from "@app/components/CreatePolicyForm";
import SettingsSectionTitle from "@app/components/SettingsSectionTitle";
import { Button } from "@app/components/ui/button";
import { getCachedOrg } from "@app/lib/api/getCachedOrg";
import OrgProvider from "@app/providers/OrgProvider";
import type { GetOrgResponse } from "@server/routers/org";
import { getTranslations } from "next-intl/server";
import Link from "next/link";
import { redirect } from "next/navigation";
export interface CreateResourcePolicyPageProps {
@@ -23,10 +27,22 @@ export default async function CreateResourcePolicyPage(
}
return (
<>
<SettingsSectionTitle
title={t("resourcePoliciesCreate")}
description={t("resourcePoliciesCreateDescription")}
/>
<div className="flex justify-between">
<SettingsSectionTitle
title={t("resourcePoliciesCreate")}
description={t("resourcePoliciesCreateDescription")}
/>
<Button asChild variant="outline">
<Link href={`/${params.orgId}/settings/resources/policies`}>
{t("policiesSeeAll")}
</Link>
</Button>
</div>
<OrgProvider org={org}>
<CreatePolicyForm />
</OrgProvider>
</>
);
}