Merge branch 'master' into mohem_flutter_upgrade

# Conflicts:
#	assets/langs/ar-SA.json
#	assets/langs/en-US.json
#	lib/app_state/app_state.dart
#	lib/classes/consts.dart
#	lib/dialogs/otp_dialog.dart
#	lib/generated/codegen_loader.g.dart
#	lib/generated/locale_keys.g.dart
#	lib/theme/app_theme.dart
#	lib/ui/attendance/monthly_attendance_screen.dart
#	lib/ui/chat/chat_home_screen.dart
#	lib/ui/login/verify_last_login_screen.dart
#	lib/ui/login/verify_login_screen.dart
#	lib/ui/my_team/view_attendance.dart
#	lib/ui/profile/delete_family_member.dart
#	lib/ui/screens/offers_and_discounts/offers_and_discounts_details.dart
#	lib/ui/work_list/worklist_detail_screen.dart
#	lib/ui/work_list/worklist_fragments/info_fragments.dart
#	lib/widgets/app_bar_widget.dart
#	lib/widgets/image_picker.dart
#	lib/widgets/nfc/nfc_reader_sheet.dart
#	pubspec.yaml
mohemm_HMG_flutter_upgrade^2^2
Sultan khan 4 months ago
commit b2ffa0c619

@ -2,7 +2,7 @@
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.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.NFC" />

@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.7.20'
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
@ -11,6 +11,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.huawei.agconnect:agcp:1.8.0.300'
classpath "com.android.tools:r8:8.2.33"
}
}

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

@ -1,6 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
#Thu Mar 06 11:40:30 AST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

@ -0,0 +1,3 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.49171 1.97683C9.39251 1.79825 9.20428 1.6875 9 1.6875C8.79572 1.6875 8.60749 1.79825 8.50829 1.97683L1.00829 15.4768C0.911496 15.6511 0.914125 15.8635 1.0152 16.0353C1.11627 16.207 1.3007 16.3125 1.5 16.3125H16.5C16.6993 16.3125 16.8837 16.207 16.9848 16.0353C17.0859 15.8635 17.0885 15.6511 16.9917 15.4768L9.49171 1.97683ZM8.4375 12.375V13.5H9.5625V12.375H8.4375ZM9.5625 11.25V7.5H8.4375V11.25H9.5625Z" fill="#EB5757"/>
</svg>

After

Width:  |  Height:  |  Size: 577 B

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.6095 15.7235C13.0888 15.2028 12.2446 15.2028 11.7239 15.7235C11.2032 16.2442 11.2032 17.0885 11.7239 17.6091L14.1144 19.9997L11.7239 22.3902C11.2032 22.9109 11.2032 23.7551 11.7239 24.2758C12.2446 24.7965 13.0888 24.7965 13.6095 24.2758L16 21.8853L18.3905 24.2758C18.9112 24.7965 19.7554 24.7965 20.2761 24.2758C20.7968 23.7551 20.7968 22.9109 20.2761 22.3902L17.8856 19.9997L20.2761 17.6091C20.7968 17.0885 20.7968 16.2442 20.2761 15.7235C19.7554 15.2028 18.9112 15.2028 18.3905 15.7235L16 18.1141L13.6095 15.7235Z" fill="#3B3D4A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.33333 2.66634C9.33333 1.92996 8.73638 1.33301 8 1.33301C7.26362 1.33301 6.66667 1.92996 6.66667 2.66634V3.26481C5.65176 3.58674 4.76978 4.09292 4.02403 4.89914C2.91932 6.09342 2.44372 7.58997 2.21888 9.39789C1.99996 11.1583 1.99998 13.4051 2 16.2315V17.1012C1.99998 19.9276 1.99996 22.1744 2.21888 23.9348C2.44372 25.7427 2.91932 27.2393 4.02403 28.4335C5.1424 29.6426 6.56713 30.1769 8.28711 30.4269C9.93522 30.6664 12.0305 30.6664 14.6283 30.6663H17.3717C19.9694 30.6664 22.0648 30.6664 23.7129 30.4269C25.4329 30.1769 26.8576 29.6426 27.976 28.4335C29.0807 27.2393 29.5563 25.7427 29.7811 23.9348C30 22.1744 30 19.9276 30 17.1011V16.2315C30 13.4051 30 11.1583 29.7811 9.39789C29.5563 7.58997 29.0807 6.09342 27.976 4.89914C27.2302 4.09292 26.3482 3.58674 25.3333 3.26481V2.66634C25.3333 1.92996 24.7364 1.33301 24 1.33301C23.2636 1.33301 22.6667 1.92996 22.6667 2.66634V2.78865C21.2039 2.66628 19.4483 2.66631 17.3717 2.66634H14.6283C12.5517 2.66631 10.7961 2.66628 9.33333 2.78865V2.66634ZM5.9971 11.9997C5.38561 11.9997 5.07986 11.9997 4.88514 12.1919C4.69041 12.3841 4.6865 12.686 4.67867 13.2897C4.66703 14.1872 4.66667 15.1919 4.66667 16.324V17.0087C4.66667 19.9485 4.6691 22.0292 4.86516 23.6057C5.0577 25.1539 5.41684 26.0122 5.98163 26.6228C6.53275 27.2186 7.28627 27.5867 8.67067 27.7879C10.1048 27.9964 12.0057 27.9997 14.7333 27.9997H17.2667C19.9943 27.9997 21.8952 27.9964 23.3293 27.7879C24.7137 27.5867 25.4673 27.2186 26.0184 26.6228C26.5832 26.0122 26.9423 25.1539 27.1348 23.6057C27.3309 22.0292 27.3333 19.9485 27.3333 17.0087V16.324C27.3333 15.1919 27.333 14.1872 27.3213 13.2897C27.3135 12.686 27.3096 12.3841 27.1149 12.1919C26.9201 11.9997 26.6144 11.9997 26.0029 11.9997H5.9971Z" fill="#3B3D4A"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,8 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.6667 15.6663C9.74619 15.6663 9 16.4125 9 17.333C9 18.2535 9.74619 18.9997 10.6667 18.9997H10.6786C11.5991 18.9997 12.3453 18.2535 12.3453 17.333C12.3453 16.4125 11.5991 15.6663 10.6786 15.6663H10.6667Z" fill="#3B3D4A"/>
<path d="M15.994 15.6663C15.0735 15.6663 14.3274 16.4125 14.3274 17.333C14.3274 18.2535 15.0735 18.9997 15.994 18.9997H16.006C16.9265 18.9997 17.6726 18.2535 17.6726 17.333C17.6726 16.4125 16.9265 15.6663 16.006 15.6663H15.994Z" fill="#3B3D4A"/>
<path d="M21.3214 15.6663C20.4009 15.6663 19.6547 16.4125 19.6547 17.333C19.6547 18.2535 20.4009 18.9997 21.3214 18.9997H21.3333C22.2538 18.9997 23 18.2535 23 17.333C23 16.4125 22.2538 15.6663 21.3333 15.6663H21.3214Z" fill="#3B3D4A"/>
<path d="M10.6667 20.9997C9.74619 20.9997 9 21.7459 9 22.6663C9 23.5868 9.74619 24.333 10.6667 24.333H10.6786C11.5991 24.333 12.3453 23.5868 12.3453 22.6663C12.3453 21.7459 11.5991 20.9997 10.6786 20.9997H10.6667Z" fill="#3B3D4A"/>
<path d="M15.994 20.9997C15.0735 20.9997 14.3274 21.7459 14.3274 22.6663C14.3274 23.5868 15.0735 24.333 15.994 24.333H16.006C16.9265 24.333 17.6726 23.5868 17.6726 22.6663C17.6726 21.7459 16.9265 20.9997 16.006 20.9997H15.994Z" fill="#3B3D4A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.33333 2.66634C9.33333 1.92996 8.73638 1.33301 8 1.33301C7.26362 1.33301 6.66667 1.92996 6.66667 2.66634V3.26481C5.65176 3.58674 4.76978 4.09292 4.02403 4.89914C2.91932 6.09342 2.44372 7.58997 2.21888 9.39789C1.99996 11.1583 1.99998 13.4051 2 16.2315V17.1012C1.99998 19.9276 1.99996 22.1744 2.21888 23.9348C2.44372 25.7427 2.91932 27.2393 4.02403 28.4335C5.1424 29.6426 6.56713 30.1769 8.28711 30.4269C9.93522 30.6664 12.0305 30.6664 14.6283 30.6663H17.3717C19.9694 30.6664 22.0648 30.6664 23.7129 30.4269C25.4329 30.1769 26.8576 29.6426 27.976 28.4335C29.0807 27.2393 29.5563 25.7427 29.7811 23.9348C30 22.1744 30 19.9276 30 17.1011V16.2315C30 13.4051 30 11.1583 29.7811 9.39789C29.5563 7.58997 29.0807 6.09342 27.976 4.89914C27.2302 4.09292 26.3482 3.58674 25.3333 3.26481V2.66634C25.3333 1.92996 24.7364 1.33301 24 1.33301C23.2636 1.33301 22.6667 1.92996 22.6667 2.66634V2.78865C21.2039 2.66628 19.4483 2.66631 17.3717 2.66634H14.6283C12.5517 2.66631 10.7961 2.66628 9.33333 2.78865V2.66634ZM5.9971 11.9997C5.38561 11.9997 5.07986 11.9997 4.88514 12.1919C4.69041 12.3841 4.6865 12.686 4.67867 13.2897C4.66703 14.1872 4.66667 15.1919 4.66667 16.324V17.0087C4.66667 19.9485 4.6691 22.0292 4.86516 23.6057C5.0577 25.1539 5.41684 26.0122 5.98163 26.6228C6.53275 27.2186 7.28627 27.5867 8.67067 27.7879C10.1048 27.9964 12.0057 27.9997 14.7333 27.9997H17.2667C19.9943 27.9997 21.8952 27.9964 23.3293 27.7879C24.7137 27.5867 25.4673 27.2186 26.0184 26.6228C26.5832 26.0122 26.9423 25.1539 27.1348 23.6057C27.3309 22.0292 27.3333 19.9485 27.3333 17.0087V16.324C27.3333 15.1919 27.333 14.1872 27.3213 13.2897C27.3135 12.686 27.3096 12.3841 27.1149 12.1919C26.9201 11.9997 26.6144 11.9997 26.0029 11.9997H5.9971Z" fill="#3B3D4A"/>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.7057 5.9642C18.8944 5.57148 19.0001 5.13134 19.0001 4.6665C19.0001 3.00965 17.6569 1.6665 16.0001 1.6665C14.3432 1.6665 13.0001 3.00965 13.0001 4.6665C13.0001 5.13134 13.1058 5.57148 13.2945 5.9642C7.78443 7.19747 3.66675 12.1178 3.66675 17.9998C3.66675 24.8114 9.18857 30.3332 16.0001 30.3332C22.8116 30.3332 28.3334 24.8114 28.3334 17.9998C28.3334 12.1178 24.2157 7.19747 18.7057 5.9642ZM15.0001 4.6665C15.0001 5.21879 15.4478 5.6665 16.0001 5.6665C16.5524 5.6665 17.0001 5.21879 17.0001 4.6665C17.0001 4.11422 16.5524 3.6665 16.0001 3.6665C15.4478 3.6665 15.0001 4.11422 15.0001 4.6665ZM20.8322 12.5546C21.1386 12.0951 21.0144 11.4742 20.5549 11.1679C20.0954 10.8615 19.4745 10.9857 19.1681 11.4452L15.1681 17.4452C14.8618 17.9048 14.986 18.5256 15.4455 18.832C15.905 19.1383 16.5259 19.0142 16.8322 18.5546L20.8322 12.5546ZM18.2619 9.97712C18.0819 10.132 17.9197 10.3137 17.7816 10.5209L13.7816 16.5209C12.9646 17.7463 13.2958 19.402 14.5212 20.2189C14.9764 20.5224 15.4911 20.6675 16.0001 20.6671V26.3332C11.3977 26.3332 7.66675 22.6022 7.66675 17.9998C7.66675 13.3975 11.3977 9.6665 16.0001 9.6665C16.784 9.6665 17.5427 9.77475 18.2619 9.97712Z" fill="#3B3D4A"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18.4031 6.11616C16.1007 1.37059 9.84631 -0.212484 5.50919 2.74956C5.06506 3.05288 4.94963 3.6607 5.25138 4.10715C5.55313 4.5536 6.15779 4.66963 6.60192 4.3663C9.98615 2.05504 14.8861 3.32611 16.6555 6.97296C16.8908 7.45809 17.4729 7.65955 17.9555 7.42295C18.4381 7.18635 18.6385 6.60128 18.4031 6.11616Z" fill="#3B3D4A"/>
<path d="M10.5 5.15873C9.96306 5.15873 9.52778 5.59628 9.52778 6.13602C9.52778 6.67577 9.96306 7.11332 10.5 7.11332C12.0667 7.11332 13.4167 8.46799 13.4167 10.2407C13.4167 10.7804 13.8519 11.2179 14.3889 11.2179C14.9258 11.2179 15.3611 10.7804 15.3611 10.2407C15.3611 7.47946 13.2289 5.15873 10.5 5.15873Z" fill="#3B3D4A"/>
<path d="M4.3337 6.99541C4.56722 6.50939 4.36457 5.92509 3.88107 5.69035C3.39757 5.45561 2.8163 5.65931 2.58278 6.14534C2.04863 7.25704 1.75 8.49947 1.75 9.80827V14.1599C1.75 17.092 3.24516 19.6724 5.50919 21.2186C5.95333 21.5219 6.55798 21.4059 6.85973 20.9594C7.16148 20.513 7.04606 19.9052 6.60192 19.6018C4.83599 18.3958 3.69444 16.4035 3.69444 14.1599V9.80827C3.69444 8.80143 3.92361 7.84892 4.3337 6.99541Z" fill="#3B3D4A"/>
<path d="M7.87113 8.88437C8.09246 8.39261 7.87531 7.81361 7.3861 7.59112C6.8969 7.36864 6.3209 7.58693 6.09957 8.07868C5.80332 8.7369 5.63889 9.47052 5.63889 10.2407V13.7589C5.63889 16.5201 7.77113 18.8408 10.5 18.8408C10.707 18.8408 10.9114 18.8273 11.1123 18.8008C11.6447 18.7307 12.0198 18.2401 11.9501 17.7049C11.8804 17.1697 11.3923 16.7927 10.8599 16.8628C10.7424 16.8782 10.6223 16.8862 10.5 16.8862C8.93332 16.8862 7.58333 15.5316 7.58333 13.7589V10.2407C7.58333 9.75172 7.68745 9.29248 7.87113 8.88437Z" fill="#3B3D4A"/>
<path d="M19.25 10.371C19.25 9.83121 18.8147 9.39367 18.2778 9.39367C17.7408 9.39367 17.3056 9.83121 17.3056 10.371V11.5111C17.3056 12.0509 17.7408 12.4884 18.2778 12.4884C18.8147 12.4884 19.25 12.0509 19.25 11.5111V10.371Z" fill="#3B3D4A"/>
<path d="M11.4722 10.5338C11.4722 9.9941 11.0369 9.55655 10.5 9.55655C9.96306 9.55655 9.52778 9.9941 9.52778 10.5338V13.4657C9.52778 14.0055 9.96306 14.443 10.5 14.443C11.0369 14.443 11.4722 14.0055 11.4722 13.4657V10.5338Z" fill="#3B3D4A"/>
<path d="M12.1461 22.5843C12.6729 22.4801 13.016 21.9663 12.9122 21.4367C12.8085 20.9071 12.2974 20.5623 11.7706 20.6665C11.0467 20.8098 10.2898 20.8375 9.52305 20.7301C8.99124 20.6556 8.50006 21.0286 8.42597 21.5632C8.35187 22.0978 8.72292 22.5915 9.25473 22.666C10.2414 22.8042 11.216 22.7684 12.1461 22.5843Z" fill="#3B3D4A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.75 18C12.75 15.3766 14.8766 13.25 17.5 13.25C20.1234 13.25 22.25 15.3766 22.25 18C22.25 20.6234 20.1234 22.75 17.5 22.75C14.8766 22.75 12.75 20.6234 12.75 18ZM15.97 16.4694C16.263 16.1766 16.7379 16.1769 17.0306 16.47L17.4995 16.9393L17.97 16.4694C18.263 16.1766 18.7379 16.1769 19.0306 16.47C19.3234 16.763 19.3231 17.2379 19.03 17.5306L18.5601 18L19.03 18.4694C19.3231 18.7621 19.3234 19.237 19.0306 19.53C18.7379 19.8231 18.263 19.8234 17.97 19.5306L17.4995 19.0606L17.0306 19.53C16.7379 19.8231 16.263 19.8234 15.97 19.5306C15.6769 19.2379 15.6766 18.763 15.9694 18.47L16.4388 18L15.9694 17.53C15.6766 17.237 15.6769 16.7621 15.97 16.4694Z" fill="#3B3D4A"/>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.557 3.26204C12.05 2.44665 13.8133 1.66699 15.9975 1.66699C18.1818 1.66699 19.9458 2.44665 21.4394 3.26199C23.0239 4.1269 24.1152 4.89406 25.3967 5.32492C26.2566 5.61401 27.332 5.85395 27.9465 6.5738C28.4384 7.15002 28.5493 7.91216 28.6724 8.6325C30.1141 17.0636 26.8146 26.3753 18.4262 29.7627C17.6289 30.0848 17.0128 30.3336 16.0016 30.3337C14.9905 30.3337 14.3743 30.0848 13.5769 29.7628C5.18871 26.3752 1.88692 17.0558 3.32669 8.63263C3.44977 7.91236 3.56064 7.15032 4.05243 6.57411C4.66688 5.85419 5.74229 5.61409 6.60219 5.32487C7.88315 4.894 8.97322 4.12707 10.557 3.26204ZM7.43525 7.79468C7.15451 7.88911 6.89087 7.98207 6.66235 8.06561C6.37258 8.17153 6.2277 8.2245 6.11276 8.3619C5.97686 8.52436 5.95979 8.71611 5.89098 9.11845C5.09669 13.7625 5.74427 18.1016 7.72328 21.4968C7.94296 21.8737 8.0528 22.0622 8.24874 22.0876C8.44469 22.1131 8.60556 21.9527 8.9273 21.6321L22.5227 8.08309C22.8857 7.72139 23.0671 7.54054 23.0391 7.34287C23.0111 7.1452 22.7801 7.01812 22.3183 6.76395C21.5577 6.34542 20.8366 5.90275 20.1882 5.54883C18.8328 4.80895 17.5313 4.27311 15.9978 4.27311C14.4644 4.27311 13.1637 4.80885 11.8092 5.5486C10.5457 6.2387 9.0051 7.26664 7.43525 7.79468Z" fill="#3B3D4A"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.60952 1.72353C3.08882 1.20283 2.2446 1.20283 1.7239 1.72353C1.2032 2.24423 1.2032 3.08845 1.7239 3.60915L4.07617 5.96143C3.80679 6.18359 3.55528 6.42534 3.32402 6.68474C2.43578 7.68103 2.03914 8.8886 1.85021 10.3701C1.66668 11.8094 1.66669 13.6307 1.66671 15.9293V16.07C1.66669 18.3687 1.66668 20.19 1.85021 21.6292C2.03914 23.1108 2.43578 24.3183 3.32402 25.3146C3.58761 25.6103 3.87752 25.883 4.19021 26.13C5.23471 26.9548 6.49126 27.3198 8.04082 27.4949C9.55893 27.6664 11.4846 27.6664 13.9366 27.6663H18.0634C20.5154 27.6664 22.4411 27.6664 23.9593 27.4949C24.4597 27.4383 24.9295 27.362 25.3715 27.2568L28.3906 30.2758C28.9113 30.7965 29.7555 30.7965 30.2762 30.2758C30.7969 29.7551 30.7969 28.9109 30.2762 28.3902L3.60952 1.72353ZM17.7247 19.61L12.3901 14.2753C12.1403 14.7975 12.0004 15.3822 12.0004 15.9997C12.0004 18.2088 13.7912 19.9997 16.0004 19.9997C16.6178 19.9997 17.2026 19.8598 17.7247 19.61ZM7.33363 14.6663C8.07001 14.6663 8.66697 15.2633 8.66697 15.9997C8.66697 16.7361 8.07001 17.333 7.33363 17.333H7.32166C6.58528 17.333 5.98832 16.7361 5.98832 15.9997C5.98832 15.2633 6.58528 14.6663 7.32166 14.6663H7.33363Z" fill="#3B3D4A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.0634 4.33301H13.9367C12.8203 4.333 11.8131 4.333 10.9037 4.34918C10.1498 4.36259 9.77284 4.3693 9.67372 4.61474C9.5746 4.86019 9.84454 5.13013 10.3844 5.67L16.6215 11.9071C16.7028 11.9883 16.7434 12.029 16.7893 12.0554C16.8351 12.0818 16.8995 12.0988 17.0281 12.1329C18.4113 12.4996 19.5005 13.5888 19.8671 14.9719C19.9012 15.1006 19.9183 15.1649 19.9447 15.2108C19.9711 15.2567 20.0117 15.2973 20.093 15.3786L28.5247 23.8103C28.8644 24.15 29.0343 24.3199 29.2476 24.2735C29.4609 24.2272 29.5377 24.0221 29.6911 23.6117C29.9157 23.0114 30.0576 22.353 30.1499 21.6292C30.3334 20.19 30.3334 18.3687 30.3334 16.07V15.9293C30.3334 13.6307 30.3334 11.8094 30.1499 10.3701C29.9609 8.8886 29.5643 7.68103 28.6761 6.68474C28.4125 6.38907 28.1226 6.11633 27.8099 5.86939C26.7654 5.0445 25.5088 4.67951 23.9593 4.50447C22.4411 4.33299 20.5154 4.333 18.0634 4.33301ZM26.012 15.9997C26.012 15.2633 25.4151 14.6663 24.6787 14.6663H24.6667C23.9303 14.6663 23.3334 15.2633 23.3334 15.9997C23.3334 16.7361 23.9303 17.333 24.6667 17.333H24.6787C25.4151 17.333 26.012 16.7361 26.012 15.9997Z" fill="#3B3D4A"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.26312 3.63509C4.82911 3.63509 3.66663 4.80057 3.66663 6.23827V10.7938C3.66663 15.0237 6.76283 18.5286 10.807 19.1546V22.1827C10.807 26.3161 14.1491 29.6668 18.2719 29.6668C22.3946 29.6668 25.7368 26.3161 25.7368 22.1827V21.6353C27.2497 21.0994 28.3337 19.6529 28.3337 17.9526C28.3337 15.7961 26.59 14.0479 24.439 14.0479C22.288 14.0479 20.5442 15.7961 20.5442 17.9526C20.5442 19.6526 21.6278 21.0989 23.1403 21.635V22.1827C23.1403 24.8784 20.9606 27.0637 18.2719 27.0637C15.5831 27.0637 13.4035 24.8784 13.4035 22.1827V19.1546C17.4476 18.5286 20.5438 15.0237 20.5438 10.7938V6.23827C20.5438 4.80057 19.3813 3.63509 17.9473 3.63509H16.6485C16.6485 2.91624 16.0673 2.33301 15.3503 2.33301C14.6333 2.33301 14.052 2.91575 14.052 3.6346V6.23777C14.052 6.95662 14.6333 7.53936 15.3503 7.53936C16.0671 7.53936 16.6483 6.95688 16.6485 6.23827H17.9473V10.7938C17.9473 14.0286 15.3317 16.651 12.1052 16.651C8.87872 16.651 6.26312 14.0286 6.26312 10.7938V6.23827H7.56116C7.56142 6.95688 8.14257 7.53936 8.8594 7.53936C9.5764 7.53936 10.1576 6.95662 10.1576 6.23777V4.96007L10.1579 4.93668L10.1576 4.91329V3.6346C10.1576 2.91575 9.5764 2.33301 8.8594 2.33301C8.1424 2.33301 7.56116 2.91575 7.56116 3.6346L6.26312 3.63509Z" fill="#3B3D4A"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,15 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.6985 2.96954C14.6985 2.24989 15.2819 1.6665 16.0015 1.6665C23.9177 1.6665 30.3349 8.08379 30.3349 15.9999C30.3349 16.7196 29.7516 17.303 29.0319 17.303C28.3123 17.303 27.7289 16.7196 27.7289 15.9999C27.7289 9.52309 22.4784 4.27258 16.0015 4.27258C15.2819 4.27258 14.6985 3.68919 14.6985 2.96954Z" fill="#3B3D4A"/>
<path d="M12.4986 3.81587C12.7505 4.48999 12.4082 5.24068 11.7341 5.49258C11.484 5.58604 11.238 5.68799 10.9964 5.79809C10.3416 6.09657 9.5688 5.80769 9.27032 5.15286C8.97184 4.49803 9.26071 3.72522 9.91554 3.42674C10.2122 3.2915 10.5145 3.16623 10.8219 3.05138C11.496 2.79947 12.2467 3.14175 12.4986 3.81587Z" fill="#3B3D4A"/>
<path d="M7.9664 6.02794C8.45838 6.55315 8.43144 7.37775 7.90623 7.86974C7.72561 8.03894 7.55045 8.2139 7.38106 8.39435C6.88851 8.91903 6.06388 8.94509 5.5392 8.45254C5.01452 7.95999 4.98846 7.13537 5.48101 6.61068C5.6886 6.38955 5.90325 6.17513 6.1246 5.96778C6.64981 5.4758 7.47441 5.50273 7.9664 6.02794Z" fill="#3B3D4A"/>
<path d="M4.63221 9.80776C5.28813 10.1038 5.57982 10.8756 5.28374 11.5315C5.18379 11.7529 5.09068 11.978 5.00466 12.2066C4.7512 12.8802 3.99973 13.2207 3.32619 12.9672C2.65265 12.7138 2.31211 11.9623 2.56557 11.2888C2.67127 11.0079 2.78568 10.7313 2.90846 10.4593C3.20454 9.80337 3.9763 9.51167 4.63221 9.80776Z" fill="#3B3D4A"/>
<path d="M3.01708 14.5398C3.73638 14.5621 4.30137 15.1634 4.27902 15.8827C4.27142 16.1273 4.2714 16.3731 4.27902 16.6172C4.30146 17.3365 3.73655 17.9378 3.01725 17.9602C2.29796 17.9826 1.69665 17.4177 1.67421 16.6984C1.6649 16.4001 1.66493 16.1002 1.6742 15.8017C1.69655 15.0824 2.29778 14.5174 3.01708 14.5398Z" fill="#3B3D4A"/>
<path d="M28.184 19.5016C28.8581 19.7535 29.2004 20.5042 28.9485 21.1783C28.8251 21.5084 28.6897 21.8327 28.5429 22.1505C28.241 22.8037 27.4667 23.0886 26.8134 22.7867C26.1601 22.4848 25.8753 21.7105 26.1772 21.0573C26.2967 20.7985 26.4069 20.5347 26.5073 20.266C26.7592 19.5919 27.5099 19.2497 28.184 19.5016Z" fill="#3B3D4A"/>
<path d="M3.33307 19.5557C4.00607 19.3009 4.75827 19.6398 5.01314 20.3128C5.1007 20.544 5.19551 20.7716 5.29732 20.9954C5.5953 21.6505 5.30583 22.4231 4.65078 22.7211C3.99572 23.0191 3.22313 22.7296 2.92515 22.0745C2.80008 21.7996 2.68358 21.5199 2.57599 21.2358C2.32111 20.5628 2.66007 19.8106 3.33307 19.5557Z" fill="#3B3D4A"/>
<path d="M26.0039 23.9914C26.5311 24.4813 26.5614 25.3058 26.0716 25.833C25.8422 26.0799 25.604 26.3186 25.3576 26.5485C24.8314 27.0394 24.0068 27.0109 23.5159 26.4847C23.025 25.9585 23.0535 25.1339 23.5797 24.643C23.7808 24.4554 23.9752 24.2606 24.1624 24.0591C24.6522 23.5319 25.4767 23.5016 26.0039 23.9914Z" fill="#3B3D4A"/>
<path d="M5.55842 24.0695C6.0819 23.5757 6.90659 23.5997 7.40042 24.1232C7.56048 24.2929 7.72566 24.4577 7.89569 24.6173C8.42028 25.11 8.44619 25.9346 7.95355 26.4592C7.46091 26.9838 6.63627 27.0097 6.11168 26.5171C5.9033 26.3214 5.70088 26.1194 5.50473 25.9115C5.01091 25.388 5.03495 24.5633 5.55842 24.0695Z" fill="#3B3D4A"/>
<path d="M22.1944 27.3663C22.4907 28.0222 22.1991 28.794 21.5433 29.0902C21.2732 29.2122 20.9986 29.3259 20.7198 29.431C20.0464 29.6849 19.2947 29.3449 19.0408 28.6715C18.7869 27.9981 19.1269 27.2464 19.8003 26.9925C20.0272 26.907 20.2507 26.8144 20.4706 26.7151C21.1264 26.4189 21.8982 26.7105 22.1944 27.3663Z" fill="#3B3D4A"/>
<path d="M9.32298 27.3748C9.61834 26.7185 10.3898 26.426 11.046 26.7213C11.2575 26.8165 11.4723 26.9054 11.6902 26.9879C12.3633 27.2426 12.7025 27.9947 12.4478 28.6677C12.1932 29.3408 11.4411 29.68 10.768 29.4253C10.5001 29.324 10.2362 29.2147 9.97644 29.0978C9.32019 28.8025 9.02763 28.031 9.32298 27.3748Z" fill="#3B3D4A"/>
<path d="M13.9967 28.9768C14.0215 28.2576 14.6247 27.6947 15.3439 27.7195C15.6149 27.7288 15.8879 27.7288 16.1589 27.7195C16.8781 27.6947 17.4813 28.2576 17.5061 28.9768C17.5309 29.696 16.968 30.2992 16.2488 30.324C15.9179 30.3354 15.5849 30.3354 15.2541 30.324C14.5348 30.2992 13.9719 29.696 13.9967 28.9768Z" fill="#3B3D4A"/>
<path d="M17.3339 7.99984C17.3339 7.26346 16.7369 6.6665 16.0006 6.6665C15.2642 6.6665 14.6672 7.26346 14.6672 7.99984V12.9439C13.49 13.4582 12.6672 14.633 12.6672 15.9998C12.6672 17.8408 14.1596 19.3332 16.0006 19.3332C17.3674 19.3332 18.5422 18.5104 19.0565 17.3332H21.3339C22.0703 17.3332 22.6672 16.7362 22.6672 15.9998C22.6672 15.2635 22.0703 14.6665 21.3339 14.6665H19.0565C18.7206 13.8975 18.1029 13.2798 17.3339 12.9439V7.99984Z" fill="#3B3D4A"/>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

@ -0,0 +1,7 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.96976 17.3036C2.25013 17.3036 1.66675 16.7203 1.66675 16.0006C1.66675 8.08465 8.08392 1.66748 15.9999 1.66748C23.9159 1.66748 30.3331 8.08465 30.3331 16.0006C30.3331 23.9166 23.9159 30.3338 15.9999 30.3338C15.2803 30.3338 14.6969 29.7504 14.6969 29.0308C14.6969 28.3111 15.2803 27.7278 15.9999 27.7278C22.4766 27.7278 27.727 22.4773 27.727 16.0006C27.727 9.52392 22.4766 4.27351 15.9999 4.27351C9.52319 4.27351 4.27278 9.52392 4.27278 16.0006C4.27278 16.7203 3.6894 17.3036 2.96976 17.3036Z" fill="#3B3D4A"/>
<path d="M2.55728 18.6734C3.23984 18.4454 3.978 18.8139 4.206 19.4965C4.37546 20.0038 4.57419 20.4971 4.80011 20.9742C5.10807 21.6246 4.83046 22.4015 4.18005 22.7095C3.52964 23.0174 2.75273 22.7398 2.44476 22.0894C2.17451 21.5187 1.93684 20.9287 1.73423 20.3222C1.50623 19.6396 1.87472 18.9014 2.55728 18.6734Z" fill="#3B3D4A"/>
<path d="M4.88987 23.803C5.43541 23.3337 6.25812 23.3955 6.72743 23.941C7.10221 24.3767 7.50445 24.7865 7.93126 25.1676C8.46803 25.647 8.51459 26.4707 8.03527 27.0074C7.55594 27.5442 6.73223 27.5908 6.19547 27.1114C5.68316 26.654 5.20085 26.1625 4.75183 25.6406C4.28252 25.095 4.34432 24.2723 4.88987 23.803Z" fill="#3B3D4A"/>
<path d="M9.21607 27.7957C9.52534 27.146 10.3028 26.8699 10.9526 27.1792C11.4492 27.4155 11.9628 27.62 12.4909 27.7902C13.1758 28.0109 13.5521 28.7451 13.3314 29.4301C13.1107 30.115 12.3765 30.4914 11.6916 30.2706C11.0528 30.0648 10.4321 29.8176 9.83263 29.5323C9.18284 29.223 8.90679 28.4455 9.21607 27.7957Z" fill="#3B3D4A"/>
<path d="M16.0001 12.6672C14.6332 12.6672 13.4585 13.4899 12.9441 14.6672H8.00008C7.2637 14.6672 6.66675 15.2641 6.66675 16.0005C6.66675 16.7369 7.2637 17.3338 8.00008 17.3338H12.9441C13.2801 18.1028 13.8978 18.7205 14.6667 19.0565V21.3338C14.6667 22.0702 15.2637 22.6672 16.0001 22.6672C16.7365 22.6672 17.3334 22.0702 17.3334 21.3338V19.0565C18.5107 18.5421 19.3334 17.3674 19.3334 16.0005C19.3334 14.1595 17.841 12.6672 16.0001 12.6672Z" fill="#3B3D4A"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,33 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18.141" height="24.326" viewBox="0 0 18.141 24.326">
<g id="biometrics" transform="translate(-76.645 0.102)">
<g id="Group_10711" data-name="Group 10711" transform="translate(76.745 -0.001)">
<g id="Group_10702" data-name="Group 10702" transform="translate(0.997 0)">
<path id="Path_13731" data-name="Path 13731" d="M92.682,4.276a.519.519,0,0,0,.373-.151,12.049,12.049,0,0,1,4.38-2.6c3.451-1.126,6.718-.255,9.7,2.573a.528.528,0,0,0,.746-.02.507.507,0,0,0,.144-.373.528.528,0,0,0-.164-.367A11.681,11.681,0,0,0,102.1.171a9.846,9.846,0,0,0-4.963.347,13.266,13.266,0,0,0-4.826,2.868.525.525,0,0,0-.157.373.519.519,0,0,0,.151.373A.574.574,0,0,0,92.682,4.276Z" transform="translate(-92.158 0.001)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10703" data-name="Group 10703" transform="translate(6.494 2.408)">
<path id="Path_13732" data-name="Path 13732" d="M227.426,62.967c-.537-3.457-1.9-5.939-4.053-7.366a9.5,9.5,0,0,0-6.98-1.139.526.526,0,0,0,.249,1.021,8.349,8.349,0,0,1,6.122,1c1.918,1.27,3.143,3.5,3.627,6.639a.539.539,0,0,0,.21.347.528.528,0,0,0,.308.1.318.318,0,0,0,.079-.007.531.531,0,0,0,.439-.6Z" transform="translate(-215.99 -54.236)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10704" data-name="Group 10704" transform="translate(0 3.288)">
<path id="Path_13733" data-name="Path 13733" d="M70.745,81.922c.471-5.513,4.132-6.783,4.289-6.836a.518.518,0,0,0,.3-.262.5.5,0,0,0,.026-.4.53.53,0,0,0-.668-.334c-.183.059-4.472,1.545-5,7.746a.53.53,0,0,0,.124.386.536.536,0,0,0,.36.183h.046a.545.545,0,0,0,.34-.124A.551.551,0,0,0,70.745,81.922Z" transform="translate(-69.688 -74.064)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10705" data-name="Group 10705" transform="translate(0.596 4.424)">
<path id="Path_13734" data-name="Path 13734" d="M85.763,106.351A7.125,7.125,0,0,1,87.3,102.73a5.731,5.731,0,0,1,2.1-1.6,5.122,5.122,0,0,1,2.665-.373,7.6,7.6,0,0,1,3.87,1.84.527.527,0,0,0,.74-.065.508.508,0,0,0,.118-.386.491.491,0,0,0-.19-.354,8.581,8.581,0,0,0-4.413-2.076,6.1,6.1,0,0,0-3.208.452,6.82,6.82,0,0,0-2.495,1.892,8.114,8.114,0,0,0-1.774,4.164,20.017,20.017,0,0,1-.511,2.757,3.9,3.9,0,0,1-.9,1.86.543.543,0,0,0-.19.36.555.555,0,0,0,.118.386.531.531,0,0,0,.406.19.521.521,0,0,0,.34-.124,4.747,4.747,0,0,0,1.244-2.39,21.652,21.652,0,0,0,.544-2.914Z" transform="translate(-83.109 -99.669)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10706" data-name="Group 10706" transform="translate(1.971 6.473)">
<path id="Path_13735" data-name="Path 13735" d="M125.938,152.379v-.007c-.052-.478-.1-.976-.151-1.4-.02-.17-.033-.275-.046-.38A4.981,4.981,0,0,0,124.307,147a4.777,4.777,0,0,0-2.377-1.12,4.646,4.646,0,0,0-2.167.151,4.453,4.453,0,0,0-1.971,1.283,6.3,6.3,0,0,0-1.434,3.241c-.007.026-.007.052-.013.072v.02a22.787,22.787,0,0,1-.9,4.367,6.623,6.623,0,0,1-1.165,2.514.543.543,0,0,0-.19.36.554.554,0,0,0,.118.386.543.543,0,0,0,.36.19.554.554,0,0,0,.386-.118,7.67,7.67,0,0,0,1.5-3.012,23.869,23.869,0,0,0,.949-4.6,5.31,5.31,0,0,1,1.179-2.711,3.32,3.32,0,0,1,1.506-.982,3.55,3.55,0,0,1,1.683-.111,3.692,3.692,0,0,1,1.846.864,4.191,4.191,0,0,1,1.087,2.92c.02.151.033.295.046.386.059.511.1.956.151,1.388a21.5,21.5,0,0,0,1.486,6.829.52.52,0,0,0,.478.308.514.514,0,0,0,.216-.046.528.528,0,0,0,.262-.694A20.806,20.806,0,0,1,125.938,152.379Z" transform="translate(-114.084 -145.821)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10707" data-name="Group 10707" transform="translate(3.013 8.548)">
<path id="Path_13736" data-name="Path 13736" d="M146.12,196.064a3.543,3.543,0,0,0-.537-2.449,2.455,2.455,0,0,0-1.08-.871,2.317,2.317,0,0,0-1.3-.138,2.291,2.291,0,0,0-1.44.917,4.445,4.445,0,0,0-.563,1.087,9.367,9.367,0,0,0-.386,1.434c-.079.413-.131.779-.177,1.126a8.913,8.913,0,0,1-.419,1.945,17.939,17.939,0,0,1-1.1,2.468,16.894,16.894,0,0,1-1.434,2.311.526.526,0,0,0,.458.858.5.5,0,0,0,.354-.19,17.82,17.82,0,0,0,1.552-2.482,18.717,18.717,0,0,0,1.165-2.619,10.284,10.284,0,0,0,.471-2.148c.046-.327.092-.668.17-1.067a7.909,7.909,0,0,1,.34-1.264,3.271,3.271,0,0,1,.426-.832,1.222,1.222,0,0,1,.779-.5,1.2,1.2,0,0,1,.707.079,1.388,1.388,0,0,1,.615.5,2.55,2.55,0,0,1,.347,1.742,22.62,22.62,0,0,1-1.46,5.284,25.8,25.8,0,0,1-2.573,5.271.53.53,0,0,0,.092.74.545.545,0,0,0,.321.111.518.518,0,0,0,.413-.2,26.528,26.528,0,0,0,2.724-5.546A23.906,23.906,0,0,0,146.12,196.064Z" transform="translate(-137.568 -192.57)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10708" data-name="Group 10708" transform="translate(14.291 8.495)">
<path id="Path_13737" data-name="Path 13737" d="M393.392,196.2a13.938,13.938,0,0,0-.773-4.518.526.526,0,0,0-.963.426,13.269,13.269,0,0,1,.681,4.158,11.225,11.225,0,0,0,.8,4.315.511.511,0,0,0,.314.255.6.6,0,0,0,.151.02.488.488,0,0,0,.249-.065.511.511,0,0,0,.255-.314.5.5,0,0,0-.046-.4A10.731,10.731,0,0,1,393.392,196.2Z" transform="translate(-391.612 -191.37)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10709" data-name="Group 10709" transform="translate(4.374 10.687)">
<path id="Path_13738" data-name="Path 13738" d="M173.334,241.3a.516.516,0,0,0-.138-.38.511.511,0,0,0-.367-.17.526.526,0,0,0-.55.5,19.166,19.166,0,0,1-1.2,5.762,14.612,14.612,0,0,1-2.711,4.59.529.529,0,0,0,.046.746.5.5,0,0,0,.347.131.523.523,0,0,0,.393-.177,15.861,15.861,0,0,0,2.914-4.917A20.284,20.284,0,0,0,173.334,241.3Z" transform="translate(-168.231 -240.745)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10710" data-name="Group 10710" transform="translate(8.472 16.753)">
<path id="Path_13739" data-name="Path 13739" d="M264.567,378.107l-.052-.262a.533.533,0,0,0-.347-.413.546.546,0,0,0-.406.02.529.529,0,0,0-.268.3l-.02.059c-.367,1.035-.727,2.049-1.179,3.064a19.518,19.518,0,0,1-1.676,3.077.522.522,0,0,0-.079.393.513.513,0,0,0,.223.334.539.539,0,0,0,.295.092.529.529,0,0,0,.439-.229,20.72,20.72,0,0,0,1.768-3.241c.2-.458.4-.943.609-1.5a11.594,11.594,0,0,0,1.146,2.92.519.519,0,0,0,.314.249.53.53,0,0,0,.4-.046.537.537,0,0,0,.249-.314.53.53,0,0,0-.046-.4A13.648,13.648,0,0,1,264.567,378.107Z" transform="translate(-260.531 -377.402)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

