Merge branch 'master_mohemm_flutter' into mohemm_HMG_flutter_upgrade

# Conflicts:
#	lib/app_state/app_state.dart
#	lib/classes/consts.dart
#	lib/ui/landing/dashboard_screen.dart
#	pubspec.yaml
mohemm_HMG_flutter_upgrade
haroon amjad 3 months ago
commit f6df04c432

@ -1,5 +1,6 @@
{ {
"cSpell.words": [ "cSpell.words": [
"MPLOYEEIMAGE" "MPLOYEEIMAGE"
] ],
"java.configuration.updateBuildConfiguration": "disabled"
} }

@ -0,0 +1,57 @@
{
"agcgw_all":{
"CN":"connect-drcn.dbankcloud.cn",
"CN_back":"connect-drcn.hispace.hicloud.com",
"DE":"connect-dre.dbankcloud.cn",
"DE_back":"connect-dre.hispace.hicloud.com",
"RU":"connect-drru.hispace.dbankcloud.ru",
"RU_back":"connect-drru.hispace.dbankcloud.cn",
"SG":"connect-dra.dbankcloud.cn",
"SG_back":"connect-dra.hispace.hicloud.com"
},
"websocketgw_all":{
"CN":"connect-ws-drcn.hispace.dbankcloud.cn",
"CN_back":"connect-ws-drcn.hispace.dbankcloud.com",
"DE":"connect-ws-dre.hispace.dbankcloud.cn",
"DE_back":"connect-ws-dre.hispace.dbankcloud.com",
"RU":"connect-ws-drru.hispace.dbankcloud.ru",
"RU_back":"connect-ws-drru.hispace.dbankcloud.cn",
"SG":"connect-ws-dra.hispace.dbankcloud.cn",
"SG_back":"connect-ws-dra.hispace.dbankcloud.com"
},
"client":{
"cp_id":"2640966000002322881",
"product_id":"737518067793559971",
"client_id":"715996003571874624",
"client_secret":"B5B89A56A53847C6BB9D216A8747E75952760DF9A8232239D8744CD847A8FFDA",
"project_id":"737518067793559971",
"app_id":"104737117",
"api_key":"DAEDACKDrYgyco9mjPV9ZUjCSh1kCr/GBV0nseHH0z2mnxlZ41RksOKmyTi+PUTwmGEPK+VxCup4F9oUf4VbDnCsjB7aNBShYcjR+g==",
"package_name":"hmg.cloudSolutions.mohem"
},
"oauth_client":{
"client_id":"104737117",
"client_type":1
},
"app_info":{
"app_id":"104737117",
"package_name":"hmg.cloudSolutions.mohem"
},
"configuration_version":"3.0",
"appInfos":[
{
"package_name":"hmg.cloudSolutions.mohem",
"client":{
"app_id":"104737117"
},
"app_info":{
"package_name":"hmg.cloudSolutions.mohem",
"app_id":"104737117"
},
"oauth_client":{
"client_type":1,
"client_id":"104737117"
}
}
]
}

@ -1,25 +1,12 @@
def localProperties = new Properties() plugins {
def localPropertiesFile = rootProject.file('local.properties') id "com.android.application"
if (localPropertiesFile.exists()) { id "kotlin-android"
localPropertiesFile.withReader('UTF-8') { reader -> id "com.google.gms.google-services"
localProperties.load(reader) id "dev.flutter.flutter-gradle-plugin"
} id "com.google.firebase.crashlytics"
} id "com.huawei.agconnect"
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
} }
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def keystoreProperties = new Properties() def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties') def keystorePropertiesFile = rootProject.file('key.properties')
@ -27,18 +14,17 @@ if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} }
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.huawei.agconnect'
android { android {
compileSdkVersion 34 namespace 'hmg.cloudSolutions.mohem'
compileSdk 36 // Changed from 36 to a supported version
ndkVersion '28.2.13676358'
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
coreLibraryDesugaringEnabled true
} }
kotlinOptions { kotlinOptions {
@ -53,9 +39,15 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.cloudsolutions.alhabibmohemm" applicationId "com.cloudsolutions.alhabibmohemm"
minSdkVersion 28 minSdkVersion 28
targetSdkVersion 34 // targetSdk = flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger() targetSdk 35
versionName flutterVersionName versionCode flutter.versionCode
versionName flutter.versionName
multiDexEnabled true
}
buildFeatures{
buildConfig true
} }
signingConfigs { signingConfigs {
@ -84,5 +76,9 @@ flutter {
} }
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.20"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
implementation 'com.huawei.hms:push:6.11.0.300'
} }

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mohem_flutter_app"> >
<!-- Flutter needs it to communicate with the running application <!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->

@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.mohem_flutter_app"> >
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" /> <uses-permission android:name="android.permission.USE_BIOMETRIC" />

@ -1,4 +1,4 @@
package com.mohem_flutter_app package hmg.cloudSolutions.mohem
//import io.flutter.embedding.android.FlutterActivity //import io.flutter.embedding.android.FlutterActivity
// //

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mohem_flutter_app"> >
<!-- Flutter needs it to communicate with the running application <!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->

@ -1,5 +1,4 @@
buildscript { buildscript {
ext.kotlin_version = '1.9.10'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
@ -7,11 +6,10 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.1.3' classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
classpath 'com.google.gms:google-services:4.3.8' classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.huawei.agconnect:agcp:1.8.0.300' classpath 'com.huawei.agconnect:agcp:1.9.1.304'
classpath "com.android.tools:r8:8.2.33"
} }
} }
@ -21,14 +19,66 @@ allprojects {
mavenCentral() mavenCentral()
maven { url 'https://developer.huawei.com/repo/' } maven { url 'https://developer.huawei.com/repo/' }
} }
// Exclude old BouncyCastle globally to avoid duplicate classes
configurations.all {
exclude group: 'org.bouncycastle', module: 'bcprov-jdk16'
}
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "21"
}
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
buildFeatures {
if (buildConfig == null) {
buildConfig true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
}
}
// Force Java 17 for all JavaCompile tasks in all subprojects (including plugins)
project.tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
// Force Kotlin JVM target for all subprojects
project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "21"
}
}
}
}
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
tasks.register("clean", Delete) { tasks.register("clean", Delete) {
delete rootProject.buildDir delete rootProject.layout.buildDirectory
} }

@ -1,4 +1,6 @@
org.gradle.jvmargs=-Xmx2048M org.gradle.jvmargs=-Xmx2048M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
org.gradle.java.home=/Users/user/Library/Java/JavaVirtualMachines/jbr-17.0.12/Contents/Home/ apmsInstrumentationEnabled=false
#org.gradle.java.home=/Users/amirs/Library/Java/JavaVirtualMachines/jbr-17.0.12/Contents/Home/

@ -1,6 +1,6 @@
#Thu Mar 06 11:40:30 AST 2025 #Tue Jul 08 11:08:34 AST 2025
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

@ -1,11 +1,56 @@
include ':app' pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists() includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk") repositories {
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" google()
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" mavenCentral()
gradlePluginPortal()
maven { url 'https://developer.huawei.com/repo/' }
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == "com.huawei.agconnect") {
useModule("com.huawei.agconnect:agcp:1.9.1.304")
}
}
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.11.0' apply false
id("org.jetbrains.kotlin.android") version "2.2.0" apply false
id("com.google.gms.google-services") version "4.4.3" apply false
id("com.google.firebase.crashlytics") version "3.0.4" apply false
id('org.gradle.toolchains.foojay-resolver-convention') version '0.9.0' apply false
id "com.huawei.agconnect" version "1.9.1.304" apply false
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url 'https://developer.huawei.com/repo/' }
maven {
url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local"
}
}
}
include ":app"

@ -0,0 +1,17 @@
<svg width="90" height="47" viewBox="0 0 90 47" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.6637 23.3332H6.12992C4.29216 23.3332 3.22754 22.3002 3.22754 20.584V12.585H5.6329V19.3679C5.6329 20.5007 5.92436 21.102 7.69463 21.102H14.6668V23.3347L14.6637 23.3332Z" fill="#5D5E5E"/>
<path d="M15.7284 26.0988H13.5991V24.1653H15.7284V26.0988ZM19.1293 20.1166C19.1293 20.9993 18.8716 21.7331 18.373 22.3166C17.8054 22.9998 17.0154 23.3332 16.0198 23.3332H13.9765V21.1005H15.5044C16.3113 21.1005 16.7239 20.5498 16.7239 19.4677V15.7837H19.1293V20.1166ZM18.9744 26.0988H16.8283V24.1653H18.9744V26.0988Z" fill="#5D5E5E"/>
<path d="M23.2848 23.3332H20.8794V12.5835H23.2848V23.3332Z" fill="#5D5E5E"/>
<path d="M32.285 23.3335H29.6219C29.2261 25.1673 27.6813 26.0827 24.9492 26.0827V24.1998C26.5293 24.1998 27.3193 23.4659 27.3193 21.9998V15.7839H29.7415V21.1008H32.2834V23.3335H32.285ZM29.5881 14.5172H27.4589V12.6001H29.5881V14.5172Z" fill="#5D5E5E"/>
<path d="M41.868 20.9665C41.868 23.1992 40.3217 24.7666 37.9179 24.7666C36.4575 24.7666 35.3592 24.2828 34.655 23.3332H31.564V21.1005H33.9509C33.9509 18.7174 35.3592 17.2007 37.832 17.2007C40.3049 17.2007 41.868 18.6832 41.868 20.9665ZM39.4811 21.0499C39.4811 19.7326 38.9657 19.0672 37.9532 19.0672H37.7814C36.9055 19.0672 36.3041 19.8502 36.3041 20.9501C36.3041 22.0501 36.8886 22.8673 37.9179 22.8673C38.8629 22.8673 39.4811 22.1335 39.4811 21.0514V21.0499Z" fill="#5D5E5E"/>
<path d="M79.3108 4.83447H54.3276C50.4719 4.83447 47.3462 7.86731 47.3462 11.6085V35.8498C47.3462 39.591 50.4719 42.6238 54.3276 42.6238H79.3108C83.1665 42.6238 86.2921 39.591 86.2921 35.8498V11.6085C86.2921 7.86731 83.1665 4.83447 79.3108 4.83447Z" fill="#ED1C2B"/>
<path d="M81.526 29.9599L81.5045 37.6687L71.1253 37.6419C70.1972 37.6419 69.5575 36.7473 69.5145 35.3794C69.5161 33.233 68.858 31.1209 67.5586 29.3824C65.1119 26.1077 61.6603 23.485 57.1748 21.5337C56.0672 21.0529 54.8645 20.8073 53.6527 20.8117C52.697 20.7522 52.0542 19.6939 52.0542 18.3662L52.0573 10.6812L62.2908 10.6782C63.2158 10.6782 63.9491 11.6026 63.992 12.9675C63.9905 14.4575 64.4108 15.9251 65.2453 17.1754C68.0403 21.3699 71.6146 24.7309 76.3885 26.8147C77.4946 27.297 78.6988 27.5367 79.9122 27.5441C80.8679 27.6036 81.526 28.6322 81.526 29.9599Z" fill="white"/>
<path d="M64.0242 28.7545C64.015 28.8631 64.0104 28.9733 64.0104 29.0864L64.0012 34.4211V35.3425C63.9537 36.7104 63.1867 37.6585 62.2632 37.6585L54.5332 37.6273C53.5146 37.6273 52.068 37.6362 52.068 37.6362L52.0542 29.8961C52.0542 28.5714 52.6985 27.5176 53.6573 27.4565L56.5274 27.461H57.6273H62.5884C63.2557 27.461 63.8233 28.0028 64.0258 28.7545H64.0242Z" fill="white"/>
<path d="M81.5779 8.74026L81.5641 18.3826C81.5641 19.7103 80.9444 20.8013 79.9887 20.8594L77.0832 20.852L76.106 20.849C76.0385 20.8371 75.9695 20.8326 75.9005 20.8326H70.9486C70.2936 20.8326 69.7337 20.3102 69.522 19.5793C69.5358 19.4602 69.5465 19.3367 69.5496 19.2102V13.0241C69.5925 11.6517 70.3626 10.6842 71.283 10.6842L78.3534 10.6902C80.4918 10.5815 81.5748 8.73877 81.5748 8.73877L81.5779 8.74026Z" fill="white"/>
<path d="M9.65051 32.5902C9.62289 31.8728 9.59528 31.005 9.59528 30.1387H9.56767C9.37591 30.8993 9.12126 31.7492 8.88349 32.4488L8.13488 34.7768H7.04879L6.39223 32.4667C6.19127 31.7671 5.98111 30.9172 5.83537 30.1387H5.81696C5.78015 30.9439 5.75254 31.8653 5.70651 32.6081L5.5976 34.8735H4.31055L4.70326 28.9077H6.55483L7.15617 30.8993C7.34793 31.5899 7.53968 32.3342 7.67621 33.0323H7.70382C7.87717 32.3416 8.08733 31.5542 8.28829 30.8904L8.94485 28.9077H10.7596L11.0971 34.8735H9.73794L9.64744 32.5902H9.65051Z" fill="#5D5E5E"/>
<path d="M13.7557 33.3433L13.3185 34.875H11.8765L13.7557 28.9092H15.5796L17.4864 34.875H15.9907L15.5167 33.3433H13.7557ZM15.3158 32.3342L14.9323 31.069C14.8233 30.7147 14.7129 30.2726 14.6224 29.9184H14.604C14.5119 30.2726 14.4214 30.7236 14.3217 31.069L13.9566 32.3342H15.3158Z" fill="#5D5E5E"/>
<path d="M18.8135 34.1486L21.814 30.0583V30.0226H18.8135V28.9077H23.6641V29.6862L20.7295 33.7229V33.7586H23.7116V34.8735H18.8135V34.1471V34.1486Z" fill="#5D5E5E"/>
<path d="M26.9051 33.3433L26.4679 34.875H25.0259L26.9051 28.9092H28.729L30.6358 34.875H29.1401L28.6661 33.3433H26.9051ZM28.4652 32.3342L28.0817 31.069C27.9712 30.7147 27.8623 30.2726 27.7718 29.9184H27.7534C27.6613 30.2726 27.5708 30.7236 27.4711 31.069L27.106 32.3342H28.4652Z" fill="#5D5E5E"/>
<path d="M32.1961 34.875V32.4324L30.2524 28.9092H31.8402L32.4691 30.3441C32.6609 30.7772 32.7882 31.0972 32.9431 31.4857H32.9615C33.0981 31.1136 33.2438 30.7683 33.4263 30.3441L34.0461 28.9092H35.6062L33.5813 32.3877V34.875H32.1945H32.1961Z" fill="#5D5E5E"/>
<path d="M37.0496 33.3433L36.6124 34.875H35.1704L37.0496 28.9092H38.8736L40.7804 34.875H39.2847L38.8107 33.3433H37.0496ZM38.6097 32.3342L38.2262 31.069C38.1157 30.7147 38.0068 30.2726 37.9163 29.9184H37.8979C37.8059 30.2726 37.7154 30.7236 37.6157 31.069L37.2506 32.3342H38.6097Z" fill="#5D5E5E"/>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

@ -612,5 +612,10 @@
"searchByUserName": "البحث بواسطة اسم المستخدم", "searchByUserName": "البحث بواسطة اسم المستخدم",
"shareScreen": "مشاركة الشاشة", "shareScreen": "مشاركة الشاشة",
"start":"يبدأ", "start":"يبدأ",
"about":"عن" "about":"عن",
"explore": "يستكشف",
"mazaya": "مازيا",
"benefits": "فوائد",
"mazayaDesc": "اكتشف الخصومات والعروض الخاصة المتاحة للموظفين",
"viewallofferMazaya" : "أعرض كل المزايا"
} }

@ -612,5 +612,11 @@
"bonusQty": "Bonus Qty.", "bonusQty": "Bonus Qty.",
"balQty": "Bal. Qty.", "balQty": "Bal. Qty.",
"start":"Start", "start":"Start",
"about":"About" "about":"About",
"explore": "Explore",
"mazaya": "MAZAYA",
"benefits": "Benefits",
"mazayaDesc": "Discover special Discounts and offers available to Employees",
"viewallofferMazaya" : "View All Offers"
} }

@ -242,6 +242,23 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
}; };
6C6E76E4FB19FAF11C24005D /* [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;
};
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1; alwaysOutOfDate = 1;
@ -274,23 +291,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
EF29CE25BB57F5AA48CE1136 /* [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;
};
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */

@ -26,6 +26,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion> <MacroExpansion>
<BuildableReference <BuildableReference
@ -43,11 +44,13 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0" launchStyle = "0"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES" debugDocumentVersioning = "YES"
debugServiceExtension = "internal" debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES"> allowLocationSimulation = "YES">
<BuildableProductRunnable <BuildableProductRunnable
runnableDebuggingMode = "0"> runnableDebuggingMode = "0">

