Fitch report Data

This commit is contained in:
mohammad
2025-01-15 17:55:07 +03:00
parent f779445d17
commit 31cc210560
3 changed files with 8 additions and 6 deletions
@@ -30,12 +30,14 @@ class PresenceRecord extends StatelessWidget {
child: DefaultContainer(
width: 50, height: 50, child: CircularProgressIndicator()),
);
} else if (state is UpdateState) {
} else if (state is FitchData) {
for (var record in garageDoorBloc.recordGroups.data!) {
final DateTime eventDateTime =
DateTime.fromMillisecondsSinceEpoch(record.eventTime!);
final String formattedDate =
DateFormat('EEEE, dd/MM/yyyy').format(eventDateTime);
// Group by formatted date
if (groupedRecords.containsKey(formattedDate)) {
groupedRecords[formattedDate]!.add(record);
} else {