@ -4,7 +4,10 @@
"arabic": "عربي",
"login": "تسجيل الدخول",
"pleaseEnterLoginDetails": "الرجاء إدخال التفاصيل أدناه لتسجيل الدخول",
"userId": "UserID",
"username": "اسم المستخدم",
"userName": "اسم المستخدم",
"userSearch": "User Search",
"password": "كلمة المرور",
"welcomeBack": "مرحبا بعودتك",
"wouldYouLikeToLoginWithCurrentUsername": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟",
@ -545,6 +548,36 @@
"pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
"youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
"open": "يفتح",
<<<<<<< HEAD
=======
"youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
"pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
"generate": "يولد",
"paymentRequest": "طلب الدفع",
"paymentDetails": "تفاصيل الدفع",
"requestNo": "رقم الطلب",
"requesterEmpNum": "رقم الموظف الذي قدم الطلب",
"requesterEmpName": "اسم الموظف مقدم الطلب",
"prepareEmpName": "إعداد اسم الموظف",
"requesterPositionName": "اسم الوظيفة لمقدم الطلب",
"preparePositionName": "إعداد اسم الوظيفة",
"requesterPayrollName": "اسم مقدم الطلب",
"payingORGName": "اسم المنظمة الدافعة",
"requestAmount": "مبلغ الطلب",
"typeofPayment": "نوع الدفع",
"beneficiaryDetails": "تفاصيل المستفيد",
"beneficiaryName": "اسم المستفيد",
"idIqama": "الهوية السعودية / الإقامة",
"beneficiaryBankName": "اسم البنك المستفيد",
"sadadNumber": "رقم سداد",
"beneficiaryIBAN": "رقم IBAN للمستفيد",
"purchaseOrders": "طلبات الشراء",
"approvalDate": "تاريخ الموافقة",
"pOAmount": "مبلغ الطلب",
"versionStatus": "حالة الإصدار",
"supplierNo": "رقم المورد",
"general": "عام",
>>>>>>> master
"requesterOperatingUnit":"وحدة تشغيل مقدم الطلب",
"prepareEmpNum":"إعداد رقم الموظف",
"supplierInfo" : "معلومات المورد",
@ -558,5 +591,36 @@
"patientName" : "اسم المريض",
"invoiceDate" : "تاريخ الفاتورة",
"refundInvoice" :"فاتورة الاسترجاع",
<<<<<<< HEAD
"hospitalClinic" : "عيادة المستشفى"
=======
"hospitalClinic" : "عيادة المستشفى",
"graphicalAnalysis": "التحليل الرسومي",
"itemHistoryAnalysis": "تحليل تاريخ العنصر",
"pOno": "امر شراء #",
"oprUnit": "وحدة التشغيل",
"qtyOrdered": "الكمية المطلوبة",
"qtyReceived": "الكمية المستلمة",
"bonusQty": "كمية المكافأة",
"balQty": "كمية التوازن",
"videoCall": "مكالمة فيديو",
"addUsers": "إضافة مستخدمين إلى المجموعة",
"admin": "مشرف",
"areYouSureWantTodelete": "هل أنت متأكد أنك تريد الحذف؟",
"Attendance": "الحضور",
"audioCall": "مكالمة صوتية",
"editGroups": "تعديل المجموعة",
"enterGroupName": "يرجى إدخال اسم المجموعة الصحيح",
"enterGroupNamePlease": "يرجى إدخال اسم المجموعة",
"groupMembers": "أعضاء المجموعة",
"groupName": "اسم المجموعة",
"groupNameshouldbe": "يجب أن يتكون اسم المجموعة من 10 أحرف على الأقل",
"manage": "إدارة",
"manageGroup": "إدارة المجموعة",
"members": "الأعضاء",
"searchByUserName": "البحث بواسطة اسم المستخدم",
"shareScreen": "مشاركة الشاشة",
"start":"يبدأ",
"about":"عن"
>>>>>>> master
}

@ -303,6 +303,7 @@
"section": "Section",
"topic": "Topic",
"actionBy": "Action By",
"pending": "Pending",
"pendingTransactions": "Pending Transactions",
"selectRequestType": "Please select request type",
"dateFrom": "Date From",
@ -565,6 +566,34 @@
"pleaseClickButtonToJoinMarathon": "Press the button below to join the Marathon.",
"youCannotJoinTheMarathon": "You cannot join the Marathon because you have exceeded the time limit.",
"requesterOperatingUnit":"Requester Operating Unit",
<<<<<<< HEAD
=======
"generate": "Generate",
"paymentRequest": "Pay Request",
"paymentDetails": "Payment Details",
"requestNo": "Request No",
"requesterEmpNum": "Requester Employee Num",
"requesterEmpName": "Requester Employee Name",
"prepareEmpName": "Prepare Employee Name",
"requesterPositionName": "Requester Position Name",
"preparePositionName": "Prepare Position Name",
"requesterPayrollName": "Requester Payroll Name",
"payingORGName": "Paying Organization Name",
"requestAmount": "Request Amount",
"typeofPayment": "Type of Payment",
"beneficiaryDetails": "Beneficiary Details",
"beneficiaryName": "Beneficiary Name",
"idIqama": "Saudi ID / Iqama",
"beneficiaryBankName": "Beneficiary Bank Name",
"sadadNumber": "Sadad Number",
"beneficiaryIBAN": "Beneficiary IBAN",
"purchaseOrders": "Purchase Orders",
"approvalDate": "Approval Date",
"pOAmount": "PO Amount",
"versionStatus": "Version Status",
"supplierNo": "Supplier No",
"general": "General",
>>>>>>> master
"prepareEmpNum":"Prepare Employee Num",
"supplierInfo" : "Supplier Information",
"supplierAcNo": "Supplier Account No",
@ -577,5 +606,19 @@
"patientName" : "Patient Name",
"invoiceDate" : "Invoice Date",
"refundInvoice" :"Refund Invoice",
<<<<<<< HEAD
"hospitalClinic" : "Hospital Clinic"
=======
"hospitalClinic" : "Hospital Clinic",
"graphicalAnalysis": "Graphical Analysis",
"itemHistoryAnalysis": "Item History Analysis",
"pOno": "P.O #",
"oprUnit": "Opr. Unit",
"qtyOrdered": "Qty. Ordered",
"qtyReceived": "Qty. Received",
"bonusQty": "Bonus Qty.",
"balQty": "Bal. Qty.",
"start":"Start",
"about":"About"
>>>>>>> master
}

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>

@ -160,7 +160,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@ -232,6 +232,7 @@
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
@ -362,6 +363,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
@ -500,6 +502,7 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
@ -530,6 +533,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

@ -4,7 +4,7 @@ import Firebase
import flutter_local_notifications
@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,

@ -13,7 +13,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>MOHEMM</string>
<string>MoheM</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>

@ -86,6 +86,7 @@ class ApiClient {
var response = await postJsonForResponse(url, jsonObject, token: token, queryParameters: queryParameters, headers: _headers, retryTimes: retryTimes, isFormData: isFormData);
try {
if (!kReleaseMode) {
logger.i("Url: " + url);
logger.i("res: " + response.body);
}
@ -93,6 +94,12 @@ class ApiClient {
if (jsonData["IsAuthenticated"] != null) {
AppState().setIsAuthenticated = jsonData["IsAuthenticated"];
}
// if(url.contains("GetOfferDiscountsConfigData")) {
// jsonData["ErrorMessage"] = "Service Not Available";
// jsonData["ErrorEndUserMessage"] = "Service Not Available";
// }
if (jsonData["ErrorMessage"] == null) {
return factoryConstructor(jsonData);
} else {

@ -13,6 +13,8 @@ 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_response_model.dart';
import 'package:platform_device_id/platform_device_id.dart';
// import 'package:platform_device_id/platform_device_id.dart';
import 'package:uuid/uuid.dart';
class DashboardApiClient {
@ -26,40 +28,56 @@ class DashboardApiClient {
String url = "${ApiConsts.erpRest}GET_Attendance_Tracking";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getAttendanceTrackingList;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getAttendanceTrackingList;
},
url,
postParams,
);
}
Future<GenericResponseModel?> getOpenNotifications() async {
String url = "${ApiConsts.erpRest}GET_OPEN_NOTIFICATIONS";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
},
url,
postParams,
);
}
Future<GenericResponseModel?> getCOCNotifications() async {
String url = "${ApiConsts.cocRest}Mohemm_ITG_ReviewerAdmin_Pending_Tasks";
Map<String, dynamic> postParams = {"Date": DateUtil.getISODateFormat(DateTime.now()), "EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
},
url,
postParams,
);
}
Future<ItgFormsModel?> getItgFormsPendingTask() async {
String url = "${ApiConsts.cocRest}ITGFormsPendingTasks";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
ItgFormsModel responseData = ItgFormsModel.fromJson(json);
return responseData;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
ItgFormsModel responseData = ItgFormsModel.fromJson(json);
return responseData;
},
url,
postParams,
);
}
Future<List<GetAccrualBalancesList>> getAccrualBalances(String effectiveDate, {String? empID}) async {
@ -67,20 +85,28 @@ class DashboardApiClient {
Map<String, dynamic> postParams = {"P_EFFECTIVE_DATE": effectiveDate};
postParams.addAll(AppState().postParamsJson);
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getAccrualBalancesList ?? [];
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getAccrualBalancesList ?? [];
},
url,
postParams,
);
}
Future<GenericResponseModel?> getOpenMissingSwipes() async {
String url = "${ApiConsts.erpRest}GET_OPEN_MISSING_SWIPES";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
},
url,
postParams,
);
}
//Menus List
@ -88,10 +114,14 @@ class DashboardApiClient {
String url = "${ApiConsts.erpRest}GET_MENU";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.listMenu ?? [];
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.listMenu ?? [];
},
url,
postParams,
);
}
//GET_MENU_ENTRIES
@ -99,14 +129,40 @@ class DashboardApiClient {
String url = "${ApiConsts.erpRest}GET_MENU_ENTRIES";
Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
},
url,
postParams,
);
}
Future<GenericResponseModel?> getEventActivity() async {
String url = "${ApiConsts.erpRest}Get_EventActivity";
Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E"};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
},
url,
postParams,
);
}
//Mark Attendance
Future<GenericResponseModel?> markAttendance({String lat = "0", String? long = "0", required int pointType, String nfcValue = "", bool isGpsRequired = false, String QRValue = "", String payrollCode = ""}) async {
Future<GenericResponseModel?> markAttendance({
String lat = "0",
String? long = "0",
required int pointType,
String nfcValue = "",
bool isGpsRequired = false,
String QRValue = "",
String payrollCode = "",
}) async {
String url = "${ApiConsts.swpRest}AuthenticateAndSwipeUserSupportNFC";
var uuid = Uuid();
// Generate a v4 (random) id
@ -121,13 +177,17 @@ class DashboardApiClient {
"NFCValue": nfcValue,
"WifiValue": pointType == 3 ? "100" : "",
"IsGpsRequired": isGpsRequired,
"PayrollCodeStr": AppState().postParamsObject?.payrollCodeStr.toString() ?? ""
"PayrollCodeStr": AppState().postParamsObject?.payrollCodeStr.toString() ?? "",
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
},
url,
postParams,
);
}
//Mark Fake Location
@ -146,10 +206,14 @@ class DashboardApiClient {
"EmployeeID": AppState().memberInformationList!.eMPLOYEENUMBER,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
},
url,
postParams,
);
}
//Check ITG Type
@ -159,15 +223,19 @@ class DashboardApiClient {
Map<String, dynamic> postParams = {
"EmployeeNumber": AppState().getUserName,
"ItgEnableAt": "After Service Submission", //Mobile Id
"ItgServiceName": "Login"
"ItgServiceName": "Login",
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
MohemmItgResponseItem res = MohemmItgResponseItem.fromJson(jsonDecode(responseData.mohemmITGResponseItem ?? ""));
// var jsonDecodedData = jsonDecode(jsonDecode(responseData.mohemmITGResponseItem!)['result']['data']);
return res;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
MohemmItgResponseItem res = MohemmItgResponseItem.fromJson(jsonDecode(responseData.mohemmITGResponseItem ?? ""));
// var jsonDecodedData = jsonDecode(jsonDecode(responseData.mohemmITGResponseItem!)['result']['data']);
return res;
},
url,
postParams,
);
}
//Submit ITG
@ -179,13 +247,17 @@ class DashboardApiClient {
"ItgComments": comment,
"ItgNotificationMasterId": masterId,
"ItgQuestionResponses": itgList,
"ItgSurveyId": serviceId
"ItgSurveyId": serviceId,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
ItgMainRes responseData = ItgMainRes.fromJson(json);
return responseData;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
ItgMainRes responseData = ItgMainRes.fromJson(json);
return responseData;
},
url,
postParams,
);
}
Future<ItgMainRes?> getAdvertisementDetail(String masterID) async {
@ -196,10 +268,14 @@ class DashboardApiClient {
"ItgNotificationMasterId": masterID, //Mobile Id
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
ItgMainRes responseData = ItgMainRes.fromJson(json);
return responseData;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
ItgMainRes responseData = ItgMainRes.fromJson(json);
return responseData;
},
url,
postParams,
);
}
Future setAdvertisementViewed(String masterID, int advertisementId, String? ackValue) async {
@ -213,9 +289,27 @@ class DashboardApiClient {
// "ItgAdvertisement": {"ItgAdvertisementId": advertisementId, "ItgAcknowledgment": ackValue} //Mobile Id
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
// ItgMainRes responseData = ItgMainRes.fromJson(json);
return json;
}, url, postParams);
return await ApiClient().postJsonForObject(
(json) {
// ItgMainRes responseData = ItgMainRes.fromJson(json);
return json;
},
url,
postParams,
);
}
// Future<dynamic?> getItgTimeCardDetails() async {
// String url = "${ApiConsts.cocRest}ITG_TimeCard_Get";
// Map<String, dynamic> postParams = {};
// postParams.addAll(AppState().postParamsJson);
// return await ApiClient().postJsonForObject(
// (json) {
// ItgTimeCardModel responseData = ItgTimeCardModel.fromJson(json);
// return responseData;
// },
// url,
// postParams,
// );
// }
}

@ -29,6 +29,21 @@ class MyAttendanceApiClient {
}, url, postParams);
}
Future<List<GetEITTransactionList>?> getCeiTransaction(String pFunctionName, int? relationID) async {
String url = "${ApiConsts.erpRest}GET_CEI_TRANSACTIONS";
Map<String, dynamic> postParams = {"P_PAGE_LIMIT": 50, "P_PAGE_NUM": 1, "P_FUNCTION_NAME": pFunctionName};
postParams.addAll(AppState().postParamsJson);
if (relationID != null) postParams["P_CONTACT_RELATIONSHIP_ID"] = relationID;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
if (responseData.getCEITransactionList?.isNotEmpty ?? false) {
return responseData.getCEITransactionList!.map((e) => GetEITTransactionList(collectionTransaction: e.collectionTransaction)).toList();
} else {
return [];
}
}, url, postParams);
}
Future<GenericResponseModel> getEitDffStructure(String pFunctionName, String? empID) async {
String url = "${ApiConsts.erpRest}GET_EIT_DFF_STRUCTURE";
Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E", "P_FUNCTION_NAME": pFunctionName};
@ -40,14 +55,55 @@ class MyAttendanceApiClient {
}, url, postParams);
}
Future<List<ESERVICESVS>> getValueSetValues(String pSegmentName, String pDescFlexContextCode, String pDescFlexName, List<Map<String, dynamic>> list, {String? empID, String? parentValue}) async {
Future<GenericResponseModel> getCEIDffStructure(String pFunctionName, String? empID) async {
String url = "${ApiConsts.erpRest}GET_CEI_DFF_STRUCTURE";
Map<String, dynamic> postParams = {"P_FUNCTION_NAME": pFunctionName};
postParams.addAll(AppState().postParamsJson);
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
}
Future<List<ESERVICESVS>> getValueSetValues(String pSegmentName, String pDescFlexContextCode, String pDescFlexName, List<Map<String, dynamic>> list,
{String? empID, String? parentValue, bool hasParent = false}) async {
String url = "${ApiConsts.erpRest}GET_VALUE_SET_VALUES";
Map<String, dynamic> postParams = {
"P_SELECTED_RESP_ID": -999,
"P_MENU_TYPE": "E",
"P_PAGE_LIMIT": 1000,
"P_PAGE_NUM": 1,
"P_PARENT_VALUE": empID != null ? parentValue : null,
"P_PARENT_VALUE": hasParent
? parentValue
: empID != null
? parentValue
: null,
"P_SEGMENT_NAME": pSegmentName,
"P_DESC_FLEX_CONTEXT_CODE": pDescFlexContextCode,
"P_DESC_FLEX_NAME": pDescFlexName,
"GetValueSetValuesTBL": list,
};
postParams.addAll(AppState().postParamsJson);
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.getValueSetValuesList ?? [];
}, url, postParams);
}
Future<List<ESERVICESVS>> getValueSetValuesSearch(String pSegmentName, String pDescFlexContextCode, String pDescFlexName, List<Map<String, dynamic>> list,
{String? empID, String? parentValue, bool hasParent = false}) async {
String url = "${ApiConsts.erpRest}GET_VALUE_SET_VALUES_SRCH";
Map<String, dynamic> postParams = {
"P_SELECTED_RESP_ID": -999,
"P_MENU_TYPE": "E",
"P_PAGE_LIMIT": 1000,
"P_PAGE_NUM": 1,
"P_PARENT_VALUE": hasParent
? parentValue
: empID != null
? parentValue
: null,
"P_SEGMENT_NAME": pSegmentName,
"P_DESC_FLEX_CONTEXT_CODE": pDescFlexContextCode,
"P_DESC_FLEX_NAME": pDescFlexName,
@ -60,7 +116,6 @@ class MyAttendanceApiClient {
return responseData.getValueSetValuesList ?? [];
}, url, postParams);
}
Future<ESERVICESDV> getDefaultValue(String pSegmentName, String pDescFlexContextCode, String pDescFlexName, List<Map<String, dynamic>> list, {String? empID}) async {
String url = "${ApiConsts.erpRest}GET_DEFAULT_VALUE";
Map<String, dynamic> postParams = {
@ -97,6 +152,25 @@ class MyAttendanceApiClient {
}, url, postParams);
}
Future<SubmitEITTransactionList> submitCEITransaction(String pDescFlexContextCode, String pFunctionName, List<Map<String, dynamic>> list, {String? empID, int? pContactRelationID}) async {
String url = "${ApiConsts.erpRest}SUBMIT_CEI_TRANSACTION";
Map<String, dynamic> postParams = {
"P_SELECTED_RESP_ID": -999,
"P_MENU_TYPE": "E",
"P_DESC_FLEX_CONTEXT_CODE": pDescFlexContextCode,
"P_CONTACT_RELATIONSHIP_ID": pContactRelationID,
"P_FUNCTION_NAME": pFunctionName,
"EITTransactionTBL": list,
"EITTransactionTBLModel": list,
};
postParams.addAll(AppState().postParamsJson);
if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.submitCEITransactionList!; //ESERVICESDV.fromJson(responseData.getDefaultValueList!.toJson());
}, url, postParams);
}
Future<SubmitEITTransactionList> submitEitTransaction(String pDescFlexContextCode, String pFunctionName, List<Map<String, dynamic>> list, {String? empID}) async {
String url = "${ApiConsts.erpRest}SUBMIT_EIT_TRANSACTION";
Map<String, dynamic> postParams = {

File diff suppressed because it is too large Load Diff

@ -9,6 +9,21 @@ class ApiConsts {
// static String baseUrl = "https://webservices.hmg.com"; // PreProd
static String baseUrl = "https://mohemm.hmg.com";
// static String baseUrl = "https://hmgwebservices.com"; // Live server
// static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
// static String baseUrl = "http://10.201.204.101:2024";
// static String baseUrl = "https://webservices.hmg.com"; // PreProd
// static String baseUrl = "https://hmgwebservices.com"; // Live server
// static String baseUrl = "https://mohemm.hmg.com"; // New Live server
//
// static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver
// static String baseUrl = "http://10.20.200.111:1010/";
// static String baseUrl = "https://webservices.hmg.com"; // PreProd
// static String baseUrl = "https://mohemm.hmg.com";
// static String baseUrl = "https://hmgwebservices.com"; // Live server
static String baseUrlServices = baseUrl + "/Services/"; // server
// static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server
static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/";

@ -7,7 +7,7 @@ class DateUtil {
///
static DateTime convertStringToDateMarathon(String date) {
// /Date(1585774800000+0300)/
// return DateTime(2025, 2, 5);
if (date != null) {
const start = "/Date(";
const end = "+0300)";
@ -38,12 +38,12 @@ class DateUtil {
return DateTime.now();
}
static DateTime convertSimpleStringDateToDate(String date) {
static DateTime convertSimpleStringDateToDate(String date, {bool isITG = false}) {
// print(date.toUpperCase());
return getDateTimeFromString(date.split(" ")[0], date.toUpperCase().split(" ")[1] + " " + date.toUpperCase().split(" ")[2]);
return getDateTimeFromString(date.split(" ")[0], date.toUpperCase().split(" ")[1] + " " + date.toUpperCase().split(" ")[2], isITG: isITG);
}
static DateTime getDateTimeFromString(String date, String time) {
static DateTime getDateTimeFromString(String date, String time, {bool isITG = false}) {
var hours = num.parse(time.split(":")[0]);
var mins = time.split(":")[1];
var secs = time.split(":")[2].split(" ")[0];
@ -60,7 +60,7 @@ class DateUtil {
}
}
date = date + " $hours:$mins:$secs";
DateTime returnDate = DateFormat("MM/dd/yyyy HH:mm:ss", "en_US").parse(date);
DateTime returnDate = isITG ? DateFormat("dd/MM/yyyy HH:mm:ss", "en_US").parse(date) : DateFormat("MM/dd/yyyy HH:mm:ss", "en_US").parse(date);
return returnDate;
}

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/models/my_documents/employee_documents_list_model.dart';
import 'package:mohem_flutter_app/ui/app_update_screen.dart';
import 'package:mohem_flutter_app/ui/attendance/add_vacation_rule_screen.dart';
import 'package:mohem_flutter_app/ui/attendance/monthly_attendance_screen.dart';
@ -33,7 +32,6 @@ import 'package:mohem_flutter_app/ui/misc/request_submit_screen.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_input_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/my_attendance_screen.dart';
import 'package:mohem_flutter_app/ui/my_team/create_request.dart';
import 'package:mohem_flutter_app/ui/my_team/employee_details.dart';
@ -55,16 +53,16 @@ import 'package:mohem_flutter_app/ui/profile/personal_info.dart';
import 'package:mohem_flutter_app/ui/profile/profile_screen.dart';
import 'package:mohem_flutter_app/ui/screens/announcements/announcement_details.dart';
import 'package:mohem_flutter_app/ui/screens/announcements/announcements.dart';
import 'package:mohem_flutter_app/ui/screens/child_education/child_education_assistance.dart';
// import 'package:mohem_flutter_app/ui/my_attendance/work_from_home_screen.dart';
import 'package:mohem_flutter_app/ui/screens/eit/add_eit.dart';
import 'package:mohem_flutter_app/ui/screens/event_activity/event_activity.dart';
import 'package:mohem_flutter_app/ui/screens/items_for_sale/add_new_item_for_sale.dart';
import 'package:mohem_flutter_app/ui/screens/items_for_sale/item_for_sale_detail.dart';
import 'package:mohem_flutter_app/ui/screens/items_for_sale/items_for_sale_home.dart';
import 'package:mohem_flutter_app/ui/screens/mowadhafhi/mowadhafhi_home.dart';
import 'package:mohem_flutter_app/ui/screens/mowadhafhi/mowadhafhi_hr_request.dart';
import 'package:mohem_flutter_app/ui/screens/mowadhafhi/request_details.dart';
import 'package:mohem_flutter_app/ui/screens/my_documents/my_document_detail_screen.dart';
import 'package:mohem_flutter_app/ui/screens/my_documents/my_documents_screen.dart';
import 'package:mohem_flutter_app/ui/screens/my_requests/my_requests.dart';
import 'package:mohem_flutter_app/ui/screens/my_requests/new_request.dart';
@ -198,6 +196,7 @@ class AppRoutes {
static const String manageGroup = "/manageGroup";
static const String groupMembers = "/groupmembers";
static const String groupChatDetailed = "/groupChatDetailed";
//Marathon
static const String marathonIntroScreen = "/marathonIntroScreen";
static const String marathonScreen = "/marathonScreen";
@ -208,6 +207,9 @@ class AppRoutes {
static const String unsafeDeviceScreen = "/unsafeDeviceScreen";
static const String appUpdateScreen = "/appUpdateScreen";
static const String childEducation = "/childEducation";
static const String activityScreen = "/activityScreen";
static final Map<String, WidgetBuilder> routes = {
login: (BuildContext context) => LoginScreen(),
@ -325,5 +327,7 @@ class AppRoutes {
unsafeDeviceScreen: (BuildContext context) => const UnsafeDeviceScreen(),
appUpdateScreen: (BuildContext context) => const AppUpdateScreen(),
childEducation: (BuildContext context) => ChildEducationAssistance(),
activityScreen:(BuildContext context) => const EventActivityScreen()
};
}

@ -205,9 +205,14 @@ class OtpDialog {
borderRadius: const BorderRadius.all(Radius.circular(10.0)),
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(
borderRadius: const BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.red),
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
// ignore_for_file: prefer_single_quotes
// ignore_for_file: prefer_single_quotes, avoid_renaming_method_parameters
import 'dart:ui';
@ -10,7 +10,7 @@ class CodegenLoader extends AssetLoader {
const CodegenLoader();
@override
Future<Map<String, dynamic>> load(String fullPath, Locale locale) {
Future<Map<String, dynamic>?> load(String path, Locale locale) {
return Future.value(mapLocales[locale.toString()]);
}
@ -20,7 +20,10 @@ class CodegenLoader extends AssetLoader {
"arabic": "عربي",
"login": "تسجيل الدخول",
"pleaseEnterLoginDetails": "الرجاء إدخال التفاصيل أدناه لتسجيل الدخول",
"userId": "UserID",
"username": "اسم المستخدم",
"userName": "اسم المستخدم",
"userSearch": "User Search",
"password": "كلمة المرور",
"welcomeBack": "مرحبا بعودتك",
"wouldYouLikeToLoginWithCurrentUsername": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟",
@ -446,7 +449,11 @@ class CodegenLoader extends AssetLoader {
"CorrectAddress": "تصحيح أو تعديل هذا العنوان",
"SelectChangeWantToMake": " حدد نوع التغيير الذي تريد القيام به.",
"profile": {
"reset_password": {"label": "Reset Password", "username": "Username", "password": "password"},
"reset_password": {
"label": "Reset Password",
"username": "Username",
"password": "password"
},
"profileCompletionPer": "استكمال الملف الشخصي",
"completeProfile": "الملف الشخصي الكامل",
"personalInformation": "معلومات شخصية",
@ -468,7 +475,10 @@ class CodegenLoader extends AssetLoader {
"gender": {
"male": "Hi man ;) ",
"female": "Hello girl :)",
"with_arg": {"male": "Hi man ;) {}", "female": "Hello girl :) {}"}
"with_arg": {
"male": "Hi man ;) {}",
"female": "Hello girl :) {}"
}
},
"reset_locale": "إعادة ضبط اللغة",
"chat": "دردشة",
@ -549,37 +559,640 @@ class CodegenLoader extends AssetLoader {
"expiredDocuments": "المستندات منتهية الصلاحية",
"missingDocuments": "مستندات مفقودة",
"uploadedDocuments": "المستندات التي تم تحميلها",
"addAtLeastOneAttachment": "الرجاء إضافة مرفق واحد على الأقل.",
"open": "يفتح",
"youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
"pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
"paymentRequest":"طلب الدفع",
"paymentDetails":"تفاصيل الدفع",
"requestNo":"رقم الطلب",
"requesterEmpNum":"رقم الموظف الذي قدم الطلب",
"requesterEmpName":"اسم الموظف مقدم الطلب",
"prepareEmpName":"إعداد اسم الموظف",
"prepareEmpNum":"إعداد رقم الموظف",
"requesterPositionName":"اسم الوظيفة لمقدم الطلب",
"preparePositionName":"إعداد اسم الوظيفة",
"requesterPayrollName":"اسم مقدم الطلب",
"requesterOperatingUnit":"وحدة تشغيل مقدم الطلب",
"payingORGName":"اسم المنظمة الدافعة",
"requestAmount":"مبلغ الطلب",
"typeofPayment":"نوع الدفع",
"beneficiaryDetails":"تفاصيل المستفيد",
"beneficiaryName":"اسم المستفيد",
"idIqama":"الهوية السعودية / الإقامة",
"beneficiaryBankName":"اسم البنك المستفيد",
"sadadNumber":"رقم سداد",
"beneficiaryIBAN":"رقم IBAN للمستفيد",
"purchaseOrders":"طلبات الشراء",
"approvalDate":"تاريخ الموافقة",
"pOAmount":"مبلغ الطلب",
"versionStatus":"حالة الإصدار",
"supplierNo":"رقم المورد",
"general":"عام",
"generate": "يولد",
"paymentRequest": "طلب الدفع",
"paymentDetails": "تفاصيل الدفع",
"requestNo": "رقم الطلب",
"requesterEmpNum": "رقم الموظف الذي قدم الطلب",
"requesterEmpName": "اسم الموظف مقدم الطلب",
"prepareEmpName": "إعداد اسم الموظف",
"requesterPositionName": "اسم الوظيفة لمقدم الطلب",
"preparePositionName": "إعداد اسم الوظيفة",
"requesterPayrollName": "اسم مقدم الطلب",
"payingORGName": "اسم المنظمة الدافعة",
"requestAmount": "مبلغ الطلب",
"typeofPayment": "نوع الدفع",
"beneficiaryDetails": "تفاصيل المستفيد",
"beneficiaryName": "اسم المستفيد",
"idIqama": "الهوية السعودية / الإقامة",
"beneficiaryBankName": "اسم البنك المستفيد",
"sadadNumber": "رقم سداد",
"beneficiaryIBAN": "رقم IBAN للمستفيد",
"purchaseOrders": "طلبات الشراء",
"approvalDate": "تاريخ الموافقة",
"pOAmount": "مبلغ الطلب",
"versionStatus": "حالة الإصدار",
"supplierNo": "رقم المورد",
"general": "عام",
"requesterOperatingUnit": "وحدة تشغيل مقدم الطلب",
"prepareEmpNum": "إعداد رقم الموظف",
"supplierInfo": "معلومات المورد",
"supplierAcNo": "رقم حساب المورد",
"supplierAcName": "اسم حساب المورد",
"supplierIBAN": "رقم IBAN للمورد",
"supplierCRNo": "رقم السجل التجاري",
"suppliedAcNo": "رقم الحساب المقدم",
"patientRefundInvoice": "فاتورة استرداد الأموال للمريض",
"patientNumber": "رقم المريض",
"patientName": "اسم المريض",
"invoiceDate": "تاريخ الفاتورة",
"refundInvoice": "فاتورة الاسترجاع",
"hospitalClinic": "عيادة المستشفى",
"graphicalAnalysis": "التحليل الرسومي",
"itemHistoryAnalysis": "تحليل تاريخ العنصر",
"pOno": "امر شراء #",
"oprUnit": "وحدة التشغيل",
"qtyOrdered": "الكمية المطلوبة",
"qtyReceived": "الكمية المستلمة",
"bonusQty": "كمية المكافأة",
"balQty": "كمية التوازن",
"videoCall": "مكالمة فيديو",
"addUsers": "إضافة مستخدمين إلى المجموعة",
"admin": "مشرف",
"areYouSureWantTodelete": "هل أنت متأكد أنك تريد الحذف؟",
"Attendance": "الحضور",
"audioCall": "مكالمة صوتية",
"editGroups": "تعديل المجموعة",
"enterGroupName": "يرجى إدخال اسم المجموعة الصحيح",
"enterGroupNamePlease": "يرجى إدخال اسم المجموعة",
"groupMembers": "أعضاء المجموعة",
"groupName": "اسم المجموعة",
"groupNameshouldbe": "يجب أن يتكون اسم المجموعة من 10 أحرف على الأقل",
"manage": "إدارة",
"manageGroup": "إدارة المجموعة",
"members": "الأعضاء",
"searchByUserName": "البحث بواسطة اسم المستخدم",
"shareScreen": "مشاركة الشاشة",
"start": "يبدأ",
"about": "عن"
};
// static const Map<String, dynamic> en_US = {
// "mohemm": "Mohemm",
// "english": "English",
// "arabic": "عربي",
// "login": "Login",
// "pleaseEnterLoginDetails": "Please enter the detail below to login",
// "username": "Username",
// "password": "Password",
// "welcomeBack": "Welcome back",
// "wouldYouLikeToLoginWithCurrentUsername": "Would you like to login with current Username?",
// "lastLoginDetails": "Last Login Details:",
// "verificationType": "Verification Type:",
// "pleaseVerify": "Please Verify",
// "pleaseVerifyForBio": "Please verify login with one of the following options",
// "verifyThroughFace": "Verify Through Face",
// "verifyThroughFingerprint": "Verify Through Fingerprint",
// "verifyThroughSMS": "Verify Through SMS",
// "verifyThroughWhatsapp": "Verify Through Whatsapp",
// "useAnotherAccount": "Use Another Account",
// "pleaseEnterTheVerificationCodeSentTo": "Please enter the verification code sent to ",
// "theVerificationCodeWillExpireIn": "The verification code will expire in ",
// "goodMorning": "Good Morning",
// "markAttendance": "Mark Attendance",
// "timeLeftToday": "Time Left Today",
// "checkIn": "Check In",
// "workList": "Work List",
// "leaveBalance": "Leave Balance",
// "missingSwipes": "Missing Swipes",
// "ticketBalance": "Ticket Balance",
// "other": "Other",
// "services": "Services",
// "viewAllServices": "View All Services",
// "monthlyAttendance": "Monthly Attendance",
// "vacationRule": "Vacation Rule",
// "vacationType": "Vacation Type",
// "startDateT": "Start Date",
// "endDateT": "End Date",
// "workFromHome": "Work From Home",
// "ticketRequest": "Ticket Request",
// "viewAllOffers": "View All Offers",
// "offers": "Offers & ",
// "discounts": "Discounts",
// "newString": "New",
// "setTheNewPassword": "Set the new password",
// "typeYourNewPasswordBelow": "Type your new password below",
// "typeYourNewActiveDirectoryPasswordBelow": "Type new active directory password below",
// "confirmPassword": "Confirm Password",
// "update": "Update",
// "title": "Title",
// "home": "Home",
// "mySalary": "My Salary",
// "createRequest": "Create Request",
// "forgotPassword": "Forgot Password",
// "employeeId": "Employee ID",
// "loginCodeWillSentToMobileNumber": "Please Enter your Employee ID, A login code will be sent to your mobile number",
// "changePassword": "Change Password",
// "ok": "OK",
// "confirm": "Confirm",
// "passwordChangedSuccessfully": "Password changed successfully",
// "itemsForSale": "Items for Sale",
// "attendanceDetails": "Attendance Details",
// "order": "order",
// "earlyOut": "Early Out",
// "shortage": "Shortage",
// "excess": "Excess",
// "lateIn": "Late In",
// "approvedCheckOut": "Approved Check Out",
// "approvedCheckIn": "Approved Check In",
// "actualCheckOut": "Actual Check Out",
// "actualCheckIn": "Actual Check In",
// "present": "PRESENT",
// "pres": "present",
// "shiftTime": "Shift Time",
// "absent": "ABSENT",
// "attendance": "Attendance",
// "scheduleDays": "Schedule\nDays",
// "offDays": "Off\nDays",
// "nonAnalyzed": "Non\nAnalyzed",
// "shortageHour": "Shortage\nHour",
// "stats": "Stats",
// "completed": "Completed",
// "doNotUseRecentPassword": "Do not use recent password",
// "atLeastOneLowercase": "At least one lowercase",
// "atLeastOneUppercase": "At least one uppercase",
// "atLeastOneNumeric": "At least one numeric",
// "minimum8Characters": "Minimum 8 characters",
// "doNotAddRepeatingLetters": "Do not add repeating letters",
// "itShouldContainSpecialCharacter": "It should not contain special characters",
// "confirmPasswordMustMatch": "Confirm password must match",
// "sms": "SMS",
// "fingerPrint": "Fingerprint",
// "face": "Face",
// "whatsapp": "Whatsapp",
// "reject": "Reject",
// "approve": "Approve",
// "cancel": "Cancel",
// "requestedItems": "Requested Items",
// "request": "Request",
// "myRequest": "My Request",
// "actions": "Actions",
// "delegate": "Delegate",
// "request_info": "Request Info",
// "attachments": "Attachments",
// "info": "Info.",
// "employeeNumber": "Employee Number",
// "assignmentNumber": "Assignment Number",
// "employeeName": "Employee Name",
// "scheduleDate": "Schedule Date",
// "shiftType": "Shift Type",
// "shift": "Shift",
// "breakText": "Break",
// "actualSwipeStart": "Actual Swipe Start",
// "actualSwipeEnd": "Actual Swipe End",
// "approvedSwipeStart": "Approved Swipe Start",
// "approvedSwipeStartReason": "Approved Swipe Start Reason",
// "approvedSwipeEnd": "Approved Swipe End",
// "approvedSwipeEndReason": "Approved Swipe End Reason",
// "from": "From",
// "to": "To",
// "sent": "Sent",
// "closed": "Closed",
// "id": "ID",
// "responder": "Responder",
// "jobTitle": "Job Title",
// "grade": "Grade",
// "jobCategory": "Job Category",
// "category": "Category",
// "employeeEmailAddress": "Employee Email Address",
// "payrollBranch": "Payroll Branch",
// "yourChangeHasBeenSavedSuccessfully": "Your change has been saved successfully",
// "code": "Code",
// "unit": "Unit",
// "quantity": "Quantity",
// "dateRequired": "Date Required",
// "lineStatus": "Line Status",
// "statusDate": "Status Date",
// "transactionType": "Transaction Type",
// "operatingUnit": "Operating Unit",
// "organizationCode": "Organization Code",
// "organization": "Organization",
// "fromSubInventory": "From Sub Inventory",
// "fromLocator": "From Locator",
// "toSubInventory": "To Sub Inventory",
// "toLocator": "To Locator",
// "shipToLocator": "Ship To Locator",
// "itemHistory": "Item History",
// "mfg": "MFG",
// "lineType": "Line Type",
// "price": "Price",
// "lineAmount": "Line Amount",
// "lineDiscount": "Line Discount %",
// "needByDate": "Need By Date",
// "promisedDate": "Promised Date",
// "deliverToLocation": "Deliver To Location",
// "requisitionNumber": "Requisition Number",
// "requester": "Requester",
// "subject": "Subject",
// "quotationAnalysis": "Quotation Analysis",
// "description": "Description",
// "supplier": "Supplier",
// "site": "Site",
// "buyer": "Buyer",
// "preparer": "Preparer",
// "creationDate": "Creation Date",
// "shipToLocation": "Ship To Location",
// "quotationNumber": "Quotation Number",
// "quotationDate": "Quotation Date",
// "paymentTerms": "Payment Terms",
// "currency": "Currency",
// "grossAmount": "Gross Amount",
// "discountAmount": "Discount Amount",
// "customDuty": "Custom Duty",
// "shipHandle": "Ship Handle",
// "otherCharges": "Other Charges",
// "totalPOAmountWithVAT": "Total PO Amount With VAT",
// "totalPOAmountInWords": "Total PO Amount In Words",
// "requestNumber": "Request Number",
// "uom": "UOM",
// "operatingCode": "Operating Code",
// "poNumber": "PO Number",
// "revision": "Revision",
// "quantityOrdered": "Quantity Ordered",
// "quantityReceived": "Quantity Received",
// "bonusQuantity": "Bonus Quantity",
// "purchasePrice": "Purchase Price",
// "discountPer": "Discount %",
// "balanceQuantity": "Balance Quantity",
// "netPrice": "Net Price",
// "closureStatus": "Closure Status",
// "quotationNetPrice": "Quotation Net Price",
// "quotationUOM": "Quotation UOM",
// "quotationQty": "Quotation Qty",
// "itemCode": "item Code",
// "vendorName": "Vendor Name",
// "quotationMFGPartNumber": "Quotation MFG Part Number",
// "quotationDeliveryDate": "Quotation Delivery Date",
// "quotationBonusQuantity": "Quotation Bonus Quantity",
// "quotationLineTotal": "Quotation Line Total",
// "rfqUOM": "RFQ UOM",
// "rfqQty": "RFQ Qty",
// "rfqNumber": "RFQ Number",
// "msg": "Hello {} in the {} world ",
// "msg_named": "{} are written in the {lang} language",
// "clickMe": "Click me",
// "human": "Human",
// "resources": "Resources",
// "details": "Details",
// "noDataAvailable": "No Data Available",
// "productName": "Product Name",
// "productDescription": "Product Description",
// "unitPrice": "Unit Price",
// "manufacturerName": "Manufacturer Name",
// "manufacturerPartName": "Manufacturer Part Name",
// "supplierName": "Supplier Name",
// "supplierContact": "Supplier Contact",
// "chargeToPatient": "Charge To Patient",
// "justification": "Justification",
// "itemDescription": "Item Description",
// "groupCode": "Group Code",
// "primaryUOM": "Primary UOM",
// "subgroupDescription": "Subgroup Description",
// "subgroupCode": "Subgroup Code",
// "groupDescription": "Group Description",
// "templateName": "Template Name",
// "itemCreationStatus": "Item Creation Status",
// "standardizationApprovalStatus": "Standardization Approval Status",
// "standardizationApprovalRejectionReason": "Standardization Approval Rejection Reason",
// "analyzedBy": "Analyzed By",
// "approvedDate": "Approved Date",
// "itemType": "Item Type",
// "relatedTo": "Related To",
// "requestDate": "Request Date",
// "analyzedDate": "Analyzed Date",
// "urgent": "Urgent",
// "requestDetails": "Request Details",
// "approvalLevel": "Approval Level",
// "requesterDetails": "Requester Details",
// "myAttendance": "My Attendance",
// "workOnBreak": "Work On Break",
// "next": "Next",
// "apply": "Apply",
// "mobile": "Mobile",
// "year": "Year",
// "month": "Month",
// "day": "Day",
// "completingYear": "We appreciate you for completing the service of",
// "address": "Address",
// "phoneNumber": "Phone Number",
// "businessGroup": "Business",
// "Payroll": "Payroll",
// "civilIdentityNumber": "Civil Identity Number",
// "dateOfBirth": "Date of Birth",
// "maritalStatus ": "Marital Status ",
// "fullName": "Full Name",
// "remove": "Remove",
// "Attendance": "Attendance",
// "submit": "Submit",
// "areYouSureYouWantToSubmit": "Are you sure you want to submit?",
// "comments": "Comments",
// "writeComment": "Write a comment",
// "approversList": "Approvers List",
// "yourRequestHasBeenSubmittedForApprovals": "Your request has been submitted for approvals",
// "monthlyPaySlip": "Monthly Pay Slip",
// "particular": "Particular",
// "earnings": "Earnings",
// "deductions": "Deductions",
// "paymentMethodName": "Payment Method Name",
// "bankName": "Bank Name",
// "branchCode": "Branch Code",
// "accountNo": "Account No",
// "summaryOfInformation": "Summary of Information",
// "totalPayAmount": "Total Pay Amount",
// "paymentInformation": "Payment Information",
// "amount": "Amount",
// "correctCurrentDatails": "correct or complete the current details",
// "selectType": "Select the type of change you want to make",
// "enterNewInfo": "Enter new Information because of a real change to the current details (e.g because of a change in marital status)",
// "endDate": "*End Date",
// "removeThisMember": "Are You Sure You Want to Remove this Member?",
// "wantUpdateThisMember": "Are You Sure You Want to Update this Member?",
// "addNewFamilyMember": "Add New Family Member",
// "addRow": "Add new row",
// "pleaseSelect": "Please Select *",
// "delete": "delete",
// "add": "Add",
// "edit": "Edit",
// "myProfile": "My Profile",
// "mowadhafhi": "Mowadhafi",
// "searchAnnouncements": "Search Announcements",
// "announcements": "Announcements",
// "swipeRequest": "Swipe Request",
// "serviceType": "Service Type",
// "departmentName": "Department Name",
// "selectDepartment": "Select Department",
// "relatedSection": "Related Section",
// "selectSection": "Select Section",
// "relatedTopic": "Related Topic",
// "selectTopic": "Select Topic",
// "supportingDocument": "Supporting Document",
// "mowadhafhiRequest": "Mowadhafi Request",
// "ticketReference": "Ticket Reference",
// "section": "Section",
// "topic": "Topic",
// "actionBy": "Action By",
// "pending": "Pending",
// "pendingTransactions": "Pending Transactions",
// "selectRequestType": "Please select request type",
// "dateFrom": "Date From",
// "dateTo": "Date To",
// "requestName": "Request Name",
// "createdFor": "Created For",
// "requestType": "Request Type",
// "requestCreatedSuccessfully": "Request created successfully",
// "search": "Search",
// "wantToReject": "Are you sure want to reject?",
// "employeeDigitalID": "Employee Digital ID",
// "businessCard": "Business Card",
// "checkOut": "Check Out",
// "regular": "Regular",
// "mark": "Mark",
// "performance": "Performance Evaluation",
// "performanceEvaluationIn": "Your performance Evaluation in",
// "valuationIn": "Performance Evaluation in",
// "viewBusinessCard": "View Business Card",
// "performanceEvaluation": "Performance Evaluation",
// "logout": "Logout",
// "selectMethodOfAttendance": "Select the method to mark the attendance",
// "comeNearHMGWifi": "Please come near to HMG wifi",
// "deliverNotificationToMeRegardless": "Deliver notifications to me regardless of any general rules",
// "close": "Close",
// "respond": "Respond",
// "vacationRuleAdded": "Vacation rule added",
// "selectTypeT": "Select Type",
// "notification": "Notification",
// "selectNotification": "Select Notification",
// "ifAllSelectedYouWillSkip": "*If All is selected, you will skip to step 3",
// "applyForVacationRule": "Apply for Vacation Rule",
// "step1": "Step 1",
// "step2": "Step 2",
// "step3": "Step 3",
// "message": "Message",
// "writeAMessage": "Write a message",
// "notificationReassign": "Notification Reassign",
// "selectEmployee": "Select Employee",
// "searchEmployeeForReplacement": "Search employee for replacement",
// "searchForEmployee": "Search for Employee",
// "pleaseSpecifyEndTime": "Please specify End Time",
// "pleaseSelectNotificationReassign": "Please select notification reassign",
// "pleaseSelectEmployeeForReplacement": "Please select employee for replacement",
// "pleaseSelectAction": "Please select action",
// "pleaseSelectDate": "Please select date",
// "todayAttendance": "Today's Attendance",
// "viewAttendance": "View Attendance",
// "teamMembers": "Team Members",
// "profileDetails": "Profile Details",
// "noResultsFound": "No Results Found",
// "searchBy": "Search by",
// "myTeamMembers": "My Team Members",
// "save": "Save",
// "TurnNotificationsFor": "Turn on notifications for",
// "worklistSettings": "Worklist Settings",
// "absenceType": "Absence Type",
// "absenceCategory": "Absence Category",
// "days": "Days",
// "hours": "Hours",
// "approvalStatus": "Approval Status",
// "absenceStatus": "Absence Status",
// "poweredBy": "Powered By",
// "cloudSolutions": "Cloud Solutions",
// "subordinateLeave": "Subordinate Leave",
// "numberDays": "Number of days",
// "selectTemplate": "Select Template",
// "myPostedAds": "My posted ads",
// "browseCategories": "Browse Categories",
// "searchItems": "Search Items",
// "offerAndDiscounts": "Offer & Discounts",
// "offerValid": "Offer Valid",
// "offerExpired": "Offer Expired",
// "whatAreYouOffering": "What are you offering?",
// "selectCategory": "Select Category",
// "inProgress": "InProgress",
// "locked": "Locked",
// "addDetails": "Add Details",
// "reviewAndSell": "Review & Sell",
// "itemTitle": "Item Title",
// "itemCondition": "Item Condition",
// "used": "Used",
// "region": "Region",
// "selectRegion": "Select Region",
// "itemPrice": "Item Price",
// "itemPhotos": "Item Photos",
// "itemInfo": "Item Info",
// "uploadAttachment": "Upload Attachment",
// "selectFromGalleryOrOpenCamera": "Select from gallery or open camera",
// "openCamera": "Open\nCamera",
// "uploadFromGallery": "Upload from\nGallery",
// "name": "Name",
// "email": "Email",
// "noHistoryAvailable": "No History Available",
// "purchaseRequisition": "Purchase Requisition",
// "moveOrder": "Move Order",
// "humanResource": "Human Resource",
// "purchaseOrder": "Purchase Order",
// "ITGForms": "ITG Forms",
// "itemCreation": "Item Creation",
// "stamp": "Stamp",
// "addFavoriteList": "Do you want to add {name} in your favorite list",
// "feedbackUserExperience": "This is to get the feedback about the user experience",
// "rateUI": "How would you like to rate",
// "rateUI2": "How do you satisfied with this application",
// "submitSurvey": "Submit Survey",
// "typeHere": "Type here",
// "infoDetail": "Info Detail",
// "amount_detail": "Amount Detail",
// "currentBalance": "Current Balance",
// "currentLeaveBalance": "Current Leave Balance",
// "calculatedDays": "Calculated Days",
// "totalDays": "Total Days",
// "usedBalance": "Used",
// "infants": "Infants",
// "child": "Child",
// "adult": "Adult",
// "updateMember": "Are You Sure You Want to Update this Member?",
// "fieldIsEmpty": "'{data}' Field is empty. Please select",
// "pleaseEnterComments": "Please enter comments",
// "skip": "Skip",
// "typeCurrentPasswordBelow": "Type Your Current password below",
// "currentPassword": "Current password",
// "concurrentReports": "Concurrent Reports",
// "EnterNewAddressMoved": "Enter a new address if you have moved",
// "CorrectAddress": "Correct or amend this address",
// "SelectChangeWantToMake": "Select the type of change you want to make",
// "profile": {
// "reset_password": {
// "label": "Reset Password",
// "username": "Username",
// "password": "password"
// },
// "clicked": {
// "zero": "You clicked {} times!",
// "one": "You clicked {} time!",
// "two": "You clicked {} times!",
// "few": "You clicked {} times!",
// "many": "You clicked {} times!",
// "other": "You clicked {} times!"
// },
// "gender": {
// "male": "Hi man ;) ",
// "female": "Hello girl :)",
// "with_arg": {"male": "Hi man ;) {}", "female": "Hello girl :) {}"}
// }
// },
// "reset_locale": "إعادة ضبط اللغة",
// "chat": "دردشة",
// "mychats": "دردشاتي",
// "advancedSearch": "بحث متقدم",
// "openNot": "التبليغات المفتوحة",
// "fyi": "تبليغات للعلم",
// "toDo": "تبليغات الأعمال",
// "all": "كل التبليغات",
// "meNot": "تبليغات صادرة مني",
// "view": "عرض",
// "fromUserName": "من",
// "sentDate": "تاريخ الإرسال",
// "itemTypeDisplayName": "اسم العرض",
// "none": "بدون",
// "createNewChat": "إنشاء محادثة جديدة",
// "brainMarathon": "ماراثون الدماغ",
// "contestTopicAbout": "سيكون موضوع المسابقة حول:",
// "gameDate": "تاريخ اللعبة:",
// "gameTime": "وقت اللعب:",
// "joinMarathon": "انضم إلى ماراثون",
// "joinDemoMarathon": "انضم إلى الماراثون التجريبي",
// "demo": "تجريبي",
// "minutes": "الدقائق",
// "seconds": "ثواني",
// "note": "ملحوظة:",
// "demoMarathonNoteP1": "يمكنك لعب ماراثون العرض لتتعلم كيف يعمل. يمكنك الانضمام إلى ماراثون",
// "demoMarathonNoteP2": "خمس دقائق",
// "demoMarathonNoteP3": "قبل الوقت الفعلي.",
// "sponsoredBy": "برعاية:",
// "question": "سؤال",
// "marathoners": "الماراثون",
// "marathoner": "ماراثونر",
// "prize": "جائزة:",
// "winnerSelection": "اختيار الفائز",
// "qualifiers": "تصفيات",
// "qualifier": "المؤهل",
// "getReadyForContest": "استعد للمسابقة القادمة:",
// "winnerSelectedRandomly": "سيتم اختيار الفائز عشوائياً من بين التصفيات.",
// "fingersCrossed": "تشابك الاصابع!!!",
// "congrats": "مبروك !!!",
// "allQuestionsCorrect": "لقد أجبت على جميع الأسئلة بشكل صحيح.",
// "otp": "OTP",
// "verification": "تَحَقّق",
// "resend": "إعادة إرسال",
// "codeExpire": "انتهت صلاحية رمز التحقق",
// "typeheretoreply": "اكتب هنا للرد",
// "favorite": "مفضلتي",
// "searchfromchat": "البحث من الدردشة",
// "yourAnswerCorrect": "إجابتك صحيحة",
// "youMissedTheQuestion": "نفد منك الوقت. أنت خارج اللعبة. لكن يمكنك الاستمرار وكمشاهد.",
// "wrongAnswer": "إجابتك غير صحيحة. أنت خارج اللعبة. لكن يمكنك الاستمرار وكمشاهد.",
// "oops": "أوه!!!",
// "winner": "الفائز",
// "youWantToLeaveMarathon": "هل أنت متأكد أنك تريد العودة؟ سوف تخرج من المسابقة.",
// "ourSponsor": "راعينا:",
// "startingIn": "يبدأ في",
// "youAreOutOfContest": "أنت خارج المسابقة.",
// "winners": "الفائزين!!!",
// "expireAfter": "تنتهي بعد",
// "oneWeek": "أسبوع 1",
// "twoWeek": "2 أسبوع",
// "noUpcoming": "لا يوجد قادم",
// "fakeLocation": ".لقد تتبعنا أنك تحاول استخدام موقع مزيف! يعتبر هذا مخالفة وقد تم إخطار الموارد البشرية",
// "noWinner": "حزين! لم يفز أحد اليوم.",
// "myTeam": "فريقي",
// "youCanPlayDemo": "لكن يمكنك لعب العرض",
// "group": "مجموعة",
// "searchGroup": "مجموعة البحث",
// "connectHmgWifi": "قم بتوصيل HMG WIFI",
// "connectedHmgWifi": "اتصال HMG WIFI",
// "itgForms": "نماذج (ITG)",
// "resetAdPassword": "إعادة تعيين كلمة مرور AD",
// "myDocuments": "مستنداتي",
// "requiredDocuments": "المستندات المطلوبة",
// "optionalDocuments": "المستندات الاختيارية",
// "allDocuments": "كافة المستندات",
// "expiredDocuments": "المستندات منتهية الصلاحية",
// "missingDocuments": "مستندات مفقودة",
// "uploadedDocuments": "المستندات التي تم تحميلها",
// "youCannotJoinTheMarathon": "لا يمكنك الانضمام إلى الماراثون لأنك تجاوزت الحد الزمني",
// "pleaseClickButtonToJoinMarathon": "الرجاء الضغط على الزر أدناه للانضمام إلى الماراثون",
// "paymentRequest": "طلب الدفع",
//
// "paymentDetails": "تفاصيل الدفع",
// "requestNo": "رقم الطلب",
// "requesterEmpNum": "رقم الموظف الذي قدم الطلب",
// "requesterEmpName": "اسم الموظف مقدم الطلب",
// "prepareEmpName": "إعداد اسم الموظف",
// "prepareEmpNum": "إعداد رقم الموظف",
// "requesterPositionName": "اسم الوظيفة لمقدم الطلب",
// "preparePositionName": "إعداد اسم الوظيفة",
// "requesterPayrollName": "اسم مقدم الطلب",
// "requesterOperatingUnit": "وحدة تشغيل مقدم الطلب",
// "payingORGName": "اسم المنظمة الدافعة",
// "requestAmount": "مبلغ الطلب",
// "typeofPayment": "نوع الدفع",
// "beneficiaryDetails": "تفاصيل المستفيد",
// "beneficiaryName": "اسم المستفيد",
// "idIqama": "الهوية السعودية / الإقامة",
// "beneficiaryBankName": "اسم البنك المستفيد",
// "sadadNumber": "رقم سداد",
// "beneficiaryIBAN": "رقم IBAN للمستفيد",
// "purchaseOrders": "طلبات الشراء",
// "approvalDate": "تاريخ الموافقة",
// "pOAmount": "مبلغ الطلب",
// "versionStatus": "حالة الإصدار",
// "supplierNo": "رقم المورد",
// "general": "عام",
// "generate": "يولد",
// };
static const Map<String, dynamic> en_US = {
"mohemm": "Mohemm",
"english": "English",
@ -1176,6 +1789,20 @@ class CodegenLoader extends AssetLoader {
"invoiceDate" : 'Invoice Date',
"refundInvoice" : 'Refund Invoice',
"hospitalClinic" : 'Hospital Clinic',
"profileCompletionPer": "Profile Completion",
"completeProfile": "Complete Profile",
"personalInformation": "Personal Information",
"basicDetails": "Basic Details",
"contactDetails": "Contact Details",
"familyDetails": "Family Members",
"effectiveDate": "Effective Date",
"country": "Country"
};
// 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};
}
}

@ -6,7 +6,10 @@ abstract class LocaleKeys {
static const arabic = 'arabic';
static const login = 'login';
static const pleaseEnterLoginDetails = 'pleaseEnterLoginDetails';
static const userId = 'userId';
static const username = 'username';
static const userName = 'userName';
static const userSearch = 'userSearch';
static const password = 'password';
static const welcomeBack = 'welcomeBack';
static const wouldYouLikeToLoginWithCurrentUsername = 'wouldYouLikeToLoginWithCurrentUsername';
@ -403,7 +406,6 @@ abstract class LocaleKeys {
static const purchaseOrder = 'purchaseOrder';
static const ITGForms = 'ITGForms';
static const itemCreation = 'itemCreation';
static const paymentRequest = 'paymentRequest';
static const stamp = 'stamp';
static const addFavoriteList = 'addFavoriteList';
static const feedbackUserExperience = 'feedbackUserExperience';
@ -527,7 +529,6 @@ abstract class LocaleKeys {
static const expiredDocuments = 'expiredDocuments';
static const missingDocuments = 'missingDocuments';
static const uploadedDocuments = 'uploadedDocuments';
static const manage = 'manage';
static const members = 'members';
static const areYouSureWantTodelete = 'areYouSureWantTodelete';
@ -544,9 +545,9 @@ abstract class LocaleKeys {
static const videoCall ='videoCall';
static const shareScreen ='shareScreen';
static const searchByUserName ='searchByUserName';
static const userSearch ='userSearch';
static const userName ='userName';
static const userId ='userId';
// static const userSearch ='userSearch';
// static const userName ='userName';
// static const userId ='userId';
static const addAtLeastOneAttachment ='addAtLeastOneAttachment';
static const pleaseClickButtonToJoinMarathon ='pleaseClickButtonToJoinMarathon';
static const youCannotJoinTheMarathon ='youCannotJoinTheMarathon';
@ -589,4 +590,17 @@ abstract class LocaleKeys {
static const invoiceDate = 'Invoice Date';
static const refundInvoice = 'Refund Invoice';
static const hospitalClinic = 'Hospital Clinic';
static const paymentRequest = 'paymentRequest';
static const graphicalAnalysis = 'graphicalAnalysis';
static const itemHistoryAnalysis = 'itemHistoryAnalysis';
static const pOno = 'pOno';
static const oprUnit = 'oprUnit';
static const qtyOrdered = 'qtyOrdered';
static const qtyReceived = 'qtyReceived';
static const bonusQty = 'bonusQty';
static const balQty = 'balQty';
static const Attendance = 'Attendance';
static const start = 'start';
static const about ='about';
}

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

@ -19,18 +19,11 @@ import 'package:provider/provider.dart';
import 'package:provider/single_child_widget.dart';
import 'package:sizer/sizer.dart';
// test uat account
// username 199067
// pass h123456
Logger logger = Logger(
// filter: null, // Use the default LogFilter (-> only log in debug mode)
printer: PrettyPrinter(
lineLength: 0,
), // Use the PrettyPrinter to format and print log
// output: null, // U
);
Logger logger = Logger(printer: PrettyPrinter(lineLength: 0));
class MyHttpOverrides extends HttpOverrides {
@override
@ -43,10 +36,7 @@ bool isTablet = false;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
await EasyLocalization.ensureInitialized();
AppState().setPostParamsInitConfig();
HttpOverrides.global = MyHttpOverrides();
@ -54,26 +44,15 @@ Future<void> main() async {
runApp(
EasyLocalization(
supportedLocales: const <Locale>[
Locale('en', 'US'),
Locale('ar', 'SA'),
],
supportedLocales: const <Locale>[Locale('en', 'US'), Locale('ar', 'SA')],
path: 'assets/langs',
assetLoader: const CodegenLoader(),
child: MultiProvider(
providers: <SingleChildWidget>[
ChangeNotifierProvider<DashboardProviderModel>(
create: (_) => DashboardProviderModel(),
),
ChangeNotifierProvider<EITProviderModel>(
create: (_) => EITProviderModel(),
),
ChangeNotifierProvider<ChatProviderModel>(
create: (_) => ChatProviderModel(),
),
ChangeNotifierProvider<MarathonProvider>(
create: (_) => MarathonProvider(),
),
ChangeNotifierProvider<DashboardProviderModel>(create: (_) => DashboardProviderModel()),
ChangeNotifierProvider<EITProviderModel>(create: (_) => EITProviderModel()),
ChangeNotifierProvider<ChatProviderModel>(create: (_) => ChatProviderModel()),
ChangeNotifierProvider<MarathonProvider>(create: (_) => MarathonProvider()),
// ChangeNotifierProvider<ChatCallProvider>(
// create: (_) => ChatCallProvider(),
// ),
@ -96,30 +75,19 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Sizer(
builder: (
BuildContext context,
Orientation orientation,
DeviceType deviceType,
) {
builder: (BuildContext context, Orientation orientation, DeviceType deviceType) {
PostParamsModel? obj = AppState().postParamsObject;
obj?.languageID = EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2;
AppState().setPostParamsModel(obj!);
List<LocalizationsDelegate<dynamic>> delegates = context.localizationDelegates;
// delegates.add(GlobalMaterialLocalizations.delegate);
delegates.add(
MonthYearPickerLocalizations.delegate,
);
delegates.add(MonthYearPickerLocalizations.delegate);
return MaterialApp(
navigatorKey: AppRoutes.navigatorKey,
builder: (BuildContext context, Widget? child) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
child: child!,
);
return MediaQuery(data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), child: child!);
},
theme: AppTheme.getTheme(
EasyLocalization.of(context)?.locale.languageCode == "ar",
),
theme: AppTheme.getTheme(EasyLocalization.of(context)?.locale.languageCode == "ar"),
debugShowCheckedModeBanner: false,
localizationsDelegates: delegates,
supportedLocales: context.supportedLocales,

@ -0,0 +1,84 @@
class EventActivityList {
EventActivityList({
required this.id,
required this.titleEn,
required this.titleAr,
required this.shortDescEn,
required this.shortDescAr,
required this.longDescEn,
required this.longDescAr,
required this.url,
required this.startOn,
required this.endOn,
required this.channel,
required this.isActive,
required this.createdBy,
required this.createdOn,
required this.modifiedBy,
required this.modifiedOn,
required this.shortImageURL,
required this.detailImageURL
});
final int? id;
final String? titleEn;
final String? titleAr;
final String? shortDescEn;
final String? shortDescAr;
final String? longDescEn;
final String? longDescAr;
final String? url;
final String? startOn;
final String? endOn;
final int? channel;
final bool? isActive;
final int? createdBy;
final String? createdOn;
final String? modifiedBy;
final String? modifiedOn;
final String? shortImageURL;
final String? detailImageURL;
factory EventActivityList.fromJson(Map<String, dynamic> json) {
return EventActivityList(
id: json["ID"],
titleEn: json["TitleEn"],
titleAr: json["TitleAr"],
shortDescEn: json["ShortDescEn"],
shortDescAr: json["ShortDescAr"],
longDescEn: json["LongDescEn"],
longDescAr: json["LongDescAr"],
url: json["URL"],
startOn: json["StartOn"],
endOn: json["EndOn"],
channel: json["Channel"],
isActive: json["IsActive"],
createdBy: json["CreatedBy"],
createdOn: json["CreatedOn"],
modifiedBy: json["ModifiedBy"],
modifiedOn: json["ModifiedOn"],
shortImageURL: json["ShortImageURL"],
detailImageURL: json["DetailImageURL"]
);
}
Map<String, dynamic> toJson() => {
"ID": id,
"TitleEn": titleEn,
"TitleAr": titleAr,
"ShortDescEn": shortDescEn,
"ShortDescAr": shortDescAr,
"LongDescEn": longDescEn,
"LongDescAr": longDescAr,
"URL": url,
"StartOn": startOn,
"EndOn": endOn,
"Channel": channel,
"IsActive": isActive,
"CreatedBy": createdBy,
"CreatedOn": createdOn,
"ModifiedBy": modifiedBy,
"ModifiedOn": modifiedOn,
"DetailImageURL": detailImageURL,
"ShortImageURL" : shortImageURL
};
}

@ -4,13 +4,15 @@ class GetSetValuesRequestModel {
String? dESCRIPTION;
String? iDCOLUMNNAME;
String? fLEXVALUESETNAME;
String? pSRCHVALUECOLUMNNAME;
GetSetValuesRequestModel(
{this.sEGMENTNAME,
this.vALUECOLUMNNAME,
this.dESCRIPTION,
this.iDCOLUMNNAME,
this.fLEXVALUESETNAME});
this.fLEXVALUESETNAME,
this.pSRCHVALUECOLUMNNAME,
});
GetSetValuesRequestModel.fromJson(Map<String, dynamic> json) {
sEGMENTNAME = json['SEGMENT_NAME'];
@ -18,6 +20,7 @@ class GetSetValuesRequestModel {
dESCRIPTION = json['DESCRIPTION'];
iDCOLUMNNAME = json['ID_COLUMN_NAME'];
fLEXVALUESETNAME = json['FLEX_VALUE_SET_NAME'];
pSRCHVALUECOLUMNNAME = json['P_SRCH_VALUE_COLUMN_NAME'];
}
Map<String, dynamic> toJson() {
@ -27,6 +30,7 @@ class GetSetValuesRequestModel {
data['DESCRIPTION'] = this.dESCRIPTION;
data['ID_COLUMN_NAME'] = this.iDCOLUMNNAME;
data['FLEX_VALUE_SET_NAME'] = this.fLEXVALUESETNAME;
data['P_SRCH_VALUE_COLUMN_NAME'] =this.pSRCHVALUECOLUMNNAME;
return data;
}
}

@ -1,6 +1,7 @@
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/basic_member_information_model.dart';
import 'package:mohem_flutter_app/models/dashboard/event_activity.dart';
import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_open_missing_swipes_list_model.dart';
@ -184,9 +185,9 @@ class GenericResponseModel {
List<GetBasicDetColsStructureList>? getBasicDetColsStructureList;
List<GetBasicDetDffStructureList>? getBasicDetDffStructureList;
List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList;
List<String>? getCEICollectionNotificationBodyList;
List<String>? getCEIDFFStructureList;
List<String>? getCEITransactionList;
List<GetEitCollectionNotificationBodyList>? getCEICollectionNotificationBodyList;
List<GetEITDFFStructureList>? getCEIDFFStructureList;
List<GetCEITransactionList>? getCEITransactionList;
List<String>? getCcpTransactionsList;
List<GetContactColsStructureList>? getContactColsStructureList;
@ -214,6 +215,7 @@ class GenericResponseModel {
List<String>? getItemTypesList;
List<String>? getLookupValuesList;
List<GetMenuEntriesList>? getMenuEntriesList;
List<EventActivityList>? getEventActivityList;
List<GetMoItemHistoryList>? getMoItemHistoryList;
List<GetMoNotificationBodyList>? getMoNotificationBodyList;
List<GetNotificationButtonsList>? getNotificationButtonsList;
@ -226,6 +228,7 @@ class GenericResponseModel {
List<String>? getOrganizationsSalariesList;
List<GetPaymentInformationList>? getPaymentInformationList;
List<GetPayslipList>? getPayslipList;
// List<String>? getPendingReqDetailsList;
// List<String>? getPendingReqFunctionsList;
List<GetPerformanceAppraisalList>? getPerformanceAppraisalList;
@ -355,7 +358,7 @@ class GenericResponseModel {
StartTermApprovalProcessList? startTermApprovalProcessList;
SubmitAddressTransaction? submitAddressTransactionList;
SubmitBasicDetailsTransactionList? submitBasicDetTransactionList;
String? submitCEITransactionList;
SubmitEITTransactionList? submitCEITransactionList;
SubmitCcpTransactionList? submitCcpTransactionList;
SubmitContactTransactionList? submitContactTransactionList;
SubmitEITTransactionList? submitEITTransactionList;
@ -486,6 +489,7 @@ class GenericResponseModel {
this.getItemTypesList,
this.getLookupValuesList,
this.getMenuEntriesList,
this.getEventActivityList,
this.getMoItemHistoryList,
this.getMoNotificationBodyList,
this.getNotificationButtonsList,
@ -503,7 +507,7 @@ class GenericResponseModel {
this.getPoItemHistoryList,
this.getPoNotificationBodyList,
this.getPrNotificationBodyList,
this.getPaymentNotificationBodyList,
this.getPaymentNotificationBodyList,
this.getPRInformationList,
this.getQuotationAnalysisList,
this.getRFCEmployeeListList,
@ -700,7 +704,7 @@ class GenericResponseModel {
cancelHRTransactionLIst = json['CancelHRTransactionLIst'] != null ? new CancelHRTransactionLIst.fromJson(json['CancelHRTransactionLIst']) : null;
if (json['GetTermNotificationBodyList'] != null) {
getTermNotificationBodyList = <TerminationNotificationBody>[];
getTermNotificationBodyList = <TerminationNotificationBody>[];
json['GetTermNotificationBodyList'].forEach((v) {
getTermNotificationBodyList!.add(TerminationNotificationBody.fromJson(v));
});
@ -844,9 +848,24 @@ class GenericResponseModel {
});
}
getCEICollectionNotificationBodyList = json['GetCEICollectionNotificationBodyList'];
getCEIDFFStructureList = json['GetCEIDFFStructureList'];
getCEITransactionList = json['GetCEITransactionList'];
getCEICollectionNotificationBodyList = json["GetCEICollectionNotificationBodyList"] == null
? null
: List<GetEitCollectionNotificationBodyList>.from(json["GetCEICollectionNotificationBodyList"].map((x) => GetEitCollectionNotificationBodyList.fromJson(x)));
if (json['GetCEIDFFStructureList'] != null) {
getCEIDFFStructureList = <GetEITDFFStructureList>[];
json['GetCEIDFFStructureList'].forEach((v) {
getCEIDFFStructureList!.add(GetEITDFFStructureList.fromJson(v));
});
}
if (json['GetCEITransactionList'] != null) {
getCEITransactionList = <GetCEITransactionList>[];
json['GetCEITransactionList'].forEach((v) {
getCEITransactionList!.add(GetCEITransactionList.fromJson(v));
});
}
getCcpTransactionsList = json['GetCcpTransactionsList'];
getContactNotificationBodyList = json["GetContactNotificationBodyList"] == null ? null : GetContactNotificationBodyList.fromJson(json["GetContactNotificationBodyList"]);
if (json['GetContactColsStructureList'] != null) {
@ -958,6 +977,7 @@ class GenericResponseModel {
getItemTypesList = json['GetItemTypesList'];
getLookupValuesList = json['GetLookupValuesList'];
getMenuEntriesList = json["GetMenuEntriesList"] == null ? null : List<GetMenuEntriesList>.from(json["GetMenuEntriesList"].map((x) => GetMenuEntriesList.fromJson(x)));
getEventActivityList = json["EventActivityList"] == null ? null : List<EventActivityList>.from(json["EventActivityList"].map((x) => EventActivityList.fromJson(x)));
if (json['GetMoItemHistoryList'] != null) {
getMoItemHistoryList = <GetMoItemHistoryList>[];
json['GetMoItemHistoryList'].forEach((v) {
@ -1028,7 +1048,6 @@ class GenericResponseModel {
getPrNotificationBodyList = json['GetPrNotificationBodyList'] != null ? GetPrNotificationBodyList.fromJson(json['GetPrNotificationBodyList']) : null;
getPaymentNotificationBodyList = json['Pay_ReqNotificationBody'] != null ? GetPaymentNotificationBodyList.fromJson(json['Pay_ReqNotificationBody']) : null;
getPRInformationList = json['PR_Information_List'] != null ? GetPRInformationList.fromJson(json['PR_Information_List']) : null;
if (json['GetQuotationAnalysisList'] != null) {
getQuotationAnalysisList = <GetQuotationAnalysisList>[];
@ -1106,8 +1125,6 @@ class GenericResponseModel {
});
}
if (json['GetTimeCardSummaryList'] != null) {
getTimeCardSummaryList = <GetTimeCardSummaryList>[];
json['GetTimeCardSummaryList'].forEach((v) {
@ -1367,7 +1384,7 @@ class GenericResponseModel {
submitAddressTransactionList = json['SubmitAddressTransactionList'] != null ? SubmitAddressTransaction.fromJson(json['SubmitAddressTransactionList']) : null;
submitBasicDetTransactionList = json['SubmitBasicDetTransactionList'] != null ? SubmitBasicDetailsTransactionList.fromJson(json['SubmitBasicDetTransactionList']) : null;
submitCEITransactionList = json['SubmitCEITransactionList'];
submitCEITransactionList = json['SubmitCEITransactionList'] != null ? SubmitEITTransactionList.fromJson(json['SubmitCEITransactionList']) : null;
submitCcpTransactionList = json['SubmitCcpTransactionList'] != null ? new SubmitCcpTransactionList.fromJson(json['SubmitCcpTransactionList']) : null;
submitContactTransactionList = json['SubmitContactTransactionList'] != null ? SubmitContactTransactionList.fromJson(json['SubmitContactTransactionList']) : null;
submitEITTransactionList = json['SubmitEITTransactionList'] != null ? SubmitEITTransactionList.fromJson(json['SubmitEITTransactionList']) : null;
@ -1542,10 +1559,15 @@ class GenericResponseModel {
if (this.getBasicDetNtfBodyList != null) {
data['GetBasicDetNtfBodyList'] = this.getBasicDetNtfBodyList!.map((v) => v.toJson()).toList();
}
data['GetCEICollectionNotificationBodyList'] = this.getCEICollectionNotificationBodyList;
data['GetCEIDFFStructureList'] = this.getCEIDFFStructureList;
data['GetCEITransactionList'] = this.getCEITransactionList;
if (this.getCEIDFFStructureList != null) {
data['GetCEIDFFStructureList'] = this.getCEIDFFStructureList!.map((v) => v.toJson()).toList();
}
if (this.getCEITransactionList != null) {
data['GetCEITransactionList'] = this.getCEITransactionList!.map((v) => v.toJson()).toList();
}
data['GetCcpTransactionsList'] = this.getCcpTransactionsList;
if (this.getContactDetailsList != null) {
data['GetContactDetailsList'] = this.getContactDetailsList!.map((v) => v.toJson()).toList();
@ -1612,6 +1634,7 @@ class GenericResponseModel {
data['GetItemTypesList'] = this.getItemTypesList;
data['GetLookupValuesList'] = this.getLookupValuesList;
data['GetMenuEntriesList'] = this.getMenuEntriesList;
data['EventActivityList'] = this.getEventActivityList;
if (this.getMoItemHistoryList != null) {
data['GetMoItemHistoryList'] = this.getMoItemHistoryList!.map((v) => v.toJson()).toList();
}
@ -1628,7 +1651,7 @@ class GenericResponseModel {
data['GetNotificationReassignModeList'] = getNotificationReassignModeList!.map((v) => v.toJson()).toList();
}
if(getTermNotificationBodyList !=null){
if (getTermNotificationBodyList != null) {
data['GetTermNotificationBodyList'] = getTermNotificationBodyList!.map((v) => v.toJson()).toList();
}
data['GetObjectValuesList'] = this.getObjectValuesList;
@ -1837,6 +1860,10 @@ class GenericResponseModel {
}
data['SubmitCEITransactionList'] = this.submitCEITransactionList;
if (this.submitCEITransactionList != null) {
data['SubmitCEITransactionList'] = this.submitCEITransactionList!.toJson();
}
if (this.submitCcpTransactionList != null) {
data['SubmitCcpTransactionList'] = this.submitCcpTransactionList!.toJson();
}

@ -39,7 +39,7 @@ class GetEITDFFStructureList {
String? vALIDATIONTYPE;
String? vALIDATIONTYPEDSP;
String? fieldAnswer;
String? vSSRCHFLAG;
GetEITDFFStructureList(
{this.aLPHANUMERICALLOWEDFLAG,
this.aPPLICATIONCOLUMNNAME,
@ -80,7 +80,9 @@ class GetEITDFFStructureList {
this.uSEDFLAG,
this.vALIDATIONTYPE,
this.vALIDATIONTYPEDSP,
this.fieldAnswer});
this.fieldAnswer,
this.vSSRCHFLAG
});
GetEITDFFStructureList.fromJson(Map<String, dynamic> json) {
aLPHANUMERICALLOWEDFLAG = json['ALPHANUMERIC_ALLOWED_FLAG'];
@ -148,6 +150,7 @@ class GetEITDFFStructureList {
uSEDFLAG = json['USED_FLAG'];
vALIDATIONTYPE = json['VALIDATION_TYPE'];
vALIDATIONTYPEDSP = json['VALIDATION_TYPE_DSP'];
vSSRCHFLAG = json['VS_SRCH_FLAG'];
}
Map<String, dynamic> toJson() {
@ -203,6 +206,7 @@ class GetEITDFFStructureList {
data['USED_FLAG'] = this.uSEDFLAG;
data['VALIDATION_TYPE'] = this.vALIDATIONTYPE;
data['VALIDATION_TYPE_DSP'] = this.vALIDATIONTYPEDSP;
data['VS_SRCH_FLAG'] =this.vSSRCHFLAG;
return data;
}
@ -214,14 +218,15 @@ class ESERVICESDV {
dynamic pRETURNMSG;
String? pRETURNSTATUS;
dynamic pVALUECOLUMNNAME;
ESERVICESDV({this.pIDCOLUMNNAME, this.pRETURNMSG, this.pRETURNSTATUS, this.pVALUECOLUMNNAME});
dynamic pSRCHVALUECOLUMNNAME;
ESERVICESDV({this.pIDCOLUMNNAME, this.pRETURNMSG, this.pRETURNSTATUS, this.pVALUECOLUMNNAME, this.pSRCHVALUECOLUMNNAME});
ESERVICESDV.fromJson(Map<String, dynamic> json) {
pIDCOLUMNNAME = json['P_ID_COLUMN_NAME'];
pRETURNMSG = json['P_RETURN_MSG'];
pRETURNSTATUS = json['P_RETURN_STATUS'];
pVALUECOLUMNNAME = json['P_VALUE_COLUMN_NAME'];
pSRCHVALUECOLUMNNAME = json['P_SRCH_VALUE_COLUMN_NAME'];
}
Map<String, dynamic> toJson() {
@ -230,6 +235,7 @@ class ESERVICESDV {
data['P_RETURN_MSG'] = pRETURNMSG;
data['P_RETURN_STATUS'] = pRETURNSTATUS;
data['P_VALUE_COLUMN_NAME'] = pVALUECOLUMNNAME;
data['P_SRCH_VALUE_COLUMN_NAME'] =pSRCHVALUECOLUMNNAME;
return data;
}
}

@ -15,8 +15,30 @@ class GetEITTransactionList {
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
if (this.collectionTransaction != null) {
data['Collection_Transaction'] =
this.collectionTransaction!.map((v) => v.toJson()).toList();
data['Collection_Transaction'] = this.collectionTransaction!.map((v) => v.toJson()).toList();
}
return data;
}
}
class GetCEITransactionList {
List<CollectionTransaction>? collectionTransaction;
GetCEITransactionList({this.collectionTransaction});
GetCEITransactionList.fromJson(Map<String, dynamic> json) {
if (json['Collection_Transaction'] != null) {
collectionTransaction = <CollectionTransaction>[];
json['Collection_Transaction'].forEach((v) {
collectionTransaction!.add(new CollectionTransaction.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
if (this.collectionTransaction != null) {
data['Collection_Transaction'] = this.collectionTransaction!.map((v) => v.toJson()).toList();
}
return data;
}
@ -43,22 +65,22 @@ class CollectionTransaction {
CollectionTransaction(
{this.aPPLICATIONCOLUMNNAME,
this.dATATYPE,
this.dATEVALUE,
this.dESCFLEXCONTEXTCODE,
this.dESCFLEXNAME,
this.dISPLAYFLAG,
this.fROMROWNUM,
this.nOOFROWS,
this.nUMBERVALUE,
this.rOWNUM,
this.sEGMENTNAME,
this.sEGMENTPROMPT,
this.sEGMENTSEQNUM,
this.sEGMENTVALUEDSP,
this.tOROWNUM,
this.tRANSACTIONNUMBER,
this.vARCHAR2VALUE});
this.dATATYPE,
this.dATEVALUE,
this.dESCFLEXCONTEXTCODE,
this.dESCFLEXNAME,
this.dISPLAYFLAG,
this.fROMROWNUM,
this.nOOFROWS,
this.nUMBERVALUE,
this.rOWNUM,
this.sEGMENTNAME,
this.sEGMENTPROMPT,
this.sEGMENTSEQNUM,
this.sEGMENTVALUEDSP,
this.tOROWNUM,
this.tRANSACTIONNUMBER,
this.vARCHAR2VALUE});
CollectionTransaction.fromJson(Map<String, dynamic> json) {
aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME'];
@ -101,4 +123,4 @@ class CollectionTransaction {
data['VARCHAR2_VALUE'] = this.vARCHAR2VALUE;
return data;
}
}
}

@ -0,0 +1,101 @@
import 'dart:convert';
class ItgTimeCardSummaryData {
String? returNStatus;
String? returNMsg;
List<Summery>? summeries;
List<Map<String, String?>>? details;
ItgTimeCardSummaryData({this.returNStatus, this.returNMsg, this.summeries, this.details});
factory ItgTimeCardSummaryData.fromRawJson(String str) => ItgTimeCardSummaryData.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory ItgTimeCardSummaryData.fromJson(Map<String, dynamic> json) => ItgTimeCardSummaryData(
returNStatus: json["returN_STATUS"],
returNMsg: json["returN_MSG"],
summeries: json["summeries"] == null ? [] : List<Summery>.from(json["summeries"]!.map((x) => Summery.fromJson(x))),
details: json["details"] == null ? [] : List<Map<String, String?>>.from(json["details"]!.map((x) => Map.from(x).map((k, v) => MapEntry<String, String?>(k, v)))),
);
Map<String, dynamic> toJson() => {
"returN_STATUS": returNStatus,
"returN_MSG": returNMsg,
"summeries": summeries == null ? [] : List<dynamic>.from(summeries!.map((x) => x.toJson())),
"details": details == null ? [] : List<dynamic>.from(details!.map((x) => Map.from(x).map((k, v) => MapEntry<String, dynamic>(k, v)))),
};
}
class Summery {
int? missinGSwipesDays;
String? scheduleDHrs;
String? actuaLHrs;
String? excesSHrs;
String? timebacKHrs;
String? shortagEHrs;
String? latEInHrs;
String? earlYOutHrs;
double? uncovereDShortageHrs;
int? sicKLeaves;
int? publiCHolidays;
int? unauthorizeDLeaves;
int? unpaiDLeaves;
int? paiDLeaves;
Summery({
this.missinGSwipesDays,
this.scheduleDHrs,
this.actuaLHrs,
this.excesSHrs,
this.timebacKHrs,
this.shortagEHrs,
this.latEInHrs,
this.earlYOutHrs,
this.uncovereDShortageHrs,
this.sicKLeaves,
this.publiCHolidays,
this.unauthorizeDLeaves,
this.unpaiDLeaves,
this.paiDLeaves,
});
factory Summery.fromRawJson(String str) => Summery.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory Summery.fromJson(Map<String, dynamic> json) => Summery(
missinGSwipesDays: json["missinG_SWIPES_DAYS"],
scheduleDHrs: json["scheduleD_HRS"],
actuaLHrs: json["actuaL_HRS"],
excesSHrs: json["excesS_HRS"],
timebacKHrs: json["timebacK_HRS"],
shortagEHrs: json["shortagE_HRS"],
latEInHrs: json["latE_IN_HRS"],
earlYOutHrs: json["earlY_OUT_HRS"],
uncovereDShortageHrs: json["uncovereD_SHORTAGE_HRS"]?.toDouble(),
sicKLeaves: json["sicK_LEAVES"],
publiCHolidays: json["publiC_HOLIDAYS"],
unauthorizeDLeaves: json["unauthorizeD_LEAVES"],
unpaiDLeaves: json["unpaiD_LEAVES"],
paiDLeaves: json["paiD_LEAVES"],
);
Map<String, dynamic> toJson() => {
"missinG_SWIPES_DAYS": missinGSwipesDays,
"scheduleD_HRS": scheduleDHrs,
"actuaL_HRS": actuaLHrs,
"excesS_HRS": excesSHrs,
"timebacK_HRS": timebacKHrs,
"shortagE_HRS": shortagEHrs,
"latE_IN_HRS": latEInHrs,
"earlY_OUT_HRS": earlYOutHrs,
"uncovereD_SHORTAGE_HRS": uncovereDShortageHrs,
"sicK_LEAVES": sicKLeaves,
"publiC_HOLIDAYS": publiCHolidays,
"unauthorizeD_LEAVES": unauthorizeDLeaves,
"unpaiD_LEAVES": unpaiDLeaves,
"paiD_LEAVES": paiDLeaves,
};
}

@ -1,5 +1,5 @@
class CalculateAbsenceDuration {
double? pABSENCEDAYS;
num? pABSENCEDAYS;
double? pABSENCEHOURS;
String? pRETURNMSG;
String? pRETURNSTATUS;

@ -1691,7 +1691,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
File file = File(path!);
file.readAsBytesSync();
path = file.path;
await playerController.preparePlayer(file.path, 1.0);
await playerController.preparePlayer(file.path, 1.0);
_timer?.cancel();
notifyListeners();
}

@ -9,6 +9,7 @@ import 'package:mohem_flutter_app/config/routes.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/drawer_menu_item_model.dart';
import 'package:mohem_flutter_app/models/dashboard/event_activity.dart';
import 'package:mohem_flutter_app/models/dashboard/get_accrual_balances_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
import 'package:mohem_flutter_app/models/dashboard/get_open_notifications_list.dart';
@ -20,7 +21,6 @@ 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/itg/itg_response_model.dart';
import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart';
import 'package:mohem_flutter_app/ui/landing/dashboard_screen.dart';
import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart';
/// Mix-in [DiagnosticableTreeMixin] to have access to [debugFillProperties] for the devtool
@ -50,9 +50,12 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
//Menu Entries
bool isServicesMenusLoading = true;
bool isEventLoadingLoading = true;
List<Menus>? homeMenus;
List<GetMenuEntriesList>? getMenuEntriesList;
EventActivityList? eventActivity;
//Offers And Discounts
bool isOffersLoading = true;
List<OffersListModel> getOffersList = [];
@ -99,6 +102,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
ticketBalance = 0;
isServicesMenusLoading = true;
isEventLoadingLoading = true;
homeMenus = null;
getMenuEntriesList = null;
isOffersLoading = true;
@ -162,12 +166,13 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
Utils.hideLoading(context);
showDialog(
context: context,
builder: (cxt) => ConfirmDialog(
message: err,
onTap: () {
Navigator.pushNamedAndRemoveUntil(cxt, AppRoutes.login, (Route<dynamic> route) => false);
},
),
builder:
(cxt) => ConfirmDialog(
message: err,
onTap: () {
Navigator.pushNamedAndRemoveUntil(cxt, AppRoutes.login, (Route<dynamic> route) => false);
},
),
);
});
}
@ -253,8 +258,28 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
notifyListeners();
} catch (ex) {
// Utils.hideLoading(context);
getOffersList = [];
isOffersLoading = false;
notifyListeners();
Utils.handleException(ex, context, null);
// Utils.handleException(ex, context, null);
}
}
void fetchEventActivity() async {
try {
GenericResponseModel? genericResponseModel = await DashboardApiClient().getEventActivity();
List<EventActivityList> eventList = (genericResponseModel!.getEventActivityList ?? []);
if (eventList.isNotEmpty) {
eventActivity = eventList.first;
}
isEventLoadingLoading = false;
notifyListeners();
} catch (ex) {
logger.wtf(ex);
isEventLoadingLoading = false;
notifyListeners();
// Utils.handleException(ex, null, null);
}
}
@ -291,6 +316,8 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
return res;
}
void notify() {
notifyListeners();
}

@ -117,8 +117,6 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
initialDate: formattedDate,
firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(),
// confirmWidget: Text(LocaleKeys.confirm.tr()),
// cancelWidget: Text(LocaleKeys.cancel.tr()),
).then((selectedDate) {
if (selectedDate != null) {
searchMonth = getMonth(selectedDate.month);

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

@ -170,7 +170,7 @@ class WaveBubble extends StatelessWidget {
padding: EdgeInsets.zero,
margin: EdgeInsets.zero,
enableSeekGesture: true,
density: 1,
// density: 1,
playerWaveStyle: const PlayerWaveStyle(
fixedWaveColor: Colors.white,
liveWaveColor: MyColors.greenColor,
@ -178,7 +178,7 @@ class WaveBubble extends StatelessWidget {
showBottom: true,
waveCap: StrokeCap.round,
seekLineThickness: 2,
visualizerHeight: 4,
// visualizerHeight: 4,
backgroundColor: Colors.transparent,
),
),

@ -3,7 +3,6 @@ import 'dart:io';
import 'dart:ui' as ui;
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -22,6 +21,7 @@ import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.da
import 'package:mohem_flutter_app/models/privilege_list_model.dart';
import 'package:mohem_flutter_app/provider/chat_provider_model.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/landing/event_activity_banner.dart';
import 'package:mohem_flutter_app/ui/landing/widget/app_drawer.dart';
import 'package:mohem_flutter_app/ui/landing/widget/menus_widget.dart';
import 'package:mohem_flutter_app/ui/landing/widget/services_widget.dart';
@ -151,6 +151,7 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
data.fetchMissingSwipe(context);
data.fetchLeaveTicketBalance(context, DateTime.now());
data.fetchMenuEntries();
data.fetchEventActivity();
data.getCategoryOffersListAPI(context);
marathonProvider.getMarathonDetailsFromApi();
marathonProvider.getMarathonTutorial();
@ -422,103 +423,109 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
),
],
).paddingOnly(left: 21, right: 21, top: 7, bottom: 21),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
LocaleKeys.offers.tr().toText12(),
Row(
children: [
LocaleKeys.discounts.tr().toText24(isBold: true),
6.width,
Container(
padding: const EdgeInsets.only(left: 8, right: 8),
decoration: BoxDecoration(
color: MyColors.yellowColor,
borderRadius: BorderRadius.circular(10),
),
child: LocaleKeys.newString.tr().toText10(isBold: true)),
],
),
],
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,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
LocaleKeys.offers.tr().toText12(),
Row(
children: [
LocaleKeys.discounts.tr().toText24(isBold: true),
6.width,
Container(
padding: const EdgeInsets.only(left: 8, right: 8),
decoration: BoxDecoration(
color: MyColors.yellowColor,
borderRadius: BorderRadius.circular(10),
),
child: LocaleKeys.newString.tr().toText10(isBold: true)),
],
),
],
),
),
),
LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() {
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),
LocaleKeys.viewAllOffers.tr().toText12(isUnderLine: true).onPress(() {
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: Hero(
tag: "ItemImage" + data.getOffersList[index].offersDiscountId.toString()!,
transitionOnUserGestures: true,
child: Image.network(
data.getOffersList[index].logo ?? "",
fit: BoxFit.contain,
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),
),
],
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),
);
},
),
],
),
);
},
separatorBuilder: (BuildContext cxt, int index) => 8.width,
itemCount: 9),
);
},
),
],
);
}),
Container(
width: double.infinity,
padding: const EdgeInsets.only(top: 31),
@ -703,6 +710,14 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
);
}
Widget eventActivityWidget(BuildContext context) {
return (context.watch<DashboardProviderModel>().isEventLoadingLoading)
? const MarathonBannerShimmer().paddingOnly(left: 21, right: 21, bottom: 21, top: 0)
: (context.watch<DashboardProviderModel>().eventActivity != null && context.watch<DashboardProviderModel>().eventActivity!.isActive == true)
? const EventActivityBanner().paddingOnly(left: 21, right: 21, bottom: 21, top: 0)
: const SizedBox();
}
void navigateToDetails(OffersListModel offersListModelObj) {
List<OffersListModel> getOffersDetailList = [];
getOffersDetailList.clear();

@ -0,0 +1,367 @@
import 'dart:math' as math;
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.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/date_uitl.dart';
import 'package:mohem_flutter_app/classes/decorations_helper.dart';
import 'package:mohem_flutter_app/config/routes.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/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/countdown_timer_main_screen.dart';
import 'package:mohem_flutter_app/widgets/glowy_borders/glowy_borders.dart';
import 'package:provider/provider.dart';
int dummyTime = DateTime.now().millisecondsSinceEpoch + 8690;
class EventActivityBanner extends StatelessWidget {
const EventActivityBanner({Key? key}) : super(key: key);
Widget getNoUpcomingMarathonWidget(BuildContext context) {
;
return Container(
decoration: MyDecorations.shadowDecoration,
height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11,
clipBehavior: Clip.antiAlias,
child: Stack(
children: <Widget>[
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(
AppState().isArabic(context) ? math.pi : 0,
),
child: SvgPicture.asset(
"assets/images/marathon_banner_bg.svg",
fit: BoxFit.fill,
width: double.infinity,
),
),
AppState().isArabic(context)
? Positioned(
right: -15,
top: -10,
child: Transform.rotate(
angle: 10,
child: Container(
width: isTablet ? 70 : 65,
height: isTablet ? 40 : 32,
color: MyColors.darkDigitColor,
),
),
)
: Positioned(
left: -20,
top: -10,
child: Transform.rotate(
angle: 15,
child: Container(
width: isTablet ? 70 : 65,
height: isTablet ? 40 : 32,
color: MyColors.darkDigitColor,
),
),
),
SizedBox(
width: double.infinity,
height: double.infinity,
child: Row(
children: <Widget>[
const Expanded(
flex: 3,
child: SizedBox(
width: double.infinity,
height: double.infinity,
),
),
Expanded(
flex: AppState().isArabic(context) ? 4 : 5,
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
AppState().isArabic(context) ? 0.height : 5.height,
Text(
LocaleKeys.noUpcoming.tr(),
style: TextStyle(
fontSize: isTablet ? 20 : 11,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w600,
color: MyColors.white.withOpacity(0.83),
letterSpacing: -0.4,
),
),
Text(
LocaleKeys.brainMarathon.tr(),
style: TextStyle(
fontStyle: FontStyle.italic,
fontSize: isTablet ? 30 : 19,
fontWeight: FontWeight.bold,
color: MyColors.white.withOpacity(0.83),
height: 32 / 22,
),
),
Text(
LocaleKeys.youCanPlayDemo.tr(),
style: TextStyle(
fontSize: isTablet ? 20 : 11,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w600,
color: MyColors.white.withOpacity(0.83),
letterSpacing: -0.4,
),
),
],
).paddingOnly(
left: AppState().isArabic(context) ? 12 : 3,
right: AppState().isArabic(context) ? 3 : 12,
)
],
),
),
),
],
),
),
AppState().isArabic(context)
? Align(
alignment: Alignment.topRight,
child: SizedBox(
height: isTablet ? 30 : 20,
width: isTablet ? 45 : 35,
child: Transform.rotate(
angle: math.pi / 4.5,
child: Text(
LocaleKeys.brainMarathon.tr(),
textAlign: TextAlign.center,
maxLines: 2,
style: TextStyle(
color: MyColors.white,
fontWeight: FontWeight.bold,
fontSize: isTablet ? 8 : 6,
height: 1.2,
),
),
),
),
).paddingOnly(top: 5)
: Align(
alignment: Alignment.topLeft,
child: SizedBox(
height: isTablet ? 30 : 20,
width: isTablet ? 45 : 35,
child: Transform.rotate(
angle: -math.pi / 4.5,
child: Text(
LocaleKeys.brainMarathon.tr(),
textAlign: TextAlign.center,
maxLines: 2,
style: TextStyle(
color: MyColors.kWhiteColor,
fontWeight: FontWeight.bold,
fontSize: isTablet ? 8 : 6,
height: 1.2,
),
),
),
),
).paddingOnly(top: 5),
],
),
).onPress(() {
Navigator.pushNamed(context, AppRoutes.marathonIntroScreen);
});
}
@override
Widget build(BuildContext context) {
DashboardProviderModel dashboardProvider = context.read<DashboardProviderModel>();
return SizedBox(
// decoration: BoxDecoration(
// color: MyColors.kWhiteColor,
// borderRadius: BorderRadius.circular(8),
// boxShadow: [
// BoxShadow(
// color: const Color(0xff000000).withOpacity(.05),
// blurRadius: 26,
// offset: const Offset(0, -3),
// ),
// ],
// ),
height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11,
child: AnimatedGradientBorder(
borderSize: 3,
stretchAlongAxis: true,
animationTime: 2,
stretchAxis: Axis.vertical,
gradientColors: const [
Color(0xff0E5A64),
Color(0xff0E5A64),
Color(0xff0E5A64),
Color(0xff91C481),
],
borderRadius: BorderRadius.circular(10),
child: Container(
decoration: BoxDecoration(
color: const Color(0xff0E5A64),
borderRadius: BorderRadius.circular(8),
),
// height: isTablet ? MediaQuery.of(context).size.height * 0.17 : MediaQuery.of(context).size.height * 0.11,
child: Stack(
children: <Widget>[
// Transform(
// alignment: Alignment.center,
// // transform: Matrix4.rotationY(
// // AppState().isArabic(context) ? math.pi : 0,
// // ),
// child:
//
AppState().isArabic(context)
? Positioned(
left: -15,
top: -10,
child: Transform.rotate(
angle: 10,
child: SizedBox(
child: SvgPicture.asset(
"assets/images/light_bulb.svg"),
),
),
)
: Positioned(
right: 0,
top: 10,
child: Opacity(
opacity: .5,
child: SvgPicture.asset(
"assets/images/light_bulb.svg",
),
)),
SizedBox(
width: double.infinity,
height: double.infinity,
child: Row(
children: <Widget>[
Expanded(
flex: 3,
child: Image.network(
dashboardProvider.eventActivity?.shortImageURL ??
"",
fit: BoxFit.cover,
key: UniqueKey()
).paddingAll(5)),
Expanded(
flex: AppState().isArabic(context) ? 4 : 5,
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
AppState().isArabic(context) ? 0.height : 5.height,
Flexible(
child: Text(
displayLocalizedContent(
isPhoneLangArabic: AppState().isArabic(context),
selectedLanguage: 3,
englishContent: dashboardProvider.eventActivity?.titleEn ?? "",
arabicContent: dashboardProvider.eventActivity?.titleAr ?? "",
),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontStyle: FontStyle.italic,
fontSize: isTablet ? 25 : 16,
fontWeight: FontWeight.bold,
color: MyColors.white,
height: 32 / 24,
),
),
), Text(
displayLocalizedContent(
isPhoneLangArabic: AppState().isArabic(context),
selectedLanguage: 3,
englishContent: dashboardProvider.eventActivity?.shortDescEn ?? "",
arabicContent: dashboardProvider.eventActivity?.shortDescAr ?? "",
),
style: TextStyle(
fontSize: isTablet ? 20 : 11,
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w600,
color: MyColors.white,
letterSpacing: -0.5,
),
),
isTablet ? 15.height : 10.height,
CountdownTimerForMainScreen(
timeToMarathon: DateUtil.convertStringToDateMarathon(dashboardProvider.eventActivity!.startOn!).millisecondsSinceEpoch,
provider: context.read<MarathonProvider>(),
isEvent: true,
),
],
).paddingOnly(
left: AppState().isArabic(context) ? 12 : 3,
right: AppState().isArabic(context) ? 3 : 12,
)
],
),
),
),
],
),
),
!AppState().isArabic(context)
? Positioned(
right: 0,
bottom: 0,
child: RotatedBox(
quarterTurns: 4,
child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.whiteColor),
).paddingAll(isTablet ? 20 : 15),
)
: Positioned(
bottom: 0,
left: 0,
child: RotatedBox(
quarterTurns: 2,
child: SvgPicture.asset("assets/images/arrow_next.svg", color: MyColors.whiteColor),
).paddingAll(isTablet ? 20 : 15),
),
],
).onPress(() async {
// int remainingTimeInMinutes = DateUtil.convertStringToDateMarathon(dashboardProvider.eventActivity!.startOn!).difference(DateTime.now()).inMinutes;
// if (remainingTimeInMinutes < 0) {
Navigator.pushNamed(context, AppRoutes.activityScreen);
//}
// provider.updateLanguageAsPerMarathon(context, provider.isUpComingMarathon ? provider.marathonDetailModel : provider.demoMarathonDetailModel);
})),
),
);
}
}

@ -12,6 +12,7 @@ import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/models/itg/advertisement.dart' as ads;
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/my_video_progress_indicator.dart';
import 'package:video_player/video_player.dart';
class ITGAdsScreen extends StatefulWidget {
@ -148,7 +149,33 @@ class _ITGAdsScreenState extends State<ITGAdsScreen> {
? Lottie.asset(MyLottieConsts.audioPlaybackLottie)
: AspectRatio(
aspectRatio: _controller.value.aspectRatio,
child: VideoPlayer(_controller),
child: Stack(
alignment: Alignment.bottomCenter,
children: [
VideoPlayer(_controller),
if (advertisementData?.isOptional ?? false)
Positioned(
top: 4,
right: 8,
child: Container(
padding: const EdgeInsets.only(left: 8, right: 8, top: 4, bottom: 4),
decoration: BoxDecoration(color: Colors.white.withOpacity(0.5), borderRadius: BorderRadius.circular(30)),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(AppState().isArabic(context) ? "يتخطى" : "Skip"),
Icon(Icons.skip_next),
],
),
).onPress(() {
Navigator.pop(context);
DashboardApiClient().setAdvertisementViewed(masterID!, advertisementData!.advertisementId!, "Skip").then((value) {
logger.d(value);
});
}),
),
],
),
),
),
30.height,
@ -159,70 +186,103 @@ class _ITGAdsScreenState extends State<ITGAdsScreen> {
textStyle: const TextStyle(color: Colors.white, fontSize: 16, letterSpacing: -0.48, fontWeight: FontWeight.bold),
),
50.height,
if (advertisementData?.isOptional ?? false)
DefaultButton(AppState().isArabic(context) ? "يتخطى" : "Skip", () async {
Navigator.pop(context);
DashboardApiClient().setAdvertisementViewed(masterID!, advertisementData!.advertisementId!, "Skip").then((value) {
logger.d(value);
});
}).paddingOnly(left: 60.0, right: 60.0, top: 8, bottom: 8),
// if (advertisementData?.isOptional ?? false)
// DefaultButton(AppState().isArabic(context) ? "يتخطى" : "Skip", () async {
// Navigator.pop(context);
// DashboardApiClient().setAdvertisementViewed(masterID!, advertisementData!.advertisementId!, "Skip").then((value) {
// logger.d(value);
// });
// }).paddingOnly(left: 60.0, right: 60.0, top: 8, bottom: 8),
ValueListenableBuilder<bool>(
valueListenable: hasTimerEnded,
builder: (context, val, child) {
if (hasTimerEndedBool) {
return GridView.builder(
padding: EdgeInsets.zero,
itemCount: advertisementData?.actionButtonsColl!.length,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
String? btnText = AppState().isArabic(context) ? advertisementData?.actionButtonsColl![index].btnTextAr : advertisementData?.actionButtonsColl![index].btnTextEn;
return DefaultButton(btnText!, () async {
// if (hasTimerEndedBool) {
return ListView.builder(
padding: EdgeInsets.zero,
itemCount: advertisementData?.actionButtonsColl!.length,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
String? btnText = AppState().isArabic(context) ? advertisementData?.actionButtonsColl![index].btnTextAr : advertisementData?.actionButtonsColl![index].btnTextEn;
// bool isAcknowledge = advertisementData?.actionButtonsColl![index].actionButtonId == 11;
bool isAcknowledge = advertisementData?.actionButtonsColl![index].actionButtonId == 17;
if (isAcknowledge) {
return Stack(
alignment: Alignment.center,
children: [
MyVideoProgressIndicator(
_controller,
allowScrubbing: false,
//padding: EdgeInsets.only(left: 60, right: 60),
),
DefaultButton(
btnText!,
hasTimerEndedBool
? () async {
Navigator.pop(context);
DashboardApiClient()
.setAdvertisementViewed(masterID!, advertisementData!.advertisementId!, advertisementData?.actionButtonsColl![index].actionValue)
.then((value) {
logger.d(value);
});
}
: null,
disabledColor: Colors.transparent,
textColor: !hasTimerEndedBool ? Colors.white.withOpacity(.5) : Colors.white,
).paddingOnly(left: 60.0, right: 60.0, top: 8, bottom: 8),
],
);
}
return DefaultButton(
btnText!,
() async {
Navigator.pop(context);
DashboardApiClient().setAdvertisementViewed(masterID!, advertisementData!.advertisementId!, advertisementData?.actionButtonsColl![index].actionValue).then((value) {
logger.d(value);
});
}).paddingOnly(left: 60.0, right: 60.0, top: 8, bottom: 8);
},
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 1,
childAspectRatio: (7.0),
),
);
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Container(padding: const EdgeInsets.all(16), decoration: Utils.containerRadius(MyColors.white, 10), child: const Icon(Icons.thumb_up, color: MyColors.gradiantEndColor))
// .onPress(() {
// try {
// Navigator.pop(context);
// DashboardApiClient().setAdvertisementViewed(masterID!, advertisementData!.advertisementId!, "Like").then((value) {
// logger.d(value);
// });
// } catch (ex) {
// logger.wtf(ex);
// Utils.handleException(ex, context, null);
// }
// }),
// 20.width,
// Container(
// padding: const EdgeInsets.all(16), decoration: Utils.containerRadius(MyColors.white, 10), child: const Icon(Icons.thumb_down, color: MyColors.gradiantEndColor))
// .onPress(() {
// try {
// Navigator.pop(context);
// DashboardApiClient().setAdvertisementViewed(masterID!, advertisementData!.advertisementId!, "Dislike").then((value) {
// logger.d(value);
// });
// } catch (ex) {
// logger.wtf(ex);
// Utils.handleException(ex, context, null);
// }
// }),
// ],
// );
} else {
return Container();
}
},
).paddingOnly(left: 60.0, right: 60.0, top: 8, bottom: 8);
},
// gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
// crossAxisCount: 1,
// childAspectRatio: (7.0),
// ),
);
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Container(padding: const EdgeInsets.all(16), decoration: Utils.containerRadius(MyColors.white, 10), child: const Icon(Icons.thumb_up, color: MyColors.gradiantEndColor))
// .onPress(() {
// try {
// Navigator.pop(context);
// DashboardApiClient().setAdvertisementViewed(masterID!, advertisementData!.advertisementId!, "Like").then((value) {
// logger.d(value);
// });
// } catch (ex) {
// logger.wtf(ex);
// Utils.handleException(ex, context, null);
// }
// }),
// 20.width,
// Container(
// padding: const EdgeInsets.all(16), decoration: Utils.containerRadius(MyColors.white, 10), child: const Icon(Icons.thumb_down, color: MyColors.gradiantEndColor))
// .onPress(() {
// try {
// Navigator.pop(context);
// DashboardApiClient().setAdvertisementViewed(masterID!, advertisementData!.advertisementId!, "Dislike").then((value) {
// logger.d(value);
// });
// } catch (ex) {
// logger.wtf(ex);
// Utils.handleException(ex, context, null);
// }
// }),
// ],
// );
// } else {
// return Container();
// }
},
),
20.height,

@ -64,47 +64,58 @@ class _LeaveBalanceState extends State<LeaveBalance> {
context,
title: LocaleKeys.leaveBalance.tr(),
),
body: absenceTransList == null
? const SizedBox()
: (absenceTransList!.isEmpty
? Utils.getNoDataWidget(context).paddingOnly(top: 50)
: ListView(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(21),
children: [
BalancesDashboardWidget(LocaleKeys.currentLeaveBalance.tr(), true, selectedEmp: employeeId, showLoading: false),
12.height,
ListView.separated(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.zero,
itemBuilder: (cxt, int index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.startDateT.tr(), absenceTransList![index].sTARTDATE ?? ""),
ItemDetailViewCol(LocaleKeys.endDateT.tr(), absenceTransList![index].eNDDATE ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.absenceType.tr(), absenceTransList![index].aBSENCETYPE ?? ""),
ItemDetailViewCol(LocaleKeys.absenceCategory.tr(), absenceTransList![index].aBSENCECATEGORY ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.days.tr(), absenceTransList![index].aBSENCEDAYS?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.hours.tr(), absenceTransList![index].aBSENCEHOURS?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.approvalStatus.tr(), absenceTransList![index].aPPROVALSTATUS ?? ""),
ItemDetailViewCol(LocaleKeys.absenceStatus.tr(), absenceTransList![index].aBSENCESTATUS ?? ""),
isItLast: true,
),
],
).objectContainerView(),
separatorBuilder: (cxt, index) => 12.height,
itemCount: absenceTransList!.length),
],
)),
body:SingleChildScrollView(child:Column(
children: [
Padding(
padding: const EdgeInsets.all(21.0),
child: BalancesDashboardWidget(LocaleKeys.currentLeaveBalance.tr(), true, selectedEmp: employeeId, showLoading: false),
),
12.height,
absenceTransList == null
? const SizedBox()
: (absenceTransList!.isEmpty
? Utils.getNoDataWidget(context).paddingOnly(top: 50)
: ListView(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
padding: const EdgeInsets.all(21),
children: [
// BalancesDashboardWidget(LocaleKeys.currentLeaveBalance.tr(), true, selectedEmp: employeeId, showLoading: false),
// 12.height,
ListView.separated(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.zero,
itemBuilder: (cxt, int index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.startDateT.tr(), absenceTransList![index].sTARTDATE ?? ""),
ItemDetailViewCol(LocaleKeys.endDateT.tr(), absenceTransList![index].eNDDATE ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.absenceType.tr(), absenceTransList![index].aBSENCETYPE ?? ""),
ItemDetailViewCol(LocaleKeys.absenceCategory.tr(), absenceTransList![index].aBSENCECATEGORY ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.days.tr(), absenceTransList![index].aBSENCEDAYS?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.hours.tr(), absenceTransList![index].aBSENCEHOURS?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.approvalStatus.tr(), absenceTransList![index].aPPROVALSTATUS ?? ""),
ItemDetailViewCol(LocaleKeys.absenceStatus.tr(), absenceTransList![index].aBSENCESTATUS ?? ""),
isItLast: true,
),
],
).objectContainerView(),
separatorBuilder: (cxt, index) => 12.height,
itemCount: absenceTransList!.length),
],
)),
],
)),
floatingActionButton: Container(
height: 54,
width: 54,

@ -8,6 +8,7 @@ import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:mohem_flutter_app/api/login_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
@ -30,6 +31,8 @@ import 'package:mohem_flutter_app/models/member_login_list_model.dart';
import 'package:mohem_flutter_app/models/privilege_list_model.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/input_widget.dart';
import 'package:safe_device/safe_device.dart';
// import 'package:safe_device/safe_device.dart';
import 'package:wifi_iot/wifi_iot.dart';
@ -56,8 +59,7 @@ class _LoginScreenState extends State<LoginScreen> {
bool? isAppOpenBySystem;
bool isJailBroken = false;
bool isRealDevice = false;
bool isOnExternalStorage = false;
bool isRealDevice = true;
bool isDevelopmentModeEnable = false;
BasicMemberInformationModel? _basicMemberInformation;
@ -70,26 +72,30 @@ class _LoginScreenState extends State<LoginScreen> {
super.initState();
// hmsApiAvailability = HmsApiAvailability();
// checkFirebaseToken();
// if (kReleaseMode) {
// checkDeviceSafety();
// }
if (kReleaseMode) {
checkDeviceSafety();
}
}
// void checkDeviceSafety() async {
// try {
// isJailBroken = await SafeDevice.isJailBroken;
// isRealDevice = await SafeDevice.isRealDevice;
// if (Platform.isAndroid) {
// isOnExternalStorage = await SafeDevice.isOnExternalStorage;
// isDevelopmentModeEnable = await SafeDevice.isDevelopmentModeEnable;
// }
// if (isJailBroken || !isRealDevice || isOnExternalStorage || isDevelopmentModeEnable) {
// Navigator.pushNamedAndRemoveUntil(context, AppRoutes.unsafeDeviceScreen, (_) => false);
// }
// } catch (error) {
// print(error);
// }
// }
void checkDeviceSafety() {
try {
SafeDevice.isJailBroken.then((bool value) {
isJailBroken = value;
});
SafeDevice.isRealDevice.then((value) {
isRealDevice = value;
});
if (Platform.isAndroid) {
// isOnExternalStorage = await SafeDevice.isOnExternalStorage;
// SafeDevice.isDevelopmentModeEnable.then((value) {
// isDevelopmentModeEnable = value;
// });
}
} catch (error) {
print(error);
}
}
@override
void dispose() {
@ -120,7 +126,14 @@ class _LoginScreenState extends State<LoginScreen> {
firebaseToken = "";
}
AppNotifications().init(firebaseToken, context);
checkLoginInfo();
if (isJailBroken || !isRealDevice) {
Utils.hideLoading(context);
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.unsafeDeviceScreen, (_) => false);
} else {
checkLoginInfo();
}
await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
}
// });
@ -198,6 +211,8 @@ class _LoginScreenState extends State<LoginScreen> {
}
Utils.saveStringFromPrefs(SharedPrefsConsts.password, password.text);
} catch (ex) {
print(ex);
print(ex.toString());
Utils.hideLoading(context);
Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(

@ -58,14 +58,10 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
@override
Widget build(BuildContext context) {
if(ModalRoute.of(context)!.settings.arguments != null) {
mobileLoginInfoListModel ??= ModalRoute
.of(context)!
.settings
.arguments as GetMobileLoginInfoListModel;
if (ModalRoute.of(context)!.settings.arguments != null) {
mobileLoginInfoListModel ??= ModalRoute.of(context)!.settings.arguments as GetMobileLoginInfoListModel;
// String empName = AppState().isArabic(context) ? AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEAr! : AppState().memberInformationList!.eMPLOYEEDISPLAYNAMEEn!;
String empName = mobileLoginInfoListModel!.employeeName!;
}
return Scaffold(
@ -75,15 +71,17 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
automaticallyImplyLeading: false,
title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false)
? LocaleKeys.viewBusinessCard.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: BusinessCardDialog(),backgroundColor: Colors.white);
showMDialog(context, child: const BusinessCardDialog());
})
: Container(),
actions: [
Center(
child: LocaleKeys.employeeDigitalID.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: EmployeeDigitialIdDialog(),backgroundColor: Colors.white);
})),
21.width
child: LocaleKeys.employeeDigitalID.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: EmployeeDigitialIdDialog());
}),
),
21.width,
],
),
body: Column(
@ -99,7 +97,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.welcomeBack.tr().toText12(),
mobileLoginInfoListModel!.employeeName!.toText24(isBold: true),
mobileLoginInfoListModel?.employeeName?.toText24(isBold: true) ?? const SizedBox.shrink(),
10.height,
LocaleKeys.wouldYouLikeToLoginWithCurrentUsername.tr().toText16(),
Container(
@ -107,24 +105,14 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
margin: const EdgeInsets.only(top: 23, bottom: 23),
alignment: Alignment.center,
padding: const EdgeInsets.only(left: 17, right: 12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
border: Border.all(
color: const Color(0xffefefef),
width: 1,
),
),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, border: Border.all(color: const Color(0xffefefef), width: 1)),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
LocaleKeys.lastLoginDetails.tr().toText16(),
DateUtil.formatDateToDate(DateUtil.convertStringToDate(mobileLoginInfoListModel!.editedOn!), false).toText12(),
],
children: [LocaleKeys.lastLoginDetails.tr().toText16(), DateUtil.formatDateToDate(DateUtil.convertStringToDate(mobileLoginInfoListModel!.editedOn!), false).toText12()],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -132,10 +120,10 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
children: [
LocaleKeys.verificationType.tr().toText10(color: MyColors.grey57Color),
getVerificationType(mobileLoginInfoListModel!.loginType!).toText12(),
Expanded(child: SizedBox()),
const Expanded(child: SizedBox()),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(mobileLoginInfoListModel!.editedOn!)).toText12(),
],
)
),
],
),
),
@ -146,15 +134,10 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
physics: const NeverScrollableScrollPhysics(),
padding: const EdgeInsets.only(top: 9),
shrinkWrap: true,
children: [
if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(3),
if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(4),
getButton(2),
getButton(1),
],
)
children: [if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(3), if (!isNeedVerifyWithFaceIDAndBiometrics) getButton(4), getButton(2), getButton(1)],
),
],
)
),
// else
// Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
// Image.asset(
@ -192,12 +175,9 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
// ]),
],
).expanded,
DefaultButton(
LocaleKeys.useAnotherAccount.tr(),
() {
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.login, (Route<dynamic> route) => false, arguments: false);
},
).insideContainer,
DefaultButton(LocaleKeys.useAnotherAccount.tr(), () {
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.login, (Route<dynamic> route) => false, arguments: false);
}).insideContainer,
],
),
);
@ -227,7 +207,16 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
}
Future<bool> loginWithFaceIDAndBiometrics() async {
IOSAuthMessages iosStrings = const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
// IOSAuthMessages iosStrings = const IOSAuthMessages(
// cancelButton: 'cancel',
// goToSettingsButton: 'settings',
// goToSettingsDescription: 'Please set up your Touch ID.',
// lockOut: 'Please reenable your Touch ID',
// );
bool authenticated = false;
try {
authenticated = await auth.authenticate(localizedReason: 'Scan your fingerprint to authenticate', options: const AuthenticationOptions(
@ -247,6 +236,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
}
Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) {
// <<<<<<< HEAD
bool isDisable = false;
if(_flag >= 3 && _flag <= 4) {
bool isFaceEnabled = (_flag == 3 && (checkBiometricIsAvailable(BiometricType.face) ||
@ -258,6 +248,10 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
isDisable = !(isFaceEnabled || isThumbEnabled);
}
// =======
// bool isDisable = (_flag == 3 && !checkBiometricIsAvailable(BiometricType.face) ||
// _flag == 4 && !checkBiometricIsAvailable(BiometricType.fingerprint) && _flag == 4 && !checkBiometricIsAvailable(BiometricType.face));
// // >>>>>>> master
return InkWell(
onTap: isDisable
? null
@ -306,15 +300,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
SvgPicture.asset(
_icon,
height: 38,
width: 38,
color: isDisable ? MyColors.darkTextColor.withOpacity(0.7) : null,
),
_title.toText16(height: 20/16)
],
children: <Widget>[SvgPicture.asset(_icon, height: 38, width: 38, color: isDisable ? MyColors.darkTextColor.withOpacity(0.7) : null), _title.toText16(height: 20 / 16)],
),
),
);
@ -358,8 +344,12 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
await LoginApiClient().checkMobileAppVersion();
await LoginApiClient().memberLogin(AppState().getUserName!, AppState().password!);
if (!isDirectLogin) {
BasicMemberInformationModel? memberInformationModel =
await LoginApiClient().mohemmSendActivationCodeByOTPNotificationType(0, AppState().memberLoginList?.pMOBILENUMBER, sendVerificationFlat, AppState().getUserName);
BasicMemberInformationModel? memberInformationModel = await LoginApiClient().mohemmSendActivationCodeByOTPNotificationType(
0,
AppState().memberLoginList?.pMOBILENUMBER,
sendVerificationFlat,
AppState().getUserName,
);
}
if (isDirectLogin) performDirectApiCall(_title, _icon, _flag, "", null);
if (!isDirectLogin) Utils.hideLoading(context);
@ -372,9 +362,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
Utils.showLoading(context);
performDirectApiCall(_title, _icon, _flag, value, _pinPutController);
},
() => {
Navigator.pop(context),
},
() => {Navigator.pop(context)},
onResendCode: () {
performApiCall(_title, _icon, _flag, sendVerificationFlat, isDirectLogin: isDirectLogin);
},
@ -390,14 +378,15 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
try {
GenericResponseModel? genericResponseModel = await LoginApiClient().checkActivationCode(true, AppState().memberLoginList?.pMOBILENUMBER, value, AppState().getUserName);
GenericResponseModel? genericResponseModel1 = await LoginApiClient().insertMobileLoginInfoNEW(
AppState().memberLoginList?.pEMAILADDRESS ?? "",
genericResponseModel?.pSESSIONID ?? 0,
genericResponseModel?.memberInformationList![0].eMPLOYEENAME ?? "",
_flag,
AppState().memberLoginList?.pMOBILENUMBER ?? "",
AppState().getUserName!,
AppState().getIsHuawei ? AppState().getHuaweiPushToken : mobileLoginInfoListModel!.deviceToken!,
Platform.isAndroid ? "android" : "ios");
AppState().memberLoginList?.pEMAILADDRESS ?? "",
genericResponseModel?.pSESSIONID ?? 0,
genericResponseModel?.memberInformationList![0].eMPLOYEENAME ?? "",
_flag,
AppState().memberLoginList?.pMOBILENUMBER ?? "",
AppState().getUserName!,
AppState().getIsHuawei ? AppState().getHuaweiPushToken : mobileLoginInfoListModel!.deviceToken!,
Platform.isAndroid ? "android" : "ios",
);
AppState().setMemberInformationListModel = genericResponseModel!.memberInformationList?.first;
AppState().setPrivilegeListModel = genericResponseModel!.privilegeList ?? [];
if (genericResponseModel.errorMessage != null) {
@ -415,12 +404,10 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
dynamic errorCode = ex;
if(errorCode.error.errorStatusCode ==699){
Future.delayed(const Duration(seconds: 2), ()
{
if (errorCode.error.errorStatusCode == 699) {
Future.delayed(const Duration(seconds: 2), () {
Navigator.pop(context);
Navigator.pushNamedAndRemoveUntil(
context, AppRoutes.login, (Route<dynamic> route) => false);
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.login, (Route<dynamic> route) => false);
});
}
}
@ -437,5 +424,4 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
// // isLoading = isTrue;
// });
// }
}

@ -91,6 +91,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
Future<void> _getAvailableBiometrics() async {
try {
_availableBioMetricType = await auth.getAvailableBiometrics();
print("the available biometric are ${_availableBioMetricType.length}");
} on PlatformException catch (e) {
// AppToast.showErrorToast(message: e.message);
print(e);
@ -611,8 +612,13 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
bool checkBiometricIsAvailable(BiometricType biometricType) {
bool isAvailable = false;
print("the given biometric is $biometricType");
for (int i = 0; i < _availableBioMetricType.length; i++) {
print("the current biometric is ${_availableBioMetricType[i]}");
if (biometricType == _availableBioMetricType[i]) {
print("the data is available $biometricType");
isAvailable = true;
break;
}

@ -13,19 +13,15 @@ import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
class CountdownTimerForMainScreen extends StatelessWidget {
final int timeToMarathon;
final MarathonProvider provider;
final bool isEvent;
CountdownTimerForMainScreen({
Key? key,
required this.provider,
required this.timeToMarathon,
this.isEvent =false,
}) : super(key: key);
final TextStyle styleTextHome = TextStyle(
color: MyColors.white.withOpacity(0.45),
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w800,
letterSpacing: -0.4,
);
final TextStyle styleDigitHome = TextStyle(
height: 22 / 27,
@ -75,7 +71,13 @@ class CountdownTimerForMainScreen extends StatelessWidget {
text,
minFontSize: 7,
maxFontSize: 8,
style: styleTextHome,
style: TextStyle(
color: isEvent ? MyColors.white : MyColors.white.withOpacity(0.45),
fontStyle: FontStyle.italic,
fontWeight: FontWeight.w800,
letterSpacing: -0.4,
),
);
}

@ -21,6 +21,8 @@ import 'package:mohem_flutter_app/models/submit_eit_transaction_list_model.dart'
import 'package:mohem_flutter_app/ui/misc/request_submit_screen.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
import 'package:mohem_flutter_app/widgets/bottom_sheets/search_employee_bottom_sheet.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart';
@ -37,7 +39,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
GenericResponseModel? genericResponseModel;
List<GetEITDFFStructureList>? getEitDffStructureList;
DynamicListViewParams? dynamicParams;
String? selectedReplacementEmployee;
@override
void initState() {
super.initState();
@ -46,10 +48,17 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
void getTransactionsStructure() async {
try {
Utils.showLoading(context);
genericResponseModel = await MyAttendanceApiClient().getEitDffStructure(dynamicParams!.dynamicId, dynamicParams!.selectedEmp);
if (dynamicParams?.pContactRelationshipId == null) {
genericResponseModel = await MyAttendanceApiClient().getEitDffStructure(dynamicParams!.dynamicId, dynamicParams!.selectedEmp);
getEitDffStructureList = genericResponseModel?.getEITDFFStructureList ?? [];
} else {
genericResponseModel = await MyAttendanceApiClient().getCEIDffStructure(dynamicParams!.dynamicId, null);
getEitDffStructureList = genericResponseModel?.getCEIDFFStructureList ?? [];
}
dESCFLEXCONTEXTCODE = genericResponseModel!.pDESCFLEXCONTEXTCODE ?? "";
descFlexConTextTitle = genericResponseModel!.pDESCFLEXCONTEXTNAME ?? "";
getEitDffStructureList = genericResponseModel?.getEITDFFStructureList ?? [];
// getEitDffStructureList = genericResponseModel?.getEITDFFStructureList ?? [];
//getEitDffStructureList = getEitDffStructureList!.where((element) => element.dISPLAYFLAG != "N").toList();
Utils.hideLoading(context);
setState(() {});
@ -90,14 +99,25 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
}).toList();
values.add(ValidateEitTransactionModel(dATEVALUE: null, nAME: "PEI_ACTION", nUMBERVALUE: null, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: "NEW_ROW").toJson());
values.add(ValidateEitTransactionModel(dATEVALUE: null, nAME: "PEI_EXTRA_INFO_ID", nUMBERVALUE: -1, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: null).toJson());
values.add(ValidateEitTransactionModel(dATEVALUE: null, nAME: "PEI_OBJECT_VERSION_NUMBER", nUMBERVALUE: 0, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: null).toJson());
genericResponseModel = await MyAttendanceApiClient().validateEitTransaction(dESCFLEXCONTEXTCODE, dynamicParams!.dynamicId, values, empID: dynamicParams!.selectedEmp);
SubmitEITTransactionList submitEITTransactionList = await MyAttendanceApiClient().submitEitTransaction(dESCFLEXCONTEXTCODE, dynamicParams!.dynamicId, values, empID: dynamicParams!.selectedEmp);
if (dynamicParams!.pContactRelationshipId == null) {
values.add(ValidateEitTransactionModel(dATEVALUE: null, nAME: "PEI_EXTRA_INFO_ID", nUMBERVALUE: -1, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: null).toJson());
values.add(ValidateEitTransactionModel(dATEVALUE: null, nAME: "PEI_OBJECT_VERSION_NUMBER", nUMBERVALUE: 0, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: null).toJson());
} else {
values.add(ValidateEitTransactionModel(dATEVALUE: null, nAME: "CONTACT_EXTRA_INFO_ID", nUMBERVALUE: -1, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: null).toJson());
values.add(ValidateEitTransactionModel(dATEVALUE: null, nAME: "CEI_OBJECT_VERSION_NUMBER", nUMBERVALUE: 0, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: null).toJson());
}
SubmitEITTransactionList submitEITTransactionList;
if (dynamicParams!.pContactRelationshipId == null) {
genericResponseModel = await MyAttendanceApiClient().validateEitTransaction(dESCFLEXCONTEXTCODE, dynamicParams!.dynamicId, values, empID: dynamicParams!.selectedEmp);
submitEITTransactionList = await MyAttendanceApiClient().submitEitTransaction(dESCFLEXCONTEXTCODE, dynamicParams!.dynamicId, values, empID: dynamicParams!.selectedEmp);
} else {
submitEITTransactionList = await MyAttendanceApiClient().submitCEITransaction(dESCFLEXCONTEXTCODE, dynamicParams!.dynamicId, values, pContactRelationID: dynamicParams!.pContactRelationshipId);
}
Utils.hideLoading(context);
await Navigator.pushNamed(context, AppRoutes.requestSubmitScreen,
arguments: RequestSubmitScreenParams(LocaleKeys.submit.tr(), submitEITTransactionList.pTRANSACTIONID!, submitEITTransactionList.pITEMKEY!, 'eit',isAttachmentMandatory: dynamicParams!.isAttachmentMandatory));
arguments: RequestSubmitScreenParams(LocaleKeys.submit.tr(), submitEITTransactionList.pTRANSACTIONID!, submitEITTransactionList.pITEMKEY!, 'eit',
isAttachmentMandatory: dynamicParams!.isAttachmentMandatory));
if (!AppState().cancelRequestTrancsection) {
return;
}
@ -133,8 +153,27 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
.toJson())
.toList();
String? selectedEmp = dynamicParams!.selectedEmp;
bool hasParentId = false;
if (segmentId.isNotEmpty && selectedEmp == null) {
for (var element in getEitDffStructureList!) {
try {
if (element.sEGMENTNAME == segmentId && selectedEmp == null) {
var selectedElement = element;
if (selectedElement.vALIDATIONTYPE == "Y" || selectedElement.vALIDATIONTYPE == "D") {
hasParentId = true;
break;
}
}
} catch (ex) {
print("err:$ex");
}
}
}
List<ESERVICESVS> eServicesResponseModel = await MyAttendanceApiClient().getValueSetValues(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values,
empID: dynamicParams!.selectedEmp, parentValue: structureList.eSERVICESDV!.pVALUECOLUMNNAME);
empID: selectedEmp, parentValue: structureList.eSERVICESDV!.pVALUECOLUMNNAME, hasParent: hasParentId);
List<GetEITDFFStructureList> abc = genericResponseModel?.getEITDFFStructureList ?? [];
getEitDffStructureList = abc;
int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
@ -647,42 +686,96 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
).paddingOnly(bottom: 12);
}
} else {
return PopupMenuButton(
child: DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.eSERVICESDV?.pVALUECOLUMNNAME ?? "",
isEnable: false,
isPopup: true,
isInputTypeNum: true,
isReadOnly: model.rEADONLY == "Y",
).paddingOnly(bottom: 12),
itemBuilder: (_) => <PopupMenuItem<int>>[
if (model.rEADONLY != "Y")
for (int i = 0; i < model.eSERVICESVS!.length; i++)
PopupMenuItem<int>(
value: i,
child: Column(
children: [
Text(model.eSERVICESVS![i].vALUECOLUMNNAME!),
const PopupMenuDivider(),
],
)),
],
onSelected: (int popipIndex) async {
ESERVICESDV eservicesdv = ESERVICESDV(
pIDCOLUMNNAME: model.eSERVICESVS![popipIndex].iDCOLUMNNAME,
pRETURNMSG: "null",
pRETURNSTATUS: "null", //getEitDffStructureList![popipIndex].dEFAULTVALUE,
pVALUECOLUMNNAME: model.eSERVICESVS![popipIndex].vALUECOLUMNNAME);
getEitDffStructureList![index].eSERVICESDV = eservicesdv;
setState(() {});
if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
await calGetValueSetValues(model);
}
if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) {
await getDefaultValues(model);
}
});
//condition need to be added here.
if(model.vSSRCHFLAG =='Y'){
return DynamicTextFieldWidget(
LocaleKeys.selectEmployee.tr(),
"",
// selectedReplacementEmployee == null ? LocaleKeys.searchForEmployee
// .tr() : selectedReplacementEmployee!.employeeDisplayName ?? "",
isEnable: false,
onTap: () {
showMyBottomSheet(
context,
callBackFunc: () {},
child: SearchEmployeeBottomSheet(
title: LocaleKeys.searchForEmployee.tr(),
apiMode: LocaleKeys.delegate.tr(),
fromDynamicScreen: true,
fromChat: false,
onSelectEmployee: (_selectedEmployee) {
// Navigator.pop(context);
// selectedReplacementEmployee = _selectedEmployee;
ESERVICESDV eservicesdv = ESERVICESDV(
pIDCOLUMNNAME:_selectedEmployee.userName,
pRETURNMSG: "null",
pRETURNSTATUS: "null", //getEitDffStructureList![popipIndex].dEFAULTVALUE,
pVALUECOLUMNNAME:_selectedEmployee.employeeDisplayName);
getEitDffStructureList![index].eSERVICESDV = eservicesdv;
setState(() {});
},
onSearchClick: (String empID) async{
ESERVICESDV eservicesdv =
ESERVICESDV(pSRCHVALUECOLUMNNAME: empID, pRETURNMSG: "null", pRETURNSTATUS: "null", pVALUECOLUMNNAME: "");
getEitDffStructureList![index].eSERVICESDV = eservicesdv;
setState(() {});
if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
await calGetValueSetValuesSearch(model, empID);
}
if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) {
await getDefaultValues(model);
}
},
),
);
},
);
}else {
return PopupMenuButton(
child: DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") +
(model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.eSERVICESDV?.pVALUECOLUMNNAME ?? "",
isEnable: false,
isPopup: true,
isInputTypeNum: true,
isReadOnly: model.rEADONLY == "Y",
).paddingOnly(bottom: 12),
itemBuilder: (_) =>
<PopupMenuItem<int>>[
if (model.rEADONLY != "Y")
for (int i = 0; i < model.eSERVICESVS!.length; i++)
PopupMenuItem<int>(
value: i,
child: Column(
children: [
Text(model.eSERVICESVS![i].vALUECOLUMNNAME!),
const PopupMenuDivider(),
],
)),
],
onSelected: (int popipIndex) async {
ESERVICESDV eservicesdv = ESERVICESDV(
pIDCOLUMNNAME: model.eSERVICESVS![popipIndex].iDCOLUMNNAME,
pRETURNMSG: "null",
pRETURNSTATUS: "null",
//getEitDffStructureList![popipIndex].dEFAULTVALUE,
pVALUECOLUMNNAME: model.eSERVICESVS![popipIndex]
.vALUECOLUMNNAME);
getEitDffStructureList![index].eSERVICESDV = eservicesdv;
setState(() {});
if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
await calGetValueSetValues(model);
}
if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) {
await getDefaultValues(model);
}
});
}
}
} else {
return const SizedBox();
@ -862,9 +955,8 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
context: context,
initialTime: time,
builder: (cxt, child) {
return MediaQuery(data: MediaQuery.of(context).copyWith(alwaysUse24HourFormat: true), child: Localizations.override(
context: context,
locale: const Locale('en', 'US'),child: child ?? Container()));
return MediaQuery(
data: MediaQuery.of(context).copyWith(alwaysUse24HourFormat: true), child: Localizations.override(context: context, locale: const Locale('en', 'US'), child: child ?? Container()));
});
if (picked != null && picked != time) {
@ -878,4 +970,65 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
}
return time;
}
Future calGetValueSetValuesSearch(GetEITDFFStructureList structureList,String userID, {bool showLoading = true}) async {
try {
if (showLoading) Utils.showLoading(context);
for (int i = 0; i < (structureList.cHILDSEGMENTSVSSplited?.length ?? 0); i++) {
List<Map<String, dynamic>> values = [];
String segmentId = structureList.cHILDSEGMENTSVSSplited![i];
if (dESCFLEXCONTEXTCODE.isEmpty) dESCFLEXCONTEXTCODE = structureList.dESCFLEXCONTEXTCODE!;
List<GetEITDFFStructureList> filteredList = getEitDffStructureList?.where((element) => element.cHILDSEGMENTSVSSplited!.contains(segmentId)).toList() ?? [];
if (filteredList.isEmpty && structureList.cHILDSEGMENTSVSSplited!.isNotEmpty) {
segmentId = structureList.cHILDSEGMENTSVSSplited![0];
filteredList = getEitDffStructureList?.where((element) => element.cHILDSEGMENTSVSSplited!.contains(segmentId)).toList() ?? [];
}
values = filteredList
.map((e) => GetSetValuesRequestModel(
sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME, pSRCHVALUECOLUMNNAME: userID )
.toJson())
.toList();
String? selectedEmp = dynamicParams!.selectedEmp;
bool hasParentId = false;
if (segmentId.isNotEmpty && selectedEmp == null) {
for (var element in getEitDffStructureList!) {
try {
if (element.sEGMENTNAME == segmentId && selectedEmp == null) {
var selectedElement = element;
if (selectedElement.vALIDATIONTYPE == "Y" || selectedElement.vALIDATIONTYPE == "D") {
hasParentId = true;
break;
}
}
} catch (ex) {
print("err:$ex");
}
}
}
List<ESERVICESVS> eServicesResponseModel = await MyAttendanceApiClient().getValueSetValuesSearch(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values,
empID: selectedEmp, parentValue: structureList.eSERVICESDV!.pVALUECOLUMNNAME, hasParent: hasParentId);
List<GetEITDFFStructureList> abc = genericResponseModel?.getEITDFFStructureList ?? [];
getEitDffStructureList = abc;
int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
getEitDffStructureList![index].eSERVICESVS!.clear();
getEitDffStructureList![index].eSERVICESDV = ESERVICESDV();
if (eServicesResponseModel.isNotEmpty) getEitDffStructureList![index].eSERVICESVS!.addAll(eServicesResponseModel);
// getEitDffStructureList = genericResponseModel?.getEITDFFStructureList ?? [];
//getEitDffStructureList = getEitDffStructureList!.where((element) => element.dISPLAYFLAG != "N").toList();
}
if (showLoading) {
await Future.delayed(const Duration(seconds: 1));
Utils.hideLoading(context);
}
setState(() {});
} catch (ex) {
if (showLoading) Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
}

@ -24,11 +24,13 @@ class DynamicListViewParams {
List<CollectionNotificationEit>? collectionNotificationList;
final String? selectedEmp;
final int? pContactRelationshipId;
DynamicListViewParams(
this.title,
this.dynamicId, {
this.selectedEmp,
this.pContactRelationshipId,
this.uRL = 'GET_EIT_DFF_STRUCTURE',
this.requestID = '',
this.colsURL = '',
@ -59,10 +61,14 @@ class _DynamicListViewScreenState extends State<DynamicListViewScreen> {
super.initState();
}
void getTransactions() async {
void getTransactions({bool isCei = false}) async {
try {
Utils.showLoading(context);
getEITTransactionList = await MyAttendanceApiClient().getEitTransaction(dynamicParams!.dynamicId, dynamicParams!.selectedEmp);
if (isCei) {
getEITTransactionList = await MyAttendanceApiClient().getCeiTransaction(dynamicParams!.dynamicId, dynamicParams!.pContactRelationshipId);
} else {
getEITTransactionList = await MyAttendanceApiClient().getEitTransaction(dynamicParams!.dynamicId, dynamicParams!.selectedEmp);
}
getEITTransactionList?.forEach((element) {
element.collectionTransaction = element.collectionTransaction?.where((elemen) => elemen.dISPLAYFLAG == "Y").toList() ?? [];
});
@ -97,8 +103,13 @@ class _DynamicListViewScreenState extends State<DynamicListViewScreen> {
Widget build(BuildContext context) {
if (dynamicParams == null) {
dynamicParams = ModalRoute.of(context)!.settings.arguments as DynamicListViewParams;
isTicketRequest = dynamicParams!.dynamicId == "HMG_TKT_NEW_EIT_SS";
getTransactions();
if (dynamicParams?.pContactRelationshipId == null) {
isTicketRequest = dynamicParams!.dynamicId == "HMG_TKT_NEW_EIT_SS";
getTransactions();
} else {
isTicketRequest = false;
getTransactions(isCei: true);
}
}
Widget dataWidget = ListView(
physics: const BouncingScrollPhysics(),

@ -64,6 +64,8 @@ class ServicesMenuListScreen extends StatelessWidget {
if (servicesMenuData.list[index].requestType == "EIT") {
Navigator.pushNamed(context, AppRoutes.dynamicScreen,
arguments: DynamicListViewParams(servicesMenuData.list[index].prompt!, servicesMenuData.list[index].functionName!, selectedEmp: servicesMenuData.selectedEmp));
} else if (servicesMenuData.list[index].requestType == "CEI") {
Navigator.pushNamed(context, AppRoutes.childEducation, arguments: servicesMenuData.list[index]);
} else {
if (servicesMenuData.list[index].requestType == "TERMINATION") {
Navigator.pushNamed(context, AppRoutes.endEmploymentScreen,

@ -169,8 +169,6 @@ class _ViewAttendanceState extends State<ViewAttendance> {
initialDate: formattedDate,
firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(),
// confirmWidget: Text(LocaleKeys.confirm.tr()),
// cancelWidget: Text(LocaleKeys.cancel.tr()),
).then(
(selectedDate) {
if (selectedDate != null) {

@ -115,8 +115,9 @@ class _DeleteFamilyMemberState extends State<DeleteFamilyMember> {
padding: EdgeInsets.only(left: 50, right: 50),
child: TextButton(
style: TextButton.styleFrom(
backgroundColor: MyColors.white,
foregroundColor: MyColors.white,
surfaceTintColor: MyColors.white,
backgroundColor: MyColors.gradiantEndColor,
),
onPressed: () {
deleteFamilyMember(datePar);

@ -0,0 +1,58 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/profile_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/config/routes.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/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
import 'package:mohem_flutter_app/models/get_employee_contacts.model.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
class ChildEducationAssistance extends StatelessWidget {
ChildEducationAssistance({Key? key}) : super(key: key);
GetMenuEntriesList? menuEntry;
@override
Widget build(BuildContext context) {
menuEntry ??= ModalRoute.of(context)!.settings.arguments as GetMenuEntriesList;
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBarWidget(context, title: menuEntry!.prompt!),
body: FutureBuilder(
future: ProfileApiClient().getEmployeeContacts(),
builder: (BuildContext cxt, AsyncSnapshot<List<GetEmployeeContactsList>> snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(child: CircularProgressIndicator());
} else if (snapshot.hasData) {
List<GetEmployeeContactsList> empContactList = snapshot.data!;
return ListView.separated(
padding: const EdgeInsets.all(21),
separatorBuilder: (BuildContext cxt, int index) => 12.height,
itemCount: empContactList.length,
itemBuilder: (BuildContext context, int index) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
"${empContactList[index].cONTACTNAME}".toText16(color: MyColors.grey3AColor),
"${LocaleKeys.dateOfBirth.tr()}: ${empContactList[index].dATEOFBIRTH?.split(" ").first ?? ""}".toText14(color: MyColors.grey3AColor, weight: FontWeight.w400),
"${empContactList[index].rELATIONSHIP}".toText11(color: MyColors.textMixColor),
],
).objectContainerView(disablePadding: false, center: false).onPress(() {
Navigator.pushNamed(context, AppRoutes.dynamicScreen,
arguments: DynamicListViewParams(empContactList[index].cONTACTNAME!, menuEntry!.functionName!, pContactRelationshipId: empContactList[index].cONTACTRELATIONSHIPID));
});
});
} else {
return LocaleKeys.noDataAvailable.tr().toText16().center;
}
},
),
);
}
}

@ -0,0 +1,115 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.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/consts.dart';
import 'package:mohem_flutter_app/classes/decorations_helper.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/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/models/marathon/marathon_model.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
import 'package:provider/provider.dart';
import 'package:shimmer/shimmer.dart';
class ActivityEventDetailsCard extends StatelessWidget {
final DashboardProviderModel model;
const ActivityEventDetailsCard({Key? key, required this.model}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: double.infinity,
decoration: MyDecorations.shadowDecoration,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
CachedNetworkImage(
imageUrl: model.eventActivity!.detailImageURL!,
height: 200,
placeholder: (BuildContext context, String url) => const LinearProgressIndicator(
value: 0.7,
minHeight: 200,
valueColor: AlwaysStoppedAnimation<Color>(Colors.white),
backgroundColor: Color(0xff196D73),
).toShimmer(),
fit: BoxFit.contain,width: double.infinity ,
cacheKey: UniqueKey().toString(),
),
],
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 20,),
Text(
displayLocalizedContent(
isPhoneLangArabic: AppState().isArabic(context),
selectedLanguage: 3,
englishContent: model.eventActivity?.titleEn ?? "",
arabicContent: model.eventActivity?.titleAr ?? "",
),
style: TextStyle(
fontStyle: FontStyle.italic,
fontSize: isTablet ? 30 : 20,
fontWeight: FontWeight.bold,
color:const Color(0xff3C3838),
// height: 42 / 30,
),
).paddingOnly(left: 10, right: 10, bottom: 2),
Row(children:[
SvgPicture.asset("assets/images/highlight.svg"),
Text(
displayLocalizedContent(
isPhoneLangArabic: AppState().isArabic(context),
selectedLanguage: 3,
englishContent: model.eventActivity?.shortDescEn ?? "",
arabicContent: model.eventActivity?.shortDescAr ?? "",
),
style: TextStyle(
fontStyle: FontStyle.italic,
fontSize: isTablet ? 20 : 14,
fontWeight: FontWeight.bold,
color:const Color(0xff2BB8A8),
// height: 32 / 24,
),
).paddingOnly(left: 10, right: 10)
]).paddingOnly(bottom: 25),
LocaleKeys.about.tr().toText16(color: const Color(0xff3C3838)).paddingOnly(bottom: 5),
Text(
displayLocalizedContent(
isPhoneLangArabic: AppState().isArabic(context),
selectedLanguage: 3,
englishContent: model.eventActivity?.longDescEn ?? "",
arabicContent: model.eventActivity?.longDescAr ?? "",
),
style: TextStyle(
fontStyle: FontStyle.italic,
fontSize: isTablet ? 18 : 12,
fontWeight: FontWeight.bold,
color:const Color(0xff3C3838),
// height: 32 / 24,
),
).paddingOnly(bottom: 10)
],
)
]);
}
}

@ -0,0 +1,94 @@
// ignore_for_file: always_specify_types
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.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/date_uitl.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/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/countdown_timer_main_screen.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class ActivityEventFooter extends StatelessWidget {
final DashboardProviderModel provider;
const ActivityEventFooter({
Key? key,
required this.provider,
}) : super(key: key);
@override
Widget build(BuildContext context) {
int remainingTime = DateTime.now().millisecondsSinceEpoch + DateUtil.convertStringToDateMarathon(provider.eventActivity!.startOn!).difference(DateTime.now()).inMilliseconds;
return Column(children: [
CountdownTimer(
endTime: remainingTime,
widgetBuilder: (context, time) {
if (time == null) {
return DefaultButton(
LocaleKeys.start.tr(),
() => launchUrl(Uri.parse(provider.eventActivity!.url!)),
color: MyColors.greenColor,
).insideContainer;
}
return Container(
height: 58,
padding: const EdgeInsets.only(
top: 15, bottom: 15, right: 30, left: 30),
margin: const EdgeInsets.only(top: 5, bottom: 5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
gradient:
const LinearGradient(
transform: GradientRotation(.83),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: <Color>[
MyColors.gradiantEndColor,
MyColors.gradiantStartColor
],
),
),
child: CountdownTimerForMainScreen(
timeToMarathon: DateUtil
.convertStringToDateMarathon(provider.eventActivity!.startOn!)
.millisecondsSinceEpoch,
provider: context.read<MarathonProvider>(),
isEvent: true,
));
},
onEnd: (){
},
endWidget: DefaultButton(
LocaleKeys.start.tr(),
() => launchUrl(Uri.parse(provider.eventActivity!.url!)),
color: MyColors.greenColor,
).insideContainer,
)
// if (remainingTimeInMinutes < 0)
//
// else
//
//
// ,
]);
}
}

@ -0,0 +1,49 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/extensions/int_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/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_details_card.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_footer.dart';
import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_timer_card.dart';
import 'package:mohem_flutter_app/ui/screens/event_activity/activity_event_card.dart';
import 'package:mohem_flutter_app/ui/screens/event_activity/activity_footer.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:provider/provider.dart';
class EventActivityScreen extends StatelessWidget {
const EventActivityScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
DashboardProviderModel provider = context.read<DashboardProviderModel>();
return Scaffold(
appBar: AppBarWidget(
context,
title: LocaleKeys.details.tr(),
onHomeTapped: () {
Navigator.pop(context);
},
onBackTapped: () {
Navigator.pop(context);
},
),
body: Column(
children: <Widget>[
ListView(
padding: const EdgeInsets.all(21),
children: <Widget>[
ActivityEventDetailsCard(model: provider),
20.height,
],
).expanded,
1.divider,
ActivityEventFooter(provider: provider),
],
),
);
}
}

@ -77,6 +77,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
Html(
data: AppState().isArabic(context) ? getOffersList[0].descriptionAr! : getOffersList[0].descriptionEn ?? "",
onLinkTap: (String? url, Map<String, String> attributes, _) {
launchUrl(Uri.parse(url!));
},
),

@ -18,9 +18,12 @@ import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart'
import 'package:mohem_flutter_app/models/submit_term_transaction_list_model.dart';
import 'package:mohem_flutter_app/models/termination/get_term_cols_structure_list_model.dart';
import 'package:mohem_flutter_app/models/termination/get_term_dff_structure_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart';
import 'package:mohem_flutter_app/ui/misc/request_submit_screen.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
import 'package:mohem_flutter_app/widgets/bottom_sheets/search_employee_bottom_sheet.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart';
@ -37,7 +40,7 @@ class _EndEmploymentScreenState extends State<EndEmploymentScreen> {
List<GetTermColsStructureList>? termColsList;
List<GetTermDffStructureList>? termDffList;
DynamicListViewParams? dynamicParams;
ReplacementList? selectedReplacementEmployee;
@override
void initState() {
super.initState();
@ -413,9 +416,40 @@ class _EndEmploymentScreenState extends State<EndEmploymentScreen> {
await calGetValueSetValues(model);
}
},
).paddingOnly(bottom: 12);
);
}
} else {
if(model.sEGMENTNAME =='REPLACEMENT_PERSON') {
return DynamicTextFieldWidget(
LocaleKeys.selectEmployee.tr(),
selectedReplacementEmployee == null ? LocaleKeys.searchForEmployee
.tr() : selectedReplacementEmployee!.employeeDisplayName ?? "",
isEnable: false,
onTap: () {
showMyBottomSheet(
context,
callBackFunc: () {},
child: SearchEmployeeBottomSheet(
title: LocaleKeys.searchForEmployee.tr(),
apiMode: LocaleKeys.delegate.tr(),
fromChat: false,
onSelectEmployee: (_selectedEmployee) {
// Navigator.pop(context);
selectedReplacementEmployee = _selectedEmployee;
ESERVICESDV eservicesdv = ESERVICESDV(
pIDCOLUMNNAME:_selectedEmployee.userName,
pRETURNMSG: "null",
pRETURNSTATUS: "null", //getEitDffStructureList![popipIndex].dEFAULTVALUE,
pVALUECOLUMNNAME:_selectedEmployee.employeeDisplayName);
termDffList![index].eSERVICESDV = eservicesdv;
setState(() {});
},
),
);
},
);
}else{
return PopupMenuButton(
child: DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
@ -436,11 +470,13 @@ class _EndEmploymentScreenState extends State<EndEmploymentScreen> {
pRETURNSTATUS: "null", //getEitDffStructureList![popipIndex].dEFAULTVALUE,
pVALUECOLUMNNAME: model.eSERVICESVS![popipIndex].vALUECOLUMNNAME);
termDffList![index].eSERVICESDV = eservicesdv;
print(eservicesdv);
setState(() {});
if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
await calGetValueSetValues(model);
}
});
}
}
} else {
return const SizedBox();
@ -455,7 +491,7 @@ class _EndEmploymentScreenState extends State<EndEmploymentScreen> {
isPopup: true,
isInputTypeNum: true,
isReadOnly: model.rEADONLY == "Y",
).paddingOnly(bottom: 12),
),
itemBuilder: (_) => <PopupMenuItem<int>>[
if (model.rEADONLY != "Y")
for (int i = 0; i < model.eSERVICESVS!.length; i++) PopupMenuItem<int>(value: i, child: Text(model.eSERVICESVS![i].vALUECOLUMNNAME!)),

@ -32,15 +32,15 @@ class _UnsafeDeviceScreenState extends State<UnsafeDeviceScreen> {
50.height,
"Sorry".toText24(isBold: true),
21.height,
"You are using Mohemm app on an unsafe device. To be able to use the app with all it's features, Please make sure that the below points are considered: "
"You are using MoheM app on an unsafe device. To be able to use the app with all it's features, Please make sure that the below points are considered: "
.toText14(isCenter: true)
.paddingOnly(left: 20.0, right: 20.0),
48.height,
passwordConstraintsUI("The device is not jailbroken or rooted.", true).paddingOnly(left: 24.0, right: 5.0),
8.height,
passwordConstraintsUI("The app is not installed on external storage.", true).paddingOnly(left: 24.0, right: 5.0),
8.height,
passwordConstraintsUI("Development mode is disabled.", true).paddingOnly(left: 24.0, right: 5.0),
// 8.height,
// passwordConstraintsUI("The app is not installed on external storage.", true).paddingOnly(left: 24.0, right: 5.0),
// 8.height,
// passwordConstraintsUI("Development mode is disabled.", true).paddingOnly(left: 24.0, right: 5.0),
21.height,
DefaultButton(LocaleKeys.ok.tr(), () async {
if (Platform.isAndroid) {

@ -2,7 +2,8 @@ import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:easy_localization/src/public_ext.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart';
@ -60,13 +61,21 @@ class _ItemHistoryScreenState extends State<ItemHistoryScreen> {
int tabIndex = 0;
PageController controller = PageController();
final ScrollController _horizontalScrollController = ScrollController();
final ScrollController _horizontalHeaderScrollController = ScrollController();
@override
void initState() {
super.initState();
_horizontalScrollController.addListener(() {
_horizontalHeaderScrollController.jumpTo(_horizontalScrollController.offset);
});
}
@override
void dispose() {
_horizontalScrollController.dispose();
_horizontalHeaderScrollController.dispose();
super.dispose();
actionHistoryList.clear();
}
@ -129,23 +138,231 @@ class _ItemHistoryScreenState extends State<ItemHistoryScreen> {
}
}
TableRow rowChildren(GetPoItemHistoryList poData, int index) {
return TableRow(
decoration: BoxDecoration(color: index % 2 == 0 ? Colors.white : Colors.grey[100]),
children: [
rowCell(poData.cREATIONDATE!, index),
rowCell(poData.pURCHASEPRICE!.toString(), index),
rowCell(poData.sUPPLIER!, index),
rowCell(poData.pONUMBER!.toString(), index),
rowCell(poData.oUNAME!, index),
rowCell(poData.rEVISIONNUM!.toString(), index),
rowCell(poData.bUYER!, index),
rowCell(poData.uOM!, index),
rowCell(poData.qUANTITYORDERED!.toString(), index),
rowCell(poData.qUANTITYRECEIVED!.toString(), index),
rowCell(poData.bONUSQUANTITY!.toString(), index),
rowCell(poData.dISCOUNTPERCENTAGE!.toString(), index),
rowCell(poData.bALANCEQUANTITY!.toString(), index),
rowCell(poData.nETPRICE!.toString(), index),
rowCell(poData.cLOSEDCODE!, index),
],
);
}
Widget rowCell(String data, int index) {
return TableCell(
verticalAlignment: TableCellVerticalAlignment.middle,
child: Center(
child: Text(
data,
style: TextStyle(fontSize: 12, color: MyColors.normalTextColor, fontWeight: FontWeight.w500),
),
// data.toText12(color: MyColors.normalTextColor),
).paddingAll(8));
}
Widget headerCell(String data) {
return Container(
padding: const EdgeInsets.only(top: 16, bottom: 16, left: 8, right: 8),
width: 120,
alignment: Alignment.center,
decoration: BoxDecoration(color: Colors.grey[300]),
child: data.toText14(color: MyColors.darkIconColor),
);
}
List<Color> gradientColors = [MyColors.gradiantEndColor, MyColors.gradiantEndColor];
LineChartData drawLineChart(List<FlSpot> spots, List<GetPoItemHistoryList> reversedList) {
return LineChartData(
lineTouchData: LineTouchData(enabled: true, touchTooltipData: LineTouchTooltipData()),
gridData: FlGridData(
show: true,
drawHorizontalLine: true,
drawVerticalLine: true,
verticalInterval: 1,
horizontalInterval: 1,
getDrawingVerticalLine: (value) {
return FlLine(color: Color(0xff37434d), strokeWidth: .3);
},
getDrawingHorizontalLine: (value) {
return FlLine(color: Color(0xff37434d), strokeWidth: .3);
},
),
titlesData: FlTitlesData(
show: true,
bottomTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: true,
reservedSize: 30,
interval: 1,
getTitlesWidget: (double value, TitleMeta meta) {
return SideTitleWidget(
axisSide: meta.axisSide,
child: Text(reversedList[int.parse(meta.formattedValue)].cREATIONDATE!, style: TextStyle(fontSize: 10)),
);
})),
leftTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: true,
reservedSize: 30,
interval: 1,
getTitlesWidget: (double value, TitleMeta meta) {
return SideTitleWidget(
axisSide: meta.axisSide,
child: Text(meta.formattedValue, style: TextStyle(fontSize: 10)),
);
})),
topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)),
rightTitles: AxisTitles(
sideTitles: SideTitles(
showTitles: true,
reservedSize: 15,
getTitlesWidget: (double value, TitleMeta meta) {
return SideTitleWidget(
axisSide: meta.axisSide,
child: Text("", style: TextStyle(fontSize: 10)),
);
})),
),
borderData: FlBorderData(show: true, border: Border.all(color: const Color(0xff37434d))),
minX: 0,
maxX: poItemHistoryList.length.toDouble() - 1,
minY: poItemHistoryList.map((e) => e.pURCHASEPRICE!.toDouble()).reduce((curr, next) => curr < next ? curr : next) - 1,
maxY: poItemHistoryList.map((e) => e.pURCHASEPRICE!.toDouble()).reduce((curr, next) => curr > next ? curr : next) + 1,
lineBarsData: [
LineChartBarData(
spots: spots,
isCurved: true,
gradient: LinearGradient(
colors: [
ColorTween(begin: gradientColors[0], end: gradientColors[1]).lerp(0.2)!,
ColorTween(begin: gradientColors[0], end: gradientColors[1]).lerp(0.2)!,
],
),
barWidth: 2,
isStrokeCapRound: true,
dotData: FlDotData(show: true),
belowBarData: BarAreaData(
show: true,
gradient: LinearGradient(
colors: [
ColorTween(begin: gradientColors[0], end: gradientColors[1]).lerp(0.2)!.withOpacity(0.1),
ColorTween(begin: gradientColors[0], end: gradientColors[1]).lerp(0.2)!.withOpacity(0.1),
],
),
),
),
],
);
}
@override
Widget build(BuildContext context) {
loadData();
Widget? chartWidget;
if (_screenParams!.isItemHistory && poItemHistoryList.isNotEmpty) {
try {
List<GetPoItemHistoryList> reversedList = poItemHistoryList.reversed.toList();
List<FlSpot> dataPoints = List.generate(
reversedList.length,
(index) => FlSpot(index.toDouble(), reversedList[index].pURCHASEPRICE!.toDouble()),
);
double chartWidth = dataPoints.length * 70.0;
chartWidget = Column(
mainAxisSize: MainAxisSize.min,
children: [
LocaleKeys.graphicalAnalysis.tr().toText14(color: MyColors.darkIconColor),
SizedBox(
height: 400,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
width: chartWidth,
padding: const EdgeInsets.all(16.0),
child: LineChart(drawLineChart(dataPoints, reversedList)),
),
),
),
],
);
} catch (ex) {}
}
return Scaffold(
appBar: AppBarWidget(context, title: _screenParams?.title ?? ""),
backgroundColor: Colors.white,
body: ListView(
padding: _screenParams!.isPRInfo ? const EdgeInsets.all(0) : const EdgeInsets.all(21),
physics: const NeverScrollableScrollPhysics(),
children: [
if (_screenParams!.isPRInfo) prLinesDataView(),
if (moItemHistoryList.isNotEmpty) loadMoItemHistoryData(),
if (poItemHistoryList.isNotEmpty) loadPoItemHistoryData(),
if (quotationAnalysisList.isNotEmpty) loadQuotationAnalysisData(),
if (moItemHistoryList.isEmpty && poItemHistoryList.isEmpty && quotationAnalysisList.isEmpty && !_screenParams!.isPRInfo) Utils.getNoDataWidget(context),
],
),
body: (_screenParams!.isItemHistory && poItemHistoryList.isNotEmpty)
? Column(
children: [
if (chartWidget != null) chartWidget,
if (poItemHistoryList.isNotEmpty) ...[
LocaleKeys.itemHistoryAnalysis.tr().toText14(color: MyColors.darkIconColor),
16.height,
SingleChildScrollView(
scrollDirection: Axis.horizontal,
physics: const NeverScrollableScrollPhysics(),
controller: _horizontalHeaderScrollController,
child: Row(
children: [
headerCell(LocaleKeys.creationDate.tr()),
headerCell(LocaleKeys.purchasePrice.tr()),
headerCell(LocaleKeys.supplier.tr()),
headerCell(LocaleKeys.pOno.tr()),
headerCell(LocaleKeys.oprUnit.tr()),
headerCell(LocaleKeys.revision.tr()),
headerCell(LocaleKeys.buyer.tr()),
headerCell(LocaleKeys.uom.tr()),
headerCell(LocaleKeys.qtyOrdered.tr()),
headerCell(LocaleKeys.qtyReceived.tr()),
headerCell(LocaleKeys.bonusQty.tr()),
headerCell(LocaleKeys.discountPer.tr()),
headerCell(LocaleKeys.balQty.tr()),
headerCell(LocaleKeys.netPrice.tr()),
headerCell(LocaleKeys.closureStatus.tr()),
],
),
),
SingleChildScrollView(
scrollDirection: Axis.vertical,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
controller: _horizontalScrollController,
child: Table(
defaultColumnWidth: const FixedColumnWidth(120.0),
children: [for (int index = 0; index < poItemHistoryList.length; index++) rowChildren(poItemHistoryList[index], index)],
),
),
).expanded,
],
],
)
: ListView(
padding: _screenParams!.isPRInfo ? const EdgeInsets.all(0) : const EdgeInsets.all(21),
// physics: const NeverScrollableScrollPhysics(),
children: [
if (_screenParams!.isPRInfo) prLinesDataView(),
if (moItemHistoryList.isNotEmpty) loadMoItemHistoryData(),
if (poItemHistoryList.isNotEmpty) loadPoItemHistoryData(),
if (quotationAnalysisList.isNotEmpty) loadQuotationAnalysisData(),
if (moItemHistoryList.isEmpty && poItemHistoryList.isEmpty && quotationAnalysisList.isEmpty && !_screenParams!.isPRInfo) Utils.getNoDataWidget(context),
],
),
);
}

