Skip to content

Commit

Permalink
Merge pull request #50462 from Expensify/vit-43856
Browse files Browse the repository at this point in the history
[NoQA] Add direct feeds beta and types for RTER violations
  • Loading branch information
chiragsalian authored Oct 8, 2024
2 parents 3e3ae02 + 9a3b1aa commit c1fa2fd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ const CONST = {
REPORT_FIELDS_FEATURE: 'reportFieldsFeature',
WORKSPACE_FEEDS: 'workspaceFeeds',
COMPANY_CARD_FEEDS: 'companyCardFeeds',
DIRECT_FEEDS: 'directFeeds',
NETSUITE_USA_TAX: 'netsuiteUsaTax',
NEW_DOT_COPILOT: 'newDotCopilot',
WORKSPACE_RULES: 'workspaceRules',
Expand Down Expand Up @@ -4397,6 +4398,11 @@ const CONST = {
TAX_REQUIRED: 'taxRequired',
HOLD: 'hold',
},
RTER_VIOLATION_TYPES: {
BROKEN_CARD_CONNECTION: 'brokenCardConnection',
BROKEN_CARD_CONNECTION_530: 'brokenCardConnection530',
SEVEN_DAY_HOLD: 'sevenDayHold',
},
REVIEW_DUPLICATES_ORDER: ['merchant', 'category', 'tag', 'description', 'taxCode', 'billable', 'reimbursable'],

REPORT_VIOLATIONS: {
Expand Down
5 changes: 5 additions & 0 deletions src/libs/Permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ function canUseCompanyCardFeeds(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.COMPANY_CARD_FEEDS) || canUseAllBetas(betas);
}

function canUseDirectFeeds(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.DIRECT_FEEDS) || canUseAllBetas(betas);
}

function canUseNetSuiteUSATax(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.NETSUITE_USA_TAX) || canUseAllBetas(betas);
}
Expand Down Expand Up @@ -84,6 +88,7 @@ export default {
canUseSpotnanaTravel,
canUseWorkspaceFeeds,
canUseCompanyCardFeeds,
canUseDirectFeeds,
canUseNetSuiteUSATax,
canUseNewDotCopilot,
canUseWorkspaceRules,
Expand Down
3 changes: 3 additions & 0 deletions src/types/onyx/TransactionViolation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ type TransactionViolationData = {

/** List of duplicate transactions */
duplicates?: string[];

/** Type of the RTER violation */
rterType?: ValueOf<typeof CONST.RTER_VIOLATION_TYPES>;
};

/** Model of a transaction violation */
Expand Down

0 comments on commit c1fa2fd

Please sign in to comment.