Open yuwenmemon opened 3 weeks ago
Triggered auto assignment to @strepanier03 (NewFeature
), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.
:warning: It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time :warning:
Job added to Upwork: https://www.upwork.com/jobs/~018ff86748aefd4c38
Current assignee @mananjadhav is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Design team member for new feature review - @dubielzyk-expensify (NewFeature
)
Following along. If my assignment is meant to assign a content writer I might hand off as I'm doing resource management for the august 1 release already and that's a killer on bandwidth.
@mananjadhav, @yuwenmemon, @strepanier03, @dubielzyk-expensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
No update.
I will be working on this towards the weekend/next week after I finish the Auth screen.
Thanks for sharing that update @mananjadhav.
Any updates?
@mananjadhav, @yuwenmemon, @strepanier03, @dubielzyk-expensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Working on the TokenInput. I'll start this on the weekend.
Tracking Issue: https://github.com/Expensify/Expensify/issues/377671
Design Doc Section: https://docs.google.com/document/d/1WubNv_VAv78IxG4FKsi9aS0pWESfWvUYbqBAAy5b4bc/edit#heading=h.959vyh4x5v9l
(High-Level Section)
Routes
Route:
/settings/workspaces/{policyID}/accounting/netsuite/import
Route:
/settings/workspaces/{policyID}/accounting/netsuite/import/{field}
Route:
/settings/workspaces/{policyID}/accounting/netsuite/import/custom-segments
NetSuiteImportCustomSegmentsPage
Route:
/settings/workspaces/{policyID}/accounting/netsuite/import/custom-lists
NetSuiteImportCustomListsPage
Route:
/settings/workspaces/{policyID}/accounting/netsuite/import/custom-segments/edit/{internalId}
NetSuiteImportEditCustomSegmentPage
UpdateNetSuiteCustomSegments
customSegments
- JSON Array of all the custom segments. Each object would consist ofsegmentName
,internalID
,scriptID
,mapping
. In this scenario we would replace the element of the array and always set the whole array in the API call.Route:
/settings/workspaces/{policyID}/accounting/netsuite/import/custom-lists/{transactionFieldId}
NetSuiteImportViewCustomListPage
UpdateNetSuiteCustomLists
customLists
- JSON Array of all the custom lists. Each object would consist oflistName
,internalID
,transactionFieldID
,mapping
. In this scenario we would replace the element of the array and always set the whole array in the API call.Route:
/settings/workspaces/{policyID}/accounting/netsuite/import/custom-segments/new
NetSuiteImportAddCustomSegmentsPage
UpdateNetSuiteCustomSegments
customSegments
- JSON Array of all the custom segments. Each object would consist ofsegmentName
,internalID
,scriptID
,mapping
. Ideally we would append to the existing array when adding and always set the array.Route:
/settings/workspaces/{policyID}/accounting/netsuite/import/custom-lists/new
NetSuiteImportAddCustomListsPage
UpdateNetSuiteCustomLists
customLists
- JSON Array of all the custom lists. Each object would consist oflistName
,internalID
,transactionFieldID
,mapping
. Ideally we would append to the existing array when adding and always set the array.NetSuiteImportPage
We’ll start with the first main page for the import called
NetSuiteImportPage
.We will create a
NetSuiteImportPage
component for this menu of options. The import settings contain several settings. We’ll divide them into three sections.Section 1:
ConnectionLayout
. The example code is defined towards the end.ToggleSettingOptionRow
to represent the Expense Categories.Section 2:
The component contains five options mentioned in the UI frame earlier, each of them wrapped with
OfflineWithFeedback
. ThependingAction
will be the value ofpolicy.pendingFields.netsuite[settingName]
for each. Each will pull the title from the existing value inNetSuiteConfig
and the description from the appropriate translation. We’ll fill this in manually:policy.connections.netsuite.options.config.syncOptions.mapping.deparments
.policy.connections.netsuite.options.config.syncOptions.mapping.classes
.policy.connections.netsuite.options.config.syncOptions.mapping.locations
.policy.connections.netsuite.options.config.syncOptions.mapping.customers
.policy.connections.netsuite.options.config.syncOptions.mapping.projects
.Tapping on each setting on the Import page will push it to its own page/pane, using an
onPressConfigOption
function opening a generic screen:NetSuiteImportMappingPage
.This will navigate to the appropriate page below using
Navigation.navigate([ROUTE])
.Because each of the pages has a common structure, we’ll build one screen using the
ConnectionLayout
. Based on the selection of the menu we’ll show ahelperText
below the menu. For example, when Departments has Tags selected, it will show Departments will be selectable for each individual expense on an employee’s report.To support this, we'll need to update
SelectionScreen
to allow showing ahelperText
based on the selected field. This will require a regression test on Xero/QBO screens as well though.The following table lists down different aspects of the screens.
For each of the pages the listed options seem to be the same. We’ll use the
SelectionScreen
component that’ll accept thepolicy
andsettingName
as two props.We will pull the configuration options from the connections object by separating out
policy.connections.netsuite.config
asNetSuiteConfig
. In order to make human-readable versions of the values, we’ll extend the keys in theaccounting.importTypes
(in the example below, raw strings are used but we’ll use keys in en.ts and es.ts as it’s the standard):The commands to be used are mentioned in the table above.
The basic code for the page will look as follows:
NetSuiteImportMappingPage
This is a common mapping screen that allows you to choose the options - Tag, Report, etc. for the given field. The following code implements the SelectionScreen described here. The Selection screen takes care of the access, the policy checks, header, navigation and the title. Additionally, it needs the sections prop where we pass the list of import types.
Section 3:
Our next set of fields consists of implementing a multi-step form like we have for Add Bank account workflow in the workspaces. The following fields are covered in this section
**- Custom Segments
Each screen type consists of three types of screens: Listing screen, Edit screen and the "Form workflow".
Listing screen:
Illustrations.EmptyStateExpenses
as the icon.Description: View detailed instructions on configuring custom segment/record.
Description: View detailed instructions on configuring custom list.
Form workflow:
AddCustomSegmentPage
andAddCustomListPage
respectively, which are tied to the routes added here.Add generic component code structure:
This code gives us a basic structure of the root component where the form and steps are added.
Substep component code structure:
Each step of the form is added as its own separate component. We could further DRY the code by plucking out only the form component so that it can be used for the edit screen.
Single Custom segment/records/list View
This page will be different for each type - CustomSegments and CustomLists as we’re going to list down each field for the pages. We should be able to map the fields from the form based on the constants defined earlier, for ex.
CUSTOM_SEGMENT_STEPS.SCRIPT_ID
.This will help us loop through the fields and display the information using
MenuItemWithDescription
.Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @mananjadhav