Make descriptions nullable
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<828d1e2364b7b8c540508d9fb7104b06>>
|
||||
* @generated SignedSource<<759f9a511cc5c589b3ac366de83adbfe>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -13,7 +13,7 @@ export type RiskTreatment = "ACCEPTED" | "AVOIDED" | "MITIGATED" | "TRANSFERRED"
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type useRiskFormFragment$data = {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly description: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly inherentImpact: number;
|
||||
readonly inherentLikelihood: number;
|
||||
|
||||
@@ -34,7 +34,7 @@ export type RiskKey = useRiskFormFragment$key & { id: string };
|
||||
export const riskSchema = z.object({
|
||||
category: z.string().min(1, "Category is required"),
|
||||
name: z.string().min(1, "Name is required"),
|
||||
description: z.string().min(1, "Description is required"),
|
||||
description: z.string().optional().nullable(),
|
||||
ownerId: z.string().min(1, "Owner is required"),
|
||||
treatment: z.enum(["AVOIDED", "MITIGATED", "TRANSFERRED", "ACCEPTED"]),
|
||||
inherentLikelihood: z.number({ coerce: true }).min(1).max(5),
|
||||
@@ -50,6 +50,7 @@ export const useRiskForm = (riskKey?: RiskKey) => {
|
||||
defaultValues: risk
|
||||
? {
|
||||
...risk,
|
||||
description: risk.description ?? undefined,
|
||||
ownerId: risk.owner?.id,
|
||||
}
|
||||
: {
|
||||
|
||||
@@ -9,7 +9,7 @@ import { useEffect, useMemo } from "react";
|
||||
|
||||
const schema = z.object({
|
||||
name: z.string().min(1, "Name is required"),
|
||||
description: z.string().min(1, "Description is required"),
|
||||
description: z.string().optional().nullable(),
|
||||
category: z.string().nullish(),
|
||||
statusPageUrl: z.string().optional(),
|
||||
termsOfServiceUrl: z.string().optional(),
|
||||
@@ -106,6 +106,7 @@ export function useVendorForm(vendorKey: useVendorFormFragment$key) {
|
||||
input: {
|
||||
id: vendor.id,
|
||||
...data,
|
||||
description: data.description || null,
|
||||
},
|
||||
},
|
||||
}).then(() => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<0e6281a892cbd711d75d22153d4710ea>>
|
||||
* @generated SignedSource<<54b072cf5a78b17f86e5fc810cac517a>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -25,7 +25,7 @@ export type FrameworkGraphControlNodeQuery$data = {
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly description?: string;
|
||||
readonly description?: string | null | undefined;
|
||||
readonly documents?: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<1f413a42110dae78274cf3250fa4db4e>>
|
||||
* @generated SignedSource<<02c0b1d637edafea060ddb9ee3b3f130>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ export type MeasureGraphNodeQuery$data = {
|
||||
readonly controlsInfos?: {
|
||||
readonly totalCount: number;
|
||||
};
|
||||
readonly description?: string;
|
||||
readonly description?: string | null | undefined;
|
||||
readonly evidencesInfos?: {
|
||||
readonly totalCount: number;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<f3eadb5ecfeb7b2304712f74b6ac8863>>
|
||||
* @generated SignedSource<<36175d4a9f9c3b377ec502f518a47015>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ export type RiskGraphNodeQuery$data = {
|
||||
readonly controlsInfo?: {
|
||||
readonly totalCount: number;
|
||||
};
|
||||
readonly description?: string;
|
||||
readonly description?: string | null | undefined;
|
||||
readonly documentsInfo?: {
|
||||
readonly totalCount: number;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<285497dfb150c3f02c055a091769f301>>
|
||||
* @generated SignedSource<<bfffdd69a2b1f565b60beee5e96d430a>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -58,7 +58,7 @@ export type TrustCenterGraphQuery$data = {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly createdAt: any;
|
||||
readonly description: string;
|
||||
readonly description: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly logoUrl: string;
|
||||
readonly name: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<9d17f089c36e0567d217fe339b6382fd>>
|
||||
* @generated SignedSource<<566b652d24d80b551827cb5d3bf5518c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateTrustCenterReferenceInput = {
|
||||
description: string;
|
||||
description?: string | null | undefined;
|
||||
logoFile: any;
|
||||
name: string;
|
||||
trustCenterId: string;
|
||||
@@ -26,7 +26,7 @@ export type TrustCenterReferenceGraphCreateMutation$data = {
|
||||
readonly cursor: any;
|
||||
readonly node: {
|
||||
readonly createdAt: any;
|
||||
readonly description: string;
|
||||
readonly description: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly logoUrl: string;
|
||||
readonly name: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<85556d15b776b3e61e312057a994d482>>
|
||||
* @generated SignedSource<<e7776b4ead5bff52ce340c208ec5bbc6>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ export type TrustCenterReferenceGraphQuery$data = {
|
||||
readonly cursor: any;
|
||||
readonly node: {
|
||||
readonly createdAt: any;
|
||||
readonly description: string;
|
||||
readonly description: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly logoUrl: string;
|
||||
readonly name: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<9f21158abea504110ef50d4e0114a56a>>
|
||||
* @generated SignedSource<<2b51f7fdbc055d912be03031b258c042>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ export type TrustCenterReferenceGraphUpdateMutation$data = {
|
||||
readonly updateTrustCenterReference: {
|
||||
readonly trustCenterReference: {
|
||||
readonly createdAt: any;
|
||||
readonly description: string;
|
||||
readonly description: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly logoUrl: string;
|
||||
readonly name: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<4b559d5e004d1657ab8d52cf5770ac79>>
|
||||
* @generated SignedSource<<53e0a105a9b28a70a1083500cd6b4577>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -17,7 +17,7 @@ export type usePaginatedMeasuresFragment$data = {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly description: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: MeasureState;
|
||||
|
||||
Reference in New Issue
Block a user