Skip to content

[Certinia] R2 PSA: SRP CertiniaCompanySelectorPage and PSA translations #89442

@yuwenmemon

Description

@yuwenmemon

Parent: Expensify/Expensify#589894
Design doc: https://docs.google.com/document/d/1qQXU4EIij-OyCpk6z8idi0ch0rP4XtIQ0770STZeF5E/edit

Scope

Build the SRP CertiniaCompanySelectorPage (only relevant when both modules are active), wire it into accounting/utils.tsx, and add the Release 2 PSA translation keys to en.ts. With this issue landed, Release 2 is feature-complete and the beta flag can come off.

Implementation notes (from design doc)

src/pages/workspace/accounting/certinia/CertiniaCompanySelectorPage.tsx — Create (SRP)

Only relevant when hasPSA === true && hasPSAOnly === false (SRP: both modules active). Lists companies from policy?.connections?.financialForce?.data?.companies as radio options. Calls updateFinancialForceCompany(policyID, companyID).

In getAccountingIntegrationData (SRP: both modules active), surface navigation to this page as an additional MenuItemWithTopDescription on the main Accounting connection card when hasPSA && !hasPSAOnly, pointing to POLICY_ACCOUNTING_CERTINIA_COMPANY_SELECTOR.getRoute(policyID).

Also update the subscribed*Settings arrays in accounting/utils.tsx to include PSA-specific keys based on ffaConfig?.hasPSA (e.g., PARENT_TAG_MAPPING, SYNC_MILESTONES, REPORT_EXPORT_STATUS, TAX_NON_BILLABLE, EXPORT_FOREIGN_CURRENCY) so the connection card shows the right pending/error indicators for PSA workspaces.

src/languages/en.ts — Add PSA translation keys

certinia.import.expenseTypeGlaMappings = 'Expense type GLA mappings'
certinia.import.expenseTypeGlaMappingsDescription = 'FinancialForce Expense Type GLA Mappings are imported into Expensify as categories.'
certinia.import.tagsMappedTo = 'Tags should be mapped to'
certinia.import.projectsAndAssignments = 'Projects and Assignments'
certinia.import.projects = 'Projects'
certinia.import.assignments = 'Assignments'
certinia.import.milestones = 'Milestones'
certinia.import.milestonesDescription = 'When enabled, milestones associated with PSA projects are synced into Expensify.'
certinia.export.expenseReportStatus = 'Expense report status'
certinia.export.reportStatuses.APPROVED = 'Approved'
certinia.export.reportStatuses.SUBMITTED = 'Submitted'
certinia.advanced.taxNonBillable = 'Export tax as non-billable'
certinia.advanced.taxNonBillableDescription = 'When enabled, tax is marked as non-billable on export to PSA.'
certinia.advanced.exportForeignCurrency = 'Export foreign currency amount'
certinia.advanced.exportForeignCurrencyDescription = 'When disabled, expenses are converted to the report currency before export.'
certinia.companySelector = 'Company'

Stub corresponding entries in es.ts.

Tests (Release 2 verification)

After this issue lands, the Release 2 staging checklist should pass:

  1. FFA workspace: all Release 1 screens unchanged.
  2. PSA workspace (hasPSA === true): import page shows locked Expense Type GLA Mappings toggle, Tags push row, Milestones toggle — no Dimension rows, no Tax toggle.
  3. Tags Mapping page shows 3 radio options; selecting one updates the subtitle optimistically.
  4. PSA export: Preferred Exporter, Expense Report Status, two static rows — no Default Vendor, no Invoice Date.
  5. PSA advanced: Auto Sync + Tax Non-Billable + Export Foreign Currency — no Sync Reimbursed Reports.
  6. SRP connection (hasPSA && !hasPSAOnly): Company Selector row visible on main Accounting page; selecting a company fires the action with pending indicator.
  7. All PSA toggles show pending indicator; revert correctly on simulated API failure.
  8. Beta flag absent — Certinia card is visible to all users.
Issue OwnerCurrent Issue Owner: @thelullabyy

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

Status

CRITICAL

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions