diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 7d480df..c72f293 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":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"fluttertoast","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_ios-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.30/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"fluttertoast","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/google_sign_in_android-7.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_android","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_android-1.0.6/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/path_provider_android-2.2.18/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_mac-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_linux","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_linux","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_linux-0.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_windows","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_windows","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/local_auth_windows-1.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_windows","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_windows-0.0.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","dependencies":[],"dev_dependency":false},{"name":"firebase_app_check_web","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_auth_web-6.0.2/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_core_web-3.1.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.0.1/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"flutter_secure_storage_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false},{"name":"fluttertoast","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/google_sign_in_web-1.0.0/","dependencies":[],"dev_dependency":false},{"name":"open_file_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_web-0.0.4/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","dependencies":[],"dev_dependency":false},{"name":"shared_preferences_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/Users/venbateam/.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":"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-11-20 11:03:06.002014","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}} +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"fluttertoast","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_ios-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.30/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"fluttertoast","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/google_sign_in_android-7.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_android","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_android-1.0.6/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/path_provider_android-2.2.18/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_mac-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/venbateam/.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":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_linux","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_linux","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_linux-0.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_windows","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_windows","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/local_auth_windows-1.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_windows","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_windows-0.0.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"connectivity_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","dependencies":[],"dev_dependency":false},{"name":"firebase_app_check_web","path":"/Users/venbateam/.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":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_auth_web-6.0.2/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_core_web-3.1.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.0.1/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"flutter_secure_storage_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false},{"name":"fluttertoast","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/google_sign_in_web-1.0.0/","dependencies":[],"dev_dependency":false},{"name":"open_file_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/open_file_web-0.0.4/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","dependencies":[],"dev_dependency":false},{"name":"shared_preferences_web","path":"/Users/venbateam/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/Users/venbateam/.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":"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-11-24 15:23:39.340066","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/lib/presentation/layouts/appheader.dart b/lib/presentation/layouts/appheader.dart index 99a6943..1df86c0 100644 --- a/lib/presentation/layouts/appheader.dart +++ b/lib/presentation/layouts/appheader.dart @@ -206,7 +206,7 @@ class _AppHeaderState extends ConsumerState { Spacer(), // Dashboard - if (roleId != 'staff') ...[ + if (roleId != 'staff' && role != 'admin') ...[ _buildMenuItem( icon: Icons.dashboard, label: "Dashboard", @@ -221,6 +221,7 @@ class _AppHeaderState extends ConsumerState { ], // Enquiry + if (role != 'admin') ...[ _buildMenuItem( icon: Icons.list_alt_rounded, label: "Enquiry", @@ -234,11 +235,12 @@ class _AppHeaderState extends ConsumerState { } }, ), + ], const SizedBox(width: 8), // User (Manager Only) - with hover popup - if (roleId == 'manager') ...[ + if (roleId == 'manager' || role == 'admin') ...[ _buildHoverMenuItem( icon: Icons.person_add_alt, label: "User", diff --git a/lib/presentation/screens/Masters/Brokers/broker.dart b/lib/presentation/screens/Masters/Brokers/broker.dart index adfb291..407c78a 100644 --- a/lib/presentation/screens/Masters/Brokers/broker.dart +++ b/lib/presentation/screens/Masters/Brokers/broker.dart @@ -180,45 +180,45 @@ class BrokerState extends ConsumerState { ); if (response.statusCode == 200) { + final responseBody = jsonDecode(response.body); + final message = responseBody['message']; print("Broker submitted successfully!"); print("Response: ${response.body}"); - refresh(); - isUpdating - ? ToastHelper.showSuccessToast( - context, - 'Broker Updated Successfully', - ) - : ToastHelper.showSuccessToast( - context, - 'Broker Created Successfully', + if(responseBody['status'] == 200){ + refresh(); + isUpdating + ? ToastHelper.showSuccessToast( + context,message + ) + : ToastHelper.showSuccessToast( + context,message, + ); + } else { + + print("Failed to submit plan. Status: ${response.statusCode}"); + print("Error: ${response.body}"); + + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: Text("Broker Creation Failed"), + content: Text(message), + actions: [ + TextButton( + child: Text("OK"), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], ); + }, + ); + } } else if (response.statusCode == 403) { await apiService.clearLocalStorageAndRedirect(); - } else { - final responseBody = jsonDecode(response.body); - dynamic msg = responseBody['data']; - - print("Failed to submit plan. Status: ${response.statusCode}"); - print("Error: ${response.body}"); - - showDialog( - context: context, - builder: (BuildContext context) { - return AlertDialog( - title: Text("Broker Creation Failed"), - content: Text(msg), - actions: [ - TextButton( - child: Text("OK"), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - ], - ); - }, - ); } } catch (e) { print(" Error submitting Staff: $e"); diff --git a/lib/presentation/screens/Masters/PaymentMode/payment.dart b/lib/presentation/screens/Masters/PaymentMode/payment.dart index aa0ab7f..e956b25 100644 --- a/lib/presentation/screens/Masters/PaymentMode/payment.dart +++ b/lib/presentation/screens/Masters/PaymentMode/payment.dart @@ -188,45 +188,46 @@ class PaymentState extends ConsumerState { ); if (response.statusCode == 200) { + final responseBody = jsonDecode(response.body); + final message = responseBody['message']; print("Payment submitted successfully!"); print("Response: ${response.body}"); + print(message); + + if(responseBody['status'] == 200){ + refresh(); + isUpdating + ? ToastHelper.showSuccessToast( + context,message, + ) + : ToastHelper.showSuccessToast( + context,message, + ); + } else { + print("Failed to submit plan. Status: ${response.statusCode}"); + print("Error: ${response.body}"); + + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: Text("Payment Creation Failed"), + content: Text(message), + actions: [ + TextButton( + child: Text("OK"), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + } - refresh(); - isUpdating - ? ToastHelper.showSuccessToast( - context, - 'Payment Updated Successfully', - ) - : ToastHelper.showSuccessToast( - context, - 'Payment Created Successfully', - ); } else if (response.statusCode == 403) { await apiService.clearLocalStorageAndRedirect(); - } else { - final responseBody = jsonDecode(response.body); - dynamic msg = responseBody['data']; - - print("Failed to submit plan. Status: ${response.statusCode}"); - print("Error: ${response.body}"); - - showDialog( - context: context, - builder: (BuildContext context) { - return AlertDialog( - title: Text("Payment Creation Failed"), - content: Text(msg), - actions: [ - TextButton( - child: Text("OK"), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - ], - ); - }, - ); } } catch (e) { print(" Error submitting Staff: $e"); diff --git a/lib/presentation/screens/login/login_screen.dart b/lib/presentation/screens/login/login_screen.dart index 0704222..2420287 100644 --- a/lib/presentation/screens/login/login_screen.dart +++ b/lib/presentation/screens/login/login_screen.dart @@ -342,6 +342,8 @@ class _LoginScreenState extends ConsumerState { print('userRole -- $userRole'); if (userRole == 'staff') { context.go(AppRoutes.enquiryForStaff); + } if (userRole == 'admin') { + context.go(AppRoutes.payout); } else { context.go(AppRoutes.dashboard); } diff --git a/lib/presentation/screens/payout/payout_screen.dart b/lib/presentation/screens/payout/payout_screen.dart index 13b0948..2298a98 100644 --- a/lib/presentation/screens/payout/payout_screen.dart +++ b/lib/presentation/screens/payout/payout_screen.dart @@ -151,7 +151,7 @@ class _PayOutScreenState extends ConsumerState { managerId = ref.watch(managerIdProvider); userId = ref.watch(userIdProvider); if (managerId != null) { - await getAgentList(managerId); + await getAgentList(managerId); } await getBroker(); }); @@ -181,7 +181,7 @@ class _PayOutScreenState extends ConsumerState { // ----------------------------- setState(() { selectedBrokerID = int.tryParse(invoice['broker_id'].toString()); - selectedAgentId = int.tryParse(invoice['agent_id'].toString()); + selectedAgentId = int.tryParse(invoice['agent_id'].toString()); invoiceNoController.text = invoice['invoice_no']; invoiceDate = DateTime.parse(invoice['invoice_date']); @@ -217,10 +217,7 @@ class _PayOutScreenState extends ConsumerState { setState(() { filteredPolicies = filteredPolicies.map((p) { final policyId = int.parse(p['policy_id']); - return { - ...p, - 'is_selected': selectedPolicies.contains(policyId), - }; + return {...p, 'is_selected': selectedPolicies.contains(policyId)}; }).toList(); }); } @@ -228,8 +225,6 @@ class _PayOutScreenState extends ConsumerState { setState(() => isLoading = false); } - - String formatDate(String date) { final d = DateTime.parse(date); return DateFormat('dd-MM-yyyy').format(d); @@ -319,7 +314,9 @@ class _PayOutScreenState extends ConsumerState { // Load policies (simulate API) Future loadPolicies() async { try { - String formattedTillDate = DateFormat( 'yyyy-MM-dd').format(policyTillDate!); + String formattedTillDate = DateFormat( + 'yyyy-MM-dd', + ).format(policyTillDate!); final jsondata = { "broker_id": selectedBrokerID, "agent_id": selectedAgentId, @@ -370,76 +367,81 @@ class _PayOutScreenState extends ConsumerState { } // Save invoice (simulation) - Future saveInvoice() async{ + Future saveInvoice() async { + try { + if (selectedAgentId == null) { + ToastHelper.showWarningToast(context, "Please select an agent"); + return; + } - try { - if (selectedAgentId == null) { - ToastHelper.showWarningToast(context,"Please select an agent"); - return; - } + if (selectedPolicies.isEmpty) { + ToastHelper.showWarningToast( + context, + "Please select at least 1 policy", + ); + return; + } - if (selectedPolicies.isEmpty) { - ToastHelper.showWarningToast(context,"Please select at least 1 policy"); - return; - } + // Format dates for API + final String formattedInvoiceDate = DateFormat( + 'yyyy-MM-dd', + ).format(invoiceDate); + final String formattedTillDate = DateFormat( + 'yyyy-MM-dd', + ).format(policyTillDate!); - // Format dates for API - final String formattedInvoiceDate = DateFormat('yyyy-MM-dd').format(invoiceDate); - final String formattedTillDate = DateFormat('yyyy-MM-dd').format(policyTillDate!); + // Total Commission + final double totalCommission = filteredPolicies + .where((p) => selectedPolicies.contains(int.parse(p["policy_id"]))) + .fold(0.0, (sum, p) => sum + double.parse(p["commission_amount"])); - // Total Commission - final double totalCommission = filteredPolicies - .where((p) => selectedPolicies.contains(int.parse(p["policy_id"]))) - .fold(0.0, (sum, p) => sum + double.parse(p["commission_amount"])); + // Build items array + final List> items = filteredPolicies + .where((p) => selectedPolicies.contains(int.parse(p["policy_id"]))) + .map( + (p) => { + "policy_id": int.parse(p["policy_id"]), + "policy_no": p["policy_no"], + "commission_amount": double.parse(p["commission_amount"]), + }, + ) + .toList(); - // Build items array - final List> items = filteredPolicies - .where((p) => selectedPolicies.contains(int.parse(p["policy_id"]))) - .map((p) => { - "policy_id": int.parse(p["policy_id"]), - "policy_no": p["policy_no"], - "commission_amount": double.parse(p["commission_amount"]), - }).toList(); + final jsondata = { + "invoice_no": invoiceNoController.text, + "invoice_amount": totalCommission, + "agent_id": selectedAgentId, + "broker_id": selectedBrokerID, + "invoice_date": formattedInvoiceDate, + "till_date": formattedTillDate, + "payout_status": 0, + "created_by": userId, + "updated_by": userId, + "items": items, + }; + print('Commissions $jsondata'); + final response = await apiService.getCreateOrUpdate(jsondata); - final jsondata = { - "invoice_no": invoiceNoController.text, - "invoice_amount": totalCommission, - "agent_id": selectedAgentId, - "broker_id": selectedBrokerID, - "invoice_date": formattedInvoiceDate, - "till_date": formattedTillDate, - "payout_status": 0, - "created_by": userId, - "updated_by": userId, - "items": items, - }; - print('Commissions $jsondata'); - final response = await apiService.getCreateOrUpdate(jsondata); - - if (response['status'] == 'success') { - - setState(() { - print('API Data response - $response'); - selectedPolicies.clear(); - invoiceNoController.clear(); - invoiceDate = DateTime.now(); - policyTillDate = DateTime.now(); + if (response['status'] == 'success') { + setState(() { + print('API Data response - $response'); + selectedPolicies.clear(); + invoiceNoController.clear(); + invoiceDate = DateTime.now(); + policyTillDate = DateTime.now(); + filteredPolicies = []; + }); + context.go(AppRoutes.invoiceList); + } else { filteredPolicies = []; - + } + } catch (e) { + print('Exception occurred: $e'); + } finally { + setState(() { + isLoading = false; }); - context.go(AppRoutes.invoiceList); - } else { - filteredPolicies = []; } - } catch (e) { - print('Exception occurred: $e'); - } finally { - setState(() { - isLoading = false; - }); - } - - // showDialog( // context: context, @@ -684,6 +686,7 @@ class _PayOutScreenState extends ConsumerState { policyTillDate = DateTime.now(); filteredPolicies = []; + selectedPolicies.clear(); }); }, child: const Icon( @@ -886,20 +889,31 @@ class _PayOutScreenState extends ConsumerState { if (filteredPolicies.isNotEmpty) Container( width: double.infinity, - padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16), + padding: const EdgeInsets.symmetric( + vertical: 8, + horizontal: 16, + ), child: Row( children: [ Checkbox( - value: filteredPolicies.isNotEmpty && + value: + filteredPolicies.isNotEmpty && filteredPolicies.every( - (p) => selectedPolicies.contains(int.parse(p["policy_id"])), + (p) => selectedPolicies.contains( + int.parse(p["policy_id"]), + ), ), onChanged: (v) { setState(() { if (v == true) { - selectedPolicies = filteredPolicies - .map((p) => int.parse(p["policy_id"])) - .toSet(); + selectedPolicies = + filteredPolicies + .map( + (p) => int.parse( + p["policy_id"], + ), + ) + .toSet(); } else { selectedPolicies.clear(); } @@ -923,8 +937,32 @@ class _PayOutScreenState extends ConsumerState { ) else ...filteredPolicies.map((p) { - final int id = int.parse(p["policy_id"]); - final bool isSelected = selectedPolicies.contains(id); + // final int id = int.parse(p["policy_id"]); + // final bool isSelected = selectedPolicies.contains(id); + + // ---- SAFE ID PARSING ---- + final String policyIdStr = + p["policy_id"]?.toString() ?? "0"; + final int id = int.tryParse(policyIdStr) ?? 0; + + final bool isSelected = selectedPolicies + .contains(id); + + // ---- SAFE FIELDS ---- + final String policyNo = + p["policy_no"]?.toString() ?? "-"; + final String customer = + p["customer_name"]?.toString() ?? "-"; + + final String premiumStr = + p["premium_amount"]?.toString() ?? "0"; + final double premium = + double.tryParse(premiumStr) ?? 0; + + final String commissionStr = + p["commission_amount"]?.toString() ?? "0"; + final double commission = + double.tryParse(commissionStr) ?? 0; return ListTile( tileColor: isSelected @@ -943,15 +981,15 @@ class _PayOutScreenState extends ConsumerState { }, ), - title: Text(p["policy_no"]), + title: Text(policyNo), subtitle: Text( - "Customer: ${p["customer_name"]} | " - "Premium: ₹${p["premium_amount"]}", + "Customer: ${customer} | " + "Premium: ₹${premium}", ), trailing: Text( - "₹${p["commission_amount"]}", + "₹${commission}", style: const TextStyle( color: Colors.teal, fontWeight: FontWeight.bold, @@ -998,7 +1036,7 @@ class _PayOutScreenState extends ConsumerState { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - // Selected Count + Total + // ---------------- SELECTED COUNT ---------------- Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -1016,6 +1054,8 @@ class _PayOutScreenState extends ConsumerState { ), ], ), + + // ---------------- TOTAL COMMISSION ---------------- Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -1024,10 +1064,10 @@ class _PayOutScreenState extends ConsumerState { style: TextStyle(fontSize: 12), ), const SizedBox(height: 4), + + /// NULL-SAFE TOTAL COMMISSION CALCULATION Text( - "₹${filteredPolicies - .where((p) => selectedPolicies.contains(int.parse(p["policy_id"]))) - .fold(0.0, (s, p) => s + double.parse(p["commission_amount"]))}", + "₹${_calculateTotalCommission()}", style: const TextStyle( fontSize: 18, fontWeight: FontWeight.bold, @@ -1037,6 +1077,7 @@ class _PayOutScreenState extends ConsumerState { ], ), + // ---------------- BUTTONS ---------------- Row( children: [ TextButton( @@ -1064,6 +1105,27 @@ class _PayOutScreenState extends ConsumerState { ); } + double _calculateTotalCommission() { + double total = 0.0; + + for (var p in filteredPolicies) { + // Safe policy_id parsing + final String idStr = p["policy_id"]?.toString() ?? "0"; + final int id = int.tryParse(idStr) ?? 0; + + if (!selectedPolicies.contains(id)) continue; + + // Safe commission amount + final String commStr = p["commission_amount"]?.toString() ?? "0"; + final double comm = double.tryParse(commStr) ?? 0; + + total += comm; + } + + // Remove decimal points (.00) + return total.roundToDouble(); + } + InputDecoration commonInputDecoration({required String hint}) { return InputDecoration( hintText: hint, diff --git a/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart b/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart index e07c0d7..0c09efb 100644 --- a/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart +++ b/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart @@ -2509,6 +2509,7 @@ class EnquiryStaffState extends ConsumerState { RaiseEnqForm( key: raiseEnqKey, onSubmit: (dataSet) async { + print('Check checking dataSet $dataSet'); try { await createUserData(dataSet); // <-- API call here print("Enquiry saved successfully"); diff --git a/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart b/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart index 0a09afe..bd66ef1 100644 --- a/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart +++ b/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart @@ -92,6 +92,8 @@ class RaiseEnqFormState extends ConsumerState { bool isLoading = false; Map dataDetails() { + print('checking agent id $selectedAgent'); + final data = { "agent_id": ((roleId == 'handler') || (roleId == 'manager')) ? selectedAgent @@ -931,6 +933,8 @@ class RaiseEnqFormState extends ConsumerState { final dataSet = dataDetails(); + print('checking dataSet $dataSet'); + widget.onSubmit(dataSet); resetFields(); }, diff --git a/lib/presentation/screens/staff/policy/policy_list.dart b/lib/presentation/screens/staff/policy/policy_list.dart index 4400c6a..b799ee4 100644 --- a/lib/presentation/screens/staff/policy/policy_list.dart +++ b/lib/presentation/screens/staff/policy/policy_list.dart @@ -1,3 +1,4 @@ +import 'package:file_picker/file_picker.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -40,6 +41,9 @@ class policylistState extends ConsumerState { final _formKey = GlobalKey(); Map controllers = {}; List tabHeader = ['startDate', 'endDate']; + dynamic choosedPolcyId; + PlatformFile? docPDFUploadedFile; + String? selectedPDFFileNames; @override void initState() { @@ -693,10 +697,7 @@ class policylistState extends ConsumerState { child: Text('Policy Number', style: _headerStyle), ), - // Expanded( - // flex: 1, - // child: Text('Action', style: _headerStyle), - // ), + Expanded(flex: 1, child: Text('Action', style: _headerStyle)), ], ), ), @@ -780,6 +781,12 @@ class policylistState extends ConsumerState { } Widget _buildDataRow(Map item, sno) { + print('ITEMS $item'); + final String policyId = item['policy_id']?.toString() ?? ''; + final String? pdfPath = item["policy_pdf_file_name"]; + String? fileName = pdfPath != null && pdfPath.isNotEmpty + ? pdfPath.split('/').last + : null; return Container( padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16), // margin: const EdgeInsets.only(top: 10), @@ -802,13 +809,9 @@ class policylistState extends ConsumerState { maxLines: 3, ), ), - Expanded( flex: 2, - child: Text( - _formatDate(item['agent_name']) ?? '-', - style: _dataBold, - ), + child: Text(item['agent_name'] ?? '-', style: _dataBold), ), Expanded( flex: 2, @@ -863,6 +866,45 @@ class policylistState extends ConsumerState { maxLines: 3, ), ), + Expanded( + flex: 1, + child: Tooltip( + message: 'Download', + // color: Colors.white, + child: + Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + InkWell( + onTap: () => apiService.downloadFile( + apiUrl: 'api/policy/downloadPolicyFile?policy_id=$policyId&file_type=policy_pdf', + apiId: policyId, + localFile: null, + fileName: fileName, + ), + + child: Container( + padding: const EdgeInsets.symmetric( + horizontal: 5, + vertical: 8, + ), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + color: Color(0xFF425B5B), + // color: Colors.green.shade300, + ), + child: Row( + children: const [ + Icon(Icons.download, size: 13, color: Colors.white), + ], + ), + ), + ), + ], + ), + ), + ), ], ), );