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,6 +1150,7 @@ 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 */}
<Protected permission="admin:debug">
<Button <Button
variant="outline" variant="outline"
onClick={aiValidation.showCurrentPrompt} onClick={aiValidation.showCurrentPrompt}
@@ -1158,6 +1160,7 @@ const ValidationContainer = <T extends string>({
<FileText className="h-4 w-4" /> <FileText className="h-4 w-4" />
Show Prompt Show Prompt
</Button> </Button>
</Protected>
{/* AI Validate Button */} {/* AI Validate Button */}
<Button <Button