From 6e49c7c73022040a0259c34768d5ea63f3362a7f Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Wed, 21 Feb 2024 07:47:17 -0700 Subject: [PATCH 1/2] update customUnit and customUnitRate types --- src/types/onyx/Policy.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types/onyx/Policy.ts b/src/types/onyx/Policy.ts index 7d4c08374b81..5a1eddefa5dc 100644 --- a/src/types/onyx/Policy.ts +++ b/src/types/onyx/Policy.ts @@ -11,6 +11,7 @@ type Rate = { customUnitRateID?: string; errors?: OnyxCommon.Errors; pendingAction?: OnyxCommon.PendingAction; + enabled: boolean; }; type Attributes = { @@ -22,6 +23,8 @@ type CustomUnit = { customUnitID: string; attributes: Attributes; rates: Record; + defaultCategory: string; + enabled: boolean; pendingAction?: OnyxCommon.PendingAction; errors?: OnyxCommon.Errors; }; From 566c0e87be9e30c884e6edbc3bcf93f32b2bca10 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Wed, 21 Feb 2024 07:54:28 -0700 Subject: [PATCH 2/2] make them optional --- src/types/onyx/Policy.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/types/onyx/Policy.ts b/src/types/onyx/Policy.ts index 5a1eddefa5dc..ad3235d4eea4 100644 --- a/src/types/onyx/Policy.ts +++ b/src/types/onyx/Policy.ts @@ -11,7 +11,7 @@ type Rate = { customUnitRateID?: string; errors?: OnyxCommon.Errors; pendingAction?: OnyxCommon.PendingAction; - enabled: boolean; + enabled?: boolean; }; type Attributes = { @@ -23,8 +23,8 @@ type CustomUnit = { customUnitID: string; attributes: Attributes; rates: Record; - defaultCategory: string; - enabled: boolean; + defaultCategory?: string; + enabled?: boolean; pendingAction?: OnyxCommon.PendingAction; errors?: OnyxCommon.Errors; };