-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Sage intacct export: offline and error #44739
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
yuwenmemon
merged 30 commits into
Expensify:main
from
software-mansion-labs:war-in/sage-intacct-export-config-offline-error
Jul 15, 2024
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
7a0ba43
update SelectionScreen and add Offline with feedback to components
war-in 9088361
add offline with feedback to remaining pages
war-in 91c62d9
show errors in correct places
war-in 95da618
style selection screen correctly
war-in c420893
move error and pending fields up in onyx data
war-in 42f683c
handle offline state
war-in d2c8472
Merge branch 'refs/heads/main' into war-in/sage-intacct-export-config…
war-in 36ba4c9
Merge branch 'refs/heads/war-in/sage-intacct-export-config' into war-…
war-in 80cc058
track errors in (non)reimbursable in main page
war-in 968970a
Merge branch 'refs/heads/war-in/sage-intacct-export-config' into war-…
war-in c836521
address comments
war-in 59c0fa8
use already defined type
war-in 76b2328
Merge branch 'refs/heads/war-in/sage-intacct-export-config' into war-…
war-in 32d879f
Merge branch 'refs/heads/war-in/sage-intacct-export-config' into war-…
war-in 847706e
Merge branch 'refs/heads/war-in/sage-intacct-export-config' into war-…
war-in a6d6588
include safe area padding bottom on errors
war-in 452d279
polish endpoints usages
war-in 759c350
Merge branch 'refs/heads/war-in/sage-intacct-export-config' into war-…
war-in df588a0
Merge branch 'refs/heads/main' into war-in/sage-intacct-export-config…
war-in e39b199
Merge branch 'refs/heads/main' into war-in/sage-intacct-export-config…
war-in 97f476a
fix Policy.ts after merge
war-in 43fc0f8
make error message sticky
war-in b70782a
fix margin in non-reimbursable config
war-in 5f9dc94
fix prettier
war-in 0bd28cc
dry the code
war-in d465864
Merge branch 'refs/heads/war-in/demonstrate-sticky-footer' into war-i…
war-in 161f0ec
unify spacing
war-in 51fe9f1
Merge branch 'refs/heads/main' into war-in/sage-intacct-export-config…
war-in 4285951
fix selection list padding bottom in (non)reimbursable pages
war-in fcb95f9
Merge branch 'refs/heads/main' into war-in/sage-intacct-export-config…
war-in 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
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,43 @@ | ||
| import {mapValues} from 'lodash'; | ||
| import React from 'react'; | ||
| import type {StyleProp, ViewStyle} from 'react-native'; | ||
| import type * as OnyxCommon from '@src/types/onyx/OnyxCommon'; | ||
| import type {ReceiptError, ReceiptErrors} from '@src/types/onyx/Transaction'; | ||
| import {isEmptyObject} from '@src/types/utils/EmptyObject'; | ||
| import MessagesRow from './MessagesRow'; | ||
|
|
||
| type ErrorMessageRowProps = { | ||
| /** The errors to display */ | ||
| errors?: OnyxCommon.Errors | ReceiptErrors | null; | ||
|
|
||
| /** Additional style object for the error row */ | ||
| errorRowStyles?: StyleProp<ViewStyle>; | ||
|
|
||
| /** A function to run when the X button next to the error is clicked */ | ||
| onClose?: () => void; | ||
|
|
||
| /** Whether we can dismiss the error message */ | ||
| canDismissError?: boolean; | ||
| }; | ||
|
|
||
| function ErrorMessageRow({errors, errorRowStyles, onClose, canDismissError = true}: ErrorMessageRowProps) { | ||
| // Some errors have a null message. This is used to apply opacity only and to avoid showing redundant messages. | ||
| const errorEntries = Object.entries(errors ?? {}); | ||
| const filteredErrorEntries = errorEntries.filter((errorEntry): errorEntry is [string, string | ReceiptError] => errorEntry[1] !== null); | ||
| const errorMessages = mapValues(Object.fromEntries(filteredErrorEntries), (error) => error); | ||
| const hasErrorMessages = !isEmptyObject(errorMessages); | ||
|
|
||
| return hasErrorMessages ? ( | ||
| <MessagesRow | ||
| messages={errorMessages} | ||
| type="error" | ||
| onClose={onClose} | ||
| containerStyles={errorRowStyles} | ||
| canDismiss={canDismissError} | ||
| /> | ||
| ) : null; | ||
| } | ||
|
|
||
| ErrorMessageRow.displayName = 'ErrorMessageRow'; | ||
|
|
||
| export default ErrorMessageRow; |
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.
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.