Merge branch 'development_sikander' into 'master'

bussiness card improvement.

See merge request Cloud_Solution/mohemm-flutter-app!2
faiz_marathon_signalR_critical
Sikander Saleem 2 years ago
commit b2f18f1baa

@ -91,7 +91,7 @@ class LoginApiClient {
AppState().postParamsObject?.pSelectedEmployeeNumber = AppState().getUserName;
AppState().postParamsObject?.setPLegislationCode = responseData.basicMemberInformation!.pLEGISLATIONCODE;
AppState().postParamsObject?.setPayrollCodeStr = responseData.memberInformationList!.first.pAYROLLCODE;
AppState().setBusinessCardPrivilege = responseData.businessCardPrivilege ?? false;
return responseData;
}, url, postParams);
}

@ -25,6 +25,12 @@ class AppState {
bool? get getIsLogged => isLogged;
bool businessCardPrivilege = false;
set setBusinessCardPrivilege(bool v) => businessCardPrivilege = v;
bool? get getBusinessCardPrivilege => businessCardPrivilege;
String? forgetPasswordTokenID;
set setForgetPasswordTokenID(token) => forgetPasswordTokenID = token;

@ -424,9 +424,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
selectedIconTheme: const IconThemeData(color: MyColors.grey3AColor, size: 28),
unselectedIconTheme: const IconThemeData(color: MyColors.grey98Color, size: 28),
onTap: (int index) {
// currentIndex = index;
// setState(() {});
Navigator.pushNamed(context, AppRoutes.itemsForSale);
if (index == 1) {
Navigator.pushNamed(context, AppRoutes.mowadhafhi);
} else if (index == 2) {
Navigator.pushNamed(context, AppRoutes.workList);
} else if (index == 3) {
Navigator.pushNamed(context, AppRoutes.itemsForSale);
}
},
),
),

@ -16,7 +16,6 @@ import 'package:mohem_flutter_app/ui/dialogs/id/business_card_dialog.dart';
import 'package:mohem_flutter_app/ui/dialogs/id/employee_digital_id_dialog.dart';
import 'package:mohem_flutter_app/widgets/dialogs/dialogs.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
class AppDrawer extends StatefulWidget {
@override
@ -85,7 +84,8 @@ class _AppDrawerState extends State<AppDrawer> {
});
}),
menuItem("assets/images/drawer/employee_id.svg", LocaleKeys.employeeDigitalID.tr(), "", closeDrawer: false, onPress: () => showMDialog(context, child: EmployeeDigitialIdDialog())),
menuItem("assets/images/drawer/view_business_card.svg", LocaleKeys.viewBusinessCard.tr(), "", closeDrawer: false, onPress: () => showMDialog(context, child: BusinessCardDialog())),
if (AppState().businessCardPrivilege)
menuItem("assets/images/drawer/view_business_card.svg", LocaleKeys.viewBusinessCard.tr(), "", closeDrawer: false, onPress: () => showMDialog(context, child: BusinessCardDialog())),
menuItem("assets/images/drawer/logout.svg", LocaleKeys.logout.tr(), "", color: MyColors.redA3Color, closeDrawer: false, onPress: performLogout),
// menuItem("assets/images/drawer/logout.svg", LocaleKeys.logout.tr(), "", color: MyColors.redA3Color, closeDrawer: false, onPress: () {Navigator.pushNamed(context, AppRoutes.survey,);
],

@ -113,7 +113,7 @@ class _LoginScreenState extends State<LoginScreen> {
}
Utils.hideLoading(context);
if (_autoLogin) {
Navigator.pushNamed(context, AppRoutes.verifyLastLogin, arguments: loginInfo);
Navigator.pushReplacementNamed(context, AppRoutes.verifyLastLogin, arguments: loginInfo);
} else {
Navigator.pushNamed(context, AppRoutes.verifyLogin, arguments: "$firebaseToken");
}

@ -20,6 +20,7 @@ import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/basic_member_information_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/get_mobile_login_info_list_model.dart';
import 'package:mohem_flutter_app/ui/dialogs/id/business_card_dialog.dart';
import 'package:mohem_flutter_app/ui/dialogs/id/employee_digital_id_dialog.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/dialogs/dialogs.dart';
@ -58,15 +59,23 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
Widget build(BuildContext context) {
mobileLoginInfoListModel ??= ModalRoute.of(context)!.settings.arguments as GetMobileLoginInfoListModel;
String empName = AppState().isArabic(context) ? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr! : AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn!;
print("selectedFlag1: " + mobileLoginInfoListModel!.loginType.toString());
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
// leading: IconButton(
// icon: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
// onPressed: () => Navigator.pop(context),
// ),
actions: [Center(child: "Employee Digital ID".toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {showMDialog(context, child: EmployeeDigitialIdDialog());})), 21.width],
automaticallyImplyLeading: false,
title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false)
? LocaleKeys.viewBusinessCard.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: BusinessCardDialog());
})
: null,
actions: [
Center(
child: LocaleKeys.employeeDigitalID.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: EmployeeDigitialIdDialog());
})),
21.width
],
),
body: Column(
children: [
@ -224,7 +233,6 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) {
bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint)));
print("$_title:$isDisable");
return InkWell(
onTap: isDisable
? null

@ -167,7 +167,7 @@ class _ItemsForSaleFragmentState extends State<ItemsForSaleFragment> {
),
10.height,
getItemsForSaleList.title!.toText16(maxlines: 1),
getItemsForSaleList.description!.toText12(maxLine: 3, color: MyColors.grey57Color).expanded,
getItemsForSaleList.description!.toText12(maxLine: 2, color: MyColors.grey57Color).expanded,
// 8.height,
getItemsForSaleList.status!.toText14(color: getItemsForSaleList.status == 'Approved' ? MyColors.greenColor : MyColors.yellowColor),
Row(

Loading…
Cancel
Save