From 2de35505ab3bbdcc98f91bdc89f83008b5f7abe4 Mon Sep 17 00:00:00 2001 From: venbaittech Date: Fri, 10 Oct 2025 13:15:18 +0530 Subject: [PATCH] pdf download issue --- .flutter-plugins-dependencies | 2 +- lib/core/services/api_service.dart | 68 +++++++++++----- .../screens/Enquiry/enquiry/policy_popup.dart | 9 ++- .../screens/Enquiry/enquiry/policy_tab.dart | 81 ++++++++++--------- .../Agent/agentIncentiveFile.dart | 8 +- .../UserManagement/Agent/agentList.dart | 4 +- .../Profile/profile_mobile.dart | 8 +- .../UserManagement/Profile/profile_web.dart | 4 +- .../screens/UserManagement/Staff/staff.dart | 14 +++- .../screens/dashboard/dashboard.dart | 18 +++-- .../screens/staff/policy/policy.dart | 8 +- .../screens/staff/quotations/quotation.dart | 6 +- 12 files changed, 135 insertions(+), 95 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 228d96e..645115d 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_ios-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_plugin_android_lifecycle","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.30/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_android-7.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_android","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_android-1.0.52/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"open_file_android","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_android-1.0.6/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_android-2.2.18/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_mac","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_mac-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_linux-0.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_windows-1.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_windows-0.0.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","dependencies":[],"dev_dependency":false},{"name":"firebase_app_check_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check_web-0.2.0+16/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_auth_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth_web-6.0.2/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core_web-3.1.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.0.1/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"flutter_secure_storage_web","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_web-1.0.0/","dependencies":[],"dev_dependency":false},{"name":"open_file_web","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_web-0.0.4/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","dependencies":[],"dev_dependency":false},{"name":"shared_preferences_web","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_app_check","dependencies":["firebase_app_check_web","firebase_core"]},{"name":"firebase_app_check_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core","firebase_messaging_web"]},{"name":"firebase_messaging_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"local_auth","dependencies":["local_auth_android","local_auth_darwin","local_auth_windows"]},{"name":"local_auth_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"local_auth_darwin","dependencies":[]},{"name":"local_auth_windows","dependencies":[]},{"name":"open_file","dependencies":["open_file_android","open_file_web","open_file_ios","open_file_mac","open_file_windows","open_file_linux"]},{"name":"open_file_android","dependencies":[]},{"name":"open_file_ios","dependencies":[]},{"name":"open_file_linux","dependencies":[]},{"name":"open_file_mac","dependencies":[]},{"name":"open_file_web","dependencies":[]},{"name":"open_file_windows","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2025-10-10 12:12:36.102274","version":"3.32.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_ios-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_plugin_android_lifecycle","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.30/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_android-7.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_android","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_android-1.0.52/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"open_file_android","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_android-1.0.6/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_android-2.2.18/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_mac","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_mac-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_linux-0.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_windows-1.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_windows-0.0.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","dependencies":[],"dev_dependency":false},{"name":"firebase_app_check_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check_web-0.2.0+16/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_auth_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth_web-6.0.2/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core_web-3.1.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.0.1/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"flutter_secure_storage_web","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_web-1.0.0/","dependencies":[],"dev_dependency":false},{"name":"open_file_web","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_web-0.0.4/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","dependencies":[],"dev_dependency":false},{"name":"shared_preferences_web","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_app_check","dependencies":["firebase_app_check_web","firebase_core"]},{"name":"firebase_app_check_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core","firebase_messaging_web"]},{"name":"firebase_messaging_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"local_auth","dependencies":["local_auth_android","local_auth_darwin","local_auth_windows"]},{"name":"local_auth_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"local_auth_darwin","dependencies":[]},{"name":"local_auth_windows","dependencies":[]},{"name":"open_file","dependencies":["open_file_android","open_file_web","open_file_ios","open_file_mac","open_file_windows","open_file_linux"]},{"name":"open_file_android","dependencies":[]},{"name":"open_file_ios","dependencies":[]},{"name":"open_file_linux","dependencies":[]},{"name":"open_file_mac","dependencies":[]},{"name":"open_file_web","dependencies":[]},{"name":"open_file_windows","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2025-10-10 13:11:50.661744","version":"3.32.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/lib/core/services/api_service.dart b/lib/core/services/api_service.dart index 8df807c..98fa871 100644 --- a/lib/core/services/api_service.dart +++ b/lib/core/services/api_service.dart @@ -154,18 +154,44 @@ class ApiService { } } + String extractFileName(String? contentDisposition, String fallback) { + if (contentDisposition == null) return fallback; + + // Check for extended filename first (RFC 5987) + final filenameStarMatch = RegExp( + r'filename\*\s*=\s*([^;]+)', + ).firstMatch(contentDisposition); + if (filenameStarMatch != null) { + String value = filenameStarMatch.group(1)!; + // Remove UTF-8'' prefix if exists + value = value.replaceAll(RegExp(r"UTF-8''"), ''); + return Uri.decodeFull(value.replaceAll('"', '')); + } + + // Fallback to regular filename= + final filenameMatch = RegExp( + r'filename\s*=\s*"?([^";]+)"?', + ).firstMatch(contentDisposition); + if (filenameMatch != null) { + return filenameMatch.group(1)!; + } + + // Fallback: use the provided fallback string + return fallback; + } + Future getPdfDownload( - BuildContext context, + // BuildContext context, String path, String id, ) async { print('getPdfDownload 1'); print('getPdfDownload 1 - $path'); - if (path.isEmpty) { - ToastHelper.showInfoToast(context, 'No file path found.'); - return; - } + // if (path.isEmpty) { + // ToastHelper.showInfoToast(context, 'No file path found.'); + // return; + // } final url = Uri.parse('https://venbait.in/nhance/partner/dev/$path'); await _initializeToken(); @@ -195,20 +221,26 @@ class ApiService { final blobUrl = html.Url.createObjectUrlFromBlob(blob); print('getPdfDownload $blobUrl'); // --- filename resolution --- - String fileName = 'download_$id'; - print('getPdfDownloadfileName $fileName'); + // String fileName = 'download_$id'; + // print('getPdfDownloadfileName $fileName'); + // final contentDisp = response.headers['content-disposition']; + // print('getPdfDownloadcontentDisp $contentDisp'); + // if (contentDisp != null && contentDisp.contains('filename=')) { + // print('getPdfDownloadcontentDisp..1'); + // fileName = contentDisp.split('filename=')[1].replaceAll('"', ''); + // print('getPdfDownloadcontentDisp..2'); + // } else { + // print('getPdfDownloadcontentDisp..3'); + // // fallback: URL or id + // fileName = path.split('/').last; + // if (id != null) fileName = '${id}_$fileName'; + // } + final contentDisp = response.headers['content-disposition']; print('getPdfDownloadcontentDisp $contentDisp'); - if (contentDisp != null && contentDisp.contains('filename=')) { - print('getPdfDownloadcontentDisp..1'); - fileName = contentDisp.split('filename=')[1].replaceAll('"', ''); - print('getPdfDownloadcontentDisp..2'); - } else { - print('getPdfDownloadcontentDisp..3'); - // fallback: URL or id - fileName = path.split('/').last; - if (id != null) fileName = '${id}_$fileName'; - } + + String fileName = extractFileName(contentDisp, path.split('/').last); + print('Resolved fileName: $fileName'); final anchor = html.AnchorElement(href: blobUrl) ..setAttribute('download', fileName) ..click(); @@ -261,7 +293,7 @@ class ApiService { } else if (apiUrl != null) { print("Download from API: $apiUrl"); print("Download from API: $apiId!"); - await getPdfDownload(context, apiUrl, apiId!); + await getPdfDownload(apiUrl, apiId!); } else { print("⚠️ No file available to download"); } diff --git a/lib/presentation/screens/Enquiry/enquiry/policy_popup.dart b/lib/presentation/screens/Enquiry/enquiry/policy_popup.dart index 0808b5c..fcd0e91 100644 --- a/lib/presentation/screens/Enquiry/enquiry/policy_popup.dart +++ b/lib/presentation/screens/Enquiry/enquiry/policy_popup.dart @@ -354,6 +354,7 @@ class _AddDialogState extends State { ThemedFormField( controller: controllers['policyNum']!, backgroundColor: Color(0xFFEDF6F5), + readOnly: true, validator: (value) => Validators.requiredField(value, "name"), txtwidth: ResponsiveLayout.isMobile(context) ? null @@ -367,7 +368,7 @@ class _AddDialogState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("Claims Description", style: _textStyle), + Text("Claims Description *", style: _textStyle), SizedBox(height: 10), ThemedFormField( backgroundColor: Color(0xFFEDF6F5), @@ -391,7 +392,7 @@ class _AddDialogState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("Claims Type", style: _textStyle), + Text("Claims Type *", style: _textStyle), SizedBox(height: 10), Container( color: Colors.white, @@ -483,7 +484,7 @@ class _AddDialogState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("Endorsement Type", style: _textStyle), + Text("Endorsement Type *", style: _textStyle), SizedBox(height: 10), Container( color: Colors.white, @@ -570,7 +571,7 @@ class _AddDialogState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("Remarks", style: _textStyle), + Text("Remarks *", style: _textStyle), SizedBox(height: 10), ThemedFormField( backgroundColor: Color(0xFFEDF6F5), diff --git a/lib/presentation/screens/Enquiry/enquiry/policy_tab.dart b/lib/presentation/screens/Enquiry/enquiry/policy_tab.dart index cd33dff..957f0e4 100644 --- a/lib/presentation/screens/Enquiry/enquiry/policy_tab.dart +++ b/lib/presentation/screens/Enquiry/enquiry/policy_tab.dart @@ -441,7 +441,7 @@ class PolicyTabState extends ConsumerState { // 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; final path = 'api/policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_pdf'; - apiService.getPdfDownload(context,path, selectedId); + apiService.getPdfDownload(path, selectedId); }, child: Container( padding: const EdgeInsets.all(8), @@ -480,7 +480,7 @@ class PolicyTabState extends ConsumerState { // 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; final path = 'api/policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_payment_receipt'; - apiService.getPdfDownload(context,path, selectedId); + apiService.getPdfDownload(path, selectedId); }, child: Container( padding: const EdgeInsets.all(8), @@ -570,50 +570,51 @@ class PolicyTabState extends ConsumerState { Widget _actionEnroll(BuildContext context) { return Tooltip( - message: 'Add Endorsement', - child: IconButton( - onPressed: () { - showDialog( - context: context, - builder: (ctx) => AddDialog( - userId: userId, - title: "Endorsement", - policyNumber: selectedPolicyNumber, - onSubmit: (value) { - debugPrint("New Endorsement: $value"); - enrollKey.currentState?.getEndrosmentList(selectedPolicyNumber); + message: 'Add Endorsement', + child: IconButton( + onPressed: () { + showDialog( + context: context, + builder: (ctx) => AddDialog( + userId: userId, + title: "Endorsement", + policyNumber: selectedPolicyNumber, + onSubmit: (value) { + debugPrint("New Endorsement: $value"); + enrollKey.currentState?.getEndrosmentList(selectedPolicyNumber); - // Update claim list or call API - }, - ), - ); - }, - icon: Icon(Icons.add), - ),); + // Update claim list or call API + }, + ), + ); + }, + icon: Icon(Icons.add), + ), + ); } Widget _actionClaims(BuildContext context) { return Tooltip( - message: 'Add Claim', - child: IconButton( - onPressed: () { - showDialog( - context: context, - builder: (ctx) => AddDialog( - userId: userId, - title: "Claims", - policyNumber: selectedPolicyNumber, - onSubmit: (value) { - debugPrint("New Claim: $value"); - claimsKey.currentState?.getClaimsList(selectedPolicyNumber); + message: 'Add Claim', + child: IconButton( + onPressed: () { + showDialog( + context: context, + builder: (ctx) => AddDialog( + userId: userId, + title: "Claims", + policyNumber: selectedPolicyNumber, + onSubmit: (value) { + debugPrint("New Claim: $value"); + claimsKey.currentState?.getClaimsList(selectedPolicyNumber); - // Update claim list or call API - }, - ), - ); - }, - icon: Icon(Icons.add), - ), + // Update claim list or call API + }, + ), + ); + }, + icon: Icon(Icons.add), + ), ); } diff --git a/lib/presentation/screens/UserManagement/Agent/agentIncentiveFile.dart b/lib/presentation/screens/UserManagement/Agent/agentIncentiveFile.dart index 3c980cb..9a78bc8 100644 --- a/lib/presentation/screens/UserManagement/Agent/agentIncentiveFile.dart +++ b/lib/presentation/screens/UserManagement/Agent/agentIncentiveFile.dart @@ -466,7 +466,7 @@ class UploadIncentiveModalState extends ConsumerState { showSearchBox: true, searchFieldProps: TextFieldProps( decoration: InputDecoration( - hintText: "Search agent...", + hintText: "Search partner...", enabledBorder: OutlineInputBorder( borderSide: BorderSide( color: Colors.grey, @@ -685,11 +685,7 @@ class UploadIncentiveModalState extends ConsumerState { final selectedId = file['id']; final path = 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; - apiService.getPdfDownload( - context, - path, - selectedId, - ); + apiService.getPdfDownload(path, selectedId); }, onDelete: () async { print("Delete ${file['id']}"); diff --git a/lib/presentation/screens/UserManagement/Agent/agentList.dart b/lib/presentation/screens/UserManagement/Agent/agentList.dart index 6989fec..ec824a3 100644 --- a/lib/presentation/screens/UserManagement/Agent/agentList.dart +++ b/lib/presentation/screens/UserManagement/Agent/agentList.dart @@ -274,8 +274,8 @@ class AgentListState extends ConsumerState { ), SizedBox(width: 10), ExportBtn( - sheetName: "Agents", - fileName: "agent_list", + sheetName: "Partner", + fileName: "partner_list", txt: !ResponsiveLayout.isMobile(context) ? true : false, diff --git a/lib/presentation/screens/UserManagement/Profile/profile_mobile.dart b/lib/presentation/screens/UserManagement/Profile/profile_mobile.dart index c12c54c..209f807 100644 --- a/lib/presentation/screens/UserManagement/Profile/profile_mobile.dart +++ b/lib/presentation/screens/UserManagement/Profile/profile_mobile.dart @@ -292,7 +292,7 @@ class ProfileState extends ConsumerState { path = 'api/agent/downloadAgentIncentiveFile?id=$latestId'; } - apiService.getPdfDownload(context, + apiService.getPdfDownload( path, latestId, ); @@ -386,7 +386,7 @@ class ProfileState extends ConsumerState { path = 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; } - apiService.getPdfDownload(context, + apiService.getPdfDownload( path, selectedId, ); @@ -552,7 +552,7 @@ class ProfileState extends ConsumerState { path = 'api/agent/downloadAgentIncentiveFile?id=$latestId'; } - apiService.getPdfDownload(context, + apiService.getPdfDownload( path, latestId, ); @@ -646,7 +646,7 @@ class ProfileState extends ConsumerState { path = 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; } - apiService.getPdfDownload(context, + apiService.getPdfDownload( path, selectedId, ); diff --git a/lib/presentation/screens/UserManagement/Profile/profile_web.dart b/lib/presentation/screens/UserManagement/Profile/profile_web.dart index ee4bca9..c86d4be 100644 --- a/lib/presentation/screens/UserManagement/Profile/profile_web.dart +++ b/lib/presentation/screens/UserManagement/Profile/profile_web.dart @@ -288,7 +288,7 @@ class ProfilePopUpState extends ConsumerState { path = 'api/agent/downloadAgentIncentiveFile?id=$latestId'; } - apiService.getPdfDownload(context,path, latestId); + apiService.getPdfDownload(path, latestId); }, child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -371,7 +371,7 @@ class ProfilePopUpState extends ConsumerState { path = 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; } - apiService.getPdfDownload(context, + apiService.getPdfDownload( path, selectedId, ); diff --git a/lib/presentation/screens/UserManagement/Staff/staff.dart b/lib/presentation/screens/UserManagement/Staff/staff.dart index 668d29d..8f1bb07 100644 --- a/lib/presentation/screens/UserManagement/Staff/staff.dart +++ b/lib/presentation/screens/UserManagement/Staff/staff.dart @@ -235,8 +235,14 @@ class StaffState extends ConsumerState { Tooltip( message: 'Back', child: IconButton( - icon: const Icon(Icons.arrow_left_sharp,size: 35,color: Color(0xFF425B5B)), - onPressed: () { context.go(AppRoutes.staffLst); }, + icon: const Icon( + Icons.arrow_left_sharp, + size: 35, + color: Color(0xFF425B5B), + ), + onPressed: () { + context.go(AppRoutes.staffLst); + }, splashRadius: 28, hoverColor: Colors.black12, padding: const EdgeInsets.all(8), @@ -391,11 +397,11 @@ class StaffState extends ConsumerState { return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text("Staff Id *", style: _textStyle), + Text("Staff Id ", style: _textStyle), SizedBox(width: 10), ThemedFormField( controller: controllers['code']!, - validator: (value) => Validators.requiredField(value, "id"), + // validator: (value) => Validators.requiredField(value, "id"), txtwidth: MediaQuery.of(context).size.width * 0.26, ), ], diff --git a/lib/presentation/screens/dashboard/dashboard.dart b/lib/presentation/screens/dashboard/dashboard.dart index 1c8a235..d415568 100644 --- a/lib/presentation/screens/dashboard/dashboard.dart +++ b/lib/presentation/screens/dashboard/dashboard.dart @@ -678,14 +678,14 @@ class _DashboardScreenState extends ConsumerState { SizedBox(width: 16), Expanded( child: Performance( - title: "Performing Agents", + title: "Performing Partner", data: agentsPerformanceList, ), ), SizedBox(width: 16), Expanded( child: Performance( - title: "Non-Performing Agents", + title: "Non-Performing Partner", data: nonAgentsPerformanceList, ), ), @@ -1014,7 +1014,9 @@ class agentPendings extends StatelessWidget { ? null : (role == 'agent') ? () { - print("Clicked Agent role : $role - ${row['id']}"); + print( + "Clicked Partner role : $role - ${row['id']}", + ); onEdit!(row['id'].toString()); // onEdit!(row['id']); } @@ -1445,7 +1447,7 @@ class Performance extends StatelessWidget { // ), Expanded( child: Text( - "Agent Name", + "Partner Name", textAlign: TextAlign.center, style: _headerStyle, ), @@ -1459,7 +1461,9 @@ class Performance extends StatelessWidget { ), Expanded( child: Text( - title == "Performing Agents" ? "Premium Value" : "Status", + title == "Performing Partners" + ? "Premium Value" + : "Status", textAlign: TextAlign.center, style: _headerStyle, ), @@ -1514,7 +1518,7 @@ class Performance extends StatelessWidget { Expanded( child: Text( - title == "Performing Agents" + title == "Performing Partners" ? formatToCroresLakhsAndThousands( row['total_premium_value'] ?? 0, ) @@ -1523,7 +1527,7 @@ class Performance extends StatelessWidget { style: GoogleFonts.inter( fontSize: 14, fontWeight: FontWeight.w500, - color: title == "Performing Agents" + color: title == "Performing Partners" ? Colors.black : (row['status']?.toString().toLowerCase() == "active" diff --git a/lib/presentation/screens/staff/policy/policy.dart b/lib/presentation/screens/staff/policy/policy.dart index 16f77eb..37e4be4 100644 --- a/lib/presentation/screens/staff/policy/policy.dart +++ b/lib/presentation/screens/staff/policy/policy.dart @@ -772,7 +772,7 @@ class PolicyScreenState extends ConsumerState { // 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; final path = 'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc'; - apiService.getPdfDownload(context, path, selectedId); + apiService.getPdfDownload(path, selectedId); }, child: Container( padding: const EdgeInsets.all(8), @@ -813,7 +813,7 @@ class PolicyScreenState extends ConsumerState { // 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; final path = 'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof'; - apiService.getPdfDownload(context, path, selectedId); + apiService.getPdfDownload(path, selectedId); }, child: Container( padding: const EdgeInsets.all(8), @@ -850,7 +850,7 @@ class PolicyScreenState extends ConsumerState { // 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; final path = 'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy'; - apiService.getPdfDownload(context, path, selectedId); + apiService.getPdfDownload(path, selectedId); }, child: Container( padding: const EdgeInsets.all(8), @@ -890,7 +890,7 @@ class PolicyScreenState extends ConsumerState { final path = 'api/quotation/downloadAdditionalUploadedFile?id=$acceptedQuotationId'; - apiService.getPdfDownload(context, path, selectedId); + apiService.getPdfDownload(path, selectedId); }, child: Container( padding: const EdgeInsets.all(8), diff --git a/lib/presentation/screens/staff/quotations/quotation.dart b/lib/presentation/screens/staff/quotations/quotation.dart index b530f61..0f1c3c6 100644 --- a/lib/presentation/screens/staff/quotations/quotation.dart +++ b/lib/presentation/screens/staff/quotations/quotation.dart @@ -543,7 +543,7 @@ class QuotationScreenState extends ConsumerState { // 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; final path = 'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc'; - apiService.getPdfDownload(context, path, selectedId); + apiService.getPdfDownload(path, selectedId); }, child: Container( padding: const EdgeInsets.all(8), @@ -584,7 +584,7 @@ class QuotationScreenState extends ConsumerState { // 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; final path = 'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=id_proof'; - apiService.getPdfDownload(context, path, selectedId); + apiService.getPdfDownload(path, selectedId); }, child: Container( padding: const EdgeInsets.all(8), @@ -621,7 +621,7 @@ class QuotationScreenState extends ConsumerState { // 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; final path = 'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=previous_policy'; - apiService.getPdfDownload(context, path, selectedId); + apiService.getPdfDownload(path, selectedId); }, child: Container( padding: const EdgeInsets.all(8),