fixes & updates

sultan-dev
haroon amjad 2 years ago
parent ff3c7be11f
commit a39e6808d7

@ -30,7 +30,6 @@ class MarathonApiClient {
if (marathonModel.statusCode == 200) {
if (marathonModel.data != null && marathonModel.isSuccessful == true) {
AppState().setMarathonToken = marathonModel.data["token"] ?? "";
print("bearer: ${AppState().getMarathonToken}");
return marathonModel.data["token"] ?? "";
} else {
//TODO : DO ERROR HANDLING HERE

@ -29,7 +29,6 @@ class MonthlyAttendanceApiClient {
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
print(responseData);
return (responseData.getTimeCardSummaryList?.length ?? 0) > 0 ? responseData.getTimeCardSummaryList!.first : null;
}, url, postParams);
}
@ -49,7 +48,6 @@ class MonthlyAttendanceApiClient {
// postParams["DeviceType"] = deviceType;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
print(responseData.getDayHoursTypeDetailsList!.length);
return responseData.getDayHoursTypeDetailsList ?? [];
}, url, postParams);
}

@ -19,7 +19,6 @@ class MonthlyPaySlipApiClient {
String url = "${ApiConsts.erpRest}GET_PAYSLIP";
Map<String, dynamic> postParams = {"P_MENU_TYPE": "E", "P_SELECTED_RESP_ID": -999};
postParams.addAll(AppState().postParamsJson);
print(postParams);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.getPayslipList ?? [];

@ -26,7 +26,6 @@ class MyAttendanceApiClient {
if (empID!.isNotEmpty) {
postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID;
// AppState().postParamsJson['P_SELECTED_EMPLOYEE_NUMBER'] = empID;
print(empID);
}
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);

@ -64,7 +64,6 @@ class MyTeamApiClient {
postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
print(responseData.getDayHoursTypeDetailsList!.length);
return responseData.getDayHoursTypeDetailsList ?? [];
}, url, postParams);
}
@ -76,7 +75,6 @@ class MyTeamApiClient {
postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
print(responseData.getAttendanceTrackingList);
return responseData.getAttendanceTrackingList;
}, url, postParams);
}

