From 9f32c056a7d11f6ab27e853b3387ea9098376d49 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Fri, 19 Apr 2024 17:41:14 +0200 Subject: [PATCH 1/3] fix: observation field in requirement assessment --- frontend/src/lib/utils/schemas.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/utils/schemas.ts b/frontend/src/lib/utils/schemas.ts index 90fdc861e..457f2e03c 100644 --- a/frontend/src/lib/utils/schemas.ts +++ b/frontend/src/lib/utils/schemas.ts @@ -1,3 +1,4 @@ +import { observation } from '$paraglide/messages'; import { z, type AnyZodObject } from 'zod'; const toArrayPreprocessor = (value: unknown) => { @@ -156,7 +157,8 @@ export const RequirementAssessmentSchema = z.object({ requirement: z.string(), evidences: z.string().uuid().optional().array(), compliance_assessment: z.string(), - applied_controls: z.string().uuid().optional().array() + applied_controls: z.string().uuid().optional().array(), + observation: z.string().optional().nullable() }); export const UserEditSchema = z.object({ From f99aed96cce97fb1a35a4e1aff98e88dc2e90ac1 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Fri, 19 Apr 2024 17:42:05 +0200 Subject: [PATCH 2/3] chore: remove useless import --- frontend/src/lib/utils/schemas.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/lib/utils/schemas.ts b/frontend/src/lib/utils/schemas.ts index 457f2e03c..4fda8f3d9 100644 --- a/frontend/src/lib/utils/schemas.ts +++ b/frontend/src/lib/utils/schemas.ts @@ -1,4 +1,3 @@ -import { observation } from '$paraglide/messages'; import { z, type AnyZodObject } from 'zod'; const toArrayPreprocessor = (value: unknown) => { From 6f271e578d7fbd2fa1c260d3f4dfda8d4be18e5b Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Fri, 19 Apr 2024 18:16:44 +0200 Subject: [PATCH 3/3] fix: some fields in threat and reference control --- frontend/src/lib/components/Forms/ModelForm.svelte | 1 + frontend/src/lib/utils/schemas.ts | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/Forms/ModelForm.svelte b/frontend/src/lib/components/Forms/ModelForm.svelte index 39c325b04..bda9e89bd 100644 --- a/frontend/src/lib/components/Forms/ModelForm.svelte +++ b/frontend/src/lib/components/Forms/ModelForm.svelte @@ -283,6 +283,7 @@ field="category" label={m.category()} /> +