|
|
|
@ -5,6 +5,7 @@ import 'package:mohem_flutter_app/api/api_client.dart';
|
|
|
|
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
|
|
|
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
|
|
|
import 'package:mohem_flutter_app/classes/consts.dart';
|
|
|
|
import 'package:mohem_flutter_app/classes/consts.dart';
|
|
|
|
import 'package:mohem_flutter_app/classes/date_uitl.dart';
|
|
|
|
import 'package:mohem_flutter_app/classes/date_uitl.dart';
|
|
|
|
|
|
|
|
import 'package:mohem_flutter_app/classes/utils.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
|
|
|
|
@ -12,6 +13,7 @@ import 'package:mohem_flutter_app/models/dashboard/list_menu.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/itg/itg_main_response.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/itg/itg_main_response.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/itg/itg_response_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/itg/itg_response_model.dart';
|
|
|
|
|
|
|
|
import 'package:platform_device_id/platform_device_id.dart';
|
|
|
|
import 'package:uuid/uuid.dart';
|
|
|
|
import 'package:uuid/uuid.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class DashboardApiClient {
|
|
|
|
class DashboardApiClient {
|
|
|
|
@ -107,11 +109,11 @@ class DashboardApiClient {
|
|
|
|
//Mark Attendance
|
|
|
|
//Mark Attendance
|
|
|
|
Future<GenericResponseModel?> markAttendance({String lat = "0", String? long = "0", required int pointType, String nfcValue = "", bool isGpsRequired = false, String QRValue = ""}) async {
|
|
|
|
Future<GenericResponseModel?> markAttendance({String lat = "0", String? long = "0", required int pointType, String nfcValue = "", bool isGpsRequired = false, String QRValue = ""}) async {
|
|
|
|
String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC";
|
|
|
|
String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC";
|
|
|
|
var uuid = Uuid();
|
|
|
|
// var uuid = Uuid();
|
|
|
|
// Generate a v4 (random) id
|
|
|
|
// Generate a v4 (random) id
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> postParams = {
|
|
|
|
Map<String, dynamic> postParams = {
|
|
|
|
"UID": uuid.v4(), //Mobile Id
|
|
|
|
"UID": await PlatformDeviceId.getDeviceId, //uuid.v4(), //Mobile Id
|
|
|
|
"Latitude": lat,
|
|
|
|
"Latitude": lat,
|
|
|
|
"Longitude": long,
|
|
|
|
"Longitude": long,
|
|
|
|
"QRValue": QRValue,
|
|
|
|
"QRValue": QRValue,
|
|
|
|
|