@ -41,7 +41,6 @@ class ProfileApiClient {
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
print(responseData);
return responseData.getEmployeeContactsList ?? [];
}, url, postParams);
}
@ -258,7 +257,6 @@ class ProfileApiClient {
// "EITTransactionTBLModel": list,
};
postParams.addAll(AppState().postParamsJson);
print("postParams:$postParams");
postParams["EITTransactionTBL"] = list;
postParams["EITTransactionTBLModel"] = list;
return await ApiClient().postJsonForObject((json) {
@ -300,7 +298,6 @@ class ProfileApiClient {
// "EITTransactionTBLModel": list,
};
postParams.addAll(AppState().postParamsJson);
print("postParams:$postParams");
postParams["EITTransactionTBL"] = list;
// postParams["EITTransactionTBLModel"] = list;
return await ApiClient().postJsonForObject((json) {
@ -389,12 +386,7 @@ class ProfileApiClient {
};
postParams.addAll(AppState().postParamsJson);
print("postParam:${json.encode(postParams)}");
postParams["EITTransactionTBL"] = list;
list.forEach((element) {
print(json.encode(element));
});
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.submitContactTransactionList;

@ -46,9 +46,6 @@ class TerminationDffApiClient {
};
postParams.addAll(AppState().postParamsJson);
for (var abc in list) {
print(abc);
}
return await ApiClient().postJsonForObject((json) {
GenericResponseModel genericResponseModel = GenericResponseModel.fromJson(json);
return genericResponseModel.submitTermTransactionList!;

@ -340,7 +340,6 @@ class Utils {
static void readNFc({required Function(String) onRead}) {
NfcManager.instance.startSession(onDiscovered: (NfcTag tag) async {
print(tag.data);
var f;
if (Platform.isAndroid) {
f = MifareUltralight(tag: tag, identifier: tag.data["nfca"]["identifier"], type: 2, maxTransceiveLength: 252, timeout: 22);

@ -1,5 +1,3 @@
import 'dart:convert';
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -139,11 +137,11 @@ class _ChatHomeScreenState extends State<ChatHomeScreen> {
children: [
(m.searchedChats![index].userName!.replaceFirst(".", " ").capitalizeFirstofEach ?? "").toText14(color: MyColors.darkTextColor).paddingOnly(left: 11, top: 13),
m.searchedChats![index].isTyping!
? AnimatedTextKit(
animatedTexts: [
ScaleAnimatedText('Typing...', textStyle: const TextStyle(color: MyColors.textMixColor, fontSize: 10, letterSpacing: -0.4, fontStyle: FontStyle.normal)),
],
).paddingOnly(left: 11)
? 'Typing...'
.toText10(
color: MyColors.textMixColor,
)
.paddingOnly(left: 11.0)
: const SizedBox()
//(m.searchedChats![index].isTyping! ? "Typing ..." : "").toText10(color: MyColors.textMixColor).paddingOnly(left: 11, top: 0),
],

@ -41,8 +41,6 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
bool isAvailable = await NfcManager.instance.isAvailable();
setState(() {
AppState().privilegeListModel!.forEach((element) {
print(element.serviceName.toString() + " " + element.previlege.toString()); // Check availability
if (element.serviceName == "enableNFC") {
if (isAvailable) if (element.previlege ?? false) isNfcEnabled = true;
} else if (element.serviceName == "enableQR") {

@ -636,9 +636,6 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
AppState().setPrivilegeListModel = genericResponseModel!.privilegeList ?? [];
AppState().setMemberInformationListModel = genericResponseModel.memberInformationList?.first;
MemberInformationListModel.saveToPrefs(genericResponseModel.memberInformationList ?? []);
genericResponseModel.privilegeList!.forEach((element) {
print(element.serviceName.toString() + " " + element.previlege.toString()); // Check availability
});
PrivilegeListModel.saveToPrefs(genericResponseModel.privilegeList ?? []);
AppState().setMohemmWifiSSID = genericResponseModel.mohemmWifiSSID;
AppState().setMohemmWifiPassword = genericResponseModel.mohemmWifiPassword;

@ -242,7 +242,6 @@ class MarathonProvider extends ChangeNotifier {
selectedWinners = await MarathonApiClient().getSelectedWinner(marathonId: marathonDetailModel.id!);
if (selectedWinners != null) {
selectedWinners!.removeWhere((WinnerModel element) {
print("matching : ${AppState().memberInformationList!.eMPLOYEENUMBER} with ${element.employeeId}");
if (element.employeeId == AppState().memberInformationList!.eMPLOYEENUMBER) {
iAmWinner = true;
return true;
@ -251,7 +250,6 @@ class MarathonProvider extends ChangeNotifier {
}
});
}
print("selectedWinners Length : ${selectedWinners!.length}");
notifyListeners();
}

@ -44,13 +44,12 @@ class _BasicDetailsState extends State<BasicDetails> {
super.initState();
memberInformationList = AppState().memberInformationList!;
List<GetMenuEntriesList> menuData = Provider.of<DashboardProviderModel>(context, listen: false).getMenuEntriesList!;
for( int i=0;i<menuData.length;i++) {
for (int i = 0; i < menuData.length; i++) {
menuData[i].icon == "";
print(menuData[i].requestType);
}
var filterList = menuData.where((e) => e.requestType == 'BASIC_DETAILS').toList();
if(filterList.isNotEmpty) {
if (filterList.isNotEmpty) {
menuEntries = filterList.first;
}

@ -37,7 +37,6 @@ class _DeleteFamilyMemberState extends State<DeleteFamilyMember> {
//int? relationId;
@override
void initState() {
print(widget.relationId);
super.initState();
}

@ -294,7 +294,6 @@ class _DynamicInputScreenState extends State<DynamicInputScreenAddress> {
countryCode,
effectiveDate.isEmpty ? DateFormat('dd-MMM-yyy').format(DateTime.now()) : effectiveDate,
);
print(values);
Utils.hideLoading(context);
Navigator.pushNamed(context, AppRoutes.requestSubmitScreen,

@ -39,7 +39,6 @@ class _ItemsForSaleFragmentState extends State<ItemsForSaleFragment> {
if (gridScrollController.position.atEdge) {
bool isTop = gridScrollController.position.pixels == 0;
if (!isTop && getItemsForSaleList.length == currentPageNo * 10) {
print('At the bottom');
currentPageNo++;
getItemsForSale(currentPageNo, currentCategoryID);
}

@ -193,7 +193,6 @@ class _MyPostedAdsFragmentState extends State<MyPostedAdsFragment> {
Utils.hideLoading(context);
Utils.handleException(e, context, null);
});
print(response.statusCode);
Utils.hideLoading(context);
getAdsByEmployee();
}

@ -255,7 +255,6 @@ class _EndEmploymentScreenState extends State<EndEmploymentScreen> {
],
onSelected: (int popipIndex) async {
termColObject.selectedObjectValue = termColObject.objectValuesList![popipIndex];
print(termColObject.selectedObjectValue?.toJson());
setState(() {});
});
}

@ -352,7 +352,6 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
}
void handleFabAction(AllowedActions action) {
print(action.toJson());
switch (action.action) {
case "Delegate":
showMyBottomSheet(context,
@ -461,7 +460,6 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
}
void performAction(String actionMode) {
print(actionMode);
showDialog(
context: context,
builder: (cxt) => ITGCommentsDialog(

@ -1,4 +1,3 @@
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
@ -51,12 +50,7 @@ AppBar ChatAppBarWidget(BuildContext context,
Consumer<ChatProviderModel>(
builder: (BuildContext cxt, ChatProviderModel data, Widget? child) {
if (chatUser!.isTyping!) {
// return ("Typing ...").toText10(color: MyColors.textMixColor);
return AnimatedTextKit(
animatedTexts: [
ScaleAnimatedText('Typing...', textStyle: const TextStyle(color: MyColors.textMixColor, fontSize: 10, letterSpacing: -0.4, fontStyle: FontStyle.normal)),
],
);
return ("Typing ...").toText10(color: MyColors.textMixColor);
} else {
return const SizedBox();
}

@ -48,8 +48,6 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
bool isAvailable = await NfcManager.instance.isAvailable();
setState(() {
AppState().privilegeListModel!.forEach((element) {
print(element.serviceName.toString() + " " + element.previlege.toString()); // Check availability
if (element.serviceName == "enableNFC") {
if (isAvailable) if (element.previlege ?? false) isNfcEnabled = true;
} else if (element.serviceName == "enableQR") {
@ -76,7 +74,6 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
@override
Widget build(BuildContext context) {
print(MediaQuery.of(context).size.width);
return Container(
padding: EdgeInsets.only(left: 21, right: 21, bottom: 21, top: widget.topPadding),
decoration: const BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white),
@ -134,12 +131,6 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
}
Future<void> performNfcAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
if (isNfcLocationEnabled) {
print("nfc location enabled");
} else {
print("nfc not location enabled");
}
if (Platform.isIOS) {
Utils.readNFc(onRead: (String nfcId) async {
Utils.showLoading(context);
@ -177,7 +168,6 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
});
} else {
showNfcReader(context, onNcfScan: (String? nfcId) async {
print(nfcId);
Utils.showLoading(context);
try {
GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 2, nfcValue: nfcId ?? "", isGpsRequired: isNfcLocationEnabled, lat: lat, long: lng);
@ -214,12 +204,6 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
}
Future<void> performWifiAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
if (isWifiLocationEnabled) {
print("wifi location enabled");
} else {
print("wifi not location enabled");
}
Utils.showLoading(context);
bool isConnected = await WiFiForIoTPlugin.connect(AppState().getMohemmWifiSSID ?? "",
password: AppState().getMohemmWifiPassword ?? "", joinOnce: Platform.isIOS ? false : true, security: NetworkSecurity.WPA, withInternet: false);
@ -271,7 +255,6 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
),
);
if (qrCodeValue != null) {
print("qrCode: " + qrCodeValue);
Utils.showLoading(context);
try {
GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 1, isGpsRequired: isQrLocationEnabled, lat: lat, long: lng, QRValue: qrCodeValue);

@ -41,7 +41,6 @@ class _NfcLayoutState extends State<NfcLayout> {
super.initState();
NfcManager.instance.startSession(onDiscovered: (NfcTag tag) async {
print(tag.data);
var f;
if (Platform.isAndroid) {
f = MifareUltralight(tag: tag, identifier: tag.data["nfca"]["identifier"], type: 2, maxTransceiveLength: 252, timeout: 22);

@ -92,7 +92,7 @@ dependencies:
swipe_to: ^1.0.2
flutter_webrtc: ^0.9.16
camera: ^0.10.0+4
animated_text_kit: ^4.2.2
# animated_text_kit: ^4.2.2
#Encryption
flutter_des: ^2.1.0

Loading…
Cancel
Save