From 3a0c29265ba8d94ab40ae8e591cb72caf27461e6 Mon Sep 17 00:00:00 2001 From: venbaittech Date: Wed, 22 Oct 2025 12:06:00 +0530 Subject: [PATCH] staff-enq-redesign --- .flutter-plugins-dependencies | 2 +- lib/data/utils/validators.dart | 20 ++ .../screens/Enquiry/enquiry/enquiry_tab.dart | 7 +- .../StaffAttendance/attendanceAllDetails.dart | 53 ++--- .../individual_Attendance.dart | 52 ++++- .../screens/dashboard/dashboard.dart | 113 +++++---- .../screens/handler/enquiryList.dart | 44 +--- .../screens/staff/Enquiry/enquiry_list.dart | 9 +- .../staff/Enquiry/tabs/createQuotation.dart | 34 +-- .../screens/staff/Enquiry/tabs/policyTab.dart | 66 +++--- .../staff/Enquiry/tabs/quotationTab.dart | 5 +- .../screens/staff/Enquiry/tabs/tab.dart | 217 ++++++++++++++---- .../screens/staff/assignStaff.dart | 4 +- .../themes/indicators/text_field_theme.dart | 13 ++ .../widgets/custom_month_filter.dart | 6 +- 15 files changed, 411 insertions(+), 234 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 3b13433..73d022f 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_ios-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_plugin_android_lifecycle","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.30/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_android-7.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_android","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_android-1.0.52/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"open_file_android","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_android-1.0.6/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_android-2.2.18/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_mac","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_mac-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_linux-0.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_windows-1.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_windows-0.0.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","dependencies":[],"dev_dependency":false},{"name":"firebase_app_check_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check_web-0.2.0+16/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_auth_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth_web-6.0.2/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core_web-3.1.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.0.1/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"flutter_secure_storage_web","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_web-1.0.0/","dependencies":[],"dev_dependency":false},{"name":"open_file_web","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_web-0.0.4/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","dependencies":[],"dev_dependency":false},{"name":"shared_preferences_web","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_app_check","dependencies":["firebase_app_check_web","firebase_core"]},{"name":"firebase_app_check_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core","firebase_messaging_web"]},{"name":"firebase_messaging_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"local_auth","dependencies":["local_auth_android","local_auth_darwin","local_auth_windows"]},{"name":"local_auth_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"local_auth_darwin","dependencies":[]},{"name":"local_auth_windows","dependencies":[]},{"name":"open_file","dependencies":["open_file_android","open_file_web","open_file_ios","open_file_mac","open_file_windows","open_file_linux"]},{"name":"open_file_android","dependencies":[]},{"name":"open_file_ios","dependencies":[]},{"name":"open_file_linux","dependencies":[]},{"name":"open_file_mac","dependencies":[]},{"name":"open_file_web","dependencies":[]},{"name":"open_file_windows","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2025-10-16 15:48:13.675064","version":"3.32.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_ios-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_plugin_android_lifecycle","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.30/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_android-7.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_android","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_android-1.0.52/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"open_file_android","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_android-1.0.6/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_android-2.2.18/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_mac","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_mac-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_linux-0.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_windows-1.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_windows-0.0.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","dependencies":[],"dev_dependency":false},{"name":"firebase_app_check_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check_web-0.2.0+16/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_auth_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth_web-6.0.2/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core_web-3.1.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.0.1/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"flutter_secure_storage_web","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_web-1.0.0/","dependencies":[],"dev_dependency":false},{"name":"open_file_web","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_web-0.0.4/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","dependencies":[],"dev_dependency":false},{"name":"shared_preferences_web","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_app_check","dependencies":["firebase_app_check_web","firebase_core"]},{"name":"firebase_app_check_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core","firebase_messaging_web"]},{"name":"firebase_messaging_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"local_auth","dependencies":["local_auth_android","local_auth_darwin","local_auth_windows"]},{"name":"local_auth_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"local_auth_darwin","dependencies":[]},{"name":"local_auth_windows","dependencies":[]},{"name":"open_file","dependencies":["open_file_android","open_file_web","open_file_ios","open_file_mac","open_file_windows","open_file_linux"]},{"name":"open_file_android","dependencies":[]},{"name":"open_file_ios","dependencies":[]},{"name":"open_file_linux","dependencies":[]},{"name":"open_file_mac","dependencies":[]},{"name":"open_file_web","dependencies":[]},{"name":"open_file_windows","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2025-10-17 14:07:34.777923","version":"3.32.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/lib/data/utils/validators.dart b/lib/data/utils/validators.dart index 201d3d0..e57d9d4 100644 --- a/lib/data/utils/validators.dart +++ b/lib/data/utils/validators.dart @@ -9,6 +9,26 @@ class Validators { return null; } + static String? requiredVechileNum(String? value, String label) { + if (value == null || value.trim().isEmpty) { + return "Required"; + } + + // Convert to uppercase and remove extra spaces + value = value.trim().toUpperCase(); + + // Allow pattern like: TN 01 AB 1234 or TN01AB1234 + final RegExp vehiclePattern = RegExp( + r'^[A-Z]{2}\s?\d{1,2}\s?[A-Z]{1,2}\s?\d{1,4}$', + ); + + if (!vehiclePattern.hasMatch(value)) { + return "Enter valid.no.(e.g.TN01AB1234 or TN 01 AB 1234)"; + } + + return null; // ✅ valid + } + static String? email(String? value, String label) { if (value == null || value.trim().isEmpty) { return "Required"; diff --git a/lib/presentation/screens/Enquiry/enquiry/enquiry_tab.dart b/lib/presentation/screens/Enquiry/enquiry/enquiry_tab.dart index 9be9ec8..f3cfbca 100644 --- a/lib/presentation/screens/Enquiry/enquiry/enquiry_tab.dart +++ b/lib/presentation/screens/Enquiry/enquiry/enquiry_tab.dart @@ -2,6 +2,7 @@ import 'package:dropdown_search/dropdown_search.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; import 'package:http/http.dart' as http; @@ -797,7 +798,11 @@ class EnquiryTabState extends ConsumerState { label: "Registration Number *", field: ThemedFormField( controller: controllers['regNo']!, - validator: (value) => Validators.requiredField(value, "regNo"), + inputFormatters: [ + UpperCaseTextFormatter(), // 👈 custom formatter for uppercase + FilteringTextInputFormatter.allow(RegExp(r'[A-Za-z0-9- ]')), + ], + validator: (value) => Validators.requiredVechileNum(value, "regNo"), txtwidth: ResponsiveLayout.isMobile(context) ? null : MediaQuery.of(context).size.width * 0.26, diff --git a/lib/presentation/screens/StaffAttendance/attendanceAllDetails.dart b/lib/presentation/screens/StaffAttendance/attendanceAllDetails.dart index 15ab214..7c4d83f 100644 --- a/lib/presentation/screens/StaffAttendance/attendanceAllDetails.dart +++ b/lib/presentation/screens/StaffAttendance/attendanceAllDetails.dart @@ -104,7 +104,11 @@ class AttendanceAllDetailsState extends ConsumerState { try { // Convert "10-2025" → "2025-10" - final parsedDate = DateFormat('MM-yyyy').parse(fromDateText); + // final parsedDate = DateFormat('MM-yyyy').parse(fromDateText); + // final apiMonth = DateFormat('yyyy-MM').format(parsedDate); + + // Parse "Nov 2025" → DateTime + final parsedDate = DateFormat('MMM yyyy').parse(fromDateText); final apiMonth = DateFormat('yyyy-MM').format(parsedDate); print('Converted month for API: $apiMonth'); @@ -155,32 +159,16 @@ class AttendanceAllDetailsState extends ConsumerState { if (fromDate != null && fromDate.isNotEmpty) { // Parse the string to DateTime first + // final parsedDate = DateFormat('yyyy-MM').parse(fromDate); + // final monthText = DateFormat('MM-yyyy').format(parsedDate); + + // Parse the string "2025-10" to a DateTime final parsedDate = DateFormat('yyyy-MM').parse(fromDate); - final monthText = DateFormat('MM-yyyy').format(parsedDate); + // Convert it to "Oct 2025" + final monthText = DateFormat('MMM yyyy').format(parsedDate); controllers['month']?.text = monthText; } - // controllers['endDate']?.text = toDate; - // if (data is List) { - // getStaffData = List>.from(data); - // } else if (data is Map) { - // getStaffData = [Map.from(data)]; - // } else { - // getStaffData = []; - // } - // if (data is List) { - // // Safely map each item to Map - // // getStaffData = data.map>((item) { - // // if (item is Map) return item; - // // if (item is Map) return Map.from(item); - // // return {}; // fallback empty map - // // }).toList(); - // // Convert JSArray safely to List> - // - // } else if (data is Map) { - // getStaffData = [Map.from(data)]; - // } else { - // getStaffData = []; - // } + print('test 2'); getStaffData = (data as List) .map>( @@ -439,10 +427,7 @@ class AttendanceAllDetailsState extends ConsumerState { Expanded(flex: 2, child: Text('Staff Name', style: _headerStyle)), Expanded(flex: 2, child: Text('Month', style: _headerStyle)), - Expanded( - flex: 2, - child: Text('Login Count', style: _headerStyle), - ), + Expanded(flex: 2, child: Text('Days', style: _headerStyle)), Expanded(flex: 2, child: Text('Action', style: _headerStyle)), ], ), @@ -568,12 +553,12 @@ class AttendanceAllDetailsState extends ConsumerState { validator: (value) => Validators.requiredField(value, "date"), borderColor: Colors.grey.shade300, controller: controllers['startDate']!, - onDateSelected: (date) { - print("Picked Date: $date"); - - controllers['startDate']?.text = DateFormat('MM-yyyy').format(date); - // controllers['date']?.text = date as String; - }, + // onDateSelected: (date) { + // print("Picked Date: $date"); + // // final month = DateFormat('MM-yyyy').format(date); + // controllers['startDate']?.text = DateFormat('MM-yyyy').format(date); + // // controllers['date']?.text = date as String; + // }, ), ], ); diff --git a/lib/presentation/screens/StaffAttendance/individual_Attendance.dart b/lib/presentation/screens/StaffAttendance/individual_Attendance.dart index c1797c6..a926da2 100644 --- a/lib/presentation/screens/StaffAttendance/individual_Attendance.dart +++ b/lib/presentation/screens/StaffAttendance/individual_Attendance.dart @@ -109,7 +109,11 @@ class IndividualAttendanceDetailsState try { // Convert "10-2025" → "2025-10" - final parsedDate = DateFormat('MM-yyyy').parse(fromDateText); + // final parsedDate = DateFormat('MM-yyyy').parse(fromDateText); + // final apiMonth = DateFormat('yyyy-MM').format(parsedDate); + + // Parse "Nov 2025" → DateTime + final parsedDate = DateFormat('MMM yyyy').parse(fromDateText); final apiMonth = DateFormat('yyyy-MM').format(parsedDate); print('Converted month for API: $apiMonth'); @@ -162,8 +166,13 @@ class IndividualAttendanceDetailsState if (fromDate != null && fromDate.isNotEmpty) { // Parse the string to DateTime first + // final parsedDate = DateFormat('yyyy-MM').parse(fromDate); + // final monthText = DateFormat('MM-yyyy').format(parsedDate); + + // Parse the string "2025-10" to a DateTime final parsedDate = DateFormat('yyyy-MM').parse(fromDate); - final monthText = DateFormat('MM-yyyy').format(parsedDate); + // Convert it to "Oct 2025" + final monthText = DateFormat('MMM yyyy').format(parsedDate); controllers['month']?.text = monthText; } @@ -241,10 +250,16 @@ class IndividualAttendanceDetailsState filteredData = getStaffData.where((item) { // final isActiveStatus = item['is_active'] == "1" ? "active" : "inactive"; - return (item['login_date'] ?? '-').toLowerCase().contains( + return (item['date'] ?? '-').toLowerCase().contains( query.toLowerCase(), ) || - (item['logout_date'] ?? '-').toLowerCase().contains( + (item['login_time'] ?? '-').toLowerCase().contains( + query.toLowerCase(), + ) || + (item['logout_time'] ?? '-').toLowerCase().contains( + query.toLowerCase(), + ) || + (item['no_of_logged_in_time'] ?? '-').toLowerCase().contains( query.toLowerCase(), ); }).toList(); @@ -401,7 +416,13 @@ class IndividualAttendanceDetailsState fileName: "staff_individual_attendance_list", data: filteredData, txt: !ResponsiveLayout.isMobile(context) ? true : false, - headers: ["id", "login_date", "logout_date"], + headers: [ + "id", + "date", + "login_time", + "logout_time", + 'no_of_logged_in_time', + ], ), ], ), @@ -417,11 +438,13 @@ class IndividualAttendanceDetailsState child: Row( children: [ Expanded(flex: 1, child: Text('S.No.', style: _headerStyle)), - Expanded(flex: 2, child: Text('Login Date', style: _headerStyle)), + Expanded(flex: 2, child: Text('Date', style: _headerStyle)), + Expanded(flex: 2, child: Text('Login', style: _headerStyle)), + Expanded(flex: 2, child: Text('Login Time', style: _headerStyle)), Expanded( flex: 2, - child: Text('Logout Date', style: _headerStyle), + child: Text('Number Of Hours', style: _headerStyle), ), ], ), @@ -479,14 +502,19 @@ class IndividualAttendanceDetailsState child: Row( children: [ Expanded(flex: 1, child: Text('$sno' ?? '-', style: _dataBold)), - Expanded( - flex: 2, - child: Text(item['login_date'] ?? '-', style: _dataBold), - ), + Expanded(flex: 2, child: Text(item['date'] ?? '-', style: _dataBold)), Expanded( flex: 2, - child: Text(item['logout_date'] ?? '-', style: _dataBold), + child: Text(item['login_time'] ?? '-', style: _dataBold), + ), + Expanded( + flex: 2, + child: Text(item['logout_time'] ?? '-', style: _dataBold), + ), + Expanded( + flex: 2, + child: Text(item['no_of_logged_in_time'] ?? '-', style: _dataBold), ), ], ), diff --git a/lib/presentation/screens/dashboard/dashboard.dart b/lib/presentation/screens/dashboard/dashboard.dart index d1d6421..825e82d 100644 --- a/lib/presentation/screens/dashboard/dashboard.dart +++ b/lib/presentation/screens/dashboard/dashboard.dart @@ -99,6 +99,7 @@ class _DashboardScreenState extends ConsumerState { } void refresh() { + print('___DASHBOARD___'); final prefmanagerid = ref.read(managerIdProvider); final prefuserid = ref.read(userIdProvider); final prefroleId = ref.read(userRoleProvider); @@ -579,7 +580,7 @@ class _DashboardScreenState extends ConsumerState { 0.69 //400 : (role == 'manager') ? MediaQuery.of(context).size.height * 0.5 - : (role == 'staff') + : (role == 'staff' || role == 'handler') ? MediaQuery.of(context).size.height * 0.85 : MediaQuery.of(context).size.height * 0.5, // 350 adjust height as needed @@ -595,6 +596,17 @@ class _DashboardScreenState extends ConsumerState { role: role!, ), ), + if (role == 'handler') ...[ + Expanded( + child: UnassignedEnq( + key: UniqueKey(), + title: "Unassigned Enquiries", + role: role, + data: unAssignedEnqList, + onRefresh: refresh, + ), + ), + ], ], ) : Row( @@ -720,7 +732,7 @@ class _DashboardScreenState extends ConsumerState { ), ), const SizedBox(height: 10), - if (role == 'manager' || role == 'handler') + if (role == 'manager') SizedBox( // ✅ replace Expanded height: 350, // adjust height as needed @@ -1222,7 +1234,7 @@ class othersPendings extends StatelessWidget { flex: 2, child: Text( // stringFlag + " Issued", - 'Num Of Enquiry Assigned', + 'Pending Enquiries', textAlign: TextAlign.center, style: _headerStyle, ), @@ -1251,15 +1263,15 @@ class othersPendings extends StatelessWidget { style: _headerStyle, ), ), - Expanded( - flex: 2, - child: Text( - // stringFlag + " Issued", - 'Policy Created', - textAlign: TextAlign.center, - style: _headerStyle, - ), - ), + // Expanded( + // flex: 2, + // child: Text( + // // stringFlag + " Issued", + // 'Policy Created', + // textAlign: TextAlign.center, + // style: _headerStyle, + // ), + // ), ], ), ), @@ -1357,15 +1369,15 @@ class othersPendings extends StatelessWidget { style: _tableDataStyle, ), ), - Expanded( - flex: 2, - child: Text( - row['policy_created'] ?? "", - // row['total_approval_pending'] ?? "", - textAlign: TextAlign.center, - style: _tableDataStyle, - ), - ), + // Expanded( + // flex: 2, + // child: Text( + // row['policy_created'] ?? "", + // // row['total_approval_pending'] ?? "", + // textAlign: TextAlign.center, + // style: _tableDataStyle, + // ), + // ), ], ), ); @@ -1726,15 +1738,29 @@ class UnassignedEnq extends StatelessWidget { // ), Expanded( child: Text( - "Vehicle Number", - textAlign: TextAlign.center, + "Date", + // textAlign: TextAlign.center, style: _headerStyle, ), ), Expanded( child: Text( - "Date", - textAlign: TextAlign.center, + "Partner Name", + // textAlign: TextAlign.center, + style: _headerStyle, + ), + ), + Expanded( + child: Text( + "Vehicle Number", + // textAlign: TextAlign.center, + style: _headerStyle, + ), + ), + Expanded( + child: Text( + "Insured Name", + // textAlign: TextAlign.center, style: _headerStyle, ), ), @@ -1782,7 +1808,7 @@ class UnassignedEnq extends StatelessWidget { onTap: (role == 'handler') ? () { // Print the id when row is clicked - print("Clicked ID: ${row['id']}"); + print("Clicked ID fd: ${row['id']}"); // You can also navigate or perform any action here showDialog( @@ -1814,20 +1840,6 @@ class UnassignedEnq extends StatelessWidget { ), child: Row( children: [ - Expanded( - child: Text( - row['reg_no'] ?? "", - textAlign: TextAlign.center, - style: _tableDataStyle, - ), - ), - Expanded( - child: Text( - '', // convert int to string - textAlign: TextAlign.center, - style: _tableDataStyle, - ), - ), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -1837,6 +1849,27 @@ class UnassignedEnq extends StatelessWidget { ], ), ), + Expanded( + child: Text( + row['agent_name'] ?? '', // convert int to string + // textAlign: TextAlign.center, + style: _tableDataStyle, + ), + ), + Expanded( + child: Text( + row['reg_no'] ?? "", + + style: _tableDataStyle, + ), + ), + Expanded( + child: Text( + row['insured_name'] ?? "", + + style: _tableDataStyle, + ), + ), ], ), ), diff --git a/lib/presentation/screens/handler/enquiryList.dart b/lib/presentation/screens/handler/enquiryList.dart index 2479b7a..20c66f6 100644 --- a/lib/presentation/screens/handler/enquiryList.dart +++ b/lib/presentation/screens/handler/enquiryList.dart @@ -111,7 +111,7 @@ class EnquiryHandlerState extends ConsumerState { } // ✅ Call your API - getStaffList(userId, roleId); + getStaffList(managerId, roleId); } void refrshfilterDateRange() { @@ -124,7 +124,7 @@ class EnquiryHandlerState extends ConsumerState { // Reset the FormField validation _formKey.currentState?.reset(); }); - getStaffList(userId, roleId); + getStaffList(managerId, roleId); } Future getStaffList( @@ -643,42 +643,6 @@ class EnquiryHandlerState extends ConsumerState { }, ), - // Form( - // key: _formKey, - // child: Row( - // mainAxisAlignment: MainAxisAlignment.start, - // crossAxisAlignment: CrossAxisAlignment.end, - // children: [ - // buildStartDate(context), - // SizedBox(width: 10), - // buildEndDate(context), - // SizedBox(width: 10), - // - // Padding( - // padding: const EdgeInsets.symmetric( - // vertical: 8.0, - // ), - // child: GestureDetector( - // // onTap: filterDateRange, - // onTap: () { - // if (_formKey.currentState!.validate()) { - // filterDateRange(); // only runs if valid - // } - // }, - // child: Icon(Icons.filter_alt_outlined), - // ), - // ), - // - // Padding( - // padding: const EdgeInsets.all(8.0), - // child: GestureDetector( - // onTap: refrshfilterDateRange, - // child: Icon(Icons.refresh), - // ), - // ), - // ], - // ), - // ), Spacer(), ], @@ -822,11 +786,11 @@ class EnquiryHandlerState extends ConsumerState { children: [ Expanded( flex: 2, - child: Text('Created Date', style: _headerStyle), + child: Text('Received Date', style: _headerStyle), ), Expanded( flex: 2, - child: Text('Updated Date', style: _headerStyle), + child: Text('Assigned Date', style: _headerStyle), ), Expanded( flex: 2, diff --git a/lib/presentation/screens/staff/Enquiry/enquiry_list.dart b/lib/presentation/screens/staff/Enquiry/enquiry_list.dart index 79d90da..ec5cd48 100644 --- a/lib/presentation/screens/staff/Enquiry/enquiry_list.dart +++ b/lib/presentation/screens/staff/Enquiry/enquiry_list.dart @@ -207,10 +207,17 @@ class EnquiryStaffState extends ConsumerState { val = 'Policy'; } - showDialog( + final result = await showDialog( context: context, + barrierDismissible: + false, // optional - prevents closing by tapping outside builder: (context) => TabEnquiryStaffList(showKey: val), ); + + // ✅ Code here runs *after* the dialog is closed + print("Dialog closed"); + print("Dialog result: $result"); + refresh(); } List get _paginatedData2 { diff --git a/lib/presentation/screens/staff/Enquiry/tabs/createQuotation.dart b/lib/presentation/screens/staff/Enquiry/tabs/createQuotation.dart index d15ae13..359754f 100644 --- a/lib/presentation/screens/staff/Enquiry/tabs/createQuotation.dart +++ b/lib/presentation/screens/staff/Enquiry/tabs/createQuotation.dart @@ -389,23 +389,23 @@ class CreateQuotationFormState extends ConsumerState { mainAxisSize: MainAxisSize.min, children: [ // Header row - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - widget.selectedQuotationFrmListId != null - ? 'Update Proposal' - : 'Create Proposal', - style: GoogleFonts.inter( - color: const Color(0xFF374141), - fontSize: 14, - fontWeight: FontWeight.w600, - ), - ), - ], - ), - - const SizedBox(height: 8), + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Text( + // widget.selectedQuotationFrmListId != null + // ? 'Update Proposal' + // : 'Create Proposal', + // style: GoogleFonts.inter( + // color: const Color(0xFF374141), + // fontSize: 14, + // fontWeight: FontWeight.w600, + // ), + // ), + // ], + // ), + // + // const SizedBox(height: 8), // 🔹 Switch content dynamically buildFormFields(context), diff --git a/lib/presentation/screens/staff/Enquiry/tabs/policyTab.dart b/lib/presentation/screens/staff/Enquiry/tabs/policyTab.dart index 32b4c07..6aa3644 100644 --- a/lib/presentation/screens/staff/Enquiry/tabs/policyTab.dart +++ b/lib/presentation/screens/staff/Enquiry/tabs/policyTab.dart @@ -477,10 +477,10 @@ class PolicyStaffTabState extends ConsumerState { print("Response: ${response.body}"); if (isUpdating) { - context.go(AppRoutes.policylist); + context.go(AppRoutes.enquiryForStaff); } else { ref.read(enquiryIdProvider.notifier).state = null; - context.go(AppRoutes.policylist); + context.go(AppRoutes.enquiryForStaff); } } else { print("❌ Submission failed. Status: ${response.statusCode}"); @@ -540,36 +540,37 @@ class PolicyStaffTabState extends ConsumerState { // const SizedBox(height: 20), //confirm button - // if (!hasPolicyData) - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - GestureDetector( - onTap: () { - handleSave(); - }, - child: Container( - padding: EdgeInsets.symmetric( - horizontal: 45.0, - vertical: 8, - ), + if (!hasPolicyData) ...[ + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + GestureDetector( + onTap: () { + handleSave(); + }, + child: Container( + padding: EdgeInsets.symmetric( + horizontal: 45.0, + vertical: 8, + ), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8.0), - color: Color(0xFF425B5B), - ), - child: Text( - 'Submit', - style: TextStyle( - color: Colors.white, - fontSize: 12, - fontWeight: FontWeight.w600, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.0), + color: Color(0xFF425B5B), + ), + child: Text( + 'Submit', + style: TextStyle( + color: Colors.white, + fontSize: 12, + fontWeight: FontWeight.w600, + ), ), ), ), - ), - ], - ), + ], + ), + ], ], ), ), @@ -1207,7 +1208,9 @@ class PolicyStaffTabState extends ConsumerState { hintText: selectedPDFFileNames ?? "Upload Document", txtwidth: ResponsiveLayout.isMobile(context) ? null - : MediaQuery.of(context).size.width * 0.13, + : (docUploadedPDFFileUrlFromApi != null) + ? MediaQuery.of(context).size.width * 0.15 + : MediaQuery.of(context).size.width * 0.175, // backgroundColor: Color(0xFFEDF6F5), onFileSelected: (fileName, file) { print("Picked file: $fileName (${file.size} bytes)"); @@ -1216,9 +1219,9 @@ class PolicyStaffTabState extends ConsumerState { }); }, ), - const SizedBox(width: 10), - if (docUploadedPDFFileUrlFromApi != null) + if (docUploadedPDFFileUrlFromApi != null) ...[ + const SizedBox(width: 10), Tooltip( message: 'Download', // color: Colors.white, @@ -1265,6 +1268,7 @@ class PolicyStaffTabState extends ConsumerState { // ], // ), ), + ], ], ), ], diff --git a/lib/presentation/screens/staff/Enquiry/tabs/quotationTab.dart b/lib/presentation/screens/staff/Enquiry/tabs/quotationTab.dart index 8c3123b..2777e4a 100644 --- a/lib/presentation/screens/staff/Enquiry/tabs/quotationTab.dart +++ b/lib/presentation/screens/staff/Enquiry/tabs/quotationTab.dart @@ -276,7 +276,6 @@ class QuotationStaffTabState extends ConsumerState { SizedBox(height: 20), ], - //(TABLE) Container( // color: Colors.green, decoration: BoxDecoration( @@ -285,8 +284,8 @@ class QuotationStaffTabState extends ConsumerState { ), width: MediaQuery.of(context).size.width, height: !blockKey - ? MediaQuery.of(context).size.height * 0.44 - : MediaQuery.of(context).size.height * 0.6, + ? MediaQuery.of(context).size.height * 0.4 + : MediaQuery.of(context).size.height * 0.55, padding: EdgeInsets.all(12.0), child: SingleChildScrollView( scrollDirection: Axis.vertical, diff --git a/lib/presentation/screens/staff/Enquiry/tabs/tab.dart b/lib/presentation/screens/staff/Enquiry/tabs/tab.dart index 9759fb3..82c52c4 100644 --- a/lib/presentation/screens/staff/Enquiry/tabs/tab.dart +++ b/lib/presentation/screens/staff/Enquiry/tabs/tab.dart @@ -11,8 +11,10 @@ import 'package:shared_preferences/shared_preferences.dart'; import '../../../../../core/routing/routes.dart'; import '../../../../../core/services/api_service.dart'; import '../../../../layouts/main_layout.dart'; +import '../../../../layouts/responsive_layout.dart'; import '../../../../providers/manager_provider.dart'; import '../../../../providers/quotation_staff_proivder.dart'; +import '../../../../themes/indicators/text_field_theme.dart'; class TabEnquiryStaffList extends ConsumerStatefulWidget { String? id; @@ -34,6 +36,10 @@ class TabEnquiryStaffListState extends ConsumerState { ScrollController _scrollController = ScrollController(); dynamic role; + dynamic selectedInsuredName; + dynamic selectedVehicleNum; + dynamic selectedVehicleType; + @override void initState() { super.initState(); @@ -77,13 +83,24 @@ class TabEnquiryStaffListState extends ConsumerState { Future _loadData(id, {int? tabIndex}) async { print('loadQuotationTab 2'); setState(() => isLoading = true); - // final response = await apiService.findEnqQuotePolicyView(id); - // print('loadQuotationTab 3 '); - + final response = await apiService.findEnqQuotePolicyView(id); + print('loadQuotationTab 3 '); + final data = response["data"]; setState(() { print('loadQuotationTab 4'); - // enquiryData = response["data"]; + print('loadQuotationTab enquiryData4 - $data'); isLoading = false; + + enquiryData = data; + + // ✅ Move these lines inside setState + selectedInsuredName = data['enquiry']?['name']; + selectedVehicleNum = data['enquiry']?['reg_no']; + selectedVehicleType = data['enquiry']?['vehicle_type']; + print( + 'loadQuotationTab 4s - $selectedInsuredName - $selectedVehicleNum - $selectedVehicleType', + ); + tabs = [ TabItem("Proposal", QuotationStaffTab()), // TabItem("Policy", PolicyStaffTab()), @@ -122,15 +139,15 @@ class TabEnquiryStaffListState extends ConsumerState { final bool isMobile = MediaQuery.of(context).size.width < 600; // final id = ref.watch(enquiryIdProvider); // - // print("TABUPDID- $id"); + // print("TABUPDID- $id") ; // // print('ENQID: $id'); return AlertDialog( backgroundColor: Colors.white, content: Container( - width: MediaQuery.of(context).size.width * 0.55, - height: MediaQuery.of(context).size.height * 0.7, + width: MediaQuery.of(context).size.width * 0.6, + height: MediaQuery.of(context).size.height * 0.8, child: isLoading ? const Center(child: CircularProgressIndicator()) @@ -149,62 +166,164 @@ class TabEnquiryStaffListState extends ConsumerState { Widget _buildDesktopTabs() { return Column( children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: List.generate(tabs.length, (index) { - final isSelected = selectedIndex == index; - return Padding( - padding: const EdgeInsets.only(left: 10.0), - child: ElevatedButton( - style: ElevatedButton.styleFrom( - elevation: 2, - backgroundColor: isSelected - ? const Color(0xFF425B5B) - : const Color(0xFFEDFFFC), - foregroundColor: isSelected - ? Colors.white - : Colors.black87, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(6), + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Enquiry Details', style: _headertextStyle), + GestureDetector( + onTap: () => Navigator.pop(context), + child: Container( + padding: const EdgeInsets.all(5.0), + decoration: BoxDecoration( + color: const Color(0xFFF1F1F1), + borderRadius: BorderRadius.circular(5.0), ), - padding: const EdgeInsets.symmetric( - horizontal: 24, - vertical: 12, + child: Tooltip( + message: 'Close', + child: const Icon(Icons.close, size: 18), ), ), - onPressed: () { - setState(() => selectedIndex = index); - }, - child: Text(tabs[index].title), ), - ); - }), - ), - - GestureDetector( - onTap: () => Navigator.pop(context), - child: Container( - padding: const EdgeInsets.all(5.0), - decoration: BoxDecoration( - color: const Color(0xFFF1F1F1), - borderRadius: BorderRadius.circular(5.0), + ], + ), + SizedBox(height: 10), + Container( + padding: const EdgeInsets.symmetric( + vertical: 6, + horizontal: 16, ), - child: Tooltip( - message: 'Close', - child: const Icon(Icons.close, size: 18), + decoration: BoxDecoration( + color: Color(0xffEDF6F5), + // color: Color(0xFFE0F7F9), + border: const Border( + bottom: BorderSide(color: Color(0xFFEAEAEA), width: 1), + ), + borderRadius: BorderRadius.circular(8), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + insured_name(context), + vehcile_num(context), + vehcile_Type(context), + SizedBox.shrink(), + ], ), ), - ), - ], + ], + ), ), + SizedBox(height: 10), + Row( + children: List.generate(tabs.length, (index) { + final isSelected = selectedIndex == index; + return Padding( + padding: const EdgeInsets.only(left: 10.0), + child: ElevatedButton( + style: ElevatedButton.styleFrom( + elevation: 2, + backgroundColor: isSelected + ? const Color(0xFF425B5B) + : const Color(0xFFEDFFFC), + foregroundColor: isSelected ? Colors.white : Colors.black87, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + padding: const EdgeInsets.symmetric( + horizontal: 24, + vertical: 12, + ), + ), + onPressed: () { + setState(() => selectedIndex = index); + }, + child: Text(tabs[index].title), + ), + ); + }), + ), SizedBox(height: 10), Expanded(child: tabs[selectedIndex].widget), ], ); } + + Widget insured_name(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Insured', style: _textStyle), + SizedBox(height: 10), + Text(selectedInsuredName ?? '', style: _textDataStyle), + + // ThemedFormField( + // controller: controllers['insurer']!, + // readOnly: true, + // txtwidth: ResponsiveLayout.isMobile(context) + // ? null + // : MediaQuery.of(context).size.width * 0.2, + // ), + ], + ); + } + + Widget vehcile_num(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Vehicle.No.', style: _textStyle), + SizedBox(height: 10), + Text(selectedVehicleNum ?? '', style: _textDataStyle), + + // ThemedFormField( + // controller: controllers['insurer']!, + // readOnly: true, + // txtwidth: ResponsiveLayout.isMobile(context) + // ? null + // : MediaQuery.of(context).size.width * 0.2, + // ), + ], + ); + } + + Widget vehcile_Type(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Vehicle Type', style: _textStyle), + SizedBox(height: 10), + Text(selectedVehicleType ?? '', style: _textDataStyle), + // ThemedFormField( + // controller: controllers['insurer']!, + // readOnly: true, + // txtwidth: ResponsiveLayout.isMobile(context) + // ? null + // : MediaQuery.of(context).size.width * 0.2, + // ), + ], + ); + } + + static final _textStyle = GoogleFonts.inter( + fontSize: 12, + fontWeight: FontWeight.w500, + ); + static final _textDataStyle = GoogleFonts.inter( + fontSize: 12, + fontWeight: FontWeight.w600, + ); + + static final _headertextStyle = GoogleFonts.inter( + fontSize: 14, + fontWeight: FontWeight.w700, + color: const Color(0xFF425B5B), + ); } class TabItem { diff --git a/lib/presentation/screens/staff/assignStaff.dart b/lib/presentation/screens/staff/assignStaff.dart index d9e8e75..a159a44 100644 --- a/lib/presentation/screens/staff/assignStaff.dart +++ b/lib/presentation/screens/staff/assignStaff.dart @@ -289,7 +289,7 @@ class _AddDialogState extends ConsumerState { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - 'Assign Vehicle Policy', + 'Assign Enquiry To Staff', style: GoogleFonts.inter( color: const Color(0xFF374141), fontSize: 18, @@ -338,7 +338,7 @@ class _AddDialogState extends ConsumerState { color: const Color(0xFF425B5B), ), child: const Text( - 'Assign Policy', + 'Assign', style: TextStyle(color: Colors.white), ), ), diff --git a/lib/presentation/themes/indicators/text_field_theme.dart b/lib/presentation/themes/indicators/text_field_theme.dart index d1ff67d..efa2cdf 100644 --- a/lib/presentation/themes/indicators/text_field_theme.dart +++ b/lib/presentation/themes/indicators/text_field_theme.dart @@ -157,3 +157,16 @@ class ThemedFormField extends HookWidget { ); } } + +class UpperCaseTextFormatter extends TextInputFormatter { + @override + TextEditingValue formatEditUpdate( + TextEditingValue oldValue, + TextEditingValue newValue, + ) { + return TextEditingValue( + text: newValue.text.toUpperCase(), + selection: newValue.selection, + ); + } +} diff --git a/lib/presentation/widgets/custom_month_filter.dart b/lib/presentation/widgets/custom_month_filter.dart index 27564b2..00e8409 100644 --- a/lib/presentation/widgets/custom_month_filter.dart +++ b/lib/presentation/widgets/custom_month_filter.dart @@ -98,9 +98,9 @@ class MonthFilterRow extends StatelessWidget { value == null || value.isEmpty ? "Month is required" : null, borderColor: Colors.grey.shade100, controller: monthController, - onDateSelected: (date) { - monthController.text = DateFormat('MM-yyyy').format(date); - }, + // onDateSelected: (date) { + // monthController.text = DateFormat('MM-yyyy').format(date); + // }, ), ], );