# Conflicts:
#	assets/langs/ar-SA.json
#	assets/langs/en-US.json
sultan_dev
Sultan khan 3 years ago
commit b7f50d43f7

@ -53,7 +53,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "hmg.cloudSolutions.mohem"
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

@ -307,6 +307,7 @@
"actionBy": "الرد بواسطة",
"pending": "معلق",
"pendingTransactions": "المعاملات المعلقه",
"notices": "إشعارات",
"selectRequestType": "الرجاء اختيار نوع الطلب",
"dateFrom": "من تاريخ",
"dateTo": "الى تاريخ",
@ -540,5 +541,6 @@
"view_your_leave_information": "عرض معلومات إجازتك",
"view_details": "عرض التفاصيل",
"create_absence_request": "إنشاء طلب الغياب",
"business_mission": "طلب مهمة العمل"
"business_mission": "طلب مهمة العمل",
"hierarchy": "تَسَلسُل"
}

@ -303,6 +303,7 @@
"topic": "Topic",
"actionBy": "Action By",
"pendingTransactions": "Pending Transactions",
"notices": "Notices",
"selectRequestType": "Please select request type",
"dateFrom": "Date From",
"dateTo": "Date To",
@ -540,6 +541,7 @@
"view_your_leave_information": "View Your Leave Information",
"view_details": "View Details",
"create_absence_request": "Create Absence Request",
"business_mission": "Business Mission Request"
"business_mission": "Business Mission Request",
"hierarchy": "Hierarchy"
}

@ -9,8 +9,8 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1CCF895CFB3C95DEBB84A05F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8F0CC8EAC13AF3E07BEE567 /* Pods_Runner.framework */; };
341195B929E80BC700FBCA57 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
76AE113C28E078EA00513112 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 76AE113B28E078EA00513112 /* GoogleService-Info.plist */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@ -144,7 +144,6 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
C4CFBC4C5CAC00182015ACD5 /* [CP] Embed Pods Frameworks */,
1C704830960BB41251F31356 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@ -204,23 +203,6 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
1C704830960BB41251F31356 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
2D06B7AD3B87C9C9059E4168 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -295,7 +277,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
341195B929E80BC700FBCA57 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;

@ -5,9 +5,7 @@
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.cloudsolutions.mohemm</string>
</array>
<array/>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudDocuments</string>
@ -23,8 +21,6 @@
<string>TAG</string>
</array>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>iCloud.com.cloudsolutions.mohemm</string>
</array>
<array/>
</dict>
</plist>

