Prevent uploads and edits for validated documents

Disable file uploads and editing functionality for documents that have been validated or are marked as verified in the system.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/7eY9Hl8
This commit is contained in:
michaelschal committed 2025-09-09 05:46:50 +00:00
1 parent 45772a4fe0
commit 7e432483db
2 files changed
+3401 -3

No files matched your search

File diff suppressed because it is too large. Load diff
+3 -3
View File
@@ -1048,8 +1048,8 @@ export default function Avoirs() {
</td>
<td className="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<div className="flex items-center space-x-2">
{/* Upload pour avoirs "Reçu" - interdit aux managers */}
{avoir?.status === 'Reçu' && (user as any)?.role !== 'manager' && (
{/* Upload pour avoirs "Reçu" - interdit aux managers et avoirs validés */}
{avoir?.status === 'Reçu' && (user as any)?.role !== 'manager' && !avoir.nocodbVerified && (
<Button
variant="outline"
size="sm"
@@ -1100,7 +1100,7 @@ export default function Avoirs() {
</Button>
)}
{canEditDelete && (
{canEditDelete && !avoir.nocodbVerified && (
<>
<Button
variant="outline"