@ -28,7 +28,7 @@ class ChatApiClient {
factory ChatApiClient() => _instance; factory ChatApiClient() => _instance;
Future<user.UserAutoLoginModel> getUserLoginToken() async { Future<user.UserAutoLoginModel> getUserLoginToken() async {
user.UserAutoLoginModel userLoginResponse = user.UserAutoLoginModel(); user.UserAutoLoginModel userLoginResponse = user.UserAutoLoginModel();
String? deviceToken = AppState().getIsHuawei ? AppState().getHuaweiPushToken : AppState().getDeviceToken; String? deviceToken = AppState().getIsHuawei ? AppState().getHuaweiPushToken : AppState().getDeviceToken;
Response response = await ApiClient().postJsonForResponse( Response response = await ApiClient().postJsonForResponse(
"${ApiConsts.chatLoginTokenUrl}externaluserlogin", "${ApiConsts.chatLoginTokenUrl}externaluserlogin",

@ -1,6 +1,10 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:http/http.dart' as http;
import 'package:device_info_plus/device_info_plus.dart';
import 'package:mohem_flutter_app/api/api_client.dart'; import 'package:mohem_flutter_app/api/api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/consts.dart'; import 'package:mohem_flutter_app/classes/consts.dart';
@ -12,7 +16,9 @@ import 'package:mohem_flutter_app/models/dashboard/list_menu.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart'; import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/itg/itg_main_response.dart'; import 'package:mohem_flutter_app/models/itg/itg_main_response.dart';
import 'package:mohem_flutter_app/models/itg/itg_response_model.dart'; import 'package:mohem_flutter_app/models/itg/itg_response_model.dart';
import 'package:platform_device_id/platform_device_id.dart'; import 'package:mohem_flutter_app/models/sso_auth_model.dart';
import 'package:platform_device_id_plus/platform_device_id.dart';
// import 'package:platform_device_id/platform_device_id.dart';
// import 'package:platform_device_id/platform_device_id.dart'; // import 'package:platform_device_id/platform_device_id.dart';
import 'package:uuid/uuid.dart'; import 'package:uuid/uuid.dart';
@ -153,6 +159,59 @@ class DashboardApiClient {
); );
} }
Future<GenericResponseModel?> getTicketBookingRedirection() async {
String url = "${ApiConsts.erpRest}GET_PORTAL_REDIRECTION";
Map<String, dynamic> postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
},
url,
postParams,
);
}
Future<SSOAuthModel?> getBookingSSOAuthRedirection({required String clientID}) async {
String url = "${ApiConsts.ssoAuthRedirection}?grantType=mohemm";
//https://sso-uat.hmg.com/api/auth/connect?grantType=mohemm'
// Map<String, dynamic> postParams = {"P_USER_NAME": AppState().memberInformationList?.eMPLOYEENUMBER};
Map<String, dynamic> postParams = {
"ClientId": clientID,
// "ClientId": "a9f4d1a0596d4aea8f830992ec4bdac1",
"PersonId": AppState().memberInformationList?.eMPLOYEENUMBER,
"Username": AppState().memberInformationList?.eMPLOYEENUMBER,
"Language": "US",
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
SSOAuthModel responseData = SSOAuthModel.fromJson(json);
return responseData;
},
url,
postParams,
);
}
Future<dynamic> getBookingSSOFinalRedirection({required String token}) async {
token = "eyJhbGciOiJSUzI1NiIsImtpZCI6IjhjZTE2OWM0YjIwYjQ2ZWM5YTQyOTU3Y2ZhODUzNzQ1IiwidHlwIjoiSldUIn0.eyJ0ZW5hbnRfaWQiOiJhOWY0ZDFhMDU5NmQ0YWVhOGY4MzA5OTJlYzRiZGFjMSIsImVpZCI6IjExNzkzMCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6Ijk2MDI0OGM1NzA3YzQ3MmFhYTEzM2I1N2ZhODE1ZmVhIiwibGFuZ3VhZ2UiOiJVUyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL2VtYWlsYWRkcmVzcyI6IjExNzkzMEBobWcuY29tIiwiZXhwIjoxNzgyNDc1NzY5LCJpc3MiOiJodHRwczovL3Nzby11YXQuaG1nLmNvbSIsImF1ZCI6ImE5ZjRkMWEwNTk2ZDRhZWE4ZjgzMDk5MmVjNGJkYWMxIn0.rJcLVsG8D0XECyLERCTD2uqGeWyvp-OBVGE9uL2qKrX4etFUHgdFt_5kYF6edFTtGy-0PIZadHDmv7e-IOhVWHm5HVMClaukiXoRXR8cDN8XA1wfme3Kd-U5PXN-IRh49AyRTzLO0rYNPvH81ScosWGlsFSkOvA-0hJNa2adHdtvgNvB8wJshSU5p7sAmF8mjdDY6aInG19etu2iEuUDwHHA4ZY_ts4hboHo8fE392hFaYGonExoD7bpW5RMx5xKWeRCmWpG_PK8Aw_z1jGzdB9PANus4pteRGuln1J-kmo2lQC9pVrSyZATAKp1HfgfyZ_vUhaHEfM69cMWaCslJQ";
var request = http.MultipartRequest('POST', Uri.parse('https://ek.techmaster.in/SSO/HMG'));
request.fields.addAll({'JWTToken': token});
// request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 302) {
print("================== post ==========");
var res = await response.stream.bytesToString();
return response.headers["location"];
} else {
print(response.reasonPhrase);
}
}
//Mark Attendance //Mark Attendance
Future<GenericResponseModel?> markAttendance({ Future<GenericResponseModel?> markAttendance({
String lat = "0", String lat = "0",
@ -165,10 +224,17 @@ class DashboardApiClient {
}) async { }) async {
String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC"; String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC";
var uuid = Uuid(); var uuid = Uuid();
String? deviceId = "";
// Generate a v4 (random) id // Generate a v4 (random) id
if (Platform.isAndroid) {
AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
deviceId = androidInfo.id;
} else if (Platform.isIOS) {
IosDeviceInfo iosInfo = await DeviceInfoPlugin().iosInfo;
deviceId = iosInfo.identifierForVendor;
}
Map<String, dynamic> postParams = { Map<String, dynamic> postParams = {
"UID": await PlatformDeviceId.getDeviceId, //uuid.v4(), //Mobile Id "UID": deviceId, //uuid.v4(), //Mobile Id
// "UID": uuid.v4(), //Mobile Id // "UID": uuid.v4(), //Mobile Id
"Latitude": lat, "Latitude": lat,
"Longitude": long, "Longitude": long,

@ -90,7 +90,7 @@ class AppState {
String get getHuaweiPushToken => _huaweiPushToken; String get getHuaweiPushToken => _huaweiPushToken;
final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 33, versionID: 9.0, mobileType: Platform.isAndroid ? "android" : "ios"); final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 33, versionID: 9.2, mobileType: Platform.isAndroid ? "android" : "ios");
void setPostParamsInitConfig() { void setPostParamsInitConfig() {
isAuthenticated = false; isAuthenticated = false;

@ -66,4 +66,5 @@ class MyColors {
static const Color darkGrey3BColor = Color(0xff3B3B3B); static const Color darkGrey3BColor = Color(0xff3B3B3B);
static const Color lightGreyIconColor = Color(0xff919191); static const Color lightGreyIconColor = Color(0xff919191);
static const Color selectedBorderColor = Color(0xff37A4BE); static const Color selectedBorderColor = Color(0xff37A4BE);
static const Color mazayaRedColor = Color(0xffED1C2B);
} }

@ -11,10 +11,10 @@ class ApiConsts {
static String baseUrl = "https://mohemm.hmg.com"; // New Live server static String baseUrl = "https://mohemm.hmg.com"; // New Live server
// //
// static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
// static String baseUrl = "http://10.20.200.111:1010/"; // static String baseUrl = "http://10.20.200.111:1010/";
// static String baseUrl = "https://webservices.hmg.com"; // PreProd // static String baseUrl = "https://webservices.hmg.com"; // PreProd
// static String baseUrl = "https://mohemm.hmg.com"; // static String baseUrl = "https://mohemm.hmg.com";
// static String baseUrl = "https://hmgwebservices.com"; // Live server // static String baseUrl = "https://hmgwebservices.com"; // Live server
@ -27,6 +27,8 @@ class ApiConsts {
static String user = baseUrlServices + "api/User/"; static String user = baseUrlServices + "api/User/";
static String cocRest = baseUrlServices + "COCWS.svc/REST/"; static String cocRest = baseUrlServices + "COCWS.svc/REST/";
static String ssoAuthRedirection = "https://sso-uat.hmg.com/api/auth/connect";
//Chat //Chat
static String chatServerBaseUrl = "https://apiderichat.hmg.com/"; static String chatServerBaseUrl = "https://apiderichat.hmg.com/";
static String chatServerBaseApiUrl = chatServerBaseUrl + "api/"; static String chatServerBaseApiUrl = chatServerBaseUrl + "api/";

@ -0,0 +1,33 @@
import 'dart:developer';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class MyInAppBrowser extends InAppBrowser {
final Function onExitCallback;
final Function(String) onLoadStartCallback;
MyInAppBrowser({
required this.onExitCallback,
required this.onLoadStartCallback,
});
@override
Future onBrowserCreated() async {
log("\n\nBrowser Created!\n\n");
}
@override
Future onLoadStart(Uri? url) async {
onLoadStartCallback(url.toString());
}
@override
Future onLoadStop(Uri? url) async {
log("\n\nStopped $url\n\n");
}
@override
void onLoadError(Uri? url, int code, String message) {
log("Can't load $url.. Error: $message");
}
}

@ -34,8 +34,8 @@ class AppNotifications {
if (Platform.isIOS) { if (Platform.isIOS) {
await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(alert: true, badge: true, sound: true); await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(alert: true, badge: true, sound: true);
} else if (Platform.isAndroid) { } else if (Platform.isAndroid) {
AndroidFlutterLocalNotificationsPlugin? androidImplementation = flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>(); AndroidFlutterLocalNotificationsPlugin? androidImplementation = flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>();
bool? granted = await androidImplementation?.requestPermission(); bool? granted = await androidImplementation?.requestNotificationsPermission();
if (granted == false) { if (granted == false) {
if (kDebugMode) { if (kDebugMode) {
print("-------------------- Permission Granted ------------------------"); print("-------------------- Permission Granted ------------------------");

@ -31,13 +31,14 @@ class Utils {
static void showToast(String message, {bool longDuration = true}) { static void showToast(String message, {bool longDuration = true}) {
Fluttertoast.showToast( Fluttertoast.showToast(
msg: message, msg: message,
toastLength: longDuration ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT, toastLength: longDuration ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM, gravity: ToastGravity.BOTTOM,
timeInSecForIosWeb: 1, timeInSecForIosWeb: 1,
backgroundColor: Colors.black54, backgroundColor: Colors.black54,
textColor: Colors.white, textColor: Colors.white,
fontSize: 13.0); fontSize: 13.0,
);
} }
static dynamic getNotNullValue(List<dynamic> list, int index) { static dynamic getNotNullValue(List<dynamic> list, int index) {
@ -63,12 +64,7 @@ class Utils {
static void showLoading(BuildContext context) { static void showLoading(BuildContext context) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
_isLoadingVisible = true; _isLoadingVisible = true;
showDialog( showDialog(context: context, barrierColor: Colors.black.withOpacity(0.5), useRootNavigator: false, builder: (BuildContext context) => LoadingDialog()).then((value) {
context: context,
barrierColor: Colors.black.withOpacity(0.5),
useRootNavigator: false,
builder: (BuildContext context) => LoadingDialog(),
).then((value) {
_isLoadingVisible = false; _isLoadingVisible = false;
}); });
}); });
@ -118,13 +114,14 @@ class Utils {
showDialog( showDialog(
barrierDismissible: false, barrierDismissible: false,
context: cxt, context: cxt,
builder: (cxt) => ConfirmDialog( builder:
message: errorMessage, (cxt) => ConfirmDialog(
onTap: () { message: errorMessage,
Navigator.pushNamedAndRemoveUntil(cxt, AppRoutes.login, (Route<dynamic> route) => false); onTap: () {
}, Navigator.pushNamedAndRemoveUntil(cxt, AppRoutes.login, (Route<dynamic> route) => false);
onCloseTap: () {}, },
), onCloseTap: () {},
),
); );
} else { } else {
if (cxt != null) { if (cxt != null) {
@ -138,33 +135,18 @@ class Utils {
} }
static Future showErrorDialog({required BuildContext context, required VoidCallback onOkTapped, required String message}) async { static Future showErrorDialog({required BuildContext context, required VoidCallback onOkTapped, required String message}) async {
return showDialog( return showDialog(context: context, builder: (BuildContext context) => ConfirmDialog(message: message, onTap: onOkTapped));
context: context,
builder: (BuildContext context) => ConfirmDialog(
message: message,
onTap: onOkTapped,
),
);
} }
static void confirmDialog(cxt, String message, {VoidCallback? onTap}) { static void confirmDialog(cxt, String message, {VoidCallback? onTap}) {
showDialog( showDialog(context: cxt, builder: (BuildContext cxt) => ConfirmDialog(message: message, onTap: onTap));
context: cxt,
builder: (BuildContext cxt) => ConfirmDialog(
message: message,
onTap: onTap,
),
);
} }
static Widget getNoDataWidget(BuildContext context) { static Widget getNoDataWidget(BuildContext context) {
return Column( return Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [SvgPicture.asset('assets/images/not_found.svg', width: 110.0, height: 110.0), LocaleKeys.noDataAvailable.tr().toText16().paddingOnly(top: 15)],
SvgPicture.asset('assets/images/not_found.svg', width: 110.0, height: 110.0),
LocaleKeys.noDataAvailable.tr().toText16().paddingOnly(top: 15),
],
).center; ).center;
} }
@ -172,10 +154,7 @@ class Utils {
return Column( return Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [SvgPicture.asset('assets/images/not_found.svg', width: 110.0, height: 110.0), LocaleKeys.noDataAvailable.tr().toText16().paddingOnly(top: 15)],
SvgPicture.asset('assets/images/not_found.svg', width: 110.0, height: 110.0),
LocaleKeys.noDataAvailable.tr().toText16().paddingOnly(top: 15),
],
).center; ).center;
} }
@ -209,17 +188,7 @@ class Utils {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [6.height, alignCenter ? text.toText12().center : text.toText12(), 5.height, if (showDivider) const Divider(height: 1, color: Color(0xff2E303A), thickness: 1)],
6.height,
alignCenter ? text.toText12().center : text.toText12(),
5.height,
if (showDivider)
const Divider(
height: 1,
color: Color(0xff2E303A),
thickness: 1,
)
],
); );
} }
@ -227,17 +196,15 @@ class Utils {
return BoxDecoration( return BoxDecoration(
color: background, color: background,
border: Border.all( border: Border.all(
width: 1, // width: 1, //
color: background // <--- border width here color: background, // <--- border width here
), ),
borderRadius: BorderRadius.circular(radius), borderRadius: BorderRadius.circular(radius),
); );
} }
static Widget mHeight(double h) { static Widget mHeight(double h) {
return Container( return Container(height: h);
height: h,
);
} }
static Widget mDivider(Color color) { static Widget mDivider(Color color) {
@ -352,20 +319,21 @@ class Utils {
if (!Platform.isIOS) { if (!Platform.isIOS) {
await showCupertinoModalPopup( await showCupertinoModalPopup(
context: context, context: context,
builder: (BuildContext cxt) => Container( builder:
height: 250, (BuildContext cxt) => Container(
color: Colors.white, height: 250,
child: CupertinoDatePicker( color: Colors.white,
backgroundColor: Colors.white, child: CupertinoDatePicker(
mode: CupertinoDatePickerMode.date, backgroundColor: Colors.white,
onDateTimeChanged: (DateTime value) { mode: CupertinoDatePickerMode.date,
if (value != null && value != selectedDate) { onDateTimeChanged: (DateTime value) {
selectedDate = value; if (value != null && value != selectedDate) {
} selectedDate = value;
}, }
initialDateTime: selectedDate, },
), initialDateTime: selectedDate,
), ),
),
); );
} else { } else {
DateTime? picked = await showDatePicker(context: context, initialDate: selectedDate, initialEntryMode: DatePickerEntryMode.calendarOnly, firstDate: DateTime(2015, 8), lastDate: DateTime(2101)); DateTime? picked = await showDatePicker(context: context, initialDate: selectedDate, initialEntryMode: DatePickerEntryMode.calendarOnly, firstDate: DateTime(2015, 8), lastDate: DateTime(2101));
@ -377,19 +345,25 @@ class Utils {
} }
static void readNFc({required Function(String) onRead}) { static void readNFc({required Function(String) onRead}) {
NfcManager.instance.startSession(onDiscovered: (NfcTag tag) async { NfcManager.instance
MifareUltralight f; .startSession(
if (Platform.isAndroid) { onDiscovered: (NfcTag tag) async {
f = MifareUltralight(tag: tag, identifier: tag.data["nfca"]["identifier"], type: 2, maxTransceiveLength: 252, timeout: 22); MifareUltralight f;
} else { if (Platform.isAndroid) {
f = MifareUltralight(tag: tag, identifier: tag.data["mifare"]["identifier"], type: 2, maxTransceiveLength: 252, timeout: 22); print(tag);
} f = MifareUltralight(tag: tag, identifier: tag.data["nfca"]["identifier"], type: 2, maxTransceiveLength: 252, timeout: 22);
String identifier = f.identifier.map((e) => e.toRadixString(16).padLeft(2, '0')).join(''); } else {
NfcManager.instance.stopSession(); f = MifareUltralight(tag: tag, identifier: tag.data["mifare"]["identifier"], type: 2, maxTransceiveLength: 252, timeout: 22);
onRead(identifier); }
}).catchError((err) { String identifier = f.identifier.map((e) => e.toRadixString(16).padLeft(2, '0')).join('');
print(err); NfcManager.instance.stopSession();
}); onRead(identifier);
},
pollingOptions: {NfcPollingOption.iso14443},
)
.catchError((err) {
print(err);
});
} }
//HUAWEI DECISION MAKING //HUAWEI DECISION MAKING

@ -67,6 +67,7 @@ class OtpDialog {
// projectProvider = Provider.of(context); // projectProvider = Provider.of(context);
return Dialog( return Dialog(
backgroundColor: Colors.white, backgroundColor: Colors.white,
surfaceTintColor: Colors.transparent,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
insetPadding: const EdgeInsets.only(left: 21, right: 21), insetPadding: const EdgeInsets.only(left: 21, right: 21),
child: StatefulBuilder(builder: (context, setState) { child: StatefulBuilder(builder: (context, setState) {
@ -202,8 +203,13 @@ class OtpDialog {
), ),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderRadius: const BorderRadius.all(Radius.circular(10.0)), borderRadius: const BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).colorScheme.error), borderSide: BorderSide(color: Colors.red),
), ),
// focusedErrorBorder: OutlineInputBorder(
// borderRadius: const BorderRadius.all(Radius.circular(10.0)),
// borderSide: BorderSide(color: Colors.red),
// // borderSide: BorderSide(color: Theme.of(context).colorScheme.error),
// ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderRadius: const BorderRadius.all(Radius.circular(10.0)), borderRadius: const BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).colorScheme.error), borderSide: BorderSide(color: Theme.of(context).colorScheme.error),

@ -1,6 +1,6 @@
// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart // DO NOT EDIT. This is code generated via package:easy_localization/generate.dart
// ignore_for_file: prefer_single_quotes, avoid_renaming_method_parameters // ignore_for_file: prefer_single_quotes, avoid_renaming_method_parameters, constant_identifier_names
import 'dart:ui'; import 'dart:ui';
@ -14,7 +14,7 @@ class CodegenLoader extends AssetLoader{
return Future.value(mapLocales[locale.toString()]); return Future.value(mapLocales[locale.toString()]);
} }
static const Map<String,dynamic> ar_SA = { static const Map<String,dynamic> _ar_SA = {
"mohemm": "Mohemm", "mohemm": "Mohemm",
"english": "English", "english": "English",
"arabic": "عربي", "arabic": "عربي",
@ -116,6 +116,7 @@ class CodegenLoader extends AssetLoader{
"reject": "يرفض", "reject": "يرفض",
"approve": "يوافق", "approve": "يوافق",
"cancel": "إلغاء", "cancel": "إلغاء",
"generate": "يولد",
"requestedItems": "العناصر المطلوبة", "requestedItems": "العناصر المطلوبة",
"request": "طلب", "request": "طلب",
"myRequest": "طلبي", "myRequest": "طلبي",
@ -560,10 +561,9 @@ class CodegenLoader extends AssetLoader{
"missingDocuments": "مستندات مفقودة", "missingDocuments": "مستندات مفقودة",
"uploadedDocuments": "المستندات التي تم تحميلها", "uploadedDocuments": "المستندات التي تم تحميلها",
"addAtLeastOneAttachment": "الرجاء إضافة مرفق واحد على الأقل.", "addAtLeastOneAttachment": "الرجاء إضافة مرفق واحد على الأقل.",
"open": "يفتح",
"youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
"pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون", "pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
"generate": "يولد", "youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
"open": "يفتح",
"paymentRequest": "طلب الدفع", "paymentRequest": "طلب الدفع",
"paymentDetails": "تفاصيل الدفع", "paymentDetails": "تفاصيل الدفع",
"requestNo": "رقم الطلب", "requestNo": "رقم الطلب",
@ -627,10 +627,15 @@ class CodegenLoader extends AssetLoader{
"members": "الأعضاء", "members": "الأعضاء",
"searchByUserName": "البحث بواسطة اسم المستخدم", "searchByUserName": "البحث بواسطة اسم المستخدم",
"shareScreen": "مشاركة الشاشة", "shareScreen": "مشاركة الشاشة",
"start":"يبدأ", "start": "يبدأ",
"about":"عن" "about": "عن",
"explore": "يستكشف",
"mazaya": "مازيا",
"benefits": "فوائد",
"mazayaDesc": "اكتشف الخصومات والعروض الخاصة المتاحة للموظفين",
"viewallofferMazaya": "أعرض كل المزايا"
}; };
static const Map<String,dynamic> en_US = { static const Map<String,dynamic> _en_US = {
"mohemm": "Mohemm", "mohemm": "Mohemm",
"english": "English", "english": "English",
"arabic": "عربي", "arabic": "عربي",
@ -725,6 +730,7 @@ static const Map<String,dynamic> en_US = {
"whatsapp": "Whatsapp", "whatsapp": "Whatsapp",
"reject": "Reject", "reject": "Reject",
"approve": "Approve", "approve": "Approve",
"generate": "Generate",
"cancel": "Cancel", "cancel": "Cancel",
"requestedItems": "Requested Items", "requestedItems": "Requested Items",
"request": "Request", "request": "Request",
@ -1197,7 +1203,6 @@ static const Map<String,dynamic> en_US = {
"pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.", "pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.",
"youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.", "youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.",
"requesterOperatingUnit": "Requester Operating Unit", "requesterOperatingUnit": "Requester Operating Unit",
"generate": "Generate",
"paymentRequest": "Pay Request", "paymentRequest": "Pay Request",
"paymentDetails": "Payment Details", "paymentDetails": "Payment Details",
"requestNo": "Request No", "requestNo": "Request No",
@ -1243,8 +1248,13 @@ static const Map<String,dynamic> en_US = {
"qtyReceived": "Qty. Received", "qtyReceived": "Qty. Received",
"bonusQty": "Bonus Qty.", "bonusQty": "Bonus Qty.",
"balQty": "Bal. Qty.", "balQty": "Bal. Qty.",
"start":"Start", "start": "Start",
"about":"About" "about": "About",
"explore": "Explore",
"mazaya": "MAZAYA",
"benefits": "Benefits",
"mazayaDesc": "Discover special Discounts and offers available to Employees",
"viewallofferMazaya": "View All Offers"
}; };
static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US}; static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": _ar_SA, "en_US": _en_US};
} }

@ -1,5 +1,7 @@
// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart // DO NOT EDIT. This is code generated via package:easy_localization/generate.dart
// ignore_for_file: constant_identifier_names
abstract class LocaleKeys { abstract class LocaleKeys {
static const mohemm = 'mohemm'; static const mohemm = 'mohemm';
static const english = 'english'; static const english = 'english';
@ -101,6 +103,7 @@ abstract class LocaleKeys {
static const reject = 'reject'; static const reject = 'reject';
static const approve = 'approve'; static const approve = 'approve';
static const cancel = 'cancel'; static const cancel = 'cancel';
static const generate = 'generate';
static const requestedItems = 'requestedItems'; static const requestedItems = 'requestedItems';
static const request = 'request'; static const request = 'request';
static const myRequest = 'myRequest'; static const myRequest = 'myRequest';
@ -530,10 +533,9 @@ abstract class LocaleKeys {
static const missingDocuments = 'missingDocuments'; static const missingDocuments = 'missingDocuments';
static const uploadedDocuments = 'uploadedDocuments'; static const uploadedDocuments = 'uploadedDocuments';
static const addAtLeastOneAttachment = 'addAtLeastOneAttachment'; static const addAtLeastOneAttachment = 'addAtLeastOneAttachment';
static const open = 'open';
static const youCannotJoinTheMarathon = 'youCannotJoinTheMarathon';
static const pleaseClickButtonToJoinMarathon = 'pleaseClickButtonToJoinMarathon'; static const pleaseClickButtonToJoinMarathon = 'pleaseClickButtonToJoinMarathon';
static const generate = 'generate'; static const youCannotJoinTheMarathon = 'youCannotJoinTheMarathon';
static const open = 'open';
static const paymentRequest = 'paymentRequest'; static const paymentRequest = 'paymentRequest';
static const paymentDetails = 'paymentDetails'; static const paymentDetails = 'paymentDetails';
static const requestNo = 'requestNo'; static const requestNo = 'requestNo';
@ -598,5 +600,11 @@ abstract class LocaleKeys {
static const searchByUserName = 'searchByUserName'; static const searchByUserName = 'searchByUserName';
static const shareScreen = 'shareScreen'; static const shareScreen = 'shareScreen';
static const start = 'start'; static const start = 'start';
static const about ='about'; static const about = 'about';
static const explore = 'explore';
static const mazaya = 'mazaya';
static const benefits = 'benefits';
static const mazayaDesc = 'mazayaDesc';
static const viewallofferMazaya = 'viewallofferMazaya';
} }

@ -5,21 +5,21 @@ UserAutoLoginModel userAutoLoginModelFromJson(String str) => UserAutoLoginModel.
String userAutoLoginModelToJson(UserAutoLoginModel data) => json.encode(data.toJson()); String userAutoLoginModelToJson(UserAutoLoginModel data) => json.encode(data.toJson());
class UserAutoLoginModel { class UserAutoLoginModel {
UserAutoLoginModel({ UserAutoLoginModel({this.response, this.errorResponses, this.StatusCode});
this.response,
this.errorResponses,
});
Response? response; Response? response;
List<ErrorResponse>? errorResponses; List<ErrorResponse>? errorResponses;
int? StatusCode;
factory UserAutoLoginModel.fromJson(Map<String, dynamic> json) => UserAutoLoginModel( factory UserAutoLoginModel.fromJson(Map<String, dynamic> json) => UserAutoLoginModel(
response: json["response"] == null ? null : Response.fromJson(json["response"]), response: json["response"] == null ? null : Response.fromJson(json["response"]),
StatusCode: json["StatusCode"],
errorResponses: json["errorResponses"] == null ? null : List<ErrorResponse>.from(json["errorResponses"].map((x) => ErrorResponse.fromJson(x))), errorResponses: json["errorResponses"] == null ? null : List<ErrorResponse>.from(json["errorResponses"].map((x) => ErrorResponse.fromJson(x))),
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
"response": response == null ? null : response!.toJson(), "response": response == null ? null : response!.toJson(),
"StatusCode": StatusCode,
"errorResponses": errorResponses == null ? null : List<dynamic>.from(errorResponses!.map((x) => x.toJson())), "errorResponses": errorResponses == null ? null : List<dynamic>.from(errorResponses!.map((x) => x.toJson())),
}; };
} }

@ -1,3 +1,5 @@
import 'dart:convert';
import 'package:mohem_flutter_app/models/add_att_success_list_model.dart'; import 'package:mohem_flutter_app/models/add_att_success_list_model.dart';
import 'package:mohem_flutter_app/models/add_attachment_list_model.dart'; import 'package:mohem_flutter_app/models/add_attachment_list_model.dart';
import 'package:mohem_flutter_app/models/basic_member_information_model.dart'; import 'package:mohem_flutter_app/models/basic_member_information_model.dart';
@ -391,275 +393,278 @@ class GenericResponseModel {
String? ePharmacyGetItemOnHandList; String? ePharmacyGetItemOnHandList;
bool? isActiveCode; bool? isActiveCode;
bool? isSMSSent; bool? isSMSSent;
PortalDirectionData? portalDirectionData;
GenericResponseModel(
{this.date, GenericResponseModel({
this.languageID, this.date,
this.serviceName, this.languageID,
this.time, this.portalDirectionData,
this.androidLink, this.serviceName,
this.authenticationTokenID, this.time,
this.data, this.androidLink,
this.dataw, this.authenticationTokenID,
this.dietType, this.data,
this.dietTypeID, this.dataw,
this.errorCode, this.dietType,
this.errorEndUserMessage, this.dietTypeID,
this.errorEndUserMessageN, this.errorCode,
this.errorMessage, this.errorEndUserMessage,
this.errorType, this.errorEndUserMessageN,
this.foodCategory, this.errorMessage,
this.iOSLink, this.errorType,
this.isAuthenticated, this.foodCategory,
this.mealOrderStatus, this.iOSLink,
this.mealType, this.isAuthenticated,
this.messageStatus, this.mealOrderStatus,
this.numberOfResultRecords, this.mealType,
this.patientBlodType, this.messageStatus,
this.successMsg, this.numberOfResultRecords,
this.successMsgN, this.patientBlodType,
this.vidaUpdatedResponse, this.successMsg,
this.addAttSuccessList, this.successMsgN,
this.addAttachmentList, this.vidaUpdatedResponse,
this.bCDomain, this.addAttSuccessList,
this.bCLogo, this.addAttachmentList,
this.basicMemberInformation, this.bCDomain,
this.businessCardPrivilege, this.bCLogo,
this.calculateAbsenceDuration, this.basicMemberInformation,
this.cancelHRTransactionLIst, this.businessCardPrivilege,
this.chatEmployeeLoginList, this.calculateAbsenceDuration,
this.companyBadge, this.cancelHRTransactionLIst,
this.companyImage, this.chatEmployeeLoginList,
this.companyImageDescription, this.companyBadge,
this.companyImageURL, this.companyImage,
this.companyMainCompany, this.companyImageDescription,
this.countryList, this.companyImageURL,
this.createVacationRuleList, this.companyMainCompany,
this.deleteAttachmentList, this.countryList,
this.deleteVacationRuleList, this.createVacationRuleList,
this.disableSessionList, this.deleteAttachmentList,
this.employeeQR, this.deleteVacationRuleList,
this.employeeDocumentsList, this.disableSessionList,
this.forgetPasswordTokenID, this.employeeQR,
this.getAbsenceAttachmentsList, this.employeeDocumentsList,
this.getAbsenceAttendanceTypesList, this.forgetPasswordTokenID,
this.getAbsenceCollectionNotificationBodyList, this.getAbsenceAttachmentsList,
this.getAbsenceDffStructureList, this.getAbsenceAttendanceTypesList,
this.getAbsenceTransactionList, this.getAbsenceCollectionNotificationBodyList,
this.getAccrualBalancesList, this.getAbsenceDffStructureList,
this.getActionHistoryList, this.getAbsenceTransactionList,
this.getPRActionHistoryList, this.getAccrualBalancesList,
this.getAddressDffStructureList, this.getActionHistoryList,
this.getAddressNotificationBodyList, this.getPRActionHistoryList,
this.getApprovesList, this.getAddressDffStructureList,
this.getAttachementList, this.getAddressNotificationBodyList,
this.getPRAttachmentList, this.getApprovesList,
this.getAttendanceTrackingList, this.getAttachementList,
this.getBasicDetColsStructureList, this.getPRAttachmentList,
this.getBasicDetDffStructureList, this.getAttendanceTrackingList,
this.getBasicDetNtfBodyList, this.getBasicDetColsStructureList,
this.getCEICollectionNotificationBodyList, this.getBasicDetDffStructureList,
this.getCEIDFFStructureList, this.getBasicDetNtfBodyList,
this.getCEITransactionList, this.getCEICollectionNotificationBodyList,
this.getCcpTransactionsList, this.getCEIDFFStructureList,
this.getCcpTransactionsListNew, this.getCEITransactionList,
this.getConcurrentProgramsList, this.getCcpTransactionsList,
this.getContactColsStructureList, this.getCcpTransactionsListNew,
this.getContactDetailsList, this.getConcurrentProgramsList,
this.getContactDffStructureList, this.getContactColsStructureList,
this.getContactNotificationBodyList, this.getContactDetailsList,
this.getCountriesList, this.getContactDffStructureList,
this.getDayHoursTypeDetailsList, this.getContactNotificationBodyList,
this.getDeductionsList, this.getCountriesList,
this.getDefaultValueList, this.getDayHoursTypeDetailsList,
this.getEITCollectionNotificationBodyList, this.getDeductionsList,
this.getEITDFFStructureList, this.getDefaultValueList,
this.getEITTransactionList, this.getEITCollectionNotificationBodyList,
this.getEarningsList, this.getEITDFFStructureList,
this.getEmployeeAddressList, this.getEITTransactionList,
this.getEmployeeBasicDetailsList, this.getEarningsList,
this.getEmployeeContactsList, this.getEmployeeAddressList,
this.getEmployeePhonesList, this.getEmployeeBasicDetailsList,
this.getEmployeeSubordinatesList, this.getEmployeeContactsList,
this.getFliexfieldStructureList, this.getEmployeePhonesList,
this.getHrCollectionNotificationBodyList, this.getEmployeeSubordinatesList,
this.getHrTransactionList, this.getFliexfieldStructureList,
this.getItemCreationNtfBodyList, this.getHrCollectionNotificationBodyList,
this.getItemTypeNotificationsList, this.getHrTransactionList,
this.getItemTypesList, this.getItemCreationNtfBodyList,
this.getLookupValuesList, this.getItemTypeNotificationsList,
this.getMenuEntriesList, this.getItemTypesList,
this.getEventActivityList, this.getLookupValuesList,
this.getMoItemHistoryList, this.getMenuEntriesList,
this.getMoNotificationBodyList, this.getEventActivityList,
this.getNotificationButtonsList, this.getMoItemHistoryList,
this.getNotificationReassignModeList, this.getMoNotificationBodyList,
this.getObjectValuesList, this.getNotificationButtonsList,
this.getOpenMissingSwipesList, this.getNotificationReassignModeList,
this.getOpenNotificationsList, this.getObjectValuesList,
this.getOpenNotificationsNumList, this.getOpenMissingSwipesList,
this.getOpenPeriodDatesList, this.getOpenNotificationsList,
this.getOrganizationsSalariesList, this.getOpenNotificationsNumList,
this.getPaymentInformationList, this.getOpenPeriodDatesList,
this.getPayslipList, this.getOrganizationsSalariesList,
this.getPerformanceAppraisalList, this.getPaymentInformationList,
this.getPhonesNotificationBodyList, this.getPayslipList,
this.getPoItemHistoryList, this.getPerformanceAppraisalList,
this.getPoNotificationBodyList, this.getPhonesNotificationBodyList,
this.getPrNotificationBodyList, this.getPoItemHistoryList,
this.getPaymentNotificationBodyList, this.getPoNotificationBodyList,
this.getPRInformationList, this.getPrNotificationBodyList,
this.getQuotationAnalysisList, this.getPaymentNotificationBodyList,
this.getRFCEmployeeListList, this.getPRInformationList,
this.getRespondAttributeValueList, this.getQuotationAnalysisList,
this.getSITCollectionNotificationBodyList, this.getRFCEmployeeListList,
this.getSITDFFStructureList, this.getRespondAttributeValueList,
this.getSITTransactionList, this.getSITCollectionNotificationBodyList,
this.getScheduleShiftsDetailsList, this.getSITDFFStructureList,
this.getShiftTypesList, this.getSITTransactionList,
this.getStampMsNotificationBodyList, this.getScheduleShiftsDetailsList,
this.getStampNsNotificationBodyList, this.getShiftTypesList,
this.getSubordinatesAttdStatusList, this.getStampMsNotificationBodyList,
this.getSubordinatesLeavesList, this.getStampNsNotificationBodyList,
this.getSubordinatesLeavesTotalVacationsList, this.getSubordinatesAttdStatusList,
this.getSummaryOfPaymentList, this.getSubordinatesLeavesList,
this.getSwipesList, this.getSubordinatesLeavesTotalVacationsList,
this.getTermColsStructureList, this.getSummaryOfPaymentList,
this.getTermDffStructureList, this.getSwipesList,
this.getTermNotificationBodyList, this.getTermColsStructureList,
this.getTimeCardSummaryList, this.getTermDffStructureList,
this.getTicketsByEmployeeList, this.getTermNotificationBodyList,
this.getTicketDetailsByEmployee, this.getTimeCardSummaryList,
this.getTicketTransactions, this.getTicketsByEmployeeList,
this.getTicketTypes, this.getTicketDetailsByEmployee,
this.getSectionTopics, this.getTicketTransactions,
this.getMowadhafhiProjects, this.getTicketTypes,
this.getProjectDepartments, this.getSectionTopics,
this.getDepartmentSections, this.getMowadhafhiProjects,
this.getPendingTransactionsFunctions, this.getProjectDepartments,
this.getPendingTransactionsDetails, this.getDepartmentSections,
this.getConcurrentProgramsModel, this.getPendingTransactionsFunctions,
this.getCCPTransactionsModel, this.getPendingTransactionsDetails,
this.getCCPOutputModel, this.getConcurrentProgramsModel,
this.getCCPDFFStructureModel, this.getCCPTransactionsModel,
this.getUserItemTypesList, this.getCCPOutputModel,
this.getVacationRulesList, this.getCCPDFFStructureModel,
this.getVaccinationOnHandList, this.getUserItemTypesList,
this.getVaccinationsList, this.getVacationRulesList,
this.getValueSetValuesList, this.getVaccinationOnHandList,
this.getWorkList, this.getVaccinationsList,
this.hRCertificateTemplate, this.getValueSetValuesList,
this.imgURLsList, this.getWorkList,
this.insertApInv, this.hRCertificateTemplate,
this.insertBooked, this.imgURLsList,
this.insertEmpSwipesList, this.insertApInv,
this.insertJournal, this.insertBooked,
this.insertOrders, this.insertEmpSwipesList,
this.intPortalGetEmployeeList, this.insertJournal,
this.isDeviceTokenEmpty, this.insertOrders,
this.isPasswordExpired, this.intPortalGetEmployeeList,
this.isRegisterAllowed, this.isDeviceTokenEmpty,
this.isRequriedValueSetEmpty, this.isPasswordExpired,
this.isUserSMSExcluded, this.isRegisterAllowed,
this.itemOnHand, this.isRequriedValueSetEmpty,
this.languageAvailable, this.isUserSMSExcluded,
this.listSupplier, this.itemOnHand,
this.listUserAgreement, this.languageAvailable,
this.listEITStrucrure, this.listSupplier,
this.listItemImagesDetails, this.listUserAgreement,
this.listItemMaster, this.listEITStrucrure,
this.listMedicineDetails, this.listItemImagesDetails,
this.listMenu, this.listItemMaster,
this.listNewEmployees, this.listMedicineDetails,
this.listRadScreen, this.listMenu,
this.logInTokenID, this.listNewEmployees,
this.memberInformationList, this.listRadScreen,
this.memberLoginList, this.logInTokenID,
this.mohemmGetBusinessCardEnabledList, this.memberInformationList,
this.mohemmGetFavoriteReplacementsList, this.memberLoginList,
this.mohemmGetMobileDeviceInfobyEmpInfoList, this.mohemmGetBusinessCardEnabledList,
this.mohemmGetMobileLoginInfoList, this.mohemmGetFavoriteReplacementsList,
this.mohemmGetPatientIDList, this.mohemmGetMobileDeviceInfobyEmpInfoList,
this.mohemmITGResponseItem, this.mohemmGetMobileLoginInfoList,
this.mohemmIsChangeIsActiveBusinessCardEnable, this.mohemmGetPatientIDList,
this.mohemmIsInsertBusinessCardEnable, this.mohemmITGResponseItem,
this.mohemmWifiPassword, this.mohemmIsChangeIsActiveBusinessCardEnable,
this.mohemmWifiSSID, this.mohemmIsInsertBusinessCardEnable,
this.notificationAction, this.mohemmWifiPassword,
this.notificationGetRespondAttributesList, this.mohemmWifiSSID,
this.notificationRespondRolesList, this.notificationAction,
this.oracleOutPutNumber, this.notificationGetRespondAttributesList,
this.pASSWORDEXPIREDMSG, this.notificationRespondRolesList,
this.pCOUNTRYCODE, this.oracleOutPutNumber,
this.pCOUNTRYNAME, this.pASSWORDEXPIREDMSG,
this.pDESCFLEXCONTEXTCODE, this.pCOUNTRYCODE,
this.pDESCFLEXCONTEXTNAME, this.pCOUNTRYNAME,
this.pForm, this.pDESCFLEXCONTEXTCODE,
this.pINFORMATION, this.pDESCFLEXCONTEXTNAME,
this.pMBLID, this.pForm,
this.pNUMOFSUBORDINATES, this.pINFORMATION,
this.pOPENNTFNUMBER, this.pMBLID,
this.pQUESTION, this.pNUMOFSUBORDINATES,
this.pSESSIONID, this.pOPENNTFNUMBER,
this.pSchema, this.pQUESTION,
this.pharmacyStockAddPharmacyStockList, this.pSESSIONID,
this.pharmacyStockGetOnHandList, this.pSchema,
this.privilegeList, this.pharmacyStockAddPharmacyStockList,
this.processTransactions, this.pharmacyStockGetOnHandList,
this.registerUserNameList, this.privilegeList,
this.replacementList, this.processTransactions,
this.respondAttributesList, this.registerUserNameList,
this.respondRolesList, this.replacementList,
this.resubmitAbsenceTransactionList, this.respondAttributesList,
this.resubmitEITTransactionList, this.respondRolesList,
this.resubmitHrTransactionList, this.resubmitAbsenceTransactionList,
this.sFHGetPoNotificationBodyList, this.resubmitEITTransactionList,
this.sFHGetPrNotificationBodyList, this.resubmitHrTransactionList,
this.startAbsenceApprovalProccess, this.sFHGetPoNotificationBodyList,
this.startAddressApprovalProcessList, this.sFHGetPrNotificationBodyList,
this.startBasicDetApprProcessList, this.startAbsenceApprovalProccess,
this.startCeiApprovalProcess, this.startAddressApprovalProcessList,
this.startContactApprovalProcessList, this.startBasicDetApprProcessList,
this.startEitApprovalProcess, this.startCeiApprovalProcess,
this.startHrApprovalProcessList, this.startContactApprovalProcessList,
this.startPhonesApprovalProcessList, this.startEitApprovalProcess,
this.startSitApprovalProcess, this.startHrApprovalProcessList,
this.startTermApprovalProcessList, this.startPhonesApprovalProcessList,
this.submitAddressTransactionList, this.startSitApprovalProcess,
this.submitBasicDetTransactionList, this.startTermApprovalProcessList,
this.submitCEITransactionList, this.submitAddressTransactionList,
this.submitCcpTransactionList, this.submitBasicDetTransactionList,
this.submitContactTransactionList, this.submitCEITransactionList,
this.submitEITTransactionList, this.submitCcpTransactionList,
this.submitHrTransactionList, this.submitContactTransactionList,
this.submitPhonesTransactionList, this.submitEITTransactionList,
this.submitSITTransactionList, this.submitHrTransactionList,
this.submitTermTransactionList, this.submitPhonesTransactionList,
this.subordinatesOnLeavesList, this.submitSITTransactionList,
this.sumbitAbsenceTransactionList, this.submitTermTransactionList,
this.tokenID, this.subordinatesOnLeavesList,
this.updateAttachmentList, this.sumbitAbsenceTransactionList,
this.updateEmployeeImageList, this.tokenID,
this.updateItemTypeSuccessList, this.updateAttachmentList,
this.updateUserItemTypesList, this.updateEmployeeImageList,
this.updateVacationRuleList, this.updateItemTypeSuccessList,
this.vHREmployeeLoginList, this.updateUserItemTypesList,
this.vHRGetEmployeeDetailsList, this.updateVacationRuleList,
this.vHRGetManagersDetailsList, this.vHREmployeeLoginList,
this.vHRGetProjectByCodeList, this.vHRGetEmployeeDetailsList,
this.vHRIsVerificationCodeValid, this.vHRGetManagersDetailsList,
this.validateAbsenceTransactionList, this.vHRGetProjectByCodeList,
this.validateEITTransactionList, this.vHRIsVerificationCodeValid,
this.validatePhonesTransactionList, this.validateAbsenceTransactionList,
this.vrItemTypesList, this.validateEITTransactionList,
this.wFLookUpList, this.validatePhonesTransactionList,
this.eLearningGETEMPLOYEEPROFILEList, this.vrItemTypesList,
this.eLearningLOGINList, this.wFLookUpList,
this.eLearningValidateLoginList, this.eLearningGETEMPLOYEEPROFILEList,
this.eLearningValidate_LoginList, this.eLearningLOGINList,
this.ePharmacyGetItemOnHandList, this.eLearningValidateLoginList,
this.isActiveCode, this.eLearningValidate_LoginList,
this.isSMSSent}); this.ePharmacyGetItemOnHandList,
this.isActiveCode,
this.isSMSSent,
});
GenericResponseModel.fromJson(Map<String, dynamic> json) { GenericResponseModel.fromJson(Map<String, dynamic> json) {
date = json['Date']; date = json['Date'];
@ -688,6 +693,7 @@ class GenericResponseModel {
successMsg = json['SuccessMsg']; successMsg = json['SuccessMsg'];
successMsgN = json['SuccessMsgN']; successMsgN = json['SuccessMsgN'];
vidaUpdatedResponse = json['VidaUpdatedResponse']; vidaUpdatedResponse = json['VidaUpdatedResponse'];
portalDirectionData = json["PortalDirectionData"] == null ? null : PortalDirectionData.fromJson(json["PortalDirectionData"]);
if (json['AddAttSuccessList'] != null) { if (json['AddAttSuccessList'] != null) {
addAttSuccessList = <AddAttSuccessList>[]; addAttSuccessList = <AddAttSuccessList>[];
@ -848,9 +854,10 @@ class GenericResponseModel {
}); });
} }
getCEICollectionNotificationBodyList = json["GetCEICollectionNotificationBodyList"] == null getCEICollectionNotificationBodyList =
? null json["GetCEICollectionNotificationBodyList"] == null
: List<GetEitCollectionNotificationBodyList>.from(json["GetCEICollectionNotificationBodyList"].map((x) => GetEitCollectionNotificationBodyList.fromJson(x))); ? null
: List<GetEitCollectionNotificationBodyList>.from(json["GetCEICollectionNotificationBodyList"].map((x) => GetEitCollectionNotificationBodyList.fromJson(x)));
if (json['GetCEIDFFStructureList'] != null) { if (json['GetCEIDFFStructureList'] != null) {
getCEIDFFStructureList = <GetEITDFFStructureList>[]; getCEIDFFStructureList = <GetEITDFFStructureList>[];
@ -909,9 +916,10 @@ class GenericResponseModel {
}); });
} }
getDefaultValueList = json['GetDefaultValueList'] != null ? GetDefaultValueList.fromJson(json['GetDefaultValueList']) : null; getDefaultValueList = json['GetDefaultValueList'] != null ? GetDefaultValueList.fromJson(json['GetDefaultValueList']) : null;
getEITCollectionNotificationBodyList = json["GetEITCollectionNotificationBodyList"] == null getEITCollectionNotificationBodyList =
? null json["GetEITCollectionNotificationBodyList"] == null
: List<GetEitCollectionNotificationBodyList>.from(json["GetEITCollectionNotificationBodyList"].map((x) => GetEitCollectionNotificationBodyList.fromJson(x))); ? null
: List<GetEitCollectionNotificationBodyList>.from(json["GetEITCollectionNotificationBodyList"].map((x) => GetEitCollectionNotificationBodyList.fromJson(x)));
if (json['GetEITDFFStructureList'] != null) { if (json['GetEITDFFStructureList'] != null) {
getEITDFFStructureList = <GetEITDFFStructureList>[]; getEITDFFStructureList = <GetEITDFFStructureList>[];
json['GetEITDFFStructureList'].forEach((v) { json['GetEITDFFStructureList'].forEach((v) {
@ -1475,6 +1483,7 @@ class GenericResponseModel {
data['SuccessMsg'] = this.successMsg; data['SuccessMsg'] = this.successMsg;
data['SuccessMsgN'] = this.successMsgN; data['SuccessMsgN'] = this.successMsgN;
data['VidaUpdatedResponse'] = this.vidaUpdatedResponse; data['VidaUpdatedResponse'] = this.vidaUpdatedResponse;
data['PortalDirectionData'] = portalDirectionData?.toJson();
if (this.addAttSuccessList != null) { if (this.addAttSuccessList != null) {
data['AddAttSuccessList'] = this.addAttSuccessList!.map((v) => v.toJson()).toList(); data['AddAttSuccessList'] = this.addAttSuccessList!.map((v) => v.toJson()).toList();
@ -1930,3 +1939,25 @@ class GenericResponseModel {
return data; return data;
} }
} }
class PortalDirectionData {
String? pRedirection;
String? clientID;
PortalDirectionData({this.pRedirection, this.clientID});
factory PortalDirectionData.fromRawJson(String str) => PortalDirectionData.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory PortalDirectionData.fromJson(Map<String, dynamic> json) => PortalDirectionData(pRedirection: json["P_REDIRECTION"], clientID: json["ClientID"]);
Map<String, dynamic> toJson() => {"P_REDIRECTION": pRedirection, "ClientID": clientID};
}
class TicketBookingResult {
final bool success;
final String? clientId;
TicketBookingResult(this.success, this.clientId);
}

@ -0,0 +1,65 @@
import 'dart:convert';
class SSOAuthModel {
String? status;
List<dynamic>? message;
Data? data;
SSOAuthModel({
this.status,
this.message,
this.data,
});
factory SSOAuthModel.fromRawJson(String str) => SSOAuthModel.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory SSOAuthModel.fromJson(Map<String, dynamic> json) => SSOAuthModel(
status: json["status"],
message: json["message"] == null ? [] : List<dynamic>.from(json["message"]!.map((x) => x)),
data: json["data"] == null ? null : Data.fromJson(json["data"]),
);
Map<String, dynamic> toJson() => {
"status": status,
"message": message == null ? [] : List<dynamic>.from(message!.map((x) => x)),
"data": data?.toJson(),
};
}
class Data {
String? accessToken;
String? idToken;
int? expiresIn;
String? refreshToken;
String? postBackUrl;
Data({
this.accessToken,
this.idToken,
this.expiresIn,
this.refreshToken,
this.postBackUrl,
});
factory Data.fromRawJson(String str) => Data.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory Data.fromJson(Map<String, dynamic> json) => Data(
accessToken: json["accessToken"],
idToken: json["idToken"],
expiresIn: json["expiresIn"],
refreshToken: json["refreshToken"],
postBackUrl: json["postBackUrl"],
);
Map<String, dynamic> toJson() => {
"accessToken": accessToken,
"idToken": idToken,
"expiresIn": expiresIn,
"refreshToken": refreshToken,
"postBackUrl": postBackUrl,
};
}

@ -93,6 +93,12 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
Future<void> getUserAutoLoginToken() async { Future<void> getUserAutoLoginToken() async {
userLoginToken.UserAutoLoginModel userLoginResponse = await ChatApiClient().getUserLoginToken(); userLoginToken.UserAutoLoginModel userLoginResponse = await ChatApiClient().getUserLoginToken();
if (userLoginResponse.StatusCode == 500) {
disbaleChatForThisUser = true;
notifyListeners();
}
if (userLoginResponse.response != null) { if (userLoginResponse.response != null) {
AppState().setchatUserDetails = userLoginResponse; AppState().setchatUserDetails = userLoginResponse;
} else { } else {
@ -399,8 +405,8 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
if (data.first.userChatReplyResponse != null) { if (data.first.userChatReplyResponse != null) {
if (data.first.fileTypeResponse != null) { if (data.first.fileTypeResponse != null) {
if (data.first.userChatReplyResponse!.fileTypeId == 12 || data.first.userChatReplyResponse!.fileTypeId == 4 || data.first.userChatReplyResponse!.fileTypeId == 3) { if (data.first.userChatReplyResponse!.fileTypeId == 12 || data.first.userChatReplyResponse!.fileTypeId == 4 || data.first.userChatReplyResponse!.fileTypeId == 3) {
data.first.userChatReplyResponse!.image = data.first.userChatReplyResponse!.image = await ChatApiClient()
await ChatApiClient().downloadURL(fileName: data.first.userChatReplyResponse!.contant!, fileTypeDescription: data.first.fileTypeResponse!.fileTypeDescription ?? "image/jpg", fileSource: 1); .downloadURL(fileName: data.first.userChatReplyResponse!.contant!, fileTypeDescription: data.first.fileTypeResponse!.fileTypeDescription ?? "image/jpg", fileSource: 1);
data.first.userChatReplyResponse!.isImageLoaded = true; data.first.userChatReplyResponse!.isImageLoaded = true;
} }
} }
@ -476,8 +482,8 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
if (data.first.groupChatReplyResponse != null) { if (data.first.groupChatReplyResponse != null) {
if (data.first.fileTypeResponse != null) { if (data.first.fileTypeResponse != null) {
if (data.first.groupChatReplyResponse!.fileTypeId == 12 || data.first.groupChatReplyResponse!.fileTypeId == 4 || data.first.groupChatReplyResponse!.fileTypeId == 3) { if (data.first.groupChatReplyResponse!.fileTypeId == 12 || data.first.groupChatReplyResponse!.fileTypeId == 4 || data.first.groupChatReplyResponse!.fileTypeId == 3) {
data.first.groupChatReplyResponse!.image = data.first.groupChatReplyResponse!.image = await ChatApiClient()
await ChatApiClient().downloadURL(fileName: data.first.groupChatReplyResponse!.contant!, fileTypeDescription: data.first.fileTypeResponse!.fileTypeDescription ?? "image/jpg", fileSource: 2); .downloadURL(fileName: data.first.groupChatReplyResponse!.contant!, fileTypeDescription: data.first.fileTypeResponse!.fileTypeDescription ?? "image/jpg", fileSource: 2);
data.first.groupChatReplyResponse!.isImageLoaded = true; data.first.groupChatReplyResponse!.isImageLoaded = true;
} }
} }
@ -1653,7 +1659,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
void sRecoding() async { void sRecoding() async {
isVoiceMsg = true; isVoiceMsg = true;
recorderController.reset(); recorderController.reset();
await recorderController.record(path); await recorderController.record(path: path);
_recodeDuration = 0; _recodeDuration = 0;
_startTimer(); _startTimer();
isRecoding = !isRecoding; isRecoding = !isRecoding;
@ -1685,7 +1691,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
File file = File(path!); File file = File(path!);
file.readAsBytesSync(); file.readAsBytesSync();
path = file.path; path = file.path;
await playerController.preparePlayer(file.path, 1.0); await playerController.preparePlayer(path:file.path, volume: 1.0);
_timer?.cancel(); _timer?.cancel();
notifyListeners(); notifyListeners();
} }

@ -21,6 +21,7 @@ import 'package:mohem_flutter_app/models/dashboard/mohemm_itg_pending_task_respo
import 'package:mohem_flutter_app/models/generic_response_model.dart'; import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/itg/itg_response_model.dart'; import 'package:mohem_flutter_app/models/itg/itg_response_model.dart';
import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart'; import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart';
import 'package:mohem_flutter_app/models/sso_auth_model.dart';
import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart'; import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart';
/// Mix-in [DiagnosticableTreeMixin] to have access to [debugFillProperties] for the devtool /// Mix-in [DiagnosticableTreeMixin] to have access to [debugFillProperties] for the devtool
@ -239,6 +240,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
homeMenus = parseMenus(getMenuEntriesList ?? []); homeMenus = parseMenus(getMenuEntriesList ?? []);
if (homeMenus!.isNotEmpty) { if (homeMenus!.isNotEmpty) {
homeMenus!.first.menuEntiesList.insert(0, GetMenuEntriesList(requestType: "MONTHLY_ATTENDANCE", prompt: LocaleKeys.monthlyAttendance.tr())); homeMenus!.first.menuEntiesList.insert(0, GetMenuEntriesList(requestType: "MONTHLY_ATTENDANCE", prompt: LocaleKeys.monthlyAttendance.tr()));
// homeMenus!.first.menuEntiesList.insert(1, GetMenuEntriesList(requestType: "TICKET_BOOKING", prompt: "Ticket Booking"));
homeMenus!.first.menuEntiesList.add(GetMenuEntriesList(requestType: "VACATION_RULE", prompt: LocaleKeys.vacationRule.tr())); homeMenus!.first.menuEntiesList.add(GetMenuEntriesList(requestType: "VACATION_RULE", prompt: LocaleKeys.vacationRule.tr()));
} }
isServicesMenusLoading = false; isServicesMenusLoading = false;
@ -283,6 +285,61 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
} }
} }
Future<TicketBookingResult> fetchTicketBooking() async {
try {
GenericResponseModel? genericResponseModel = await DashboardApiClient().getTicketBookingRedirection();
if (genericResponseModel?.portalDirectionData?.pRedirection!.toLowerCase() == "alma") {
return TicketBookingResult(true, genericResponseModel?.portalDirectionData?.clientID);
}
return TicketBookingResult(false, null);
} catch (ex) {
logger.wtf(ex);
isEventLoadingLoading = false;
notifyListeners();
Utils.handleException(ex, null, null);
return TicketBookingResult(false, null); // Ensure a return value in case of an exception
}
}
Future<SSOAuthModel?> fetchSSOAuthRedirection({String? clientID}) async {
try {
SSOAuthModel? ssoResponse = await DashboardApiClient().getBookingSSOAuthRedirection(clientID: clientID!);
logger.d("SSO Response: ${ssoResponse!.toJson()}");
if (ssoResponse.status == "Success") {
return ssoResponse;
} else {
Utils.showToast(ssoResponse.message!.first ?? "Failed to fetch SSO Auth Token");
return null;
}
} catch (ex) {
logger.wtf(ex);
isEventLoadingLoading = false;
notifyListeners();
Utils.handleException(ex, null, null);
return null; // Ensure a return value in case of an exception
}
}
Future<dynamic> fetchURLRedirection({required String token}) async {
try {
dynamic res = await DashboardApiClient().getBookingSSOFinalRedirection(token: token);
logger.d("SSO URL: $res");
return res;
// if (ssoResponse.status == "Success") {
// return ssoResponse;
// } else {
// Utils.showToast(ssoResponse.message!.first ?? "Failed to fetch SSO Auth Token");
// return null;
// }
} catch (ex) {
logger.wtf(ex);
isEventLoadingLoading = false;
notifyListeners();
Utils.handleException(ex, null, null);
return null; // Ensure a return value in case of an exception
}
}
List<Menus> parseMenus(List<GetMenuEntriesList> getMenuEntriesList) { List<Menus> parseMenus(List<GetMenuEntriesList> getMenuEntriesList) {
List<Menus> menus = []; List<Menus> menus = [];
for (int i = 0; i < getMenuEntriesList.length; i++) { for (int i = 0; i < getMenuEntriesList.length; i++) {
@ -316,8 +373,6 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
return res; return res;
} }
void notify() { void notify() {
notifyListeners(); notifyListeners();
} }

@ -16,84 +16,36 @@ class AppTheme {
}, },
), ),
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
colorScheme: ColorScheme.fromSwatch( colorScheme: ColorScheme.fromSwatch(accentColor: MyColors.backgroundColor).copyWith(surfaceTint : Colors.transparent),
accentColor: MyColors.backgroundColor,
errorColor: const Color.fromRGBO(235, 80, 60, 1.0),
),
disabledColor: Colors.grey[300], disabledColor: Colors.grey[300],
// errorColor: const Color.fromRGBO(235, 80, 60, 1.0),
applyElevationOverlayColor: false,
scaffoldBackgroundColor: MyColors.backgroundColor, scaffoldBackgroundColor: MyColors.backgroundColor,
textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey), textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey),
canvasColor: Colors.white, canvasColor: Colors.white,
// backgroundColor: const Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100]!.withOpacity(0.4), highlightColor: Colors.grey[100]!.withOpacity(0.4),
splashColor: Colors.transparent, splashColor: Colors.transparent,
primaryColor: primaryColor, primaryColor: primaryColor,
primaryColorDark: primaryColor, primaryColorDark: primaryColor,
buttonTheme: ButtonThemeData( // toggleableActiveColor: secondaryColor,
buttonColor: Colors.black,
),
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;
}),
),
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;
}),
),
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;
}),
),
indicatorColor: secondaryColor, indicatorColor: secondaryColor,
bottomSheetTheme: const BottomSheetThemeData( bottomSheetTheme: const BottomSheetThemeData(
backgroundColor: Color(0xFFE0E0E0), backgroundColor: Color(0xFFE0E0E0),
), ),
primaryTextTheme: const TextTheme(
// bodyText2: TextStyle(color: Colors.white),
),
iconTheme: const IconThemeData(color: MyColors.darkIconColor), iconTheme: const IconThemeData(color: MyColors.darkIconColor),
textTheme: const TextTheme( textTheme: const TextTheme(
bodyMedium: TextStyle(color: Colors.black, letterSpacing: 0.6), // bodyText1: TextStyle(color: Colors.black, letterSpacing: 0.6),
headlineSmall: TextStyle(color: Colors.white, letterSpacing: 0.6), // headline1: TextStyle(color: Colors.white, letterSpacing: 0.6),
headlineMedium: TextStyle(color: Colors.white, letterSpacing: 0.6), // headline2: TextStyle(color: Colors.white, letterSpacing: 0.6),
), ),
floatingActionButtonTheme: const FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2), floatingActionButtonTheme: const FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2),
appBarTheme: AppBarTheme(
appBarTheme: AppBarTheme(
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarBrightness: Brightness.light,
),
color: const Color(0xff515A5D), color: const Color(0xff515A5D),
systemOverlayStyle: const SystemUiOverlayStyle(statusBarBrightness: Brightness.light),
elevation: 0.0, elevation: 0.0,
actionsIconTheme: IconThemeData( actionsIconTheme: IconThemeData(
color: Colors.grey[800], color: Colors.grey[800],

@ -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/models/get_time_card_summary_list_model.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.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:pie_chart/pie_chart.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart'; import 'package:syncfusion_flutter_calendar/calendar.dart';
@ -301,6 +301,7 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
monthCellBuilder: (build, details) { monthCellBuilder: (build, details) {
if (details.date.month == formattedDate.month && details.date.year == formattedDate.year) { if (details.date.month == formattedDate.month && details.date.year == formattedDate.year) {
int val = details.date.day; int val = details.date.day;
int index = val-1;
//check day is off //check day is off
// if (getDayHoursTypeDetailsList.isNotEmpty) { // if (getDayHoursTypeDetailsList.isNotEmpty) {
// bool isDayIsOff = getDayHoursTypeDetailsList[val - 1].aTTENDEDFLAG == 'N' && getDayHoursTypeDetailsList[val - 1].dAYTYPE == 'OFF'; // bool isDayIsOff = getDayHoursTypeDetailsList[val - 1].aTTENDEDFLAG == 'N' && getDayHoursTypeDetailsList[val - 1].dAYTYPE == 'OFF';
@ -310,9 +311,9 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
getDayHoursTypeDetailsList.where((GetDayHoursTypeDetailsList element) => DateFormat("MM/dd/yyyy", "en_US").parse(element.sCHEDULEDATE!).day == details.date.day).toList(); getDayHoursTypeDetailsList.where((GetDayHoursTypeDetailsList element) => DateFormat("MM/dd/yyyy", "en_US").parse(element.sCHEDULEDATE!).day == details.date.day).toList();
if (getDayHours.isNotEmpty) { if (getDayHours.isNotEmpty) {
bool isDayIsOff = getDayHoursTypeDetailsList[0].aTTENDEDFLAG == 'N' && getDayHoursTypeDetailsList[0].dAYTYPE == 'OFF'; bool isDayIsOff = getDayHoursTypeDetailsList[index].aTTENDEDFLAG == 'N' && getDayHoursTypeDetailsList[index].dAYTYPE == 'OFF';
bool isDayIsPresent = getDayHoursTypeDetailsList[0].aTTENDEDFLAG == 'Y'; bool isDayIsPresent = getDayHoursTypeDetailsList[index].aTTENDEDFLAG == 'Y';
bool isDayIsAbsent = getDayHoursTypeDetailsList[0].aTTENDEDFLAG == 'N' && getDayHoursTypeDetailsList[0].aBSENTFLAG == 'Y'; bool isDayIsAbsent = getDayHoursTypeDetailsList[index].aTTENDEDFLAG == 'N' && getDayHoursTypeDetailsList[index].aBSENTFLAG == 'Y';
if (isDayIsOff) { if (isDayIsOff) {
return Container( return Container(

@ -32,8 +32,11 @@ class _ChatHomeState extends State<ChatHome> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
data = Provider.of<ChatProviderModel>(context, listen: false);
data.registerEvents(); if (chatHubConnection.state == HubConnectionState.Connected) {
data = Provider.of<ChatProviderModel>(context, listen: false);
data.registerEvents();
}
} }
@override @override
@ -47,7 +50,6 @@ class _ChatHomeState extends State<ChatHome> {
data.getUserAutoLoginToken().whenComplete(() async { data.getUserAutoLoginToken().whenComplete(() async {
await data.buildHubConnection(); await data.buildHubConnection();
data.getUserRecentChats(); data.getUserRecentChats();
}); });
return; return;
} }
@ -57,7 +59,7 @@ class _ChatHomeState extends State<ChatHome> {
// String isAppOpendByChat = await Utils.getStringFromPrefs("isAppOpendByChat"); // String isAppOpendByChat = await Utils.getStringFromPrefs("isAppOpendByChat");
// String notificationData = await Utils.getStringFromPrefs("notificationData"); // String notificationData = await Utils.getStringFromPrefs("notificationData");
// if (isAppOpendByChat != "null" || isAppOpendByChat == "true" && notificationData != "null") { // if (isAppOpendByChat != "null" || isAppOpendByChat == "true" && notificationData != "null") {
// data.openChatByNoti(context); // data.openChatByNoti(context);
// } // }
}); });
} }

@ -214,8 +214,13 @@ class _ChatHomeScreenState extends State<ChatHomeScreen> {
}, },
), ),
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
// <<<<<<< HEAD
// elevation: 0,
// backgroundColor : Colors.transparent,
// =======
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
elevation: 0, elevation: 0,
child: Container( child: Container(
width: 60, width: 60,
height: 60, height: 60,

@ -60,10 +60,10 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
void initState() { void initState() {
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
super.initState(); super.initState();
cProvider = Provider.of<ChatProviderModel>(context, listen: false);
scheduleMicrotask(() { scheduleMicrotask(() {
data = Provider.of<DashboardProviderModel>(context, listen: false); data = Provider.of<DashboardProviderModel>(context, listen: false);
marathonProvider = Provider.of<MarathonProvider>(context, listen: false); marathonProvider = Provider.of<MarathonProvider>(context, listen: false);
cProvider = Provider.of<ChatProviderModel>(context, listen: false);
if (checkIfPrivilegedForChat()) { if (checkIfPrivilegedForChat()) {
_bHubCon(); _bHubCon();
} }
@ -117,6 +117,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
} }
Future<void> checkHubCon() async { Future<void> checkHubCon() async {
// chatHubConnection = await context.read<ChatProviderModel>().getHubConnection();
if (chatHubConnection.state == HubConnectionState.Connected) { if (chatHubConnection.state == HubConnectionState.Connected) {
await chatHubConnection.stop(); await chatHubConnection.stop();
await chatHubConnection.start(); await chatHubConnection.start();
@ -151,7 +152,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
data.fetchLeaveTicketBalance(context, DateTime.now()); data.fetchLeaveTicketBalance(context, DateTime.now());
data.fetchMenuEntries(); data.fetchMenuEntries();
data.fetchEventActivity(); data.fetchEventActivity();
data.getCategoryOffersListAPI(context); // data.getCategoryOffersListAPI(context);
marathonProvider.getMarathonDetailsFromApi(); marathonProvider.getMarathonDetailsFromApi();
marathonProvider.getMarathonTutorial(); marathonProvider.getMarathonTutorial();
if (isFromInit) { if (isFromInit) {
@ -175,10 +176,11 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
if (list[ermIndex].notificationType == "Survey") { if (list[ermIndex].notificationType == "Survey") {
await Navigator.pushNamed(context, AppRoutes.survey, arguments: response.mohemmItgResponseItem!.result!.data!.first); await Navigator.pushNamed(context, AppRoutes.survey, arguments: response.mohemmItgResponseItem!.result!.data!.first);
} else { } else {
await Navigator.pushNamed(context, AppRoutes.advertisement, arguments: { await Navigator.pushNamed(
"masterId": list[ermIndex].notificationMasterId, context,
"advertisement": response.mohemmItgResponseItem!.result!.data!.first.advertisement, AppRoutes.advertisement,
}); arguments: {"masterId": list[ermIndex].notificationMasterId, "advertisement": response.mohemmItgResponseItem!.result!.data!.first.advertisement},
);
} }
} }
ermIndex++; ermIndex++;
@ -235,88 +237,84 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return SafeArea(
key: _scaffoldState, bottom: Platform.isAndroid ? true : false,
body: Column( top: false,
children: [ child: Scaffold(
Row( key: _scaffoldState,
children: [ body: Column(
Builder(builder: (BuildContext context) { children: [
return Row( Row(
mainAxisSize: MainAxisSize.min, children: [
children: [ Builder(
Image.memory( builder: (BuildContext context) {
Utils.dataFromBase64String( return Row(
AppState().memberInformationList!.eMPLOYEEIMAGE ?? "", mainAxisSize: MainAxisSize.min,
), children: [
errorBuilder: (BuildContext context, Object error, StackTrace? stackTrace) { Image.memory(
return SvgPicture.asset( Utils.dataFromBase64String(AppState().memberInformationList!.eMPLOYEEIMAGE ?? ""),
"assets/images/user.svg", errorBuilder: (BuildContext context, Object error, StackTrace? stackTrace) {
height: 34, return SvgPicture.asset("assets/images/user.svg", height: 34, width: 34);
},
width: 34, width: 34,
); height: 34,
}, fit: BoxFit.cover,
width: 34, ).circle(50),
height: 34, // CircularAvatar(
fit: BoxFit.cover, // width: 34,
).circle(50), // height: 34,
// CircularAvatar( // url: "https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png",
// width: 34, // ),
// height: 34, 8.width,
// url: "https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png", SvgPicture.asset("assets/images/side_nav.svg"),
// ), ],
8.width, ).onPress(() {
SvgPicture.asset("assets/images/side_nav.svg"), _scaffoldState.currentState!.openDrawer();
], });
).onPress(() { },
_scaffoldState.currentState!.openDrawer(); ),
}); Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28).expanded,
}), SvgPicture.asset("assets/images/announcements.svg", matchTextDirection: true).onPress(() async {
Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28).expanded, await Navigator.pushNamed(context, AppRoutes.announcements);
SvgPicture.asset( }),
"assets/images/announcements.svg", ],
matchTextDirection: true, ).paddingOnly(left: 21, right: 21, top: 48, bottom: 7),
).onPress(() async { Expanded(
await Navigator.pushNamed(context, AppRoutes.announcements); child: SmartRefresher(
}) enablePullDown: true,
], enablePullUp: false,
).paddingOnly(left: 21, right: 21, top: 48, bottom: 7), header: const MaterialClassicHeader(color: MyColors.gradiantEndColor),
Expanded( controller: _refreshController,
child: SmartRefresher( onRefresh: () {
enablePullDown: true, _onRefresh(false);
enablePullUp: false, },
header: const MaterialClassicHeader( child: SingleChildScrollView(
color: MyColors.gradiantEndColor, child: Column(
), children: [
controller: _refreshController, Column(
onRefresh: () { crossAxisAlignment: CrossAxisAlignment.start,
_onRefresh(false); children: <Widget>[
}, LocaleKeys.welcomeBack.tr().toText14(color: MyColors.grey77Color),
child: SingleChildScrollView( (AppState().memberInformationList!.eMPLOYEENAME ?? "").toText24(isBold: true),
child: Column( 16.height,
children: [ Row(
Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Expanded(
children: <Widget>[ child: AspectRatio(
LocaleKeys.welcomeBack.tr().toText14(color: MyColors.grey77Color), aspectRatio: 159 / 159,
(AppState().memberInformationList!.eMPLOYEENAME ?? "").toText24(isBold: true), child: Consumer<DashboardProviderModel>(
16.height, builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
Row( return (model.isAttendanceTrackingLoading
children: [ ? GetAttendanceTrackingShimmer()
Expanded( : Container(
child: AspectRatio(
aspectRatio: 159 / 159,
child: Consumer<DashboardProviderModel>(
builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
return (model.isAttendanceTrackingLoading
? GetAttendanceTrackingShimmer()
: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
gradient: const LinearGradient(transform: GradientRotation(.46), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [ gradient: const LinearGradient(
MyColors.gradiantEndColor, transform: GradientRotation(.46),
MyColors.gradiantStartColor, begin: Alignment.topRight,
]), end: Alignment.bottomLeft,
colors: [MyColors.gradiantEndColor, MyColors.gradiantStartColor],
),
), ),
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
@ -371,9 +369,10 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.checkIn.tr().toText12(color: Colors.white), LocaleKeys.checkIn.tr().toText12(color: Colors.white),
(model.attendanceTracking!.pSwipeIn == null ? "--:--" : model.attendanceTracking!.pSwipeIn) (model.attendanceTracking!.pSwipeIn == null ? "--:--" : model.attendanceTracking!.pSwipeIn).toString().toText14(
.toString() color: Colors.white,
.toText14(color: Colors.white, isBold: true), isBold: true,
),
4.height, 4.height,
], ],
).paddingOnly(left: 12, right: 12), ).paddingOnly(left: 12, right: 12),
@ -384,19 +383,15 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
height: 45, height: 45,
padding: const EdgeInsets.only(left: 10, right: 10), padding: const EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xff259EA4), color: const Color(0xff259EA4),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
bottomRight: AppState().isArabic(context) ? Radius.circular(0) : Radius.circular(15), bottomRight: AppState().isArabic(context) ? const Radius.circular(0) : const Radius.circular(15),
bottomLeft: AppState().isArabic(context) ? Radius.circular(15) : Radius.circular(0), bottomLeft: AppState().isArabic(context) ? const Radius.circular(15) : const Radius.circular(0),
), ),
), ),
child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/biometrics.svg" : "assets/images/biometrics.svg"), child: SvgPicture.asset(model.isTimeRemainingInSeconds == 0 ? "assets/images/biometrics.svg" : "assets/images/biometrics.svg"),
).onPress(() { ).onPress(() {
showMyBottomSheet( showMyBottomSheet(context, callBackFunc: () {}, child: MarkAttendanceWidget(model, isFromDashboard: true));
context,
callBackFunc: () {},
child: MarkAttendanceWidget(model, isFromDashboard: true),
);
}), }),
], ],
), ),
@ -404,324 +399,306 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
), ),
], ],
), ),
).onPress( ).onPress(() {
() { Navigator.pushNamed(context, AppRoutes.todayAttendance);
Navigator.pushNamed(context, AppRoutes.todayAttendance); }))
}, .animatedSwither();
)) },
.animatedSwither(); ),
},
), ),
), ),
), 9.width,
9.width, Expanded(child: MenusWidget()),
Expanded( ],
child: MenusWidget(), ),
), ],
], ).paddingOnly(left: 21, right: 21, top: 7, bottom: 21),
), eventActivityWidget(context),
], Column(
).paddingOnly(left: 21, right: 21, top: 7, bottom: 21),
eventActivityWidget(context),
Consumer<DashboardProviderModel>(builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
if (!model.isOffersLoading && model.getOffersList.isEmpty) {
return const SizedBox();
}
return Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Directionality(
crossAxisAlignment: CrossAxisAlignment.center, textDirection: AppState().isArabic(context) ? ui.TextDirection.rtl : ui.TextDirection.ltr,
children: [ child: Container(
Expanded( decoration: BoxDecoration(
child: Column( borderRadius: BorderRadius.circular(20),
crossAxisAlignment: CrossAxisAlignment.start, gradient: const LinearGradient(colors: [Color(0xFF91C481), Color(0xFF7CCED7)], begin: Alignment.centerLeft, end: Alignment.centerRight),
mainAxisSize: MainAxisSize.min, ),
children: [ child: Padding(
LocaleKeys.offers.tr().toText12(), padding: const EdgeInsets.all(3.0), // This creates the border width
Row( child: Container(
children: [ decoration: BoxDecoration(
LocaleKeys.discounts.tr().toText24(isBold: true), color: Colors.white,
6.width, borderRadius: BorderRadius.circular(17), // Slightly less than outer radius
Container( ),
padding: const EdgeInsets.only(left: 8, right: 8), child: Row(
decoration: BoxDecoration( mainAxisAlignment: MainAxisAlignment.spaceBetween,
color: MyColors.yellowColor, crossAxisAlignment: CrossAxisAlignment.start,
borderRadius: BorderRadius.circular(10), children: [
Expanded(
flex: 4,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Row(
children: [
Expanded(
flex: 2,
child: RichText(
text:
AppState().isArabic(context)
? TextSpan(
children: [
TextSpan(
text: 'اطلع على مميزات',
style: TextStyle(fontSize: 16, letterSpacing: -0.2, fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins', fontWeight: FontWeight.w700, height: 24 / 16, color: Color(0xFF5D5E5E)),
),
TextSpan(
text: ' مزايا',
style: TextStyle(
fontSize: 16,
fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins',
fontWeight: FontWeight.w700,
letterSpacing: -0.2,
height: 24 / 16,
color: MyColors.mazayaRedColor, // Use your MAZAYA red color here if defined, e.g. MyColors.mazayaRed
),
),
],
)
: TextSpan(
children: [
TextSpan(
text: LocaleKeys.explore.tr() + ' ',
style: const TextStyle(fontSize: 16, letterSpacing: -0.2, fontFamily: 'Poppins', fontWeight: FontWeight.w700, height: 24 / 16, color: Color(0xFF5D5E5E)),
),
TextSpan(
text: LocaleKeys.mazaya.tr(),
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
letterSpacing: -0.2,
height: 24 / 16,
color: MyColors.mazayaRedColor, // Use your MAZAYA red color here if defined, e.g. MyColors.mazayaRed
),
),
TextSpan(
text: ' ' + LocaleKeys.benefits.tr(),
style: const TextStyle(fontSize: 16, letterSpacing: -0.2,
fontFamily: 'Poppins',fontWeight: FontWeight.w700, height: 24 / 16, color: Color(0xFF5D5E5E)),
),
],
),
),
),
const Expanded(flex: 1, child: SizedBox()),
],
), ),
child: LocaleKeys.newString.tr().toText10(isBold: true)), const SizedBox(height: 8),
], LocaleKeys.mazayaDesc.tr().toText11(color: const Color(0xFF5D5E5E)),
), ],
], ),
),
Expanded(
flex: 2,
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [
SvgPicture.asset("assets/icons/mazaya_brand.svg", width: 90, height: 47),
const SizedBox(height: 28),
LocaleKeys.viewallofferMazaya.tr().toText12(isUnderLine: true, color: const Color(0xFF3B3D4A)).onPress(() {
Navigator.pushNamed(context, AppRoutes.offersAndDiscounts);
}),
],
),
),
],
).paddingOnly(left: 21, right: 21, top: 14, bottom: 14),
), ),
), ),
LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() { ).paddingOnly(left: 21, right: 21, top: 0, bottom: 21),
Navigator.pushNamed(context, AppRoutes.offersAndDiscounts);
})
],
).paddingOnly(left: 21, right: 21),
Consumer<DashboardProviderModel>(
builder: (BuildContext context, DashboardProviderModel model, Widget? child) {
return SizedBox(
height: 103 + 33,
child: ListView.separated(
shrinkWrap: true,
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.only(left: 21, right: 21, top: 13),
scrollDirection: Axis.horizontal,
itemBuilder: (BuildContext cxt, int index) {
return model.isOffersLoading
? const OffersShimmerWidget()
: InkWell(
onTap: () {
navigateToDetails(data.getOffersList[index]);
},
child: SizedBox(
width: 73,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 73,
height: 73,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.all(
Radius.circular(100),
),
border: Border.all(color: MyColors.lightGreyE3Color, width: 1),
),
child: ClipRRect(
borderRadius: const BorderRadius.all(
Radius.circular(50),
),
child: Hero(
tag: "ItemImage" + data.getOffersList[index].offersDiscountId.toString()!,
transitionOnUserGestures: true,
child: Image.network(
data.getOffersList[index].logo ?? "",
fit: BoxFit.contain,
),
),
),
),
4.height,
Expanded(
child: AppState().isArabic(context)
? data.getOffersList[index].titleAr!.toText12(isCenter: true, maxLine: 1)
: data.getOffersList[index].titleEn!.toText12(isCenter: true, maxLine: 1),
),
],
),
),
);
},
separatorBuilder: (BuildContext cxt, int index) => 8.width,
itemCount: 9),
);
},
), ),
], ],
);
}),
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( Container(
mainAxisSize: MainAxisSize.min, width: double.infinity,
children: [ padding: const EdgeInsets.only(top: 31),
ServicesWidget(), decoration: BoxDecoration(
context.watch<MarathonProvider>().isLoading ? const MarathonBannerShimmer().paddingAll(20) : const MarathonBanner().paddingOnly(left: 21, right: 21, bottom: 8, top: 8), color: Colors.white,
// context.watch<MarathonProvider>().isTutorialLoading borderRadius: const BorderRadius.only(topRight: Radius.circular(50), topLeft: Radius.circular(50)),
// ? const MarathonBannerShimmer().paddingAll(20) border: Border.all(color: MyColors.lightGreyEDColor, width: 1),
// : Container( ),
// padding: EdgeInsets.only(bottom: 12, top: 12), child: Column(
// margin: EdgeInsets.only(left: 21, right: 21, bottom: 21, top: 8), mainAxisSize: MainAxisSize.min,
// width: double.infinity, children: [
// alignment: Alignment.center, ServicesWidget(),
// decoration: BoxDecoration( context.watch<MarathonProvider>().isLoading ? const MarathonBannerShimmer().paddingAll(20) : const MarathonBanner().paddingOnly(left: 21, right: 21, bottom: 8, top: 8),
// color: MyColors.backgroundBlackColor, // context.watch<MarathonProvider>().isTutorialLoading
// borderRadius: BorderRadius.circular(20), // ? const MarathonBannerShimmer().paddingAll(20)
// border: Border.all(color: MyColors.lightGreyEDColor, width: 1), // : Container(
// ), // padding: EdgeInsets.only(bottom: 12, top: 12),
// child: Column( // margin: EdgeInsets.only(left: 21, right: 21, bottom: 21, top: 8),
// crossAxisAlignment: CrossAxisAlignment.start, // width: double.infinity,
// mainAxisSize: MainAxisSize.min, // alignment: Alignment.center,
// children: [ // decoration: BoxDecoration(
// Text( // color: MyColors.backgroundBlackColor,
// "Tutorial:", // borderRadius: BorderRadius.circular(20),
// style: TextStyle( // border: Border.all(color: MyColors.lightGreyEDColor, width: 1),
// fontSize: 11, // ),
// fontStyle: FontStyle.italic, // child: Column(
// fontWeight: FontWeight.w600, // crossAxisAlignment: CrossAxisAlignment.start,
// color: MyColors.white.withOpacity(0.83), // mainAxisSize: MainAxisSize.min,
// letterSpacing: -0.4, // children: [
// ), // Text(
// ), // "Tutorial:",
// Text( // style: TextStyle(
// context.read<MarathonProvider>().tutorial?.tutorialName ?? "", // fontSize: 11,
// overflow: TextOverflow.ellipsis, // fontStyle: FontStyle.italic,
// style: TextStyle( // fontWeight: FontWeight.w600,
// fontStyle: FontStyle.italic, // color: MyColors.white.withOpacity(0.83),
// fontSize: 19, // letterSpacing: -0.4,
// fontWeight: FontWeight.bold, // ),
// color: MyColors.white, // ),
// height: 32 / 22, // Text(
// ), // context.read<MarathonProvider>().tutorial?.tutorialName ?? "",
// ), // overflow: TextOverflow.ellipsis,
// ], // style: TextStyle(
// ), // fontStyle: FontStyle.italic,
// ).onPress(() { // fontSize: 19,
// checkERMChannel(); // fontWeight: FontWeight.bold,
// // Navigator.pushNamed(context, AppRoutes.marathonTutorialScreen); // color: MyColors.white,
// }), // height: 32 / 22,
], // ),
// ),
// ],
// ),
// ).onPress(() {
// checkERMChannel();
// // Navigator.pushNamed(context, AppRoutes.marathonTutorialScreen);
// }),
],
),
), ),
],
),
),
),
),
],
),
drawer: AppDrawer(onLanguageChange: _onRefresh),
bottomNavigationBar: SizedBox(
height: Platform.isAndroid ? 70 : 100,
child: BottomNavigationBar(
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(icon: SvgPicture.asset("assets/icons/home.svg", color: currentIndex == 0 ? MyColors.grey3AColor : MyColors.grey98Color).paddingAll(4), label: LocaleKeys.home.tr()),
BottomNavigationBarItem(
icon: SvgPicture.asset("assets/icons/create_req.svg", color: currentIndex == 1 ? MyColors.grey3AColor : MyColors.grey98Color).paddingAll(4),
label: LocaleKeys.mowadhafhiRequest.tr(),
),
BottomNavigationBarItem(
icon: Stack(
alignment: Alignment.centerLeft,
children: [
SvgPicture.asset("assets/icons/work_list.svg", color: currentIndex == 2 ? MyColors.grey3AColor : MyColors.grey98Color).paddingAll(4),
Consumer<DashboardProviderModel>(
builder: (BuildContext cxt, DashboardProviderModel data, Widget? child) {
if (data.workListCounter == 0) {
return const SizedBox();
}
return Positioned(
right: 0,
top: 0,
child: Container(
padding: const EdgeInsets.only(left: 4, right: 4),
alignment: Alignment.center,
decoration: BoxDecoration(color: MyColors.redColor, borderRadius: BorderRadius.circular(17)),
child: data.workListCounter.toString().toText10(color: Colors.white),
),
);
},
), ),
], ],
), ),
label: LocaleKeys.workList.tr(),
), ),
), BottomNavigationBarItem(
) icon: SvgPicture.asset("assets/icons/item_for_sale.svg", color: currentIndex == 3 ? MyColors.grey3AColor : MyColors.grey98Color).paddingAll(4),
], label: LocaleKeys.itemsForSale.tr(),
),
drawer: SafeArea(
child: AppDrawer(onLanguageChange: _onRefresh),
),
bottomNavigationBar: SizedBox(
height: Platform.isAndroid ? 70 : 100,
child: BottomNavigationBar(
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: SvgPicture.asset(
"assets/icons/home.svg",
color: currentIndex == 0 ? MyColors.grey3AColor : MyColors.grey98Color,
).paddingAll(4),
label: LocaleKeys.home.tr(),
),
BottomNavigationBarItem(
icon: SvgPicture.asset(
"assets/icons/create_req.svg",
color: currentIndex == 1 ? MyColors.grey3AColor : MyColors.grey98Color,
).paddingAll(4),
label: LocaleKeys.mowadhafhiRequest.tr(),
),
BottomNavigationBarItem(
icon: Stack(
alignment: Alignment.centerLeft,
children: [
SvgPicture.asset(
"assets/icons/work_list.svg",
color: currentIndex == 2 ? MyColors.grey3AColor : MyColors.grey98Color,
).paddingAll(4),
Consumer<DashboardProviderModel>(
builder: (BuildContext cxt, DashboardProviderModel data, Widget? child) {
if (data.workListCounter == 0) {
return const SizedBox();
}
return Positioned(
right: 0,
top: 0,
child: Container(
padding: const EdgeInsets.only(left: 4, right: 4),
alignment: Alignment.center,
decoration: BoxDecoration(color: MyColors.redColor, borderRadius: BorderRadius.circular(17)),
child: data.workListCounter.toString().toText10(color: Colors.white),
),
);
},
),
],
), ),
label: LocaleKeys.workList.tr(), BottomNavigationBarItem(
), icon: Stack(
BottomNavigationBarItem( alignment: Alignment.centerLeft,
icon: SvgPicture.asset( children: [
"assets/icons/item_for_sale.svg", SvgPicture.asset(
color: currentIndex == 3 ? MyColors.grey3AColor : MyColors.grey98Color, "assets/icons/chat/chat.svg",
).paddingAll(4), color:
label: LocaleKeys.itemsForSale.tr(), !checkIfPrivilegedForChat()
), ? MyColors.lightGreyE3Color
BottomNavigationBarItem( : currentIndex == 4
icon: Stack( ? MyColors.grey3AColor
alignment: Alignment.centerLeft, : cProvider.disbaleChatForThisUser
children: [ ? MyColors.lightGreyE3Color
SvgPicture.asset( : MyColors.grey98Color,
"assets/icons/chat/chat.svg", ).paddingAll(4),
color: !checkIfPrivilegedForChat() ? MyColors.lightGreyE3Color : currentIndex == 4 Consumer<ChatProviderModel>(
? MyColors.grey3AColor builder: (BuildContext cxt, ChatProviderModel data, Widget? child) {
: cProvider.disbaleChatForThisUser return !checkIfPrivilegedForChat()
? MyColors.lightGreyE3Color ? const SizedBox()
: MyColors.grey98Color, : Positioned(
).paddingAll(4), right: 0,
Consumer<ChatProviderModel>( top: 0,
builder: (BuildContext cxt, ChatProviderModel data, Widget? child) { child: Container(
return !checkIfPrivilegedForChat() ? const SizedBox() : Positioned( padding: const EdgeInsets.only(left: 4, right: 4),
right: 0, alignment: Alignment.center,
top: 0, decoration: BoxDecoration(color: cProvider.disbaleChatForThisUser ? MyColors.pinkDarkColor : MyColors.redColor, borderRadius: BorderRadius.circular(17)),
child: Container( child: data.chatUConvCounter.toString().toText10(color: Colors.white),
padding: const EdgeInsets.only(left: 4, right: 4), ),
alignment: Alignment.center, );
decoration: BoxDecoration(color: cProvider.disbaleChatForThisUser ? MyColors.pinkDarkColor : MyColors.redColor, borderRadius: BorderRadius.circular(17)), },
child: data.chatUConvCounter.toString().toText10(color: Colors.white), ),
), ],
); ),
}, label: LocaleKeys.chat.tr(),
),
],
), ),
label: LocaleKeys.chat.tr(), ],
), currentIndex: currentIndex,
], selectedLabelStyle: const TextStyle(fontSize: 10, color: MyColors.grey3AColor, fontWeight: FontWeight.w600),
currentIndex: currentIndex, unselectedLabelStyle: const TextStyle(fontSize: 10, color: MyColors.grey98Color, fontWeight: FontWeight.w600),
selectedLabelStyle: const TextStyle(fontSize: 10, color: MyColors.grey3AColor, fontWeight: FontWeight.w600), type: BottomNavigationBarType.fixed,
unselectedLabelStyle: const TextStyle(fontSize: 10, color: MyColors.grey98Color, fontWeight: FontWeight.w600), selectedItemColor: MyColors.grey3AColor,
type: BottomNavigationBarType.fixed, backgroundColor: MyColors.backgroundColor,
selectedItemColor: MyColors.grey3AColor, selectedIconTheme: const IconThemeData(color: MyColors.grey3AColor, size: 28),
backgroundColor: MyColors.backgroundColor, unselectedIconTheme: const IconThemeData(color: MyColors.grey98Color, size: 28),
selectedIconTheme: const IconThemeData(color: MyColors.grey3AColor, size: 28), onTap: (int index) {
unselectedIconTheme: const IconThemeData(color: MyColors.grey98Color, size: 28), if (index == 1) {
onTap: (int index) { Navigator.pushNamed(context, AppRoutes.mowadhafhi);
if (index == 1) { } else if (index == 2) {
Navigator.pushNamed(context, AppRoutes.mowadhafhi); Navigator.pushNamed(context, AppRoutes.workList);
} else if (index == 2) { } else if (index == 3) {
Navigator.pushNamed(context, AppRoutes.workList); Navigator.pushNamed(context, AppRoutes.itemsForSale);
} else if (index == 3) { } else if (index == 4) {
Navigator.pushNamed(context, AppRoutes.itemsForSale); if (!cProvider.disbaleChatForThisUser && checkIfPrivilegedForChat()) {
} else if (index == 4) { Navigator.pushNamed(context, AppRoutes.chat);
if (!cProvider.disbaleChatForThisUser && checkIfPrivilegedForChat()) { }
Navigator.pushNamed(context, AppRoutes.chat);
} }
} },
}, ),
), ),
), ),
); );
} }
bool checkIfPrivilegedForChat() {
for (PrivilegeListModel element in AppState().privilegeListModel!) {
if (element.serviceName?.toLowerCase() == "chat") {
if (element.previlege != null) {
return element.previlege!;
}
}
}
return false;
}
Widget eventActivityWidget(BuildContext context) { Widget eventActivityWidget(BuildContext context) {
return (context.watch<DashboardProviderModel>().isEventLoadingLoading) return (context.watch<DashboardProviderModel>().isEventLoadingLoading)
? const MarathonBannerShimmer().paddingOnly(left: 21, right: 21, bottom: 21, top: 0) ? const MarathonBannerShimmer().paddingOnly(left: 21, right: 21, bottom: 21, top: 0)
: (context.watch<DashboardProviderModel>().eventActivity != null && context.watch<DashboardProviderModel>().eventActivity!.isActive == true) : (context.watch<DashboardProviderModel>().eventActivity != null && context.watch<DashboardProviderModel>().eventActivity!.isActive == true)
? const EventActivityBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 0) ? const EventActivityBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 0)
: const SizedBox(); : const SizedBox();
} }
void navigateToDetails(OffersListModel offersListModelObj) { void navigateToDetails(OffersListModel offersListModelObj) {
@ -741,4 +718,15 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
}); });
Navigator.pushNamed(context, AppRoutes.offersAndDiscountsDetails, arguments: getOffersDetailList); Navigator.pushNamed(context, AppRoutes.offersAndDiscountsDetails, arguments: getOffersDetailList);
} }
bool checkIfPrivilegedForChat() {
for (PrivilegeListModel element in AppState().privilegeListModel!) {
if (element.serviceName?.toLowerCase() == "chat") {
if (element.previlege != null) {
return element.previlege!;
}
}
}
return false;
}
} }