@ -60,7 +60,7 @@ class MyRequestsApiClient {
}, url, postParams);
}
Future<SubmitCcpTransactionList?> getSubmitNewRequest(List<Map<String, dynamic>> list, {String? functionName}) async {
Future<GenericResponseModel> getSubmitNewRequest(List<Map<String, dynamic>> list, {String? functionName}) async {
String url = "${ApiConsts.erpRest}SUBMIT_CCP_TRANSACTION";
Map<String, dynamic> postParams = {
"P_MENU_TYPE": "E",
@ -72,7 +72,7 @@ class MyRequestsApiClient {
postParams["EITTransactionTBL"] = list;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.submitCcpTransactionList;
return responseData;
}, url, postParams);
}

@ -111,7 +111,7 @@ class ProfileApiClient {
Future<GenericResponseModel> getDffStructure(String pFunctionName, String uRL, String requestType) async {
String url = ApiConsts.erpRest + uRL;
Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E", "P_REQUEST_TYPE": pFunctionName, "P_FUNCTION_NAME": pFunctionName, "P_COUNTRY_CODE": "SA"};
Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E", "P_REQUEST_TYPE": requestType, "P_FUNCTION_NAME": pFunctionName, "P_COUNTRY_CODE": "SA"};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);

@ -149,12 +149,13 @@ class WorkListApiClient {
}, url, postParams);
}
Future<MemberInformationListModel> getUserInformation(int pSelectedResopID, String selectedEmployeeNumber) async {
Future<MemberInformationListModel> getUserInformation(int pSelectedResopID, String selectedEmployeeNumber, String noficationId) async {
String url = "${ApiConsts.erpRest}Get_Notification_UserInformation";
Map<String, dynamic> postParams = {
"P_SELECTED_RESP_ID": pSelectedResopID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
"P_NOTIFICATION_ID": noficationId,
};
postParams.addAll(AppState().postParamsJson);
if (selectedEmployeeNumber != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = selectedEmployeeNumber;
@ -413,7 +414,7 @@ class WorkListApiClient {
"EmployeeNumber": employeeNumber,
"Comments": "",
"AdditionalFields": null,
"NewUserEMPId":newUserEMPId
"NewUserEMPId": newUserEMPId
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {

@ -6,8 +6,8 @@ class MyColors {
static const Color darkTextColor = Color(0xff2B353E);
static const Color normalTextColor = Color(0xff5A5A5A);
static const Color lightTextColor = Color(0xffBFBFBF);
static const Color gradiantStartColor = Color(0xff33c0a5);
static const Color gradiantEndColor = Color(0xff259db7);
static const Color gradiantStartColor = Color(0xff259db7);
static const Color gradiantEndColor = Color(0xff33c0a5);
static const Color textMixColor = Color(0xff2BB8A6);
static const Color backgroundColor = Color(0xffF8F8F8);
static const Color grey41Color = Color(0xff414141);
@ -30,7 +30,7 @@ class MyColors {
static const Color darkWhiteColor = Color(0xffE0E0E0);
static const Color redColor = Color(0xffD02127);
static const Color pinkColor = Color(0xffEBA9A9);
static const Color pinkDarkColor = Color(0xffe3797d);
static const Color pinkDarkColor = Color(0xffdb5b6a);
static const Color yellowColor = Color(0xffF4E31C);
static const Color orange = Color(0xFFCC9B14);
static const Color yellowFavColor = Color(0xffEAC321);
@ -41,6 +41,7 @@ class MyColors {
static const Color borderColor = Color(0xffE8E8E8);
static const Color borderE3Color = Color(0xffE3E3E3);
static const Color borderCEColor = Color(0xffCECECE);
//static const Color grey67Color = Color(0xff676767);
static const Color whiteColor = Color(0xFFEEEEEE);
static const Color greenColor = Color(0xff1FA269);
@ -55,7 +56,7 @@ class MyColors {
static const Color lightGreyColor = Color(0xffC7C7C7);
static const Color green69Color = Color(0xff1FA169);
static const Color redA3Color = Color(0xffCA3332);
static const Color green9CColor = Color(0xff259CB8);
static const Color green9CColor = Color(0xff259CB8);
static const Color green2DColor = Color(0xff32D892);
static const Color greyC4Color = Color(0xffC4C4C4);
static const Color grey35Color = Color(0xff535353);

@ -1,10 +1,151 @@
// import 'dart:io';
//
// import 'package:firebase_core/firebase_core.dart';
// import 'package:firebase_messaging/firebase_messaging.dart';
// import 'package:flutter/foundation.dart';
// import 'package:flutter_local_notifications/flutter_local_notifications.dart';
// import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
// import 'package:huawei_push/huawei_push.dart' as huawei_push;
// import 'package:mohem_flutter_app/app_state/app_state.dart';
// import 'package:mohem_flutter_app/classes/utils.dart';
// import 'package:permission_handler/permission_handler.dart';
//
// final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
//
// class AppNotifications {
// static final AppNotifications _instance = AppNotifications._internal();
//
// AppNotifications._internal();
//
// factory AppNotifications() => _instance;
//
// late HmsApiAvailability hmsApiAvailability;
//
// String _huaweiToken = '';
//
// Future<void> requestPermissions() async {
// if (Platform.isIOS) {
// await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(alert: true, badge: true, sound: true);
// } else if (Platform.isAndroid) {
// AndroidFlutterLocalNotificationsPlugin? androidImplementation = flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>();
// bool? granted = await androidImplementation?.requestPermission();
// if (granted == false) {
// if (kDebugMode) {
// print("-------------------- Permission Granted ------------------------");
// print(granted);
// }
// await Permission.notification.request();
// }
// }
// }
//
// void init(String? firebaseToken) async {
// hmsApiAvailability = HmsApiAvailability();
// await requestPermissions();
// AppState().setDeviceToken = firebaseToken;
// await Permission.notification.isDenied.then((bool value) {
// if (value) {
// Permission.notification.request();
// }
// });
// RemoteMessage? initialMessage = await FirebaseMessaging.instance.getInitialMessage();
//
// if (initialMessage != null) _handleMessage(initialMessage);
//
// FirebaseMessaging.onMessage.listen((RemoteMessage message) {
// if (message.notification != null) _handleMessage(message);
// });
//
// FirebaseMessaging.onMessageOpenedApp.listen(_handleOpenApp);
//
// FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
//
// FirebaseMessaging.instance.onTokenRefresh.listen((String token) {
// AppState().setDeviceToken = token;
// });
//
// if (Platform.isAndroid) {
// await hmsApiAvailability.isHMSAvailable().then((value) async {
// if (value == 0) {
// huawei_push.Push.enableLogger();
// var result = await huawei_push.Push.setAutoInitEnabled(true);
//
// huawei_push.Push.onNotificationOpenedApp.listen((message) {
// // newMessage(toFirebaseRemoteMessage(message));
// }, onError: (e) => print(e.toString()));
//
// huawei_push.Push.onMessageReceivedStream.listen((message) {
// // newMessage(toFirebaseRemoteMessage(message));
// }, onError: (e) => print(e.toString()));
// }
// }).catchError((err) {
// print(err);
// });
// }
// }
//
// void initHuaweiPush(Function loginCallback) {
// AppState().setIsHuawei = true;
// initTokenStream(loginCallback);
// huawei_push.Push.getToken("");
// }
//
// // HUAWEI PUSH TOKEN IMPLEMENTATION
// void _onTokenEvent(String event) {
// _huaweiToken = event;
// AppState().setHuaweiPushToken = _huaweiToken;
// debugPrint("HUAWEI PUSH TOKEN: $_huaweiToken");
// }
//
// void _onTokenError(Object error) {}
//
// Future<void> initTokenStream(Function loginCallback) async {
// huawei_push.Push.getTokenStream.listen(_onTokenEvent, onError: _onTokenError).onData((data) {
// AppState().setHuaweiPushToken = data;
// debugPrint("HUAWEI PUSH TOKEN: $data");
// loginCallback();
// });
// }
//
// void _handleMessage(RemoteMessage message) {
// Utils.saveStringFromPrefs("isAppOpendByChat", "false");
// }
//
// void _handleOpenApp(RemoteMessage message) {
// Utils.saveStringFromPrefs("isAppOpendByChat", "true");
// Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
// }
// }
//
// AndroidNotificationChannel channel = const AndroidNotificationChannel(
// "high_importance_channel",
// "High Importance Notifications",
// importance: Importance.high,
// );
//
// Future<dynamic> backgroundMessageHandler(RemoteMessage message) async {
// await Firebase.initializeApp();
// Utils.saveStringFromPrefs("isAppOpendByChat", "false");
// Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
// }
//************** NEW fILE *****************
import 'dart:io';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
// import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:huawei_push/huawei_push.dart' as huawei_push;
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
@ -19,7 +160,7 @@ class AppNotifications {
factory AppNotifications() => _instance;
late HmsApiAvailability hmsApiAvailability;
// late HmsApiAvailability hmsApiAvailability;
String _huaweiToken = '';
@ -40,7 +181,10 @@ class AppNotifications {
}
void init(String? firebaseToken) async {
hmsApiAvailability = HmsApiAvailability();
// if (Platform.isAndroid) {
// hmsApiAvailability = HmsApiAvailability();
// }
await requestPermissions();
AppState().setDeviceToken = firebaseToken;
await Permission.notification.isDenied.then((bool value) {
@ -65,22 +209,22 @@ class AppNotifications {
});
if (Platform.isAndroid) {
await hmsApiAvailability.isHMSAvailable().then((value) async {
if (value == 0) {
huawei_push.Push.enableLogger();
var result = await huawei_push.Push.setAutoInitEnabled(true);
huawei_push.Push.onNotificationOpenedApp.listen((message) {
// newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString()));
huawei_push.Push.onMessageReceivedStream.listen((message) {
// newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString()));
}
}).catchError((err) {
print(err);
});
// await hmsApiAvailability.isHMSAvailable().then((value) async {
if (!(await Utils.isGoogleServicesAvailable())) {
huawei_push.Push.enableLogger();
var result = await huawei_push.Push.setAutoInitEnabled(true);
huawei_push.Push.onNotificationOpenedApp.listen((message) {
// newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString()));
huawei_push.Push.onMessageReceivedStream.listen((message) {
// newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString()));
}
// }).catchError((err) {
// print(err);
// });
}
}
@ -112,8 +256,10 @@ class AppNotifications {
}
void _handleOpenApp(RemoteMessage message) {
Utils.saveStringFromPrefs("isAppOpendByChat", "true");
Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
if (message.data.isNotEmpty && message.data["type"] == 'chat') {
Utils.saveStringFromPrefs("isAppOpendByChat", "true");
Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
}
}
}
@ -127,4 +273,7 @@ Future<dynamic> backgroundMessageHandler(RemoteMessage message) async {
await Firebase.initializeApp();
Utils.saveStringFromPrefs("isAppOpendByChat", "false");
Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
}
if (message.data.isNotEmpty && message.data["type"] == 'call') {
// ChatVoipCall().showCallkitIncoming(uuid: const Uuid().v4(), data: message);
}
}

@ -7,6 +7,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:google_api_availability/google_api_availability.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/config/routes.dart';
@ -398,4 +399,25 @@ class Utils {
print(err);
});
}
//HUAWEI DECISION MAKING
static Future<bool> isGoogleServicesAvailable() async {
GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability();
String status = availability.toString().split('.').last;
if (status == "success") {
return true;
}
return false;
}
static bool isDate(String input, String format) {
try {
DateTime d = DateFormat(format).parseStrict(input);
//print(d);
return true;
} catch (e) {
//print(e);
return false;
}
}
}

@ -323,6 +323,7 @@ class CodegenLoader extends AssetLoader{
"actionBy": "الرد بواسطة",
"pending": "معلق",
"pendingTransactions": "المعاملات المعلقه",
"notices": "إشعارات",
"selectRequestType": "الرجاء اختيار نوع الطلب",
"dateFrom": "من تاريخ",
"dateTo": "الى تاريخ",
@ -556,7 +557,8 @@ class CodegenLoader extends AssetLoader{
"view_your_leave_information": "عرض معلومات إجازتك",
"view_details": "عرض التفاصيل",
"create_absence_request": "إنشاء طلب الغياب",
"business_mission": "طلب مهمة العمل"
"business_mission": "طلب مهمة العمل",
"hierarchy": "تَسَلسُل"
};
static const Map<String,dynamic> en_US = {
"mohemm": "Mohemm",
@ -863,6 +865,7 @@ static const Map<String,dynamic> en_US = {
"topic": "Topic",
"actionBy": "Action By",
"pendingTransactions": "Pending Transactions",
"notices": "Notices",
"selectRequestType": "Please select request type",
"dateFrom": "Date From",
"dateTo": "Date To",
@ -1100,7 +1103,8 @@ static const Map<String,dynamic> en_US = {
"view_your_leave_information": "View Your Leave Information",
"view_details": "View Details",
"create_absence_request": "Create Absence Request",
"business_mission": "Business Mission Request"
"business_mission": "Business Mission Request",
"hierarchy": "Hierarchy"
};
static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US};
}

@ -308,6 +308,7 @@ abstract class LocaleKeys {
static const actionBy = 'actionBy';
static const pending = 'pending';
static const pendingTransactions = 'pendingTransactions';
static const notices = 'notices';
static const selectRequestType = 'selectRequestType';
static const dateFrom = 'dateFrom';
static const dateTo = 'dateTo';
@ -527,5 +528,6 @@ abstract class LocaleKeys {
static const view_details = 'view_details';
static const create_absence_request = 'create_absence_request';
static const business_mission = 'business_mission';
static const hierarchy = 'hierarchy';
}

@ -13,10 +13,10 @@ import 'package:firebase_core_web/firebase_core_web.dart';
import 'package:firebase_messaging_web/firebase_messaging_web.dart';
import 'package:fluttertoast/fluttertoast_web.dart';
import 'package:geolocator_web/geolocator_web.dart';
import 'package:google_maps_flutter_web/google_maps_flutter_web.dart';
// import 'package:google_maps_flutter_web/google_maps_flutter_web.dart';
import 'package:image_picker_for_web/image_picker_for_web.dart';
import 'package:just_audio_web/just_audio_web.dart';
import 'package:record_web/record_web.dart';
// import 'package:record_web/record_web.dart';
import 'package:shared_preferences_web/shared_preferences_web.dart';
import 'package:url_launcher_web/url_launcher_web.dart';
import 'package:video_player_web/video_player_web.dart';
@ -32,10 +32,10 @@ void registerPlugins(Registrar registrar) {
FirebaseMessagingWeb.registerWith(registrar);
FluttertoastWebPlugin.registerWith(registrar);
GeolocatorPlugin.registerWith(registrar);
GoogleMapsPlugin.registerWith(registrar);
// GoogleMapsPlugin.registerWith(registrar);
ImagePickerPlugin.registerWith(registrar);
JustAudioPlugin.registerWith(registrar);
RecordPluginWeb.registerWith(registrar);
// RecordPluginWeb.registerWith(registrar);
SharedPreferencesPlugin.registerWith(registrar);
UrlLauncherPlugin.registerWith(registrar);
VideoPlayerPlugin.registerWith(registrar);

@ -11,6 +11,7 @@ class GetBasicDetColsStructureList {
String? rEQUIREDFLAG;
String? sEGMENTPROMPT;
int? sEGMENTSEQNUM;
String? rEADONLY;
GetEmployeeBasicDetailsList? userBasicDetail;
GetBasicDetColsStructureList({
this.aPPLICATIONCOLUMNNAME,
@ -23,6 +24,7 @@ class GetBasicDetColsStructureList {
this.rEQUIREDFLAG,
this.sEGMENTPROMPT,
this.sEGMENTSEQNUM,
this.rEADONLY,
this.userBasicDetail,
});
@ -33,6 +35,7 @@ class GetBasicDetColsStructureList {
mAXIMUMSIZE = json['MAXIMUM_SIZE'];
oBJECTNAME = json['OBJECT_NAME'];
oBJECTTYPE = json['OBJECT_TYPE'];
rEADONLY = json['READ_ONLY'];
if (json['ObjectValuesList'] != null) {
objectValuesList = <ObjectValuesList>[];
json['ObjectValuesList'].forEach((v) {
@ -58,6 +61,7 @@ class GetBasicDetColsStructureList {
data['REQUIRED_FLAG'] = this.rEQUIREDFLAG;
data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT;
data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM;
data['READ_ONLY'] = this.rEADONLY;
return data;
}
}

@ -120,10 +120,10 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
getOffersList = [];
drawerMenuItemList = [
DrawerMenuItem("assets/images/drawer/my_profile.svg", LocaleKeys.myProfile.tr(), AppRoutes.profile),
DrawerMenuItem("assets/images/drawer/profile_icon.png", LocaleKeys.myProfile.tr(), AppRoutes.profile),
// DrawerMenuItem("assets/images/drawer/performance_evaluation.svg", LocaleKeys.performanceEvaluation.tr(), AppRoutes.performanceEvaluation),
// DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.mowadhafhi.tr(), AppRoutes.mowadhafhi),
// DrawerMenuItem("assets/images/drawer/pending_trasactions.svg", LocaleKeys.pendingTransactions.tr(), AppRoutes.pendingTransactions),
DrawerMenuItem("assets/images/drawer/notices.png", LocaleKeys.notices.tr(), AppRoutes.pendingTransactions),
// // DrawerMenuItem("assets/images/drawer/drawer_marathon.svg", LocaleKeys.brainMarathon.tr(), AppRoutes.marathonIntroScreen),
// DrawerMenuItem("assets/images/drawer/change_password.svg", LocaleKeys.changePassword.tr(), AppRoutes.changePassword),
//
@ -237,7 +237,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
myRequest = menu;
} else if (menu.menuType == "M") {
AppState().setempStatusIsManager = true;
drawerMenuItemList.add(DrawerMenuItem("assets/images/drawer/my_team.svg", LocaleKeys.myTeamMembers.tr(), AppRoutes.myTeam));
drawerMenuItemList.add(DrawerMenuItem("assets/images/drawer/my_team_icon.png", LocaleKeys.myTeamMembers.tr(), AppRoutes.myTeam));
}
}
isMyRequestLoading = false;

@ -21,6 +21,7 @@ import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart';
import 'package:month_picker_dialog_2/month_picker_dialog_2.dart';
import 'package:pie_chart/pie_chart.dart';
import 'package:sizer/sizer.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
enum LeaveType { ABSENCE, BUSINESS_TRIP, HOLIDAY, NORMAL }
@ -104,6 +105,18 @@ class _MoeMonthlyAttendanceScreenState extends State<MoeMonthlyAttendanceScreen>
}),
18.height,
AspectRatio(aspectRatio: 304 / 244, child: calendarWidget()),
12.height,
SizedBox(
width: double.infinity,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
showColorItem("Absence", MyColors.pinkDarkColor),
showColorItem("Business Trip", MyColors.gradiantStartColor),
showColorItem("Holiday", MyColors.gradiantEndColor),
],
),
),
],
).paddingOnly(left: 21, right: 21, top: 21),
],
@ -113,6 +126,20 @@ class _MoeMonthlyAttendanceScreenState extends State<MoeMonthlyAttendanceScreen>
);
}
Widget showColorItem(String title, Color color) {
return Row(
children: [
Container(
width: 20,
height: 20,
color: color,
).circle(2000),
8.width,
title.toText12()
],
);
}
Widget calendarWidget() {
return SfCalendar(
view: CalendarView.month,
@ -180,11 +207,11 @@ class _MoeMonthlyAttendanceScreenState extends State<MoeMonthlyAttendanceScreen>
),
6.height,
showText(LocaleKeys.leaveType.tr(), leaves.leaveType.toString()),
if (leaves.absenceAttendanceTypeName.toString().isNotEmpty)
const Divider(
color: MyColors.borderCEColor,
),
if (leaves.absenceAttendanceTypeName.toString().isNotEmpty) showText(LocaleKeys.attendanceType.tr(), leaves.absenceAttendanceTypeName.toString()),
// if (leaves.absenceAttendanceTypeName.toString().isNotEmpty)
// const Divider(
// color: MyColors.borderCEColor,
// ),
// if (leaves.absenceAttendanceTypeName.toString().isNotEmpty) showText(LocaleKeys.attendanceType.tr(), leaves.absenceAttendanceTypeName.toString()),
const Divider(
color: MyColors.borderCEColor,
),
@ -232,7 +259,7 @@ class _MoeMonthlyAttendanceScreenState extends State<MoeMonthlyAttendanceScreen>
margin: const EdgeInsets.all(4),
decoration: BoxDecoration(
color: leaveType == LeaveType.ABSENCE
? MyColors.redColor
? MyColors.pinkDarkColor
: leaveType == LeaveType.BUSINESS_TRIP
? MyColors.gradiantStartColor
: leaveType == LeaveType.HOLIDAY
@ -241,7 +268,7 @@ class _MoeMonthlyAttendanceScreenState extends State<MoeMonthlyAttendanceScreen>
shape: BoxShape.circle,
border: Border.all(
color: leaveType == LeaveType.ABSENCE
? MyColors.redColor
? MyColors.pinkDarkColor
: leaveType == LeaveType.BUSINESS_TRIP
? MyColors.gradiantStartColor
: leaveType == LeaveType.HOLIDAY

@ -17,7 +17,6 @@ import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart';
import 'package:mohem_flutter_app/provider/chat_provider_model.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
@ -210,10 +209,11 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
body: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Builder(builder: (BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.min,
// mainAxisSize: MainAxisSize.min,
children: [
Image.memory(
Utils.dataFromBase64String(
@ -230,11 +230,6 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
height: 34,
fit: BoxFit.cover,
).circle(50),
// CircularAvatar(
// width: 34,
// height: 34,
// url: "https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png",
// ),
8.width,
SvgPicture.asset("assets/images/side_nav.svg"),
],
@ -242,7 +237,8 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
_scaffoldState.currentState!.openDrawer();
});
}),
Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28).expanded,
Image.asset("assets/images/drawer/moe_logo_full.png", width: 130, height: 45),
SizedBox(width: 65),
// SvgPicture.asset(
// "assets/images/announcements.svg",
// matchTextDirection: true,
@ -437,6 +433,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
Navigator.pushNamed(context, AppRoutes.monthlyAttendance);
},
),
21.height,
Visibility(
visible: env.offersDiscount,
child: Column(
@ -624,7 +621,6 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
icon: Stack(
alignment: Alignment.centerLeft,
children: [
SvgPicture.asset(
"assets/icons/chat/chat.svg",
color: currentIndex == 4
@ -696,16 +692,4 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
Navigator.pushNamed(context, AppRoutes.offersAndDiscountsDetails, arguments: getOffersDetailList);
}
}

@ -51,9 +51,9 @@ class _AppDrawerState extends State<AppDrawer> {
child: Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 24),
// Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 24),
const Icon(Icons.clear).onPress(() => Navigator.pop(context)),
],
).paddingOnly(left: 4, right: 14),
@ -124,32 +124,33 @@ class _AppDrawerState extends State<AppDrawer> {
// if (AppState().businessCardPrivilege)
// menuItem("assets/images/drawer/view_business_card.svg", LocaleKeys.viewBusinessCard.tr(), "", closeDrawer: false, onPress: () => showMDialog(context, child: BusinessCardDialog())),
//
menuItem("assets/images/support.png", LocaleKeys.help.tr(), "", closeDrawer: true, onPress: () {
menuItem("assets/images/drawer/help.png", LocaleKeys.help.tr(), "", closeDrawer: true, onPress: () {
Navigator.pushNamed(context, AppRoutes.help);
}),
menuItem("assets/images/support.png", "Hierarchy", "", closeDrawer: true, onPress: () {
menuItem("assets/images/drawer/hierarchy.png", LocaleKeys.hierarchy.tr(), "", closeDrawer: true, onPress: () {
Navigator.pushNamed(context, AppRoutes.hierarchy);
}),
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,);
],
).expanded,
const Divider(
height: 1,
thickness: 1,
color: MyColors.lightGreyEFColor,
),
// const Divider(
// height: 1,
// thickness: 1,
// color: MyColors.lightGreyEFColor,
// ),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
RichText(
text: TextSpan(text: LocaleKeys.poweredBy.tr() + " ", style: const TextStyle(color: MyColors.grey98Color, fontSize: 14, letterSpacing: -0.56, fontWeight: FontWeight.w600), children: [
TextSpan(
text: LocaleKeys.cloudSolutions.tr(),
style: const TextStyle(color: MyColors.grey3AColor, fontSize: 14, letterSpacing: -0.56, fontWeight: FontWeight.w600),
),
]),
).expanded,
Image.asset("assets/images/logos/bn_cloud_soloution.jpg", width: 40, height: 40)
// RichText(
// text: TextSpan(text: LocaleKeys.poweredBy.tr() + " ", style: const TextStyle(color: MyColors.grey98Color, fontSize: 14, letterSpacing: -0.56, fontWeight: FontWeight.w600), children: [
// TextSpan(
// text: LocaleKeys.cloudSolutions.tr(),
// style: const TextStyle(color: MyColors.grey3AColor, fontSize: 14, letterSpacing: -0.56, fontWeight: FontWeight.w600),
// ),
// ]),
// ).expanded,
Image.asset("assets/images/drawer/moe_logo.png", width: 60, height: 60)
],
).paddingOnly(left: 21, right: 21, top: 21)
],

@ -80,7 +80,7 @@ class ServicesWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText11(isBold: true),
child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText10(isBold: true),
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)),
],
@ -225,6 +225,7 @@ class ServicesWidget extends StatelessWidget {
}
List<GetMenuEntriesList> menuList = pro.getMenuEntriesList?.where((element) => element.parentMenuName == menuEntry.menuName && (element.menuEntryType == "FUNCTION")).toList() ?? [];
menuEntry.icon = "";
menuList = [];
if (menuList.isEmpty) {
if (menuEntry.requestType == "EIT") {
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(menuEntry.prompt!, menuEntry.functionName!));
@ -277,4 +278,4 @@ class ServicesWidget extends StatelessWidget {
],
);
}
}
}

@ -142,7 +142,7 @@ class _LoginScreenState extends State<LoginScreen> {
Future<void> checkPrefs() async {
String username = await Utils.getStringFromPrefs(SharedPrefsConsts.username);
if (!username.isNotEmpty) { // for test purpose i added !
if (username.isNotEmpty) { // for test purpose i added !
String password = await Utils.getStringFromPrefs(SharedPrefsConsts.password);
// String firebaseToken = await Utils.getStringFromPrefs(SharedPrefsConsts.firebaseToken);
// print("firebaseToken:$firebaseToken");
@ -152,6 +152,7 @@ class _LoginScreenState extends State<LoginScreen> {
}
}
void performLogin() async {
Utils.showLoading(context);
try {
@ -185,8 +186,11 @@ class _LoginScreenState extends State<LoginScreen> {
@override
Widget build(BuildContext context) {
username.text = "1002528733";
password.text = "moe123456";
if (isAppOpenBySystem == null) {
isAppOpenBySystem = (ModalRoute.of(context)!.settings.arguments ?? true) as bool;
if (!kReleaseMode) {
// username.text = "1100313582";
// password.text = "moe123456";
@ -226,24 +230,24 @@ class _LoginScreenState extends State<LoginScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(child: SizedBox()),
Row(
children: [
LocaleKeys.english.tr().toText14(color: AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("en", "US"));
}),
Container(
width: 1,
color: MyColors.darkWhiteColor,
height: 16,
margin: const EdgeInsets.only(left: 10, right: 10),
),
LocaleKeys.arabic.tr().toText14(color: !AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("ar", "SA"));
}),
],
),
Image.asset("assets/images/drawer/moe_logo.png", width: 60, height: 60),
Row(children: [
LocaleKeys.english.tr().toText14(color: AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("en", "US"));
}),
Container(
width: 1,
color: MyColors.darkWhiteColor,
height: 16,
margin: const EdgeInsets.only(left: 10, right: 10),
),
LocaleKeys.arabic.tr().toText14(color: !AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("ar", "SA"));
}),
],)
],
),
Expanded(

@ -21,10 +21,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';
// WhatsApp 4
// SMS 1
@ -63,29 +60,54 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
String empName = mobileLoginInfoListModel!.employeeName!;
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false)
? LocaleKeys.viewBusinessCard.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: BusinessCardDialog());
})
: Container(),
actions: [
Center(
child: LocaleKeys.employeeDigitalID.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: EmployeeDigitialIdDialog());
})),
21.width
],
),
// appBar: AppBar(
//
// backgroundColor: Colors.transparent,
// automaticallyImplyLeading: false,
// title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false)
// ? LocaleKeys.viewBusinessCard.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
// showMDialog(context, child: BusinessCardDialog());
// })
// : Container(),
// actions: [
// Center(
// child: LocaleKeys.employeeDigitalID.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
// showMDialog(context, child: EmployeeDigitialIdDialog());
// })),
// 21.width
// ],
// ),
body: Column(
children: [
ListView(
padding: const EdgeInsets.all(21),
physics: const BouncingScrollPhysics(),
children: [
//12.height,
12.height,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset("assets/images/drawer/moe_logo.png", width: 60, height: 60),
Row(
children: [
LocaleKeys.english.tr().toText14(color: AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("en", "US"));
}),
Container(
width: 1,
color: MyColors.darkWhiteColor,
height: 16,
margin: const EdgeInsets.only(left: 10, right: 10),
),
LocaleKeys.arabic.tr().toText14(color: !AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("ar", "SA"));
}),
],
)
],
),
12.height,
if (true)
Column(
mainAxisSize: MainAxisSize.min,
@ -290,7 +312,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
width: 38,
color: isDisable ? MyColors.darkTextColor.withOpacity(0.7) : null,
),
_title.toText16(height: 20/16)
_title.toText16(height: 20 / 16, maxlines: 2),
],
),
),

