From de5b60907be7447c76fd4f2af7ab2ca513885a2d Mon Sep 17 00:00:00 2001 From: tlartem Date: Sun, 27 Jul 2025 08:25:21 +0300 Subject: [PATCH] =?UTF-8?q?fix=20=D0=B0=D1=82=D1=80=D0=B8=D0=B1=D1=83?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/api/templateApiService.ts | 4 ++ .../template/model/TemplateContext.tsx | 30 ++++++++++--- src/page/TemplatesOverviewPage.tsx | 42 +++++++++++++------ 3 files changed, 57 insertions(+), 19 deletions(-) diff --git a/src/entitiy/template/api/templateApiService.ts b/src/entitiy/template/api/templateApiService.ts index 6fbb555..b58e097 100644 --- a/src/entitiy/template/api/templateApiService.ts +++ b/src/entitiy/template/api/templateApiService.ts @@ -2,6 +2,10 @@ export interface CreateTemplateInput { name: string description?: string elements: Record + attributes?: Array<{ + attribute_id: string + value: string | null + }> } export interface CreateTemplateOutput { diff --git a/src/entitiy/template/model/TemplateContext.tsx b/src/entitiy/template/model/TemplateContext.tsx index f9be20a..cc4070c 100644 --- a/src/entitiy/template/model/TemplateContext.tsx +++ b/src/entitiy/template/model/TemplateContext.tsx @@ -28,7 +28,8 @@ interface TemplateContextType { error: Error | null refetchTemplates: () => void addTemplate: ( - data: Omit + data: Omit, + attributes?: Array<{ attributeId: string; value: string | null }> ) => Promise