Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
a29ca96
add files
Gonals Jun 24, 2026
420b7a2
better rule building
Gonals Jun 26, 2026
df701b6
better edition handling
Gonals Jun 26, 2026
f121f2c
better handling of rule generation
Gonals Jun 26, 2026
9885609
conflicts
Gonals Jun 29, 2026
9602c86
some cleanup
Gonals Jun 29, 2026
0af1aa7
rename helper functions
Gonals Jun 29, 2026
6a1eadc
better naming
Gonals Jun 29, 2026
ae82565
some more naming/doc changes
Gonals Jun 29, 2026
9973de0
some more cleanup
Gonals Jun 29, 2026
9a1199b
prettier
Gonals Jun 29, 2026
4b5c3e2
knip
Gonals Jun 29, 2026
dcfe92c
lint
Gonals Jun 29, 2026
70b4043
more lint
Gonals Jun 29, 2026
26c2ffa
Merge branch 'main' into alberto-moreApprovers
Gonals Jun 29, 2026
437c9e4
more lint
Gonals Jun 29, 2026
2beaf40
Merge branch 'main' into alberto-moreApprovers
Gonals Jun 29, 2026
3cce08e
lint again
Gonals Jun 29, 2026
3fa8579
Add tests
Gonals Jun 29, 2026
53cbedf
prettier
Gonals Jun 29, 2026
a05bc37
type
Gonals Jun 29, 2026
2204b3e
Merge branch 'main' into alberto-moreApprovers
Gonals Jun 29, 2026
72cdcae
types
Gonals Jun 29, 2026
436b36b
conflicts
Gonals Jul 13, 2026
c785155
merge main
Gonals Jul 14, 2026
42a1bbc
handle new rules correctly
Gonals Jul 14, 2026
23d18bc
properly group people in the same rules
Gonals Jul 14, 2026
9213ee2
big cleanup
Gonals Jul 14, 2026
d14a197
comment cleanup
Gonals Jul 15, 2026
0ea1d6a
better comparison
Gonals Jul 15, 2026
d28316f
general cleanup
Gonals Jul 15, 2026
3d449ed
renaming
Gonals Jul 15, 2026
ea1de10
small refactor
Gonals Jul 15, 2026
f879ada
Add missing file
Gonals Jul 15, 2026
9c651e0
knip
Gonals Jul 15, 2026
ee13b8c
fix test
Gonals Jul 15, 2026
d9602ca
we gotta do this
Gonals Jul 15, 2026
51d0af1
new rules project
Gonals Jul 15, 2026
dfa0c1c
rule handling fix
Gonals Jul 15, 2026
1cdd441
and one more
Gonals Jul 29, 2026
4a3c933
Merge branch 'main' into alberto-moreApprovers
Gonals Jul 30, 2026
99b9b6f
typescript
Gonals Jul 30, 2026
c3730bf
tests
Gonals Jul 30, 2026
1aa65ca
cleanup for new shape
Gonals Jul 30, 2026
838758d
comment cleanup
Gonals Jul 30, 2026
413c56a
more cleanup of robot quirks
Gonals Jul 30, 2026
ed11dbc
conflicts
Gonals Aug 3, 2026
b92715c
add selector
Gonals Aug 3, 2026
3963e28
conflicts
Gonals Aug 3, 2026
2b7f1a9
Merge branch 'main' into alberto-moreApprovers
Gonals Aug 4, 2026
1de1b33
Merge branch 'main' into alberto-moreApprovers
Gonals Aug 5, 2026
1b513ce
delete workflow fix
Gonals Aug 5, 2026
ae2dae3
conflicts
Gonals Aug 5, 2026
093bf48
Merge branch 'main' into alberto-moreApprovers
Gonals Aug 6, 2026
0385d11
Better comparison handling
Gonals Aug 6, 2026
fe6409c
fix for overLimit approver
Gonals Aug 6, 2026
650868d
Merge branch 'main' into alberto-moreApprovers
Gonals Aug 10, 2026
9d235ce
better rollback
Gonals Aug 10, 2026
581b52e
some simplification
Gonals Aug 10, 2026
059b8ac
reorder pieces
Gonals Aug 10, 2026
f805a3d
better fingerprint
Gonals Aug 10, 2026
6ceef53
remove comment
Gonals Aug 10, 2026
7c07b85
reuse generic methods
Gonals Aug 10, 2026
bb0e1db
Update src/libs/WorkflowUtils.ts
Gonals Aug 10, 2026
6b05cea
better comment
Gonals Aug 10, 2026
a24d7a0
uneeded helper function
Gonals Aug 10, 2026
ae4e96f
Merge branch 'alberto-moreApprovers' of github.com:Expensify/App into…
Gonals Aug 10, 2026
0c69fc0
fmt
Gonals Aug 10, 2026
22453bc
conflicts
Gonals Aug 25, 2026
d9ff9f9
fix action
Gonals Aug 25, 2026
0b480dc
cleanup
Gonals Aug 25, 2026
09f7dcc
simplify tests
Gonals Aug 25, 2026
8158218
simplify
Gonals Aug 25, 2026
f5ac580
cleanup comment
Gonals Aug 25, 2026
eda201b
left can't be an array
Gonals Aug 25, 2026
2beb6fc
rename function
Gonals Aug 25, 2026
99875d0
reuse filterRulesForPolicy
Gonals Aug 25, 2026
24b135b
moved to module level
Gonals Aug 25, 2026
c85ce36
Match Mobile-Expensify submodule to main
Gonals Aug 25, 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
17 changes: 17 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,7 @@ const CONST = {
INTUIT_ENTERPRISE_SUITE: 'intuitEnterpriseSuite',
RULES_REVAMP: 'rulesRevamp',
COMMUTER_EXCLUSIONS: 'commuterExclusions',
MULTIPLE_APPROVERS: 'multipleApprovers',
GLOBAL_REIMBURSEMENTS: 'globalReimbursements',
GLOBAL_REIMBURSEMENT_FX: 'globalReimbursementFX',
DEFAULT_LETTER_AVATARS: 'defaultLetterAvatars',
Expand Down Expand Up @@ -8183,6 +8184,22 @@ const CONST = {
},
},

