Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions src/libs/actions/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,12 @@ function createWorkspace(policyOwnerEmail = '', makeMeAdmin = false, policyName
outputCurrency,
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
customUnits,
areCategoriesEnabled: true,
areTagsEnabled: false,
areDistanceRatesEnabled: false,
areWorkflowsEnabled: false,
areReportFieldsEnabled: false,
areConnectionsEnabled: false,
},
},
{
Expand Down Expand Up @@ -1803,6 +1809,12 @@ function createWorkspaceFromIOUPayment(iouReport: Report | EmptyObject): string
outputCurrency: CONST.CURRENCY.USD,
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
customUnits,
areCategoriesEnabled: true,
areTagsEnabled: false,
areDistanceRatesEnabled: false,
areWorkflowsEnabled: false,
areReportFieldsEnabled: false,
areConnectionsEnabled: false,
};

const optimisticData: OnyxUpdate[] = [
Expand Down
18 changes: 18 additions & 0 deletions src/types/onyx/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,24 @@ type Policy = OnyxCommon.OnyxValueWithOfflineFeedback<

/** All the integration connections attached to the policy */
connections?: Record<string, Connection>;

/** Whether the Categories feature is enabled */
areCategoriesEnabled?: boolean;

/** Whether the Tags feature is enabled */
areTagsEnabled?: boolean;

/** Whether the Distance Rates feature is enabled */
areDistanceRatesEnabled?: boolean;

/** Whether the workflows feature is enabled */
areWorkflowsEnabled?: boolean;

/** Whether the Report Fields feature is enabled */
areReportFieldsEnabled?: boolean;

/** Whether the Connections feature is enabled */
areConnectionsEnabled?: boolean;
},
'generalSettings' | 'addWorkspaceRoom'
>;
Expand Down