From ef21a4883c26355cc1e126129ba71f24ef5f7f72 Mon Sep 17 00:00:00 2001 From: venbaittech Date: Fri, 21 Nov 2025 14:59:09 +0530 Subject: [PATCH] Proposal_API_changes --- .flutter-plugins-dependencies | 2 +- lib/core/services/api_service.dart | 44 ++- .../screens/Masters/Brokers/broker.dart | 31 +- .../screens/Masters/Brokers/brokerList.dart | 16 +- .../screens/Masters/PaymentMode/payment.dart | 31 +- .../Masters/PaymentMode/paymentList.dart | 14 +- .../staff/Enquiry/enquiry_inline_list.dart | 55 +-- .../screens/staff/Enquiry/raise_enq_form.dart | 27 +- .../staff/Enquiry/tabs/createQuotation.dart | 116 +++---- .../screens/staff/Enquiry/tabs/policyTab.dart | 319 ++++++++++-------- .../staff/Enquiry/tabs/quotationTab.dart | 67 ++-- .../screens/staff/Enquiry/tabs/tab.dart | 6 +- 12 files changed, 434 insertions(+), 294 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 23a0383..36c37a5 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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_android-7.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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_web-1.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":"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-19 10:35:48.586166","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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_android-7.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":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_web-1.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":"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-21 14:33:18.462170","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 c9ff88a..64c7c7a 100644 --- a/lib/core/services/api_service.dart +++ b/lib/core/services/api_service.dart @@ -342,14 +342,8 @@ class ApiService { final url; if (role == 'staff') { - // url = Uri.parse( - // 'https://venbait.in/nhance/partner/dev/api/staff/changeStaffStatus', - // ); url = Uri.parse('${Env.apiUrl}staff/changeStaffStatus'); } else { - // url = Uri.parse( - // 'https://venbait.in/nhance/partner/dev/api/agent/changeAgentStatus', - // ); url = Uri.parse('${Env.apiUrl}/api/agent/changeAgentStatus'); } @@ -372,6 +366,44 @@ class ApiService { return response; } + Future> updateStatusMasters( + id, + status, + masterName, + userId, + ) async { + print('updateStatusMaster $id $status $masterName $userId'); + final Map data = { + "is_active": int.parse(status), + "updated_by": userId, + }; + final url; + + if (masterName == 'Broker') { + url = Uri.parse('${Env.apiUrl}master/updateBrokerStatus/$id'); + } else { + url = Uri.parse('${Env.apiUrl}master/updatePaymentModeStatus/$id'); + } + + // final token = await getToken(); // Fetch token + + if (_token == null) { + throw Exception('Token not found. Please log in.'); + } + + print("data------- $data}"); + + final headers = { + 'Authorization': 'Bearer $_token', + 'Content-Type': 'application/json', + 'app-signature': Env.App_Signature, + // 'app-signature': 'nhance-partner-2025-signature-35468846JRhH551HK', + }; + + final response = await _makePostRequestJson(url, data, headers); + return response; + } + // ----------------------------------- Dashboard ------------------------------------------------- Future> fetchDashboard(int id, role, userId) async { // print(_token); diff --git a/lib/presentation/screens/Masters/Brokers/broker.dart b/lib/presentation/screens/Masters/Brokers/broker.dart index 4665ab9..adfb291 100644 --- a/lib/presentation/screens/Masters/Brokers/broker.dart +++ b/lib/presentation/screens/Masters/Brokers/broker.dart @@ -130,6 +130,18 @@ class BrokerState extends ConsumerState { }); } + void refresh() { + print('REfresj'); + widget.onSubmit(); + setState(() { + // clear all text controllers + for (var controller in controllers.values) { + controller.clear(); + } // 👈 clear selected agent + controllers['name']?.clear(); + }); + } + Future createUserData(data) async { final bool isUpdating = selectedId != null; final dynamic id = isUpdating ? int.tryParse(selectedId.toString()) : 0; @@ -170,7 +182,8 @@ class BrokerState extends ConsumerState { if (response.statusCode == 200) { print("Broker submitted successfully!"); print("Response: ${response.body}"); - widget.onSubmit(); + + refresh(); isUpdating ? ToastHelper.showSuccessToast( context, @@ -229,7 +242,7 @@ class BrokerState extends ConsumerState { children: [ buildFormFields(), SizedBox(width: 5), - GestureDetector( + InkWell( onTap: () { handleSave(); }, @@ -246,6 +259,20 @@ class BrokerState extends ConsumerState { ), ), ), + SizedBox(width: 5), + InkWell( + onTap: () { + refresh(); + }, + child: Container( + padding: EdgeInsets.all(6.0), + decoration: BoxDecoration( + color: const Color(0xFF2E7D6E), + borderRadius: BorderRadius.circular(5.0), + ), + child: Icon(Icons.refresh, size: 13, color: Colors.white), + ), + ), ], ), ); diff --git a/lib/presentation/screens/Masters/Brokers/brokerList.dart b/lib/presentation/screens/Masters/Brokers/brokerList.dart index 9a19ecc..a458dbe 100644 --- a/lib/presentation/screens/Masters/Brokers/brokerList.dart +++ b/lib/presentation/screens/Masters/Brokers/brokerList.dart @@ -31,6 +31,7 @@ class BrokerListState extends ConsumerState { dynamic managerId; dynamic role; dynamic prefid; + dynamic userId; // List> dataVal = []; List> getBrokerData = []; List> originalData = []; @@ -48,6 +49,7 @@ class BrokerListState extends ConsumerState { Future.microtask(() { final data1 = ref.read(managerIdProvider); + userId = ref.watch(userIdProvider); // final data2 = ref.read(handlerIdProvider); print("Edata1 => mId: $data1 -2 :"); prefid = data1; @@ -168,7 +170,7 @@ class BrokerListState extends ConsumerState { managerId = ref.watch(managerIdProvider); return MainLayout( - title: "Staff", + title: "Broker", body: Container( // padding: EdgeInsets.all(8.0), // margin: EdgeInsets.all(10.0), @@ -223,9 +225,10 @@ class BrokerListState extends ConsumerState { id: selectedId, onSubmit: () { getBroker(); - setState( - () => selectedBroker = null, - ); // reset after save + setState(() { + selectedBroker = null; + selectedId = null; + }); // reset after save }, ), Spacer(), @@ -382,10 +385,11 @@ class BrokerListState extends ConsumerState { setState(() { item['is_active'] = val ? "1" : "0"; }); - final response = apiService.updateStatus( + final response = apiService.updateStatusMasters( item['id'], val ? "0" : "1", - 'staff', + 'Broker', + userId, ); print("Response - $response"); }, diff --git a/lib/presentation/screens/Masters/PaymentMode/payment.dart b/lib/presentation/screens/Masters/PaymentMode/payment.dart index c5a9b9d..aa0ab7f 100644 --- a/lib/presentation/screens/Masters/PaymentMode/payment.dart +++ b/lib/presentation/screens/Masters/PaymentMode/payment.dart @@ -130,6 +130,18 @@ class PaymentState extends ConsumerState { }); } + void refresh() { + print('REfresj'); + widget.onSubmit(); + setState(() { + // clear all text controllers + for (var controller in controllers.values) { + controller.clear(); + } // 👈 clear selected agent + controllers['value']?.clear(); + }); + } + Future createUserData(data) async { final bool isUpdating = selectedId != null; final dynamic id = isUpdating ? int.tryParse(selectedId.toString()) : 0; @@ -178,7 +190,8 @@ class PaymentState extends ConsumerState { if (response.statusCode == 200) { print("Payment submitted successfully!"); print("Response: ${response.body}"); - widget.onSubmit(); + + refresh(); isUpdating ? ToastHelper.showSuccessToast( context, @@ -237,7 +250,7 @@ class PaymentState extends ConsumerState { children: [ buildFormFields(), SizedBox(width: 5), - GestureDetector( + InkWell( onTap: () { handleSave(); }, @@ -254,6 +267,20 @@ class PaymentState extends ConsumerState { ), ), ), + SizedBox(width: 5), + InkWell( + onTap: () { + refresh(); + }, + child: Container( + padding: EdgeInsets.all(6.0), + decoration: BoxDecoration( + color: const Color(0xFF2E7D6E), + borderRadius: BorderRadius.circular(5.0), + ), + child: Icon(Icons.refresh, size: 13, color: Colors.white), + ), + ), ], ), ); diff --git a/lib/presentation/screens/Masters/PaymentMode/paymentList.dart b/lib/presentation/screens/Masters/PaymentMode/paymentList.dart index 6ae8868..768f2a3 100644 --- a/lib/presentation/screens/Masters/PaymentMode/paymentList.dart +++ b/lib/presentation/screens/Masters/PaymentMode/paymentList.dart @@ -31,6 +31,7 @@ class PaymentLsitState extends ConsumerState { dynamic managerId; dynamic role; dynamic prefid; + dynamic userId; // List> dataVal = []; List> getPaymentData = []; List> originalData = []; @@ -52,6 +53,7 @@ class PaymentLsitState extends ConsumerState { print("Edata1 => mId: $data1 -2 :"); prefid = data1; role = ref.read(userRoleProvider); + userId = ref.watch(userIdProvider); print("E43 => mId: $prefid"); if (prefid != null && role != null) { getPayment(); @@ -216,9 +218,10 @@ class PaymentLsitState extends ConsumerState { id: selectedId, onSubmit: () { getPayment(); - setState( - () => selectedPayment = null, - ); // reset after save + setState(() { + selectedPayment = null; + selectedId = null; + }); // reset after save }, ), Spacer(), @@ -378,10 +381,11 @@ class PaymentLsitState extends ConsumerState { setState(() { item['is_active'] = val ? "1" : "0"; }); - final response = apiService.updateStatus( + final response = apiService.updateStatusMasters( item['id'], val ? "0" : "1", - 'staff', + 'PaymentMode', + userId, ); print("Response - $response"); }, diff --git a/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart b/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart index dd1dd8e..e07c0d7 100644 --- a/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart +++ b/lib/presentation/screens/staff/Enquiry/enquiry_inline_list.dart @@ -3365,33 +3365,34 @@ class EnquiryStaffState extends ConsumerState { // Premium DataCell( - (item['status'] == 'Proposal Created' || - item['status'] == 'Proposal Rejected') - ? SizedBox( - width: 80, - child: InkWell( - onTap: () { - // handle approval logic - - handleProposalAccept(context, item['id']); - }, - child: Text( - 'Click To\nApprove', - style: GoogleFonts.inter( - color: Colors.green, - fontSize: 11, - fontWeight: FontWeight.w700, - ), - ), - ), - ) - : SizedBox( - width: 80, - child: Text( - item['premium_amount']?.toString() ?? '-', - style: _dataBold, - ), - ), + // (item['status'] == 'Proposal Created' || + // item['status'] == 'Proposal Rejected') + // ? SizedBox( + // width: 80, + // child: InkWell( + // onTap: () { + // // handle approval logic + // + // handleProposalAccept(context, item['id']); + // }, + // child: Text( + // 'Click To\nApprove', + // style: GoogleFonts.inter( + // color: Colors.green, + // fontSize: 11, + // fontWeight: FontWeight.w700, + // ), + // ), + // ), + // ) + // : + SizedBox( + width: 80, + child: Text( + item['premium_amount']?.toString() ?? '-', + style: _dataBold, + ), + ), ), // Payment Mode diff --git a/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart b/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart index df7dc49..0a09afe 100644 --- a/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart +++ b/lib/presentation/screens/staff/Enquiry/raise_enq_form.dart @@ -355,8 +355,13 @@ class RaiseEnqFormState extends ConsumerState { buildInsuredName(context, fromHeader: true), buildVehicleNumber(context), - - buildSave(context), + Row( + children: [ + buildRefresh(context), + SizedBox(width: 5), + buildSave(context), + ], + ), ], ), ), @@ -930,7 +935,7 @@ class RaiseEnqFormState extends ConsumerState { resetFields(); }, child: Container( - padding: EdgeInsets.all(8.0), + padding: EdgeInsets.all(5.0), decoration: BoxDecoration( color: const Color(0xFF2E7D6E), borderRadius: BorderRadius.circular(5.0), @@ -940,6 +945,22 @@ class RaiseEnqFormState extends ConsumerState { ); } + Widget buildRefresh(context) { + return InkWell( + onTap: () { + resetFields(); + }, + child: Container( + padding: EdgeInsets.all(6.0), + decoration: BoxDecoration( + color: const Color(0xFF2E7D6E), + borderRadius: BorderRadius.circular(5.0), + ), + child: Icon(Icons.refresh, size: 18, color: Colors.white), + ), + ); + } + void resetFields() { print('Field ReSET'); // 1. Reset all text controllers diff --git a/lib/presentation/screens/staff/Enquiry/tabs/createQuotation.dart b/lib/presentation/screens/staff/Enquiry/tabs/createQuotation.dart index d85fbc2..d528e88 100644 --- a/lib/presentation/screens/staff/Enquiry/tabs/createQuotation.dart +++ b/lib/presentation/screens/staff/Enquiry/tabs/createQuotation.dart @@ -108,6 +108,8 @@ class CreateProposalFormState extends ConsumerState { // "insurer_id": selectedInsurer, "premium_amount": controllers["premium_Amount"]?.text, "insurance_plan_type_id": selectedInsPlanType, + "payment_mode_id": selectedPaymentMode, + "broker_id": selectedBroker, // "additional_uploaded_file_name": "extra_doc.pdf", // "created_by": widget.userId, "manager_id": widget.managerId, @@ -221,8 +223,11 @@ class CreateProposalFormState extends ConsumerState { selectedInsPlanType = widget .selectedQuotationFrmListdata!['insurance_plan_type_id'] ?.toString(); + selectedBroker = widget.selectedQuotationFrmListdata!['broker_id'] + ?.toString(); - selectedInsurer = '1'; + selectedPaymentMode = widget.selectedQuotationFrmListdata!['broker_id'] + ?.toString(); // controllers["insurer"]?.text = 'LIC'; @@ -230,7 +235,7 @@ class CreateProposalFormState extends ConsumerState { // widget.selectedQuotationFrmListdata!['insurer_id']?.toString() ?? ''; String? apiDocPath = - widget.selectedQuotationFrmListdata!["additional_uploaded_file_name"]; + widget.selectedQuotationFrmListdata!["policy_pdf_file_name"]; if (apiDocPath != null && apiDocPath.isNotEmpty) { print('apiDocPath - $apiDocPath'); selectedFileNames = apiDocPath.split('/').last; @@ -317,7 +322,7 @@ class CreateProposalFormState extends ConsumerState { }); try { - final response = await apiService.fetchMasterDropDown('getPaymentMode'); + final response = await apiService.fetchMasterDropDown('PaymentMode'); if (response['status'] == 200) { print('getPaymentModeData - ${response['data']}'); @@ -372,11 +377,9 @@ class CreateProposalFormState extends ConsumerState { print('id - $id'); final uri = Uri.parse( // isUpdating - // ? 'https://venbait.in/nhance/partner/dev/api/agent/updateAgent' - // : 'https://venbait.in/nhance/partner/dev/api/agent/createAgent', - isUpdating - ? '${Env.apiUrl}quotation/updateQuotation' - : '${Env.apiUrl}quotation/createQuotation', + // ? '${Env.apiUrl}quotation/updateQuotation' + // : '${Env.apiUrl}quotation/createQuotation', + '${Env.apiUrl}quotation/proceedQuotation', ); if (_token == null) { throw Exception('Token not found. Please log in.'); @@ -416,14 +419,14 @@ class CreateProposalFormState extends ConsumerState { try { if (docUploadedFile!.bytes != null) { final multipartFile = http.MultipartFile.fromBytes( - 'additional_uploaded_file_name', + 'policy_pdf_file_name', docUploadedFile!.bytes!, filename: docUploadedFile!.name, ); request.files.add(multipartFile); } else if (docUploadedFile!.path != null) { final multipartFile = await http.MultipartFile.fromPath( - 'additional_uploaded_file_name', + 'policy_pdf_file_name', docUploadedFile!.path!, filename: docUploadedFile!.name, ); @@ -951,7 +954,7 @@ class CreateProposalFormState extends ConsumerState { ); }).toList(); }, - itemAsString: (val) => val['insurance_plan_type'].toString(), + itemAsString: (val) => val['name'].toString(), compareFn: (item, selectedItem) => item['id'] == selectedItem['id'], // ✅ compare by id validator: (val) { @@ -1036,34 +1039,13 @@ class CreateProposalFormState extends ConsumerState { ), ); }, - // searchFieldProps: TextFieldProps( - // decoration: InputDecoration( - // filled: true, - // fillColor: Colors.white, - // hintText: "Search Plan Type...", - // enabledBorder: OutlineInputBorder( - // borderSide: BorderSide( - // color: Colors.white, - // ), // 👈 Normal border - // ), - // focusedBorder: OutlineInputBorder( - // borderSide: BorderSide( - // color: Colors.white, - // width: 1.5, - // ), // 👈 Focused border - // ), - // ), - // ), - // constraints: BoxConstraints(), ), onChanged: (val) { if (val != null) { - print("Selected ClaimsType : ${val['insurance_plan_type']}"); + print("Selected ClaimsType : ${val['id']}"); print("Id: ${val['id']}"); - selectedInsPlanType = val['id']; - // controllers['agentId']?.text = val['agent_code']; - // agentId = agent['id']; + selectedBroker = val['id']; } }, ), @@ -1097,38 +1079,40 @@ class CreateProposalFormState extends ConsumerState { }); }, ), - const SizedBox(height: 5), - - if (docUploadedFileUrlFromApi != null) - Container( - // color: Colors.white, - child: Row( - children: [ - GestureDetector( - onTap: () => apiService.downloadFile( - apiUrl: - 'api/quotation/downloadAdditionalUploadedFile?id=$selectedId', - apiId: selectedId, - localFile: docUploadedFile, - fileName: selectedFileNames, - ), - child: Container( - padding: const EdgeInsets.all(5), - 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), - ], - ), - ), - ), - ], - ), - ), + // const SizedBox(height: 5), + // + // if (docUploadedFileUrlFromApi != null) + // Container( + // // color: Colors.white, + // child: Row( + // children: [ + // GestureDetector( + // onTap: () => apiService.downloadFile( + // // apiUrl: + // // 'api/quotation/downloadAdditionalUploadedFile?id=$selectedId', + // apiUrl: + // 'api/policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_pdf', + // apiId: selectedId, + // localFile: docUploadedFile, + // fileName: selectedFileNames, + // ), + // child: Container( + // padding: const EdgeInsets.all(5), + // 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), + // ], + // ), + // ), + // ), + // ], + // ), + // ), ], ), ], diff --git a/lib/presentation/screens/staff/Enquiry/tabs/policyTab.dart b/lib/presentation/screens/staff/Enquiry/tabs/policyTab.dart index cab0b57..6c43998 100644 --- a/lib/presentation/screens/staff/Enquiry/tabs/policyTab.dart +++ b/lib/presentation/screens/staff/Enquiry/tabs/policyTab.dart @@ -160,7 +160,6 @@ class PolicyStaffTabState extends ConsumerState { "sgst": controllers["sgst"]?.text, "igst": controllers["igst"]?.text, "premium_amount": controllers["premiumTOT"]?.text, - "manager_id": managerId, // "policy_pdf_file_name": "policy_doc.pdf", // "policy_payment_receipt_file_name": "receipt_doc.pdf", @@ -435,6 +434,7 @@ class PolicyStaffTabState extends ConsumerState { policyData['premium_amount']?.toString() ?? ''; selectedBroker = policyData['broker_id'] ?? ''; + selectedBrokerName = policyData['broker_name'] ?? ''; // RC FILE String? rcPath = policyData["policy_pdf_file_name"]; if (rcPath != null && rcPath.isNotEmpty) { @@ -1067,13 +1067,14 @@ class PolicyStaffTabState extends ConsumerState { // mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ - buildBroker(context), if (selectedBrokerName != null) ...[ + Paymentmode(context), + SizedBox(width: 20), + buildBroker(context), SizedBox(width: 20), buildUploadPolicyPdf(context), - SizedBox(width: 20), - Paymentmode(context), + // SizedBox(width: 20), ], ], ), @@ -1413,164 +1414,181 @@ class PolicyStaffTabState extends ConsumerState { Text('Broker *', style: _textStyle), SizedBox(width: 15), SizedBox( - height: 30, - width: MediaQuery.of(context).size.width * 0.1, - child: DropdownSearch>( - key: dropDownKeyBroker, - selectedItem: selectedBrokers.isNotEmpty ? selectedBrokers : null, - items: (filter, infiniteScrollProps) { - return filteredBrokerData; - }, - - itemAsString: (val) => val['name'].toString(), // what to show - compareFn: (item, selectedItem) => - item['id'] == selectedItem['id'], // ✅ compare by id - validator: (val) { - if (val == null) { - return "Required"; // ✅ error message - } - return null; - }, - suffixProps: DropdownSuffixProps( - // make sure the dropdown button is visible - dropdownButtonProps: DropdownButtonProps( - isVisible: true, - padding: EdgeInsets.zero, // remove default padding - constraints: const BoxConstraints( - // shrink icon tap area - minWidth: 12, - minHeight: 12, - ), - iconSize: 15, // smaller icon - // icon: const Icon(Icons.arrow_drop_down), - ), - ), - dropdownBuilder: (context, selectedItem) => Align( - alignment: Alignment.centerLeft, - child: Text( - selectedItem != null ? selectedItem['name'].toString() : "", - style: GoogleFonts.poppins(fontSize: 11, color: Colors.black), - overflow: TextOverflow.ellipsis, - maxLines: 1, - softWrap: false, - ), - ), - decoratorProps: DropDownDecoratorProps( - decoration: - AppInputDecorations.dropdownDecoration( - label: "Select Broker", - ).copyWith( - filled: true, - fillColor: - Colors.white, // 👈 makes the dropdown input white - isDense: true, - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: const BorderSide( - color: Colors.black, - width: 0.1, - ), - ), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(5), - borderSide: const BorderSide( - color: Colors.black, - width: 0.1, - ), - ), - contentPadding: EdgeInsets.symmetric( - horizontal: 8, - vertical: 6, - ), - ), - ), - - popupProps: PopupProps.menu( - fit: FlexFit.loose, - constraints: BoxConstraints(maxHeight: 250), - menuProps: MenuProps( - backgroundColor: - Colors.white, // 👈 sets dropdown background to white - ), - showSearchBox: true, - searchFieldProps: TextFieldProps( - decoration: InputDecoration( - filled: true, - fillColor: Colors.white, - hintText: "Search Broker...", - hintStyle: GoogleFonts.inter( - fontSize: 12, - color: Colors.black, - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide( - color: Colors.white, - ), // 👈 Normal border - ), - focusedBorder: OutlineInputBorder( - borderSide: BorderSide( - color: Colors.white, - width: 1.5, - ), // 👈 Focused border - ), - ), - ), - - itemBuilder: (context, item, isDisabled, isSelected) { - return Container( - // color: isSelected ? Colors.blue.withOpacity(0.1) : null, - padding: const EdgeInsets.symmetric( - horizontal: 8, - vertical: 3, - ), - child: Text( - item['name'].toString(), - style: GoogleFonts.inter(fontSize: 12, color: Colors.black), - ), - ); - }, - // constraints: BoxConstraints(), - ), - - onChanged: (val) { - if (val != null) { - print("Selected Broker : ${val['name']}"); - print("Id: ${val['id']}"); - selectedBroker = val['id']; - setState(() { - selectedBrokerName = val['name']; - print('selectedBrokerName - $selectedBrokerName'); - }); - // controllers['agentId']?.text = val['agent_code']; - // agentId = agent['id']; - } - }, + width: MediaQuery.of(context).size.width * 0.095, + child: Text( + '$selectedBrokerName', + style: GoogleFonts.inter(fontSize: 12), ), ), + // SizedBox( + // height: 30, + // width: MediaQuery.of(context).size.width * 0.1, + // child: DropdownSearch>( + // key: dropDownKeyBroker, + // selectedItem: selectedBrokers.isNotEmpty ? selectedBrokers : null, + // items: (filter, infiniteScrollProps) { + // return filteredBrokerData; + // }, + // + // itemAsString: (val) => val['name'].toString(), // what to show + // compareFn: (item, selectedItem) => + // item['id'] == selectedItem['id'], // ✅ compare by id + // validator: (val) { + // if (val == null) { + // return "Required"; // ✅ error message + // } + // return null; + // }, + // suffixProps: DropdownSuffixProps( + // // make sure the dropdown button is visible + // dropdownButtonProps: DropdownButtonProps( + // isVisible: true, + // padding: EdgeInsets.zero, // remove default padding + // constraints: const BoxConstraints( + // // shrink icon tap area + // minWidth: 12, + // minHeight: 12, + // ), + // iconSize: 15, // smaller icon + // // icon: const Icon(Icons.arrow_drop_down), + // ), + // ), + // dropdownBuilder: (context, selectedItem) => Align( + // alignment: Alignment.centerLeft, + // child: Text( + // selectedItem != null ? selectedItem['name'].toString() : "", + // style: GoogleFonts.poppins(fontSize: 11, color: Colors.black), + // overflow: TextOverflow.ellipsis, + // maxLines: 1, + // softWrap: false, + // ), + // ), + // decoratorProps: DropDownDecoratorProps( + // decoration: + // AppInputDecorations.dropdownDecoration( + // label: "Select Broker", + // ).copyWith( + // filled: true, + // fillColor: + // Colors.white, // 👈 makes the dropdown input white + // isDense: true, + // border: OutlineInputBorder( + // borderRadius: BorderRadius.circular(5), + // borderSide: const BorderSide( + // color: Colors.black, + // width: 0.1, + // ), + // ), + // enabledBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(5), + // borderSide: const BorderSide( + // color: Colors.black, + // width: 0.1, + // ), + // ), + // contentPadding: EdgeInsets.symmetric( + // horizontal: 8, + // vertical: 6, + // ), + // ), + // ), + // + // popupProps: PopupProps.menu( + // fit: FlexFit.loose, + // constraints: BoxConstraints(maxHeight: 250), + // menuProps: MenuProps( + // backgroundColor: + // Colors.white, // 👈 sets dropdown background to white + // ), + // showSearchBox: true, + // searchFieldProps: TextFieldProps( + // decoration: InputDecoration( + // filled: true, + // fillColor: Colors.white, + // hintText: "Search Broker...", + // hintStyle: GoogleFonts.inter( + // fontSize: 12, + // color: Colors.black, + // ), + // enabledBorder: OutlineInputBorder( + // borderSide: BorderSide( + // color: Colors.white, + // ), // 👈 Normal border + // ), + // focusedBorder: OutlineInputBorder( + // borderSide: BorderSide( + // color: Colors.white, + // width: 1.5, + // ), // 👈 Focused border + // ), + // ), + // ), + // + // itemBuilder: (context, item, isDisabled, isSelected) { + // return Container( + // // color: isSelected ? Colors.blue.withOpacity(0.1) : null, + // padding: const EdgeInsets.symmetric( + // horizontal: 8, + // vertical: 3, + // ), + // child: Text( + // item['name'].toString(), + // style: GoogleFonts.inter(fontSize: 12, color: Colors.black), + // ), + // ); + // }, + // // constraints: BoxConstraints(), + // ), + // + // onChanged: (val) { + // if (val != null) { + // print("Selected Broker : ${val['name']}"); + // print("Id: ${val['id']}"); + // selectedBroker = val['id']; + // setState(() { + // selectedBrokerName = val['name']; + // print('selectedBrokerName - $selectedBrokerName'); + // }); + // // controllers['agentId']?.text = val['agent_code']; + // // agentId = agent['id']; + // } + // }, + // ), + // ), ], ); } Widget Paymentmode(BuildContext context) { return Row( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.end, // mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text('Payment Mode *', style: _textStyle), - SizedBox(width: 25), - ThemedFormField( - controller: controllers['policyPaymentMode']!, - borderColor: Color(0xFFE2E8F0), - highlightColor: Color(0xFF50A398), - errorBorderColor: Color(0xffEDF6F5), - hintText: 'Online / Cash', - // borderColor: Color(0xffEDF6F5), - validator: (value) => - Validators.requiredField(value, "policyPaymentMode"), - txtwidth: ResponsiveLayout.isMobile(context) - ? null - : MediaQuery.of(context).size.width * 0.07, + SizedBox(width: 15), + SizedBox( + width: MediaQuery.of(context).size.width * 0.075, + child: Text( + '${controllers['policyPaymentMode']?.text}', + style: GoogleFonts.inter(fontSize: 12), + ), ), + // ThemedFormField( + // controller: controllers['policyPaymentMode']!, + // // borderColor: Color(0xFFE2E8F0), + // borderColor: Colors.white, + // highlightColor: Colors.white, + // // highlightColor: Color(0xFF50A398), + // errorBorderColor: Color(0xffEDF6F5), + // hintText: 'Online / Cash', + // // borderColor: Color(0xffEDF6F5), + // readOnly: true, + // validator: (value) => + // Validators.requiredField(value, "policyPaymentMode"), + // txtwidth: ResponsiveLayout.isMobile(context) + // ? null + // : MediaQuery.of(context).size.width * 0.07, + // ), ], ); } @@ -1751,6 +1769,7 @@ class PolicyStaffTabState extends ConsumerState { ThemedUploadField( hintText: selectedPDFFileNames ?? "Upload Document", allowedExtensions: ['pdf'], + // backgroundColor: Colors.white, backgroundColor: Color(0xffEDF6F5), txtwidth: ResponsiveLayout.isMobile(context) ? null diff --git a/lib/presentation/screens/staff/Enquiry/tabs/quotationTab.dart b/lib/presentation/screens/staff/Enquiry/tabs/quotationTab.dart index 558b4b9..79a4592 100644 --- a/lib/presentation/screens/staff/Enquiry/tabs/quotationTab.dart +++ b/lib/presentation/screens/staff/Enquiry/tabs/quotationTab.dart @@ -215,11 +215,32 @@ class QuotationStaffTabState extends ConsumerState { originalData = getQuotationData; filteredData = List.from(originalData); - blockKey = getQuotationData.any( - (item) => item['status'] == 'Accepted', - ); + // dynamic data = getQuotationData + // .where((item) => item['status'] == 'Accepted') + // .toList(); + // blockKey = getQuotationData.any( + // (item) => item['status'] == 'Accepted', + // ); + + final acceptedList = getQuotationData + .where((item) => item['status'] == 'Accepted') + .toList(); + print('blockKey- $blockKey'); - // print('originalData - $getClaimPolicies'); + print('originalDataData - $acceptedList'); + + final data = acceptedList.isNotEmpty ? acceptedList.first : null; + + final id = selectedQuotationFrmListData?['id']; + + handleEdit(id, data); + + // selectedQuotationFrmListData = data; + + print('originalDatasdata- $data'); + print( + 'originalDataselectedQuotationFrmListData - $selectedQuotationFrmListData', + ); }); } else { getQuotationData = []; @@ -275,25 +296,25 @@ class QuotationStaffTabState extends ConsumerState { // scrollDirection: Axis.vertical, child: Column( children: [ - if (!blockKey) ...[ - // if (!blockKey && roleId != 'manager') ...[ - CreateProposalForm( - key: ValueKey(selectedQuotationFrmListId ?? "new"), - userId: userId, - selectedQuotationFrmListdata: selectedQuotationFrmListData, - selectedQuotationFrmListId: selectedQuotationFrmListId, - managerId: managerId, - selectedInsurdId: selectedInsurdId, - selectedEnquiryId: selectedEnquiryId, - onSubmit: (value) { - debugPrint("New Endorsement: $value"); - if (value == 'Success') { - refresh(); - } - }, - ), - SizedBox(height: 20), - ], + // if (!blockKey) ...[ + // if (!blockKey && roleId != 'manager') ...[ + CreateProposalForm( + key: ValueKey(selectedQuotationFrmListId ?? "new"), + userId: userId, + selectedQuotationFrmListdata: selectedQuotationFrmListData, + selectedQuotationFrmListId: selectedQuotationFrmListId, + managerId: managerId, + selectedInsurdId: selectedInsurdId, + selectedEnquiryId: selectedEnquiryId, + onSubmit: (value) { + debugPrint("New Endorsement: $value"); + if (value == 'Success') { + refresh(); + } + }, + ), + SizedBox(height: 20), + // ], ], ), // ), diff --git a/lib/presentation/screens/staff/Enquiry/tabs/tab.dart b/lib/presentation/screens/staff/Enquiry/tabs/tab.dart index a7ee84e..f668e17 100644 --- a/lib/presentation/screens/staff/Enquiry/tabs/tab.dart +++ b/lib/presentation/screens/staff/Enquiry/tabs/tab.dart @@ -116,9 +116,9 @@ class TabEnquiryStaffListState extends ConsumerState { TabItem("Policy", PolicyStaffTab()), ]; - if (widget.showKey == "Policy") { - tabs.add(TabItem("Policy", PolicyStaffTab())); - } + // if (widget.showKey == "Policy") { + // tabs.add(TabItem("Policy", PolicyStaffTab())); + // } // if (tabIndex != null) { // selectedIndex = tabIndex;