A local-first personal finance app
Mobile Off Budget category label (#2284)
Joel Jeremy Marquez00ee165f8e43
diff --git a/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx b/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsxindex 3dc2c8e142..bd7c60bc42 100644--- a/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx+++ b/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx@@ -199,11 +199,11 @@ export function AccountDetails({</View><PullToRefresh onRefresh={onRefresh}><TransactionList+ account={account}transactions={allTransactions}categories={categories}accounts={accounts}payees={payees}- showCategory={!account.offbudget}isNew={isNewTransaction}onLoadMore={onLoadMore}onSelect={onSelectTransaction}diff --git a/packages/desktop-client/src/components/transactions/MobileTransaction.jsx b/packages/desktop-client/src/components/transactions/MobileTransaction.jsxindex 4f05daa85a..aa939b5399 100644--- a/packages/desktop-client/src/components/transactions/MobileTransaction.jsx+++ b/packages/desktop-client/src/components/transactions/MobileTransaction.jsx@@ -1131,10 +1131,10 @@ export const TransactionEdit = props => {const Transaction = memo(function Transaction({transaction,+ account,accounts,categories,payees,- showCategory,added,onSelect,style,@@ -1169,11 +1169,15 @@ const Transaction = memo(function Transaction({payee,transferAcct,);- const prettyCategory = transferAcct- ? 'Transfer'- : isParent- ? 'Split'- : categoryName;+ const specialCategory = account?.offbudget+ ? 'Off Budget'+ : transferAcct+ ? 'Transfer'+ : isParent+ ? 'Split'+ : null;++ const prettyCategory = specialCategory || categoryName;const isPreview = isPreviewId(id);const isReconciled = transaction.reconciled;@@ -1260,22 +1264,21 @@ const Transaction = memo(function Transaction({}}/>)}- {showCategory && (- <TextOneLine- style={{- fontSize: 11,- marginTop: 1,- fontWeight: '400',- color: prettyCategory- ? theme.tableTextSelected- : theme.menuItemTextSelected,- fontStyle: prettyCategory ? null : 'italic',- textAlign: 'left',- }}- >- {prettyCategory || 'Uncategorized'}- </TextOneLine>- )}+ <TextOneLine+ style={{+ fontSize: 11,+ marginTop: 1,+ fontWeight: '400',+ color: prettyCategory+ ? theme.tableTextSelected+ : theme.menuItemTextSelected,+ fontStyle:+ specialCategory || !prettyCategory ? 'italic' : undefined,+ textAlign: 'left',+ }}+ >+ {prettyCategory || 'Uncategorized'}+ </TextOneLine></View>)}</View>@@ -1296,11 +1299,11 @@ const Transaction = memo(function Transaction({});export function TransactionList({+ account,accounts,categories,payees,transactions,- showCategory,isNew,onSelect,scrollProps = {},@@ -1384,10 +1387,10 @@ export function TransactionList({><Transactiontransaction={transaction}+ account={account}categories={categories}accounts={accounts}payees={payees}- showCategory={showCategory}added={isNew(transaction.id)}onSelect={onSelect} // onSelect(transaction)}/>diff --git a/upcoming-release-notes/2284.md b/upcoming-release-notes/2284.mdnew file mode 100644index 0000000000..7b946dee48--- /dev/null+++ b/upcoming-release-notes/2284.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [joel-jeremy]+---++Add Off Budget category label to mobile transactions page