File diff suppressed because one or more lines are too long

@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/date_uitl.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/widget_extensions.dart';
@ -28,7 +29,7 @@ class ApprovalLevelfragment extends StatelessWidget {
itemCount: wFHistory.length,
padding: const EdgeInsets.all(21),
itemBuilder: (context, index) {
return showItem(context, wFHistory[index]);
return showItem(context, wFHistory[index], index);
},
separatorBuilder: (BuildContext context, int index) {
return 12.height;
@ -37,7 +38,7 @@ class ApprovalLevelfragment extends StatelessWidget {
);
}
Widget showItem(BuildContext context, WFHistory history) {
Widget showItem(BuildContext context, WFHistory history, int index) {
return Container(
width: double.infinity,
decoration: BoxDecoration(
@ -89,7 +90,9 @@ class ApprovalLevelfragment extends StatelessWidget {
8.width,
if (history.date!.isNotEmpty) history.date!.toText12(color: MyColors.lightTextColor),
],
)
),
10.height,
getActionDuration(index).toText11(maxLine: 1, color: const Color(0xff1FA269))
],
),
)
@ -143,8 +146,34 @@ class ApprovalLevelfragment extends StatelessWidget {
);
}
String getActionDuration(int index) {
if (wFHistory[index].action!.toLowerCase() == "submit" || wFHistory[index].action!.toLowerCase() == "submitted") {
return "";
// DateTime dateTimeFrom = DateUtil.convertSimpleStringDateToDate(wFHistory[index].date!);
// Duration duration = DateTime.now().difference(dateTimeFrom);
// return "Action duration: " + DateUtil.formatDuration(duration);
} else if (wFHistory[index].employeeID == AppState().memberInformationList?.eMPLOYEENUMBER) {
if (wFHistory[index + 1].date!.isEmpty || wFHistory[index + 1].date! == "") {
return "";
} else {
DateTime dateTimeFrom = DateUtil.convertSimpleStringDateToDate(wFHistory[index + 1].date!, isITG: true);
Duration duration = DateTime.now().difference(dateTimeFrom);
return "Action duration: " + DateUtil.formatDuration(duration);
}
} else {
if (wFHistory[index].date!.isEmpty || wFHistory[index].action!.toLowerCase() == "NO ACTION" || wFHistory[index + 1].date! == "") {
return "";
} else {
DateTime dateTimeTo = DateUtil.convertSimpleStringDateToDate(wFHistory[index].date!);
DateTime dateTimeFrom = DateUtil.convertSimpleStringDateToDate(wFHistory[index + 1].date!);
Duration duration = dateTimeTo.difference(dateTimeFrom);
return "Action duration: " + DateUtil.formatDuration(duration);
}
}
}
Color getStatusColor(String code) {
if (code.toLowerCase() == "submit") {
if (code.toLowerCase() == "submit" || code.toLowerCase() == "submitted") {
return MyColors.grey3AColor;
} else if (code.toLowerCase() == "pending") {
return MyColors.yellowColor;
@ -152,7 +181,7 @@ class ApprovalLevelfragment extends StatelessWidget {
return MyColors.redColor;
} else if (code.toLowerCase() == "approved" || code.toLowerCase() == "auto-approve" || code.toLowerCase() == "auto-approved" || code.toLowerCase() == "doable" || code.toLowerCase() == "answer") {
return MyColors.greenColor;
} else if (code.toLowerCase() == "requested information" || code.toLowerCase() == "assign" || code.toLowerCase() == "reassign") {
} else if (code.toLowerCase() == "requested information" || code.toLowerCase() == "request information" || code.toLowerCase() == "assign" || code.toLowerCase() == "reassign") {
return MyColors.orange;
} else {
return MyColors.whiteColor;

File diff suppressed because one or more lines are too long

@ -36,52 +36,95 @@ class WorkListScreen extends StatefulWidget {
class _WorkListScreenState extends State<WorkListScreen> {
List<WorkListItemTypeModelData> workListItemTypes = [
WorkListItemTypeModelData(
value: 0,
name: 'HR',
fullName: LocaleKeys.humanResource.tr(),
active: false,
color: [Color(0xff32D892), Color(0xff1AB170)],
icon: "assets/images/miss_swipe.svg",
key: 'HRSSA',
disable: false),
value: 0,
name: 'HR',
fullName: LocaleKeys.humanResource.tr(),
active: false,
color: [Color(0xff32D892), Color(0xff1AB170)],
icon: "assets/images/miss_swipe.svg",
key: 'HRSSA',
disable: false,
),
WorkListItemTypeModelData(
value: 0, name: 'MR', fullName: LocaleKeys.moveOrder.tr(), active: false, color: [Color(0xff58DCFA), Color(0xff3CB9D5)], icon: "assets/images/miss_swipe.svg", key: 'INVMOA', disable: false),
value: 0,
name: 'MR',
fullName: LocaleKeys.moveOrder.tr(),
active: false,
color: [Color(0xff58DCFA), Color(0xff3CB9D5)],
icon: "assets/images/miss_swipe.svg",
key: 'INVMOA',
disable: false,
),
WorkListItemTypeModelData(
value: 0,
name: 'PR',
fullName: LocaleKeys.purchaseRequisition.tr(),
active: false,
color: [Color(0xff48EACF), Color(0xff3DCAB3)],
icon: "assets/images/miss_swipe.svg",
key: 'REQAPPRV',
disable: false),
value: 0,
name: 'PR',
fullName: LocaleKeys.purchaseRequisition.tr(),
active: false,
color: [Color(0xff48EACF), Color(0xff3DCAB3)],
icon: "assets/images/miss_swipe.svg",
key: 'REQAPPRV',
disable: false,
),
WorkListItemTypeModelData(
value: 0,
name: 'PO',
fullName: LocaleKeys.purchaseOrder.tr(),
active: false,
color: [Color(0xff5099E3), Color(0xff3670AA)],
icon: "assets/images/miss_swipe.svg",
key: 'POAPPRV',
disable: false),
value: 0,
name: 'PO',
fullName: LocaleKeys.purchaseOrder.tr(),
active: false,
color: [Color(0xff5099E3), Color(0xff3670AA)],
icon: "assets/images/miss_swipe.svg",
key: 'POAPPRV',
disable: false,
),
WorkListItemTypeModelData(
value: 0, name: 'ITG', fullName: LocaleKeys.ITGForms.tr(), active: false, color: [Color(0xffEB8C90), Color(0xffDE6C70)], icon: "assets/images/miss_swipe.svg", key: 'ITG', disable: false),
value: 0,
name: 'ITG',
fullName: LocaleKeys.ITGForms.tr(),
active: false,
color: [Color(0xffEB8C90), Color(0xffDE6C70)],
icon: "assets/images/miss_swipe.svg",
key: 'ITG',
disable: false,
),
WorkListItemTypeModelData(
value: 0,
name: 'IC',
fullName: LocaleKeys.itemCreation.tr(),
active: false,
color: [Color(0xff32D892), Color(0xff1AB170)],
icon: "assets/images/miss_swipe.svg",
key: 'INVITEM',
disable: false),
value: 0,
name: 'IC',
fullName: LocaleKeys.itemCreation.tr(),
active: false,
color: [Color(0xff32D892), Color(0xff1AB170)],
icon: "assets/images/miss_swipe.svg",
key: 'INVITEM',
disable: false,
),
WorkListItemTypeModelData(
value: 0, name: 'STAMP', fullName: LocaleKeys.stamp.tr(), active: false, color: [Color(0xff32D892), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'STAMP', disable: false),
value: 0,
name: 'STAMP',
fullName: LocaleKeys.stamp.tr(),
active: false,
color: [Color(0xff32D892), Color(0xff1AB170)],
icon: "assets/images/miss_swipe.svg",
key: 'STAMP',
disable: false,
),
WorkListItemTypeModelData(
value: 0, name: 'COC', fullName: LocaleKeys.itemCreation.tr(), active: false, color: [Color(0xff787299), Color(0xff1AB170)], icon: "assets/images/miss_swipe.svg", key: 'COC', disable: true),
value: 0,
name: 'COC',
fullName: LocaleKeys.itemCreation.tr(),
active: false,
color: [Color(0xff787299), Color(0xff1AB170)],
icon: "assets/images/miss_swipe.svg",
key: 'COC',
disable: true,
),
WorkListItemTypeModelData(
value: 0, name: 'Payment Req', fullName: LocaleKeys.paymentRequest.tr(), active: false, color: [Color(0xff42d7bf), Color(0xff42d7bf)], icon: "assets/images/PR.svg", key: 'PAY_REQ', disable: false)
value: 0,
name: 'Payment Req',
fullName: LocaleKeys.paymentRequest.tr(),
active: false,
color: [Color(0xff42d7bf), Color(0xff42d7bf)],
icon: "assets/images/PR.svg",
key: 'PAY_REQ',
disable: false,
),
];
int? workListItemIndex;
@ -171,6 +214,7 @@ class _WorkListScreenState extends State<WorkListScreen> {
});
requestAllList = requestAllList + (itgFormsModel?.requestType![i].requestDetails ?? []);
}
AppState().setRequestAllList = requestAllList;
itgFormsModel?.requestType!.insert(0, RequestType(requestDetails: requestAllList, requestTypeCode: "all", requestTypeName: "All"));
if ((itgFormsModel?.requestType?.length ?? 0) > 0) {
@ -199,10 +243,7 @@ class _WorkListScreenState extends State<WorkListScreen> {
_refreshController.refreshCompleted();
Utils.showLoading(context);
pageNumber = 1;
List dataOnRefresh = await Future.wait([
providerData.fetchWorkListCounter(context, showLoading: false),
getWorkList(showLoading: false, isCallingFromRefresh: true),
]);
List dataOnRefresh = await Future.wait([providerData.fetchWorkListCounter(context, showLoading: false), getWorkList(showLoading: false, isCallingFromRefresh: true)]);
calculateCounter();
Utils.hideLoading(context);
setState(() {});
@ -232,131 +273,137 @@ class _WorkListScreenState extends State<WorkListScreen> {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBarWidget(context, title: LocaleKeys.workList.tr(), showWorkListSettingButton: true),
body: workListItemIndex == null
? Utils.getNoDataWidget(context)
: SizedBox(
width: double.infinity,
height: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 40,
child: ListView.separated(
controller: _controller,
itemBuilder: (context, index) {
return Container(
padding: const EdgeInsets.only(left: 21, right: 21, top: 8, bottom: 8),
alignment: Alignment.center,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(6), color: workListItemIndex == index ? MyColors.darkIconColor : MyColors.lightGreyEAColor),
child: ("${workListItemTypes[index].name} ${workListItemTypes[index].value > 0 ? "(${workListItemTypes[index].value})" : ""}")
.toText12(color: workListItemIndex == index ? MyColors.white : MyColors.black),
).onPress(() {
if (pNotificationType != 1) {
pNotificationType = 1;
}
if (workListItemIndex != index && !workListItemTypes[index].disable) {
workListItemIndex = index;
pageNumber = 1;
if (workListItemTypes[index].value == 0) {
workList = [];
itgRequestTypeIndex = null;
} else {
workList = null;
body:
workListItemIndex == null
? Utils.getNoDataWidget(context)
: SizedBox(
width: double.infinity,
height: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 40,
child: ListView.separated(
controller: _controller,
itemBuilder: (context, index) {
return Container(
padding: const EdgeInsets.only(left: 21, right: 21, top: 8, bottom: 8),
alignment: Alignment.center,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(6), color: workListItemIndex == index ? MyColors.darkIconColor : MyColors.lightGreyEAColor),
child: ("${workListItemTypes[index].name} ${workListItemTypes[index].value > 0 ? "(${workListItemTypes[index].value})" : ""}").toText12(
color: workListItemIndex == index ? MyColors.white : MyColors.black,
),
).onPress(() {
if (pNotificationType != 1) {
pNotificationType = 1;
}
setState(() {});
if (workListItemTypes[index].value > 0) {
getWorkList();
if (workListItemIndex != index && !workListItemTypes[index].disable) {
workListItemIndex = index;
pageNumber = 1;
if (workListItemTypes[index].value == 0) {
workList = [];
itgRequestTypeIndex = null;
} else {
workList = null;
}
setState(() {});
if (workListItemTypes[index].value > 0) {
getWorkList();
}
}
}
});
},
separatorBuilder: (context, index) => 8.width,
shrinkWrap: true,
itemCount: workListItemTypes.length,
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.only(left: 21, right: 21),
});
},
separatorBuilder: (context, index) => 8.width,
shrinkWrap: true,
itemCount: workListItemTypes.length,
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.only(left: 21, right: 21),
),
).paddingOnly(top: 21, bottom: 21),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
workListItemTypes[workListItemIndex!].fullName.toSectionHeading().paddingOnly(left: 21, right: 21),
LocaleKeys.advancedSearch
.tr()
.toText14(isUnderLine: true, color: MyColors.textMixColor)
.onPress(() {
openBottomSheet(context);
})
.paddingOnly(left: 21, right: 21),
],
),
).paddingOnly(top: 21, bottom: 21),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
workListItemTypes[workListItemIndex!].fullName.toSectionHeading().paddingOnly(left: 21, right: 21),
LocaleKeys.advancedSearch.tr().toText14(isUnderLine: true, color: MyColors.textMixColor).onPress(() {
openBottomSheet(context);
}).paddingOnly(left: 21, right: 21)
],
),
SmartRefresher(
SmartRefresher(
enablePullDown: true,
enablePullUp: false,
header: const MaterialClassicHeader(
color: MyColors.gradiantEndColor,
),
header: const MaterialClassicHeader(color: MyColors.gradiantEndColor),
controller: _refreshController,
onRefresh: _onRefresh,
scrollController: _scrollController,
child: SingleChildScrollView(
physics: const BouncingScrollPhysics(),
child: itgRequestTypeIndex != null
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// todo this is commented for temporary purpose, have issue when selecting any itg category and click any item showing wrong details
// SizedBox(
// height: 40,
// child: ListView.separated(
// itemBuilder: (context, index) {
// RequestType type = itgFormsModel!.requestType![index];
// return Container(
// padding: const EdgeInsets.only(left: 21, right: 21, top: 8, bottom: 8),
// alignment: Alignment.center,
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(30), color: itgRequestTypeIndex == index ? MyColors.darkIconColor : MyColors.lightGreyEAColor),
// child: ("${type.requestTypeName}").toText12(color: itgRequestTypeIndex == index ? MyColors.white : MyColors.black),
// ).onPress(() {
// if (itgRequestTypeIndex != index) {
// itgRequestTypeIndex = index;
// setState(() {});
// }
// });
// },
// separatorBuilder: (context, index) => 8.width,
// shrinkWrap: true,
// itemCount: itgFormsModel?.requestType?.length ?? 0,
// scrollDirection: Axis.horizontal,
// padding: const EdgeInsets.only(left: 21, right: 21),
// ),
// ).paddingOnly(top: 16, bottom: 16),
ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
return itgRowItem(workListItemTypes[workListItemIndex!], itgFormsModel!.requestType![itgRequestTypeIndex!].requestDetails![index], index);
},
separatorBuilder: (context, index) => 12.height,
itemCount: itgFormsModel!.requestType![itgRequestTypeIndex!].requestDetails?.length ?? 0,
padding: const EdgeInsets.all(21),
),
],
)
: workList != null
child:
itgRequestTypeIndex != null
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// todo this is commented for temporary purpose, have issue when selecting any itg category and click any item showing wrong details
// SizedBox(
// height: 40,
// child: ListView.separated(
// itemBuilder: (context, index) {
// RequestType type = itgFormsModel!.requestType![index];
// return Container(
// padding: const EdgeInsets.only(left: 21, right: 21, top: 8, bottom: 8),
// alignment: Alignment.center,
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(30), color: itgRequestTypeIndex == index ? MyColors.darkIconColor : MyColors.lightGreyEAColor),
// child: ("${type.requestTypeName}").toText12(color: itgRequestTypeIndex == index ? MyColors.white : MyColors.black),
// ).onPress(() {
// if (itgRequestTypeIndex != index) {
// itgRequestTypeIndex = index;
// setState(() {});
// }
// });
// },
// separatorBuilder: (context, index) => 8.width,
// shrinkWrap: true,
// itemCount: itgFormsModel?.requestType?.length ?? 0,
// scrollDirection: Axis.horizontal,
// padding: const EdgeInsets.only(left: 21, right: 21),
// ),
// ).paddingOnly(top: 16, bottom: 16),
ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
return itgRowItem(workListItemTypes[workListItemIndex!], itgFormsModel!.requestType![itgRequestTypeIndex!].requestDetails![index], index);
},
separatorBuilder: (context, index) => 12.height,
itemCount: itgFormsModel!.requestType![itgRequestTypeIndex!].requestDetails?.length ?? 0,
padding: const EdgeInsets.all(21),
),
],
)
: workList != null
? ((workList!).isEmpty
? Utils.getNoDataWidget(context).paddingOnly(top: 100)
: ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
return rowItem(workListItemTypes[workListItemIndex!], workList![index], index);
},
separatorBuilder: (context, index) => 12.height,
itemCount: workList?.length ?? 0,
padding: const EdgeInsets.all(21),
))
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
return rowItem(workListItemTypes[workListItemIndex!], workList![index], index);
},
separatorBuilder: (context, index) => 12.height,
itemCount: workList?.length ?? 0,
padding: const EdgeInsets.all(21),
))
: const SizedBox(),
)).expanded,
],
),
).expanded,
],
),
),
),
);
}
@ -388,13 +435,7 @@ class _WorkListScreenState extends State<WorkListScreen> {
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
boxShadow: [BoxShadow(color: const Color(0xff000000).withOpacity(.05), blurRadius: 26, offset: const Offset(0, -3))],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
@ -509,13 +550,7 @@ class _WorkListScreenState extends State<WorkListScreen> {
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
boxShadow: [BoxShadow(color: const Color(0xff000000).withOpacity(.05), blurRadius: 26, offset: const Offset(0, -3))],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
@ -555,10 +590,6 @@ class _WorkListScreenState extends State<WorkListScreen> {
}
void _animateToIndex(int index, double width) {
_controller.animateTo(
index * width,
duration: const Duration(seconds: 1),
curve: Curves.fastOutSlowIn,
);
_controller.animateTo(index * width, duration: const Duration(seconds: 1), curve: Curves.fastOutSlowIn);
}
}

@ -23,6 +23,7 @@ import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_mod
import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.dart';
import 'package:mohem_flutter_app/models/termination/termination_notification_body.dart';
import 'package:mohem_flutter_app/models/worklist/GetRFCEmployeeList.dart';
import 'package:mohem_flutter_app/models/worklist/hr/eit_otification_body_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_address_notification_body_list.dart';
@ -45,7 +46,6 @@ import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/dialogs/accept_reject_input_dialog.dart';
import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart';
import 'package:mohem_flutter_app/models/termination/termination_notification_body.dart';
class WorkListDetailScreen extends StatefulWidget {
WorkListDetailScreen({Key? key}) : super(key: key);
@ -70,19 +70,16 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
List<GetStampMsNotificationBodyList> getStampMsNotifications = [];
List<GetStampNsNotificationBodyList> getStampNsNotifications = [];
List<GetMoNotificationBodyList> getMoNotificationBodyList = [];
List<NotificationGetRespondAttributesList> getNotificationRespondAttributes =
[];
List<NotificationGetRespondAttributesList> getNotificationRespondAttributes = [];
NotificationGetRespondAttributesList? notificationNoteInput;
List<GetRFCEmployeeList> getRFCEmployeeList = [];
//HR Details Screen Requests
List<GetEitCollectionNotificationBodyList>?
getEitCollectionNotificationBodyList = [];
List<GetEitCollectionNotificationBodyList>? getEitCollectionNotificationBodyList = [];
List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList = [];
List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList = [];
List<GetAbsenceCollectionNotificationBodyList>?
getAbsenceCollectionNotificationBodyList = [];
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotificationBodyList = [];
GetContactNotificationBodyList? getContactNotificationBodyList;
List<GetAddressNotificationBodyList>? getAddressNotificationBodyList = [];
List<TerminationNotificationBody>? getTerminationNotificationBodyList = [];
@ -133,8 +130,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
getContactNotificationBodyList = null;
getAddressNotificationBodyList!.clear();
getPaymentNotificationBodyList = null;
if (workListData!.iTEMTYPE == "HRSSA" ||
workListData!.iTEMTYPE == "STAMP") {
if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") {
getUserInformation();
}
@ -146,6 +142,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (workListData!.iTEMTYPE == "HRSSA") {
if (workListData!.rEQUESTTYPE == "EIT") {
getEitNotificationBody();
} else if (workListData!.rEQUESTTYPE == "CEI") {
getCEINotificationBody();
} else if (workListData!.rEQUESTTYPE == "PHONE_NUMBERS") {
getPhonesNotificationBody();
} else if (workListData!.rEQUESTTYPE == "BASIC_DETAILS") {
@ -191,8 +189,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
void getDataFromState() {
if (workListData == null) {
workListData = AppState().workList![AppState()
.workListIndex!]; // ModalRoute.of(context)!.settings.arguments as WorkListResponseModel;
workListData = AppState().workList![AppState().workListIndex!]; // ModalRoute.of(context)!.settings.arguments as WorkListResponseModel;
getData();
}
}
@ -225,8 +222,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
Column(
children: [
Container(
padding: const EdgeInsets.only(
left: 21, right: 21, top: 16, bottom: 16),
padding: const EdgeInsets.only(left: 21, right: 21, top: 16, bottom: 16),
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(25),
@ -245,19 +241,13 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
child: Row(
children: [
myTab(LocaleKeys.info.tr(), 0),
(workListData!.iTEMTYPE == "HRSSA" ||
workListData!.iTEMTYPE == "STAMP")
? myTab(LocaleKeys.details.tr(), 1)
: myTab(LocaleKeys.request.tr(), 1),
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") ? myTab(LocaleKeys.details.tr(), 1) : myTab(LocaleKeys.request.tr(), 1),
myTab(LocaleKeys.actions.tr(), 2),
myTab(LocaleKeys.attachments.tr(), 3),
],
),
),
if ((workListData?.sUBJECT ?? "").isNotEmpty)
workListData!.sUBJECT!
.toText14()
.paddingOnly(top: 20, right: 21, left: 21),
if ((workListData?.sUBJECT ?? "").isNotEmpty) workListData!.sUBJECT!.toText14().paddingOnly(top: 20, right: 21, left: 21),
PageView(
controller: controller,
onPageChanged: (int pageIndex) {
@ -269,38 +259,26 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
InfoFragment(
poHeaderList: getPoNotificationBody?.pOHeader ?? [],
workListData: workListData,
itemCreationHeader:
getItemCreationNtfBody?.itemCreationHeader ?? [],
itemCreationHeader: getItemCreationNtfBody?.itemCreationHeader ?? [],
getStampMsNotifications: getStampMsNotifications,
getStampNsNotifications: getStampNsNotifications,
getEitCollectionNotificationBodyList:
getEitCollectionNotificationBodyList,
getPhonesNotificationBodyList:
getPhonesNotificationBodyList,
getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList,
getPhonesNotificationBodyList: getPhonesNotificationBodyList,
getBasicDetNtfBodyList: getBasicDetNtfBodyList,
getAddressNotificationBodyList:
getAddressNotificationBodyList,
getAbsenceCollectionNotificationBodyList:
getAbsenceCollectionNotificationBodyList,
getContactNotificationBodyList:
getContactNotificationBodyList,
getAddressNotificationBodyList: getAddressNotificationBodyList,
getAbsenceCollectionNotificationBodyList: getAbsenceCollectionNotificationBodyList,
getContactNotificationBodyList: getContactNotificationBodyList,
getPrNotificationBodyList: getPrNotificationBody,
getTerminationNotificationBodyList:
getTerminationNotificationBodyList,
getPaymentNotificationBodyList:
getPaymentNotificationBodyList,
getTerminationNotificationBodyList: getTerminationNotificationBodyList,
getPaymentNotificationBodyList: getPaymentNotificationBodyList,
),
(workListData!.iTEMTYPE == "HRSSA" ||
workListData!.iTEMTYPE == "STAMP" || workListData!.iTEMTYPE == "PAY_REQ")
? DetailFragment(
workListData, memberInformationListModel)
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP" || workListData!.iTEMTYPE == "PAY_REQ")
? DetailFragment(workListData, memberInformationListModel)
: RequestFragment(
moNotificationBodyList: getMoNotificationBodyList,
poLinesList: getPoNotificationBody?.pOLines ?? [],
itemCreationLines:
getItemCreationNtfBody?.itemCreationLines ?? [],
itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [],
prLinesList: getPrNotificationBody?.pRLines ?? [],
),
isActionHistoryLoaded
? actionHistoryList.isEmpty
@ -319,65 +297,52 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
],
).expanded,
if (isApproveAvailable || isRejectAvailable || isCloseAvailable)
Container(
padding: const EdgeInsets.only(
top: 14, bottom: 14, left: 21, right: 21),
decoration: const BoxDecoration(
color: Colors.white,
border: Border(
top: BorderSide(
color: MyColors.lightGreyEFColor, width: 1.0),
SafeArea(
child: Container(
padding: const EdgeInsets.only(top: 14, bottom: 14, left: 21, right: 21),
decoration: const BoxDecoration(
color: Colors.white,
border: Border(
top: BorderSide(color: MyColors.lightGreyEFColor, width: 1.0),
),
),
child: Row(
children: [
if (isRejectAvailable)
DefaultButton(
LocaleKeys.reject.tr(),
() => performAction(rejectAction),
colors: const [Color(0xffE47A7E), Color(0xffDE6D71)],
).expanded,
if (isApproveAvailable && isRejectAvailable) 8.width,
if (isApproveAvailable)
DefaultButton(
LocaleKeys.approve.tr(),
() => performAction(approveAction),
colors: const [Color(0xff28C884), Color(0xff1BB271)],
).expanded,
if (isCloseAvailable)
DefaultButton(
LocaleKeys.ok.tr(),
() => performAction("CLOSE"),
colors: const [Color(0xff32D892), Color(0xff1AB170)],
).expanded,
8.width,
Container(
height: 43,
width: 43,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: MyColors.lightGreyE6Color,
),
child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor),
).onPress(() {
setState(() {
showFabOptions = true;
});
})
],
),
),
child: Row(
children: [
if (isRejectAvailable)
DefaultButton(
LocaleKeys.reject.tr(),
() => performAction(rejectAction),
colors: const [
Color(0xffE47A7E),
Color(0xffDE6D71)
],
).expanded,
if (isApproveAvailable && isRejectAvailable) 8.width,
if (isApproveAvailable)
DefaultButton(
LocaleKeys.approve.tr(),
() => performAction(approveAction),
colors: const [
Color(0xff28C884),
Color(0xff1BB271)
],
).expanded,
if (isCloseAvailable)
DefaultButton(
LocaleKeys.ok.tr(),
() => performAction("CLOSE"),
colors: const [
Color(0xff32D892),
Color(0xff1AB170)
],
).expanded,
8.width,
Container(
height: 43,
width: 43,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: MyColors.lightGreyE6Color,
),
child: Icon(
showFabOptions
? Icons.more_vert_rounded
: Icons.more_horiz_rounded,
color: MyColors.darkIconColor),
).onPress(() {
setState(() {
showFabOptions = true;
});
})
],
),
)
],
@ -388,8 +353,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
opacity: showFabOptions ? 1 : 0,
duration: const Duration(milliseconds: 250),
child: Container(
padding: const EdgeInsets.only(
left: 21, right: 21, bottom: 75 - 12),
padding: const EdgeInsets.only(left: 21, right: 21, bottom: 75 - 12),
width: double.infinity,
height: double.infinity,
color: Colors.white.withOpacity(.67),
@ -398,19 +362,15 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
myFab(LocaleKeys.skip.tr(), "assets/images/skip.svg")
.onPress(() {
if (AppState().workList!.length - 1 >
AppState().workListIndex!) {
myFab(LocaleKeys.skip.tr(), "assets/images/skip.svg").onPress(() {
if (AppState().workList!.length - 1 > AppState().workListIndex!) {
animationIndex = animationIndex + 1;
AppState().setWorkListIndex =
AppState().workListIndex! + 1;
AppState().setWorkListIndex = AppState().workListIndex! + 1;
workListData = null;
showFabOptions = false;
tabIndex = 0;
getDataFromState();
} else if (AppState().workList!.length - 1 ==
AppState().workListIndex!) {
} else if (AppState().workList!.length - 1 == AppState().workListIndex!) {
Navigator.pop(context);
}
}),
@ -428,31 +388,25 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
],
),
),
floatingActionButton:
(!isApproveAvailable && !isRejectAvailable && !isCloseAvailable)
? Container(
height: 43,
width: 43,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: MyColors.lightGreyE6Color,
),
child: Icon(
showFabOptions
? Icons.more_vert_rounded
: Icons.more_horiz_rounded,
color: MyColors.darkIconColor),
).onPress(() {
setState(() {
showFabOptions = true;
});
})
: null,
floatingActionButton: (!isApproveAvailable && !isRejectAvailable && !isCloseAvailable)
? Container(
height: 43,
width: 43,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: MyColors.lightGreyE6Color,
),
child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor),
).onPress(() {
setState(() {
showFabOptions = true;
});
})
: null,
);
}
List<Widget> viewApiButtonsList(
List<GetNotificationButtonsList> notificationButtonsList) {
List<Widget> viewApiButtonsList(List<GetNotificationButtonsList> notificationButtonsList) {
List<Widget> fabs = [];
for (int i = 0; i < notificationButtonsList.length; i++) {
if (notificationButtonsList[i].bUTTONACTION! == "REJECTED" ||
@ -466,9 +420,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
notificationButtonsList[i].bUTTONLABEL!,
getActionImage(notificationButtonsList[i].bUTTONACTION!),
isIconAsset: true,
)
.paddingOnly(bottom: 12)
.onPress(() => handleFabAction(notificationButtonsList[i])));
).paddingOnly(bottom: 12).onPress(() => handleFabAction(notificationButtonsList[i])));
}
return fabs;
}
@ -547,8 +499,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
));
break;
case "ANSWER_INFO":
performAction(notificationButton.bUTTONACTION!,
title: notificationButton.bUTTONLABEL);
performAction(notificationButton.bUTTONACTION!, title: notificationButton.bUTTONLABEL);
break;
case "RFC":
getRFCEmployeeListFunc();
@ -568,31 +519,21 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
callBackFunc: reloadWorkList,
child: UpdateContinueSheet(
workListData: workListData,
getEitCollectionNotificationBodyList:
getEitCollectionNotificationBodyList,
dynamicParams: DynamicListViewParams(
workListData!.sUBJECT!, workListData!.fUNCTIONNAME!,
isUpdate: true,
collectionNotificationList:
getEitCollectionNotificationBodyList![0]
.collectionNotification)),
getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList,
dynamicParams: DynamicListViewParams(workListData!.sUBJECT!, workListData!.fUNCTIONNAME!,
isUpdate: true, collectionNotificationList: getEitCollectionNotificationBodyList![0].collectionNotification)),
);
break;
case "CONTINUE_ACTION":
showMyBottomSheet(
context,
type:"CONTINUE_ACTION",
type: "CONTINUE_ACTION",
callBackFunc: reloadWorkList,
child: UpdateContinueSheet(
workListData: workListData,
getEitCollectionNotificationBodyList:
getEitCollectionNotificationBodyList,
dynamicParams: DynamicListViewParams(
workListData!.sUBJECT!, workListData!.fUNCTIONNAME!,
isUpdate: true,
collectionNotificationList:
getEitCollectionNotificationBodyList![0]
.collectionNotification)),
getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList,
dynamicParams: DynamicListViewParams(workListData!.sUBJECT!, workListData!.fUNCTIONNAME!,
isUpdate: true, collectionNotificationList: getEitCollectionNotificationBodyList![0].collectionNotification)),
);
break;
case "APPROVE_AND_FORWARD":
@ -604,8 +545,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
notificationID: workListData!.nOTIFICATIONID,
actionHistoryList: actionHistoryList,
callBackFunc: reloadWorkList,
getNotificationRespondAttributes:
getNotificationRespondAttributes,
getNotificationRespondAttributes: getNotificationRespondAttributes,
));
break;
case "FORWARD":
@ -617,8 +557,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
notificationID: workListData!.nOTIFICATIONID,
actionHistoryList: actionHistoryList,
callBackFunc: reloadWorkList,
getNotificationRespondAttributes:
getNotificationRespondAttributes,
getNotificationRespondAttributes: getNotificationRespondAttributes,
));
break;
case "DEL":
@ -639,8 +578,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
void getRFCEmployeeListFunc() async {
try {
Utils.showLoading(context);
getRFCEmployeeList = await WorkListApiClient()
.getRFCEmployeeeList(workListData!.nOTIFICATIONID!);
getRFCEmployeeList = await WorkListApiClient().getRFCEmployeeeList(workListData!.nOTIFICATIONID!);
Utils.hideLoading(context);
actionHistoryList.last.sEQUENCE = getRFCEmployeeList[0].sEQ;
showMyBottomSheet(context,
@ -660,8 +598,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
}
}
Future<void> performNetworkCall(BuildContext context,
{String? email, String? userId}) async {
Future<void> performNetworkCall(BuildContext context, {String? email, String? userId}) async {
showDialog(
context: context,
builder: (BuildContext cxt) => ConfirmDialog(
@ -671,12 +608,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
Navigator.pop(cxt);
Utils.showLoading(context);
try {
await WorkListApiClient().submitComment(
comment: "",
email: email,
userId: userId,
notificationId: workListData!.nOTIFICATIONID,
apiMode: "REJECT");
await WorkListApiClient().submitComment(comment: "", email: email, userId: userId, notificationId: workListData!.nOTIFICATIONID, apiMode: "REJECT");
Utils.hideLoading(context);
Navigator.pop(context, "delegate_reload");
} catch (ex) {
@ -694,9 +626,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
title.toText12(
color: isSelected ? Colors.white : Colors.white.withOpacity(.74),
isCenter: true),
title.toText12(color: isSelected ? Colors.white : Colors.white.withOpacity(.74), isCenter: true),
4.height,
Container(
height: 8,
@ -751,10 +681,17 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
}
void performAction(String actionMode, {String? title}) {
String question = "";
if (actionMode == "ANSWER_INFO") {
List<GetActionHistoryList> list = actionHistoryList.where((element) => element.aCTIONCODE == "REQUEST_INFO").toList();
if (list.isNotEmpty) {
question = "${list.first.aCTION}: ${list.first.nOTE}";
}
}
showDialog(
context: context,
builder: (BuildContext cxt) => AcceptRejectInputDialog(
message: title != null ? null : LocaleKeys.requestedItems.tr(),
message: question,
title: title,
notificationGetRespond: notificationNoteInput,
actionMode: actionMode,
@ -764,10 +701,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
for (var element in getNotificationRespondAttributes!) {
responseAttribute.add({
"ATTRIBUTE_NAME": element!.attributeName,
if (element!.attributeType == "number")
"ATTRIBUTE_NUMBER_VALUE": note
else if (element!.attributeType == "VARCHAR2")
"ATTRIBUTE_TEXT_VALUE": note
if (element!.attributeType == "number") "ATTRIBUTE_NUMBER_VALUE": note else if (element!.attributeType == "VARCHAR2") "ATTRIBUTE_TEXT_VALUE": note
});
}
@ -783,10 +717,11 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
actionMode == "APPROVE" ||
actionMode == "CLOSE" ||
actionMode == "ANSWER_INFO" ||
actionMode == "RFC") {
actionMode == "RFC" ||
actionMode == "TRY_APPROVE_AGAIN" ||
actionMode == "SEND_BACK_TO_PREPARER") {
performNotificationAction(payload);
} else if (note.isNotEmpty &&
(actionMode != "APPROVED" || actionMode != "APPROVE")) {
} else if (note.isNotEmpty && (actionMode != "APPROVED" || actionMode != "APPROVE")) {
performNotificationAction(payload);
} else {
Utils.showToast(LocaleKeys.pleaseEnterComments.tr());
@ -799,8 +734,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
void performNotificationAction(Map<String, dynamic> payload) async {
try {
Utils.showLoading(context);
GenericResponseModel model =
await WorkListApiClient().postNotificationActions(payload);
GenericResponseModel model = await WorkListApiClient().postNotificationActions(payload);
Utils.hideLoading(context);
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
animationIndex = animationIndex + 1;
@ -836,13 +770,30 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
}
}
void getCEINotificationBody() async {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getEitCollectionNotificationBodyList!.clear();
getEitCollectionNotificationBodyList = await WorkListApiClient().GetCeiNotificationBody(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
setState(() {});
}
} catch (ex) {
apiCallCount--;
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
void getEitNotificationBody() async {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getEitCollectionNotificationBodyList!.clear();
getEitCollectionNotificationBodyList = await WorkListApiClient()
.GetEitNotificationBody(workListData!.nOTIFICATIONID);
getEitCollectionNotificationBodyList = await WorkListApiClient().GetEitNotificationBody(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -860,8 +811,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
memberInformationListModel = null;
memberInformationListModel = await WorkListApiClient()
.getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -879,8 +829,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getPhonesNotificationBodyList!.clear();
getPhonesNotificationBodyList = await WorkListApiClient()
.getPhonesNotificationBodyList(workListData!.nOTIFICATIONID);
getPhonesNotificationBodyList = await WorkListApiClient().getPhonesNotificationBodyList(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -898,8 +847,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getBasicDetNtfBodyList!.clear();
getBasicDetNtfBodyList = await WorkListApiClient()
.getBasicDetNtfBodyList(workListData!.nOTIFICATIONID);
getBasicDetNtfBodyList = await WorkListApiClient().getBasicDetNtfBodyList(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -917,8 +865,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getAbsenceCollectionNotificationBodyList!.clear();
getAbsenceCollectionNotificationBodyList = await WorkListApiClient()
.getAbsenceNotificationBody(workListData!.nOTIFICATIONID);
getAbsenceCollectionNotificationBodyList = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -935,8 +882,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getContactNotificationBodyList = await WorkListApiClient()
.getContactNotificationBodyList(workListData!.nOTIFICATIONID);
getContactNotificationBodyList = await WorkListApiClient().getContactNotificationBodyList(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -953,8 +899,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getAddressNotificationBodyList = await WorkListApiClient()
.getAddressNotificationBodyList(workListData!.nOTIFICATIONID);
getAddressNotificationBodyList = await WorkListApiClient().getAddressNotificationBodyList(workListData!.nOTIFICATIONID);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -970,8 +915,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
void getTerminationNotificationBody() async {
try {
if (apiCallCount == 0) apiCallCount++;
getTerminationNotificationBodyList = await WorkListApiClient()
.getTerminationNotificationBodyList(workListData!.nOTIFICATIONID);
getTerminationNotificationBodyList = await WorkListApiClient().getTerminationNotificationBodyList(workListData!.nOTIFICATIONID);
Utils.hideLoading(context);
apiCallCount--;
if (apiCallCount == 0) {
@ -989,11 +933,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
if (workListData!.rEQUESTTYPE == "STAMP_MS") {
getStampMsNotifications = await WorkListApiClient()
.getStampMsNotificationBody(workListData!.nOTIFICATIONID!, -999);
getStampMsNotifications = await WorkListApiClient().getStampMsNotificationBody(workListData!.nOTIFICATIONID!, -999);
} else {
getStampNsNotifications = await WorkListApiClient()
.getStampNsNotificationBody(workListData!.nOTIFICATIONID!, -999);
getStampNsNotifications = await WorkListApiClient().getStampNsNotificationBody(workListData!.nOTIFICATIONID!, -999);
}
apiCallCount--;
if (apiCallCount == 0) {
@ -1011,8 +953,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getMoNotificationBodyList = await WorkListApiClient()
.getMoNotificationBody(workListData!.nOTIFICATIONID!, -999);
getMoNotificationBodyList = await WorkListApiClient().getMoNotificationBody(workListData!.nOTIFICATIONID!, -999);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -1029,8 +970,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getItemCreationNtfBody = await WorkListApiClient()
.getItemCreationNtfBody(workListData!.nOTIFICATIONID!, -999);
getItemCreationNtfBody = await WorkListApiClient().getItemCreationNtfBody(workListData!.nOTIFICATIONID!, -999);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -1047,8 +987,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getPoNotificationBody = await WorkListApiClient()
.getPoNotificationBody(workListData!.nOTIFICATIONID!, -999);
getPoNotificationBody = await WorkListApiClient().getPoNotificationBody(workListData!.nOTIFICATIONID!, -999);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -1065,8 +1004,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getPrNotificationBody = await WorkListApiClient()
.getPRNotificationBody(workListData!.nOTIFICATIONID!, -999);
getPrNotificationBody = await WorkListApiClient().getPRNotificationBody(workListData!.nOTIFICATIONID!, -999);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -1083,8 +1021,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getPaymentNotificationBodyList = await WorkListApiClient()
.getPaymentNotificationBody(workListData!.nOTIFICATIONID!, -999);
getPaymentNotificationBodyList = await WorkListApiClient().getPaymentNotificationBody(workListData!.nOTIFICATIONID!, -999);
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);
@ -1102,8 +1039,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
getNotificationRespondAttributes.clear();
getNotificationRespondAttributes = await WorkListApiClient()
.notificationGetRespondAttributes(workListData!.nOTIFICATIONID!);
getNotificationRespondAttributes = await WorkListApiClient().notificationGetRespondAttributes(workListData!.nOTIFICATIONID!);
if (getNotificationRespondAttributes.isNotEmpty) {
notificationNoteInput = getNotificationRespondAttributes.first;
}
@ -1124,25 +1060,18 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
notificationButtonsList.clear();
notificationButtonsList = await WorkListApiClient()
.getNotificationButtons(workListData!.nOTIFICATIONID!);
notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!);
if (notificationButtonsList.isNotEmpty) {
isCloseAvailable = notificationButtonsList.any(
(GetNotificationButtonsList element) =>
element.bUTTONACTION == "CLOSE");
isApproveAvailable =
notificationButtonsList.any((GetNotificationButtonsList element) {
if (element.bUTTONACTION == "APPROVED" ||
element.bUTTONACTION == "APPROVE") {
isCloseAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "CLOSE");
isApproveAvailable = notificationButtonsList.any((GetNotificationButtonsList element) {
if (element.bUTTONACTION == "APPROVED" || element.bUTTONACTION == "APPROVE") {
approveAction = element.bUTTONACTION!;
return true;
}
return false;
});
isRejectAvailable =
notificationButtonsList.any((GetNotificationButtonsList element) {
if (element.bUTTONACTION == "REJECTED" ||
element.bUTTONACTION == "REJECT") {
isRejectAvailable = notificationButtonsList.any((GetNotificationButtonsList element) {
if (element.bUTTONACTION == "REJECTED" || element.bUTTONACTION == "REJECT") {
rejectAction = element.bUTTONACTION!;
return true;
}
@ -1165,8 +1094,10 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
isActionHistoryLoaded = false;
actionHistoryList.clear();
actionHistoryList = await WorkListApiClient()
.getActionHistory(workListData!.nOTIFICATIONID!);
List<GetActionHistoryList> _actionHistoryList = await WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!);
if (!isActionHistoryLoaded) {
actionHistoryList = _actionHistoryList;
}
setState(() {
isActionHistoryLoaded = true;
});
@ -1179,8 +1110,10 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
try {
isAttachmentLoaded = false;
getAttachmentList.clear();
getAttachmentList = await WorkListApiClient()
.getAttachments(workListData!.nOTIFICATIONID!);
List<GetAttachementList> _getAttachmentList = await WorkListApiClient().getAttachments(workListData!.nOTIFICATIONID!);
if (!isAttachmentLoaded) {
getAttachmentList = _getAttachmentList;
}
setState(() {
isAttachmentLoaded = true;
});

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

@ -29,11 +29,11 @@ class InfoFragment extends StatelessWidget {
List<GetStampNsNotificationBodyList>? getStampNsNotifications;
List<ItemCreationHeader> itemCreationHeader;
List<GetEitCollectionNotificationBodyList>?
getEitCollectionNotificationBodyList;
getEitCollectionNotificationBodyList;
List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList;
List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList;
List<GetAbsenceCollectionNotificationBodyList>?
getAbsenceCollectionNotificationBodyList;
getAbsenceCollectionNotificationBodyList;
GetContactNotificationBodyList? getContactNotificationBodyList;
GetPrNotificationBodyList? getPrNotificationBodyList;
List<GetAddressNotificationBodyList>? getAddressNotificationBodyList = [];
@ -42,19 +42,19 @@ class InfoFragment extends StatelessWidget {
InfoFragment(
{this.workListData,
this.poHeaderList = const <POHeader>[],
this.itemCreationHeader = const <ItemCreationHeader>[],
this.getStampMsNotifications,
this.getStampNsNotifications,
this.getEitCollectionNotificationBodyList,
this.getPhonesNotificationBodyList,
this.getBasicDetNtfBodyList,
this.getAbsenceCollectionNotificationBodyList,
this.getContactNotificationBodyList,
this.getPrNotificationBodyList,
this.getAddressNotificationBodyList,
this.getTerminationNotificationBodyList,
this.getPaymentNotificationBodyList});
this.poHeaderList = const <POHeader>[],
this.itemCreationHeader = const <ItemCreationHeader>[],
this.getStampMsNotifications,
this.getStampNsNotifications,
this.getEitCollectionNotificationBodyList,
this.getPhonesNotificationBodyList,
this.getBasicDetNtfBodyList,
this.getAbsenceCollectionNotificationBodyList,
this.getContactNotificationBodyList,
this.getPrNotificationBodyList,
this.getAddressNotificationBodyList,
this.getTerminationNotificationBodyList,
this.getPaymentNotificationBodyList});
double itemHeight = 0;
double itemWidth = 0;
@ -120,7 +120,7 @@ class InfoFragment extends StatelessWidget {
getAbsenceCollectionNotificationBodyList ?? []),
if (getContactNotificationBodyList != null)
getContactNotificationBodyListWidget(getContactNotificationBodyList ??
GetContactNotificationBodyList())
GetContactNotificationBodyList())
.objectContainerView(),
if (getAddressNotificationBodyList?.isNotEmpty ?? false)
getAddressNotificationBodyListWidget(getAddressNotificationBodyList!),
@ -129,7 +129,7 @@ class InfoFragment extends StatelessWidget {
getTerminationNotificationBodyList!),
if (getPaymentNotificationBodyList != null)
getPaymentNotificationBodyListWidget(getPaymentNotificationBodyList ??
GetPaymentNotificationBodyList())
GetPaymentNotificationBodyList())
.objectContainerView(),
];
return Container(
@ -138,9 +138,9 @@ class InfoFragment extends StatelessWidget {
child: uiList.isEmpty
? LocaleKeys.noDataAvailable.tr().toText16().center
: ListView(
padding: const EdgeInsets.all(21),
children: uiList,
),
padding: const EdgeInsets.all(21),
children: uiList,
),
);
}
@ -149,93 +149,93 @@ class InfoFragment extends StatelessWidget {
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext cxt, int index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Column(
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.description.tr(),
workListData!.fROMUSER ?? ""),
ItemDetailViewCol(
LocaleKeys.from.tr(), workListData!.fROMUSER ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(
LocaleKeys.to.tr(), workListData!.tOUSER ?? ""),
ItemDetailViewCol(
LocaleKeys.sent.tr(), workListData!.bEGINDATE ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(
LocaleKeys.closed.tr(), workListData!.eNDDATE ?? ""),
ItemDetailViewCol(LocaleKeys.id.tr(),
workListData!.nOTIFICATIONID?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.supplier.tr(),
poHeaderList[index].vENDORNAME ?? ""),
ItemDetailViewCol(LocaleKeys.site.tr(),
poHeaderList[index].vENDORSITECODE ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.buyer.tr(),
poHeaderList[index].bUYER ?? ""),
ItemDetailViewCol(LocaleKeys.preparer.tr(),
poHeaderList[index].pREPARER ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.creationDate.tr(),
poHeaderList[index].cREATIONDATE ?? ""),
ItemDetailViewCol(LocaleKeys.shipToLocation.tr(),
poHeaderList[index].sHIPTOLOCATIONNAME ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.quotationNumber.tr(),
poHeaderList[index].qUOTATIONNUMBER ?? ""),
ItemDetailViewCol(LocaleKeys.quotationDate.tr(),
poHeaderList[index].qUOTATIONDATE ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.paymentTerms.tr(),
poHeaderList[index].pAYMENTTERMS ?? ""),
ItemDetailViewCol(LocaleKeys.currency.tr(),
poHeaderList[index].cURRENCYNAME ?? ""),
isItLast: true,
),
],
).objectContainerView(title: LocaleKeys.infoDetail.tr()),
12.height,
Column(
children: [
Column(
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.description.tr(),
workListData!.fROMUSER ?? ""),
ItemDetailViewCol(
LocaleKeys.from.tr(), workListData!.fROMUSER ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(
LocaleKeys.to.tr(), workListData!.tOUSER ?? ""),
ItemDetailViewCol(
LocaleKeys.sent.tr(), workListData!.bEGINDATE ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(
LocaleKeys.closed.tr(), workListData!.eNDDATE ?? ""),
ItemDetailViewCol(LocaleKeys.id.tr(),
workListData!.nOTIFICATIONID?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.supplier.tr(),
poHeaderList[index].vENDORNAME ?? ""),
ItemDetailViewCol(LocaleKeys.site.tr(),
poHeaderList[index].vENDORSITECODE ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.buyer.tr(),
poHeaderList[index].bUYER ?? ""),
ItemDetailViewCol(LocaleKeys.preparer.tr(),
poHeaderList[index].pREPARER ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.creationDate.tr(),
poHeaderList[index].cREATIONDATE ?? ""),
ItemDetailViewCol(LocaleKeys.shipToLocation.tr(),
poHeaderList[index].sHIPTOLOCATIONNAME ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.quotationNumber.tr(),
poHeaderList[index].qUOTATIONNUMBER ?? ""),
ItemDetailViewCol(LocaleKeys.quotationDate.tr(),
poHeaderList[index].qUOTATIONDATE ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.paymentTerms.tr(),
poHeaderList[index].pAYMENTTERMS ?? ""),
ItemDetailViewCol(LocaleKeys.currency.tr(),
poHeaderList[index].cURRENCYNAME ?? ""),
isItLast: true,
),
],
).objectContainerView(title: LocaleKeys.infoDetail.tr()),
12.height,
Column(
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.grossAmount.tr(),
poHeaderList[index].gROSSAMOUNT?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.discountAmount.tr(),
poHeaderList[index].dISCOUNTAMOUNT?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.customDuty.tr(),
poHeaderList[index].cUSTOMDUTY?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.shipHandle.tr(),
poHeaderList[index].sHIPHANDLE?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.otherCharges.tr(),
poHeaderList[index].oTHERCHARGES?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.totalPOAmountWithVAT.tr(),
poHeaderList[index].lOCCURTOTPOAMT.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.totalPOAmountInWords.tr(),
poHeaderList[index].tOTPOAMTWORD ?? ""),
Container(),
isItLast: true,
),
],
).objectContainerView(title: LocaleKeys.amount_detail.tr()),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.grossAmount.tr(),
poHeaderList[index].gROSSAMOUNT?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.discountAmount.tr(),
poHeaderList[index].dISCOUNTAMOUNT?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.customDuty.tr(),
poHeaderList[index].cUSTOMDUTY?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.shipHandle.tr(),
poHeaderList[index].sHIPHANDLE?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.otherCharges.tr(),
poHeaderList[index].oTHERCHARGES?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.totalPOAmountWithVAT.tr(),
poHeaderList[index].lOCCURTOTPOAMT.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.totalPOAmountInWords.tr(),
poHeaderList[index].tOTPOAMTWORD ?? ""),
Container(),
isItLast: true,
),
],
),
).objectContainerView(title: LocaleKeys.amount_detail.tr()),
],
),
separatorBuilder: (BuildContext cxt, int index) => 4.height,
itemCount: poHeaderList.length);
}
@ -256,55 +256,55 @@ class InfoFragment extends StatelessWidget {
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext cxt, int index) => Column(
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.employeeNumber.tr(),
list[index].eMPLOYEENUMBER.toString()),
ItemDetailViewCol(LocaleKeys.assignmentNumber.tr(),
list[index].aSSIGNMENTNUMBER.toString()),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.employeeName.tr(),
list[index].eMPLOYEENAME.toString()),
ItemDetailViewCol(
LocaleKeys.scheduleDate.tr(),
DateUtil.formatDateToDate(
DateUtil.convertStringToDate(
list[index].sCHEDULEDATE.toString()),
false)),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.shiftType.tr(),
list[index].sHTTYPEDESC.toString()),
ItemDetailViewCol(
LocaleKeys.shift.tr(), list[index].sHTNAME.toString()),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.breakText.tr(),
list[index].bREAKNAME.toString()),
ItemDetailViewCol(LocaleKeys.actualSwipeStart.tr(),
list[index].sHTACTUALSTARTTIME.toString()),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.actualSwipeEnd.tr(),
list[index].sHTACTUALENDTIME.toString()),
ItemDetailViewCol(LocaleKeys.approvedSwipeStart.tr(),
list[index].aPPROVEDSTARTTIME.toString()),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.approvedSwipeStartReason.tr(),
list[index].aPPROVEDSTARTREASON.toString()),
ItemDetailViewCol(LocaleKeys.approvedSwipeEnd.tr(), ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.approvedSwipeEndReason.tr(),
list[index].aPPROVEDENDREASONDESC.toString()),
Container(),
isItLast: true,
),
],
).objectContainerView(),
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.employeeNumber.tr(),
list[index].eMPLOYEENUMBER.toString()),
ItemDetailViewCol(LocaleKeys.assignmentNumber.tr(),
list[index].aSSIGNMENTNUMBER.toString()),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.employeeName.tr(),
list[index].eMPLOYEENAME.toString()),
ItemDetailViewCol(
LocaleKeys.scheduleDate.tr(),
DateUtil.formatDateToDate(
DateUtil.convertStringToDate(
list[index].sCHEDULEDATE.toString()),
false)),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.shiftType.tr(),
list[index].sHTTYPEDESC.toString()),
ItemDetailViewCol(
LocaleKeys.shift.tr(), list[index].sHTNAME.toString()),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.breakText.tr(),
list[index].bREAKNAME.toString()),
ItemDetailViewCol(LocaleKeys.actualSwipeStart.tr(),
list[index].sHTACTUALSTARTTIME.toString()),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.actualSwipeEnd.tr(),
list[index].sHTACTUALENDTIME.toString()),
ItemDetailViewCol(LocaleKeys.approvedSwipeStart.tr(),
list[index].aPPROVEDSTARTTIME.toString()),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.approvedSwipeStartReason.tr(),
list[index].aPPROVEDSTARTREASON.toString()),
ItemDetailViewCol(LocaleKeys.approvedSwipeEnd.tr(), ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.approvedSwipeEndReason.tr(),
list[index].aPPROVEDENDREASONDESC.toString()),
Container(),
isItLast: true,
),
],
).objectContainerView(),
separatorBuilder: (BuildContext cxt, int index) =>
1.height.paddingOnly(top: 8, bottom: 8),
itemCount: list.length);
@ -316,27 +316,27 @@ class InfoFragment extends StatelessWidget {
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext cxt, int index) => Column(
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.employeeNumber.tr(),
list[index].eMPLOYEENUMBER.toString()),
ItemDetailViewCol(LocaleKeys.assignmentNumber.tr(),
list[index].aSSIGNMENTNUMBER.toString()),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.employeeName.tr(),
list[index].eMPLOYEENAME.toString()),
ItemDetailViewCol(
LocaleKeys.scheduleDate.tr(),
DateUtil.formatDateToDate(
DateUtil.convertStringToDate(
list[index].sCHEDULEDATE.toString()),
false)),
isItLast: true,
),
],
).objectContainerView(),
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.employeeNumber.tr(),
list[index].eMPLOYEENUMBER.toString()),
ItemDetailViewCol(LocaleKeys.assignmentNumber.tr(),
list[index].aSSIGNMENTNUMBER.toString()),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.employeeName.tr(),
list[index].eMPLOYEENAME.toString()),
ItemDetailViewCol(
LocaleKeys.scheduleDate.tr(),
DateUtil.formatDateToDate(
DateUtil.convertStringToDate(
list[index].sCHEDULEDATE.toString()),
false)),
isItLast: true,
),
],
).objectContainerView(),
separatorBuilder: (BuildContext cxt, int index) =>
1.height.paddingOnly(top: 8, bottom: 8),
itemCount: list.length);
@ -347,48 +347,48 @@ class InfoFragment extends StatelessWidget {
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext cxt, int index) => Column(
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(
LocaleKeys.operatingUnit.tr(),
itemCreationHeader[index].oPERATINGUNIT?.toString() ??
""),
ItemDetailViewCol(LocaleKeys.category.tr(),
itemCreationHeader[index].cATEGORY?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.requester.tr(),
itemCreationHeader[index].rEQUESTER?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.analyzedBy.tr(),
itemCreationHeader[index].aNALYZEDBY?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.approvedDate.tr(),
itemCreationHeader[index].aPPROVEDDATE?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.itemType.tr(),
itemCreationHeader[index].iTEMTYPE?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.relatedTo.tr(),
itemCreationHeader[index].rELATEDTO?.toString() ?? ""),
ItemDetailViewCol(
LocaleKeys.requestDate.tr(),
DateUtil.formatDateToDate(
DateUtil.convertStringToDate(
itemCreationHeader[index].rEQUESTDATE.toString()),
false)),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.analyzedDate.tr(),
itemCreationHeader[index].aNALYZEDDATE?.toString() ?? ""),
ItemDetailViewCol(
LocaleKeys.urgent.tr(),
itemCreationHeader[index].uRGENTFLAGDISP?.toString() ??
""),
),
],
).objectContainerView(),
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailGrid(
ItemDetailViewCol(
LocaleKeys.operatingUnit.tr(),
itemCreationHeader[index].oPERATINGUNIT?.toString() ??
""),
ItemDetailViewCol(LocaleKeys.category.tr(),
itemCreationHeader[index].cATEGORY?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.requester.tr(),
itemCreationHeader[index].rEQUESTER?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.analyzedBy.tr(),
itemCreationHeader[index].aNALYZEDBY?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.approvedDate.tr(),
itemCreationHeader[index].aPPROVEDDATE?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.itemType.tr(),
itemCreationHeader[index].iTEMTYPE?.toString() ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.relatedTo.tr(),
itemCreationHeader[index].rELATEDTO?.toString() ?? ""),
ItemDetailViewCol(
LocaleKeys.requestDate.tr(),
DateUtil.formatDateToDate(
DateUtil.convertStringToDate(
itemCreationHeader[index].rEQUESTDATE.toString()),
false)),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.analyzedDate.tr(),
itemCreationHeader[index].aNALYZEDDATE?.toString() ?? ""),
ItemDetailViewCol(
LocaleKeys.urgent.tr(),
itemCreationHeader[index].uRGENTFLAGDISP?.toString() ??
""),
),
],
).objectContainerView(),
separatorBuilder: (BuildContext cxt, int index) => 18.height,
itemCount: itemCreationHeader.length);
}
@ -401,7 +401,7 @@ class InfoFragment extends StatelessWidget {
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext cxt, int index) {
List<CollectionNotificationEit> dataList =
list.isEmpty ? [] : (list[index].collectionNotification ?? []);
list.isEmpty ? [] : (list[index].collectionNotification ?? []);
dataList = dataList
.where((CollectionNotificationEit o) => o.displayFlag == "Y")
.toList();
@ -416,15 +416,15 @@ class InfoFragment extends StatelessWidget {
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext context, int index) =>
ItemDetailViewGridItem(
index,
dataList[index].segmentPrompt,
dataList[index].segmentValueDsp,
isNeedToShowEmptyDivider: (dataList.length == index + 1)
? isOdd
index,
dataList[index].segmentPrompt,
dataList[index].segmentValueDsp,
isNeedToShowEmptyDivider: (dataList.length == index + 1)
? isOdd
? true
: false
: false,
),
: false,
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: (itemWidth / itemHeight),
@ -453,8 +453,8 @@ class InfoFragment extends StatelessWidget {
list[index].proposedPhoneNumber ?? "",
isNeedToShowEmptyDivider: (list.length == index + 1)
? isOdd
? true
: false
? true
: false
: false,
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
@ -490,8 +490,8 @@ class InfoFragment extends StatelessWidget {
list[index].segmentValueDsp,
isNeedToShowEmptyDivider: (list.length == index + 1)
? isOdd
? true
: false
? true
: false
: false,
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
@ -518,7 +518,7 @@ class InfoFragment extends StatelessWidget {
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext cxt, int index) {
List<CollectionNotificationAbsence> dataList =
list.isEmpty ? [] : (list[index].collectionNotification ?? []);
list.isEmpty ? [] : (list[index].collectionNotification ?? []);
dataList = dataList
.where((CollectionNotificationAbsence o) => o.dISPLAYFLAG == "Y")
.toList();
@ -534,31 +534,31 @@ class InfoFragment extends StatelessWidget {
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext context, int index) =>
ItemDetailViewGridItem(
index,
dataList[index].sEGMENTPROMPT,
dataList[index].sEGMENTVALUEDSP,
isNeedToShowEmptyDivider: (dataList.length == index + 1)
? isOdd
index,
dataList[index].sEGMENTPROMPT,
dataList[index].sEGMENTVALUEDSP,
isNeedToShowEmptyDivider: (dataList.length == index + 1)
? isOdd
? true
: false
: false,
),
: false,
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: (itemWidth / itemHeight),
),
).objectContainerView();
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext cxt, int index) =>
dataList[index].dISPLAYFLAG == "Y"
? ItemDetailViewCol(dataList[index].sEGMENTPROMPT!,
dataList[index].sEGMENTVALUEDSP!)
: Container(),
separatorBuilder: (BuildContext cxt, int index) =>
dataList[index].dISPLAYFLAG == "Y" ? 4.height : 0.height,
itemCount: dataList.length)
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (BuildContext cxt, int index) =>
dataList[index].dISPLAYFLAG == "Y"
? ItemDetailViewCol(dataList[index].sEGMENTPROMPT!,
dataList[index].sEGMENTVALUEDSP!)
: Container(),
separatorBuilder: (BuildContext cxt, int index) =>
dataList[index].dISPLAYFLAG == "Y" ? 4.height : 0.height,
itemCount: dataList.length)
.objectContainerView();
},
separatorBuilder: (BuildContext cxt, int index) => 12.height,
@ -572,9 +572,9 @@ class InfoFragment extends StatelessWidget {
children: [
getPrNotificationBodyList.pINFORMATION != null
? getPrNotificationBodyList.pINFORMATION
.toString()
.toText14(color: MyColors.textMixColor)
.objectContainerView()
.toString()
.toText14(color: MyColors.textMixColor)
.objectContainerView()
: Container(),
12.height,
Column(
@ -625,11 +625,11 @@ class InfoFragment extends StatelessWidget {
getAddressNotificationBodyList[index].sEGMENTPROMPT,
getAddressNotificationBodyList[index].sEGMENTVALUEDSP,
isNeedToShowEmptyDivider:
(getAddressNotificationBodyList.length == index + 1)
? isOdd
? true
: false
: false,
(getAddressNotificationBodyList.length == index + 1)
? isOdd
? true
: false
: false,
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
@ -658,11 +658,11 @@ class InfoFragment extends StatelessWidget {
getterminationNotificationBodyList[index].sEGMENTPROMPT,
getterminationNotificationBodyList[index].sEGMENTVALUEDSP,
isNeedToShowEmptyDivider:
(getterminationNotificationBodyList.length == index + 1)
? isOdd
? true
: false
: false,
(getterminationNotificationBodyList.length == index + 1)
? isOdd
? true
: false
: false,
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
@ -702,11 +702,11 @@ class InfoFragment extends StatelessWidget {
data.contactNotificationBody![index].segmentPrompt,
data.contactNotificationBody![index].segmentValueDsp,
isNeedToShowEmptyDivider:
(data.contactNotificationBody!.length == index + 1)
? isOdd
? true
: false
: false,
(data.contactNotificationBody!.length == index + 1)
? isOdd
? true
: false
: false,
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
@ -730,7 +730,7 @@ class InfoFragment extends StatelessWidget {
GetPaymentNotificationBodyList? data) {
return Column(
children: [
12.height,
12.height,
if (data!.paymentDetailsList!.isNotEmpty)
Column(
children: [
@ -743,8 +743,8 @@ class InfoFragment extends StatelessWidget {
),
ItemDetailGrid(
ItemDetailViewCol( LocaleKeys.requestDate.tr(),
DateUtil.formatDateToDate(
DateUtil.convertStringToDate(data.paymentDetailsList![0].requestDate!), false) ?? ""),
DateUtil.formatDateToDate(
DateUtil.convertStringToDate(data.paymentDetailsList![0].requestDate!), false) ?? ""),
ItemDetailViewCol(
LocaleKeys.requesterEmpName.tr(), data.paymentDetailsList![0].requesterEmployeeName ?? ""),
),
@ -763,6 +763,18 @@ class InfoFragment extends StatelessWidget {
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(
ItemDetailViewCol( LocaleKeys.preparePositionName.tr(),
data.paymentDetailsList![0].preparePositionName ?? ""),
ItemDetailViewCol( LocaleKeys.requesterOperatingUnit.tr(),
data.paymentDetailsList![0].requesterOperatingUnits ?? "")
),
@ -770,30 +782,30 @@ class InfoFragment extends StatelessWidget {
],
).objectContainerView(),
if (data!.paymentDetailsList!.isNotEmpty)
Column(
children: [
LocaleKeys.general.tr().toText14(color: MyColors.textMixColor),
ItemDetailGrid(
ItemDetailViewCol(
LocaleKeys.payingORGName.tr(), data.paymentDetailsList![0].payingOrganizationName ?? ""),
ItemDetailViewCol(LocaleKeys.requestAmount.tr(),
data.paymentDetailsList![0].requestAmount ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.paymentMethodName.tr(),
data.paymentDetailsList![0].paymentMethodName ?? ""),
ItemDetailViewCol(
LocaleKeys.currency.tr(), data.paymentDetailsList![0].currency ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.typeofPayment.tr(),
data.paymentDetailsList![0].typeOfPayment ?? ""),
ItemDetailViewCol(
LocaleKeys.paymentDetails.tr(), data.paymentDetailsList![0].paymentDetails ?? ""),
),
Column(
children: [
LocaleKeys.general.tr().toText14(color: MyColors.textMixColor),
ItemDetailGrid(
ItemDetailViewCol(
LocaleKeys.payingORGName.tr(), data.paymentDetailsList![0].payingOrganizationName ?? ""),
ItemDetailViewCol(LocaleKeys.requestAmount.tr(),
data.paymentDetailsList![0].requestAmount ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.paymentMethodName.tr(),
data.paymentDetailsList![0].paymentMethodName ?? ""),
ItemDetailViewCol(
LocaleKeys.currency.tr(), data.paymentDetailsList![0].currency ?? ""),
),
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.typeofPayment.tr(),
data.paymentDetailsList![0].typeOfPayment ?? ""),
ItemDetailViewCol(
LocaleKeys.paymentDetails.tr(), data.paymentDetailsList![0].paymentDetails ?? ""),
),
],
).objectContainerView(),
],
).objectContainerView(),
if (data!.beneficieryList!.isNotEmpty)
Column(
@ -846,7 +858,7 @@ class InfoFragment extends StatelessWidget {
ItemDetailGrid(
ItemDetailViewCol(LocaleKeys.supplierNo.tr(),
data.purchaseOrdersList![0].supplierNumber?? ""),
Container(),
Container(),
),
],
).objectContainerView(),
@ -899,13 +911,16 @@ class InfoFragment extends StatelessWidget {
ItemDetailViewCol(LocaleKeys.invoiceDate.tr(),
DateUtil.formatDateToDate(
DateUtil.convertStringToDate( data.refundInvoiceList![0].invoicedDate), false)?? ""),
ItemDetailViewCol( LocaleKeys.refundInvoice.tr(), data.refundInvoiceList![0].invoiceNumber ??
"" ),
),
],
).objectContainerView(),
],
);
}
}

@ -0,0 +1,176 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
/// Animated progress bar. Behaves like implicitly animated widget.
/// Check basic implicit animated Flutter widgets like [AnimatedContainer]
/// It animates [value] changes.
/// Requires [duration] to set filling duration timer
/// [onEnd] callback to trigger additional actions (e.g. another animation)
/// at the end of the current animation
/// [color] or [gradient] to fill the progress bar. Only one parameter is allowed.
/// Optional [backgroundColor], defaults to transparent
/// Optional [width] defaults to 200.0
/// Optional [height] defaults to 10.0
/// Optional [curve] defaults to [Curves.linear]
class AnimatedProgressBar extends ImplicitlyAnimatedWidget {
const AnimatedProgressBar({
key,
required duration,
required this.value,
this.width = 200.0,
this.height = 10.0,
this.color,
this.gradient,
this.backgroundColor = Colors.transparent,
curve = Curves.linear,
onEnd,
}) : super(key: key, duration: duration, curve: curve, onEnd: onEnd);
///progress bar width
final double width;
///progress bar height
final double height;
///current progress value
final double? value;
///progress bar gradient parameter
final Gradient? gradient;
///progress bar color parameter
final Color? color;
///progress bar color parameter
final Color backgroundColor;
@override
AnimatedWidgetBaseState<AnimatedProgressBar> createState() => _AnimatedBarState();
}
class _AnimatedBarState extends AnimatedWidgetBaseState<AnimatedProgressBar> {
Tween<double>? _progressValue;
@override
void forEachTween(TweenVisitor<dynamic> visitor) {
_progressValue = visitor(_progressValue, widget.value, (value) => Tween<double>(begin: value)) as Tween<double>?;
}
@override
Widget build(BuildContext context) {
return ProgressBar(
value: _progressValue?.evaluate(animation),
width: widget.width,
height: widget.height,
gradient: widget.gradient,
color: widget.color,
backgroundColor: widget.backgroundColor,
);
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder description) {
super.debugFillProperties(description);
description.add(DiagnosticsProperty<Tween>('progressValue', _progressValue, showName: false, defaultValue: null));
}
}
class ProgressBar extends StatelessWidget {
const ProgressBar({
Key? key,
required this.value,
this.width = 200.0,
this.height = 10.0,
this.color,
this.backgroundColor = Colors.transparent,
this.gradient,
}) : assert(
gradient == null || color == null,
'Cannot provide both a color and a gradient',
),
assert(
gradient != null || color != null,
'Need to provide color or gradient',
),
super(key: key);
///progress bar width
final double width;
///progress bar height
final double height;
///current progress value
final double? value;
///progress bar gradient parameter
final Gradient? gradient;
///progress bar color parameter
final Color? color;
///progress bar color parameter
final Color backgroundColor;
@override
Widget build(BuildContext context) {
return CustomPaint(
size: Size(width, height),
foregroundPainter: ProgressPainter(
value: value!,
color: color,
gradient: gradient,
),
painter: BackgroundPainter(
backgroundColor: backgroundColor,
),
);
}
}
class BackgroundPainter extends CustomPainter {
const BackgroundPainter({required this.backgroundColor});
///progress bar backgroundColor
final Color backgroundColor;
@override
void paint(Canvas canvas, Size size) {
Paint paint = Paint()..color = backgroundColor;
canvas.drawRRect(RRect.fromRectAndRadius(Offset.zero & size, Radius.circular(6)), paint);
}
@override
bool shouldRepaint(covariant BackgroundPainter oldDelegate) => false;
}
class ProgressPainter extends CustomPainter {
const ProgressPainter({required this.value, this.gradient, this.color});
///current progress bar value
final double value;
///progress bar gradient infill
final Gradient? gradient;
///progress bar gradient color
final Color? color;
@override
void paint(Canvas canvas, Size size) {
Paint paint = Paint();
if (gradient != null) {
paint.shader = gradient?.createShader(Offset.zero & size);
}
if (color != null) {
paint.color = color!;
}
canvas.clipRRect(RRect.fromRectAndRadius(Offset.zero & size, Radius.circular(6)));
canvas.drawRRect(RRect.fromRectAndRadius(Rect.fromLTRB(0, 0, size.width * value, size.height), Radius.circular(6)), paint);
}
@override
bool shouldRepaint(covariant ProgressPainter oldDelegate) {
return value != oldDelegate.value;
}
}

@ -30,8 +30,9 @@ class SearchEmployeeBottomSheet extends StatefulWidget {
String title, apiMode;
List<GetActionHistoryList>? actionHistoryList;
Function(ReplacementList) onSelectEmployee;
Function(String)? onSearchClick;
bool fromChat;
bool? fromDynamicScreen;
SearchEmployeeBottomSheet({
required this.title,
required this.apiMode,
@ -39,6 +40,8 @@ class SearchEmployeeBottomSheet extends StatefulWidget {
this.actionHistoryList,
required this.onSelectEmployee,
required this.fromChat,
this.fromDynamicScreen =false,
this.onSearchClick,
});
@override
@ -152,7 +155,12 @@ class _SearchEmployeeBottomSheetState extends State<SearchEmployeeBottomSheet> {
21.height,
"Search".toText16(),
11.height,
Row(
widget.fromDynamicScreen! ? Row(
children: [
radioOption( "UserId" , 0, _selectedSearchIndex),
],
) : Row(
children: [
radioOption(widget.fromChat ? "UserId" : "Name", 0, _selectedSearchIndex),
radioOption("User Name", 1, _selectedSearchIndex),
@ -164,7 +172,7 @@ class _SearchEmployeeBottomSheetState extends State<SearchEmployeeBottomSheet> {
children: [
DynamicTextFieldWidget(
"Search",
"Search By Username",
widget.fromDynamicScreen! ? "Search By UserID" : "Search By Username",
inputAction: TextInputAction.done,
suffixIconData: Icons.search,
onChange: (text) {
@ -175,8 +183,13 @@ class _SearchEmployeeBottomSheetState extends State<SearchEmployeeBottomSheet> {
IconButton(
constraints: const BoxConstraints(),
onPressed: () async {
await SystemChannels.textInput.invokeMethod('TextInput.hide');
widget.fromChat ? fetchChatUser() : fetchUserByInput();
if(widget.onSearchClick !=null){
widget.onSearchClick!(searchText);
}else {
await SystemChannels.textInput.invokeMethod(
'TextInput.hide');
widget.fromChat ? fetchChatUser() : fetchUserByInput();
}
},
icon: const Icon(Icons.search),
)

@ -47,28 +47,21 @@ class DefaultButton extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
gradient: onPress == null
? const LinearGradient(
? LinearGradient(
colors: <Color>[
Color(0xffEAEAEA),
Color(0xffEAEAEA),
disabledColor ?? Color(0xffEAEAEA),
disabledColor ?? Color(0xffEAEAEA),
],
)
: color == MyColors.yellowColorII
? const LinearGradient(
colors: <Color>[
MyColors.yellowColorII,
MyColors.yellowColorII,
],
colors: <Color>[MyColors.yellowColorII, MyColors.yellowColorII],
)
: LinearGradient(
transform: const GradientRotation(.83),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: colors ??
<Color>[
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
],
colors: colors ?? <Color>[MyColors.gradiantEndColor, MyColors.gradiantStartColor],
),
),
child: Row(

@ -0,0 +1,150 @@
library glowy_borderspertino.dart;
import 'dart:math' as math;
import 'package:flutter/cupertino.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
class AnimatedGradientBorder extends StatefulWidget {
const AnimatedGradientBorder(
{Key? key,
required this.child,
required this.gradientColors,
required this.borderRadius,
this.animationTime,
this.borderSize,
this.animationProgress,
this.stretchAlongAxis = false,
this.stretchAxis = Axis.horizontal});
final Widget child;
final double? borderSize;
final List<Color> gradientColors;
final BorderRadiusGeometry borderRadius;
final int? animationTime;
final double? animationProgress;
final bool stretchAlongAxis;
final Axis stretchAxis;
@override
State<StatefulWidget> createState() => AnimatedGradientState();
}
class AnimatedGradientState extends State<AnimatedGradientBorder> with SingleTickerProviderStateMixin {
late AnimationController _controller;
late Animation _angleAnimation;
@override
void initState() {
super.initState();
_controller = AnimationController(vsync: this, duration: Duration(seconds: widget.animationTime ?? 2));
_controller.addListener(() => setState(() {}));
_angleAnimation = Tween<double>(begin: 0.1, end: 2 * math.pi).animate(_controller);
if (widget.animationProgress != null) {
_controller.forward();
} else {
_controller.repeat();
}
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
void didUpdateWidget(covariant AnimatedGradientBorder oldWidget) {
super.didUpdateWidget(oldWidget);
double? animateTo = widget.animationProgress;
if (animateTo != null) {
_controller.animateTo(animateTo);
} else {
_controller.repeat();
}
}
@override
Widget build(BuildContext context) {
double? negativeMargin = -1.0 * (widget.borderSize ?? 0);
return Container(
padding: EdgeInsets.all(widget.borderSize ?? 0),
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: MyColors.kWhiteColor,
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
),
child: Stack(alignment: Alignment.center, clipBehavior: Clip.none, children: [
Positioned(
top: negativeMargin,
left: negativeMargin,
right: negativeMargin,
bottom: negativeMargin,
child: AnimatedGradientContainer(
gradientColors: widget.gradientColors,
borderRadius: widget.borderRadius,
gradientAngle: _angleAnimation.value,
)),
widget.child,
// BackdropFilter(
// filter: ImageFilter.blur(sigmaX: widget.glowSize ?? 0, sigmaY: widget.glowSize ?? 0),
// child: Stack(
// alignment: Alignment.center,
// clipBehavior: Clip.none,
// children: [
// Positioned(
// top: negativeMargin,
// right: negativeMargin,
// left: negativeMargin,
// bottom: negativeMargin,
// child: AnimatedGradientContainer(
// gradientColors: widget.gradientColors,
// borderRadius: widget.borderRadius,
// gradientAngle: _angleAnimation.value,
// )),
// if (widget.stretchAlongAxis)
// SizedBox(
// width: widget.stretchAxis == Axis.horizontal ? double.infinity : null,
// height: widget.stretchAxis == Axis.vertical ? double.infinity : null,
// child: widget.child,
// )
// else
// widget.child,
// ],
// ),
// ),
]),
);
}
}
class AnimatedGradientContainer extends StatelessWidget {
const AnimatedGradientContainer({Key? key, required this.gradientColors, required this.gradientAngle, required this.borderRadius});
final List<Color> gradientColors;
final double gradientAngle;
final BorderRadiusGeometry borderRadius;
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
borderRadius: borderRadius,
gradient: SweepGradient(
colors: [...gradientColors, ...gradientColors.reversed], stops: _generateColorStops([...gradientColors, ...gradientColors.reversed]), transform: GradientRotation(gradientAngle))));
}
List<double> _generateColorStops(List<dynamic> colors) {
return colors.asMap().entries.map((entry) {
double percentageStop = entry.key / colors.length;
return percentageStop;
}).toList();
}
}

@ -52,8 +52,10 @@ class ItemDetailViewGridItem extends StatelessWidget {
final String? value;
final String? type;
final bool isNeedToShowEmptyDivider;
final int maxLine;
final bool showSpaceAfterLine;
ItemDetailViewGridItem(this.index, this.title, this.value, {Key? key, this.isNeedToShowEmptyDivider = false, this.type = ""}) : super(key: key);
ItemDetailViewGridItem(this.index, this.title, this.value, {Key? key, this.isNeedToShowEmptyDivider = false, this.showSpaceAfterLine = false, this.type = "", this.maxLine = 6}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -76,20 +78,22 @@ class ItemDetailViewGridItem extends StatelessWidget {
),
),
child: isNeedToShowEmptyDivider
? Container()
? SizedBox()
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
title != null ? Flexible(child: "$title:".toText12Auto(isBold: true, color: const Color(0xff2BB8A6))) : Container(),
4.width,
type != null
? type!.toLowerCase() == "table"
? getStringFromJSON(value!)
: Flexible(child: (value!.isEmpty ? "--" : value).toString().toText12Auto(color: MyColors.normalTextColor))
// : Flexible(child: (value!.isEmpty ? "--" : value).toString().toText12Auto(color: MyColors.normalTextColor, maxLine: 5))
: (value!.isEmpty ? "--" : value).toString().toText12Auto(color: MyColors.normalTextColor, maxLine: maxLine)
: Container(),
],
),
).paddingOnly(top: showSpaceAfterLine ? 16 : 0),
);
}
}

@ -44,7 +44,7 @@ class Location {
AppPermissions.location((granted) {
if (granted) {
Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: const Duration(seconds: 5)).then((value) {
Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: const Duration(seconds: 10)).then((value) {
done(value);
}).catchError((err) {
errorCallBack();

@ -0,0 +1,134 @@
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/widgets/AnimatedProgressBar.dart';
import 'package:video_player/video_player.dart';
class MyVideoProgressIndicator extends StatefulWidget {
const MyVideoProgressIndicator(
this.controller, {
Key? key,
this.colors = const VideoProgressColors(),
required this.allowScrubbing,
this.padding = const EdgeInsets.only(top: 5.0),
}) : super(key: key);
final VideoPlayerController controller;
final VideoProgressColors colors;
final bool allowScrubbing;
final EdgeInsets padding;
@override
State<MyVideoProgressIndicator> createState() => _VideoProgressIndicatorState();
}
class _VideoProgressIndicatorState extends State<MyVideoProgressIndicator> {
_VideoProgressIndicatorState() {
listener = () {
if (!mounted) {
return;
}
setState(() {});
};
}
late VoidCallback listener;
VideoPlayerController get controller => widget.controller;
VideoProgressColors get colors => widget.colors;
@override
void initState() {
super.initState();
controller.addListener(listener);
}
@override
void deactivate() {
controller.removeListener(listener);
super.deactivate();
}
@override
Widget build(BuildContext context) {
Widget progressIndicator;
if (controller.value.isInitialized) {
int duration = controller.value.duration.inMilliseconds;
int position = controller.value.position.inMilliseconds;
int maxBuffering = 0;
for (DurationRange range in controller.value.buffered) {
int end = range.end.inMilliseconds;
if (end > maxBuffering) {
maxBuffering = end;
}
}
progressIndicator = Stack(
fit: StackFit.passthrough,
children: <Widget>[
// LinearProgressIndicator(
// value: maxBuffering / duration,
// valueColor: AlwaysStoppedAnimation<Color>(colors.bufferedColor),
// backgroundColor: colors.backgroundColor,
// minHeight: 8,
// ),
// LinearProgressIndicator(
// value: position / duration,
// valueColor: AlwaysStoppedAnimation<Color>(colors.playedColor),
// backgroundColor: Colors.transparent,
// minHeight: 8,
// ),
AnimatedProgressBar(
value: position / duration,
duration: const Duration(seconds: 2),
height: 43,
width: MediaQuery.of(context).size.width - 120,
gradient: const LinearGradient(
transform: GradientRotation(.83),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
],
),
backgroundColor: Colors.grey.withOpacity(0.6),
),
],
);
} else {
// progressIndicator = LinearProgressIndicator(
// valueColor: AlwaysStoppedAnimation<Color>(colors.playedColor),
// backgroundColor: colors.backgroundColor,
// minHeight: 8,
// );
progressIndicator = AnimatedProgressBar(
value: 1,
duration: const Duration(seconds: 2),
height: 43,
width: MediaQuery.of(context).size.width - 120,
gradient: const LinearGradient(
transform: GradientRotation(.83),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
],
),
backgroundColor: Colors.grey.withOpacity(0.6),
);
}
Widget paddedProgressIndicator = Padding(padding: widget.padding, child: progressIndicator);
if (widget.allowScrubbing) {
return VideoScrubber(controller: controller, child: paddedProgressIndicator);
} else {
return paddedProgressIndicator;
}
}
}

@ -49,23 +49,23 @@ class OTPWidget extends StatefulWidget {
const OTPWidget({
Key? key,
this.maxLength: 4,
this.maxLength = 4,
this.controller,
this.pinBoxWidth: 70.0,
this.pinBoxHeight: 70.0,
this.pinBoxWidth = 70.0,
this.pinBoxHeight = 70.0,
this.pinTextStyle,
this.onDone,
this.defaultBorderColor: Colors.black,
this.textBorderColor: Colors.black,
this.defaultBorderColor = Colors.black,
this.textBorderColor = Colors.black,
this.pinTextAnimatedSwitcherTransition,
this.pinTextAnimatedSwitcherDuration: const Duration(),
this.hasError: false,
this.errorBorderColor: Colors.red,
this.pinTextAnimatedSwitcherDuration = const Duration(),
this.hasError = false,
this.errorBorderColor = Colors.red,
this.onTextChanged,
this.autoFocus: false,
this.autoFocus = false,
this.focusNode,
this.textDirection: TextDirection.ltr,
this.keyboardType: TextInputType.number,
this.textDirection = TextDirection.ltr,
this.keyboardType =TextInputType.number,
this.pinBoxOuterPadding = const EdgeInsets.symmetric(horizontal: 4.0),
this.pinBoxColor = Colors.white,
this.pinBoxBorderWidth = 2.0,

@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
#version: 3.3.01+300040
version: 3.7.96+1
version: 3.6.3+300073
environment:
sdk: ">=2.16.0 <3.5.0"
@ -61,12 +61,11 @@ dependencies:
platform_device_id: ^1.0.1
image_picker: ^0.8.5+3
file_picker: 5.2.5
geolocator: ^9.0.2
month_year_picker: ^0.4.0+1
month_picker_dialog: ^3.0.0
# open_file: ^3.2.1
geolocator: ^9.0.2
open_filex: ^4.4.0
wifi_iot: ^0.3.18
wifi_iot: ^0.3.19+1
flutter_html: ^3.0.0-alpha.6
# flutter_barcode_scanner: ^2.0.0
qr_code_scanner: ^1.0.1
@ -76,14 +75,16 @@ dependencies:
flutter_rating_bar: ^4.0.1
auto_size_text: ^3.0.0
pull_to_refresh: ^2.0.0
fl_chart: ^0.66.0
# lottie json animations
lottie: any
# Marathon Card Swipe
appinio_swiper: ^1.1.1
expandable: ^5.0.1
safe_device: ^1.1.9
# networkImage
cached_network_image: ^3.2.2
#Chat
signalr_netcore: ^1.3.3
@ -108,7 +109,7 @@ dependencies:
#Huawei Dependencies
# 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_push: ^6.7.0+300
firebase_crashlytics: ^2.9.0
@ -121,7 +122,8 @@ dependencies:
google_api_availability: ^3.0.1
google_maps_flutter_web: ^0.5.4
in_app_update: 4.1.0
cached_network_image: ^3.3.0 # or newer
flutter_blurhash: ^0.8.0 #
#todo its for temporary purpose, later will remove this.
dotted_border: ^2.0.0+3
@ -130,7 +132,7 @@ dependencies:
dependency_overrides:
firebase_core_platform_interface: 4.5.1
cached_network_image: ^3.2.0
dev_dependencies:
flutter_test:
@ -162,6 +164,7 @@ flutter:
- assets/
- assets/langs/
- assets/icons/
- assets/icons/itg/
- assets/lottie/
- assets/audio/
- assets/json/
@ -225,4 +228,4 @@ flutter:
# see https://flutter.dev/custom-fonts/#from-packages
# Adding this to test the push from iMac
# Adding this to test the push from iMac
Loading…
Cancel
Save