Fix validations for empty vendor descriptions and notes

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-11-06 15:38:18 +01:00
parent d95786b0e6
commit a79da81ff6
2 changed files with 2 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ const createRiskAssessmentMutation = graphql`
const schema = z.object({ const schema = z.object({
dataSensitivity: z.enum(["NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]), dataSensitivity: z.enum(["NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL"]),
businessImpact: z.enum(["LOW", "MEDIUM", "HIGH", "CRITICAL"]), businessImpact: z.enum(["LOW", "MEDIUM", "HIGH", "CRITICAL"]),
notes: z.string().optional(), notes: z.string().nullable().optional(),
}); });
/** /**
@@ -76,6 +76,7 @@ export function CreateRiskAssessmentDialog({
variables: { variables: {
input: { input: {
...data, ...data,
notes: data.notes || null,
vendorId, vendorId,
expiresAt: nextYear.toISOString(), expiresAt: nextYear.toISOString(),
}, },

View File

@@ -36,7 +36,6 @@ export function CreateVendorDialog({
? { ? {
organizationId, organizationId,
name: vendor, name: vendor,
description: "",
category: null, category: null,
} }
: { : {