Enhancements

merge-requests/21/head
zaid_daoud 3 years ago
parent f90df43023
commit fe9b8215d3

@ -63,11 +63,12 @@ class VisitsApiClient {
// 4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444 // 4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
Future updateGroupOfVisits({required VisitsGroup group}) async { Future updateGroupOfVisits({required VisitsGroup group}) async {
final user = UserApiClient().user; final user = UserApiClient().user;
Map<String, String> body = group.toJson(); Map<String, dynamic> body = {};
body["token"] = user?.token ?? ""; // body["token"] = user?.token ?? "";
body["uid"] = user?.id ?? ""; body['ids'] = [...(group.visits?.map((e) => e.id).toList() ?? [])];
body["assignedEmployeeId"] = user?.id ?? "";
//userId = 397.toString(); // testing id to view data //userId = 397.toString(); // testing id to view data
await ApiClient().postJsonForResponse('${URLs.host1}${URLs.updateRegularVisits}', body); await ApiClient().putJsonForResponse('${URLs.host1}${URLs.updateRegularVisits}', body);
} }
Future<Pentry> getPentry(String id) async { Future<Pentry> getPentry(String id) async {

@ -10,7 +10,7 @@ class URLs {
static const getHospitals = "/mobile/Customer/GetCustomers"; // get static const getHospitals = "/mobile/Customer/GetCustomers"; // get
static const getDepartments = "/mobile/Department/search"; // get static const getDepartments = "/mobile/Department/search"; // get
static const getEquipment = "/mobile/Asset/GetAssets"; // get ?client=208051 static const getEquipment = "/mobile/Asset/GetAssets"; // get ?client=208051
static const getServiceRequests = "/mobile/CallRequest/GetCallRequests"; // get static const getCallRequests = "/mobile/CallRequest/GetCallRequests"; // get
static const getPreventiveMaintenanceVisits = "/return/user/calibrations"; // get static const getPreventiveMaintenanceVisits = "/return/user/calibrations"; // get
static const updatePreventiveMaintenanceVisits = "/update/user/calibrations"; // get static const updatePreventiveMaintenanceVisits = "/update/user/calibrations"; // get

Loading…
Cancel
Save