@ -1,20 +1,56 @@
import 'dart:convert';
import 'dart:developer';
import 'package:easy_localization/src/public_ext.dart'; import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/inAppWebView.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/config/routes.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart'; import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/sso_auth_model.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart'; import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
import 'package:mohem_flutter_app/ui/my_attendance/services_menu_list_screen.dart'; import 'package:mohem_flutter_app/ui/my_attendance/services_menu_list_screen.dart';
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart'; import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
import 'package:mohem_flutter_app/widgets/sso_webview_widget.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class ServicesWidget extends StatelessWidget { class ServicesWidget extends StatelessWidget {
MyInAppBrowser? myInAppBrowser;
var inAppBrowserOptions = InAppBrowserClassSettings(
webViewSettings: InAppWebViewSettings(
useShouldOverrideUrlLoading: false,
transparentBackground: false,
isInspectable: false,
applePayAPIEnabled: true,
cacheEnabled: false,
allowsBackForwardNavigationGestures: false,
),
browserSettings: InAppBrowserSettings(
hideUrlBar: true,
hideTitleBar: true,
hideDefaultMenuItems: true,
hideToolbarBottom: true,
hideToolbarTop: false,
hideCloseButton: false,
allowGoBackWithBackButton: false,
toolbarBottomBackgroundColor: Colors.black,
closeButtonColor: Colors.white,
presentationStyle: ModalPresentationStyle.FULL_SCREEN,
// toolbarTopBackgroundColor: Colors.black
),
);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
List<String> namesT = [LocaleKeys.monthlyAttendance.tr(), LocaleKeys.workFromHome.tr(), LocaleKeys.ticketRequest.tr(), LocaleKeys.monthlyAttendance.tr()]; List<String> namesT = [LocaleKeys.monthlyAttendance.tr(), LocaleKeys.workFromHome.tr(), LocaleKeys.ticketRequest.tr(), LocaleKeys.monthlyAttendance.tr()];
@ -26,7 +62,7 @@ class ServicesWidget extends StatelessWidget {
"assets/images/vacation_rule.svg", "assets/images/vacation_rule.svg",
"assets/images/ticket_request.svg", "assets/images/ticket_request.svg",
"assets/images/ticket_request.svg", "assets/images/ticket_request.svg",
"assets/images/ticket_request.svg" "assets/images/ticket_request.svg",
]; ];
return Consumer<DashboardProviderModel>( return Consumer<DashboardProviderModel>(
@ -34,72 +70,69 @@ class ServicesWidget extends StatelessWidget {
return data.isServicesMenusLoading return data.isServicesMenusLoading
? whileLoading() ? whileLoading()
: ListView.separated( : ListView.separated(
padding: const EdgeInsets.only(top: 0), padding: const EdgeInsets.only(top: 0),
itemBuilder: (context, parentIndex) { itemBuilder: (context, parentIndex) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
data.homeMenus![parentIndex].menuEntry.prompt!.toSectionHeading().paddingOnly(left: 21, right: 21), data.homeMenus![parentIndex].menuEntry.prompt!.toSectionHeading().paddingOnly(left: 21, right: 21),
SizedBox( SizedBox(
height: 105 + 26, height: 105 + 26,
child: ListView.separated( child: ListView.separated(
shrinkWrap: true, shrinkWrap: true,
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13), padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13),
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemBuilder: (cxt, index) { itemBuilder: (cxt, index) {
return AspectRatio( return AspectRatio(
aspectRatio: 105 / 105, aspectRatio: 105 / 105,
child: data.isServicesMenusLoading child:
data.isServicesMenusLoading
? ServicesMenuShimmer() ? ServicesMenuShimmer()
: Container( : Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
boxShadow: [ boxShadow: [BoxShadow(color: const Color(0xff000000).withOpacity(.05), blurRadius: 26, offset: const Offset(0, -3))],
BoxShadow( ),
color: const Color(0xff000000).withOpacity(.05), child: Column(
blurRadius: 26, mainAxisAlignment: MainAxisAlignment.spaceBetween,
offset: const Offset(0, -3), crossAxisAlignment: CrossAxisAlignment.start,
), children: [
], SvgPicture.asset(
), AppState().isArabic(context)
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(AppState().isArabic(context)
? getMenuIconAr(data.homeMenus![parentIndex].menuEntiesList[index].prompt!) ? getMenuIconAr(data.homeMenus![parentIndex].menuEntiesList[index].prompt!)
: getMenuIconEn(data.homeMenus![parentIndex].menuEntiesList[index].prompt!)), : getMenuIconEn(data.homeMenus![parentIndex].menuEntiesList[index].prompt!),
Row( ),
crossAxisAlignment: CrossAxisAlignment.end, Row(
children: [ crossAxisAlignment: CrossAxisAlignment.end,
Expanded( children: [
child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText11(isBold: true), Expanded(child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText11(isBold: true)),
), RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)),
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),
).paddingOnly(left: 10, right: 10, bottom: 10, top: 12), ).onPress(() {
).onPress(() { handleOnPress(context, data.homeMenus![parentIndex].menuEntiesList[index]);
handleOnPress(context, data.homeMenus![parentIndex].menuEntiesList[index]); }),
}), );
); },
}, separatorBuilder: (cxt, index) => 9.width,
separatorBuilder: (cxt, index) => 9.width, itemCount: data.homeMenus![parentIndex].menuEntiesList.length,
itemCount: data.homeMenus![parentIndex].menuEntiesList.length),
), ),
], ),
); ],
}, );
separatorBuilder: (context, index) { },
return 12.height; separatorBuilder: (context, index) {
}, return 12.height;
shrinkWrap: true, },
physics: const NeverScrollableScrollPhysics(), shrinkWrap: true,
itemCount: data.homeMenus!.length); physics: const NeverScrollableScrollPhysics(),
itemCount: data.homeMenus!.length,
);
}, },
); );
} }
@ -196,7 +229,7 @@ class ServicesWidget extends StatelessWidget {
return returnImage; return returnImage;
} }
void handleOnPress(context, GetMenuEntriesList menuEntry) { Future<void> handleOnPress(context, GetMenuEntriesList menuEntry) async {
var pro = Provider.of<DashboardProviderModel>(context, listen: false); var pro = Provider.of<DashboardProviderModel>(context, listen: false);
if (menuEntry.requestType == "MONTHLY_ATTENDANCE") { if (menuEntry.requestType == "MONTHLY_ATTENDANCE") {
Navigator.pushNamed(context, AppRoutes.monthlyAttendance); Navigator.pushNamed(context, AppRoutes.monthlyAttendance);
@ -220,9 +253,28 @@ class ServicesWidget extends StatelessWidget {
Navigator.pushNamed(context, AppRoutes.monthlyPaySlip); Navigator.pushNamed(context, AppRoutes.monthlyPaySlip);
} }
} else { } else {
List<GetMenuEntriesList> _menuList = if (menuEntry.menuName == "HMG_TICKET_REQUESTS") {
pro.getMenuEntriesList?.where((element) => element.parentMenuName == menuEntry.menuName && (element.menuEntryType == "FUNCTION" || element.menuEntryType == "MENU")).toList() ?? []; Utils.showLoading(context);
Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen, arguments: ServicesMenuListScreenParams(menuEntry.prompt!, _menuList.isEmpty ? menuList : _menuList)); TicketBookingResult response = await pro.fetchTicketBooking();
Utils.hideLoading(context);
if (response.success) {
SSOAuthModel? ssoToken = await pro.fetchSSOAuthRedirection(clientID: response.clientId);
if (ssoToken != null) {
logger.d(ssoToken.data!.toJson());
logger.d(ssoToken.data!.accessToken);
dynamic url = await pro.fetchURLRedirection(token: ssoToken.data!.accessToken!);
Navigator.push(context, MaterialPageRoute(builder: (context) => SsoLoginWebView(url: url ?? "", jwtToken: ssoToken.data!.accessToken!)));
}
} else {
List<GetMenuEntriesList> _menuList =
pro.getMenuEntriesList?.where((element) => element.parentMenuName == menuEntry.menuName && (element.menuEntryType == "FUNCTION" || element.menuEntryType == "MENU")).toList() ?? [];
Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen, arguments: ServicesMenuListScreenParams(menuEntry.prompt!, _menuList.isEmpty ? menuList : _menuList));
}
} else {
List<GetMenuEntriesList> _menuList =
pro.getMenuEntriesList?.where((element) => element.parentMenuName == menuEntry.menuName && (element.menuEntryType == "FUNCTION" || element.menuEntryType == "MENU")).toList() ?? [];
Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen, arguments: ServicesMenuListScreenParams(menuEntry.prompt!, _menuList.isEmpty ? menuList : _menuList));
}
} }
return; return;
} }
@ -253,10 +305,7 @@ class ServicesWidget extends StatelessWidget {
padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13), padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13),
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemBuilder: (cxt, index) { itemBuilder: (cxt, index) {
return AspectRatio( return AspectRatio(aspectRatio: 105 / 105, child: ServicesMenuShimmer());
aspectRatio: 105 / 105,
child: ServicesMenuShimmer(),
);
}, },
separatorBuilder: (cxt, index) => 9.width, separatorBuilder: (cxt, index) => 9.width,
itemCount: 4, itemCount: 4,

