Files
syncrow-web/lib/pages/analytics/params/get_total_energy_consumption_param.dart
Faris Armoush d6f0b53b59 Sp 1494 api integration (#180)
* 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.
2025-05-11 16:46:00 +03:00

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,
};
}
}