diff --git a/lib/helpers/services/api_endpoints.dart b/lib/helpers/services/api_endpoints.dart index 520feb1..438a6f8 100644 --- a/lib/helpers/services/api_endpoints.dart +++ b/lib/helpers/services/api_endpoints.dart @@ -15,8 +15,8 @@ class ApiEndpoints { static const String uploadAttendanceImage = "/attendance/record-image"; // Employee Screen API Endpoints - static const String getAllEmployeesByProject = "/employee/list"; - static const String getAllEmployees = "/employee/list"; + static const String getAllEmployeesByProject = "/Employee/basic"; + static const String getAllEmployees = "/Employee/basic"; static const String getRoles = "/roles/jobrole"; static const String createEmployee = "/employee/manage-mobile"; static const String getEmployeeInfo = "/employee/profile/get"; @@ -35,7 +35,7 @@ class ApiEndpoints { static const String assignTask = "/project/task"; static const String getmasterWorkCategories = "/Master/work-categories"; - ////// Directory Module API Endpoints + ////// Directory Module API Endpoints /////// static const String getDirectoryContacts = "/directory"; static const String getDirectoryBucketList = "/directory/buckets"; static const String getDirectoryContactDetail = "/directory/notes"; diff --git a/lib/helpers/services/api_service.dart b/lib/helpers/services/api_service.dart index a976f35..2107512 100644 --- a/lib/helpers/services/api_service.dart +++ b/lib/helpers/services/api_service.dart @@ -1114,10 +1114,13 @@ class ApiService { static Future?> getAllEmployeesByProject( String projectId) async { if (projectId.isEmpty) throw ArgumentError('projectId must not be empty'); - final endpoint = "${ApiEndpoints.getAllEmployeesByProject}/$projectId"; - return _getRequest(endpoint).then((res) => res != null - ? _parseResponse(res, label: 'Employees by Project') - : null); + final endpoint = + "${ApiEndpoints.getAllEmployeesByProject}?projectId=$projectId"; + return _getRequest(endpoint).then( + (res) => res != null + ? _parseResponse(res, label: 'Employees by Project') + : null, + ); } static Future?> getAllEmployees() async =>