Issue fixes & updates

master-Api2.0
haroon amjad 11 months ago
parent b20e0a8c7b
commit cdd56b2a5a

@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.7.20'
ext.kotlin_version = '1.8.20'
repositories {
google()
mavenCentral()

@ -64,47 +64,56 @@ class _LeaveBalanceState extends State<LeaveBalance> {
context,
title: LocaleKeys.leaveBalance.tr(),
),
body: absenceTransList == null
? const SizedBox()
: (absenceTransList!.isEmpty
? Utils.getNoDataWidget(context).paddingOnly(top: 50)
: ListView(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(21),
children: [
BalancesDashboardWidget(LocaleKeys.currentLeaveBalance.tr(), true, selectedEmp: employeeId, showLoading: false),
12.height,
ListView.separated(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.zero,
itemBuilder: (cxt, int index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.startDateT.tr(), absenceTransList![index].sTARTDATE ?? ""),
ItemDetailViewCol(LocaleKeys.endDateT.tr(), absenceTransList![index].eNDDATE ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.absenceType.tr(), absenceTransList![index].aBSENCETYPE ?? ""),
ItemDetailViewCol(LocaleKeys.absenceCategory.tr(), absenceTransList![index].aBSENCECATEGORY ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.days.tr(), absenceTransList![index].aBSENCEDAYS?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.hours.tr(), absenceTransList![index].aBSENCEHOURS?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.approvalStatus.tr(), absenceTransList![index].aPPROVALSTATUS ?? ""),
ItemDetailViewCol(LocaleKeys.absenceStatus.tr(), absenceTransList![index].aBSENCESTATUS ?? ""),
isItLast: true,
),
],
).objectContainerView(),
separatorBuilder: (cxt, index) => 12.height,
itemCount: absenceTransList!.length),
],
)),
body: Column(
children: [
Padding(
padding: const EdgeInsets.all(21.0),
child: BalancesDashboardWidget(LocaleKeys.currentLeaveBalance.tr(), true, selectedEmp: employeeId, showLoading: false),
),
12.height,
absenceTransList == null
? const SizedBox()
: (absenceTransList!.isEmpty
? Utils.getNoDataWidget(context).paddingOnly(top: 50)
: ListView(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(21),
children: [
// BalancesDashboardWidget(LocaleKeys.currentLeaveBalance.tr(), true, selectedEmp: employeeId, showLoading: false),
// 12.height,
ListView.separated(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.zero,
itemBuilder: (cxt, int index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.startDateT.tr(), absenceTransList![index].sTARTDATE ?? ""),
ItemDetailViewCol(LocaleKeys.endDateT.tr(), absenceTransList![index].eNDDATE ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.absenceType.tr(), absenceTransList![index].aBSENCETYPE ?? ""),
ItemDetailViewCol(LocaleKeys.absenceCategory.tr(), absenceTransList![index].aBSENCECATEGORY ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.days.tr(), absenceTransList![index].aBSENCEDAYS?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.hours.tr(), absenceTransList![index].aBSENCEHOURS?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.approvalStatus.tr(), absenceTransList![index].aPPROVALSTATUS ?? ""),
ItemDetailViewCol(LocaleKeys.absenceStatus.tr(), absenceTransList![index].aBSENCESTATUS ?? ""),
isItLast: true,
),
],
).objectContainerView(),
separatorBuilder: (cxt, index) => 12.height,
itemCount: absenceTransList!.length),
],
)),
],
),
floatingActionButton: Container(
height: 54,
width: 54,

@ -30,6 +30,7 @@ import 'package:mohem_flutter_app/models/member_login_list_model.dart';
import 'package:mohem_flutter_app/models/privilege_list_model.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/input_widget.dart';
import 'package:safe_device/safe_device.dart';
// import 'package:safe_device/safe_device.dart';
import 'package:wifi_iot/wifi_iot.dart';
@ -70,26 +71,26 @@ class _LoginScreenState extends State<LoginScreen> {
super.initState();
// hmsApiAvailability = HmsApiAvailability();
// checkFirebaseToken();
// if (kReleaseMode) {
// checkDeviceSafety();
// }
if (kReleaseMode) {
checkDeviceSafety();
}
}
// void checkDeviceSafety() async {
// try {
// isJailBroken = await SafeDevice.isJailBroken;
// isRealDevice = await SafeDevice.isRealDevice;
// if (Platform.isAndroid) {
// isOnExternalStorage = await SafeDevice.isOnExternalStorage;
// isDevelopmentModeEnable = await SafeDevice.isDevelopmentModeEnable;
// }
// if (isJailBroken || !isRealDevice || isOnExternalStorage || isDevelopmentModeEnable) {
// Navigator.pushNamedAndRemoveUntil(context, AppRoutes.unsafeDeviceScreen, (_) => false);
// }
// } catch (error) {
// print(error);
// }
// }
void checkDeviceSafety() async {
try {
isJailBroken = await SafeDevice.isJailBroken;
isRealDevice = await SafeDevice.isRealDevice;
if (Platform.isAndroid) {
isOnExternalStorage = await SafeDevice.isOnExternalStorage;
isDevelopmentModeEnable = await SafeDevice.isDevelopmentModeEnable;
}
if (isJailBroken || !isRealDevice || isOnExternalStorage || isDevelopmentModeEnable) {
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.unsafeDeviceScreen, (_) => false);
}
} catch (error) {
print(error);
}
}
@override
void dispose() {

@ -84,6 +84,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
controller.jumpToPage(0);
});
} catch (ex) {
setState(() {});
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
@ -534,6 +535,7 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
Utils.handleException(ex, context, null);
}
}
void performAnswerAction(String requestType, taskId, itemId, String employeeNumber, String comments) async {
try {
Utils.showLoading(context);

@ -167,7 +167,7 @@ class ActionsFragment extends StatelessWidget {
Duration duration = DateTime.now().difference(dateTimeFrom);
return "Action duration: " + DateUtil.formatDuration(duration);
} else {
if (actionHistoryList[index].nOTIFICATIONDATE!.isEmpty) {
if (actionHistoryList[index].nOTIFICATIONDATE!.isEmpty || actionHistoryList[index].aCTIONCODE! == "NO ACTION") {
return "";
} else {
DateTime dateTimeTo = DateUtil.convertSimpleStringDateToDate(actionHistoryList[index].nOTIFICATIONDATE!);

@ -82,6 +82,7 @@ dependencies:
# Marathon Card Swipe
appinio_swiper: ^1.1.1
expandable: ^5.0.1
safe_device: ^1.1.9
# networkImage
cached_network_image: ^3.2.2

Loading…
Cancel
Save