Skip to content

Commit

Permalink
add file and currency parameter.
Browse files Browse the repository at this point in the history
Signed-off-by: krishna2323 <[email protected]>
  • Loading branch information
Krishna2323 committed Nov 25, 2024
1 parent cf5608e commit 53d7650
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/libs/API/parameters/CreateWorkspaceParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ type CreateWorkspaceParams = {
customUnitID: string;
customUnitRateID: string;
engagementChoice?: string;
currency: string;
file?: File;
};

export default CreateWorkspaceParams;
4 changes: 3 additions & 1 deletion src/libs/actions/Policy/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,7 @@ function buildPolicyData(
owner: sessionEmail,
ownerAccountID: sessionAccountID,
isPolicyExpenseChatEnabled: true,
outputCurrency: currency || outputCurrency,
outputCurrency,
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
autoReporting: true,
autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT,
Expand Down Expand Up @@ -1854,6 +1854,8 @@ function buildPolicyData(
customUnitID,
customUnitRateID,
engagementChoice,
currency: outputCurrency,
file,
};

return {successData, optimisticData, failureData, params};
Expand Down
3 changes: 1 addition & 2 deletions src/pages/workspace/WorkspacesListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import Navigation from '@libs/Navigation/Navigation';
import * as PolicyUtils from '@libs/PolicyUtils';
import * as ReportUtils from '@libs/ReportUtils';
import type {AvatarSource} from '@libs/UserUtils';
import * as App from '@userActions/App';
import * as Policy from '@userActions/Policy/Policy';
import * as Session from '@userActions/Session';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -368,7 +367,7 @@ function WorkspacesListPage() {
accessibilityLabel={translate('workspace.new.newWorkspace')}
success
text={translate('workspace.new.newWorkspace')}
onPress={() => interceptAnonymousUser(() => App.createWorkspaceWithPolicyDraftAndNavigateToIt())}
onPress={() => interceptAnonymousUser(() => Navigation.navigate(ROUTES.WORKSPACE_CONFIRMATION))}
icon={Expensicons.Plus}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
/>
Expand Down

0 comments on commit 53d7650

Please sign in to comment.