-
Notifications
You must be signed in to change notification settings - Fork 4k
Add 'Exported to' to custom columns #77946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
217baa7
add exported icon
JS00001 4e3339f
lang updates
JS00001 7ff7db6
create exported icon cell
JS00001 7b16fec
add exported to the table and expense report
JS00001 5721986
add visibility
JS00001 5be35b0
add icons
JS00001 c9a1a6f
update sizing and avatars
JS00001 2320a64
sub to actions, add header for reports
JS00001 402f23a
rename to exportedto
JS00001 26099f7
add export labels
JS00001 9466416
add logic for the icons
JS00001 0ba4116
use some for errs
JS00001 79fac35
add new table svg
JS00001 7074e26
Merge branch 'main' of github.com:Expensify/App into jsenyitko-releas…
JS00001 28ef901
add tests
JS00001 b095524
add svg icons for bill certinia and trinet
JS00001 31fac34
add new icons
JS00001 6a7f6b6
update conditions for all items
JS00001 a9f15e5
update icons and conditions
JS00001 d3824bd
compress svgs, fix react compiler checks
JS00001 9450d82
fix cspell
JS00001 c94acd9
Merge branch 'main' of github.com:Expensify/App into jsenyitko-releas…
JS00001 ecd34cf
use exported for sorting
JS00001 106536c
Merge branch 'main' of github.com:Expensify/App into jsenyitko-releas…
JS00001 77659cd
Merge branch 'main' of github.com:Expensify/App into jsenyitko-releas…
JS00001 1b5ccfe
resolve conflicts
luacmartins 89dc41f
more conflicts
luacmartins b6f6cf9
update column size
luacmartins 348fa9a
Merge branch 'main' into jsenyitko-release-4-exported
luacmartins e326ba5
center icons
luacmartins 5dcb487
resolve conflicts
luacmartins 1383cb8
fix sort
luacmartins ca9478c
update lable
luacmartins 50f72db
coalesce amount
luacmartins 2698471
Revert "coalesce amount"
luacmartins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -244,6 +244,7 @@ | |
| "falso", | ||
| "favicons", | ||
| "Ferroalloy", | ||
| "FinancialForce", | ||
| "firebaselogging", | ||
| "firstname", | ||
| "Fiscale", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
src/components/SelectionListWithSections/Search/ExportedIconCell.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| import React from 'react'; | ||
| import {View} from 'react-native'; | ||
| import Avatar from '@components/Avatar'; | ||
| import Icon from '@components/Icon'; | ||
| import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset'; | ||
| import useOnyx from '@hooks/useOnyx'; | ||
| import useTheme from '@hooks/useTheme'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
| import {getOriginalMessage, isExportedToIntegrationAction} from '@libs/ReportActionsUtils'; | ||
| import CONST from '@src/CONST'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
|
|
||
| type ExportedIconCellProps = { | ||
| reportID?: string; | ||
| }; | ||
|
|
||
| function ExportedIconCell({reportID}: ExportedIconCellProps) { | ||
| const theme = useTheme(); | ||
| const styles = useThemeStyles(); | ||
| const reportActions = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {canBeMissing: true}); | ||
| const icons = useMemoizedLazyExpensifyIcons(['NetSuiteSquare', 'XeroSquare', 'IntacctSquare', 'QBOSquare', 'Table', 'ZenefitsSquare', 'BillComSquare', 'CertiniaSquare']); | ||
|
|
||
| const actions = Object.values(reportActions[0] ?? {}); | ||
|
|
||
| let isExportedToCsv = false; | ||
| let isExportedToNetsuite = false; | ||
| let isExportedToXero = false; | ||
| let isExportedToIntacct = false; | ||
| let isExportedToQuickbooksOnline = false; | ||
| let isExportedToQuickbooksDesktop = false; | ||
| let isExportedToCertinia = false; | ||
| let isExportedToBillCom = false; | ||
| let isExportedToZenefits = false; | ||
|
|
||
| for (const action of actions) { | ||
| if (action.actionName === CONST.REPORT.ACTIONS.TYPE.EXPORTED_TO_CSV) { | ||
| isExportedToCsv = true; | ||
| } | ||
|
|
||
| if (isExportedToIntegrationAction(action)) { | ||
| const label = getOriginalMessage(action)?.label; | ||
|
Comment on lines
+40
to
+41
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Coming from the #78226 checklist: when an export template is created on OldDot or when exporting “All Data,” we should verify it using the action type |
||
| isExportedToXero = isExportedToXero || label === CONST.EXPORT_LABELS.XERO; | ||
| isExportedToIntacct = isExportedToIntacct || label === CONST.EXPORT_LABELS.INTACCT; | ||
| isExportedToNetsuite = isExportedToNetsuite || label === CONST.EXPORT_LABELS.NETSUITE; | ||
| isExportedToQuickbooksOnline = isExportedToQuickbooksOnline || label === CONST.EXPORT_LABELS.QBO; | ||
| isExportedToQuickbooksDesktop = isExportedToQuickbooksDesktop || label === CONST.EXPORT_LABELS.QBD; | ||
| isExportedToZenefits = isExportedToZenefits || label === CONST.EXPORT_LABELS.ZENEFITS; | ||
| isExportedToBillCom = isExportedToBillCom || label === CONST.EXPORT_LABELS.BILLCOM; | ||
| isExportedToCertinia = isExportedToCertinia || label === CONST.EXPORT_LABELS.CERTINIA; | ||
| } | ||
| } | ||
|
|
||
| return ( | ||
| <View style={[styles.flexRow, styles.gap2]}> | ||
| {isExportedToCsv && ( | ||
| <Icon | ||
| src={icons.Table} | ||
| fill={theme.icon} | ||
| small | ||
| /> | ||
| )} | ||
| {isExportedToNetsuite && ( | ||
| <Avatar | ||
| source={icons.NetSuiteSquare} | ||
| type={CONST.ICON_TYPE_AVATAR} | ||
| size={CONST.AVATAR_SIZE.MID_SUBSCRIPT} | ||
| /> | ||
| )} | ||
| {isExportedToXero && ( | ||
| <Avatar | ||
| source={icons.XeroSquare} | ||
| type={CONST.ICON_TYPE_AVATAR} | ||
| size={CONST.AVATAR_SIZE.MID_SUBSCRIPT} | ||
| /> | ||
| )} | ||
| {isExportedToIntacct && ( | ||
| <Avatar | ||
| source={icons.IntacctSquare} | ||
| type={CONST.ICON_TYPE_AVATAR} | ||
| size={CONST.AVATAR_SIZE.MID_SUBSCRIPT} | ||
| /> | ||
| )} | ||
| {(isExportedToQuickbooksOnline || isExportedToQuickbooksDesktop) && ( | ||
| <Avatar | ||
| source={icons.QBOSquare} | ||
| type={CONST.ICON_TYPE_AVATAR} | ||
| size={CONST.AVATAR_SIZE.MID_SUBSCRIPT} | ||
| /> | ||
| )} | ||
| {isExportedToCertinia && ( | ||
| <Avatar | ||
| source={icons.CertiniaSquare} | ||
| type={CONST.ICON_TYPE_AVATAR} | ||
| size={CONST.AVATAR_SIZE.MID_SUBSCRIPT} | ||
| /> | ||
| )} | ||
| {isExportedToBillCom && ( | ||
| <Avatar | ||
| source={icons.BillComSquare} | ||
| type={CONST.ICON_TYPE_AVATAR} | ||
| size={CONST.AVATAR_SIZE.MID_SUBSCRIPT} | ||
| /> | ||
| )} | ||
| {isExportedToZenefits && ( | ||
| <Avatar | ||
| source={icons.ZenefitsSquare} | ||
| type={CONST.ICON_TYPE_AVATAR} | ||
| size={CONST.AVATAR_SIZE.MID_SUBSCRIPT} | ||
| /> | ||
| )} | ||
| </View> | ||
| ); | ||
| } | ||
|
|
||
| export default ExportedIconCell; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.