mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-16 01:56:24 +00:00
Matched the GetOccupancyHeatMapParam
with what the API expects and removed the communityId
since it is no longer necessary for the api, and renamed spaceId
to spaceUuid
for more clarity.
This commit is contained in:
@ -35,8 +35,7 @@ abstract final class FetchOccupancyDataHelper {
|
|||||||
context.read<OccupancyHeatMapBloc>().add(
|
context.read<OccupancyHeatMapBloc>().add(
|
||||||
LoadOccupancyHeatMapEvent(
|
LoadOccupancyHeatMapEvent(
|
||||||
GetOccupancyHeatMapParam(
|
GetOccupancyHeatMapParam(
|
||||||
spaceId: spaceId,
|
spaceUuid: spaceId,
|
||||||
communityId: communityId,
|
|
||||||
year: datePickerState.yearlyDate,
|
year: datePickerState.yearlyDate,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1,19 +1,13 @@
|
|||||||
class GetOccupancyHeatMapParam {
|
class GetOccupancyHeatMapParam {
|
||||||
final DateTime year;
|
final DateTime year;
|
||||||
final String communityId;
|
final String spaceUuid;
|
||||||
final String spaceId;
|
|
||||||
|
|
||||||
const GetOccupancyHeatMapParam({
|
const GetOccupancyHeatMapParam({
|
||||||
required this.year,
|
required this.year,
|
||||||
required this.communityId,
|
required this.spaceUuid,
|
||||||
required this.spaceId,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return {
|
return {'year': year.year};
|
||||||
'year': year.toIso8601String(),
|
|
||||||
'communityId': communityId,
|
|
||||||
'spaceId': spaceId,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user