Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
bd0571a
Add spend rule base page
luacmartins Mar 30, 2026
75d6d23
add spend rule button
luacmartins Mar 30, 2026
3ff1fe7
put button behind dev beta
luacmartins Mar 30, 2026
1720652
unlock to staging too
luacmartins Mar 30, 2026
1dda166
add save button
luacmartins Mar 30, 2026
78c90d3
add card page
luacmartins Mar 30, 2026
4561027
add corect menu item
luacmartins Mar 30, 2026
8ce13d0
use correct translation
luacmartins Mar 30, 2026
9a1e583
add traverse function
luacmartins Mar 30, 2026
497ad26
add card selection logic
luacmartins Mar 30, 2026
52c8f36
add correct card list item
luacmartins Mar 30, 2026
af2bf18
update select all text style
luacmartins Mar 30, 2026
ad386c7
save draft form
luacmartins Mar 30, 2026
34754ec
add SpendRuleRestrictionTypeToggle
luacmartins Mar 30, 2026
8a09f13
update styles
luacmartins Mar 30, 2026
74245b5
update padding
luacmartins Mar 30, 2026
b3b88a5
Merge branch 'cmartins-spendRuleSection' into cmartins-spendRuleCreate
luacmartins Mar 31, 2026
4db556b
gst
luacmartins Mar 31, 2026
aa8f923
update merchant edit page
luacmartins Mar 31, 2026
b1b7c77
rename vars
luacmartins Mar 31, 2026
60c862f
update styles
luacmartins Mar 31, 2026
8ce0fe0
fix style
luacmartins Mar 31, 2026
81b7bd5
use form input
luacmartins Mar 31, 2026
e35f132
update copy
luacmartins Mar 31, 2026
393099a
add category page
luacmartins Mar 31, 2026
430be0b
fix prettier
luacmartins Mar 31, 2026
c8f9c29
add spend amount
luacmartins Mar 31, 2026
caa2572
fix merchant styles
luacmartins Mar 31, 2026
33471be
rm disabled button
luacmartins Mar 31, 2026
fd947b0
rename page
luacmartins Mar 31, 2026
5ca0606
add copy
luacmartins Mar 31, 2026
49b6030
fix prettier
luacmartins Mar 31, 2026
6011ea2
Merge branch 'cmartins-spendRuleSection' into cmartins-spendRuleCreate
luacmartins Apr 1, 2026
15f615b
handle errors
luacmartins Apr 1, 2026
8ed77f6
add form errors
luacmartins Apr 1, 2026
98367c3
build AST
luacmartins Apr 1, 2026
f358ebd
store stringified json
luacmartins Apr 1, 2026
53563ae
parse ast to form values, add list
luacmartins Apr 1, 2026
adae40b
update copy
luacmartins Apr 1, 2026
674f0a0
add max label
luacmartins Apr 1, 2026
0c2c522
format amount
luacmartins Apr 1, 2026
6ce4a95
fix operator
luacmartins Apr 1, 2026
297cc60
add copy
luacmartins Apr 1, 2026
75b3771
Merge branch 'main' into cmartins-spendRuleCreate
luacmartins Apr 2, 2026
d9ba114
add min width
luacmartins Apr 2, 2026
095faa7
update ts types
luacmartins Apr 2, 2026
2031c1f
add mcc
luacmartins Apr 2, 2026
a394f18
fix map
luacmartins Apr 2, 2026
62d23c2
update translations
luacmartins Apr 2, 2026
f07f028
rename const
luacmartins Apr 2, 2026
c4023bc
add spend categories
luacmartins Apr 2, 2026
981bb27
fix category type
luacmartins Apr 2, 2026
e44ec55
add copy
luacmartins Apr 2, 2026
bbd4da7
resolve conflicts
luacmartins Apr 6, 2026
3323d87
update const
luacmartins Apr 6, 2026
95692cb
apply copy change
luacmartins Apr 6, 2026
69a1939
address comments
luacmartins Apr 6, 2026
cbb0135
fix prettier
luacmartins Apr 6, 2026
a6a3ba5
Merge branch 'main' into cmartins-spendRuleCreate
luacmartins Apr 7, 2026
305ca46
ensure card settings are loaded
luacmartins Apr 7, 2026
ebf9748
fix currency mismatch check
luacmartins Apr 7, 2026
38786c1
fix currency type check
luacmartins Apr 7, 2026
780b3c5
dry getSelectedCardsCurrency
luacmartins Apr 7, 2026
3e6db7a
update amount type
luacmartins Apr 7, 2026
c7b532a
fix prettier
luacmartins Apr 7, 2026
c0656cd
Merge branch 'main' into cmartins-spendRuleCreate
luacmartins Apr 7, 2026
6c2649f
fix loading issue
luacmartins Apr 7, 2026
a0cc3f5
fix illustration
luacmartins Apr 8, 2026
fb8981b
compress svg
luacmartins Apr 8, 2026
62034ec
fix sort
luacmartins Apr 8, 2026
7cf180e
fix truncation logic
luacmartins Apr 8, 2026
18e5d95
rm isCard, rename getSelectedCardsCurrency, rm satifies, fix dupe key
luacmartins Apr 8, 2026
16a2ec8
fix prettier
luacmartins Apr 8, 2026
f207c65
truncate categories
luacmartins Apr 8, 2026
32f0c36
fix type
luacmartins Apr 8, 2026
8421c73
add more truncation
luacmartins Apr 8, 2026
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4244,6 +4244,45 @@ const CONST = {
TAX: 'tax',
},
},
SPEND_RULES: {
CATEGORIES: {
AIRLINES: 'airlines',
ALCOHOL_AND_BARS: 'alcoholAndBars',
AMAZON_AND_BOOKSTORES: 'amazonAndBookstores',
AUTOMOTIVE: 'automotive',
CAR_RENTALS: 'carRentals',
DINING: 'dining',
FUEL_AND_GAS: 'fuelAndGas',
GOVERNMENT_AND_NON_PROFITS: 'governmentAndNonProfits',
GROCERIES: 'groceries',
GYMS_AND_FITNESS: 'gymsAndFitness',
HEALTHCARE: 'healthcare',
HOTELS: 'hotels',
INTERNET_AND_PHONE: 'internetAndPhone',
OFFICE_SUPPLIES: 'officeSupplies',
PARKING_AND_TOLLS: 'parkingAndTolls',
PROFESSIONAL_SERVICES: 'professionalServices',
RETAIL: 'retail',
SHIPPING_AND_DELIVERY: 'shippingAndDelivery',
SOFTWARE: 'software',
TRANSIT_AND_RIDESHARE: 'transitAndRideshare',
TRAVEL_AGENCIES: 'travelAgencies',
},
FORM: {
FIELDS: {
CARD_IDS: 'cardIDs',
RESTRICTION_ACTION: 'restrictionAction',
MERCHANT_NAMES: 'merchantNames',
MERCHANT_MATCH_TYPES: 'merchantMatchTypes',
CATEGORIES: 'categories',
MAX_AMOUNT: 'maxAmount',
},
},
ACTION: {
ALLOW: 'allow',
BLOCK: 'block',
},
},

