Make descriptions nullable
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<ac10f3fa76fc76951f4c08e38ef0a185>>
|
||||
* @generated SignedSource<<b39754dc6d5d5f02e4310f0db334add3>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ export type LinkedRisksDialogQuery$data = {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly description: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly inherentRiskScore: number;
|
||||
readonly name: string;
|
||||
|
||||
@@ -71,7 +71,7 @@ export const taskUpdateMutation = graphql`
|
||||
|
||||
const createTaskSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
description: z.string(),
|
||||
description: z.string().optional().nullable(),
|
||||
timeEstimate: z.string().optional().nullable(),
|
||||
assignedToId: z.preprocess(
|
||||
(val) => (val === "" || val == null ? undefined : val),
|
||||
@@ -86,7 +86,7 @@ const createTaskSchema = z.object({
|
||||
|
||||
const updateTaskSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
description: z.string(),
|
||||
description: z.string().optional().nullable(),
|
||||
timeEstimate: z.string().optional().nullable(),
|
||||
assignedToId: z.string().optional(),
|
||||
measureId: z.string().optional(),
|
||||
@@ -138,7 +138,7 @@ export default function TaskFormDialog(props: Props) {
|
||||
input: {
|
||||
taskId: task.id,
|
||||
name: data.name,
|
||||
description: data.description,
|
||||
description: data.description || null,
|
||||
timeEstimate: data.timeEstimate || null,
|
||||
deadline: formatDatetime(data.deadline) ?? null,
|
||||
},
|
||||
@@ -150,7 +150,7 @@ export default function TaskFormDialog(props: Props) {
|
||||
input: {
|
||||
organizationId,
|
||||
name: data.name,
|
||||
description: data.description,
|
||||
description: data.description || null,
|
||||
timeEstimate: data.timeEstimate || null,
|
||||
deadline: formatDatetime(data.deadline) ?? null,
|
||||
assignedToId: data.assignedToId,
|
||||
|
||||
@@ -38,7 +38,7 @@ type Props = {
|
||||
id: string;
|
||||
name: string;
|
||||
state: "TODO" | "DONE";
|
||||
description: string;
|
||||
description?: string | null;
|
||||
measure?: {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<beed7398f44a7093301b72d7bceeeba1>>
|
||||
* @generated SignedSource<<c196829e8365168f07614d741242296c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -13,7 +13,7 @@ import { FragmentRefs } from "relay-runtime";
|
||||
export type CreateTaskInput = {
|
||||
assignedToId?: string | null | undefined;
|
||||
deadline?: any | null | undefined;
|
||||
description: string;
|
||||
description?: string | null | undefined;
|
||||
measureId?: string | null | undefined;
|
||||
name: string;
|
||||
organizationId: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<d6d04868c777f81982de3bffb9a7e73f>>
|
||||
* @generated SignedSource<<1778d9b73cc75e2097e9c24fdfe83631>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -16,7 +16,7 @@ export type TaskFormDialogFragment$data = {
|
||||
readonly id: string;
|
||||
} | null | undefined;
|
||||
readonly deadline: any | null | undefined;
|
||||
readonly description: string;
|
||||
readonly description: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly measure: {
|
||||
readonly id: string;
|
||||
|
||||
@@ -32,7 +32,7 @@ export type TrustCenterReferenceDialogRef = {
|
||||
openEdit: (reference: {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
description?: string | null;
|
||||
websiteUrl: string;
|
||||
rank: number;
|
||||
}) => void;
|
||||
@@ -41,7 +41,7 @@ export type TrustCenterReferenceDialogRef = {
|
||||
type Reference = {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
description?: string | null;
|
||||
websiteUrl: string;
|
||||
rank: number;
|
||||
};
|
||||
@@ -90,7 +90,7 @@ export const TrustCenterReferenceDialog = forwardRef<TrustCenterReferenceDialogR
|
||||
setUploadedFile(null);
|
||||
reset({
|
||||
name: reference.name,
|
||||
description: reference.description,
|
||||
description: reference.description ?? undefined,
|
||||
websiteUrl: reference.websiteUrl,
|
||||
rank: reference.rank,
|
||||
});
|
||||
@@ -116,7 +116,7 @@ export const TrustCenterReferenceDialog = forwardRef<TrustCenterReferenceDialogR
|
||||
input: {
|
||||
trustCenterId,
|
||||
name: data.name,
|
||||
description: data.description,
|
||||
description: data.description || null,
|
||||
websiteUrl: data.websiteUrl,
|
||||
logoFile: null,
|
||||
},
|
||||
@@ -135,14 +135,14 @@ export const TrustCenterReferenceDialog = forwardRef<TrustCenterReferenceDialogR
|
||||
const input: {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
description: string | null;
|
||||
websiteUrl: string;
|
||||
rank?: number;
|
||||
logoFile?: null;
|
||||
} = {
|
||||
id: editReference.id,
|
||||
name: data.name,
|
||||
description: data.description,
|
||||
description: data.description || null,
|
||||
websiteUrl: data.websiteUrl,
|
||||
};
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ type Props = {
|
||||
type Reference = {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
description?: string | null;
|
||||
websiteUrl: string;
|
||||
logoUrl: string;
|
||||
rank: number;
|
||||
|
||||
Reference in New Issue
Block a user