1 Commits

Author SHA1 Message Date
d60a8cbc6e Hide debug components without permission 2025-03-23 22:06:51 -04:00

View File

@@ -18,6 +18,7 @@ import { useUpcValidation } from '../hooks/useUpcValidation'
import { useProductLinesFetching } from '../hooks/useProductLinesFetching'
import UpcValidationTableAdapter from './UpcValidationTableAdapter'
import { Skeleton } from '@/components/ui/skeleton'
import { Protected } from '@/components/auth/Protected'
/**
* ValidationContainer component - the main wrapper for the validation step
*
@@ -1149,15 +1150,17 @@ const ValidationContainer = <T extends string>({
)}
<div className="flex items-center gap-2">
{/* Show Prompt Button */}
<Button
variant="outline"
onClick={aiValidation.showCurrentPrompt}
disabled={aiValidation.isAiValidating}
className="flex items-center gap-1"
>
<FileText className="h-4 w-4" />
Show Prompt
</Button>
<Protected permission="admin:debug">
<Button
variant="outline"
onClick={aiValidation.showCurrentPrompt}
disabled={aiValidation.isAiValidating}
className="flex items-center gap-1"
>
<FileText className="h-4 w-4" />
Show Prompt
</Button>
</Protected>
{/* AI Validate Button */}
<Button