@ -4,8 +4,9 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
import 'package:local_auth_darwin/local_auth_darwin.dart';
import 'package:local_auth_android/local_auth_android.dart';
import 'package:mohem_flutter_app/api/login_api_client.dart'; import 'package:mohem_flutter_app/api/login_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
@ -65,6 +66,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
surfaceTintColor: Colors.transparent,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false) title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false)
@ -74,6 +76,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
: Container(), : Container(),
actions: [ actions: [
Center( Center(
child: LocaleKeys.employeeDigitalID.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() { child: LocaleKeys.employeeDigitalID.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: EmployeeDigitialIdDialog()); showMDialog(context, child: EmployeeDigitialIdDialog());
}), }),
@ -204,15 +207,26 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
} }
Future<bool> loginWithFaceIDAndBiometrics() async { Future<bool> loginWithFaceIDAndBiometrics() async {
IOSAuthMessages iosStrings = const IOSAuthMessages(
cancelButton: 'cancel', IOSAuthMessages iosStrings = const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
goToSettingsButton: 'settings',
goToSettingsDescription: 'Please set up your Touch ID.', // IOSAuthMessages iosStrings = const IOSAuthMessages(
lockOut: 'Please reenable your Touch ID', // cancelButton: 'cancel',
); // goToSettingsButton: 'settings',
// goToSettingsDescription: 'Please set up your Touch ID.',
// lockOut: 'Please reenable your Touch ID',
// );
bool authenticated = false; bool authenticated = false;
try { 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', options: const AuthenticationOptions(
useErrorDialogs: true, stickyAuth: true, biometricOnly: true,
),
authMessages: [
iosStrings,
const AndroidAuthMessages(),
],
);
} on PlatformException catch (e) { } on PlatformException catch (e) {
print(e); print(e);
Utils.hideLoading(context); Utils.hideLoading(context);
@ -222,8 +236,22 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
} }
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) { Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) {
bool isDisable = (_flag == 3 && !checkBiometricIsAvailable(BiometricType.face) || // <<<<<<< HEAD
_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint) && _flag == 4 && !checkBiometricIsAvailable(BiometricType.face)); bool isDisable = false;
if(_flag >= 3 && _flag <= 4) {
bool isFaceEnabled = (_flag == 3 && (checkBiometricIsAvailable(BiometricType.face) ||
checkBiometricIsAvailable(BiometricType.weak)));
bool isThumbEnabled =
(_flag == 4 && (checkBiometricIsAvailable(BiometricType.fingerprint) ||
checkBiometricIsAvailable(BiometricType.strong)));
isDisable = !(isFaceEnabled || isThumbEnabled);
}
// =======
// bool isDisable = (_flag == 3 && !checkBiometricIsAvailable(BiometricType.face) ||
// _flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint) && _flag == 4 && !checkBiometricIsAvailable(BiometricType.face));
// // >>>>>>> master
return InkWell( return InkWell(
onTap: isDisable onTap: isDisable
? null ? null

@ -4,7 +4,8 @@ import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:local_auth/auth_strings.dart'; import 'package:local_auth_darwin/local_auth_darwin.dart';
import 'package:local_auth_android/local_auth_android.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
import 'package:mohem_flutter_app/api/login_api_client.dart'; import 'package:mohem_flutter_app/api/login_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart';
@ -517,7 +518,11 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID'); const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
bool authenticated = false; bool authenticated = false;
try { 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',
options: const AuthenticationOptions(useErrorDialogs: true, stickyAuth: true, biometricOnly: true,), authMessages: [
iosStrings,
const AndroidAuthMessages(),
],);
} on PlatformException catch (e) { } on PlatformException catch (e) {
print(e); print(e);
Utils.hideLoading(context); Utils.hideLoading(context);
@ -527,25 +532,17 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} }
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) { Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) {
bool isDisable = (_flag == 3 && !checkBiometricIsAvailable(BiometricType.face) || bool isDisable = false;
_flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint) && _flag == 4 && !checkBiometricIsAvailable(BiometricType.face)); if(_flag >= 3 && _flag <= 4) {
// bool isDisable = false; bool isFaceEnabled = (_flag == 3 && (checkBiometricIsAvailable(BiometricType.face) ||
// switch (_flag) { checkBiometricIsAvailable(BiometricType.weak)));
// case 3:
// isDisable = !(checkBiometricIsAvailable(BiometricType.face) || bool isThumbEnabled =
// checkBiometricIsAvailable(BiometricType.weak)); (_flag == 4 && (checkBiometricIsAvailable(BiometricType.fingerprint) ||
// break; checkBiometricIsAvailable(BiometricType.strong)));
// case 4:
// isDisable = !(checkBiometricIsAvailable(BiometricType.fingerprint) || isDisable = !(isFaceEnabled || isThumbEnabled);
// checkBiometricIsAvailable(BiometricType.strong)); }
// break;
// }
// // bool isDisable = ((_flag == 3 &&
// // (!checkBiometricIsAvailable(BiometricType.face) ||
// // !checkBiometricIsAvailable(BiometricType.weak))) ||
// // (_flag == 4 &&
// // (!checkBiometricIsAvailable(BiometricType.fingerprint) ||
// // !checkBiometricIsAvailable(BiometricType.strong))));
return InkWell( return InkWell(
onTap: isDisable onTap: isDisable
? null ? null

@ -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/models/my_team/get_employee_subordinates_list.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.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:pie_chart/pie_chart.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart'; import 'package:syncfusion_flutter_calendar/calendar.dart';

@ -16,7 +16,7 @@ import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart'; import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:share/share.dart'; import 'package:share_plus/share_plus.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class OffersAndDiscountsDetails extends StatefulWidget { class OffersAndDiscountsDetails extends StatefulWidget {
@ -61,13 +61,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
// transitionOnUserGestures: true, // transitionOnUserGestures: true,
child: RepaintBoundary( child: RepaintBoundary(
key: _globalKey, key: _globalKey,
child: ClipRRect( child: ClipRRect(borderRadius: BorderRadius.circular(6), child: Image.network(getOffersList[0].bannerImage ?? "", fit: BoxFit.contain)).paddingAll(12),
borderRadius: BorderRadius.circular(6),
child: Image.network(
getOffersList[0].bannerImage ?? "",
fit: BoxFit.contain,
),
).paddingAll(12),
), ),
), ),
8.height, 8.height,
@ -87,19 +81,20 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
children: [ children: [
getOffersList[0].discountDescription!.toText16(isBold: true), getOffersList[0].discountDescription!.toText16(isBold: true),
InkWell( InkWell(
onTap: () { onTap: () {
_shareOfferAsImage(); _shareOfferAsImage();
}, },
child: const Icon(Icons.share, color: MyColors.darkIconColor).paddingOnly(bottom: 4)) child: const Icon(Icons.share, color: MyColors.darkIconColor).paddingOnly(bottom: 4),
),
], ],
).paddingOnly(left: 8, right: 8), ).paddingOnly(left: 8, right: 8),
getOffersList[0].isHasLocation == "true" getOffersList[0].isHasLocation == "true"
? InkWell( ? InkWell(
onTap: () {}, onTap: () {},
child: Row( child: Row(
children: [const Icon(Icons.map_sharp, color: MyColors.darkIconColor).paddingOnly(bottom: 4), "Offer Location".toText16(isUnderLine: true).paddingOnly(left: 8)], children: [const Icon(Icons.map_sharp, color: MyColors.darkIconColor).paddingOnly(bottom: 4), "Offer Location".toText16(isUnderLine: true).paddingOnly(left: 8)],
).paddingOnly(left: 8, right: 8, top: 8), ).paddingOnly(left: 8, right: 8, top: 8),
) )
: 12.height, : 12.height,
], ],
).objectContainerView().paddingOnly(left: 21, right: 21, top: 21), ).objectContainerView().paddingOnly(left: 21, right: 21, top: 21),
@ -127,18 +122,14 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
Directory tempDir = await getTemporaryDirectory(); Directory tempDir = await getTemporaryDirectory();
File file = await File('${tempDir.path}/${DateTime.now().toString()}.png').create(); File file = await File('${tempDir.path}/${DateTime.now().toString()}.png').create();
await file.writeAsBytes(pngBytes); await file.writeAsBytes(pngBytes);
await Share.shareFiles([(file.path)], text: AppState().isArabic(context) ? getOffersList[0].titleAr : getOffersList[0].titleEn); await SharePlus.instance.share(ShareParams(files: [(XFile(file.path))], text: AppState().isArabic(context) ? getOffersList[0].titleAr : getOffersList[0].titleEn));
} catch (ex) { } catch (ex) {
debugPrint(ex.toString()); debugPrint(ex.toString());
} }
} }
void _scrollToTop() { void _scrollToTop() {
_scrollController.animateTo( _scrollController.animateTo(0, duration: const Duration(milliseconds: 500), curve: Curves.linear);
0,
duration: const Duration(milliseconds: 500),
curve: Curves.linear,
);
} }
List<Widget> getItemsForSaleWidgets() { List<Widget> getItemsForSaleWidgets() {
@ -155,18 +146,9 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Hero( Hero(
tag: "ItemImage" + getOffersList.offersDiscountId.toString()!, tag: "ItemImage" + getOffersList.offersDiscountId.toString(),
transitionOnUserGestures: true, transitionOnUserGestures: true,
child: AspectRatio( child: AspectRatio(aspectRatio: 148 / 127, child: ClipRRect(borderRadius: BorderRadius.circular(6), child: Image.network(getOffersList.bannerImage ?? "", fit: BoxFit.contain))),
aspectRatio: 148 / 127,
child: ClipRRect(
borderRadius: BorderRadius.circular(6),
child: Image.network(
getOffersList.bannerImage ?? "",
fit: BoxFit.contain,
),
),
),
), ),
5.height, 5.height,
getOffersList.titleEn!.toText16(isBold: true, color: const Color(0xff2B353E), maxlines: 1), getOffersList.titleEn!.toText16(isBold: true, color: const Color(0xff2B353E), maxlines: 1),
@ -180,10 +162,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
// 16.height, // 16.height,
getOffersList.discountDescription!.toText14(isBold: true, maxlines: 1), getOffersList.discountDescription!.toText14(isBold: true, maxlines: 1),
8.height, 8.height,
Row( Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [checkDate(getOffersList.endDate!), SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)]),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [checkDate(getOffersList.endDate!), SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)],
),
], ],
).objectContainerView().onPress(() { ).objectContainerView().onPress(() {
this.getOffersList[0] = getOffersList; this.getOffersList[0] = getOffersList;

@ -39,7 +39,7 @@ class _OffersAndDiscountsHomeState extends State<OffersAndDiscountsHome> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: AppBarWidget(context, title: LocaleKeys.offerAndDiscounts.tr(), showHomeButton: true), appBar: AppBarWidget(context, title: LocaleKeys.offerAndDiscounts.tr(), showHomeButton: true, showLogo: true, logoPath: "assets/icons/mazaya_brand.svg"),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

File diff suppressed because one or more lines are too long

@ -61,6 +61,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
int animationIndex = 0; int animationIndex = 0;
PageController controller = PageController(); PageController controller = PageController();
bool showFabOptions = false; bool showFabOptions = false;
bool isShowActions = false;
WorkListResponseModel? workListData; WorkListResponseModel? workListData;
MemberInformationListModel? memberInformationListModel; MemberInformationListModel? memberInformationListModel;
@ -286,6 +287,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
: ActionsFragment( : ActionsFragment(
workListData!.nOTIFICATIONID, workListData!.nOTIFICATIONID,
actionHistoryList, actionHistoryList,
isShowActions,
voidCallback: reloadWorkList, voidCallback: reloadWorkList,
) )
: showLoadingAnimation(), : showLoadingAnimation(),
@ -713,7 +715,6 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
"P_NOTIFICATION_ID": workListData!.nOTIFICATIONID, "P_NOTIFICATION_ID": workListData!.nOTIFICATIONID,
"RespondAttributeList": responseAttribute, "RespondAttributeList": responseAttribute,
}; };
if (actionMode == "APPROVED" || if (actionMode == "APPROVED" ||
actionMode == "APPROVE" || actionMode == "APPROVE" ||
actionMode == "CLOSE" || actionMode == "CLOSE" ||
@ -1078,6 +1079,14 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
} }
return false; return false;
}); });
if(notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "DELEGATE" || element.bUTTONACTION == "REQUEST_INFO" )) {
isShowActions = true;
} else {
isShowActions = false;
}
} }
apiCallCount--; apiCallCount--;
if (apiCallCount == 0) { if (apiCallCount == 0) {

@ -17,8 +17,9 @@ class ActionsFragment extends StatelessWidget {
int? notificationID; int? notificationID;
List<GetActionHistoryList> actionHistoryList; List<GetActionHistoryList> actionHistoryList;
VoidCallback voidCallback; VoidCallback voidCallback;
bool isShowActions = false;
ActionsFragment(this.notificationID, this.actionHistoryList, {Key? key, required this.voidCallback}) : super(key: key); ActionsFragment(this.notificationID, this.actionHistoryList, this.isShowActions, {Key? key, required this.voidCallback}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -113,42 +114,41 @@ class ActionsFragment extends StatelessWidget {
], ],
).paddingOnly(top: 19, left: 16, right: 16, bottom: 12), ).paddingOnly(top: 19, left: 16, right: 16, bottom: 12),
Container(width: double.infinity, height: 1, color: MyColors.lightGreyEFColor), Container(width: double.infinity, height: 1, color: MyColors.lightGreyEFColor),
Row( isShowActions
children: [ ? Row(
LocaleKeys.request_info.tr().toText12(color: MyColors.grey67Color).center.paddingOnly(top: 6, bottom: 6).onPress(() { children: [
showMyBottomSheet( LocaleKeys.request_info.tr().toText12(color: MyColors.grey67Color).center.paddingOnly(top: 6, bottom: 6).onPress(() {
context, showMyBottomSheet(
callBackFunc: voidCallback, context,
child: SelectedItemSheet(LocaleKeys.request_info.tr(), apiMode: "REQUEST_INFO", notificationID: notificationID, actionHistoryList: actionHistory),
);
}).expanded,
Container(width: 1, height: 30, color: MyColors.lightGreyEFColor),
LocaleKeys.delegate.tr().toText12(color: MyColors.gradiantEndColor).center.paddingOnly(top: 6, bottom: 6).onPress(() {
if (actionHistory.uSERNAME == AppState().memberInformationList?.eMPLOYEENUMBER) {
showMyBottomSheet(context,
callBackFunc: voidCallback, callBackFunc: voidCallback,
child: DelegateSheet( child: SelectedItemSheet(LocaleKeys.request_info.tr(), apiMode: "REQUEST_INFO", notificationID: notificationID, actionHistoryList: actionHistory),
title: LocaleKeys.delegate.tr(), );
apiMode: "DELEGATE", }).expanded,
notificationID: notificationID, Container(width: 1, height: 30, color: MyColors.lightGreyEFColor),
actionHistoryList: actionHistoryList, LocaleKeys.delegate.tr().toText12(color: MyColors.gradiantEndColor).center.paddingOnly(top: 6, bottom: 6).onPress(() {
if (actionHistory.uSERNAME == AppState().memberInformationList?.eMPLOYEENUMBER) {
showMyBottomSheet(
context,
callBackFunc: voidCallback, callBackFunc: voidCallback,
)); child: DelegateSheet(
return; title: LocaleKeys.delegate.tr(),
} apiMode: "DELEGATE",
showMyBottomSheet( notificationID: notificationID,
context, actionHistoryList: actionHistoryList,
callBackFunc: voidCallback, callBackFunc: voidCallback,
child: SelectedItemSheet( ),
LocaleKeys.comments.tr(), );
apiMode: "DELEGATE", return;
actionHistoryList: actionHistory, }
notificationID: notificationID, showMyBottomSheet(
), context,
); callBackFunc: voidCallback,
}).expanded, child: SelectedItemSheet(LocaleKeys.comments.tr(), apiMode: "DELEGATE", actionHistoryList: actionHistory, notificationID: notificationID),
], );
), }).expanded,
],
)
: const SizedBox(),
], ],
), ),
], ],

