Skip to content
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

Transactions - Update Generic Receipts to use ReceiptBackground #34843

Merged
Merged
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
d99d92d
implemented receipt image component
FitseTLT Jan 19, 2024
a1f5f69
pass receipt name for non modal display
FitseTLT Jan 19, 2024
7dfd885
minor fix
FitseTLT Jan 19, 2024
e9c7666
changed implementation
FitseTLT Jan 20, 2024
e88e1ce
fix styling
FitseTLT Jan 20, 2024
26fa66b
fix borderRadius
FitseTLT Jan 20, 2024
d4abf53
type fix
FitseTLT Jan 20, 2024
63b41f6
minor fix
FitseTLT Jan 20, 2024
404fd8c
passed transaction prop
FitseTLT Jan 20, 2024
d6c274e
resolved conflict
FitseTLT Jan 23, 2024
9d38d93
updated attachement modal to consider thumnail display
FitseTLT Jan 23, 2024
796c340
minor fix
FitseTLT Jan 23, 2024
e9e2161
minor revert
FitseTLT Jan 23, 2024
dc760ca
small fix
FitseTLT Jan 23, 2024
7e1fd22
fix on thumbnail display logic
FitseTLT Jan 24, 2024
9a94024
minor type fix
FitseTLT Jan 24, 2024
0cfb3cb
Added file type label support for eThumbnail
FitseTLT Jan 25, 2024
c059ed1
pass transactionID for confirmation
FitseTLT Jan 25, 2024
7008a5d
minor fix
FitseTLT Jan 29, 2024
6a05c03
fix unnecessary condition
FitseTLT Jan 29, 2024
3f019a5
update to static icon layout
FitseTLT Jan 29, 2024
7b55b72
resolved conflicts
FitseTLT Jan 31, 2024
6d7481c
changed to isStaticIconLayout
FitseTLT Jan 31, 2024
e61a6c7
typescript fix
FitseTLT Jan 31, 2024
afbb639
set label text black
FitseTLT Jan 31, 2024
7310663
removed inline styles
FitseTLT Feb 1, 2024
21b5f5e
fix on comment
FitseTLT Feb 1, 2024
73f6495
fixed pending waypoints thumbnail display
FitseTLT Feb 1, 2024
10ff3ee
simplified condition
FitseTLT Feb 1, 2024
1f1b3dc
changed to isReceiptThumbnail prop
FitseTLT Feb 1, 2024
1fb6284
separated Ereceipt and thumbnail logic
FitseTLT Feb 5, 2024
45238a6
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 5, 2024
bb10a48
resolve conflicts
FitseTLT Feb 5, 2024
75ca883
minor lint fix
FitseTLT Feb 5, 2024
ee4d711
fix minor typescript issue
FitseTLT Feb 5, 2024
63c88ec
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 6, 2024
5f07c39
fix type
FitseTLT Feb 6, 2024
8f85721
fix based on comments
FitseTLT Feb 6, 2024
7b14b86
fix type
FitseTLT Feb 7, 2024
2a1ddf3
fix typescript
FitseTLT Feb 7, 2024
660ac05
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 8, 2024
4b058fd
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 12, 2024
6dfc00b
minor change
FitseTLT Feb 12, 2024
4a08601
pass iconSize prop
FitseTLT Feb 12, 2024
60c0773
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 13, 2024
8a97cad
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 13, 2024
f721557
use fetching waypoint function
FitseTLT Feb 13, 2024
c31c4b4
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 20, 2024
0f157fc
fix type
FitseTLT Feb 20, 2024
6db9480
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 21, 2024
c44b430
add fallbackIcon
FitseTLT Feb 21, 2024
7025bfa
applied dynamic thumbnail icon size
FitseTLT Feb 21, 2024
2b1c802
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 21, 2024
94174ba
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 22, 2024
9927c84
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 26, 2024
9eb1edd
use primary color for label text color
FitseTLT Feb 26, 2024
04a5193
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 6, 2024
c90ce7e
add Pdf thumbnail
FitseTLT Mar 6, 2024
9f38e25
updated to fixed color code depending on file extensions
FitseTLT Mar 6, 2024
63dc6f6
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 8, 2024
e05df18
remove unnecessary condition
FitseTLT Mar 8, 2024
b6fd6f4
final refactor changes
FitseTLT Mar 8, 2024
4d18121
minor fix
FitseTLT Mar 8, 2024
aa290ff
minor fix
FitseTLT Mar 8, 2024
b6a111a
minor
FitseTLT Mar 8, 2024
8d38141
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 8, 2024
79a95ff
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 11, 2024
7c1cf62
fix typescript
FitseTLT Mar 11, 2024
3fdef47
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 14, 2024
3a4760d
fix type
FitseTLT Mar 14, 2024
02e8025
suppress eslint warning
FitseTLT Mar 14, 2024
d492e62
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 18, 2024
edd747f
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 19, 2024
c32c8fb
updated label font size and line heights
FitseTLT Mar 19, 2024
edf7677
type update
FitseTLT Mar 21, 2024
e3236a3
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 21, 2024
8a02896
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 25, 2024
1bd9230
made label unselectable
FitseTLT Mar 25, 2024
3f2e1d3
fix lint
FitseTLT Mar 25, 2024
ab837e1
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
  • Loading branch information
FitseTLT committed Feb 5, 2024
commit 45238a6139ac433704ed0ae1ada2bfd700e2fd04
Original file line number Diff line number Diff line change
@@ -58,6 +58,7 @@ function ReportActionItemImage({
canEditReceipt = false,
isLocalFile = false,
fileExtension,
filename,
}: ReportActionItemImageProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
7 changes: 4 additions & 3 deletions src/libs/ReceiptUtils.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ type ThumbnailAndImageURI = {
transaction?: Transaction;
isLocalFile?: boolean;
isThumbnail?: boolean;
filename?: string;
fileExtension?: string;
};

@@ -36,12 +37,12 @@ function getThumbnailAndImageURIs(transaction: Transaction, receiptPath: string
const hasEReceipt = transaction?.hasEReceipt;

if (hasEReceipt) {
return {image: ROUTES.ERECEIPT.getRoute(transaction.transactionID), transaction};
return {image: ROUTES.ERECEIPT.getRoute(transaction.transactionID), transaction, filename};
}

// For local files, we won't have a thumbnail yet
if (isReceiptImage && (path.startsWith('blob:') || path.startsWith('file:'))) {
return {image: path, isLocalFile: true};
return {image: path, isLocalFile: true, filename};
}

if (isReceiptImage) {
@@ -50,7 +51,7 @@ function getThumbnailAndImageURIs(transaction: Transaction, receiptPath: string

const isLocalFile = typeof path === 'number' || path.startsWith('blob:') || path.startsWith('file:') || path.startsWith('/');
const {fileExtension} = splitExtensionFromFileName(filename);
return {isThumbnail: true, fileExtension: Object.values(CONST.IOU.FILE_TYPES).find((type) => type === fileExtension), image: path, isLocalFile};
return {isThumbnail: true, fileExtension: Object.values(CONST.IOU.FILE_TYPES).find((type) => type === fileExtension), image: path, isLocalFile, filename};
dangrous marked this conversation as resolved.
Show resolved Hide resolved
}

// eslint-disable-next-line import/prefer-default-export
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.