Skip to content

Commit 7ef29c3

Browse files
committed
refactor(app): update policy editor to check version read-only state
1 parent 2d3fa3c commit 7ef29c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • apps/app/src/app/(app)/[orgId]/policies/[policyId]/editor/components

apps/app/src/app/(app)/[orgId]/policies/[policyId]/editor/components/PolicyDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ export function PolicyContentManager({
825825
Create new version
826826
</Button>
827827
)}
828-
{!isPendingApproval && aiAssistantEnabled && activeTab === 'EDITOR' && (
828+
{!isPendingApproval && !isVersionReadOnly && aiAssistantEnabled && activeTab === 'EDITOR' && (
829829
<Button
830830
variant={showAiAssistant ? 'default' : 'outline'}
831831
size="default"
@@ -875,7 +875,7 @@ export function PolicyContentManager({
875875
</Stack>
876876
</div>
877877

878-
{aiAssistantEnabled && showAiAssistant && activeTab === 'EDITOR' && (
878+
{aiAssistantEnabled && showAiAssistant && !isVersionReadOnly && activeTab === 'EDITOR' && (
879879
<div className="flex-[3] min-w-0 self-stretch">
880880
<PolicyAiAssistant
881881
messages={messages}

0 commit comments

Comments
 (0)