diff --git a/src/CONST.ts b/src/CONST.ts index dbf80c6929de..fdd18f714ca2 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1302,6 +1302,14 @@ const CONST = { LAST_BUSINESS_DAY_OF_MONTH: 'lastBusinessDayOfMonth', LAST_DAY_OF_MONTH: 'lastDayOfMonth', }, + APPROVAL_MODE: { + OPTIONAL: 'OPTIONAL', + BASIC: 'BASIC', + ADVANCED: 'ADVANCED', + DYNAMICEXTERNAL: 'DYNAMIC_EXTERNAL', + SMARTREPORT: 'SMARTREPORT', + BILLCOM: 'BILLCOM', + }, ROOM_PREFIX: '#', CUSTOM_UNIT_RATE_BASE_OFFSET: 100, OWNER_EMAIL_FAKE: '_FAKE_', diff --git a/src/types/onyx/Policy.ts b/src/types/onyx/Policy.ts index 97e6597c6444..2d8bbb7924bd 100644 --- a/src/types/onyx/Policy.ts +++ b/src/types/onyx/Policy.ts @@ -118,6 +118,9 @@ type Policy = { /** Informative messages about which policy members were added with primary logins when invited with their secondary login */ primaryLoginsInvited?: Record; + + /** The approval mode set up on this policy */ + approvalMode?: ValueOf; }; export default Policy; diff --git a/tests/utils/LHNTestUtils.js b/tests/utils/LHNTestUtils.js index 67831bd32bca..6c72558e5df3 100644 --- a/tests/utils/LHNTestUtils.js +++ b/tests/utils/LHNTestUtils.js @@ -262,6 +262,7 @@ function getFakePolicy(id = 1, name = 'Workspace-Test-001') { submitsTo: 123456, defaultBillable: false, disabledFields: {defaultBillable: true, reimbursable: false}, + approvalMode: 'BASIC', }; } diff --git a/tests/utils/collections/policies.ts b/tests/utils/collections/policies.ts index acdd22253173..8547c171c7a7 100644 --- a/tests/utils/collections/policies.ts +++ b/tests/utils/collections/policies.ts @@ -26,5 +26,6 @@ export default function createRandomPolicy(index: number): Policy { errors: {}, customUnits: {}, errorFields: {}, + approvalMode: rand(Object.values(CONST.POLICY.APPROVAL_MODE)), }; }