Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set optimistic policy creation with "Instant submit" #43273

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/libs/actions/Policy/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,7 @@ function createDraftInitialWorkspace(policyOwnerEmail = '', policyName = '', pol
customUnits,
makeMeAdmin,
autoReporting: true,
autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT,
employeeList: {
[sessionEmail]: {
role: CONST.POLICY.ROLE.ADMIN,
Expand Down Expand Up @@ -1574,6 +1575,7 @@ function buildPolicyData(policyOwnerEmail = '', makeMeAdmin = false, policyName
outputCurrency,
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
autoReporting: true,
autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT,
approvalMode: CONST.POLICY.APPROVAL_MODE.OPTIONAL,
harvesting: {
enabled: true,
Expand Down Expand Up @@ -1837,6 +1839,7 @@ function createDraftWorkspace(policyOwnerEmail = '', makeMeAdmin = false, policy
outputCurrency,
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
autoReporting: true,
autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT,
approvalMode: CONST.POLICY.APPROVAL_MODE.OPTIONAL,
harvesting: {
enabled: true,
Expand Down Expand Up @@ -2109,6 +2112,7 @@ function createWorkspaceFromIOUPayment(iouReport: Report | EmptyObject): string
outputCurrency: CONST.CURRENCY.USD,
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
autoReporting: true,
autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT,
approvalMode: CONST.POLICY.APPROVAL_MODE.OPTIONAL,
harvesting: {
enabled: true,
Expand Down
Loading