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

New UI for the transaction form page, allowing inversed/reversed transactions to track refunds and debts #186

Merged
merged 25 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift click to select a range
6406421
feat(ux/ui): Change the transaction form UX
enrique-lozano Jul 22, 2024
83ca3ce
refactor: Rename `TransactionType` enum
enrique-lozano Jul 22, 2024
148ab42
fix: Reduce currency font size also on negative amounts
enrique-lozano Jul 22, 2024
61b9e91
feat: Add tr. type to the transactions table in DB
enrique-lozano Jul 23, 2024
c10f523
fix: Adjust graphs to accept reversed transactions
enrique-lozano Jul 23, 2024
c246e89
fix: Regenerate database queries
enrique-lozano Jul 23, 2024
2d97d00
feat: Add indicator for reversed transactions
enrique-lozano Jul 23, 2024
d7dfb3f
Merge branch 'develop' into feat/allow-positive-expenses
enrique-lozano Jul 24, 2024
1d06fbc
fix: Sign when changing the transaction type
enrique-lozano Jul 24, 2024
4cfb56e
feat: Disable the status selector on future transactions
enrique-lozano Jul 24, 2024
6cd6ea7
fix: Transfer form validations
enrique-lozano Jul 24, 2024
d17b3a4
feat: Hide negative toggle button on transfers
enrique-lozano Jul 24, 2024
9f1ccdf
feat(literals): Change note textarea placeholder
enrique-lozano Jul 24, 2024
4d33135
fix: Use account currency
enrique-lozano Jul 24, 2024
a0b9afc
fix: Prevent transaction form to resize on keyboard
enrique-lozano Jul 24, 2024
4af5c46
fix: Status selector scrolling issues
enrique-lozano Jul 24, 2024
a610d8e
Merge branch 'develop' into feat/allow-positive-expenses
enrique-lozano Jul 25, 2024
0a9bf03
fix(ux/ui): Description textarea color
enrique-lozano Jul 25, 2024
6134d1c
Merge branch 'develop' into feat/allow-positive-expenses
enrique-lozano Aug 1, 2024
8120682
fix: Category picker only displaying multi-type items
enrique-lozano Aug 1, 2024
db12db6
Merge branch 'develop' into feat/allow-positive-expenses
enrique-lozano Aug 2, 2024
1396732
feat: Improve tag selection in the transaction form
enrique-lozano Aug 2, 2024
9f91ef1
feat: Reversed transaction descriptions and indicators
enrique-lozano Aug 2, 2024
05f4d8e
feat: Improve brand blue color on dark mode
enrique-lozano Aug 3, 2024
6b09675
feat: Value in destiny modal
enrique-lozano Aug 3, 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
feat: Add indicator for reversed transactions
  • Loading branch information
enrique-lozano committed Jul 23, 2024
commit 2d97d006b33ded3f1c5e75b4c45c2a5bc1918ce3
22 changes: 20 additions & 2 deletions lib/app/transactions/widgets/transaction_list_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 87,34 @@ class TransactionListTile extends StatelessWidget {
overflow: TextOverflow.fade,
),
),
const SizedBox(width: 4),
if ((transaction.status != null ||
transaction.recurrentInfo.isRecurrent) &&
periodicityInfo == null)
periodicityInfo == null) ...[
const SizedBox(width: 4),
Icon(
transaction.status?.icon ?? Icons.repeat,
color: transaction.status?.color.darken(0.1) ??
AppColors.of(context).primary,
size: 12,
)
],
if (transaction.isReversed) ...[
const SizedBox(width: 6),
Container(
padding: const EdgeInsets.symmetric(horizontal: 4),
decoration: BoxDecoration(
color: AppColors.of(context).primary.withOpacity(0.2),
borderRadius: BorderRadius.circular(2)),
child: Text(
"R",
style: TextStyle(
color: AppColors.of(context).primary,
fontSize: 12,
fontWeight: FontWeight.w700,
),
),
),
]
],
),
),
Expand Down
5 changes: 5 additions & 0 deletions lib/core/models/transaction/transaction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 101,11 @@ class MoneyTransaction extends TransactionInDB {
return currentValueInPreferredCurrency;
}

bool get isReversed {
return type == TransactionType.E && value > 0 ||
type == TransactionType.I && value < 0;
}

IconDisplayer getDisplayIcon(
BuildContext context, {
double size = 22,
Expand Down