Commit 45eb1b57 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

ios changes from Mac

parent 33d1b84a
...@@ -78,6 +78,8 @@ PODS: ...@@ -78,6 +78,8 @@ PODS:
- Flutter - Flutter
- flutter_downloader (0.0.1): - flutter_downloader (0.0.1):
- Flutter - Flutter
- flutter_foreground_task (0.0.1):
- Flutter
- flutter_image_compress_common (1.0.0): - flutter_image_compress_common (1.0.0):
- Flutter - Flutter
- Mantle - Mantle
...@@ -168,6 +170,8 @@ PODS: ...@@ -168,6 +170,8 @@ PODS:
- nanopb/encode (= 3.30910.0) - nanopb/encode (= 3.30910.0)
- nanopb/decode (3.30910.0) - nanopb/decode (3.30910.0)
- nanopb/encode (3.30910.0) - nanopb/encode (3.30910.0)
- open_filex (0.0.2):
- Flutter
- OrderedSet (5.0.0) - OrderedSet (5.0.0)
- package_info_plus (0.4.5): - package_info_plus (0.4.5):
- Flutter - Flutter
...@@ -216,6 +220,7 @@ DEPENDENCIES: ...@@ -216,6 +220,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_contacts (from `.symlinks/plugins/flutter_contacts/ios`) - flutter_contacts (from `.symlinks/plugins/flutter_contacts/ios`)
- flutter_downloader (from `.symlinks/plugins/flutter_downloader/ios`) - flutter_downloader (from `.symlinks/plugins/flutter_downloader/ios`)
- flutter_foreground_task (from `.symlinks/plugins/flutter_foreground_task/ios`)
- flutter_image_compress_common (from `.symlinks/plugins/flutter_image_compress_common/ios`) - flutter_image_compress_common (from `.symlinks/plugins/flutter_image_compress_common/ios`)
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`) - flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`)
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
...@@ -228,6 +233,7 @@ DEPENDENCIES: ...@@ -228,6 +233,7 @@ DEPENDENCIES:
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) - google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- location (from `.symlinks/plugins/location/ios`) - location (from `.symlinks/plugins/location/ios`)
- open_filex (from `.symlinks/plugins/open_filex/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
...@@ -284,6 +290,8 @@ EXTERNAL SOURCES: ...@@ -284,6 +290,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_contacts/ios" :path: ".symlinks/plugins/flutter_contacts/ios"
flutter_downloader: flutter_downloader:
:path: ".symlinks/plugins/flutter_downloader/ios" :path: ".symlinks/plugins/flutter_downloader/ios"
flutter_foreground_task:
:path: ".symlinks/plugins/flutter_foreground_task/ios"
flutter_image_compress_common: flutter_image_compress_common:
:path: ".symlinks/plugins/flutter_image_compress_common/ios" :path: ".symlinks/plugins/flutter_image_compress_common/ios"
flutter_inappwebview_ios: flutter_inappwebview_ios:
...@@ -308,6 +316,8 @@ EXTERNAL SOURCES: ...@@ -308,6 +316,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_picker_ios/ios" :path: ".symlinks/plugins/image_picker_ios/ios"
location: location:
:path: ".symlinks/plugins/location/ios" :path: ".symlinks/plugins/location/ios"
open_filex:
:path: ".symlinks/plugins/open_filex/ios"
package_info_plus: package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios" :path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation: path_provider_foundation:
...@@ -349,6 +359,7 @@ SPEC CHECKSUMS: ...@@ -349,6 +359,7 @@ SPEC CHECKSUMS:
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_contacts: edb1c5ce76aa433e20e6cb14c615f4c0b66e0983 flutter_contacts: edb1c5ce76aa433e20e6cb14c615f4c0b66e0983
flutter_downloader: b7301ae057deadd4b1650dc7c05375f10ff12c39 flutter_downloader: b7301ae057deadd4b1650dc7c05375f10ff12c39
flutter_foreground_task: 21ef182ab0a29a3005cc72cd70e5f45cb7f7f817
flutter_image_compress_common: ec1d45c362c9d30a3f6a0426c297f47c52007e3e flutter_image_compress_common: ec1d45c362c9d30a3f6a0426c297f47c52007e3e
flutter_inappwebview_ios: 8d8d2c6290a3c4787cad303603662fac9a788f75 flutter_inappwebview_ios: 8d8d2c6290a3c4787cad303603662fac9a788f75
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
...@@ -369,6 +380,7 @@ SPEC CHECKSUMS: ...@@ -369,6 +380,7 @@ SPEC CHECKSUMS:
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
......
...@@ -25,6 +25,7 @@ class _ContactListScreenState extends State<ContactListScreen> { ...@@ -25,6 +25,7 @@ class _ContactListScreenState extends State<ContactListScreen> {
void initState() { void initState() {
super.initState(); super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
_requestContactsPermission();
final homeProv = Provider.of<HomescreenNotifier>(context, listen: false); final homeProv = Provider.of<HomescreenNotifier>(context, listen: false);
Future.microtask(() { Future.microtask(() {
final provider = Provider.of<ContactProvider>(context, listen: false); final provider = Provider.of<ContactProvider>(context, listen: false);
...@@ -33,6 +34,20 @@ class _ContactListScreenState extends State<ContactListScreen> { ...@@ -33,6 +34,20 @@ class _ContactListScreenState extends State<ContactListScreen> {
}); });
} }
Future<void> _requestContactsPermission() async {
final status = await Permission.contacts.status;
if (status.isPermanentlyDenied) {
// Show dialog and send user to settings
await openAppSettings();
return;
}
if (!status.isGranted) {
await Permission.contacts.request();
}
}
void _addToContact(String name, String phoneNumber) async { void _addToContact(String name, String phoneNumber) async {
if (phoneNumber.isEmpty) { if (phoneNumber.isEmpty) {
CustomSnackBar.showError( CustomSnackBar.showError(
......
...@@ -946,7 +946,8 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -946,7 +946,8 @@ class _VisitdetailsState extends State<Visitdetails> {
.fsrExt!, .fsrExt!,
fileUrl: fileUrl:
"https://erp.gengroup.in/files_genservices/tech_fsr_report/${followups[lp].fsrExt!}", "https://erp.gengroup.in/files_genservices/tech_fsr_report/${followups[lp].fsrExt!}",
downloadEnable: false, downloadEnable:
false,
), ),
), ),
); );
...@@ -999,7 +1000,6 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -999,7 +1000,6 @@ class _VisitdetailsState extends State<Visitdetails> {
), ),
], ],
if (complaintBillList.isNotEmpty) ...[ if (complaintBillList.isNotEmpty) ...[
Container( Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
...@@ -1028,10 +1028,14 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -1028,10 +1028,14 @@ class _VisitdetailsState extends State<Visitdetails> {
return Card( return Card(
margin: EdgeInsets.only(bottom: 12), margin: EdgeInsets.only(bottom: 12),
elevation: 0, elevation: 0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), shape: RoundedRectangleBorder(
child: Padding(padding: const EdgeInsets.all(14), borderRadius: BorderRadius.circular(12),
),
child: Padding(
padding: const EdgeInsets.all(14),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
// _detailRow("Bill ID", item.billId), // _detailRow("Bill ID", item.billId),
// _detailRow("Total Amount", item.totalAmount), // _detailRow("Total Amount", item.totalAmount),
...@@ -1040,7 +1044,6 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -1040,7 +1044,6 @@ class _VisitdetailsState extends State<Visitdetails> {
// _detailRow("Bill Date", item.billDate), // _detailRow("Bill Date", item.billDate),
// _detailRow("Due Date", item.dueDate), // _detailRow("Due Date", item.dueDate),
// _detailRow("Bill Paid", item.billPaid == "1" ? "Yes" : "No"), // _detailRow("Bill Paid", item.billPaid == "1" ? "Yes" : "No"),
Row( Row(
children: [ children: [
// 👤 Avatar // 👤 Avatar
...@@ -1062,74 +1065,96 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -1062,74 +1065,96 @@ class _VisitdetailsState extends State<Visitdetails> {
// 📝 Info // 📝 Info
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Text( Text(
item.narration ?? "-", item.narration ?? "-",
style: TextStyle( style: TextStyle(
fontFamily: fontFamily: "JakartaMedium",
"JakartaMedium",
fontSize: 14, fontSize: 14,
color: color: AppColors.semi_black,
AppColors
.semi_black,
), ),
), ),
const SizedBox(height: 3), const SizedBox(height: 3),
if (item.billPaid != "0") if (item.billPaid != "0")
Text(item.totalAmount ?? "", Text(
item.totalAmount ?? "",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: AppColors.app_blue, color: AppColors.app_blue,
),), ),
),
], ],
), ),
), ),
if (item.billPaid != "1") if (item.billPaid != "1")
Text(item.totalAmount ?? "", Text(
item.totalAmount ?? "",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: AppColors.app_blue, color: AppColors.app_blue,
),), ),
),
// Call // Call
if (item.billPaid != "0") if (item.billPaid != "0")
InkResponse( InkResponse(
onTap: (){ onTap: () {
var homeProvider = Provider.of<HomescreenNotifier>( var homeProvider = Provider.of<
context, HomescreenNotifier
listen: false, >(context, listen: false);
);
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute(builder: (context) => RazorpayQrScreen( MaterialPageRoute(
sessionId: homeProvider.session, builder:
empId: homeProvider.empId, (
amount: item.rawAmount.toString(), context,
) => RazorpayQrScreen(
sessionId:
homeProvider
.session,
empId:
homeProvider
.empId,
amount:
item.rawAmount
.toString(),
refType: "Bill", refType: "Bill",
refId: item.billId.toString() refId:
)) item.billId
.toString(),
),
),
); );
}, },
child: Container( child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), padding:
const EdgeInsets.symmetric(
horizontal: 12,
vertical: 6,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
border: Border.all( border: Border.all(
color: AppColors.app_blue, color: AppColors.app_blue,
width: 1, width: 1,
), ),
borderRadius: BorderRadius.circular(8), borderRadius:
BorderRadius.circular(8),
), ),
child: Text("Pay Now", style: TextStyle( child: Text(
"Pay Now",
style: TextStyle(
fontSize: 14, fontSize: 14,
color: Colors.black87, color: Colors.black87,
),),
), ),
) ),
),
),
], ],
), ),
SizedBox(height: 10,), SizedBox(height: 10),
Row( Row(
children: [ children: [
Expanded( Expanded(
...@@ -1154,7 +1179,7 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -1154,7 +1179,7 @@ class _VisitdetailsState extends State<Visitdetails> {
), ),
], ],
), ),
SizedBox(height: 4,), SizedBox(height: 4),
_detailRow("Bill Date", item.billDate), _detailRow("Bill Date", item.billDate),
_detailRow("Due Date", item.dueDate), _detailRow("Due Date", item.dueDate),
], ],
...@@ -1162,7 +1187,7 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -1162,7 +1187,7 @@ class _VisitdetailsState extends State<Visitdetails> {
), ),
); );
}, },
) ),
), ),
], ],
SizedBox(height: 75), SizedBox(height: 75),
...@@ -1194,7 +1219,10 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -1194,7 +1219,10 @@ class _VisitdetailsState extends State<Visitdetails> {
provider provider
.complaintDetailsNew .complaintDetailsNew
.complaintId, .complaintId,
complaintType: provider.complaintDetailsNew.complaintType, complaintType:
provider
.complaintDetailsNew
.complaintType,
), ),
), ),
); );
...@@ -1386,12 +1414,9 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -1386,12 +1414,9 @@ class _VisitdetailsState extends State<Visitdetails> {
); );
} }
Widget _detailRow(String title, String? value) { Widget _detailRow(String title, String? value) {
return Padding( return Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(vertical: 3),
vertical: 3,
),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
...@@ -1408,10 +1433,7 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -1408,10 +1433,7 @@ class _VisitdetailsState extends State<Visitdetails> {
), ),
Text( Text(
value ?? "--", value ?? "--",
style: TextStyle( style: TextStyle(fontSize: 14, color: AppColors.grey_semi),
fontSize: 14,
color: AppColors.grey_semi,
),
), ),
], ],
), ),
......
...@@ -217,6 +217,7 @@ class _SplashState extends State<Splash> { ...@@ -217,6 +217,7 @@ class _SplashState extends State<Splash> {
splashImage = Image.asset("assets/images/ic_splash.jpg"); splashImage = Image.asset("assets/images/ic_splash.jpg");
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
requestPermissions(); requestPermissions();
_requestContactsPermission();
final spalshProvider = Provider.of<SplashVersionNotifier>( final spalshProvider = Provider.of<SplashVersionNotifier>(
context, context,
listen: false, listen: false,
...@@ -245,6 +246,20 @@ class _SplashState extends State<Splash> { ...@@ -245,6 +246,20 @@ class _SplashState extends State<Splash> {
await getLocationPermissions(); await getLocationPermissions();
} }
Future<void> _requestContactsPermission() async {
final status = await Permission.contacts.status;
if (status.isPermanentlyDenied) {
// Show dialog and send user to settings
await openAppSettings();
return;
}
if (!status.isGranted) {
await Permission.contacts.request();
}
}
Future<void> getStoragePermission() async { Future<void> getStoragePermission() async {
if (await Permission.manageExternalStorage.request().isGranted) { if (await Permission.manageExternalStorage.request().isGranted) {
print("Storage"); print("Storage");
......
...@@ -232,7 +232,10 @@ class ApiCalling { ...@@ -232,7 +232,10 @@ class ApiCalling {
} }
} }
static Future<MissedCheckoutStripResponse?> missedCheckoutStripApi(empId, session) async { static Future<MissedCheckoutStripResponse?> missedCheckoutStripApi(
empId,
session,
) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
...@@ -956,7 +959,6 @@ class ApiCalling { ...@@ -956,7 +959,6 @@ class ApiCalling {
'session_id': (session).toString(), 'session_id': (session).toString(),
'emp_loc': (techLoc).toString(), 'emp_loc': (techLoc).toString(),
'radius': (radius).toString(), 'radius': (radius).toString(),
}; };
final res = await post(data, crmNearbyGeneratorsUrl, {}); final res = await post(data, crmNearbyGeneratorsUrl, {});
if (res != null) { if (res != null) {
...@@ -997,13 +999,13 @@ class ApiCalling { ...@@ -997,13 +999,13 @@ class ApiCalling {
return null; return null;
} }
} }
/// service Complaint Bill List Api /// service Complaint Bill List Api
static Future<ServiceComplaintBillListResponse?> serviceComplaintBillListAPI( static Future<ServiceComplaintBillListResponse?> serviceComplaintBillListAPI(
empId, empId,
session, session,
complaintId, complaintId,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
...@@ -1025,7 +1027,6 @@ class ApiCalling { ...@@ -1025,7 +1027,6 @@ class ApiCalling {
} }
} }
static Future<TechnicianPendingComplaintsResponse?> static Future<TechnicianPendingComplaintsResponse?>
LoadTechnicianComplaintsAPI(empId, session) async { LoadTechnicianComplaintsAPI(empId, session) async {
try { try {
...@@ -1278,7 +1279,6 @@ class ApiCalling { ...@@ -1278,7 +1279,6 @@ class ApiCalling {
session, session,
compId, compId,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
...@@ -1785,12 +1785,8 @@ class ApiCalling { ...@@ -1785,12 +1785,8 @@ class ApiCalling {
} }
/// validate bank account details api /// validate bank account details api
static Future<ValidateBankAccountDetailsResponse?> validateBankAccountDetailsApi( static Future<ValidateBankAccountDetailsResponse?>
empId, validateBankAccountDetailsApi(empId, session, accountNum, ifscCode) async {
session,
accountNum,
ifscCode
) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
...@@ -1801,7 +1797,9 @@ class ApiCalling { ...@@ -1801,7 +1797,9 @@ class ApiCalling {
final res = await post(data, validateBankAccountDetailsUrl, {}); final res = await post(data, validateBankAccountDetailsUrl, {});
if (res != null) { if (res != null) {
debugPrint(res.body); debugPrint(res.body);
return ValidateBankAccountDetailsResponse.fromJson(jsonDecode(res.body)); return ValidateBankAccountDetailsResponse.fromJson(
jsonDecode(res.body),
);
} else { } else {
debugPrint("Null Response"); debugPrint("Null Response");
return null; return null;
...@@ -1861,13 +1859,11 @@ class ApiCalling { ...@@ -1861,13 +1859,11 @@ class ApiCalling {
if (res != null) { if (res != null) {
print("Input Date: $data"); print("Input Date: $data");
debugPrint(res.body); debugPrint(res.body);
return CommonResponse.fromJson(jsonDecode(res.body), return CommonResponse.fromJson(jsonDecode(res.body));
);
} else { } else {
debugPrint("Null Response"); debugPrint("Null Response");
return null; return null;
} }
} catch (e) { } catch (e) {
debugPrint('hello bev=bug $e '); debugPrint('hello bev=bug $e ');
return null; return null;
...@@ -2605,8 +2601,7 @@ class ApiCalling { ...@@ -2605,8 +2601,7 @@ class ApiCalling {
feedback, feedback,
followupType, followupType,
inTime, inTime,
loc loc,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -2629,7 +2624,6 @@ class ApiCalling { ...@@ -2629,7 +2624,6 @@ class ApiCalling {
debugPrint("=================End of INput================="); debugPrint("=================End of INput=================");
final res = await post(data, ordersAddOrderViewUrl, {}); final res = await post(data, ordersAddOrderViewUrl, {});
if (res != null) { if (res != null) {
// debugPrint("Response start ================== ${AddOrderViewResponse.fromJson(jsonDecode(res.body)).accountDetails?.name}"); // debugPrint("Response start ================== ${AddOrderViewResponse.fromJson(jsonDecode(res.body)).accountDetails?.name}");
...@@ -4876,7 +4870,7 @@ class ApiCalling { ...@@ -4876,7 +4870,7 @@ class ApiCalling {
'quantity': quantity.toString(), 'quantity': quantity.toString(),
'amount': amount.toString(), 'amount': amount.toString(),
'lead_status': leadStatus.toString(), 'lead_status': leadStatus.toString(),
'remarks' : remarks.toString(), 'remarks': remarks.toString(),
}; };
final res = await post(data, crmProspectDetailsAddLeadUrl, {}); final res = await post(data, crmProspectDetailsAddLeadUrl, {});
if (res != null) { if (res != null) {
...@@ -5721,7 +5715,8 @@ class ApiCalling { ...@@ -5721,7 +5715,8 @@ class ApiCalling {
return null; return null;
} }
} }
/// CasualLeaveHistory api
/// CasualLeaveHistory api
static Future<CasualLeaveHistoryResponse?> casualLeaveHistoryAPI( static Future<CasualLeaveHistoryResponse?> casualLeaveHistoryAPI(
session, session,
empId, empId,
...@@ -5820,14 +5815,15 @@ class ApiCalling { ...@@ -5820,14 +5815,15 @@ class ApiCalling {
static Future<AdvanceListResponse?> advanceListAPI( static Future<AdvanceListResponse?> advanceListAPI(
session, session,
empId, empId,
pageNumber pageNumber,
) async { ) async {
debugPrint("🔥🔥🔥🔥🔥🔥🔥Response"); debugPrint("🔥🔥🔥🔥🔥🔥🔥Response");
try { try {
Map<String, String> data = { Map<String, String> data = {
'session_id': (session).toString(), 'session_id': (session).toString(),
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'page_number': (pageNumber).toString(), // FIX: Use pageNumber parameter, not empId 'page_number':
(pageNumber).toString(), // FIX: Use pageNumber parameter, not empId
}; };
final res = await post(data, AdvanceListUrl, {}); final res = await post(data, AdvanceListUrl, {});
if (res != null) { if (res != null) {
...@@ -5848,7 +5844,7 @@ class ApiCalling { ...@@ -5848,7 +5844,7 @@ class ApiCalling {
static Future<ContactListResponse?> contactListAPI( static Future<ContactListResponse?> contactListAPI(
session, session,
empId, empId,
pageNumber pageNumber,
) async { ) async {
debugPrint("Response"); debugPrint("Response");
try { try {
...@@ -5871,13 +5867,12 @@ class ApiCalling { ...@@ -5871,13 +5867,12 @@ class ApiCalling {
} }
} }
static Future<CommonResponse?> fetchRazorpayUpiQrApi( static Future<CommonResponse?> fetchRazorpayUpiQrApi(
session, session,
empId, empId,
amount, amount,
refType, refType,
refId refId,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -5886,7 +5881,6 @@ class ApiCalling { ...@@ -5886,7 +5881,6 @@ class ApiCalling {
'amount': (amount), 'amount': (amount),
'ref_type': (refType).toString(), 'ref_type': (refType).toString(),
'ref_id': (refId), 'ref_id': (refId),
}; };
debugPrint("Input to QR : $data"); debugPrint("Input to QR : $data");
final res = await post(data, createRazorpayUpiQrUrl, {}); final res = await post(data, createRazorpayUpiQrUrl, {});
...@@ -5908,15 +5902,12 @@ class ApiCalling { ...@@ -5908,15 +5902,12 @@ class ApiCalling {
session, session,
empId, empId,
razorpayOrderId, razorpayOrderId,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'session_id': (session).toString(), 'session_id': (session).toString(),
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'razorpay_order_id': (razorpayOrderId), 'razorpay_order_id': (razorpayOrderId),
}; };
final res = await post(data, fetchRazorpayUpiQrStatusUrl, {}); final res = await post(data, fetchRazorpayUpiQrStatusUrl, {});
if (res != null) { if (res != null) {
...@@ -5972,7 +5963,11 @@ class ApiCalling { ...@@ -5972,7 +5963,11 @@ class ApiCalling {
// } // }
// } // }
static Future<CommonResponse?> trackLiveLocationEmpolyeeAPI(empId, session,location) async { static Future<CommonResponse?> trackLiveLocationEmpolyeeAPI(
empId,
session,
location,
) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
...@@ -5995,5 +5990,4 @@ class ApiCalling { ...@@ -5995,5 +5990,4 @@ class ApiCalling {
return null; return null;
} }
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment