From dfe5f1c5562ecc14b45f51e8fda34430b73d66cf Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Mon, 18 Dec 2023 17:39:48 +0100 Subject: [PATCH] add submits to prop to Policy ts --- src/types/onyx/Policy.ts | 3 +++ tests/utils/LHNTestUtils.js | 1 + tests/utils/collections/policies.ts | 1 + 3 files changed, 5 insertions(+) diff --git a/src/types/onyx/Policy.ts b/src/types/onyx/Policy.ts index a55a7c052b01..77c77edae829 100644 --- a/src/types/onyx/Policy.ts +++ b/src/types/onyx/Policy.ts @@ -74,6 +74,9 @@ type Policy = { /** The scheduled submit frequency set up on the this policy */ autoReportingFrequency: ValueOf; + /** The accountID of manager who the employee submits their expenses to on paid policies */ + submitsTo?: number; + /** The employee list of the policy */ employeeList?: []; }; diff --git a/tests/utils/LHNTestUtils.js b/tests/utils/LHNTestUtils.js index 8385b3fd3e4b..a80feae730c6 100644 --- a/tests/utils/LHNTestUtils.js +++ b/tests/utils/LHNTestUtils.js @@ -256,6 +256,7 @@ function getFakePolicy(id = 1, name = 'Workspace-Test-001') { lastModified: 1697323926777105, autoReporting: true, autoReportingFrequency: 'immediate', + submitsTo: 123456, defaultBillable: false, disabledFields: {defaultBillable: true, reimbursable: false}, }; diff --git a/tests/utils/collections/policies.ts b/tests/utils/collections/policies.ts index 266c8bba2d72..6ac247072514 100644 --- a/tests/utils/collections/policies.ts +++ b/tests/utils/collections/policies.ts @@ -11,6 +11,7 @@ export default function createRandomPolicy(index: number): Policy { autoReporting: randBoolean(), isPolicyExpenseChatEnabled: randBoolean(), autoReportingFrequency: rand(Object.values(CONST.POLICY.AUTO_REPORTING_FREQUENCIES)), + submitsTo: index, outputCurrency: randCurrencyCode(), role: rand(Object.values(CONST.POLICY.ROLE)), owner: randEmail(),