Vaibhav_Feature-#768 #59

Closed
vaibhav.surve wants to merge 74 commits from Vaibhav_Feature-#768 into Feature_Expense
2 changed files with 10 additions and 7 deletions
Showing only changes of commit f245f9accf - Show all commits

View File

@ -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";

View File

@ -1114,10 +1114,13 @@ class ApiService {
static Future<List<dynamic>?> 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<List<dynamic>?> getAllEmployees() async =>