Skip to content

[Due for payment 2025-04-28] Update Company Cards page to potentially show domain feeds #59837

@puneetlath

Description

@puneetlath

Part of the Cross compatible Corporate Cards project

Main issue: https://github.com/Expensify/Expensify/issues/467915
Doc section: https://docs.google.com/document/d/1KHrQgvdZWvCwUkptjjW_oqnl0umyVNiPe7KIHCD1pBA/edit?tab=t.0#heading=h.hn90zqqqm7w9

Feature Description

Let's update the Third Party Company Cards page of the workspace editor to display domain feeds as described in the doc here.

To do this we will need to:

  1. Support showing domain third party card feeds when the current workspace is set as the primary policy for the feed. We will know this is the case if the Expensify Card settings in Onyx have the current workspace set as the preferredPolicy like below on the domain_member nvp data.
  2. We should show only the domain feed if there is no workspace feed set up
  3. We should show the feed selector, if there is a workspace feed and some amount of domain feeds. Or if there are multiple domain feeds
  4. Everything else should work just like it currently does

Onyx shape:

{
	"onyxData": [
		{
			"key": "sharedNVP_private_domain_member_19527211",
			"onyxMethod": "set",
			"value": {
				"settings": {
					"discover.com": {
						"asrEnabled": false,
						"forceReimbursable": "force_no",
						"liabilityType": "corporate",
						"preferredPolicy": "8548D13C46AEFD4B",
						"reportTitleFormat": "",
						"shouldApplyCashbackToBill": true,
						"statementPeriodEndDay": 1,
						"uploadLayoutSettings": []
					}
				}
			}
		}
	]
}

Manual Test Steps

  1. Create an account that is an admin on domainA and policyB
  2. Add an third party domain feed to domainA and set policyB as the preferred policy
  3. Open policyB in NewDot and go to the Company Cards page
  4. Make sure the feed shows up and you can assign cards, edit the settings, etc
  5. Create a new domainC same account as admin on the domain
  6. Add an third party domain feed to domainC and set policyB as the preferred policy
  7. Open policyB in NewDot and go to the Company Cards page
  8. Make sure both feeds shows up and you can assign cards, edit the settings, etc
  9. Add a workspace third party feed to policyB
  10. Open policyB in NewDot and go to the Company Cards page
  11. Make sure all three feeds shows up and you can assign cards, edit the settings, etc

Automated Tests

tbd

Issue OwnerCurrent Issue Owner: @maddylewis

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2NewFeatureSomething to build that is a new item.ReviewingHas a PR in review

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions