@@ -155,7 +155,6 @@ type BuildPolicyDataOptions = {
155155 shouldAddOnboardingTasks ?: boolean ;
156156 companySize ?: OnboardingCompanySize ;
157157 userReportedIntegration ?: OnboardingAccounting ;
158- isAnnualSubscription ?: boolean ;
159158 featuresMap ?: Feature [ ] ;
160159 lastUsedPaymentMethod ?: LastPaymentMethodType ;
161160} ;
@@ -1849,9 +1848,8 @@ function buildOptimisticDistanceRateCustomUnits(reportCurrency?: string): Optimi
18491848 * @param [makeMeAdmin] leave the calling account as an admin on the policy
18501849 * @param [currency] Optional, selected currency for the workspace
18511850 * @param [file], avatar file for workspace
1852- * @param [isAnnualSubscription] Optional, does user have an annual subscription
18531851 */
1854- function createDraftInitialWorkspace ( policyOwnerEmail = '' , policyName = '' , policyID = generatePolicyID ( ) , makeMeAdmin = false , currency = '' , file ?: File , isAnnualSubscription = false ) {
1852+ function createDraftInitialWorkspace ( policyOwnerEmail = '' , policyName = '' , policyID = generatePolicyID ( ) , makeMeAdmin = false , currency = '' , file ?: File ) {
18551853 const workspaceName = policyName || generateDefaultWorkspaceName ( policyOwnerEmail ) ;
18561854 const { customUnits, outputCurrency} = buildOptimisticDistanceRateCustomUnits ( currency ) ;
18571855 const shouldEnableWorkflowsByDefault =
@@ -1863,15 +1861,15 @@ function createDraftInitialWorkspace(policyOwnerEmail = '', policyName = '', pol
18631861 key : `${ ONYXKEYS . COLLECTION . POLICY_DRAFTS } ${ policyID } ` ,
18641862 value : {
18651863 id : policyID ,
1866- type : isAnnualSubscription ? CONST . POLICY . TYPE . CORPORATE : CONST . POLICY . TYPE . TEAM ,
1864+ type : CONST . POLICY . TYPE . TEAM ,
18671865 name : workspaceName ,
18681866 role : CONST . POLICY . ROLE . ADMIN ,
18691867 owner : sessionEmail ,
18701868 ownerAccountID : sessionAccountID ,
18711869 isPolicyExpenseChatEnabled : true ,
18721870 areCategoriesEnabled : true ,
18731871 approver : sessionEmail ,
1874- areCompanyCardsEnabled : ! isAnnualSubscription ,
1872+ areCompanyCardsEnabled : true ,
18751873 areExpensifyCardsEnabled : false ,
18761874 outputCurrency,
18771875 pendingAction : CONST . RED_BRICK_ROAD_PENDING_ACTION . ADD ,
@@ -1935,7 +1933,6 @@ function buildPolicyData(options: BuildPolicyDataOptions = {}) {
19351933 shouldAddOnboardingTasks = true ,
19361934 companySize,
19371935 userReportedIntegration,
1938- isAnnualSubscription = false ,
19391936 featuresMap,
19401937 lastUsedPaymentMethod,
19411938 } = options ;
@@ -1969,7 +1966,7 @@ function buildPolicyData(options: BuildPolicyDataOptions = {}) {
19691966 // Determine workspace type based on selected features or user reported integration
19701967 const isCorporateFeature = featuresMap ?. some ( ( feature ) => ! feature . enabledByDefault && feature . enabled && feature . requiresUpdate ) ?? false ;
19711968 const isCorporateIntegration = userReportedIntegration && ( CONST . POLICY . CONNECTIONS . CORPORATE as readonly string [ ] ) . includes ( userReportedIntegration ) ;
1972- const workspaceType = isCorporateFeature || ! ! isCorporateIntegration || isAnnualSubscription ? CONST . POLICY . TYPE . CORPORATE : CONST . POLICY . TYPE . TEAM ;
1969+ const workspaceType = isCorporateFeature || isCorporateIntegration ? CONST . POLICY . TYPE . CORPORATE : CONST . POLICY . TYPE . TEAM ;
19731970
19741971 // WARNING: The data below should be kept in sync with the API so we create the policy with the correct configuration.
19751972 const optimisticData : OnyxUpdate [ ] = [
@@ -1996,7 +1993,7 @@ function buildPolicyData(options: BuildPolicyDataOptions = {}) {
19961993 } ,
19971994 customUnits,
19981995 areCategoriesEnabled : true ,
1999- areCompanyCardsEnabled : workspaceType === CONST . POLICY . TYPE . TEAM ,
1996+ areCompanyCardsEnabled : true ,
20001997 areTagsEnabled : false ,
20011998 areDistanceRatesEnabled : false ,
20021999 areWorkflowsEnabled : shouldEnableWorkflowsByDefault ,
0 commit comments