diff --git a/src/CONST.ts b/src/CONST.ts index 652a38200ab1..23957827d140 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -478,21 +478,21 @@ const CONST = { ACTIONS: { LIMIT: 50, TYPE: { - APPROVED: 'APPROVED', ADDCOMMENT: 'ADDCOMMENT', + APPROVED: 'APPROVED', + CHRONOSOOOLIST: 'CHRONOSOOOLIST', CLOSED: 'CLOSED', CREATED: 'CREATED', - SUBMITTED: 'SUBMITTED', - TASKEDITED: 'TASKEDITED', - TASKCANCELLED: 'TASKCANCELLED', IOU: 'IOU', MODIFIEDEXPENSE: 'MODIFIEDEXPENSE', REIMBURSEMENTQUEUED: 'REIMBURSEMENTQUEUED', RENAMED: 'RENAMED', - CHRONOSOOOLIST: 'CHRONOSOOOLIST', + REPORTPREVIEW: 'REPORTPREVIEW', + SUBMITTED: 'SUBMITTED', + TASKCANCELLED: 'TASKCANCELLED', TASKCOMPLETED: 'TASKCOMPLETED', + TASKEDITED: 'TASKEDITED', TASKREOPENED: 'TASKREOPENED', - REPORTPREVIEW: 'REPORTPREVIEW', POLICYCHANGELOG: { ADD_APPROVER_RULE: 'POLICYCHANGELOG_ADD_APPROVER_RULE', ADD_CATEGORY: 'POLICYCHANGELOG_ADD_CATEGORY', @@ -1172,6 +1172,14 @@ const CONST = { AUDITOR: 'auditor', USER: 'user', }, + AUTO_REPORTING_FREQUENCIES: { + IMMEDIATE: 'immediate', + WEEKLY: 'weekly', + SEMI_MONTHLY: 'semimonthly', + MONTHLY: 'monthly', + TRIP: 'trip', + MANUAL: 'manual', + }, ROOM_PREFIX: '#', CUSTOM_UNIT_RATE_BASE_OFFSET: 100, OWNER_EMAIL_FAKE: '_FAKE_', diff --git a/src/types/onyx/OriginalMessage.ts b/src/types/onyx/OriginalMessage.ts index 143b70127de5..e03775ee114e 100644 --- a/src/types/onyx/OriginalMessage.ts +++ b/src/types/onyx/OriginalMessage.ts @@ -53,6 +53,10 @@ type OriginalMessageAddComment = { reactions?: Reaction[]; }; }; +type OriginalMessageSubmitted = { + actionName: typeof CONST.REPORT.ACTIONS.TYPE.SUBMITTED; + originalMessage: unknown; +}; type OriginalMessageClosed = { actionName: typeof CONST.REPORT.ACTIONS.TYPE.CLOSED; @@ -127,6 +131,7 @@ type OriginalMessagePolicyTask = { type OriginalMessage = | OriginalMessageIOU | OriginalMessageAddComment + | OriginalMessageSubmitted | OriginalMessageClosed | OriginalMessageCreated | OriginalMessageRenamed diff --git a/src/types/onyx/Policy.ts b/src/types/onyx/Policy.ts index df4a1364a894..12b4cb92024e 100644 --- a/src/types/onyx/Policy.ts +++ b/src/types/onyx/Policy.ts @@ -47,6 +47,12 @@ type Policy = { /** Whether policy expense chats can be created and used on this policy. Enabled manually by CQ/JS snippet. Always true for free policies. */ isPolicyExpenseChatEnabled: boolean; + + /** Whether the scheduled submit is enabled */ + autoReporting: boolean; + + /** The scheduled submit frequency set up on the this policy */ + autoReportingFrequency: ValueOf; }; export default Policy;