From 919676f2639ffe433811b324c8fa2c392d33df37 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 25 Jan 2024 12:47:21 -0700 Subject: [PATCH 1/3] update policy types --- src/types/onyx/Policy.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/types/onyx/Policy.ts b/src/types/onyx/Policy.ts index 2d8bbb7924bd..c01b09274555 100644 --- a/src/types/onyx/Policy.ts +++ b/src/types/onyx/Policy.ts @@ -121,6 +121,27 @@ type Policy = { /** The approval mode set up on this policy */ approvalMode?: ValueOf; + + /** Whether transactions should be billable by default */ + defaultBillable?: boolean; + + /** The workspace description */ + description?: string; + + /** List of field names that are disabled */ + disabledFields?: Record; + + /** Whether new transactions need to be tagged */ + requiresTag?: boolean; + + /** Whether new transactions need to be categorized */ + requiresCategory?: boolean; + + /** Whether the workspace has multiple levels of tags enabled */ + hasMultipleTagLists?: boolean; + + /** When tax tracking is enabled */ + isTaxTrackingEnabled?: boolean; }; export default Policy; From 7fa54c3826c8bdf5f366d6d787d4e8c89608b1a0 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 25 Jan 2024 12:56:12 -0700 Subject: [PATCH 2/3] update disabled fields --- src/types/onyx/Policy.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/types/onyx/Policy.ts b/src/types/onyx/Policy.ts index c01b09274555..0daf0b1275b8 100644 --- a/src/types/onyx/Policy.ts +++ b/src/types/onyx/Policy.ts @@ -26,6 +26,11 @@ type CustomUnit = { errors?: OnyxCommon.Errors; }; +type DisabledFields = { + defaultBillable?: boolean; + reimbursable?: boolean; +} + type AutoReportingOffset = number | ValueOf; type Policy = { @@ -129,7 +134,7 @@ type Policy = { description?: string; /** List of field names that are disabled */ - disabledFields?: Record; + disabledFields?: DisabledFields; /** Whether new transactions need to be tagged */ requiresTag?: boolean; From a58f90f8b05841dfc87ce16836a6460b0da622f9 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 25 Jan 2024 13:02:42 -0700 Subject: [PATCH 3/3] fix style --- src/types/onyx/Policy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/onyx/Policy.ts b/src/types/onyx/Policy.ts index 0daf0b1275b8..eca7e9d1ee06 100644 --- a/src/types/onyx/Policy.ts +++ b/src/types/onyx/Policy.ts @@ -29,7 +29,7 @@ type CustomUnit = { type DisabledFields = { defaultBillable?: boolean; reimbursable?: boolean; -} +}; type AutoReportingOffset = number | ValueOf;