-
Notifications
You must be signed in to change notification settings - Fork 4k
[No QA] ReportNextStep: New format #71855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
f9453dd
add nextStep field to Report type
s77rt 4cbaf67
update comment
s77rt 16b9af1
export type ReportNextStep
s77rt 917e0c4
deprecate ReportNextStep old format
s77rt adb45d5
pass nextStep (new format) to MoneyReportHeaderStatusBar
s77rt 3f37b79
add nextstep messages
s77rt 7ab6aee
add buildMessage()
s77rt b874870
lint
s77rt 44d2c3d
merge main
s77rt 5373d7a
lint
s77rt 7033ee9
actorAccountID is optional
s77rt 7a384a0
deprecate old NextStep util functions
s77rt f1a0fbb
better deprecation message
s77rt 2170fb8
implement buildOptimisticNextStep
s77rt 76f2eac
optimistically set report.nextStep
s77rt 4b7b440
lint
s77rt 5f0dfe7
better custom date handling
s77rt 8b0b598
handle optimistic custom offset eta
s77rt f271005
fix dependency cycle
s77rt 453a225
lint + spell
s77rt cd34fb5
fix translation
s77rt 63be1af
lint
s77rt 59e5db4
merge main
s77rt bc1f676
fix types
s77rt 364fddc
lint
s77rt 6360eca
spell check
s77rt ec8e8c2
add nextStep to WhitelistedReport
s77rt 5e0230f
fix lint
s77rt ca39615
fix test
s77rt af2b87f
lint
s77rt 02ce676
add missed optimistic changes
s77rt 5630e6d
merge main
s77rt aa39db3
merge main
s77rt cfebf74
Merge branch 'main' into report-nextstep
s77rt 8781278
add translations
s77rt 4e166b6
lint
s77rt 1a3cc74
Merge branch 'main' into report-nextstep
s77rt e843b0c
update test
s77rt e91e374
Merge branch 'main' into report-nextstep
s77rt fba394c
fix test
s77rt 682e58d
merge main
s77rt bead5f9
fix tests
s77rt c44e3cb
merge main
s77rt eeca03e
Merge branch 'main' into report-nextstep
s77rt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -144,6 +144,7 @@ import type { | |
| MovedTransactionParams, | ||
| NeedCategoryForExportToIntegrationParams, | ||
| NewWorkspaceNameParams, | ||
| NextStepParams, | ||
| NoLongerHaveAccessParams, | ||
| NotAllowedExtensionParams, | ||
| NotYouParams, | ||
|
|
@@ -1552,6 +1553,118 @@ const translations = { | |
| modal: { | ||
| backdropLabel: 'Modal Backdrop', | ||
| }, | ||
| nextStep: { | ||
| message: { | ||
| [CONST.NEXT_STEP.MESSAGE_KEY.WAITING_TO_ADD_TRANSACTIONS]: ({actor, actorType}: NextStepParams) => { | ||
| // Disabling the default-case lint rule here is actually safer as this forces us to make the switch cases exhaustive | ||
| // eslint-disable-next-line default-case | ||
| switch (actorType) { | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.CURRENT_USER: | ||
| return `Waiting for <strong>you</strong> to add expenses.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.OTHER_USER: | ||
| return `Waiting for <strong>${actor}</strong> to add expenses.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.UNSPECIFIED_ADMIN: | ||
| return `Waiting for an admin to add expenses.`; | ||
| } | ||
| }, | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| [CONST.NEXT_STEP.MESSAGE_KEY.NO_FURTHER_ACTION]: (_: NextStepParams) => `No further action required!`, | ||
| [CONST.NEXT_STEP.MESSAGE_KEY.WAITING_FOR_SUBMITTER_ACCOUNT]: ({actor, actorType}: NextStepParams) => { | ||
| // Disabling the default-case lint rule here is actually safer as this forces us to make the switch cases exhaustive | ||
| // eslint-disable-next-line default-case | ||
| switch (actorType) { | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.CURRENT_USER: | ||
| return `Waiting for <strong>you</strong> to add a bank account.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.OTHER_USER: | ||
| return `Waiting for <strong>${actor}</strong> to add a bank account.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.UNSPECIFIED_ADMIN: | ||
| return `Waiting for an admin to add a bank account.`; | ||
| } | ||
| }, | ||
| [CONST.NEXT_STEP.MESSAGE_KEY.WAITING_FOR_AUTOMATIC_SUBMIT]: ({actor, actorType, eta, etaType}: NextStepParams) => { | ||
| let formattedETA = ''; | ||
| if (eta) { | ||
| formattedETA = etaType === CONST.NEXT_STEP.ETA_TYPE.DATE_TIME ? ` on ${eta}` : ` ${eta}`; | ||
| } | ||
|
|
||
| // Disabling the default-case lint rule here is actually safer as this forces us to make the switch cases exhaustive | ||
| // eslint-disable-next-line default-case | ||
| switch (actorType) { | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.CURRENT_USER: | ||
| return `Waiting for <strong>your</strong> expenses to automatically submit${formattedETA}.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.OTHER_USER: | ||
| return `Waiting for <strong>${actor}'s</strong> expenses to automatically submit${formattedETA}.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.UNSPECIFIED_ADMIN: | ||
| return `Waiting for an admin's expenses to automatically submit${formattedETA}.`; | ||
|
Comment on lines
+1593
to
+1598
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jamesdeanexpensify since you've been working on these lately - is this the message we want in ND? Or should it just be |
||
| } | ||
| }, | ||
| [CONST.NEXT_STEP.MESSAGE_KEY.WAITING_TO_FIX_ISSUES]: ({actor, actorType}: NextStepParams) => { | ||
| // Disabling the default-case lint rule here is actually safer as this forces us to make the switch cases exhaustive | ||
| // eslint-disable-next-line default-case | ||
| switch (actorType) { | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.CURRENT_USER: | ||
| return `Waiting for <strong>you</strong> to fix the issue(s).`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.OTHER_USER: | ||
| return `Waiting for <strong>${actor}</strong> to fix the issue(s).`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.UNSPECIFIED_ADMIN: | ||
| return `Waiting for an admin to fix the issue(s).`; | ||
| } | ||
| }, | ||
| [CONST.NEXT_STEP.MESSAGE_KEY.WAITING_TO_APPROVE]: ({actor, actorType}: NextStepParams) => { | ||
| // Disabling the default-case lint rule here is actually safer as this forces us to make the switch cases exhaustive | ||
| // eslint-disable-next-line default-case | ||
| switch (actorType) { | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.CURRENT_USER: | ||
| return `Waiting for <strong>you</strong> to approve expenses.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.OTHER_USER: | ||
| return `Waiting for <strong>${actor}</strong> to approve expenses.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.UNSPECIFIED_ADMIN: | ||
| return `Waiting for an admin to approve expenses.`; | ||
| } | ||
| }, | ||
| [CONST.NEXT_STEP.MESSAGE_KEY.WAITING_TO_PAY]: ({actor, actorType}: NextStepParams) => { | ||
| // Disabling the default-case lint rule here is actually safer as this forces us to make the switch cases exhaustive | ||
| // eslint-disable-next-line default-case | ||
| switch (actorType) { | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.CURRENT_USER: | ||
| return `Waiting for <strong>you</strong> to pay expenses.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.OTHER_USER: | ||
| return `Waiting for <strong>${actor}</strong> to pay expenses.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.UNSPECIFIED_ADMIN: | ||
| return `Waiting for an admin to pay expenses.`; | ||
| } | ||
| }, | ||
| [CONST.NEXT_STEP.MESSAGE_KEY.WAITING_FOR_POLICY_BANK_ACCOUNT]: ({actor, actorType}: NextStepParams) => { | ||
| // Disabling the default-case lint rule here is actually safer as this forces us to make the switch cases exhaustive | ||
| // eslint-disable-next-line default-case | ||
| switch (actorType) { | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.CURRENT_USER: | ||
| return `Waiting for <strong>you</strong> to finish setting up a business bank account.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.OTHER_USER: | ||
| return `Waiting for <strong>${actor}</strong> to finish setting up a business bank account.`; | ||
| case CONST.NEXT_STEP.ACTOR_TYPE.UNSPECIFIED_ADMIN: | ||
| return `Waiting for an admin to finish setting up a business bank account.`; | ||
| } | ||
| }, | ||
| [CONST.NEXT_STEP.MESSAGE_KEY.WAITING_FOR_PAYMENT]: ({eta, etaType}: NextStepParams) => { | ||
| let formattedETA = ''; | ||
| if (eta) { | ||
| formattedETA = etaType === CONST.NEXT_STEP.ETA_TYPE.DATE_TIME ? ` by ${eta}` : ` ${eta}`; | ||
| } | ||
|
|
||
| return `Waiting for payment to complete${formattedETA}.`; | ||
| }, | ||
| }, | ||
| eta: { | ||
| [CONST.NEXT_STEP.ETA_KEY.SHORTLY]: 'shortly', | ||
| [CONST.NEXT_STEP.ETA_KEY.TODAY]: 'later today', | ||
| [CONST.NEXT_STEP.ETA_KEY.END_OF_WEEK]: 'on Sunday', | ||
| [CONST.NEXT_STEP.ETA_KEY.SEMI_MONTHLY]: 'on the 1st and 16th of each month', | ||
| [CONST.NEXT_STEP.ETA_KEY.LAST_BUSINESS_DAY_OF_MONTH]: 'on the last business day of the month', | ||
| [CONST.NEXT_STEP.ETA_KEY.LAST_DAY_OF_MONTH]: 'on the last day of the month', | ||
| [CONST.NEXT_STEP.ETA_KEY.END_OF_TRIP]: 'at the end of your trip', | ||
| }, | ||
| }, | ||
| profilePage: { | ||
| profile: 'Profile', | ||
| preferredPronouns: 'Preferred pronouns', | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can add other languages together in this PR.
Edited: it seems bot can automatically generate translations, see slack