From 19dd5f213c773d3f0f9b3de8685d6d501852de49 Mon Sep 17 00:00:00 2001 From: Kirill Date: Sun, 24 May 2026 16:53:59 +0500 Subject: [PATCH] feat: add comment to test-checklist API client types and function --- .../entities/test-checklist/api/test-checklist-api.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/entities/test-checklist/api/test-checklist-api.ts b/client/src/entities/test-checklist/api/test-checklist-api.ts index 8e8a5f3..988ccbd 100644 --- a/client/src/entities/test-checklist/api/test-checklist-api.ts +++ b/client/src/entities/test-checklist/api/test-checklist-api.ts @@ -2,6 +2,7 @@ import { apiClient } from '@/shared/api/client' export type ChecklistResultDto = { passed: boolean + comment: string | null checkedAt: string } @@ -12,6 +13,7 @@ export type TestChecklistResponse = { export type UpdateChecklistItemResponse = { itemKey: string passed: boolean + comment: string | null checkedAt: string } @@ -20,10 +22,15 @@ export async function fetchTestChecklistResults(): Promise { +export async function updateTestChecklistItem( + itemKey: string, + passed: boolean, + comment?: string | null, +): Promise { const { data } = await apiClient.patch<{ result: UpdateChecklistItemResponse }>('admin/test-checklist', { itemKey, passed, + comment: passed ? null : comment ?? null, }) return data.result }