Skip to content
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

Allow Editing Distance Requests #26141

Merged
merged 167 commits into from
Sep 28, 2023
Merged
Changes from 1 commit
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
b75f0c6
Merge branch 'hayata-map-on-confirmation-screen' of github.com:Expens…
jasperhuangg Aug 25, 2023
43a7296
add distance request consts
jasperhuangg Aug 28, 2023
28c293e
add DISTANCE_REQUEST ONYXKEY
jasperhuangg Aug 28, 2023
322504a
add routes for editdistancerequest and editrequestwaypoint
jasperhuangg Aug 28, 2023
c5c72a5
add distance translations
jasperhuangg Aug 28, 2023
85ac77d
add editDistanceRequest actions
jasperhuangg Aug 28, 2023
4cac094
add new pages for editing distance requests
jasperhuangg Aug 28, 2023
ec14060
simplify DistanceRequest to just take a transactionID, modify to hand…
jasperhuangg Aug 28, 2023
94e0137
setup navigation
jasperhuangg Aug 28, 2023
1bfff19
updates
jasperhuangg Aug 28, 2023
c55dcab
setup nav for moneyrequesteditwaypointpage
jasperhuangg Aug 28, 2023
3dced83
fix merge conficts
jasperhuangg Aug 28, 2023
aac0217
remove unused
jasperhuangg Aug 28, 2023
b868243
remove unused
jasperhuangg Aug 28, 2023
2f63e7b
remove unused
jasperhuangg Aug 28, 2023
f6637d5
remove unused
jasperhuangg Aug 28, 2023
5944e01
remove unused
jasperhuangg Aug 28, 2023
89dbc2d
remove unused
jasperhuangg Aug 28, 2023
aa0ef77
remove unused
jasperhuangg Aug 28, 2023
8ad2b54
remove unused
jasperhuangg Aug 28, 2023
f594b64
remove unused
jasperhuangg Aug 28, 2023
0585fbd
remove unused
jasperhuangg Aug 28, 2023
b3eb1c5
remove unused
jasperhuangg Aug 28, 2023
3263467
remove unused
jasperhuangg Aug 28, 2023
211cb93
remove unused
jasperhuangg Aug 28, 2023
9da21a7
remove unused
jasperhuangg Aug 28, 2023
fda8d5e
Merge branch 'main' of github.com:Expensify/App into jasper-editDista…
jasperhuangg Aug 28, 2023
9d416c8
rename variable
jasperhuangg Aug 29, 2023
2782890
fix params
jasperhuangg Aug 29, 2023
6245d61
Merge branch 'main' of github.com:Expensify/App into jasper-editDista…
jasperhuangg Aug 29, 2023
8071cba
rename WaypointEditorPage => NewDistanceRequestWaypointEditorPage
jasperhuangg Aug 29, 2023
0bd1ed8
Add save button to distance requests
jasperhuangg Aug 29, 2023
c2c8cff
fix propTypes
jasperhuangg Aug 29, 2023
6cf1bfb
remove debug log
jasperhuangg Aug 29, 2023
123dd88
remove debug log
jasperhuangg Aug 29, 2023
e750b6b
save waypoints correctly under comment for optimistic data
jasperhuangg Aug 29, 2023
97be8c7
add pending actions for optimistic waypoints
jasperhuangg Aug 29, 2023
a1474f9
wip
jasperhuangg Aug 29, 2023
f34e1d8
grab transaction from transactionID
jasperhuangg Aug 30, 2023
39ce2a1
add getParentTransaction
jasperhuangg Aug 30, 2023
547f52b
pass transactionID
jasperhuangg Aug 30, 2023
cec90f0
resolve conflicts
jasperhuangg Aug 30, 2023
9e7b0ff
resolve conflicts
jasperhuangg Aug 30, 2023
5c8b46f
resolve conflicts
jasperhuangg Aug 30, 2023
46305e2
remove unused
jasperhuangg Aug 30, 2023
ec2f771
remove unused
jasperhuangg Aug 30, 2023
74265a4
revert
jasperhuangg Aug 30, 2023
de24926
revert
jasperhuangg Aug 30, 2023
eaa720c
remove unused
jasperhuangg Aug 30, 2023
c0782ca
remove unused
jasperhuangg Aug 30, 2023
b4379e1
revert
jasperhuangg Aug 30, 2023
1604a43
revert
jasperhuangg Aug 30, 2023
72bbd71
show loader
jasperhuangg Aug 31, 2023
3d2b367
style
jasperhuangg Aug 31, 2023
33da5a5
allow EditDistanceRequest to be called for editing other types of fields
jasperhuangg Aug 31, 2023
bc43cb1
allow other fields to be edited in with EditDistanceRequest
jasperhuangg Aug 31, 2023
e0378cc
style
jasperhuangg Aug 31, 2023
d36fec6
style
jasperhuangg Aug 31, 2023
a1404f1
send waypoints back even when editing other fields
jasperhuangg Aug 31, 2023
c2a563d
fix conflicts
jasperhuangg Aug 31, 2023
8fb24f6
update JS doc, pass optimistic report action ID
jasperhuangg Aug 31, 2023
a6f214b
update JS doc, pass optimistic report action ID
jasperhuangg Aug 31, 2023
01e450b
rename to updateDistanceRequest
jasperhuangg Aug 31, 2023
ae1cb17
style
jasperhuangg Aug 31, 2023
f933bc5
resolve conflicts
jasperhuangg Sep 1, 2023
9165224
remove unused
jasperhuangg Sep 1, 2023
2bf9c29
style
jasperhuangg Sep 1, 2023
eb67082
merge main
jasperhuangg Sep 1, 2023
494a72c
remove unused
jasperhuangg Sep 1, 2023
654087e
remove unused
jasperhuangg Sep 1, 2023
72a0244
hide modal after successfully updating distance
jasperhuangg Sep 1, 2023
be082f6
style
jasperhuangg Sep 1, 2023
e8afc78
remove unused
jasperhuangg Sep 1, 2023
c49aef8
resolve conflicts with main
jasperhuangg Sep 11, 2023
edfc0cb
remove unused
jasperhuangg Sep 11, 2023
a5fe4bd
resolve conflicts
jasperhuangg Sep 11, 2023
8622d09
resolve conflicts
jasperhuangg Sep 11, 2023
b3c569f
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 12, 2023
5ff8528
Remove not found page
tgolen Sep 12, 2023
5a8fa8c
Fix proptype warning
tgolen Sep 12, 2023
7e0934f
Remove unused prop
tgolen Sep 12, 2023
af3c5d7
Fix issue with advancing to confirmation
tgolen Sep 12, 2023
1f5b8a0
WIP trying to keep waypoints when going back
tgolen Sep 12, 2023
ee4ec75
Keep transaction data from being lost
tgolen Sep 12, 2023
12b445a
Fix proptype warnings
tgolen Sep 12, 2023
6c7b9ad
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 13, 2023
5aa28ce
Fix a proptype warning
tgolen Sep 13, 2023
0ade1ed
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 13, 2023
3f6b37a
Fix lint
tgolen Sep 13, 2023
39874fe
Fix more lint
tgolen Sep 13, 2023
61ccb9e
Prevent from getting full report collection
tgolen Sep 13, 2023
b11c990
Use proper hook dependency
tgolen Sep 13, 2023
7c002bc
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 14, 2023
e1de60e
Add full page not found, remove extra brackets, cleanup default props
tgolen Sep 14, 2023
44a740f
Remove extra props
tgolen Sep 14, 2023
da16447
Clean up navigator
tgolen Sep 14, 2023
a3df3c6
Remove unused parameter
tgolen Sep 14, 2023
21285c6
Fix the confirmation page for updating waypoints
tgolen Sep 14, 2023
0b87b2b
Revert "Fix the confirmation page for updating waypoints"
tgolen Sep 14, 2023
c1039c8
Revert "Clean up navigator"
tgolen Sep 14, 2023
1c10cbd
Have participant auto-selected
tgolen Sep 14, 2023
d902063
Pass route to edit page
tgolen Sep 14, 2023
41d1eed
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 14, 2023
38d0684
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 15, 2023
bd249cf
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 15, 2023
b467e29
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 18, 2023
f462092
WIP on building proper optimistic IDs
tgolen Sep 18, 2023
07606c0
Apply missing optimistic data to updated money request report
tgolen Sep 18, 2023
724e565
Fix lint
tgolen Sep 18, 2023
050708b
Remove unused var
tgolen Sep 18, 2023
c2cf599
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 19, 2023
b94bba3
Remove empty space
tgolen Sep 19, 2023
befe5d8
Reset waypoints when canceling out of waypoint editor
tgolen Sep 19, 2023
e0c66ec
lint
tgolen Sep 19, 2023
6722163
lint
tgolen Sep 19, 2023
e6ab909
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 20, 2023
efd9353
Edit a cloned transaction instead of the original
tgolen Sep 20, 2023
cb7a27c
Remove temporary transaction on unmount, remove previous code for ini…
tgolen Sep 20, 2023
29de8fa
Pass transactionID in the URL
tgolen Sep 20, 2023
1f826a4
Move loading and pending fields to temporary transaction
tgolen Sep 20, 2023
1a9da5c
Add code comments
tgolen Sep 20, 2023
94f6137
Start adding code for syncing temporary expense
tgolen Sep 20, 2023
6a994ff
Have errors synced between transactions
tgolen Sep 20, 2023
811ade4
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 20, 2023
fe04c77
Keep waypoints correct on original transaction
tgolen Sep 20, 2023
92c1cc2
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 21, 2023
b41f5fe
Lint
tgolen Sep 21, 2023
c26c40e
Fix waypoint editor
tgolen Sep 21, 2023
5cf2039
Add curly braces
tgolen Sep 21, 2023
0d178e3
Remove redundant spacer and unused param
tgolen Sep 22, 2023
7b0fb85
Use the params object as intended
tgolen Sep 22, 2023
ec9876e
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 22, 2023
d3b31ad
Reduce variables
tgolen Sep 22, 2023
da2a13e
Simplify data formats
tgolen Sep 22, 2023
82dcecb
Remove temporary transaction and use a backup instead
tgolen Sep 22, 2023
ee506cd
Remove debug
tgolen Sep 22, 2023
e628aeb
Remove unnecessary success data
tgolen Sep 22, 2023
bb155e3
Backup pending fields too
tgolen Sep 22, 2023
0a21e09
Update optimistic data
tgolen Sep 22, 2023
5d52826
Discard changes if a transaction was saved with errors
tgolen Sep 22, 2023
cc38439
Discard errors properly when canceling edit flow
tgolen Sep 22, 2023
3c90ddf
Revert "Discard errors properly when canceling edit flow"
tgolen Sep 22, 2023
bf27ba8
Reset transaction if there are errors
tgolen Sep 22, 2023
ed70fde
Update src/pages/EditRequestDistancePage.js
tgolen Sep 23, 2023
78e7220
Update src/pages/EditRequestDistancePage.js
tgolen Sep 23, 2023
a6b4943
Update src/libs/actions/IOU.js
tgolen Sep 23, 2023
ed1722d
Update src/libs/TransactionUtils.js
tgolen Sep 23, 2023
059e5fb
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 25, 2023
b563c63
Dismiss modal
tgolen Sep 25, 2023
a1b1cb6
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 25, 2023
c2f2f9b
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 25, 2023
8f0d1c5
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 25, 2023
445c5d2
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 26, 2023
78cd200
Add pending fields to transaction type
tgolen Sep 26, 2023
255b88c
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 26, 2023
b143bad
lint
tgolen Sep 26, 2023
eb66d14
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 26, 2023
9a36822
Add empty line
tgolen Sep 26, 2023
9ec7713
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 26, 2023
b06d26d
Rename route
tgolen Sep 26, 2023
8dabf81
Remove unused onyx key
tgolen Sep 26, 2023
2451096
Remove omitted fields
tgolen Sep 26, 2023
f84362e
Remove comment
tgolen Sep 26, 2023
6fbf067
lint and improve modal behavior, clarify comments
tgolen Sep 26, 2023
0869c9d
Delete the backup transaction in success data
tgolen Sep 26, 2023
ad21933
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 27, 2023
64b5073
Merge branch 'main' into jasper-editDistanceRequests
tgolen Sep 28, 2023
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
Prev Previous commit
Next Next commit
Merge branch 'main' into jasper-editDistanceRequests
  • Loading branch information
