Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.03k stars 2.54k forks source link

[Wave Collect] [Xero] Hide guides as exporters #42345

Open rushatgabhane opened 2 weeks ago

rushatgabhane commented 2 weeks ago

Slack 🧵

We should hide the assignedGuide in the preferred exporter list, like we hide them from the members table on the workspace. There should be logic for this somewhere from QBO to follow.

Also, the current preferred exporter should be highlighted in the selection list.

image
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

trjExpensify commented 1 week ago

@rushatgabhane hiding the expensify.com/team.expensify.com admins is testing well on the adhoc build of the freeze branch. That said, the current selection in the selectList is still not highlighted or has a green checkmark:

image

Steps I took were pretty straightforward to reproduce, but below for ref:

  1. Create a new account
  2. Choose "Manage my team's expenses" to create the workspace
  3. Enable Accounting in More features
  4. Connect to Xero
  5. Wait for the sync to complete
  6. Go to Export > Preferred exporter
rushatgabhane commented 1 week ago

thank you, i couldn't reproduce it on my account but let me debug it on a new account

trjExpensify commented 1 week ago

Any luck on that?

rushatgabhane commented 1 week ago

@trjExpensify yes, im able to repro this on a new workspace

image
rushatgabhane commented 1 week ago

@trjExpensify this same bug is repro for Quickbooks too -

This is because exportConfiguration.exporter is undefined on connect and remains undefined till we manually select. I think this should be fixed on the backend when the connection is made. @lakchote what do you think?

Steps here

image
trjExpensify commented 1 week ago

Looking at this now.

trjExpensify commented 1 week ago

This seems kinda' strange, why can't I find exportConfiguration.exporter in the policyConnections data in the console on OldDot?

g_policyPage.policy.policy.connections.xero.config

image
francoisl commented 1 week ago

Is it possible you never opened the config modal in OldDot and clicked "Save"? It's supposed to open by default when you connect the policy, and you're supposed to choose which accounts to export to, etc. My guess is that the exporter is only saved at that point.

trjExpensify commented 1 week ago

Is it possible you never opened the config modal in OldDot and clicked "Save"?

Yeah, I made the connection via NewDot. But I would have thought at least the preferredExporter would be there and null if not set? I can try again afresh on OldDot.

trjExpensify commented 1 week ago

Okay yeah.. so a couple of things:

  1. After making the connection and the config settings pop-up opens, the preferred exporter has a value selected, but the exporter field does not appear in the policyConnections data
  2. I hit Save and then the exporter field appears in the policyConnections data.

https://github.com/Expensify/App/assets/16232057/9187047c-3d68-4aab-bad0-b2467d50a566

trjExpensify commented 1 week ago

Not sure how that is going to translate to NewDot though. We don't have to click "Save" after making the connection to trigger that.

@trjExpensify this same bug is repro for Quickbooks too -

By contrast, it seems fine and selected when I connect a new workspace to QBO on NewDot:

image
francoisl commented 1 week ago

After making the connection and the config settings pop-up opens, the preferred exporter has a value selected, but the exporter field does not appear in the policyConnections data

It's "selected" because it's the first option in the dropdown and that's what your browser does if we don't specify which value it should show as selected by default, but it's not saved in the policy config. We need a small backend change to set a default value for the exporter when we create the config, feel free to open an internal issue and assign it to me.

francoisl commented 1 week ago

(Or I guess we can reuse this one too 😄)

trjExpensify commented 1 week ago

Haha yeah, we can just use this one. I'll co-assign yah.. thanks!

francoisl commented 3 days ago

The backend changes to always set an exporter are on staging now.