Add receipt partners to the more features page#68037
Conversation
|
@dukenv0307 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] |
|
@waterim Should we add the feature flag for |
|
@dukenv0307 added! |
|
@waterim Seems like |
|
@dukenv0307 you are right! |
…t.svg Co-authored-by: dukenv0307 <129500732+dukenv0307@users.noreply.github.com>
|
@waterim
|
|
@dukenv0307 yes, thats a todo when a real page will appear |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-08-06.at.23.40.05.movAndroid: mWeb ChromeScreen.Recording.2025-08-06.at.23.37.22.moviOS: HybridAppScreen.Recording.2025-08-07.at.00.15.09.moviOS: mWeb SafariScreen.Recording.2025-08-06.at.23.32.45.movMacOS: Chrome / SafariScreen.Recording.2025-08-06.at.23.30.49.movMacOS: DesktopScreen.Recording.2025-08-06.at.23.44.05.mov |
|
LGTM |
| isActive: policy?.areReceiptPartnersEnabled ?? false, | ||
| pendingAction: policy?.pendingFields?.areReceiptPartnersEnabled, | ||
| disabledAction: () => { | ||
| // TODO: When Uber integration is added, check if any integration exists |
There was a problem hiding this comment.
We don't have any integrations in this PR, it just adding a workspace feature, for a disabledAction we need to get an receiptPartners from the policy and add a check (!hasReceiptPartnersIntegration) return;
| setIsReceiptPartnersWarningModalOpen(true); | ||
| }, | ||
| action: (isEnabled: boolean) => { | ||
| if (!policyID) { |
There was a problem hiding this comment.
because policyID has type: string | undefined
There was a problem hiding this comment.
Why? We can't be in the workspace more feature page without an ID
There was a problem hiding this comment.
yes, but thats just a types, policyID is always like this on the pages
There was a problem hiding this comment.
Not sure I follow. Are you saying this can never be falsy but we are checking everywhere anyway?
And if so, why would we do that?
There was a problem hiding this comment.
Policy itself can be undefined in theory, thats why policyID is string | undefined also
Normally policy will not be undefined as we have a loading indicator for that, but thats just how withPolicyAndFullscreenLoading works, it returns policy object with type of policy or undefined
There was a problem hiding this comment.
So actually this component will never be rendered with an undefined policy because FullscreenLoadingIndicator ensures that this component (or any other using it) is not rendered if the policy is not set?
There was a problem hiding this comment.
Going to merge since this is not related to this PR really, is a broader conversation, but I am still interested in the answer of my question above.
| } | ||
| enablePolicyReceiptPartners(policyID, isEnabled); | ||
| }, | ||
| disabled: false, // TODO: When Uber integration is added, set to hasReceiptPartnersIntegration |
There was a problem hiding this comment.
Not sure what exactly this is referring to, can you clarify?
There was a problem hiding this comment.
And for that we need to get from the policy data if uber exists in policy or no
There was a problem hiding this comment.
const hasReceiptPartnersIntegration = !isEmptyObject(policy?.receiptPartners);
There was a problem hiding this comment.
As I can see in the @narefyev91 PR he already added typings and we will need just to add a one line verification here
There was a problem hiding this comment.
Don't get why you can't add this now. The api should already be returning this, but even if it is not, you can still assume it will be there.
Also, !isEmptyObject(policy?.receiptPartners); is probably not correct, as that will always return true, since it will contain the enabled: true property
There was a problem hiding this comment.
Don't get why you can't add this now. The api should already be returning this, but even if it is not, you can still assume it will be there.
Okay, sure, I will update types here in this PR
|
From a design perspective this is looking good 👍 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 9.1.91-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.1.92-5 🚀
|


Details
Fixed Issues
$ #67526
PROPOSAL: N/A
Tests
Precondition:
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Details