@ -760,6 +760,18 @@ class InfoFragment extends StatelessWidget {
ItemDetailViewCol( ItemDetailViewCol(
LocaleKeys.requesterPayrollName.tr(), data.paymentDetailsList![0].requesterPayrollName ?? ""), LocaleKeys.requesterPayrollName.tr(), data.paymentDetailsList![0].requesterPayrollName ?? ""),
), ),
ItemDetailGrid(
ItemDetailViewCol( LocaleKeys.preparePositionName.tr(),
data.paymentDetailsList![0].preparePositionName ?? ""),
ItemDetailViewCol(
LocaleKeys.requesterPositionName.tr(), data.paymentDetailsList![0].requesterPositionName ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol( LocaleKeys.prepareEmpName.tr(),
data.paymentDetailsList![0].prepareEmployeeName ?? ""),
ItemDetailViewCol(
LocaleKeys.requesterPayrollName.tr(), data.paymentDetailsList![0].requesterPayrollName ?? ""),
),
ItemDetailGrid( ItemDetailGrid(
ItemDetailViewCol( LocaleKeys.preparePositionName.tr(), ItemDetailViewCol( LocaleKeys.preparePositionName.tr(),
data.paymentDetailsList![0].preparePositionName ?? ""), data.paymentDetailsList![0].preparePositionName ?? ""),
@ -897,15 +909,18 @@ class InfoFragment extends StatelessWidget {
), ),
ItemDetailGrid( ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.invoiceDate.tr(), ItemDetailViewCol(LocaleKeys.invoiceDate.tr(),
DateUtil.formatDateToDate( DateUtil.formatDateToDate(
DateUtil.convertStringToDate( data.refundInvoiceList![0].invoicedDate), false)?? ""), DateUtil.convertStringToDate( data.refundInvoiceList![0].invoicedDate), false)?? ""),
ItemDetailViewCol( LocaleKeys.refundInvoice.tr(), data.refundInvoiceList![0].invoiceNumber ?? ItemDetailViewCol( LocaleKeys.refundInvoice.tr(), data.refundInvoiceList![0].invoiceNumber ??
"" ), "" ),
), ),
], ],
).objectContainerView(), ).objectContainerView(),
],
],
); );
} }
} }

