mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +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(
|
||||
LoadOccupancyHeatMapEvent(
|
||||
GetOccupancyHeatMapParam(
|
||||
spaceId: spaceId,
|
||||
communityId: communityId,
|
||||
spaceUuid: spaceId,
|
||||
year: datePickerState.yearlyDate,
|
||||
),
|
||||
),
|
||||
|
@ -1,19 +1,13 @@
|
||||
class GetOccupancyHeatMapParam {
|
||||
final DateTime year;
|
||||
final String communityId;
|
||||
final String spaceId;
|
||||
final String spaceUuid;
|
||||
|
||||
const GetOccupancyHeatMapParam({
|
||||
required this.year,
|
||||
required this.communityId,
|
||||
required this.spaceId,
|
||||
required this.spaceUuid,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'year': year.toIso8601String(),
|
||||
'communityId': communityId,
|
||||
'spaceId': spaceId,
|
||||
};
|
||||
return {'year': year.year};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user