updated project hardcoded values

This commit is contained in:
hannathkadher
2025-02-16 20:55:13 +04:00
parent 67209961b4
commit 3f7f7ce49f
16 changed files with 199 additions and 77 deletions

View File

@ -27,7 +27,7 @@ class HomeManagementAPI {
return list;
}
static Future<List<DeviceModel>> fetchDevicesByUnitId() async {
static Future<List<DeviceModel>> fetchDevicesByUnitId(String projectUuid) async {
List<DeviceModel> list = [];
try {
@ -40,7 +40,7 @@ class HomeManagementAPI {
final path = ApiEndpoints.spaceDevices
.replaceAll('{communityUuid}', communityUuid)
.replaceAll('{spaceUuid}', spaceUuid)
.replaceAll('{projectUuid}', TempConst.projectIdDev);
.replaceAll('{projectUuid}', projectUuid);
await _httpService.get(
path: path,
@ -63,11 +63,11 @@ class HomeManagementAPI {
}
static Future<Map<String, dynamic>> assignDeviceToRoom(String communityId,
String spaceId, String subSpaceId, String deviceId) async {
String spaceId, String subSpaceId, String deviceId, String projectId) async {
try {
final response = await _httpService.post(
path: ApiEndpoints.assignDeviceToRoom
.replaceAll('{projectUuid}', TempConst.projectIdDev)
.replaceAll('{projectUuid}', projectId)
.replaceAll('{communityUuid}', communityId)
.replaceAll('{spaceUuid}', spaceId)
.replaceAll('{subSpaceUuid}', subSpaceId)
@ -83,7 +83,7 @@ class HomeManagementAPI {
}
static Future<Map<String, dynamic>> unAssignDeviceToRoom(String communityId,
String spaceId, String subSpaceId, String deviceId) async {
String spaceId, String subSpaceId, String deviceId, String projectId) async {
try {
final response = await _httpService.delete(
path: ApiEndpoints.assignDeviceToRoom
@ -91,7 +91,7 @@ class HomeManagementAPI {
.replaceAll('{spaceUuid}', spaceId)
.replaceAll('{subSpaceUuid}', subSpaceId)
.replaceAll('{deviceUuid}', deviceId)
.replaceAll('{projectUuid}', TempConst.projectIdDev),
.replaceAll('{projectUuid}', projectId),
expectedResponseModel: (json) {
return json;
},