mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00

* SP-1494-api-integration. * fixed left stide titles intervals in total energy consumption chart. * Adjusted tooltip and title intervals in energy management charts to improve accuracy by incrementing displayed values by one. * Refactor AnalyticsCommunitiesSidebar to use AnalyticsSpaceTreeView and enhance community/space selection handling * Gave every tab its own selection logic using the strategy design pattern, along with clearing the selection when changing tabes to avoid collision between features.
22 lines
532 B
Dart
22 lines
532 B
Dart
class GetTotalEnergyConsumptionParam {
|
|
final DateTime? monthDate;
|
|
final String? spaceId;
|
|
final String? communityId;
|
|
|
|
const GetTotalEnergyConsumptionParam({
|
|
this.monthDate,
|
|
this.spaceId,
|
|
this.communityId,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'monthDate':
|
|
'${monthDate?.year}-${monthDate?.month.toString().padLeft(2, '0')}',
|
|
if (communityId == null || communityId!.isEmpty) 'spaceUuid': spaceId,
|
|
'communityUuid': communityId,
|
|
'groupByDevice': false,
|
|
};
|
|
}
|
|
}
|