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

Tricount #207

Draft
wants to merge 131 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
b2eed80
feat: adding transaction type
maximeroucher Sep 22, 2023
ad98b3b
feat: adding equilibrium transaction
maximeroucher Sep 22, 2023
c5d460c
feat: adding transaction
maximeroucher Sep 22, 2023
2f07aa5
feat: adding sharer group
maximeroucher Sep 22, 2023
876baae
fix: renaming properly
maximeroucher Sep 22, 2023
43326e6
feat: adding sharer group repository
maximeroucher Sep 22, 2023
eced24d
feat: Adding sharer repository
maximeroucher Sep 22, 2023
7831b3d
feat: adding transaction repository
maximeroucher Sep 22, 2023
4113cd7
feat: adding reimbursement repository
maximeroucher Sep 22, 2023
bc1ccf5
feat: adding possibility to update a backend generated item
maximeroucher Sep 22, 2023
ad0562a
feat: adding sharer group provider
maximeroucher Sep 22, 2023
d463e96
feat: adding constants
maximeroucher Sep 23, 2023
07212ba
feat: adding tricount template
maximeroucher Sep 23, 2023
2ccc148
feat: adding main page
maximeroucher Sep 23, 2023
8ab3132
feat: adding detail page
maximeroucher Sep 23, 2023
f15a52a
feat: adding sharer group add edit page
maximeroucher Sep 23, 2023
2977135
feat: adding router
maximeroucher Sep 23, 2023
faecfbf
feat: adding tricount routes to main router
maximeroucher Sep 23, 2023
c739c88
feat: adding tricount to drawer module list
maximeroucher Sep 23, 2023
3006056
fix: moving router
maximeroucher Sep 23, 2023
49a8f79
fix: fixing all module list provider to work in debug
maximeroucher Sep 23, 2023
001402b
fix: fixing sharer group list provider
maximeroucher Sep 23, 2023
1cffefc
feat: adding cross group stats provider
maximeroucher Sep 23, 2023
ea5b5a0
feat: cross group stats returns equilibrium transaction list
maximeroucher Sep 23, 2023
eb0e0aa
fix: fixing module list provider
maximeroucher Sep 23, 2023
96bbb8e
fix: loading sharer group by default
maximeroucher Sep 23, 2023
519645e
fix: updating cross group stats when sharer group list updates
maximeroucher Sep 23, 2023
0998b34
feat: adding equilibrium card
maximeroucher Sep 23, 2023
cd66bab
feat: adding animation library
maximeroucher Sep 23, 2023
2267206
feat: adding sharer group stats widget
maximeroucher Sep 23, 2023
6b358d1
feat: adding sharer group to main page
maximeroucher Sep 23, 2023
ec90f77
feat: placing group stats on top on group cards
maximeroucher Sep 23, 2023
e276767
feat: moving asyncChild up
maximeroucher Sep 24, 2023
398af66
feat: adding sharer group cards
maximeroucher Sep 24, 2023
2a6b843
feat: updating animation
maximeroucher Sep 24, 2023
294fff2
feat: adding overlapping avatar
maximeroucher Sep 24, 2023
2691f42
feat: updating sharer group card UI
maximeroucher Sep 24, 2023
30d8838
feat: updating UI
maximeroucher Sep 25, 2023
0dd9490
feat: changing stats background color
maximeroucher Sep 25, 2023
837bd92
feat: making sharer cards unscrollable
maximeroucher Sep 25, 2023
af8d98d
feat: updating sharer groups physics
maximeroucher Sep 25, 2023
05c798a
feat: adding stats interaction with sharer group cards
maximeroucher Sep 25, 2023
cc561e3
feat: making AsyncChild a hook widget
maximeroucher Sep 25, 2023
e6b1197
feat: combining both animation
maximeroucher Sep 25, 2023
9c4941c
feat: updating stats UI
maximeroucher Sep 25, 2023
095c2c0
feat: linting sharer group card
maximeroucher Sep 25, 2023
3cb77bb
feat: handling too short name
maximeroucher Oct 18, 2023
535c86d
feat: updating sharer stats colors
maximeroucher Oct 18, 2023
e692fb3
feat: Displaying properly the firstname instead of the name
maximeroucher Oct 18, 2023
eb621e5
feat: opening right stats when swiping on sharer cards
maximeroucher Oct 18, 2023
ad28838
feat: restarting animation on new card
maximeroucher Oct 18, 2023
8b28ffa
feat: adding card click handling
maximeroucher Oct 18, 2023
b162976
refacto: extracting sharer card layout
maximeroucher Oct 18, 2023
975d464
feat: adding add sharer card
maximeroucher Oct 18, 2023
4c6461b
doc: explaining why not refresher used
maximeroucher Oct 18, 2023
51ad66f
feat: displaying user equilibrium transaction as transaction of add card
maximeroucher Oct 18, 2023
f0f62a5
fix: fixing animation and item sharer stats column height
maximeroucher Oct 18, 2023
7d6caa4
fix: fixing cross group stats
maximeroucher Oct 18, 2023
9e271da
fix: fixing order card indexation
maximeroucher Oct 27, 2023
884dddf
feat: adding sharer group provider
maximeroucher Oct 27, 2023
ef1ea2f
feat: adding redirection to pages
maximeroucher Oct 27, 2023
e9a1a7b
feat: adding sharer group creation page
maximeroucher Oct 29, 2023
c7ae805
feat: adding user search bar
maximeroucher Oct 29, 2023
c462b6a
feat: adding provider to handle sharer groupe member
maximeroucher Oct 31, 2023
d86ee8b
feat: adding member to provider list
maximeroucher Oct 31, 2023
2594dd0
feat: update add member logic
maximeroucher Oct 31, 2023
6c36b27
fix: update condition
maximeroucher Oct 31, 2023
8a2cbdb
feat: updating member chip ui
maximeroucher Oct 31, 2023
7eb4334
feat: adding member wrap
maximeroucher Oct 31, 2023
a6ee9dd
feat: adding member list to page
maximeroucher Oct 31, 2023
20f9c6d
fix: removing useless parameter
maximeroucher Oct 31, 2023
5fd9da6
feat: adding add edit button
maximeroucher Oct 31, 2023
87b7b51
feat: handling form
maximeroucher Oct 31, 2023
a8cbba8
feat: setting and resetting sharer when opening cards
maximeroucher Nov 1, 2023
49d5e7c
feat: setting default name when editing
maximeroucher Nov 1, 2023
c3cc311
feat: adding detail page layout
maximeroucher Nov 2, 2023
fb09c80
feat: adding sharer group name and indicator
maximeroucher Nov 2, 2023
4d3e0ce
feat: adding member list
maximeroucher Nov 2, 2023
34cf3db
feat: styling member list
maximeroucher Nov 2, 2023
1964414
feat: adding title and add button
maximeroucher Nov 2, 2023
4ca9ebb
refacto: extracting getAvatarName
maximeroucher Nov 2, 2023
589fd34
refacto: extracting pages
maximeroucher Nov 3, 2023
ff6a836
refacto: extracting common components
maximeroucher Nov 3, 2023
f3a3638
feat: adding controller to pageView
maximeroucher Nov 3, 2023
51ef92c
refacto extracting equilibrium transaction card
maximeroucher Nov 3, 2023
4183a05
feat: adding padding
maximeroucher Nov 3, 2023
fd5baa2
feat: removing button when no onTap function given
maximeroucher Nov 3, 2023
4322d2f
feat: adding new page and fixing height
maximeroucher Nov 3, 2023
1254a1c
feat: adding creation card style
maximeroucher Nov 3, 2023
cee7b7c
feat: renaming expense page
maximeroucher Nov 3, 2023
939e110
feat: adding users balance
maximeroucher Nov 4, 2023
e87cbf0
feat: using balance card
maximeroucher Nov 4, 2023
2c16f0e
feat: adding text overflow check
maximeroucher Nov 4, 2023
63ee28a
feat: adding balance card UI
maximeroucher Nov 4, 2023
71eef8e
feat: bolding name only if user is payer
maximeroucher Nov 4, 2023
687aa8d
feat: improving retrieving max balance
maximeroucher Nov 4, 2023
45f99a9
chore: updating dependencies
maximeroucher Nov 8, 2023
dce1bf7
feat: using right background color
maximeroucher Nov 11, 2023
abe9f07
feat: removing card
maximeroucher Nov 11, 2023
ad591d8
feat: adding bottom button
maximeroucher Nov 11, 2023
546829c
feat: using button
maximeroucher Nov 11, 2023
813bc7e
feat: removing function call from page view
maximeroucher Nov 11, 2023
42ac3aa
feat: changing icon color if member can not be deleted
maximeroucher Nov 11, 2023
475b0e0
feat: adding delete member action
maximeroucher Nov 11, 2023
68da09b
feat: preventing to add member when editing
maximeroucher Nov 11, 2023
9a8a653
feat: adding redirection
maximeroucher Nov 11, 2023
8220369
feat: adding firstChild to propertyList
maximeroucher Nov 11, 2023
21893a1
feat: adding button disabling
maximeroucher Nov 13, 2023
5f95c53
feat: delete only myself from group
maximeroucher Nov 13, 2023
c532258
chore: updating classes to match new API
maximeroucher Nov 13, 2023
f296b53
fix: updating to match new classes
maximeroucher Nov 13, 2023
537e135
feat: adding all member to cross group reimbursement
maximeroucher Nov 13, 2023
7a40e19
fix: fixing balances
maximeroucher Nov 14, 2023
513f2fc
fix: displaying only balances with negative amount
maximeroucher Nov 14, 2023
5190a79
feat: extracting chip function
maximeroucher Nov 14, 2023
ae6126e
feat: preventing removing by tapping on search result
maximeroucher Nov 14, 2023
962cc65
feat: clearing user search when editing
maximeroucher Nov 14, 2023
324522e
feat: passing members list to chip list
maximeroucher Nov 14, 2023
00228c5
feat: preventing loading group member when editing
maximeroucher Nov 14, 2023
4f1a1aa
feat: adding checkbox for new user for expense retropropagation
maximeroucher Nov 14, 2023
f023324
feat: updating dependencies
maximeroucher Nov 16, 2023
013c5f4
fix: using right test constants
maximeroucher Nov 22, 2023
941510b
feat: updating repositories
maximeroucher Nov 24, 2023
f43aa90
feat: updating providers
maximeroucher Nov 24, 2023
2241b59
fix: using camel_case for parsing
maximeroucher Jan 17, 2024
14db9fd
fix: using right endpoints
maximeroucher Jan 17, 2024
d79a223
feat: updating balance class
maximeroucher Jan 18, 2024
90aa921
feat: adapting main page and add edit page to new api architecture
maximeroucher Jan 18, 2024
640ca94
feat: reenabling detail page
maximeroucher Jan 18, 2024
6c16e38
fix: handling null balance case
maximeroucher Jan 18, 2024
5b47d82
fix: prefilling unchanged field
maximeroucher Jan 20, 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
fix: handling null balance case
  • Loading branch information
