From 0054bfeb3076c30a978d6177d29ce2f3bbf3dd8e Mon Sep 17 00:00:00 2001 From: venbaittech Date: Mon, 8 Dec 2025 18:22:08 +0530 Subject: [PATCH] chart fixes --- .flutter-plugins-dependencies | 2 +- .../screens/dashboard/dashboard.dart | 2 +- .../screens/dashboard/tabs/bussiness.dart | 2 +- .../screens/dashboard/tabs/partner.dart | 34 ++- .../Proposal_QuickCreation.dart | 45 ++- .../staff/Enquiry/enquiry_inline_list.dart | 106 +++---- .../screens/staff/Enquiry/raise_enq_form.dart | 19 ++ .../screens/staff/policy/policy.dart | 38 --- .../screens/staff/policy/policy_list.dart | 273 +++--------------- lib/presentation/themes/charts/barChart.dart | 2 +- 10 files changed, 171 insertions(+), 352 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 3ad3ac3..560ec9f 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.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","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.2.1/","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.7/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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.31/","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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","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.2.1/","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.19/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.13/","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.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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.2.1/","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.7/","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.2/","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.7/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","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.5/","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.7/","dependencies":[],"dev_dependency":false},{"name":"firebase_auth_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth_web-6.1.0/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core_web-3.3.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.1.0/","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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_web-1.1.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_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":"fluttertoast","dependencies":[]},{"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-12-06 18:42:23.897708","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.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","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.2.1/","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.7/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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.31/","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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","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.2.1/","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.19/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.13/","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.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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.2.1/","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.7/","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.2/","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.7/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","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.5/","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.7/","dependencies":[],"dev_dependency":false},{"name":"firebase_auth_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth_web-6.1.0/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core_web-3.3.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.1.0/","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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_web-1.1.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_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":"fluttertoast","dependencies":[]},{"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-12-08 18:19:11.351183","version":"3.32.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/lib/presentation/screens/dashboard/dashboard.dart b/lib/presentation/screens/dashboard/dashboard.dart index b66a4c1..dc39ff3 100644 --- a/lib/presentation/screens/dashboard/dashboard.dart +++ b/lib/presentation/screens/dashboard/dashboard.dart @@ -1308,7 +1308,7 @@ class othersPendings extends StatelessWidget { flex: 2, child: Text( "Staff Name", - textAlign: TextAlign.center, + textAlign: TextAlign.left, style: _headerStyle, ), ), diff --git a/lib/presentation/screens/dashboard/tabs/bussiness.dart b/lib/presentation/screens/dashboard/tabs/bussiness.dart index d7d79d1..3d6f20b 100644 --- a/lib/presentation/screens/dashboard/tabs/bussiness.dart +++ b/lib/presentation/screens/dashboard/tabs/bussiness.dart @@ -276,7 +276,7 @@ class _BussinessDashboardState extends ConsumerState { children: [ Row( crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.center, // mainAxisSize: MainAxisSize.min, children: [ Text('Hide and Show Charts : ', style: _styleSmall1), diff --git a/lib/presentation/screens/dashboard/tabs/partner.dart b/lib/presentation/screens/dashboard/tabs/partner.dart index 8738646..363f5e6 100644 --- a/lib/presentation/screens/dashboard/tabs/partner.dart +++ b/lib/presentation/screens/dashboard/tabs/partner.dart @@ -495,13 +495,23 @@ class _PerformanceState extends State { child: Row( children: [ Expanded( + flex: 1, child: Text( - "Partner Name", - textAlign: TextAlign.center, + "S.NO", + textAlign: TextAlign.left, style: _headerStyle, ), ), Expanded( + flex: 2, + child: Text( + "Partner Name", + textAlign: TextAlign.left, + style: _headerStyle, + ), + ), + Expanded( + flex: 1, child: Text( "Partner Code", textAlign: TextAlign.center, @@ -511,10 +521,11 @@ class _PerformanceState extends State { (widget.title == 'Performing Partner') ? Expanded( + flex: 1, child: Text( widget.isPerfomingAgntPolicy - ? "Policy count" - : "Premium count", + ? "Policy Count" + : "Premium Count", textAlign: TextAlign.center, style: _headerStyle, @@ -551,13 +562,23 @@ class _PerformanceState extends State { child: Row( children: [ Expanded( + flex: 1, child: Text( - row['agent_name'] ?? "", - textAlign: TextAlign.center, + (index + 1).toString(), + textAlign: TextAlign.left, style: _tableDataStyle, ), ), Expanded( + flex: 2, + child: Text( + row['agent_name'] ?? "", + textAlign: TextAlign.left, + style: _tableDataStyle, + ), + ), + Expanded( + flex: 1, child: Text( row['agent_code'] ?? "", textAlign: TextAlign.center, @@ -567,6 +588,7 @@ class _PerformanceState extends State { (widget.title == 'Performing Partner') ? Expanded( + flex: 1, child: Text( isPerfomingAgntPolicy ? (row['policy_count']?.toString() ?? "0") diff --git a/lib/presentation/screens/staff/Enquiry/Proposal_QuickCreation/Proposal_QuickCreation.dart b/lib/presentation/screens/staff/Enquiry/Proposal_QuickCreation/Proposal_QuickCreation.dart index 669f31f..54f8a0b 100644 --- a/lib/presentation/screens/staff/Enquiry/Proposal_QuickCreation/Proposal_QuickCreation.dart +++ b/lib/presentation/screens/staff/Enquiry/Proposal_QuickCreation/Proposal_QuickCreation.dart @@ -128,6 +128,7 @@ class CreateProposal_QuickFormState dynamic managerId; bool isSingleSave = false; + bool _isResetting = false; List> quotationList = []; @@ -205,7 +206,7 @@ class CreateProposal_QuickFormState getInsuranceType(); getPaymentMode(); getInsurers(); - updateData(); + getBroker(); } @@ -253,7 +254,15 @@ class CreateProposal_QuickFormState void reset() { print('RESET'); + + _isResetting = true; + print('_isResetting : $_isResetting'); + + controllers['regNo']!.clear(); _formKey.currentState?.reset(); + + fieldErrors.clear(); + // Clear all TextEditingControllers for (var controller in controllers.values) { controller.clear(); @@ -282,6 +291,9 @@ class CreateProposal_QuickFormState // Trigger UI update setState(() {}); + Future.delayed(Duration(milliseconds: 100), () { + _isResetting = false; // ✅ safe to enable again + }); } Future getQuickQuotationList(int managerId) async { @@ -384,7 +396,7 @@ class CreateProposal_QuickFormState } } - void updateData() {} + void refresh() {} Future getInsurers() async { print('Insurers called'); @@ -1350,19 +1362,26 @@ class CreateProposal_QuickFormState FilteringTextInputFormatter.allow(RegExp(r'[A-Za-z0-9- ]')), ], onChanged: (val) async { + if (_isResetting) { + print("Skipping API because _isResetting = true"); + return; + } print('Vehicle - $val'); - final res = await apiService.CheckDuplicate(context, val); - print('Vehicle res- $res'); - if (res["message"] != null && res["message"] != "") { - ToastHelper.showErrorToast(context, res['message']); - setState(() { - fieldErrors['regNo'] = res['message']; // store API message - }); // 🔥 store backend message - } else { - setState(() { - fieldErrors['regNo'] = res['message']; // store API message - }); + if (val != null) { + final res = await apiService.CheckDuplicate(context, val); + print('Vehicle res- $res'); + + if (res["message"] != null && res["message"] != "") { + ToastHelper.showErrorToast(context, res['message']); + setState(() { + fieldErrors['regNo'] = res['message']; // store API message + }); // 🔥 store backend message + } else { + setState(() { + fieldErrors['regNo'] = res['message']; // store API message + }); + } } }, validator: (value) { diff --git a/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart b/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart index ade18ef..f72bc4c 100644 --- a/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart +++ b/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart @@ -140,6 +140,7 @@ class EnquiryStaffState extends ConsumerState { String? selectedId; int selectedIndex = 0; + int autoRefreshIndex = 0; final List enquiryTabs = ["In Progress", "Completed"]; @@ -379,6 +380,8 @@ class EnquiryStaffState extends ConsumerState { SelectedStatus: SelectedStatus ?? '', SelectedStaffId: SelectedStaffId ?? '', ); + autoRefreshIndex = selectedIndex; + print('autoRefreshIndex - $autoRefreshIndex'); _searchStaffController.clear(); print('refrshfilterDateRange 2'); } @@ -609,7 +612,7 @@ class EnquiryStaffState extends ConsumerState { final yesterday = today.subtract(Duration(days: 1)); - fromDt = dateFormat.format(yesterday.subtract(Duration(days: 15))); + fromDt = dateFormat.format(yesterday.subtract(Duration(days: 5))); toDt = dateFormat.format(yesterday); print('PrevPending FROM TO - $fromDt - $toDt'); @@ -632,15 +635,38 @@ class EnquiryStaffState extends ConsumerState { print("ENQ LIST PAGE"); final today = DateTime.now(); - fromDt = dateFormat.format(today.subtract(Duration(days: 15))); + fromDt = dateFormat.format(today.subtract(Duration(days: 5))); // fromDt = dateFormat.format(today); toDt = dateFormat.format(today); print('Enq FROM TO - $fromDt - $toDt'); } else { + print('Enq 1- $fromDt - $toDt'); fromDt = fromDateVal; toDt = toDateVal; } + print('Enq 2- $fromDt - $toDt'); + String finalStatus = SelectedStatus; + print('finalStatus1 - $finalStatus'); + + // if ((finalStatus != '') && + // (SelectedStatus != 'Completed') && + // (autoRefreshIndex == 0)) { + // finalStatus = 'OtherThenCompleted'; + // print('finalSt1 - $finalStatus'); + // } else if (SelectedStatus == 'Completed' || autoRefreshIndex == 1) { + // finalStatus = 'Completed'; + // print('finalSt2 - $finalStatus'); + // } else if (SelectedStatus == 'PrevPending') { + // finalStatus = ''; + // print('finalSt3 - $finalStatus'); + // } else { + // finalStatus = 'OtherThenCompleted'; + // print('finalSt4 - $finalStatus'); + // // finalStatus = SelectedStatus; // keep original + // } + // print('finalStatus2 - $finalStatus'); + // print('DAJJshA79SelectedStatus - $SelectedStatus'); try { final response = await apiService.fetchEnquiryList( @@ -649,6 +675,9 @@ class EnquiryStaffState extends ConsumerState { role, fromDate: fromDt, toDate: toDt, + // selectedStatus: (finalStatus != '' && finalStatus != 'PrevPending') + // ? finalStatus + // : '', selectedStatus: (SelectedStatus != '' && SelectedStatus != 'PrevPending') ? SelectedStatus @@ -665,10 +694,12 @@ class EnquiryStaffState extends ConsumerState { print('ToDate : $toDate'); setState(() { - if (SelectedStatus == 'Completed') { + if (SelectedStatus == 'Completed' || autoRefreshIndex == 1) { selectedIndex = 1; + SelectedStatus = 'Completed'; } else { selectedIndex = 0; + SelectedStatus = 'OtherThenCompleted'; } controllers['startDate']?.text = fromDate; controllers['endDate']?.text = toDate; @@ -3548,61 +3579,6 @@ class EnquiryStaffState extends ConsumerState { return grouped; } - // Map>> get _groupedEnquiries { - // final grouped = >>{}; - // - // // Initialize all status groups - // // grouped['Awaiting Proposal'] = []; - // // grouped['Proposal Created'] = []; - // // grouped['Proposal Accepted'] = []; - // // grouped['Proposal Rejected'] = []; - // // grouped['Policy Created'] = []; - // // grouped['Awaiting Payment'] = []; - // - // // Initialize only the groups you need - // // grouped['Awaiting Proposal'] = []; - // // grouped['Proposal Created'] = []; - // // grouped['Policy Created'] = []; - // - // grouped['To be assigned'] = []; - // grouped['Assigned'] = []; - // grouped['In progress'] = []; - // - // // Group the filtered/paginated data by status - // // for (var item in _paginatedData) { - // // final status = item['status']?.toString() ?? 'Unknown'; - // // if (grouped.containsKey(status)) { - // // grouped[status]!.add(item); - // // } - // // } - // - // for (var item in filteredData) { - // // final status = item['status']?.toString() ?? 'Unknown'; - // final status = item['enquiry_status']?.toString() ?? 'Unknown'; - // - // // Map actual status to grouped status - // final groupKey = statusGroupMap[status]; - // - // if (groupKey != null) { - // grouped[groupKey]!.add(item); - // } - // } - // - // // for (var item in _paginatedData) { - // // // final status = item['status']?.toString() ?? 'Unknown'; - // // final status = item['enquiry_status']?.toString() ?? 'Unknown'; - // // - // // // Map actual status to grouped status - // // final groupKey = statusGroupMap[status]; - // // - // // if (groupKey != null) { - // // grouped[groupKey]!.add(item); - // // } - // // } - // - // return grouped; - // } - Map _getStatusConfig(String status) { switch (status) { case 'Awaiting Proposal': @@ -3947,8 +3923,8 @@ class EnquiryStaffState extends ConsumerState { int.tryParse(id.toString()) != null && int.parse(id.toString()) > 1000000000000; - print('idPrimary - $idPrimary'); - print('isNewRow - $isNewRow'); + // print('idPrimary - $idPrimary'); + // print('isNewRow - $isNewRow'); final editing = isEditingRow[id] ?? false; final controllers = rowControllers[id]; @@ -5277,6 +5253,16 @@ class EnquiryStaffState extends ConsumerState { onTap: () { setState(() { selectedIndex = index; + + if (selectedIndex == '1') { + getStaffList( + managerId, + roleId, + SelectedStatus: 'Completed', + ); + } else { + getStaffList(managerId, roleId); + } }); }, child: AnimatedContainer( diff --git a/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart b/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart index 06230ea..dd80d13 100644 --- a/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart +++ b/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart @@ -37,6 +37,8 @@ class RaiseEnqFormState extends ConsumerState { final _formKey = GlobalKey(); Map fieldErrors = {}; + bool _isResetting = false; + Map controllers = {}; List tabHeader = [ 'startDate', @@ -180,6 +182,15 @@ class RaiseEnqFormState extends ConsumerState { } void resetFormFields() { + _isResetting = true; + print('_isResetting : $_isResetting'); + ; + + controllers['regNo']!.clear(); + _formKey.currentState?.reset(); + + fieldErrors.clear(); + // 1. Reset all text controllers controllers.forEach((key, controller) { controller.clear(); @@ -196,6 +207,10 @@ class RaiseEnqFormState extends ConsumerState { _formKey.currentState?.reset(); setState(() {}); + + Future.delayed(Duration(milliseconds: 100), () { + _isResetting = false; // ✅ safe to enable again + }); } Future getVehicleType() async { @@ -812,6 +827,10 @@ class RaiseEnqFormState extends ConsumerState { ], // validator: (value) => Validators.requiredField(value, "regNo"), onChanged: (val) async { + if (_isResetting) { + print("Skipping API because _isResetting = true"); + return; + } print('Vehicle - $val'); final res = await apiService.CheckDuplicate(context, val); print('Vehicle res- $res'); diff --git a/lib/presentation/screens/staff/policy/policy.dart b/lib/presentation/screens/staff/policy/policy.dart index 482f7fe..d164f91 100644 --- a/lib/presentation/screens/staff/policy/policy.dart +++ b/lib/presentation/screens/staff/policy/policy.dart @@ -724,44 +724,6 @@ class PolicyScreenState extends ConsumerState { ); } - Widget _readonlyField(String label, String value) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - label, - style: GoogleFonts.inter(fontSize: 13, fontWeight: FontWeight.w600), - ), - const SizedBox(height: 6), - Container( - padding: const EdgeInsets.symmetric(horizontal: 60, vertical: 14), - decoration: BoxDecoration( - color: Colors.red, - borderRadius: BorderRadius.circular(6), - border: Border.all(color: Colors.grey.shade300), - ), - child: Text(value, style: GoogleFonts.inter(fontSize: 14)), - ), - ], - ); - } - - Widget _downloadButton(String label) { - return ElevatedButton.icon( - style: ElevatedButton.styleFrom( - backgroundColor: const Color(0xFF425B5B), - foregroundColor: Colors.white, - padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)), - ), - onPressed: () { - // TODO: file download logic - }, - icon: const Icon(Icons.download, size: 18), - label: Text(label, style: GoogleFonts.inter(fontSize: 13)), - ); - } - Widget buildDocRC(BuildContext context, bool isMobile) { return GestureDetector( onTap: () { diff --git a/lib/presentation/screens/staff/policy/policy_list.dart b/lib/presentation/screens/staff/policy/policy_list.dart index ba72e7c..00d586a 100644 --- a/lib/presentation/screens/staff/policy/policy_list.dart +++ b/lib/presentation/screens/staff/policy/policy_list.dart @@ -90,13 +90,33 @@ class policylistState extends ConsumerState { setState(() { isLoading = true; }); + dynamic fromDt; + dynamic toDt; + final dateFormat = DateFormat('dd-MM-yyyy'); + final today = DateTime.now(); + final fromDateVal = controllers['startDate']?.text ?? ''; + final toDateVal = controllers['endDate']?.text ?? ''; + + if (fromDateVal == '' && toDateVal == '') { + print("ENQ LIST PAGE"); + + final today = DateTime.now(); + fromDt = dateFormat.format(today.subtract(Duration(days: 15))); + // fromDt = dateFormat.format(today); + toDt = dateFormat.format(today); + + print('Enq FROM TO - $fromDt - $toDt'); + } else { + fromDt = fromDateVal; + toDt = toDateVal; + } try { final response = await apiService.fetchPolicyDataOnlyList( managerId, role, - fromDate: controllers['startDate']?.text ?? '', - toDate: controllers['endDate']?.text ?? '', + fromDate: fromDt, + toDate: toDt, selectedStaffId: SelectedStaffId ?? '', ); @@ -211,6 +231,9 @@ class policylistState extends ConsumerState { (item['insurer_name'] ?? '-').toLowerCase().contains( query.toLowerCase(), ) || + (item['insurer_short_name'] ?? '-').toLowerCase().contains( + query.toLowerCase(), + ) || (item['assigned_to_name'] ?? '-').toLowerCase().contains( query.toLowerCase(), ) || @@ -220,7 +243,7 @@ class policylistState extends ConsumerState { (item['premium_amount'] ?? '-').toLowerCase().contains( query.toLowerCase(), ) || - (item['payment_mode'] ?? '-').toLowerCase().contains( + (item['payment_mode_value'] ?? '-').toLowerCase().contains( query.toLowerCase(), ) || (_formatDate(item['updated_on']) ?? '-').toLowerCase().contains( @@ -247,125 +270,6 @@ class policylistState extends ConsumerState { } } - List _buildPopupMenuActions( - BuildContext context, - dynamic data, - id, - regNum, - ) { - return [ - // if (roleId == 'manager') ...[ - // Material( - // color: Colors.transparent, - // child: InkWell( - // onTap: () { - // Navigator.pop(context); - // showDialog( - // context: context, - // builder: (ctx) => AssignStaffDialog( - // enquiryPrimaryId: id, - // regNum: regNum, - // userId: userId, - // onSubmit: (value) { - // debugPrint("New assignY: $value"); - // refresh(); - // }, - // ), - // ); - // }, - // hoverColor: Color(0xFFE3F1F0), - // splashColor: Color(0xFFE3F1F0), - // borderRadius: BorderRadius.circular(6), - // child: Padding( - // padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), - // child: Row( - // // mainAxisSize: MainAxisSize.min, - // children: [ - // Image.asset( - // "assets/miscellaneous/image_3.png", - // // height: 45, - // // width: 15, - // ), - // - // SizedBox(width: 10), - // Text('Assign Staff'), - // ], - // ), - // ), - // ), - // ), - // ], - Material( - color: Colors.transparent, - child: InkWell( - onTap: () { - Navigator.pop(context); - ref.read(quotationStaffIdProvider.notifier).state = id; - context.go(AppRoutes.quotation); - }, - hoverColor: Color(0xFFE3F1F0), - splashColor: Color(0xFFE3F1F0), - borderRadius: BorderRadius.circular(6), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), - child: Row( - // mainAxisSize: MainAxisSize.min, - children: [ - Tooltip( - message: "Close", - child: Image.asset( - "assets/miscellaneous/image_1.png", - height: 15, - width: 15, - ), - ), - const SizedBox(width: 10), - ((data['status'] == 'Policy Created') || - (data['status'] == 'Quotation Accepted')) - ? const Text('View Quotation') - : const Text('Create Quotation'), - ], - ), - ), - ), - ), - - if (data['status'] == 'Quotation Accepted' || - data['status'] == 'Policy Created') - Material( - color: Colors.transparent, - child: InkWell( - onTap: () { - Navigator.pop(context); - ref.read(quotationStaffIdProvider.notifier).state = id; - context.go(AppRoutes.policy); - }, - hoverColor: Color(0xFFE3F1F0), - splashColor: Color(0xFFE3F1F0), - borderRadius: BorderRadius.circular(6), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), - child: Row( - // mainAxisSize: MainAxisSize.min, - children: [ - Image.asset( - "assets/miscellaneous/image_2.png", - height: 15, - width: 15, - ), - - const SizedBox(width: 10), - data['status'] == 'Policy Created' - ? Text('View Policy') - : Text('Create Policy'), - ], - ), - ), - ), - ), - ]; - } - @override Widget build(BuildContext context) { return MainLayout( @@ -388,24 +292,6 @@ class policylistState extends ConsumerState { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start, children: [ - // Tooltip( - // message: 'Back', - // child: IconButton( - // icon: const Icon( - // Icons.arrow_left_sharp, - // size: 18, - // color: Color(0xFF425B5B), - // ), - // onPressed: () { - // context.go(AppRoutes.dashboard); - // }, - // splashRadius: 18, - // hoverColor: Colors.black12, - // padding: const EdgeInsets.all(4), - // constraints: const BoxConstraints(), - // ), - // ), - // const SizedBox(width: 5), // spacing between icon and text Text( "Policy", style: GoogleFonts.poppins( @@ -536,42 +422,6 @@ class policylistState 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(), ], ResponsiveLayout.isMobile(context) @@ -612,53 +462,14 @@ class policylistState extends ConsumerState { // "updated_on", "assigned_to_name", "agent_name", - "insurer_name", + "insurer_short_name", "reg_no", "insured_name", "premium_amount", - "payment_mode", + "payment_mode_value", "policy_number", ], ), - - // SizedBox(width: 10), - // GestureDetector( - // onTap: () { - // // print('Export'); - // }, - // child: Container( - // padding: EdgeInsets.all(8.0), - // decoration: BoxDecoration( - // color: Color(0xFF425B5B), - // borderRadius: BorderRadius.circular(8.0), - // ), - // child: Row( - // mainAxisSize: MainAxisSize.min, - // children: [ - // Icon(Icons.add, color: Colors.white), - // - // if (!ResponsiveLayout.isMobile(context)) ...[ - // SizedBox(width: 10), - // - // GestureDetector( - // onTap: () { - // // context.go(AppRoutes.agent / create); - // context.go('/staff/create'); - // }, - // child: Text( - // 'Create New Staff', - // style: GoogleFonts.inter( - // color: Colors.white, - // fontWeight: FontWeight.w600, - // fontSize: 14, - // ), - // ), - // ), - // ], - // ], - // ), - // ), - // ), ], ), ), @@ -682,20 +493,20 @@ class policylistState extends ConsumerState { child: Text('Assigned To', style: _headerStyle), ), - Expanded(flex: 2, child: Text('Partner', style: _headerStyle)), - Expanded(flex: 4, child: Text('Insurer', style: _headerStyle)), + Expanded(flex: 3, child: Text('Partner', style: _headerStyle)), + Expanded(flex: 2, child: Text('Insurer', style: _headerStyle)), Expanded( - flex: 3, + flex: 2, child: Text('Vehicle.No.', style: _headerStyle), ), Expanded( flex: 3, child: Text('Insured Name', style: _headerStyle), ), - Expanded(flex: 3, child: Text('Premium', style: _headerStyle)), + Expanded(flex: 2, child: Text('Premium', style: _headerStyle)), Expanded( - flex: 3, + flex: 2, child: Text('Payment Mode', style: _headerStyle), ), Expanded( @@ -703,7 +514,7 @@ class policylistState extends ConsumerState { child: Text('Policy Number', style: _headerStyle), ), - Expanded(flex: 3, child: Text('Action', style: _headerStyle)), + Expanded(flex: 2, child: Text('Action', style: _headerStyle)), ], ), ), @@ -820,21 +631,21 @@ class policylistState extends ConsumerState { child: Text(item['assigned_to_name'] ?? '-', style: _dataBold), ), Expanded( - flex: 2, + flex: 3, child: Text(item['agent_name'] ?? '-', style: _dataBold), ), Expanded( - flex: 4, + flex: 2, child: Text( - item['insurer_name'] ?? '-', + item['insurer_short_name'] ?? '-', style: _dataBold, softWrap: true, maxLines: 3, ), ), Expanded( - flex: 3, + flex: 2, child: Text(item['reg_no'] ?? '-', style: _dataBold), ), Expanded( @@ -847,7 +658,7 @@ class policylistState extends ConsumerState { ), ), Expanded( - flex: 3, + flex: 2, child: Text( item['premium_amount'] ?? '-', style: _dataBold, @@ -856,9 +667,9 @@ class policylistState extends ConsumerState { ), ), Expanded( - flex: 3, + flex: 2, child: Text( - item['payment_mode'] ?? '-', + item['payment_mode_value'] ?? '-', style: _dataBold, softWrap: true, maxLines: 3, @@ -874,7 +685,7 @@ class policylistState extends ConsumerState { ), ), Expanded( - flex: 3, + flex: 2, child: Row( children: [ Tooltip( diff --git a/lib/presentation/themes/charts/barChart.dart b/lib/presentation/themes/charts/barChart.dart index 91c7c1a..77f7dc9 100644 --- a/lib/presentation/themes/charts/barChart.dart +++ b/lib/presentation/themes/charts/barChart.dart @@ -54,7 +54,7 @@ class _CustomBarChartState extends State { barRods: [ BarChartRodData(toY: value1, color: Colors.cyan.shade300, width: 6), // BarChartRodData(toY: 2, color: Colors.orange.shade300, width: 6), - BarChartRodData(toY: value2, color: widget.shadowColor, width: 6), + BarChartRodData(toY: value2, color: Colors.orange.shade300, width: 6), ], showingTooltipIndicators: touchedGroupIndex == x ? [0] : [], );