From 8474ee0f80c0263299dc7a25f7650af0059554da Mon Sep 17 00:00:00 2001 From: Kirill Date: Sun, 24 May 2026 17:04:31 +0500 Subject: [PATCH] debug: add console logging to handleStatusClick and updateMutation onError --- .../admin-test-checklist/ui/AdminTestChecklistPage.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/pages/admin-test-checklist/ui/AdminTestChecklistPage.tsx b/client/src/pages/admin-test-checklist/ui/AdminTestChecklistPage.tsx index 368ff1f..d0156cf 100644 --- a/client/src/pages/admin-test-checklist/ui/AdminTestChecklistPage.tsx +++ b/client/src/pages/admin-test-checklist/ui/AdminTestChecklistPage.tsx @@ -85,6 +85,9 @@ export function AdminTestChecklistPage() { onSuccess: () => { queryClient.invalidateQueries({ queryKey: ['admin', 'test-checklist'] }) }, + onError: (error) => { + console.warn('updateTestChecklistItem error:', error) + }, }) const resetMutation = useMutation({ @@ -112,15 +115,14 @@ export function AdminTestChecklistPage() { const handleStatusClick = useCallback( (itemKey: string) => { + console.warn('handleStatusClick:', itemKey, results[itemKey]) const current = statusFromResult(results[itemKey]) + console.warn('current status:', current) if (current === 'failed') { - // Clicking on failed → reset to unchecked updateMutation.mutate({ itemKey, passed: false, comment: null }) } else if (current === 'unchecked') { - // Clicking on unchecked → mark as passed updateMutation.mutate({ itemKey, passed: true }) } else { - // Clicking on passed → open error dialog setErrorItemKey(itemKey) setErrorComment('') setErrorCommentError(false)