@ -14,7 +14,6 @@ import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/env.dart';
import 'package:mohem_flutter_app/config/routes.dart';
import 'package:mohem_flutter_app/dialogs/otp_dialog.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/basic_member_information_model.dart';
@ -573,7 +572,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
width: 38,
color: isDisable ? MyColors.darkTextColor.withOpacity(0.7) : null,
),
_title.toText16(height: 20 / 16)
_title.toText16(height: 20 / 16, maxlines: 2)
],
),
),

@ -72,6 +72,9 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
}
}
}
if(e.dISPLAYFLAG =='N' && e.rEQUIREDFLAG =='Y' && e.dEFAULTVALUE!.isNotEmpty){
tempVar = e.dEFAULTVALUE!;
}
// else if (e.fORMATTYPE == "N") {
// // for date format type, date format is changed
// tempVar = e.eSERVICESDV?.pIDCOLUMNNAME ?? "";
@ -127,8 +130,8 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
}
values = filteredList
.map((e) => GetSetValuesRequestModel(
sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME)
.toJson())
sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME)
.toJson())
.toList();
List<ESERVICESVS> eServicesResponseModel = await MyAttendanceApiClient().getValueSetValues(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values,
@ -156,58 +159,56 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
Future getDefaultValues(GetEITDFFStructureList structureList, {bool showLoading = true}) async {
try {
if (showLoading) Utils.showLoading(context);
for (int i = 0; i < (structureList.cHILDSEGMENTSDVSplited?.length ?? 0); i++) {
String segmentId = structureList.cHILDSEGMENTSDVSplited![i];
GetEITDFFStructureList? parent = getEitDffStructureList!.firstWhere((element) => element.sEGMENTNAME == segmentId);
List<PARENTSEGMENTSDVSplited> parentDvRequired = parent.pARENTSEGMENTSDVSplited ?? [];
List<PARENTSEGMENTSVSSplitedVS> parentVsRequired = parent.pARENTSEGMENTSVSSplitedVS ?? [];
List<GetEITDFFStructureList> filteredList =
getEitDffStructureList!.where((outerElement) => parentDvRequired.any((element) => outerElement.sEGMENTNAME == element.name && element.isRequired == "REQUIRED")).toList();
List<Map<String, dynamic>> values = filteredList.map((e) {
if (e.fORMATTYPE == "X" && e.isDefaultTypeIsCDPS && e.eSERVICESDV!.pIDCOLUMNNAME!=null) {
e.eSERVICESDV!.pVALUECOLUMNNAME = Utils.reverseFormatDate(e.eSERVICESDV!.pIDCOLUMNNAME ?? "");
e.eSERVICESDV!.pIDCOLUMNNAME = Utils.reverseFormatDate(e.eSERVICESDV!.pIDCOLUMNNAME ?? "");
}
return GetSetValuesRequestModel(
sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME)
.toJson();
}).toList();
if (showLoading) Utils.showLoading(context);
for (int i = 0; i < (structureList.cHILDSEGMENTSDVSplited?.length ?? 0); i++) {
String segmentId = structureList.cHILDSEGMENTSDVSplited![i];
GetEITDFFStructureList? parent = getEitDffStructureList!.firstWhere((element) => element.sEGMENTNAME == segmentId);
List<PARENTSEGMENTSDVSplited> parentDvRequired = parent.pARENTSEGMENTSDVSplited ?? [];
List<PARENTSEGMENTSVSSplitedVS> parentVsRequired = parent.pARENTSEGMENTSVSSplitedVS ?? [];
List<Map<String, dynamic>> getSetList = getDefaultValuesIonicLogic(parent);
if (getSetList.isNotEmpty) {
ESERVICESDV defaultValue =
await MyAttendanceApiClient().getDefaultValue(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, getSetList, empID: dynamicParams!.selectedEmp);
int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
getEitDffStructureList![index].eSERVICESDV = defaultValue;
GetEITDFFStructureList defaultValueCheck = getEitDffStructureList!.where((GetEITDFFStructureList element) => element.sEGMENTNAME == segmentId).toList().first;
if (defaultValueCheck.cHILDSEGMENTSDVSplited!.isNotEmpty && defaultValueCheck.rEADONLY == 'Y') {
await getDefaultValues(defaultValueCheck, showLoading: false);
// GetEITDFFStructureList? parent = getEitDffStructureList!.firstWhere((element) => element.sEGMENTNAME == segmentId);
// List<Map<String, dynamic>> getSetList = getDefaultValuesIonicLogic(parent);
// ESERVICESDV defaultValue = await MyAttendanceApiClient().getDefaultValue(segmentId, defaultValueCheck.dESCFLEXCONTEXTCODE!, defaultValueCheck.dESCFLEXNAME!, getSetList);
// int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
// getEitDffStructureList![index].eSERVICESDV = defaultValue;
} else if (defaultValueCheck.cHILDSEGMENTSVSSplited!.isNotEmpty && defaultValueCheck.rEADONLY == 'Y') {
await calGetValueSetValues(defaultValueCheck, showLoading: false);
// Utils.hideLoading(context);
List<GetEITDFFStructureList> filteredList =
getEitDffStructureList!.where((outerElement) => parentDvRequired.any((element) => outerElement.sEGMENTNAME == element.name && element.isRequired == "REQUIRED")).toList();
List<Map<String, dynamic>> values = filteredList
.map((e) => GetSetValuesRequestModel(
sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME)
.toJson())
.toList();
List<Map<String, dynamic>> getSetList = getDefaultValuesIonicLogic(parent);
if (getSetList.isNotEmpty) {
ESERVICESDV defaultValue =
await MyAttendanceApiClient().getDefaultValue(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, getSetList, empID: dynamicParams!.selectedEmp);
int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
getEitDffStructureList![index].eSERVICESDV = defaultValue;
GetEITDFFStructureList defaultValueCheck = getEitDffStructureList!.where((GetEITDFFStructureList element) => element.sEGMENTNAME == segmentId).toList().first;
if (defaultValueCheck.cHILDSEGMENTSDVSplited!.isNotEmpty) {
await getDefaultValues(defaultValueCheck, showLoading: false);
// GetEITDFFStructureList? parent = getEitDffStructureList!.firstWhere((element) => element.sEGMENTNAME == segmentId);
// List<Map<String, dynamic>> getSetList = getDefaultValuesIonicLogic(parent);
// ESERVICESDV defaultValue = await MyAttendanceApiClient().getDefaultValue(segmentId, defaultValueCheck.dESCFLEXCONTEXTCODE!, defaultValueCheck.dESCFLEXNAME!, getSetList);
// int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
// getEitDffStructureList![index].eSERVICESDV = defaultValue;
}
if (defaultValueCheck.cHILDSEGMENTSVSSplited!.isNotEmpty) {
await calGetValueSetValues(defaultValueCheck, showLoading: false);
// Utils.hideLoading(context);
}
} else if (values.isNotEmpty) {
ESERVICESDV defaultValue =
await MyAttendanceApiClient().getDefaultValue(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values, empID: dynamicParams!.selectedEmp);
int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
getEitDffStructureList![index].eSERVICESDV = defaultValue;
}
} else if (values.isNotEmpty) {
ESERVICESDV defaultValue = await MyAttendanceApiClient().getDefaultValue(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values, empID: dynamicParams!.selectedEmp);
int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
getEitDffStructureList![index].eSERVICESDV = defaultValue;
}
}
if (showLoading) {
await Future.delayed(const Duration(seconds: 1));
Utils.hideLoading(context);
}
if (showLoading) {
await Future.delayed(const Duration(seconds: 1));
Utils.hideLoading(context);
}
setState(() {});
setState(() {});
} catch (ex) {
if (showLoading) Utils.hideLoading(context);
Utils.handleException(ex, context, null);
@ -225,79 +226,79 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
// }
List<Map<String, dynamic>> getDefaultValuesIonicLogic(GetEITDFFStructureList structureElement) {
// try {
List<PARENTSEGMENTSVSSplitedVS> parentValue = structureElement.pARENTSEGMENTSVSSplitedVS ?? [];
List<PARENTSEGMENTSDVSplited> parentsList = structureElement.pARENTSEGMENTSDVSplited ?? [];
List<Map<String, dynamic>> dependenciesList = [];
String? parentVal;
bool isStandardDate = false;
bool isStandardTimeDate = false;
bool isStandardTime = false;
bool isHidden = false;
bool isReadOnlyList = false;
bool isSelectElement = false;
// isStandardDate = this.isStandardDate(obj);
// isStandardTimeDate = this.isStandardDateTime(obj);
// isStandardTime = this.isStandardTime(obj);
if (structureElement.dISPLAYFLAG == "N") isHidden = true;
if (structureElement.vALIDATIONTYPE != "N" && structureElement.rEADONLY == "Y") {
isReadOnlyList = true;
}
if (structureElement.vALIDATIONTYPE != "N" && structureElement.rEADONLY == "N") {
isSelectElement = true;
}
try {
List<PARENTSEGMENTSVSSplitedVS> parentValue = structureElement.pARENTSEGMENTSVSSplitedVS ?? [];
List<PARENTSEGMENTSDVSplited> parentsList = structureElement.pARENTSEGMENTSDVSplited ?? [];
List<Map<String, dynamic>> dependenciesList = [];
String? parentVal;
bool isStandardDate = false;
bool isStandardTimeDate = false;
bool isStandardTime = false;
bool isHidden = false;
bool isReadOnlyList = false;
bool isSelectElement = false;
// isStandardDate = this.isStandardDate(obj);
// isStandardTimeDate = this.isStandardDateTime(obj);
// isStandardTime = this.isStandardTime(obj);
if (structureElement.dISPLAYFLAG == "N") isHidden = true;
if (structureElement.vALIDATIONTYPE != "N" && structureElement.rEADONLY == "Y") {
isReadOnlyList = true;
}
if (structureElement.vALIDATIONTYPE != "N" && structureElement.rEADONLY == "N") {
isSelectElement = true;
}
if (parentValue.isNotEmpty && (structureElement.vALIDATIONTYPE == "D" || structureElement.vALIDATIONTYPE == "Y")) {
List parValue = getDependenciesParams(parentValue);
if (parentValue.isNotEmpty && (structureElement.vALIDATIONTYPE == "D" || structureElement.vALIDATIONTYPE == "Y")) {
List parValue = getDependenciesParams(parentValue);
if (parValue.isNotEmpty) {
parentVal = parValue.first.ID_COLUMN_NAME;
}
if (parValue.isNotEmpty) {
parentVal = parValue.first.ID_COLUMN_NAME;
}
if (parentVal == null) {
return [];
if (parentVal == null) {
return [];
}
}
}
if (parentsList.isNotEmpty) {
if (parentValue.isNotEmpty) {
parentsList = parentsList + parentValue.map((e) => PARENTSEGMENTSDVSplited.fromJson(e.toJson())).toList();
// parentsList.addAll(parentValue.map((e) => PARENTSEGMENTSDVSplited.fromJson(e.toJson())));
// parentsList.concat(parentValue);
if (parentsList.isNotEmpty) {
if (parentValue.isNotEmpty) {
parentsList = parentsList + parentValue.map((e) => PARENTSEGMENTSDVSplited.fromJson(e.toJson())).toList();
// parentsList.addAll(parentValue.map((e) => PARENTSEGMENTSDVSplited.fromJson(e.toJson())));
// parentsList.concat(parentValue);
}
dependenciesList = getDependenciesParams(parentsList);
}
dependenciesList = getDependenciesParams(parentsList);
return dependenciesList;
// for (int i = 0; i < (structureList.cHILDSEGMENTSDVSplited?.length ?? 0); i++) {
// String segmentId = structureList.cHILDSEGMENTSDVSplited![i];
// print("segmentId:$segmentId");
// print("segmentName:${structureList.sEGMENTNAME}");
// GetEITDFFStructureList? parent = getEitDffStructureList!.firstWhere((element) => element.sEGMENTNAME == segmentId);
// List<PARENTSEGMENTSDVSplited> parentDvRequired = parent.pARENTSEGMENTSDVSplited ?? [];
// List<PARENTSEGMENTSVSSplitedVS> parentVsRequired = parent.pARENTSEGMENTSVSSplitedVS ?? [];
//
// List<GetEITDFFStructureList> filteredList =
// getEitDffStructureList!.where((outerElement) => parentDvRequired.any((element) => outerElement.sEGMENTNAME == element.name && element.isRequired == "REQUIRED")).toList();
//
// List<Map<String, dynamic>> values = filteredList
// .map((e) => GetSetValuesRequestModel(
// sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME)
// .toJson())
// .toList();
// print("values:$values");
//
// ESERVICESDV defaultValue = await MyAttendanceApiClient().getDefaultValue(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values);
// int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
// getEitDffStructureList![index].eSERVICESDV = defaultValue;
// }
// Utils.hideLoading(context);
// setState(() {});
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
return [];
}
return dependenciesList;
// for (int i = 0; i < (structureList.cHILDSEGMENTSDVSplited?.length ?? 0); i++) {
// String segmentId = structureList.cHILDSEGMENTSDVSplited![i];
// print("segmentId:$segmentId");
// print("segmentName:${structureList.sEGMENTNAME}");
// GetEITDFFStructureList? parent = getEitDffStructureList!.firstWhere((element) => element.sEGMENTNAME == segmentId);
// List<PARENTSEGMENTSDVSplited> parentDvRequired = parent.pARENTSEGMENTSDVSplited ?? [];
// List<PARENTSEGMENTSVSSplitedVS> parentVsRequired = parent.pARENTSEGMENTSVSSplitedVS ?? [];
//
// List<GetEITDFFStructureList> filteredList =
// getEitDffStructureList!.where((outerElement) => parentDvRequired.any((element) => outerElement.sEGMENTNAME == element.name && element.isRequired == "REQUIRED")).toList();
//
// List<Map<String, dynamic>> values = filteredList
// .map((e) => GetSetValuesRequestModel(
// sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME)
// .toJson())
// .toList();
// print("values:$values");
//
// ESERVICESDV defaultValue = await MyAttendanceApiClient().getDefaultValue(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values);
// int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
// getEitDffStructureList![index].eSERVICESDV = defaultValue;
// }
// Utils.hideLoading(context);
// setState(() {});
// } catch (ex) {
// Utils.hideLoading(context);
// Utils.handleException(ex, context, null);
// return [];
// }
}
List<Map<String, dynamic>> getDependenciesParams(parentsList) {
@ -343,13 +344,19 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
idColName = val;
if (getEitDffStructureList![j].fORMATTYPE == "X") {
if(!getEitDffStructureList![j].isDefaultTypeIsCDPS) {
idColName = Utils.formatDateDefault(idColName!);
}
idColName = Utils.reverseFormatDate(idColName!);
if(Utils.isDate(Utils.reverseFormatDate(Utils.formatDateNew(idColName!)), "yyyy-MM-dd")){
idColName = Utils.formatStandardDate(Utils.formatStandardDate(Utils.formatDateNew(idColName!)));
// idColName = DateFormat('yyyy/MM/dd HH:mm:ss').format(date);
}else if(Utils.isDate(Utils.reverseFormatDate(idColName!), "dd-MM-yyyy")){
// commenting to test
// DateTime date = DateFormat('yyyy-MM-dd').parse(idColName!);
// idColName = DateFormat('yyyy-MM-dd HH:mm:ss').format(date);
// // change date format on 31/05/2023
DateTime date = DateFormat('dd-MM-yyyy').parse(idColName!);
idColName = DateFormat('yyyy-MM-dd HH:mm:ss').format(date);
}
}
}
@ -451,16 +458,16 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
body: Column(
children: [
(getEitDffStructureList == null
? const SizedBox()
: (getEitDffStructureList!.isEmpty
? Utils.getNoDataWidget(context)
: ListView.separated(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(21),
itemBuilder: (cxt, int parentIndex) => parseDynamicFormatType(getEitDffStructureList![parentIndex], parentIndex),
separatorBuilder: (cxt, index) => 0.height,
itemCount: getEitDffStructureList!.length,
)))
? const SizedBox()
: (getEitDffStructureList!.isEmpty
? Utils.getNoDataWidget(context)
: ListView.separated(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(21),
itemBuilder: (cxt, int parentIndex) => parseDynamicFormatType(getEitDffStructureList![parentIndex], parentIndex),
separatorBuilder: (cxt, index) => 0.height,
itemCount: getEitDffStructureList!.length,
)))
.expanded,
// 12.height,
DefaultButton(
@ -468,10 +475,10 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
(getEitDffStructureList ?? []).isEmpty
? null
: () {
validateTransaction();
validateTransaction();
//Navigator.of(context).pushNamed(LOGIN_TYPE)
},
//Navigator.of(context).pushNamed(LOGIN_TYPE)
},
).insideContainer,
],
),
@ -486,7 +493,6 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.eSERVICESDV?.pIDCOLUMNNAME ?? "",
isReadOnly: model.rEADONLY == "Y",
toolTip: model.rEQCOLTIP,
onChange: (text) {
model.fieldAnswer = text;
model.eSERVICESDV ??= ESERVICESDV();
@ -499,12 +505,17 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
model.eSERVICESDV?.pIDCOLUMNNAME ?? "",
isReadOnly: model.rEADONLY == "Y",
isInputTypeNum: true,
length: model.mAXIMUMSIZE,
toolTip: model.rEQCOLTIP,
onChange: (text) {
onChange: (text) async{
model.fieldAnswer = text;
model.eSERVICESDV ??= ESERVICESDV();
model.eSERVICESDV!.pIDCOLUMNNAME = text;
model.eSERVICESDV!.pVALUECOLUMNNAME = text; //changed for testing business mission
if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
await calGetValueSetValues(model);
}
if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) {
await getDefaultValues(model);
}
},
).paddingOnly(bottom: 12);
} else if (model.fORMATTYPE == "X") {
@ -524,15 +535,14 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
suffixIconData: Icons.calendar_today,
isEnable: false,
isReadOnly: model.rEADONLY == "Y",
toolTip: model.rEQCOLTIP,
onTap: () async {
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
if (getEitDffStructureList![index].isDefaultTypeIsCDPS) {
// Utils.reverseFormatStandardDate(Utils.formatDate(dateString))
selectedDate = DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
if (getEitDffStructureList![index].isDefaultTypeIsCDPS && getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME.contains("/") && Utils.isDate(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME, "yyyy/MM/dd")) {
selectedDate = DateFormat("yyyy/MM/dd", "en_US").parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
} else if(getEitDffStructureList![index].isDefaultTypeIsCDPS && getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME.contains("/") && Utils.isDate(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME, "dd/MM/yyyy")){
selectedDate = DateFormat("dd/MM/yyyy", "en_US").parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
// selectedDate = DateFormat("yyyy/MM/dd", "en_US").parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
} else {
}else{
selectedDate = DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
}
}
@ -547,14 +557,14 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
pRETURNMSG: "null",
pRETURNSTATUS: getEitDffStructureList![index].dEFAULTVALUE,
pVALUECOLUMNNAME:
getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
} else {
eservicesdv = ESERVICESDV(
pIDCOLUMNNAME: dateString,
pRETURNMSG: "null",
pRETURNSTATUS: getEitDffStructureList![index].dEFAULTVALUE,
pVALUECOLUMNNAME:
getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
}
getEitDffStructureList![index].eSERVICESDV = eservicesdv;
setState(() {});
@ -581,9 +591,8 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
displayText,
suffixIconData: Icons.calendar_today,
toolTip: model.rEQCOLTIP,
isReadOnly: model.rEADONLY == "Y",
isEnable: false,
isReadOnly: model.rEADONLY == "Y",
onTap: () async {
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
if (getEitDffStructureList![index].isDefaultTypeIsCDPS) {
@ -610,14 +619,14 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
pRETURNMSG: "null",
pRETURNSTATUS: getEitDffStructureList![index].dEFAULTVALUE,
pVALUECOLUMNNAME:
getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
} else {
eservicesdv = ESERVICESDV(
pIDCOLUMNNAME: dateString,
pRETURNMSG: "null",
pRETURNSTATUS: getEitDffStructureList![index].dEFAULTVALUE,
pVALUECOLUMNNAME:
getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
getEitDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
}
getEitDffStructureList![index].eSERVICESDV = eservicesdv;
@ -636,24 +645,23 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
child: DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.eSERVICESDV?.pVALUECOLUMNNAME ?? "",
toolTip: model.rEQCOLTIP,
isEnable: false,
isPopup: true,
isInputTypeNum: true,
isReadOnly: model.rEADONLY == "Y",
).paddingOnly(bottom: 12),
itemBuilder: (_) => <PopupMenuItem<int>>[
if (model.rEADONLY != "Y")
for (int i = 0; i < model.eSERVICESVS!.length; i++)
PopupMenuItem<int>(
value: i,
child: Column(
children: [
Text(model.eSERVICESVS![i].vALUECOLUMNNAME!),
const PopupMenuDivider(),
],
)),
],
if (model.rEADONLY != "Y")
for (int i = 0; i < model.eSERVICESVS!.length; i++)
PopupMenuItem<int>(
value: i,
child: Column(
children: [
Text(model.eSERVICESVS![i].vALUECOLUMNNAME!),
const PopupMenuDivider(),
],
)),
],
onSelected: (int popipIndex) async {
ESERVICESDV eservicesdv = ESERVICESDV(
pIDCOLUMNNAME: model.eSERVICESVS![popipIndex].iDCOLUMNNAME,
@ -681,17 +689,16 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
model.eSERVICESDV?.pVALUECOLUMNNAME ?? "",
isEnable: false,
isPopup: true,
toolTip: model.rEQCOLTIP,
isInputTypeNum: true,
isReadOnly: model.rEADONLY == "Y",
).paddingOnly(bottom: 12),
itemBuilder: (_) => <PopupMenuItem<int>>[
if (model.rEADONLY != "Y")
for (int i = 0; i < model.eSERVICESVS!.length; i++) PopupMenuItem<int>(value: i, child: Text(model.eSERVICESVS![i].vALUECOLUMNNAME!)),
],
if (model.rEADONLY != "Y")
for (int i = 0; i < model.eSERVICESVS!.length; i++) PopupMenuItem<int>(value: i, child: Text(model.eSERVICESVS![i].vALUECOLUMNNAME!)),
],
onSelected: (int popipIndex) async {
ESERVICESDV eservicesdv =
ESERVICESDV(pIDCOLUMNNAME: model.eSERVICESVS![popipIndex].iDCOLUMNNAME, pRETURNMSG: "null", pRETURNSTATUS: "null", pVALUECOLUMNNAME: model.eSERVICESVS![popipIndex].vALUECOLUMNNAME);
ESERVICESDV(pIDCOLUMNNAME: model.eSERVICESVS![popipIndex].iDCOLUMNNAME, pRETURNMSG: "null", pRETURNSTATUS: "null", pVALUECOLUMNNAME: model.eSERVICESVS![popipIndex].vALUECOLUMNNAME);
getEitDffStructureList![index].eSERVICESDV = eservicesdv;
setState(() {});
if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
@ -707,8 +714,6 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.eSERVICESDV?.pIDCOLUMNNAME ?? "",
isReadOnly: model.rEADONLY == "Y",
length: model.mAXIMUMSIZE,
toolTip: model.rEQCOLTIP,
onChange: (text) {
model.fieldAnswer = text;
},
@ -729,7 +734,6 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
suffixIconData: Icons.calendar_today,
isEnable: false,
isReadOnly: model.rEADONLY == "Y",
toolTip: model.rEQCOLTIP,
onTap: () async {
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
if (getEitDffStructureList![index].isDefaultTypeIsCDPS) {
@ -741,7 +745,6 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
DateTime date = await _selectDate(context);
String dateString = date.toString().split(' ').first;
getEitDffStructureList![index].fieldAnswer = date.toString();
ESERVICESDV eservicesdv = ESERVICESDV(
pIDCOLUMNNAME: dateString,
pRETURNMSG: "null",
@ -764,7 +767,6 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
suffixIconData: Icons.access_time_filled_rounded,
isEnable: false,
isReadOnly: model.rEADONLY == "Y",
toolTip: model.rEQCOLTIP,
onTap: () async {
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
var timeString = getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.split(":");

@ -88,62 +88,58 @@ class _BasicDetailsState extends State<BasicDetails> {
? const SizedBox()
: (getEmployeeBasicDetailsList!.isEmpty
? Utils.getNoDataWidget(context)
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.profile_basicDetails.tr().toText20(isBold:true),
14.height,
...getEmployeeBasicDetailsList!
.map((e) => Column(
children: [
e.dISPLAYFLAG == "Y"
? Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
12.height
])
: Container(),
],
))
.toList()
])
.objectContainerView()),
: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
LocaleKeys.profile_basicDetails.tr().toText20(isBold: true),
14.height,
...getEmployeeBasicDetailsList!
.map((e) => Column(
children: [
e.dISPLAYFLAG == "Y"
? Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
12.height
])
: Container(),
],
))
.toList()
]).objectContainerView()),
20.height,
getEmployeeQualificationsList == null
? const SizedBox()
: (getEmployeeQualificationsList!.isEmpty
? Utils.getNoDataWidget(context)
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.qualification.tr().toText20(isBold:true),
14.height,
...getEmployeeQualificationsList!
.map((e) => SizedBox(
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.esteblishmentName.tr().toText13(color: MyColors.lightGrayColor),
"${e.establishment}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.grade.tr().toText13(color: MyColors.lightGrayColor),
"${e.grade}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.gradeDescription.tr().toText13(color: MyColors.lightGrayColor),
"${e.gradeDescription}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.type.tr().toText13(color: MyColors.lightGrayColor),
"${e.qualificationType}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.status.tr().toText13(color: MyColors.lightGrayColor),
"${e.status}".toText16(isBold: true, color: MyColors.blackColor),
],
),
))
.toList()
])
.objectContainerView())
: ((getEmployeeQualificationsList!.isEmpty && getEmployeeBasicDetailsList!.isEmpty)
? Utils.getNoDataWidget(context)
: getEmployeeQualificationsList!.isEmpty
? Container()
: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
LocaleKeys.qualification.tr().toText20(isBold: true),
14.height,
...getEmployeeQualificationsList!
.map((e) => SizedBox(
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.esteblishmentName.tr().toText13(color: MyColors.lightGrayColor),
"${e.establishment}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.grade.tr().toText13(color: MyColors.lightGrayColor),
"${e.grade}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.gradeDescription.tr().toText13(color: MyColors.lightGrayColor),
"${e.gradeDescription}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.type.tr().toText13(color: MyColors.lightGrayColor),
"${e.qualificationType}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.status.tr().toText13(color: MyColors.lightGrayColor),
"${e.status}".toText16(isBold: true, color: MyColors.blackColor),
],
),
))
.toList()
]).objectContainerView())
],
),
),
@ -204,14 +200,11 @@ class _BasicDetailsState extends State<BasicDetails> {
),
ListTile(
title: Text(LocaleKeys.enterNewInfo.tr()),
enabled: false,
leading: Radio(
value: 2,
groupValue: correctOrNew,
onChanged: (value) {
setState(() {
correctOrNew = int.parse(value.toString());
});
},
onChanged: null,
activeColor: Colors.green,
),
),