@ -1,22 +1,27 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/config/routes.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
AppBar AppBarWidget(BuildContext context, AppBar AppBarWidget(
{required String title, BuildContext context, {
bool showHomeButton = true, required String title,
bool showWorkListSettingButton = false, bool showHomeButton = true,
bool showMemberButton = false, bool showLogo = false,
List<Widget>? actions, String? logoPath,
void Function()? onHomeTapped, bool showWorkListSettingButton = false,
void Function()? onBackTapped}) { bool showMemberButton = false,
List<Widget>? actions,
void Function()? onHomeTapped,
void Function()? onBackTapped,
}) {
return AppBar( return AppBar(
leadingWidth: 0, leadingWidth: 0,
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
surfaceTintColor: Colors.transparent,
title: Row( title: Row(
children: [ children: [
GestureDetector( GestureDetector(
@ -26,8 +31,10 @@ AppBar AppBarWidget(BuildContext context,
}, context), }, context),
child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor), child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
), ),
if (showLogo) 4.width,
if (showLogo) SvgPicture.asset(logoPath!),
4.width, 4.width,
title.toText24(color: MyColors.darkTextColor, isBold: true).expanded, if (!showLogo)title.toText24(color: MyColors.darkTextColor, isBold: true).expanded,
], ],
), ),
centerTitle: false, centerTitle: false,
@ -55,7 +62,7 @@ AppBar AppBarWidget(BuildContext context,
}, },
icon: const Icon(Icons.people, color: MyColors.textMixColor), icon: const Icon(Icons.people, color: MyColors.textMixColor),
), ),
...actions ?? [] ...actions ?? [],
], ],
); );
} }

