Skip to content

Commit

Permalink
Merge pull request #37786 from Expensify/cmartins-fixDefaultAutoRepor…
Browse files Browse the repository at this point in the history
…tingFrequency

[CP Stag] Fix default autoreportingfrequency
  • Loading branch information
roryabraham authored Mar 5, 2024
2 parents 7a56d16 + d08d094 commit 4fdf17e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/actions/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ function setWorkspaceAutoReporting(policyID: string, enabled: boolean) {
harvesting: {
enabled: true,
},
autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.WEEKLY,
pendingFields: {isAutoApprovalEnabled: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE},
},
},
Expand All @@ -424,6 +425,7 @@ function setWorkspaceAutoReporting(policyID: string, enabled: boolean) {
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: {
autoReporting: !enabled,
autoReportingFrequency: null,
pendingFields: {isAutoApprovalEnabled: null, harvesting: null},
},
},
Expand Down

0 comments on commit 4fdf17e

Please sign in to comment.