@ -101,7 +101,7 @@ class _ContactDetailsState extends State<ContactDetails> {
),
separatorBuilder: (cxt, index) => 12.height,
itemCount: getEmployeePhonesList.length),
if(env.canEdit)
// if(env.canEdit)
if (menuEntriesPhone.updateButton == 'Y')
AppState().isArabic(context)
? Positioned(
@ -133,7 +133,7 @@ class _ContactDetailsState extends State<ContactDetails> {
),
separatorBuilder: (cxt, index) => 12.height,
itemCount: getEmployeeAddressList.length),
if(env.canEdit)
// if(env.canEdit)
if (menuEntriesAddress.updateButton == 'Y')
AppState().isArabic(context)
? Positioned(

@ -1,5 +1,4 @@
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -63,7 +62,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
void getTransactionsStructure() async {
try {
Utils.showLoading(context);
genericResponseModel = await ProfileApiClient().getDffStructure("BASIC_DETAILS", dynamicParams!.uRL, dynamicParams!.requestID);
genericResponseModel = await ProfileApiClient().getDffStructure(dynamicParams!.dynamicId, dynamicParams!.uRL, dynamicParams!.requestID);
getBasicDetDffStructureList = genericResponseModel?.getBasicDetDffStructureList ?? [];
genericResponseModel = await ProfileApiClient().getColStructure(dynamicParams!.dynamicId, 'GET_BASIC_DET_COLS_STRUCTURE', dynamicParams!.requestID);
getBasicDetColsStructureList = genericResponseModel?.getBasicDetColsStructureList ?? [];
@ -76,6 +75,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
getBasicDetColsStructureList?.forEach((GetBasicDetColsStructureList element) {
element.userBasicDetail =
dynamicParams!.getEmployeeBasicDetailsList!.singleWhere((GetEmployeeBasicDetailsList userDetail) => userDetail.aPPLICATIONCOLUMNNAME == element.aPPLICATIONCOLUMNNAME);
print(element.userBasicDetail);
if (element.objectValuesList != null && element.userBasicDetail?.vARCHAR2VALUE != '') {
ObjectValuesList dropDownListValue = element.objectValuesList!.singleWhere((ObjectValuesList dropdown) => dropdown.cODE == element.userBasicDetail?.vARCHAR2VALUE);
element.userBasicDetail?.sEGMENTVALUEDSP = dropDownListValue.mEANING;
@ -200,8 +200,9 @@ class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
return PopupMenuButton(
child: DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.userBasicDetail?.aPPLICATIONCOLUMNNAME ?? "",
isEnable: false,
model.userBasicDetail?.vARCHAR2VALUE ?? "",
isEnable: true,
isReadOnly: model.rEADONLY =='Y',
isPopup: true,
).paddingOnly(bottom: 12),
itemBuilder: (_) => <PopupMenuItem<int>>[
@ -216,7 +217,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
return DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.eSERVICESDV?.pIDCOLUMNNAME ?? "",
model.eSERVICESDV?.pIDCOLUMNNAME ?? model.userBasicDetail!.vARCHAR2VALUE ?? "",
isReadOnly: model.rEADONLY == "Y",
onChange: (text) {
getBasicDetDffStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = text;
@ -293,7 +294,8 @@ class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
model.userBasicDetail?.sEGMENTVALUEDSP ?? "",
//model.aPPLICATIONCOLUMNNAME ?? "",
//"",
isReadOnly: false,
isReadOnly:(model.rEADONLY == "Y" ? true : false),
onChange: (text) {
getBasicDetColsStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = text;
},
@ -302,6 +304,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
return DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
(getBasicDetColsStructureList![index].userBasicDetail?.dATEVALUE ?? ""),
isReadOnly:(model.rEADONLY == "Y" ? true : false),
suffixIconData: Icons.calendar_today,
isEnable: false,
onTap: () async {

@ -54,7 +54,6 @@ class _MyRequestsState extends State<MyRequests> {
}
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBarWidget(
context,
title: LocaleKeys.concurrentReports.tr(),
@ -81,6 +80,7 @@ class _MyRequestsState extends State<MyRequests> {
],
onSelected: (int popupIndex) {
selectedConcurrentProgramList = getConcurrentProgramsList[popupIndex];
requestModel!.functionName = getConcurrentProgramsList[popupIndex].cONCURRENTPROGRAMNAME;
getCCPTransactions(selectedConcurrentProgramList?.cONCURRENTPROGRAMNAME);
setState(() {});
}),
@ -164,8 +164,10 @@ class _MyRequestsState extends State<MyRequests> {
}
void openNewRequest() async {
await Navigator.pushNamed(context, AppRoutes.newRequest, arguments: NewRequestModel(groupID: requestModel!.groupID)).then((value) {
// getOpenTickets();
await Navigator.pushNamed(context, AppRoutes.newRequest, arguments: NewRequestModel(groupID: requestModel!.groupID, functionName: requestModel!.functionName)).then((value) {
if (value != null && value == "refresh") {
getCCPTransactions(requestModel!.functionName);
}
});
}

@ -11,6 +11,7 @@ import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/dyanmic_forms/validate_eit_transaction_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart';
import 'package:mohem_flutter_app/models/my_requests/get_ccp_transactions_model.dart';
import 'package:mohem_flutter_app/models/my_requests/get_ccp_transations_list_model.dart';
@ -79,7 +80,7 @@ class _NewRequestState extends State<NewRequest> {
isEnable: false,
isPopup: true,
isInputTypeNum: true,
isReadOnly:getConcurrentProgramsList.isEmpty? true:false,
isReadOnly: getConcurrentProgramsList.isEmpty ? true : false,
).paddingOnly(bottom: 12),
itemBuilder: (_) => <PopupMenuItem<int>>[
for (int i = 0; i < getConcurrentProgramsList.length; i++) PopupMenuItem<int>(child: Text(getConcurrentProgramsList[i].uSERCONCURRENTPROGRAMNAME!), value: i),
@ -142,11 +143,13 @@ class _NewRequestState extends State<NewRequest> {
return ValidateEitTransactionModel(dATEVALUE: dateVal, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: numberVal, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: vatcherVal.toString()).toJson();
}).toList();
Utils.showLoading(context);
submitCcpTransactionList = await MyRequestsApiClient().getSubmitNewRequest(values, functionName: requestModel?.functionName ?? "HMG_EMP_BUS_TRIP_SET_SS");
getCCPTransactionsList = await MyRequestsApiClient().getCcpTransactions(values, functionName: requestModel?.functionName ?? "HMG_EMP_BUS_TRIP_SET_SS");
GenericResponseModel responseData = await MyRequestsApiClient().getSubmitNewRequest(values, functionName: requestModel?.functionName ?? "HMG_EMP_BUS_TRIP_SET_SS");
Utils.hideLoading(context);
Navigator.pushNamed(context, AppRoutes.myRequests, arguments: requestModel);
setState(() {});
if (responseData.messageStatus == 1) {
Navigator.pop(context, "refresh");
} else {
Utils.showToast(responseData.errorEndUserMessage ?? "");
}
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);

@ -127,7 +127,7 @@ class SelectedItemSheet extends StatelessWidget {
if (favoriteReplacements != null) empID = favoriteReplacements!.userName;
if (replacementList != null) empID = replacementList!.userName;
try {
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, empID!);
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, empID!, notificationID.toString());
if (actionHistoryList != null) empID = actionHistoryList!.eMPLOYEEIMAGE = memberInformationListModel!.eMPLOYEEIMAGE ?? AppState().getBase64ImageEmp;
if (favoriteReplacements != null) empID = favoriteReplacements!.employeeImage = memberInformationListModel!.eMPLOYEEIMAGE ?? AppState().getBase64ImageEmp;
if (replacementList != null) empID = replacementList!.employeeImage = memberInformationListModel!.eMPLOYEEIMAGE ?? AppState().getBase64ImageEmp;
@ -140,7 +140,8 @@ class SelectedItemSheet extends StatelessWidget {
Future<void> performNetworkCall(BuildContext context, {String? email, String? userId}) async {
Utils.showLoading(context);
try {
await WorkListApiClient().submitComment(comment: comment, email: email, userId: userId, notificationId: notificationID, apiMode: apiMode, approverIndex: actionHistoryList != null ? actionHistoryList!.sEQUENCE : null);
await WorkListApiClient().submitComment(
comment: comment, email: email, userId: userId, notificationId: notificationID, apiMode: apiMode, approverIndex: actionHistoryList != null ? actionHistoryList!.sEQUENCE : null);
Utils.hideLoading(context);
// Navigator.pop(context);
// Navigator.pop(context);

@ -753,7 +753,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
memberInformationListModel = null;
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!, workListData!.nOTIFICATIONID.toString());
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);

@ -93,7 +93,7 @@ class ActionsFragment extends StatelessWidget {
],
),
10.height,
getActionDuration(index).toText11(maxLine: 1, color: const Color(0xff1FA269))
// getActionDuration(index).toText11(maxLine: 1, color: const Color(0xff1FA269))
],
),
)

@ -64,7 +64,7 @@ dependencies:
wifi_iot: ^0.3.18
flutter_html: ^3.0.0-alpha.6
# flutter_barcode_scanner: ^2.0.0
qr_code_scanner: ^1.0.0
qr_code_scanner: ^1.0.1
# qr_flutter: ^4.0.0
url_launcher: ^6.0.15
share: 2.0.4
@ -86,7 +86,8 @@ dependencies:
swipe_to: ^1.0.2
flutter_webrtc: ^0.9.16
camera: ^0.10.3
flutter_local_notifications: any
flutter_local_notifications: 10.0.0
google_api_availability: ^3.0.1
#firebase_analytics: any
#Chat Voice Message Recoding & Play

Loading…
Cancel
Save