@ -13,6 +13,8 @@ AppBar ChatAppBarWidget(BuildContext context,
{required String title, bool showHomeButton = true, ChatUser? chatUser, bool showTyping = false, List<Widget>? actions, void Function()? onHomeTapped, void Function()? onBackTapped}) { {required String title, bool showHomeButton = true, ChatUser? chatUser, bool showTyping = false, List<Widget>? actions, void Function()? onHomeTapped, void Function()? onBackTapped}) {
return AppBar( return AppBar(
leadingWidth: 0, leadingWidth: 0,
automaticallyImplyLeading: false,
surfaceTintColor: Colors.transparent,
title: Consumer<ChatProviderModel>(builder: (BuildContext cxt, ChatProviderModel data, Widget? child) { title: Consumer<ChatProviderModel>(builder: (BuildContext cxt, ChatProviderModel data, Widget? child) {
return Row( return Row(
children: [ children: [

@ -159,7 +159,7 @@ class _BottomSheet extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: const EdgeInsets.symmetric(vertical: 12.0), padding: const EdgeInsets.symmetric(vertical: 12.0),
decoration: BoxDecoration(color: Theme.of(context).scaffoldBackgroundColor, borderRadius: const BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0))), decoration: BoxDecoration( borderRadius: const BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0))),
child: SafeArea( child: SafeArea(
top: false, top: false,
child: Column( child: Column(

@ -24,7 +24,6 @@ import 'package:mohem_flutter_app/widgets/nfc/nfc_reader_sheet.dart';
import 'package:mohem_flutter_app/widgets/qr_scanner_dialog.dart'; import 'package:mohem_flutter_app/widgets/qr_scanner_dialog.dart';
import 'package:nfc_manager/nfc_manager.dart'; import 'package:nfc_manager/nfc_manager.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:platform_device_id/platform_device_id.dart';
import 'package:wifi_iot/wifi_iot.dart'; import 'package:wifi_iot/wifi_iot.dart';
class MarkAttendanceWidget extends StatefulWidget { class MarkAttendanceWidget extends StatefulWidget {

@ -78,10 +78,10 @@ class _NfcLayoutState extends State<NfcLayout> {
} }
Widget scanNfc() { Widget scanNfc() {
return SizedBox( return Container(
width: MediaQuery.of(context).size.width, key: ValueKey(1),
width: double.infinity,
child: Column( child: Column(
key: ValueKey(1),
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
@ -139,9 +139,8 @@ class _NfcLayoutState extends State<NfcLayout> {
Widget doneNfc() { Widget doneNfc() {
return Container( return Container(
width: MediaQuery.of(context).size.width, key: ValueKey(2),
child: Column( child: Column(
key: ValueKey(2),
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(

@ -1,8 +1,8 @@
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mobile_scanner/mobile_scanner.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart'; import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:qr_code_scanner/qr_code_scanner.dart';
class QrScannerDialog extends StatefulWidget { class QrScannerDialog extends StatefulWidget {
@override @override
@ -11,8 +11,9 @@ class QrScannerDialog extends StatefulWidget {
class _QrScannerDialogState extends State<QrScannerDialog> { class _QrScannerDialogState extends State<QrScannerDialog> {
final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');
Barcode? result; // Barcode? result;
QRViewController? controller; // QRViewController? controller;
Barcode? _barcode;
bool isPicked = false; bool isPicked = false;
@override @override
@ -26,10 +27,7 @@ class _QrScannerDialogState extends State<QrScannerDialog> {
children: [ children: [
Expanded( Expanded(
flex: 1, flex: 1,
child: QRView( child: MobileScanner(key : qrKey,onDetect: _handleBarcode),
key: qrKey,
onQRViewCreated: _onQRViewCreated,
),
), ),
// Expanded( // Expanded(
// flex: 1, // flex: 1,
@ -55,25 +53,25 @@ class _QrScannerDialogState extends State<QrScannerDialog> {
); );
} }
void _onQRViewCreated(QRViewController controller) { void _handleBarcode(BarcodeCapture barcodes) {
this.controller = controller; // this.controller = controller;
Barcode? data = barcodes.barcodes.firstOrNull;
controller.scannedDataStream.listen((scanData) { if(data == null || isPicked) {
return;
}
// controller.scannedDataStream.listen((scanData) {
setState(() { setState(() {
result = scanData; // result = scanData;
if (!isPicked) {
isPicked = true; isPicked = true;
Navigator.pop(context, result!.code); Navigator.pop(context, data.displayValue);
}
}); });
}); // });
controller.pauseCamera(); // controller.pauseCamera();
controller.resumeCamera(); // controller.resumeCamera();
} }
@override @override
void dispose() { void dispose() {
controller?.dispose();
super.dispose(); super.dispose();
} }
} }

@ -0,0 +1,61 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
class SsoLoginWebView extends StatefulWidget {
final String url;
final String jwtToken;
SsoLoginWebView({required this.url, required this.jwtToken});
@override
State<SsoLoginWebView> createState() => _SsoLoginWebViewState();
}
class _SsoLoginWebViewState extends State<SsoLoginWebView> {
late final WebViewController _controller;
@override
void initState() {
// TODO: implement initState
super.initState();
_controller =
WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setNavigationDelegate(
NavigationDelegate(
onProgress: (int progress) {
print("WebView is loading (progress: $progress%)");
},
onPageStarted: (String url) {
print("Page started loading: $url");
},
onPageFinished: (String url) {
print("Page finished loading: $url");
},
onHttpError: (HttpResponseError error) {
print("HTTP error: ${error.toString()} for URL: ${error.response!.statusCode}");
},
onWebResourceError: (WebResourceError error) {
print("Web resource error: ${error.description} for URL: ${error.errorType}");
},
),
)
..loadHtmlString('''
<!DOCTYPE html>
<html>
<body onload="document.forms[0].submit()">
<form method="POST" action="https://ek.techmaster.in/SSO/HMG">
<input type="hidden" name="JWTToken" value="${widget.jwtToken}" />
</form>
<h1>Redirecting...</h1>
</body>
</html>''');
}
@override
Widget build(BuildContext context) {
return Scaffold(appBar: AppBar(title: Text('Logging in...')), body: WebViewWidget(controller: _controller));
}
}

@ -16,11 +16,12 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
#version: 3.3.01+300040
version: 4.5.3+4000035 version: 3.6.7+300077
#version: 3.9.0+1
environment: environment:
sdk: ">=2.16.0 <3.0.0" sdk: ^3.7.0
# Dependencies specify other packages that your package needs in order to work. # Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions # To automatically upgrade your package dependencies to the latest versions
@ -36,102 +37,118 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.4 cupertino_icons: ^1.0.4
path_provider: ^2.0.8 # path_provider: ^2.0.8
path_provider: ^2.1.5
injector: ^2.0.0 injector: ^2.0.0
provider: ^6.0.1 provider: ^6.0.1
easy_localization: ^3.0.0 easy_localization: ^3.0.0
http: ^0.13.4 http: ^1.4.0
permission_handler: ^10.2.0 permission_handler: ^12.0.1
flutter_svg: any flutter_svg: any
sizer: ^2.0.15 sizer: ^2.0.15
local_auth: ^1.1.9 local_auth: ^2.3.0
fluttertoast: ^8.0.8 fluttertoast: ^8.2.12
syncfusion_flutter_calendar: ^19.4.48 syncfusion_flutter_calendar: ^29.1.38
# flutter_calendar_carousel: ^2.1.0 # flutter_calendar_carousel: ^2.1.0
pie_chart: ^5.1.0 pie_chart: ^5.1.0
shared_preferences: ^2.0.12 # shared_preferences: ^2.0.12
firebase_messaging: ^13.0.4 shared_preferences: ^2.5.3
firebase_messaging: ^15.2.9
shimmer: ^2.0.0 shimmer: ^2.0.0
logger: ^1.1.0 logger: ^1.1.0
flutter_countdown_timer: ^4.1.0 flutter_countdown_timer: ^4.1.0
nfc_manager: ^3.2.0
# uuid: ^3.0.6 platform_device_id_plus: ^1.0.7
# device_info_plus: ^4.0.0 device_info_plus: ^11.5.0
# android_id: ^0.1.3+1 image_picker: ^1.1.2
platform_device_id: ^1.0.1 file_picker: ^8.3.1
image_picker: ^0.8.5+3 geolocator: ^9.0.2
file_picker: 5.2.5 month_year_picker: ^0.5.0+1
geolocator: ^11.1.0 month_picker_dialog: ^6.0.3
month_year_picker: ^0.2.0+1 # open_file: ^3.2.1
month_picker_dialog_2: ^0.5.5 open_filex: ^4.6.0
# open_file: ^3.2.1 wifi_iot: ^0.3.19+2
open_filex: ^4.4.0
wifi_iot: ^0.3.19+1
flutter_html: ^3.0.0-alpha.6 flutter_html: ^3.0.0-alpha.6
mobile_scanner: ^6.0.10
# flutter_barcode_scanner: ^2.0.0 # flutter_barcode_scanner: ^2.0.0
qr_code_scanner: ^1.0.1 # qr_code_scanner: ^1.0.1
# qr_flutter: ^4.0.0 # qr_flutter: ^4.0.0
url_launcher: ^6.0.15 url_launcher: ^6.3.2
share: 2.0.4 share_plus: ^11.0.0
flutter_rating_bar: ^4.0.1 flutter_rating_bar: ^4.0.1
auto_size_text: ^3.0.0 auto_size_text: ^3.0.0
pull_to_refresh: ^2.0.0 pull_to_refresh: ^2.0.0
fl_chart: ^0.62.0 fl_chart: ^0.66.0
# lottie json animations # lottie json animations
lottie: any lottie: ^3.3.1
# Marathon Card Swipe # Marathon Card Swipe
appinio_swiper: ^1.1.1 appinio_swiper: ^1.1.1
expandable: ^5.0.1 expandable: ^5.0.1
safe_device: ^1.1.9 safe_device: ^1.1.9
# networkImage # networkImage
cached_network_image: ^3.2.2 # cached_network_image: ^3.2.2
cached_network_image: ^3.4.1
#Chat #Chat
signalr_netcore: ^1.3.3 signalr_netcore: ^1.3.3
logging: ^1.0.1 logging: ^1.0.1
swipe_to: ^1.0.2 swipe_to: ^1.0.2
flutter_webrtc: ^0.9.17 flutter_webrtc: ^0.12.11
camera: ^0.10.3 camera: ^0.11.2
flutter_local_notifications: ^10.0.0 # camera: ^0.10.3
flutter_local_notifications: ^18.0.1
#firebase_analytics: any #firebase_analytics: any
#Chat Voice Message Recoding & Play #Chat Voice Message Recoding & Play
audio_waveforms: ^0.1.5+1 audio_waveforms: ^1.3.0
rxdart: ^0.27.7 rxdart: ^0.27.7
#Encryption #Encryption
flutter_des: ^2.1.0 flutter_des: ^2.1.0
video_player: 2.7.0 video_player: ^2.10.0
just_audio: ^0.9.30 just_audio: ^0.9.30
# safe_device: ^1.1.2 # safe_device: ^1.1.2
flutter_layout_grid: ^2.0.1 flutter_layout_grid: ^2.0.1
#Huawei Dependencies #Huawei Dependencies
# huawei_hmsavailability: ^6.6.0+300 # huawei_hmsavailability: ^6.6.0+300
# huawei_location: 6.0.0+302 # huawei_location: 6.0.0+302
huawei_location: ^6.11.0+301 huawei_location: ^6.14.2+301
huawei_push: ^6.7.0+300 # huawei_push: ^6.7.0+300
firebase_crashlytics: ^2.9.0
huawei_map:
git:
url: https://github.com/fleoparra/hms-flutter-plugin.git
path: flutter-hms-map
huawei_push:
git:
url: https://github.com/crasowas/hms-flutter-plugin.git
path: flutter-hms-push
firebase_crashlytics: ^4.3.9
#Items for sale Image Carousel Slider #Items for sale Image Carousel Slider
carousel_slider: ^4.2.1 carousel_slider: ^5.1.1
#Huawei Specified #Huawei Specified
# store_checker: ^1.1.0 # store_checker: ^1.1.0
google_api_availability: ^3.0.1 google_api_availability: ^5.0.1
google_maps_flutter_web: ^0.5.4
in_app_update: 4.1.0 in_app_update: 4.1.0
flutter_inappwebview: ^6.1.5
flutter_blurhash: ^0.8.0
#todo its for temporary purpose, later will remove this. #todo its for temporary purpose, later will remove this.
dotted_border: ^2.0.0+3 dotted_border: ^2.0.0+3
webview_flutter: ^4.13.0
# saf: ^1.0.3+4 # saf: ^1.0.3+4
dependency_overrides: dependency_overrides:
firebase_core_platform_interface: 4.5.1 nfc_manager: ^3.2.0
# firebase_core_platform_interface: 4.5.1
dev_dependencies: dev_dependencies:

Loading…
Cancel
Save