File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
components/pages/project/expenses Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ class _ItemListState extends State<ItemList> {
148148 title: Row (children: [
149149 Expanded (
150150 child: Text (item.title.capitalize ())),
151- Text ('${item .amount } €' ),
151+ Text ('${item .amount . toStringAsFixed ( 2 ) } €' ),
152152 ]),
153153 subtitle: Row (
154154 children: [
@@ -160,7 +160,7 @@ class _ItemListState extends State<ItemList> {
160160 ),
161161 ),
162162 Text (
163- '$share €' ,
163+ '${ share . toStringAsFixed ( 2 )} €' ,
164164 style: TextStyle (
165165 fontStyle: FontStyle .italic,
166166 color: share > 0
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ class AppData {
5555
5656 AppData .projects = await Project .getAllProjects ();
5757
58+ print (AppData .projects);
59+
5860 if (! sharedPreferences.containsKey ("firstRun" )) {
5961 firstRun = AppData .projects.enabled ().isEmpty;
6062 } else {
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ class PocketBaseItem {
9090 }
9191
9292 // Send local new records
93- for (Item i in project.items) {
93+ for (Item i in project.items. toList () ) {
9494 if (distUpdated.contains (i)) continue ;
9595
9696 if (i.lastUpdate > project.lastSync) {
@@ -101,6 +101,8 @@ class PocketBaseItem {
101101 }
102102 }
103103
104+ project.items.sort ((a, b) => - a.date.compareTo (b.date));
105+
104106 return true ;
105107 }
106108}
Original file line number Diff line number Diff line change @@ -133,12 +133,14 @@ class Project extends Data {
133133 tableProjects,
134134 columns: ProjectFields .values,
135135 );
136+ print (res);
136137 return res.map ((e) => fromJson (e)).toSet ();
137138 }
138139
139140 @override
140141 bool operator == (Object other) {
141- return other is Project && name == other.name;
142+ return other is Project &&
143+ (localId != null ? localId == other.localId : name == other.name);
142144 }
143145
144146 @override
You can’t perform that action at this time.
0 commit comments