Fix validations for empty vendor descriptions and notes
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -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(),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ export function CreateVendorDialog({
|
|||||||
? {
|
? {
|
||||||
organizationId,
|
organizationId,
|
||||||
name: vendor,
|
name: vendor,
|
||||||
description: "",
|
|
||||||
category: null,
|
category: null,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
|
|||||||
Reference in New Issue
Block a user