tgolen committed Sep 26, 2023
commit 255b88c21dfc4e7b976d29c2ffb2de14fa2be60f
41 changes: 23 additions & 18 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import CONST from './CONST';
* This is a file containing constants for all of the routes we want to be able to go to
*/

// prettier-ignore
export default {
HOME: '',
/** This is a utility route used to go to the user's concierge chat, or the sign-in page if the user's not authenticated */
Expand Down Expand Up @@ -115,23 +114,29 @@ export default {
PRIVATE_NOTES_EDIT: {route: 'r/:reportID/notes/:accountID/edit', getRoute: (reportID: string, accountID: string | number) => `r/${reportID}/notes/${accountID}/edit`},

// To see the available iouType, please refer to CONST.IOU.MONEY_REQUEST_TYPE
MONEY_REQUEST: { route: ':iouType/new/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/${reportID}`},
MONEY_REQUEST_AMOUNT: { route: ':iouType/new/amount/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/amount/${reportID}`},
MONEY_REQUEST_PARTICIPANTS: { route: ':iouType/new/participants/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/participants/${reportID}`},
MONEY_REQUEST_CONFIRMATION: { route: ':iouType/new/confirmation/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/confirmation/${reportID}`},
MONEY_REQUEST_DATE: { route: ':iouType/new/date/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/date/${reportID}`},
MONEY_REQUEST_CURRENCY: { route: ':iouType/new/currency/:reportID?', getRoute: (iouType: string, reportID: string, currency: string, backTo: string) => `${iouType}/new/currency/${reportID}?currency=${currency}&backTo=${backTo}`},
MONEY_REQUEST_DESCRIPTION: { route: ':iouType/new/description/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/description/${reportID}`},
MONEY_REQUEST_CATEGORY: { route: ':iouType/new/category/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/category/${reportID}`},
MONEY_REQUEST_TAG: { route: ':iouType/new/tag/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/tag/${reportID}`},
MONEY_REQUEST_MERCHANT: { route: ':iouType/new/merchant/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/merchant/${reportID}`},
MONEY_REQUEST_WAYPOINT: { route: ':iouType/new/waypoint/:waypointIndex', getRoute: (iouType: string, waypointIndex: number) => `${iouType}/new/waypoint/${waypointIndex}`},
MONEY_REQUEST_RECEIPT: { route: ':iouType/new/receipt/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/receipt/${reportID}`},
MONEY_REQUEST_ADDRESS: { route: ':iouType/new/address/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/address/${reportID}`},
MONEY_REQUEST_EDIT_WAYPOINT: { route: 'r/:threadReportID/edit/distance/:transactionID/waypoint/:waypointIndex', getRoute: (threadReportID: number, transactionID: string, waypointIndex: number) => `r/${threadReportID}/edit/distance/${transactionID}/waypoint/${waypointIndex}`},
MONEY_REQUEST_DISTANCE_TAB: { route: ':iouType/new/:reportID?/distance', getRoute: (iouType: string, reportID = '') => `${iouType}/new/${reportID}/distance`},
MONEY_REQUEST_MANUAL_TAB: ':iouType/new/:reportID?/manual',
MONEY_REQUEST_SCAN_TAB: ':iouType/new/:reportID?/scan',
MONEY_REQUEST: {route: ':iouType/new/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/${reportID}`},
MONEY_REQUEST_AMOUNT: {route: ':iouType/new/amount/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/amount/${reportID}`},
MONEY_REQUEST_PARTICIPANTS: {route: ':iouType/new/participants/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/participants/${reportID}`},
MONEY_REQUEST_CONFIRMATION: {route: ':iouType/new/confirmation/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/confirmation/${reportID}`},
MONEY_REQUEST_DATE: {route: ':iouType/new/date/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/date/${reportID}`},
MONEY_REQUEST_CURRENCY: {
route: ':iouType/new/currency/:reportID?',
getRoute: (iouType: string, reportID: string, currency: string, backTo: string) => `${iouType}/new/currency/${reportID}?currency=${currency}&backTo=${backTo}`,
},
MONEY_REQUEST_DESCRIPTION: {route: ':iouType/new/description/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/description/${reportID}`},
MONEY_REQUEST_CATEGORY: {route: ':iouType/new/category/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/category/${reportID}`},
MONEY_REQUEST_TAG: {route: ':iouType/new/tag/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/tag/${reportID}`},
MONEY_REQUEST_MERCHANT: {route: ':iouType/new/merchant/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/merchant/${reportID}`},
MONEY_REQUEST_WAYPOINT: {route: ':iouType/new/waypoint/:waypointIndex', getRoute: (iouType: string, waypointIndex: number) => `${iouType}/new/waypoint/${waypointIndex}`},
MONEY_REQUEST_RECEIPT: {route: ':iouType/new/receipt/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/receipt/${reportID}`},
MONEY_REQUEST_ADDRESS: {route: ':iouType/new/address/:reportID?', getRoute: (iouType: string, reportID = '') => `${iouType}/new/address/${reportID}`},
MONEY_REQUEST_EDIT_WAYPOINT: {
route: 'r/:threadReportID/edit/distance/:transactionID/waypoint/:waypointIndex',
getRoute: (threadReportID: number, transactionID: string, waypointIndex: number) => `r/${threadReportID}/edit/distance/${transactionID}/waypoint/${waypointIndex}`,
},
MONEY_REQUEST_DISTANCE_TAB: {route: ':iouType/new/:reportID?/distance', getRoute: (iouType: string, reportID = '') => `${iouType}/new/${reportID}/distance`},
MONEY_REQUEST_MANUAL_TAB: ':iouType/new/:reportID?/manual',
MONEY_REQUEST_SCAN_TAB: ':iouType/new/:reportID?/scan',

IOU_REQUEST: 'request/new',
IOU_SEND: 'send/new',
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.