Compare commits

...

5 Commits

Author SHA1 Message Date
Sultan khan 34a143febc biometric issue fixed 1 year ago
Aamir Muhammad 9476683b51 design change 1 year ago
Sultan khan f0e2f3d2b2 code updated. 2 years ago
Sultan khan b7f50d43f7 Merge branch 'master' of https://gitlab.com/Cloud_Solution/mohemm-flutter-moe into sultan_dev
# Conflicts:
#	assets/langs/ar-SA.json
#	assets/langs/en-US.json
2 years ago
Sultan khan 27f4dec5da translation changes 2 years ago

@ -34,7 +34,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.huawei.agconnect'
android {
compileSdkVersion 33
compileSdkVersion 34
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
@ -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 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.0'
ext.kotlin_version = '1.8.0'
repositories {
google()
mavenCentral()
@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.huawei.agconnect:agcp:1.8.0.300'
@ -28,6 +28,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -0,0 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" width="68.048" height="69.574" viewBox="0 0 68.048 69.574">
<g id="calendar_3_" data-name="calendar (3)" transform="translate(-5.411 -1)" opacity="0.042">
<g id="Group_7900" data-name="Group 7900" transform="translate(5.411 1)">
<path id="Path_4715" data-name="Path 4715" d="M125.7,259.819a1.577,1.577,0,0,0-1.58-1.577h-5.511a1.577,1.577,0,0,0-1.577,1.577v5.511a1.58,1.58,0,0,0,1.577,1.58h5.511a1.58,1.58,0,0,0,1.58-1.58Z" transform="translate(-101.127 -221.438)" fill="#fff"/>
<path id="Path_4716" data-name="Path 4716" d="M222.337,259.819a1.577,1.577,0,0,0-1.577-1.577h-5.511a1.577,1.577,0,0,0-1.577,1.577v5.511a1.58,1.58,0,0,0,1.577,1.58h5.511a1.577,1.577,0,0,0,1.577-1.58Z" transform="translate(-183.989 -221.438)" fill="#fff"/>
<path id="Path_4717" data-name="Path 4717" d="M318.966,259.819a1.577,1.577,0,0,0-1.577-1.577h-5.511a1.577,1.577,0,0,0-1.58,1.577v5.511a1.58,1.58,0,0,0,1.58,1.58h5.511a1.58,1.58,0,0,0,1.577-1.58Z" transform="translate(-266.845 -221.438)" fill="#fff"/>
<path id="Path_4718" data-name="Path 4718" d="M125.7,356.452a1.577,1.577,0,0,0-1.58-1.577h-5.511a1.577,1.577,0,0,0-1.577,1.577v5.508a1.577,1.577,0,0,0,1.577,1.577h5.511a1.577,1.577,0,0,0,1.58-1.577Z" transform="translate(-101.127 -304.299)" fill="#fff"/>
<path id="Path_4719" data-name="Path 4719" d="M222.337,356.452a1.577,1.577,0,0,0-1.577-1.577h-5.511a1.577,1.577,0,0,0-1.577,1.577v5.508a1.577,1.577,0,0,0,1.577,1.577h5.511a1.577,1.577,0,0,0,1.577-1.577Z" transform="translate(-183.989 -304.299)" fill="#fff"/>
<path id="Path_4720" data-name="Path 4720" d="M318.966,356.452a1.577,1.577,0,0,0-1.577-1.577h-5.511a1.577,1.577,0,0,0-1.58,1.577v5.509a1.578,1.578,0,0,0,1.58,1.577h5.511a1.577,1.577,0,0,0,1.577-1.577Z" transform="translate(-266.845 -304.299)" fill="#fff"/>
<path id="Path_4721" data-name="Path 4721" d="M67.384,54.173v8.416a6.874,6.874,0,0,1-6.89,6.867H56.15a6.916,6.916,0,0,1-6.93-6.869V54.142H29.632v8.447a6.916,6.916,0,0,1-6.93,6.87H18.356a6.874,6.874,0,0,1-6.89-6.869V54.173A6.265,6.265,0,0,0,5.411,60.4v49.32A6.267,6.267,0,0,0,11.658,116H67.212a6.274,6.274,0,0,0,6.247-6.274V60.4A6.265,6.265,0,0,0,67.384,54.173Zm-2.008,52.48a2.7,2.7,0,0,1-2.7,2.7H16.062a2.7,2.7,0,0,1-2.7-2.7V81.176a2.7,2.7,0,0,1,2.7-2.7H62.67a2.7,2.7,0,0,1,2.7,2.7v25.477Z" transform="translate(-5.411 -46.425)" fill="#fff"/>
<path id="Path_4722" data-name="Path 4722" d="M81.913,18.518h4.3a2.36,2.36,0,0,0,2.363-2.36V2.363A2.363,2.363,0,0,0,86.212,0h-4.3A2.363,2.363,0,0,0,79.55,2.363V16.158A2.36,2.36,0,0,0,81.913,18.518Z" transform="translate(-68.984 0)" fill="#fff"/>
<path id="Path_4723" data-name="Path 4723" d="M346.821,18.518h4.3a2.36,2.36,0,0,0,2.356-2.36V2.363A2.363,2.363,0,0,0,351.12,0h-4.3a2.363,2.363,0,0,0-2.363,2.363V16.158A2.36,2.36,0,0,0,346.821,18.518Z" transform="translate(-296.137 0)" fill="#fff"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -400,6 +400,7 @@
"purchaseRequisition": "طلب شراء",
"moveOrder": "طلب تغيير",
"humanResource": "الموارد البشريه",
"humanResource": "الموارد البشريه C",
"purchaseOrder": "امر شراء",
"ITGForms": "ITG نماذج",
"itemCreation": "أنشاء عنصر",
@ -540,5 +541,7 @@
"employee_leaves_calender": "تقويم أوراق الموظفين",
"view_your_leave_information": "عرض معلومات إجازتك",
"view_details": "عرض التفاصيل",
"create_absence_request": "إنشاء طلب الغياب",
"business_mission": "طلب مهمة العمل",
"hierarchy": "تَسَلسُل"
}

@ -400,6 +400,7 @@
"purchaseRequisition": "Purchase Requisition",
"moveOrder": "Move Order",
"humanResource": "Human Resource",
"humanResource": "Human Resource -C",
"purchaseOrder": "Purchase Order",
"ITGForms": "ITG Forms",
"itemCreation": "Item Creation",
@ -540,6 +541,8 @@
"employee_leaves_calender": "Employee Leaves Calender",
"view_your_leave_information": "View Your Leave Information",
"view_details": "View Details",
"create_absence_request": "Create Absence Request",
"business_mission": "Business Mission Request",
"hierarchy": "Hierarchy"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 448 KiB

@ -3,14 +3,14 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {
/* 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;
@ -245,10 +227,12 @@
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
@ -259,6 +243,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@ -295,7 +280,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
341195B929E80BC700FBCA57 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;

@ -40,7 +40,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Profile"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 684 B

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

@ -91,5 +91,7 @@
<array>
<string>TAG</string>
</array>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>

@ -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>

@ -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);

@ -24,6 +24,7 @@ import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.dart';
import 'package:mohem_flutter_app/models/update_user_item_type_list.dart';
import 'package:mohem_flutter_app/models/worklist/GetRFCEmployeeList.dart';
import 'package:mohem_flutter_app/models/worklist/get_checklist_notification.dart';
import 'package:mohem_flutter_app/models/worklist/get_favorite_replacements_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/eit_otification_body_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_address_notification_body_list.dart';
@ -114,6 +115,21 @@ class WorkListApiClient {
}, url, postParams);
}
Future<CheckListNotification> getCheckListNotificationBody(int pNotificationID) async {
String url = "${ApiConsts.erpRest}GET_CHECKLIST_NTF_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getCheckListNotifications!;
}, url, postParams);
}
Future<List<GetNotificationButtonsList>> getNotificationButtons(int pNotificationID) async {
String url = "${ApiConsts.erpRest}GET_NOTIFICATION_BUTTONS";
Map<String, dynamic> postParams = {"P_NOTIFICATION_ID": pNotificationID};

@ -3,11 +3,11 @@ import 'package:flutter/cupertino.dart';
class MyColors {
static const Color kWhiteColor = Color(0xffffffff);
static const Color darkIconColor = Color(0xff28323A);
static const Color darkTextColor = Color(0xff2B353E);
// static const Color darkTextColor = Color(0xff2B353E);
static const Color normalTextColor = Color(0xff5A5A5A);
static const Color lightTextColor = Color(0xffBFBFBF);
static const Color gradiantStartColor = Color(0xff259db7);
static const Color gradiantEndColor = Color(0xff33c0a5);
// 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);
@ -65,4 +65,11 @@ class MyColors {
static const Color grey71Color = Color(0xff717171);
static const Color darkGrey3BColor = Color(0xff3B3B3B);
static const Color lightGreyIconColor = Color(0xff919191);
static const Color moeLoginColor = Color(0xFF004D71);
static const Color gradiantStartColor = Color(0xFF004D71);
static const Color gradiantEndColor = Color(0xFF004D71);
static const Color bgColor = Color(0xFF5FA5A0);
static const Color darkTextColor = Color(0xFF1D4C6E);
}

@ -410,4 +410,14 @@ class Utils {
}
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;
}
}
}

@ -25,10 +25,18 @@ extension TrimString on String {
extension EmailValidator on String {
Widget get toWidget => Text(this);
Widget toText10({Color? color, bool isBold = false, int? maxlines, FontStyle? fontStyle}) => Text(
Widget toText10({Color? color, bool isBold = false, int? maxlines, FontStyle? fontStyle, double letterSpacing = -0.4}) => Text(
this,
maxLines: maxlines,
style: TextStyle(fontSize: 10, fontStyle: fontStyle ?? FontStyle.normal, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.4),
style: TextStyle(
fontSize: 10, fontStyle: fontStyle ?? FontStyle.normal, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: letterSpacing),
);
Widget toText9({Color? color, bool isBold = false, int? maxlines, FontStyle? fontStyle, double letterSpacing = -0.27}) => Text(
this,
maxLines: maxlines,
style: TextStyle(
fontSize: 9, fontStyle: fontStyle ?? FontStyle.normal, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: letterSpacing),
);
Widget toText11({Color? color, FontWeight? weight, bool isUnderLine = false, bool isBold = false, int maxLine = 0}) => Text(
@ -159,10 +167,10 @@ extension EmailValidator on String {
style: TextStyle(height: 1, color: color ?? MyColors.darkTextColor, fontSize: 22, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText24({Color? color, bool isBold = false, bool isCentered = false}) => Text(
Widget toText24({Color? color, bool isBold = false, bool isCentered = false, double letterspacing = -1.44}) => Text(
this,
textAlign: isCentered ? TextAlign.center : null,
style: TextStyle(height: 23 / 24, color: color ?? MyColors.darkTextColor, fontSize: 24, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
style: TextStyle(height: 23 / 24, color: color ?? MyColors.darkTextColor, fontSize: 24, letterSpacing: letterspacing, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText30({Color? color, bool isBold = false, bool isCentered = false}) => Text(

@ -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';
@ -400,6 +401,7 @@ abstract class LocaleKeys {
static const purchaseRequisition = 'purchaseRequisition';
static const moveOrder = 'moveOrder';
static const humanResource = 'humanResource';
static const humanResourcec = 'humanResourcec';
static const purchaseOrder = 'purchaseOrder';
static const ITGForms = 'ITGForms';
static const itemCreation = 'itemCreation';
@ -525,9 +527,8 @@ abstract class LocaleKeys {
static const employee_leaves_calender = 'employee_leaves_calender';
static const view_your_leave_information = 'view_your_leave_information';
static const view_details = 'view_details';
static const notices = 'notices';
static const hierarchy = 'hierarchy';
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);

@ -103,6 +103,7 @@ import 'package:mohem_flutter_app/models/vacation_rule/vr_item_types_list_model.
import 'package:mohem_flutter_app/models/vacation_rule/wf_look_up_list_model.dart';
import 'package:mohem_flutter_app/models/validate_eit_transaction_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/GetRFCEmployeeList.dart';
import 'package:mohem_flutter_app/models/worklist/get_checklist_notification.dart';
import 'package:mohem_flutter_app/models/worklist/get_favorite_replacements_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/eit_otification_body_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_address_notification_body_list.dart';
@ -175,6 +176,7 @@ class GenericResponseModel {
List<GetAddressDffStructureList>? getAddressDffStructureList;
List<GetApprovesList>? getApprovesList;
List<GetAttachementList>? getAttachementList;
CheckListNotification? getCheckListNotifications;
GetAttendanceTracking? getAttendanceTrackingList;
List<GetBasicDetColsStructureList>? getBasicDetColsStructureList;
List<GetBasicDetDffStructureList>? getBasicDetDffStructureList;
@ -650,6 +652,7 @@ class GenericResponseModel {
this.isActiveCode,
this.isSMSSent,
this.supervisorHierarchyLists,
this.getCheckListNotifications
});
GenericResponseModel.fromJson(Map<String, dynamic> json) {
@ -679,6 +682,9 @@ class GenericResponseModel {
successMsg = json['SuccessMsg'];
successMsgN = json['SuccessMsgN'];
vidaUpdatedResponse = json['VidaUpdatedResponse'];
if (json['CheckList_NTF_Body_Obj'] != null) {
getCheckListNotifications = new CheckListNotification.fromJson(json['CheckList_NTF_Body_Obj']);
}
if (json['AddAttSuccessList'] != null) {
addAttSuccessList = <AddAttSuccessList>[];
json['AddAttSuccessList'].forEach((v) {
@ -1431,7 +1437,9 @@ class GenericResponseModel {
data['SuccessMsg'] = this.successMsg;
data['SuccessMsgN'] = this.successMsgN;
data['VidaUpdatedResponse'] = this.vidaUpdatedResponse;
if (this.getCheckListNotifications != null) {
data["CheckList_NTF_Body_Obj"] = this.getCheckListNotifications!.toJson();
}
if (this.addAttSuccessList != null) {
data['AddAttSuccessList'] = this.addAttSuccessList!.map((v) => v.toJson()).toList();
}

@ -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;
}
}

@ -0,0 +1,22 @@
class CheckListNotification {
String? pGETCHECKLISTNTFBODY;
dynamic? pINFORMATION;
dynamic? pQUESTION;
CheckListNotification(
{this.pGETCHECKLISTNTFBODY, this.pINFORMATION, this.pQUESTION});
CheckListNotification.fromJson(Map<String, dynamic> json) {
pGETCHECKLISTNTFBODY = json['P_GET_CHECKLIST_NTF_BODY'];
pINFORMATION = json['P_INFORMATION'];
pQUESTION = json['P_QUESTION'];
}
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
data['P_GET_CHECKLIST_NTF_BODY'] = this.pGETCHECKLISTNTFBODY;
data['P_INFORMATION'] = this.pINFORMATION;
data['P_QUESTION'] = this.pQUESTION;
return data;
}
}

@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/theme/colors.dart';
class AppTheme {
static ThemeData getTheme(isArabic) => ThemeData(
fontFamily: isArabic ? 'Cairo' : 'Poppins',
primarySwatch: Colors.red,
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light,
pageTransitionsTheme: const PageTransitionsTheme(
@ -15,19 +15,14 @@ class AppTheme {
},
),
hintColor: Colors.grey[400],
colorScheme: ColorScheme.fromSwatch(accentColor: MyColors.backgroundColor),
disabledColor: Colors.grey[300],
errorColor: const Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: MyColors.backgroundColor,
textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey),
canvasColor: Colors.white,
backgroundColor: const Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100]!.withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: primaryColor,
primaryColorDark: primaryColor,
buttonColor: Colors.black,
toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor,
bottomSheetTheme: const BottomSheetThemeData(
backgroundColor: Color(0xFFE0E0E0),
@ -44,12 +39,34 @@ class AppTheme {
floatingActionButtonTheme: const FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2),
appBarTheme: AppBarTheme(
color: const Color(0xff515A5D),
brightness: Brightness.light,
elevation: 0.0,
actionsIconTheme: IconThemeData(
color: Colors.grey[800],
),
),
), systemOverlayStyle: SystemUiOverlayStyle.dark,
), checkboxTheme: CheckboxThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return secondaryColor; }
return null;
}),
), radioTheme: RadioThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return secondaryColor; }
return null;
}),
), switchTheme: SwitchThemeData(
thumbColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return secondaryColor; }
return null;
}),
trackColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) { return null; }
if (states.contains(MaterialState.selected)) { return secondaryColor; }
return null;
}),
), colorScheme: ColorScheme.fromSwatch(accentColor: MyColors.backgroundColor).copyWith( background: const Color.fromRGBO(255, 255, 255, 1)).copyWith(error: const Color.fromRGBO(235, 80, 60, 1.0)),
);
}

@ -19,7 +19,7 @@ import 'package:mohem_flutter_app/models/get_schedule_shifts_details_list_model.
import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
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:month_picker_dialog/month_picker_dialog.dart';
import 'package:pie_chart/pie_chart.dart';
import 'package:sizer/sizer.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
@ -92,8 +92,8 @@ class _MoeMonthlyAttendanceScreenState extends State<MoeMonthlyAttendanceScreen>
initialDate: currentDate,
firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(),
confirmText: Text(LocaleKeys.confirm.tr()),
cancelText: Text(LocaleKeys.cancel.tr()),
confirmWidget: Text(LocaleKeys.confirm.tr()),
cancelWidget: Text(LocaleKeys.cancel.tr()),
).then((selectedDate) {
if (selectedDate != null) {
getLeavesData(selectedDate);

@ -16,7 +16,7 @@ import 'package:mohem_flutter_app/models/get_schedule_shifts_details_list_model.
import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
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:month_picker_dialog/month_picker_dialog.dart';
import 'package:pie_chart/pie_chart.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
@ -117,8 +117,8 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
initialDate: formattedDate,
firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(),
confirmText: Text(LocaleKeys.confirm.tr()),
cancelText: Text(LocaleKeys.cancel.tr()),
confirmWidget: Text(LocaleKeys.confirm.tr()),
cancelWidget: Text(LocaleKeys.cancel.tr()),
).then((selectedDate) {
if (selectedDate != null) {
searchMonth = getMonth(selectedDate.month);

@ -1,5 +1,5 @@
import 'dart:async';
import 'dart:convert';
import 'package:audio_waveforms/audio_waveforms.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
@ -14,18 +14,16 @@ import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/models/chat/call.dart';
import 'package:mohem_flutter_app/models/chat/get_search_user_chat_model.dart';
import 'package:mohem_flutter_app/models/chat/get_single_user_chat_list_model.dart';
import 'package:mohem_flutter_app/models/chat/get_user_login_token_model.dart';
import 'package:mohem_flutter_app/provider/chat_call_provider.dart';
import 'package:mohem_flutter_app/provider/chat_provider_model.dart';
import 'package:mohem_flutter_app/ui/chat/custom_auto_direction.dart';
import 'package:mohem_flutter_app/ui/chat/call/chat_outgoing_call_screen.dart';
import 'package:mohem_flutter_app/ui/chat/chat_bubble.dart';
import 'package:mohem_flutter_app/ui/chat/common.dart';
import 'package:mohem_flutter_app/ui/chat/custom_auto_direction.dart';
import 'package:mohem_flutter_app/widgets/chat_app_bar_widge.dart';
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
import 'package:provider/provider.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:signalr_netcore/signalr_client.dart';
import 'package:swipe_to/swipe_to.dart';
class ChatDetailedScreenParams {
@ -78,7 +76,7 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
Widget build(BuildContext context) {
params = ModalRoute.of(context)!.settings.arguments as ChatDetailedScreenParams;
data = Provider.of<ChatProviderModel>(context, listen: false);
// callPro = Provider.of<ChatCallProvider>(context, listen: false);
// callPro = Provider.of<ChatCallProvider>(context, listen: false);
if (params != null) {
data.getSingleUserChatHistory(
senderUID: AppState().chatDetails!.response!.id!.toInt(),

@ -3,7 +3,6 @@ import 'dart:io';
import 'dart:ui' as ui;
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -238,7 +237,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
});
}),
Image.asset("assets/images/drawer/moe_logo_full.png", width: 130, height: 45),
SizedBox(width: 65),
const SizedBox(width: 65),
// SvgPicture.asset(
// "assets/images/announcements.svg",
// matchTextDirection: true,
@ -264,8 +263,11 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.welcomeBack.tr().toText14(color: MyColors.grey77Color),
(AppState().memberInformationList!.eMPLOYEENAME ?? "").toText24(isBold: true),
LocaleKeys.welcomeBack.tr().toText16(color: MyColors.grey77Color),
(AppState().memberInformationList!.eMPLOYEENAME ?? "").toText24(
isBold: true,
letterspacing: -1.44,
),
16.height,
Row(
children: [
@ -351,10 +353,10 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
height: 45,
padding: const EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
color: Color(0xff259EA4),
color: const Color(0xff259EA4),
borderRadius: BorderRadius.only(
bottomRight: AppState().isArabic(context) ? Radius.circular(0) : Radius.circular(15),
bottomLeft: AppState().isArabic(context) ? Radius.circular(15) : Radius.circular(0),
bottomRight: AppState().isArabic(context) ? const Radius.circular(0) : const Radius.circular(15),
bottomLeft: AppState().isArabic(context) ? const Radius.circular(15) : const Radius.circular(0),
),
),
child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/attendance.svg" : "assets/images/attendance.svg"),
@ -383,57 +385,79 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
),
if (env.dashboard.attendance) 9.width,
Expanded(
child: MenusWidget(),
child: Row(
children: [
if (env.monthlyAttendance)
Expanded(
child: InkWell(
child: AspectRatio(
aspectRatio: 1,
child: Container(
width: double.infinity,
padding: const EdgeInsets.all(11),
margin: const EdgeInsets.symmetric(horizontal: 0),
decoration: const BoxDecoration(
color: MyColors.bgColor,
borderRadius: BorderRadius.all(Radius.circular(15)),
),
child: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
"assets/icons/calendar.png",
),
opacity: 1,
),
),
child: Row(
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.employee_leaves_calender.tr().toText16(
isBold: false,
color: Colors.white,
maxlines: 2,
),
7.height,
LocaleKeys.view_your_leave_information.tr().toText10(color: Colors.white, maxlines: 2, letterSpacing: -0.1),
const Expanded(
child: SizedBox(),
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
LocaleKeys.view_details.tr().toText10(color: Colors.white, letterSpacing: -0.3),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white))
.paddingOnly(left: 5),
],
),
],
),
),
],
),
),
),
),
onTap: () {
Navigator.pushNamed(context, AppRoutes.monthlyAttendance);
},
),
),
9.width,
Expanded(child: MenusWidget()),
],
),
),
],
),
],
).paddingOnly(left: 21, right: 21, top: 7, bottom: 21),
if (env.monthlyAttendance)
InkWell(
child: Container(
width: double.infinity,
padding: EdgeInsets.all(12),
margin: EdgeInsets.symmetric(horizontal: 21),
decoration: const BoxDecoration(
color: MyColors.gradiantStartColor,
borderRadius: BorderRadius.all(Radius.circular(12)),
),
child: Row(
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.employee_leaves_calender.tr().toText18(isBold: true, color: Colors.white),
2.height,
LocaleKeys.view_your_leave_information.tr().toText12(color: Colors.white),
8.height,
Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.4),
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
padding: EdgeInsets.all(8),
child: LocaleKeys.view_details.tr().toText14(color: Colors.white),
),
],
),
),
const Icon(
Icons.calendar_month,
color: Colors.white,
size: 80,
),
],
),
),
onTap: () {
Navigator.pushNamed(context, AppRoutes.monthlyAttendance);
},
),
21.height,
15.height,
Visibility(
visible: env.offersDiscount,
child: Column(
@ -534,23 +558,27 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
],
),
),
Container(
width: double.infinity,
padding: const EdgeInsets.only(top: 31),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.only(topRight: Radius.circular(50), topLeft: Radius.circular(50)),
border: Border.all(color: MyColors.lightGreyEDColor, width: 1),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
if (env.marathon)
context.watch<MarathonProvider>().isLoading ? const MarathonBannerShimmer().paddingAll(20) : const MarathonBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 8),
ServicesWidget(),
],
),
// Container(
// width: double.infinity,
// padding: const EdgeInsets.only(top: 31),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: const BorderRadius.only(topRight: Radius.circular(50), topLeft: Radius.circular(50)),
// border: Border.all(color: MyColors.lightGreyEDColor, width: 1),
// ),
// child:
Column(
mainAxisSize: MainAxisSize.min,
children: [
if (env.marathon)
context.watch<MarathonProvider>().isLoading ? const MarathonBannerShimmer().paddingAll(20) : const MarathonBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 8),
Container(
// color: Colors.transparent,
child: ServicesWidget(),
),
],
),
//),
],
),
),

@ -16,12 +16,13 @@ import 'package:provider/provider.dart';
class MenusWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
List<int> namesColor = [0xff125765, 0xff239D8F, 0xff2BB8A8, 0xff1D92AA];
// List<int> namesColor = [0xff125765, 0xff239D8F, 0xff2BB8A8, 0xff1D92AA];
List<int> namesColor = [0xff1C4B6D, 0xff33678D, 0xff9FB7C4, 0xff5FA5A0];
return Consumer<DashboardProviderModel>(
builder: (cxt, data, child) {
return GridView(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 1.75, crossAxisSpacing: 9, mainAxisSpacing: 9),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 78 / 75, crossAxisSpacing: 9, mainAxisSpacing: 9),
padding: EdgeInsets.zero,
shrinkWrap: true,
primary: false,
@ -40,11 +41,11 @@ class MenusWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.workList.tr().toText12(color: Colors.white),
LocaleKeys.workList.tr().toText10(color: Colors.white, letterSpacing: -0.6),
Row(
children: [
Expanded(
child: data.workListCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1),
child: data.workListCounter.toString().toText14(color: Colors.white, isBold: true, maxlines: 1),
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
],
@ -68,11 +69,11 @@ class MenusWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.missingSwipes.tr().toText12(color: Colors.white),
LocaleKeys.missingSwipes.tr().toText10(color: Colors.white, letterSpacing: -0.6),
Row(
children: [
Expanded(
child: data.missingSwipeCounter.toString().toText16(color: Colors.white, isBold: true, maxlines: 1),
child: data.missingSwipeCounter.toString().toText14(color: Colors.white, isBold: true, maxlines: 1),
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
],
@ -95,11 +96,11 @@ class MenusWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.leaveBalance.tr().toText12(color: Colors.white),
LocaleKeys.businessTripBalance.tr().toText10(color: Colors.white, letterSpacing: -0.6),
Row(
children: [
Expanded(
child: (data.leaveBalance)!.toStringAsFixed(0).toText16(color: Colors.white, isBold: true, maxlines: 1),
child: data.businessTrip.toStringAsFixed(0).toText14(color: Colors.white, isBold: true, maxlines: 1),
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
],
@ -107,7 +108,8 @@ class MenusWidget extends StatelessWidget {
],
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
).onPress(() {
Navigator.pushNamed(context, AppRoutes.leaveBalance);
//Navigator.pushNamed(context, AppRoutes.leaveBalance);
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.business_mission.tr(), "XXX_HR_EIT_BUSINESS_MISSION_SS"));
}),
data.isLeaveTicketBalanceLoading
? MenuShimmer().onPress(() {
@ -115,18 +117,18 @@ class MenusWidget extends StatelessWidget {
})
: Container(
decoration: BoxDecoration(
color: Color(namesColor[2]),
color: Color(namesColor[1]),
borderRadius: BorderRadius.circular(10),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.businessTripBalance.tr().toText12(color: Colors.white),
LocaleKeys.leaveBalance.tr().toText10(color: Colors.white, letterSpacing: -0.6),
Row(
children: [
Expanded(
child: data.businessTrip.toStringAsFixed(0).toText16(color: Colors.white, isBold: true, maxlines: 1),
child: (data.leaveBalance)!.toStringAsFixed(0).toText14(color: Colors.white, isBold: true, maxlines: 1),
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
],
@ -134,10 +136,7 @@ class MenusWidget extends StatelessWidget {
],
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
).onPress(() {
//Navigator.pushNamed(context, AppRoutes.leaveBalance);
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.business_mission.tr(), "XXX_HR_EIT_BUSINESS_MISSION_SS"));
Navigator.pushNamed(context, AppRoutes.leaveBalance);
}),
if (env.dashboard.ticketBalance)
data.isLeaveTicketBalanceLoading
@ -153,11 +152,11 @@ class MenusWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.ticketBalance.tr().toText12(color: Colors.white),
LocaleKeys.ticketBalance.tr().toText10(color: Colors.white, letterSpacing: -0.6),
Row(
children: [
Expanded(
child: data.ticketBalance.toStringAsFixed(2).toText16(color: Colors.white, isBold: true, maxlines: 1),
child: data.ticketBalance.toStringAsFixed(2).toText14(color: Colors.white, isBold: true, maxlines: 1),
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
],
@ -182,14 +181,15 @@ class MenusWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.myRequest.tr().toText12(color: Colors.white),
LocaleKeys.myRequest.tr().toText10(color: Colors.white, letterSpacing: -0.6),
Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// Expanded(
// child: data.ticketBalance.toStringAsFixed(2).toText16(color: Colors.white, isBold: true, maxlines: 1),
// ),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white).paddingOnly(bottom: 4)),
],
)
],

@ -37,69 +37,151 @@ class ServicesWidget extends StatelessWidget {
return data.isServicesMenusLoading
? whileLoading()
: ListView.separated(
padding: const EdgeInsets.only(top: 0),
padding: const EdgeInsets.only(top: 0, bottom: 0),
itemBuilder: (context, parentIndex) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
data.homeMenus![parentIndex].menuEntry.prompt!.toSectionHeading().paddingOnly(left: 21, right: 21),
SizedBox(
height: 105 + 26,
child: ListView.separated(
shrinkWrap: true,
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13),
scrollDirection: Axis.horizontal,
itemBuilder: (cxt, index) {
return AspectRatio(
aspectRatio: 105 / 105,
child: data.isServicesMenusLoading
? ServicesMenuShimmer()
: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.memory(
const Base64Decoder().convert(data.homeMenus![parentIndex].menuEntiesList[index].icon ?? ""),
scale: 1.25,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText10(isBold: true),
if (parentIndex == 0)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
data.homeMenus![parentIndex].menuEntry.prompt!.toSectionHeading().paddingOnly(left: 21, right: 21),
Container(
height: 105 + 26,
width: double.infinity,
// color: Colors.white.withOpacity(0.4),
child: ListView.separated(
shrinkWrap: true,
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13),
scrollDirection: Axis.horizontal,
itemBuilder: (cxt, index) {
return AspectRatio(
aspectRatio: 105 / 105,
child: data.isServicesMenusLoading
? ServicesMenuShimmer()
: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 18,
offset: const Offset(0, 0),
),
],
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)),
],
)
],
).paddingOnly(left: 10, right: 10, bottom: 10, top: 12),
).onPress(() {
handleOnPress(context, data.homeMenus![parentIndex].menuEntiesList[index]);
}),
);
},
separatorBuilder: (BuildContext cxt, int index) => 9.width,
itemCount: data.homeMenus![parentIndex].menuEntiesList.length),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.memory(
const Base64Decoder().convert(data.homeMenus![parentIndex].menuEntiesList[index].icon ?? ""),
scale: 1.25,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText9(isBold: true),
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)),
],
)
],
).paddingOnly(left: 10, right: 10, bottom: 10, top: 12),
).onPress(() {
handleOnPress(context, data.homeMenus![parentIndex].menuEntiesList[index]);
}));
},
separatorBuilder: (BuildContext cxt, int index) => 9.width,
itemCount: data.homeMenus![parentIndex].menuEntiesList.length),
),
],
),
if (parentIndex != 0)
Container(
padding: const EdgeInsets.only(top: 25),
decoration: parentIndex == 1
? const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(topRight: Radius.circular(50), topLeft: Radius.circular(50)),
)
: const BoxDecoration(
color: Colors.white,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
data.homeMenus![parentIndex].menuEntry.prompt!.toSectionHeading().paddingOnly(left: 21, right: 21),
Container(
height: 105 + 26,
// color: Colors.white,
width: double.infinity,
child: ListView.separated(
shrinkWrap: true,
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13),
scrollDirection: Axis.horizontal,
itemBuilder: (cxt, index) {
return AspectRatio(
aspectRatio: 105 / 105,
child: data.isServicesMenusLoading
? ServicesMenuShimmer()
: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 18,
offset: const Offset(0, 0),
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.memory(
const Base64Decoder().convert(data.homeMenus![parentIndex].menuEntiesList[index].icon ?? ""),
scale: 1.25,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText9(isBold: true),
),
RotatedBox(
quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)),
],
)
],
).paddingOnly(left: 10, right: 10, bottom: 10, top: 12),
).onPress(() {
handleOnPress(context, data.homeMenus![parentIndex].menuEntiesList[index]);
}));
},
separatorBuilder: (BuildContext cxt, int index) => 9.width,
itemCount: data.homeMenus![parentIndex].menuEntiesList.length),
),
],
),
)
],
);
},
separatorBuilder: (BuildContext context, int index) {
return 12.height;
if (index == 0) return SizedBox();
return Container(
color: Colors.white,
height: 7,
);
},
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),

@ -4,7 +4,6 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@ -142,7 +141,8 @@ 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,7 +152,6 @@ class _LoginScreenState extends State<LoginScreen> {
}
}
void performLogin() async {
Utils.showLoading(context);
try {
@ -186,18 +185,21 @@ 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";
// username.text = "1002528733";
// password.text = "moe123456";
username.text = "1024056812";
password.text = "moe123456";
// username.text = "1063437063";
// password.text = "moe123456";
// 1) Normal user :
// Username: 1100313582
// Employee # and Name: 210624 - شهد خالد ابراهيم الشامخ
@ -233,21 +235,22 @@ class _LoginScreenState extends State<LoginScreen> {
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"));
}),
],)
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(
@ -285,10 +288,14 @@ class _LoginScreenState extends State<LoginScreen> {
),
),
),
DefaultButton(LocaleKeys.login.tr(), () async {
SystemChannels.textInput.invokeMethod('TextInput.hide');
performLogin();
}).insideContainer
DefaultButton(
LocaleKeys.login.tr(),
() async {
SystemChannels.textInput.invokeMethod('TextInput.hide');
performLogin();
},
color: MyColors.moeLoginColor,
).insideContainer
],
),
);

@ -4,7 +4,6 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart';
import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart';
import 'package:mohem_flutter_app/api/login_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
@ -219,13 +218,23 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
}
Future<void> _getAvailableBiometrics() async {
final bool canAuthenticateWithBiometrics = await auth.canCheckBiometrics;
final bool canAuthenticate =
canAuthenticateWithBiometrics || await auth.isDeviceSupported();
var availableBiometrics;
try {
_availableBioMetricType = await auth.getAvailableBiometrics();
availableBiometrics = await auth.getAvailableBiometrics();
print(availableBiometrics);
} on PlatformException catch (e) {
// AppToast.showErrorToast(message: e.message);
//AppToast.showErrorToast(message: e.message!);
print(e);
}
if (mounted) setState(() {});
if (!mounted) return;
setState(() {
_availableBioMetricType = availableBiometrics;
});
}
String getVerificationType(int type) {
@ -241,12 +250,13 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
return "";
}
Future<bool> loginWithFaceIDAndBiometrics() async {
IOSAuthMessages iosStrings =
const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
// IOSAuthMessages iosStrings =
// const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
bool authenticated = false;
try {
authenticated = await auth.authenticate(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, biometricOnly: true, iOSAuthStrings: iosStrings);
authenticated = await auth.authenticate(localizedReason: 'Scan your fingerprint to authenticate',);
} on PlatformException catch (e) {
print(e);
Utils.hideLoading(context);
@ -254,9 +264,14 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
}
return authenticated;
}
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) {
bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint)));
bool isDisable =
(_flag == 3 && !checkBiometricIsAvailable(BiometricType.face) ||
_flag == 2 &&
!checkBiometricIsAvailable(BiometricType.fingerprint) &&
_flag == 2 &&
!checkBiometricIsAvailable(BiometricType.strong));
return InkWell(
onTap: isDisable
? null

@ -4,7 +4,6 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart';
import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart';
import 'package:mohem_flutter_app/api/login_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
@ -88,13 +87,23 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
}
Future<void> _getAvailableBiometrics() async {
final bool canAuthenticateWithBiometrics = await auth.canCheckBiometrics;
final bool canAuthenticate =
canAuthenticateWithBiometrics || await auth.isDeviceSupported();
var availableBiometrics;
try {
_availableBioMetricType = await auth.getAvailableBiometrics();
availableBiometrics = await auth.getAvailableBiometrics();
print(availableBiometrics);
} on PlatformException catch (e) {
// AppToast.showErrorToast(message: e.message);
//AppToast.showErrorToast(message: e.message!);
print(e);
}
if (mounted) setState(() {});
if (!mounted) return;
setState(() {
_availableBioMetricType = availableBiometrics;
});
}
// authenticateUser(int type, {int isActive}) {
@ -512,11 +521,11 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
//
Future<bool> loginWithFaceIDAndBiometrics() async {
IOSAuthMessages iosStrings =
const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
// IOSAuthMessages iosStrings =
// const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
bool authenticated = false;
try {
authenticated = await auth.authenticate(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, biometricOnly: true, iOSAuthStrings: iosStrings);
authenticated = await auth.authenticate(localizedReason: 'Scan your fingerprint to authenticate');
} on PlatformException catch (e) {
print(e);
Utils.hideLoading(context);
@ -526,7 +535,13 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
}
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) {
bool isDisable = ((_flag == 3 && !checkBiometricIsAvailable(BiometricType.face)) || (_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint)));
bool isDisable =
(_flag == 3 && !checkBiometricIsAvailable(BiometricType.face) ||
_flag == 2 &&
!checkBiometricIsAvailable(BiometricType.fingerprint) &&
_flag == 2 &&
!checkBiometricIsAvailable(BiometricType.strong));
return InkWell(
onTap: isDisable
? null

@ -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(":");

@ -15,7 +15,7 @@ import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
import 'package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart';
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:month_picker_dialog/month_picker_dialog.dart';
import 'package:pie_chart/pie_chart.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
@ -169,8 +169,8 @@ class _ViewAttendanceState extends State<ViewAttendance> {
initialDate: formattedDate,
firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(),
confirmText: Text(LocaleKeys.confirm.tr()),
cancelText: Text(LocaleKeys.cancel.tr()),
confirmWidget: Text(LocaleKeys.confirm.tr()),
cancelWidget: Text(LocaleKeys.cancel.tr()),
).then(
(selectedDate) {
if (selectedDate != null) {

@ -200,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 {

@ -1,8 +1,6 @@
import 'dart:io';
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
@ -76,7 +74,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
: getOffersList[0].titleEn!.toText22(isBold: true, color: const Color(0xff2B353E)).center,
Html(
data: AppState().isArabic(context) ? getOffersList[0].descriptionAr! : getOffersList[0].descriptionEn ?? "",
onLinkTap: (String? url, RenderContext context, Map<String, String> attributes, _) {
onLinkTap: (String? url,context, Map<String, String> attributes, _) {
launchUrl(Uri.parse(url!));
},
),

@ -44,6 +44,15 @@ class _WorkListScreenState extends State<WorkListScreen> {
icon: "assets/images/miss_swipe.svg",
key: 'HRSSA',
disable: false),
WorkListItemTypeModelData(
value: 0,
name: 'HR-C',
fullName: LocaleKeys.humanResourcec.tr(),
active: false,
color: [Color(0xff32D892), Color(0xff3cb9d5)],
icon: "assets/images/miss_swipe.svg",
key: 'HRCKLTSK',
disable: false),
WorkListItemTypeModelData(
value: 0, name: 'MR', fullName: LocaleKeys.moveOrder.tr(), active: false, color: [Color(0xff58DCFA), Color(0xff3CB9D5)], icon: "assets/images/miss_swipe.svg", key: 'INVMOA', disable: false),
WorkListItemTypeModelData(

@ -24,6 +24,7 @@ import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_mod
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/GetRFCEmployeeList.dart';
import 'package:mohem_flutter_app/models/worklist/get_checklist_notification.dart';
import 'package:mohem_flutter_app/models/worklist/hr/eit_otification_body_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_address_notification_body_list.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
@ -64,6 +65,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
MemberInformationListModel? memberInformationListModel;
List<GetNotificationButtonsList> notificationButtonsList = [];
List<GetActionHistoryList> actionHistoryList = [];
CheckListNotification? getCheckListNotification;
List<GetAttachementList> getAttachmentList = [];
List<GetStampMsNotificationBodyList> getStampMsNotifications = [];
List<GetStampNsNotificationBodyList> getStampNsNotifications = [];
@ -167,6 +170,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (workListData!.iTEMTYPE == "REQAPPRV") {
getPRNotification();
}
if(workListData!.iTEMTYPE =='HRCKLTSK'){
getCheckListNotificationBody();
}
if (controller.hasClients) {
controller.jumpToPage(0);
@ -260,8 +266,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
getAbsenceCollectionNotificationBodyList: getAbsenceCollectionNotificationBodyList,
getContactNotificationBodyList: getContactNotificationBodyList,
getPrNotificationBodyList: getPrNotificationBody,
getCheckListNotification: getCheckListNotification
),
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP")
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP" || workListData!.iTEMTYPE == "HRCKLTSK")
? DetailFragment(workListData, memberInformationListModel)
: RequestFragment(
moNotificationBodyList: getMoNotificationBodyList,
@ -1020,6 +1027,28 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
}
}
void getCheckListNotificationBody() async {
try {
isActionHistoryLoaded = false;
getCheckListNotification =null;
// if (apiCallCount == 0) Utils.showLoading(context);
// apiCallCount++;
getCheckListNotification = await WorkListApiClient().getCheckListNotificationBody(workListData!.nOTIFICATIONID!);
// apiCallCount--;
// if (apiCallCount == 0) {
// Utils.hideLoading(context);
setState(() {
isActionHistoryLoaded = true;
});
// }
} catch (ex) {
// apiCallCount--;
// Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
void getAttachments() async {
try {
isAttachmentLoaded = false;

@ -12,6 +12,7 @@ import 'package:mohem_flutter_app/models/get_po_notification_body_list_model.dar
import 'package:mohem_flutter_app/models/get_pr_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/get_checklist_notification.dart';
import 'package:mohem_flutter_app/models/worklist/hr/eit_otification_body_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_address_notification_body_list.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
@ -33,7 +34,7 @@ class InfoFragment extends StatelessWidget {
GetContactNotificationBodyList? getContactNotificationBodyList;
GetPrNotificationBodyList? getPrNotificationBodyList;
List<GetAddressNotificationBodyList>? getAddressNotificationBodyList = [];
CheckListNotification? getCheckListNotification;
InfoFragment(
{this.workListData,
this.poHeaderList = const <POHeader>[],
@ -46,7 +47,9 @@ class InfoFragment extends StatelessWidget {
this.getAbsenceCollectionNotificationBodyList,
this.getContactNotificationBodyList,
this.getPrNotificationBodyList,
this.getAddressNotificationBodyList});
this.getAddressNotificationBodyList,
this.getCheckListNotification
});
double itemHeight = 0;
double itemWidth = 0;
@ -93,6 +96,7 @@ class InfoFragment extends StatelessWidget {
if (getAbsenceCollectionNotificationBodyList?.isNotEmpty ?? false) getAbsenceCollectionNotificationBodyListWidget(getAbsenceCollectionNotificationBodyList ?? []),
if (getContactNotificationBodyList != null) getContactNotificationBodyListWidget(getContactNotificationBodyList ?? GetContactNotificationBodyList()).objectContainerView(),
if (getAddressNotificationBodyList?.isNotEmpty ?? false) getAddressNotificationBodyListWidget(getAddressNotificationBodyList!),
if (getCheckListNotification !=null ?? false) getCheckListNotificationListWidget(getCheckListNotification),
];
return Container(
width: double.infinity,
@ -545,4 +549,14 @@ class InfoFragment extends StatelessWidget {
itemCount: data.contactNotificationBody!.length),
);
}
Widget getCheckListNotificationListWidget(CheckListNotification? getCheckListNotification){
return Column(
children: [
getCheckListNotification!.pGETCHECKLISTNTFBODY != null ? getCheckListNotification!.pGETCHECKLISTNTFBODY.toString().toText14(color: MyColors.textMixColor).objectContainerView() : Container(),
12.height,
],
);
}
}

@ -5,8 +5,7 @@ import 'package:mohem_flutter_app/classes/colors.dart';
extension WithContainer on Widget {
Widget get insideContainer => Container(
color: Colors.white,
padding:
const EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: this,
);
}
@ -76,8 +75,7 @@ class DefaultButton extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
if (iconData != null) Icon(iconData, color: textColor),
if (svgIcon != null)
SvgPicture.asset(svgIcon ?? "", color: textColor),
if (svgIcon != null) SvgPicture.asset(svgIcon ?? "", color: textColor),
if (!isTextExpanded)
Padding(
padding: EdgeInsets.only(

@ -47,7 +47,7 @@ class ConfirmDialog extends StatelessWidget {
)
],
),
message.toText16(color: MyColors.lightGrayColor),
message.toText16(color: MyColors.lightGrayColor, maxlines: 2),
28.height,
DefaultButton(
okTitle ?? LocaleKeys.ok.tr(),

@ -43,9 +43,9 @@ dependencies:
permission_handler: ^10.2.0
flutter_svg: any
sizer: ^2.0.15
local_auth: ^1.1.9
local_auth: ^2.1.8
fluttertoast: ^8.0.8
syncfusion_flutter_calendar: ^19.4.48
syncfusion_flutter_calendar: any
# flutter_calendar_carousel: ^2.1.0
pie_chart: ^5.1.0
shared_preferences: ^2.0.12
@ -58,8 +58,8 @@ dependencies:
image_picker: ^0.8.5+3
file_picker: ^4.6.1
geolocator: ^9.0.2
month_year_picker: ^0.2.0+1
month_picker_dialog_2: 0.5.5
month_year_picker: ^0.3.0+1
month_picker_dialog: ^2.0.0
open_file: ^3.2.1
wifi_iot: ^0.3.18
flutter_html: ^3.0.0-alpha.6
@ -100,7 +100,7 @@ dependencies:
video_player: ^2.5.1
just_audio: ^0.9.30
safe_device: ^1.1.2
flutter_layout_grid: ^2.0.1
flutter_layout_grid: ^2.0.5
#Huawei Dependencies
huawei_hmsavailability: ^6.6.0+300

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 KiB

Loading…
Cancel
Save