Implement a new action to update the configuration for connection with accounting software#38006
Implement a new action to update the configuration for connection with accounting software#38006hayata-suenaga wants to merge 34 commits intomainfrom
Conversation
|
@paultsimura Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@hayata-suenaga I'm a bit confused about the review here based on the PR description – should I perform just the code review (+ check according to the doc) and fill the checklist based on it? |
|
@paultsimura the backend API this action function invokes is not ready yet. And the code to invoke this action function will be implemented later. There is no way to test this PR right now. Could you do the code review without testing? |
|
Yes, I'll review today👍 |
paultsimura
left a comment
There was a problem hiding this comment.
Please also merge main – there are some conflicts.
Co-authored-by: Pavlo Tsimura <paultsimura@gmail.com>
Co-authored-by: Pavlo Tsimura <paultsimura@gmail.com>
aldo-expensify
left a comment
There was a problem hiding this comment.
I think those types are better because they provide better checks by avoiding unknown. I'm not completely sure if they will complicate things when we try to use these functions though.
src/libs/API/parameters/UpdatePolicyConnectionConfigurationParams.ts
Outdated
Show resolved
Hide resolved
|
@aldo-expensify this is one of the best PR reviews I've gotten in my Expensify life. I'm just so impressed by your suggestion to use generics. It works so beautifully. |
|
The type check is failing |
src/libs/API/types.ts
Outdated
| [WRITE_COMMANDS.UPDATE_POLICY_DISTANCE_RATE_VALUE]: Parameters.UpdatePolicyDistanceRateValueParams; | ||
| [WRITE_COMMANDS.SET_POLICY_DISTANCE_RATES_ENABLED]: Parameters.SetPolicyDistanceRatesEnabledParams; | ||
| [WRITE_COMMANDS.DELETE_POLICY_DISTANCE_RATES]: Parameters.DeletePolicyDistanceRatesParams; | ||
| [WRITE_COMMANDS.UPDATE_POLICY_CONNECTION_CONFIGURATION]: Parameters.UpdatePolicyConnectionConfigurationParams<never, never>; |
There was a problem hiding this comment.
A way around the type error is this:
| [WRITE_COMMANDS.UPDATE_POLICY_CONNECTION_CONFIGURATION]: Parameters.UpdatePolicyConnectionConfigurationParams<never, never>; | |
| [WRITE_COMMANDS.UPDATE_POLICY_CONNECTION_CONFIGURATION]: Parameters.UpdatePolicyConnectionConfigurationParams<any, any>; |
I'm not sure if there is a better way, maybe there is 🤷
There was a problem hiding this comment.
I decided to use the any type here as there is no other good alternative that comes to my mind.
The only other option I considered is to make the entire WriteCommandParameters generic, which is not feasible.
Reviewer Checklist
Screenshots/VideosN/A |
|
@johnmlee101 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@aldo-expensify, I'd appreciate it if you could review the PR when you have time 🙇 This is the change I made since your last review 😄 |
|
Sorry @hayata-suenaga for the delay, you have some typescript errors to solve: |
|
This was implemented as part of this PR. Closing this PR |






Details
This PR implements a new action function to be used in new screens related to accounting connection configurations.
Fixed Issues
$ #38005
PROPOSAL: N/A
Tests
There is not yet a front end code that calls this function. The backend code is also not yet updated to expose the
UpdateConnectionConfigcommand that is called inside this function.Thus, currently, there is no way to test this function. Once both front end and backend code is ready, the change should be tested in an App PR.
QA Steps
No QA
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionChecked that the app builds and ran on web
Tests cannot be performed against changes in this PR yet
toggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-03-08.at.12.40.02.PM.mov
MacOS: Desktop
cc: @aldo-expensify