maximeroucher committed Jan 18, 2024
commit 6c16e38819f43553b6dd151115607449d45530e0
42 changes: 23 additions & 19 deletions lib/tricount/ui/pages/detail_page/balance_card.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:math';

import 'package:flutter/material.dart';
import 'package:myecl/tricount/class/balance.dart';
import 'package:myecl/tricount/tools/functions.dart';
@@ -17,6 +19,7 @@ class BalanceCard extends StatelessWidget {

@override
Widget build(BuildContext context) {
final maxBalance = max(maxAbsBalance, 1e-2);
final isPositive = balance.amount >= 0;
final payer = getMember(members, balance.userId);
return SizedBox(
@@ -40,13 +43,13 @@ class BalanceCard extends StatelessWidget {
))
: LayoutBuilder(builder: (context, constraints) {
final textOverflowing = hasTextOverflow(
payer.nickname ?? payer.firstname,
const TextStyle(
fontSize: 20, fontWeight: FontWeight.bold),
maxWidth: balance.amount.abs() /
maxAbsBalance *
constraints.maxWidth -
30);
payer.nickname ?? payer.firstname,
const TextStyle(
fontSize: 20, fontWeight: FontWeight.bold),
maxWidth: balance.amount.abs() /
maxBalance *
constraints.maxWidth -
30);
return Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
@@ -62,7 +65,7 @@ class BalanceCard extends StatelessWidget {
),
Container(
width: balance.amount.abs() /
maxAbsBalance *
maxBalance *
constraints.maxWidth,
height: 50,
decoration: BoxDecoration(
@@ -96,21 +99,22 @@ class BalanceCard extends StatelessWidget {
alignment: Alignment.centerLeft,
child: isPositive
? LayoutBuilder(builder: (context, constraints) {
final textOverflowing = balance.amount == 0.0
? true
: hasTextOverflow(
payer.nickname ?? payer.firstname,
const TextStyle(
fontSize: 20, fontWeight: FontWeight.bold),
maxWidth: balance.amount.abs() /
maxAbsBalance *
constraints.maxWidth -
30);
final textOverflowing = balance.amount == 0.0 ||
hasTextOverflow(
payer.nickname ?? payer.firstname,
const TextStyle(
fontSize: 20, fontWeight: FontWeight.bold),
maxWidth: min(
balance.amount.abs() /
maxBalance *
constraints.maxWidth -
30,
0));
return Row(
children: [
Container(
width: balance.amount.abs() /
maxAbsBalance *
maxBalance *
constraints.maxWidth,
height: 60,
decoration: BoxDecoration(
Loading