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 { useProductLinesFetching } from '../hooks/useProductLinesFetching'
import UpcValidationTableAdapter from './UpcValidationTableAdapter' import UpcValidationTableAdapter from './UpcValidationTableAdapter'
import { Skeleton } from '@/components/ui/skeleton' import { Skeleton } from '@/components/ui/skeleton'
import { Protected } from '@/components/auth/Protected'
/** /**
* ValidationContainer component - the main wrapper for the validation step * 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"> <div className="flex items-center gap-2">
{/* Show Prompt Button */} {/* Show Prompt Button */}
<Button <Protected permission="admin:debug">
variant="outline" <Button
onClick={aiValidation.showCurrentPrompt} variant="outline"
disabled={aiValidation.isAiValidating} onClick={aiValidation.showCurrentPrompt}
className="flex items-center gap-1" disabled={aiValidation.isAiValidating}
> className="flex items-center gap-1"
<FileText className="h-4 w-4" /> >
Show Prompt <FileText className="h-4 w-4" />
</Button> Show Prompt
</Button>
</Protected>
{/* AI Validate Button */} {/* AI Validate Button */}
<Button <Button