RULES: {
SCOPE: {
POLICY: 'policy',
},
APPROVAL_WORKFLOW: {
TRIGGER: {
REPORT_SUBMIT: 'ReportSubmit',
REPORT_APPROVE: 'ReportApprove',
},
ACTION: {
FORWARD_TO: 'ForwardTo',
APPROVE_REPORT: 'ApproveReport',
},
},
},

BOOT_SPLASH_STATE: {
VISIBLE: 'visible',
READY_TO_BE_HIDDEN: 'readyToBeHidden',
Expand Down
2 changes: 2 additions & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ const ONYXKEYS = {
POLICY_HAS_CONNECTIONS_DATA_BEEN_FETCHED: 'policyHasConnectionsDataBeenFetched_',
POLICY_CONNECTION_SYNC_PROGRESS: 'policyConnectionSyncProgress_',
POLICY_MERGE_HR_INITIAL_SYNC_MODAL_SHOWN: 'policyMergeHRInitialSyncModalShown_',
RULE: 'rules_',
WORKSPACE_INVITE_MEMBERS_DRAFT: 'workspaceInviteMembersDraft_',
WORKSPACE_INVITE_MESSAGE_DRAFT: 'workspaceInviteMessageDraft_',
WORKSPACE_INVITE_ROLE_DRAFT: 'workspaceInviteRoleDraft_',
Expand Down Expand Up @@ -1469,6 +1470,7 @@ type OnyxCollectionValuesMapping = {
[ONYXKEYS.COLLECTION.EXPORT_DOWNLOAD]: OnyxTypes.ExportDownload;
[ONYXKEYS.COLLECTION.POLICY]: OnyxTypes.Policy;
[ONYXKEYS.COLLECTION.POLICY_DRAFTS]: OnyxTypes.Policy;
[ONYXKEYS.COLLECTION.RULE]: OnyxTypes.Rule;
[ONYXKEYS.COLLECTION.POLICY_CATEGORIES]: OnyxTypes.PolicyCategories;
[ONYXKEYS.COLLECTION.POLICY_CATEGORIES_DRAFT]: OnyxTypes.PolicyCategories;
[ONYXKEYS.COLLECTION.POLICY_TAGS]: OnyxTypes.PolicyTagLists;
Expand Down
3 changes: 2 additions & 1 deletion src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2978,7 +2978,8 @@ const ROUTES = {
},
WORKSPACE_WORKFLOWS_APPROVALS_EDIT: {
route: 'workspaces/:policyID/workflows/approvals/:firstApproverEmail/edit',
getRoute: (policyID: string, firstApproverEmail: string) => `workspaces/${policyID}/workflows/approvals/${encodeURIComponent(firstApproverEmail)}/edit` as const,
getRoute: (policyID: string, firstApproverEmail: string, memberEmail?: string) =>
`workspaces/${policyID}/workflows/approvals/${encodeURIComponent(firstApproverEmail)}/edit${memberEmail ? `?memberEmail=${encodeURIComponent(memberEmail)}` : ''}` as const,
Comment thread
Gonals marked this conversation as resolved.
Resolved
},
WORKSPACE_WORKFLOWS_APPROVALS_APPROVER: {
route: 'workspaces/:policyID/workflows/approvals/approver',
Expand Down
11 changes: 11 additions & 0 deletions src/libs/API/parameters/SetApprovalWorkflowParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
type SetApprovalWorkflowParams = {
/** The policy ID whose approval-workflow rules are being mutated. */
policyID: string;

/**
* JSON-stringified object keyed by ruleID
*/
rules: string;
};

export default SetApprovalWorkflowParams;
Comment thread
Gonals marked this conversation as resolved.
Resolved
1 change: 1 addition & 0 deletions src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ export type {default as DeleteDomainParams} from './DeleteDomainParams';
export type {default as GetDuplicateTransactionDetailsParams} from './GetDuplicateTransactionDetailsParams';
export type {default as SetPolicyCategoryReceiptsAndItemizedReceiptRequiredParams} from './SetPolicyCategoryReceiptsAndItemizedReceiptRequiredParams';
export type {default as SetPolicyCodingRuleParams} from './SetPolicyCodingRuleParams';
export type {default as SetApprovalWorkflowParams} from './SetApprovalWorkflowParams';
export type {default as RegisterAuthenticationKeyParams} from './RegisterAuthenticationKeyParams';
export type {default as RevokeMultifactorAuthenticationCredentialsParams} from './RevokeMultifactorAuthenticationCredentialsParams';
export type {default as TroubleshootMultifactorAuthenticationParams} from './TroubleshootMultifactorAuthenticationParams';
Expand Down
2 changes: 2 additions & 0 deletions src/libs/API/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ const WRITE_COMMANDS = {
SET_POLICY_TIME_TRACKING_DEFAULT_RATE: 'SetPolicyTimeTrackingDefaultRate',
SET_POLICY_RULES_ENABLED: 'SetPolicyRulesEnabled',
SET_POLICY_CODING_RULE: 'SetPolicyCodingRule',
SET_APPROVAL_WORKFLOW: 'SetApprovalWorkflow',
SET_POLICY_EXPENSE_MAX_AMOUNT_NO_RECEIPT: 'SetPolicyExpenseMaxAmountNoReceipt',
SET_POLICY_EXPENSE_MAX_AMOUNT_NO_ITEMIZED_RECEIPT: 'SetPolicyExpenseMaxAmountNoItemizedReceipt',
SET_POLICY_EXPENSE_MAX_AMOUNT: 'SetPolicyExpenseMaxAmount',
Expand Down Expand Up @@ -957,6 +958,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.ENABLE_POLICY_TIME_TRACKING]: Parameters.EnablePolicyTimeTrackingParams;
[WRITE_COMMANDS.SET_POLICY_RULES_ENABLED]: Parameters.SetPolicyRulesEnabledParams;
[WRITE_COMMANDS.SET_POLICY_CODING_RULE]: Parameters.SetPolicyCodingRuleParams;
[WRITE_COMMANDS.SET_APPROVAL_WORKFLOW]: Parameters.SetApprovalWorkflowParams;
[WRITE_COMMANDS.SET_POLICY_REQUIRE_COMPANY_CARDS_ENABLED]: Parameters.SetPolicyRequireCompanyCardsEnabledParams;
[WRITE_COMMANDS.SET_POLICY_CATEGORY_DESCRIPTION_REQUIRED]: Parameters.SetPolicyCategoryDescriptionRequiredParams;
[WRITE_COMMANDS.SET_POLICY_CATEGORY_ATTENDEES_REQUIRED]: Parameters.SetPolicyCategoryAttendeesRequiredParams;
Expand Down
1 change: 1 addition & 0 deletions src/libs/ExportOnyxState/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ const onyxKeysToMaskFragileData = new Set<string>([
ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT,
ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS,
ONYXKEYS.COLLECTION.REPORT_USER_IS_TYPING,
ONYXKEYS.COLLECTION.RULE,
ONYXKEYS.COLLECTION.SAML_METADATA,
ONYXKEYS.COLLECTION.SECURITY_GROUP,
ONYXKEYS.COLLECTION.SHARED_NVP_AGENT_PROMPT,
Expand Down
1 change: 1 addition & 0 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2919,6 +2919,7 @@ type WorkspaceSplitNavigatorParamList = {
[SCREENS.WORKSPACE.WORKFLOWS_APPROVALS_EDIT]: {
policyID: string;
firstApproverEmail: string;
memberEmail?: string;
};
[SCREENS.WORKSPACE.DYNAMIC_WORKFLOWS_APPROVALS_EXPENSES_FROM]: {
policyID: string;
Expand Down
Loading
Loading