get SUBSCRIPTION_PRICES() {
return {
Expand Down Expand Up @@ -9207,6 +9246,7 @@ const CONST = {
THREE_DOT_MENU: 'WorkspaceAccounting-ThreeDotMenu',
},
RULES: {
ADD_SPEND_RULE: 'WorkspaceRules-AddSpendRule',
INDIVIDUAL_EXPENSES_MENU_ITEM: 'WorkspaceRules-IndividualExpensesMenuItem',
SPEND_RULE_ITEM: 'WorkspaceRules-SpendRuleItem',
MERCHANT_RULE_ITEM: 'WorkspaceRules-MerchantRuleItem',
Expand All @@ -9216,6 +9256,9 @@ const CONST = {
MERCHANT_RULE_PREVIEW_MATCHES: 'WorkspaceRules-MerchantRulePreviewMatches',
MERCHANT_RULE_DELETE: 'WorkspaceRules-MerchantRuleDelete',
CATEGORY_SELECTOR: 'WorkspaceRules-CategorySelector',
SPEND_RULE_SECTION_ITEM: 'WorkspaceRules-SpendRuleSectionItem',
SPEND_RULE_SAVE: 'WorkspaceRules-SpendRuleSave',
SPEND_RULE_RESTRICTION_TYPE: 'WorkspaceRules-SpendRuleRestrictionType',
},
EXPENSIFY_CARD: {
ISSUE_CARD_BUTTON: 'WorkspaceExpensifyCard-IssueCardButton',
Expand Down
3 changes: 3 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,8 @@ const ONYXKEYS = {
EXPENSE_RULE_FORM_DRAFT: 'expenseRuleFormDraft',
MERCHANT_RULE_FORM: 'merchantRuleForm',
MERCHANT_RULE_FORM_DRAFT: 'merchantRuleFormDraft',
SPEND_RULE_FORM: 'spendRuleForm',
SPEND_RULE_FORM_DRAFT: 'spendRuleFormDraft',
ADD_DOMAIN_MEMBER_FORM: 'addDomainMemberForm',
ADD_DOMAIN_MEMBER_FORM_DRAFT: 'addDomainMemberFormDraft',
ADD_WORK_EMAIL_FORM: 'addWorkEmailForm',
Expand Down Expand Up @@ -1209,6 +1211,7 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.SPLIT_EXPENSE_EDIT_DATES]: FormTypes.SplitExpenseEditDateForm;
[ONYXKEYS.FORMS.EXPENSE_RULE_FORM]: FormTypes.ExpenseRuleForm;
[ONYXKEYS.FORMS.MERCHANT_RULE_FORM]: FormTypes.MerchantRuleForm;
[ONYXKEYS.FORMS.SPEND_RULE_FORM]: FormTypes.SpendRuleForm;
[ONYXKEYS.FORMS.ADD_DOMAIN_MEMBER_FORM]: FormTypes.AddDomainMemberForm;
[ONYXKEYS.FORMS.ADD_WORK_EMAIL_FORM]: FormTypes.AddWorkEmailForm;
};
Expand Down
24 changes: 24 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2997,6 +2997,30 @@ const ROUTES = {
route: 'workspaces/:policyID/rules/merchant-rules/new',
getRoute: (policyID: string) => `workspaces/${policyID}/rules/merchant-rules/new` as const,
},
RULES_SPEND_NEW: {
route: 'workspaces/:policyID/rules/spend-rules/new',
getRoute: (policyID: string) => `workspaces/${policyID}/rules/spend-rules/new` as const,
},
RULES_SPEND_CARD: {
route: 'workspaces/:policyID/rules/spend-rules/new/card',
getRoute: (policyID: string) => `workspaces/${policyID}/rules/spend-rules/new/card` as const,
},
RULES_SPEND_CATEGORY: {
route: 'workspaces/:policyID/rules/spend-rules/new/category',
getRoute: (policyID: string) => `workspaces/${policyID}/rules/spend-rules/new/category` as const,
},
RULES_SPEND_MAX_AMOUNT: {
route: 'workspaces/:policyID/rules/spend-rules/new/max-amount',
getRoute: (policyID: string) => `workspaces/${policyID}/rules/spend-rules/new/max-amount` as const,
},
RULES_SPEND_MERCHANTS: {
route: 'workspaces/:policyID/rules/spend-rules/new/merchants',
getRoute: (policyID: string) => `workspaces/${policyID}/rules/spend-rules/new/merchants` as const,
},
RULES_SPEND_MERCHANT_EDIT: {
route: 'workspaces/:policyID/rules/spend-rules/new/merchants/:merchantIndex',
getRoute: (policyID: string, merchantIndex: string) => `workspaces/${policyID}/rules/spend-rules/new/merchants/${merchantIndex}` as const,
},
RULES_MERCHANT_MERCHANT_TO_MATCH: {
route: 'workspaces/:policyID/rules/merchant-rules/:ruleID/merchant-to-match',
getRoute: (policyID: string, ruleID?: string) => `workspaces/${policyID}/rules/merchant-rules/${ruleID ?? 'new'}/merchant-to-match` as const,
Expand Down
6 changes: 6 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,10 @@ const SCREENS = {
RULES_CUSTOM: 'Rules_Custom',
RULES_PROHIBITED_DEFAULT: 'Rules_Prohibited_Default',
RULES_MERCHANT_NEW: 'Rules_Merchant_New',
RULES_SPEND_NEW: 'Rules_Spend_New',
RULES_SPEND_CARD: 'Rules_Spend_Card',
RULES_SPEND_CATEGORY: 'Rules_Spend_Category',
RULES_SPEND_MAX_AMOUNT: 'Rules_Spend_Max_Amount',
RULES_MERCHANT_MERCHANT_TO_MATCH: 'Rules_Merchant_Merchant_To_Match',
RULES_MERCHANT_MATCH_TYPE: 'Rules_Merchant_Match_Type',
RULES_MERCHANT_MERCHANT: 'Rules_Merchant_Merchant',
Expand All @@ -833,6 +837,8 @@ const SCREENS = {
RULES_MERCHANT_BILLABLE: 'Rules_Merchant_Billable',
RULES_MERCHANT_PREVIEW_MATCHES: 'Rules_Merchant_Preview_Matches',
RULES_MERCHANT_EDIT: 'Rules_Merchant_Edit',
RULES_SPEND_MERCHANTS: 'Rules_Spend_Merchants',
RULES_SPEND_MERCHANT_EDIT: 'Rules_Spend_Merchant_Edit',
PER_DIEM: 'Per_Diem',
PER_DIEM_IMPORT: 'Per_Diem_Import',
PER_DIEM_IMPORTED: 'Per_Diem_Imported',
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/chunks/illustrations.chunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ import Filters from '@assets/images/simple-illustrations/simple-illustration__fi
import FishbowlBlue from '@assets/images/simple-illustrations/simple-illustration__fishbowl--blue.svg';
import Flash from '@assets/images/simple-illustrations/simple-illustration__flash.svg';
import FolderOpen from '@assets/images/simple-illustrations/simple-illustration__folder-open.svg';
import FoodTruck from '@assets/images/simple-illustrations/simple-illustration__foodtruck-tacos.svg';
import Gears from '@assets/images/simple-illustrations/simple-illustration__gears.svg';
import HandCard from '@assets/images/simple-illustrations/simple-illustration__handcard.svg';
import HeadSet from '@assets/images/simple-illustrations/simple-illustration__headset.svg';
Expand Down Expand Up @@ -396,6 +397,7 @@ const Illustrations = {
Target,
Trophy,
Trophy1,
FoodTruck,

// Multifactor Authentication Illustrations
MagnifyingGlassSpyMouthClosed,
Expand Down
1 change: 1 addition & 0 deletions src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ function BaseSelectionList<TItem extends ListItem>({
canSelectMultiple={canSelectMultiple}
onSelectAll={handleSelectAll}
headerStyle={style?.listHeaderWrapperStyle}
selectAllTextStyle={style?.listHeaderSelectAllTextStyle}
shouldShowSelectAllButton={!!onSelectAll}
shouldPreventDefaultFocusOnSelectRow={shouldPreventDefaultFocusOnSelectRow}
/>
Expand Down
Loading
Loading