Issue fixes & updates

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

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

@ -64,7 +64,14 @@ class _LeaveBalanceState extends State<LeaveBalance> {
context, context,
title: LocaleKeys.leaveBalance.tr(), title: LocaleKeys.leaveBalance.tr(),
), ),
body: absenceTransList == null 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() ? const SizedBox()
: (absenceTransList!.isEmpty : (absenceTransList!.isEmpty
? Utils.getNoDataWidget(context).paddingOnly(top: 50) ? Utils.getNoDataWidget(context).paddingOnly(top: 50)
@ -72,8 +79,8 @@ class _LeaveBalanceState extends State<LeaveBalance> {
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(21), padding: const EdgeInsets.all(21),
children: [ children: [
BalancesDashboardWidget(LocaleKeys.currentLeaveBalance.tr(), true, selectedEmp: employeeId, showLoading: false), // BalancesDashboardWidget(LocaleKeys.currentLeaveBalance.tr(), true, selectedEmp: employeeId, showLoading: false),
12.height, // 12.height,
ListView.separated( ListView.separated(
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
@ -105,6 +112,8 @@ class _LeaveBalanceState extends State<LeaveBalance> {
itemCount: absenceTransList!.length), itemCount: absenceTransList!.length),
], ],
)), )),
],
),
floatingActionButton: Container( floatingActionButton: Container(
height: 54, height: 54,
width: 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/models/privilege_list_model.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart'; import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/input_widget.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:safe_device/safe_device.dart';
import 'package:wifi_iot/wifi_iot.dart'; import 'package:wifi_iot/wifi_iot.dart';
@ -70,26 +71,26 @@ class _LoginScreenState extends State<LoginScreen> {
super.initState(); super.initState();
// hmsApiAvailability = HmsApiAvailability(); // hmsApiAvailability = HmsApiAvailability();
// checkFirebaseToken(); // checkFirebaseToken();
// if (kReleaseMode) { if (kReleaseMode) {
// checkDeviceSafety(); checkDeviceSafety();
// } }
} }
// void checkDeviceSafety() async { void checkDeviceSafety() async {
// try { try {
// isJailBroken = await SafeDevice.isJailBroken; isJailBroken = await SafeDevice.isJailBroken;
// isRealDevice = await SafeDevice.isRealDevice; isRealDevice = await SafeDevice.isRealDevice;
// if (Platform.isAndroid) { if (Platform.isAndroid) {
// isOnExternalStorage = await SafeDevice.isOnExternalStorage; isOnExternalStorage = await SafeDevice.isOnExternalStorage;
// isDevelopmentModeEnable = await SafeDevice.isDevelopmentModeEnable; isDevelopmentModeEnable = await SafeDevice.isDevelopmentModeEnable;
// } }
// if (isJailBroken || !isRealDevice || isOnExternalStorage || isDevelopmentModeEnable) { if (isJailBroken || !isRealDevice || isOnExternalStorage || isDevelopmentModeEnable) {
// Navigator.pushNamedAndRemoveUntil(context, AppRoutes.unsafeDeviceScreen, (_) => false); Navigator.pushNamedAndRemoveUntil(context, AppRoutes.unsafeDeviceScreen, (_) => false);
// } }
// } catch (error) { } catch (error) {
// print(error); print(error);
// } }
// } }
@override @override
void dispose() { void dispose() {

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

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

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

Loading…
Cancel
Save