Skip to content

Commit

Permalink
missing receipt indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdenio committed Feb 7, 2024
1 parent 3edb285 commit 12b8faa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/components/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function TransactionIcon({
<UserAvatar
user={(transaction as TransactionCardCharge).card_charge.card.user}
size={20}
style={{ marginRight: 10 }}
/>
);
} else {
Expand All @@ -66,7 +65,6 @@ function TransactionIcon({
name={transactionIcon(transaction.code)}
color={palette.muted}
size={20}
style={{ marginRight: 10 }}
/>
);
}
Expand Down Expand Up @@ -97,6 +95,7 @@ function Transaction({
padding: 10,
flexDirection: "row",
alignItems: "center",
gap: 10,
backgroundColor: themeColors.card,
borderTopLeftRadius: top ? 8 : 0,
borderTopRightRadius: top ? 8 : 0,
Expand Down Expand Up @@ -128,10 +127,19 @@ function Transaction({
: "")}
{transaction.memo.replaceAll(/\s{2,}/g, " ")}
</Text>
{transaction.missing_receipt && (
<View>
<Ionicons name="receipt-outline" color={palette.muted} size={18} />
<Ionicons
name="alert"
color={palette.warning}
style={{ position: "absolute", top: -8, left: -10 }}
size={18}
/>
</View>
)}
<Text
style={{
marginLeft: "auto",
paddingLeft: 10,
color: transaction.amount_cents > 0 ? "#33d6a6" : palette.muted,
}}
>
Expand Down
1 change: 1 addition & 0 deletions src/lib/types/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface TransactionBase
pending: boolean;
declined: boolean;
code: TransactionType;
missing_receipt: boolean;
}

export interface CardCharge {
Expand Down

0 comments on commit 12b8faa

Please sign in to comment.