diff --git a/assets/searchData.jpg b/assets/searchData.jpg new file mode 100644 index 0000000..a1264ae Binary files /dev/null and b/assets/searchData.jpg differ diff --git a/lib/claimshistory.dart b/lib/claimshistory.dart index d3bfe01..135044c 100644 --- a/lib/claimshistory.dart +++ b/lib/claimshistory.dart @@ -31,7 +31,7 @@ class ClaimHistoryPopup extends StatefulWidget { class _ClaimHistoryPopupState extends State { late ApiService apiService; List> getClaimsHistoryList = []; - List stepKeys =[]; + List stepKeys = []; late Map stepMap; int _index = 4; @@ -71,7 +71,9 @@ class _ClaimHistoryPopupState extends State { // isLoading = false; }); setState(() { - getClaimsHistoryList = [Map.from(response['data']['ticket_data'])]; + getClaimsHistoryList = [ + Map.from(response['data']['ticket_data']) + ]; stepMap = getClaimsHistoryList[0]; stepKeys = stepMap.keys.toList(); print('Claims History List $getClaimsHistoryList'); @@ -178,10 +180,10 @@ class _ClaimHistoryPopupState extends State { children: [ Row( children: [ - Expanded( - child: _buildKeyValue( - 'Name', '${widget.empName ?? ''} (${widget.empCode ?? ''})'), - ), + Expanded( + child: _buildKeyValue('Name', + '${widget.empName ?? ''} (${widget.empCode ?? ''})'), + ), SizedBox(width: 16), Expanded( child: _buildKeyValue('Policy Name', @@ -197,7 +199,8 @@ class _ClaimHistoryPopupState extends State { ), SizedBox(width: 16), Expanded( - child: _buildKeyValue('Claim Number', widget.claimNo ?? ''), + child: _buildKeyValue( + 'Claim Number', widget.claimNo ?? ''), ), ], ), @@ -351,9 +354,9 @@ class _ClaimHistoryPopupState extends State { // Dotted line below circle (except for last step) if (!isLast) Container( - height: 50, // increase to extend line + height: 120, // increase to extend line width: 2, - margin: EdgeInsets.only(top: 4, bottom: 4), + // margin: EdgeInsets.only(top: 4, bottom: 4), child: CustomPaint( painter: DottedLinePainter(), ), @@ -394,7 +397,6 @@ class _ClaimHistoryPopupState extends State { // return '$status ($modifiedBy – $modifiedAt)'; // } - Widget _getStepTitleFromApi(String status, Map data) { final modifiedBy = data['modified_by'] ?? ''; final modifiedAt = data['modified_at'] ?? ''; @@ -423,7 +425,6 @@ class _ClaimHistoryPopupState extends State { ); } - Widget _getStepContentFromApi(Map data) { List rows = []; @@ -454,7 +455,7 @@ class _ClaimHistoryPopupState extends State { title, style: GoogleFonts.poppins( color: Color(0xFF747474), - fontWeight: FontWeight.w400, + fontWeight: FontWeight.w400, fontSize: 16, ), ), @@ -473,7 +474,7 @@ class _ClaimHistoryPopupState extends State { Widget _buildHistoryListData(String title, String value) { final displayValue = - (value == null || value.trim().isEmpty) ? 'N/A' : value; + (value == null || value.trim().isEmpty) ? 'N/A' : value; return Padding( padding: const EdgeInsets.symmetric(vertical: 6), // optional spacing @@ -514,7 +515,6 @@ class _ClaimHistoryPopupState extends State { ), ); } - } class DottedLinePainter extends CustomPainter { diff --git a/lib/email_verify.dart b/lib/email_verify.dart index 917b94e..b74a9c2 100644 --- a/lib/email_verify.dart +++ b/lib/email_verify.dart @@ -253,6 +253,7 @@ class _MyEmailVerifyState extends State { enrollmentClient_id = decodedToken['client_id']; prefs.setString('enrollmentClient_id', enrollmentClient_id); enrollmentHrId = decodedToken['id']; + print("enrollmentHrId- $enrollmentHrId"); prefs.setString('enrollmentHrId', enrollmentHrId); enrollmentAllowed_modules = decodedToken['allowed_modules']; prefs.setString( diff --git a/lib/excel_verification.dart b/lib/excel_verification.dart index 7e21b1a..b087139 100755 --- a/lib/excel_verification.dart +++ b/lib/excel_verification.dart @@ -8,6 +8,7 @@ import 'dart:convert'; import 'dart:async'; import 'package:http/http.dart' as http; import 'package:nhancepolicy/customAppBar/toastHelper.dart'; +import 'package:nhancepolicy/hrPolicyDetails.dart'; import 'package:nhancepolicy/models/environment.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:universal_html/html.dart' as html; @@ -512,7 +513,7 @@ class _excelVerifyState extends State { }); // ToastHelper.showSuccessToast( // context, 'Failed to upload file: ${response.reasonPhrase}'); - ToastHelper.showSuccessToast(context, 'Something went wrong'); + ToastHelper.showErrorToast(context, 'Something went wrong'); print('Failed to upload file: ${response.reasonPhrase}'); } } @@ -719,9 +720,43 @@ class _excelVerifyState extends State { // For Step 1: Check excelValidationStatus if (excelValidationStaus == 0) { // Navigate to hrPolicyDetails page - Navigator.pushNamed( - context, 'hrPolicyDetails', - arguments: argumentsData); + // Navigator.pushNamed( + // context, 'hrPolicyDetails', + // arguments: argumentsData); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + hrPolicyDetails( + ClientId: widget + .ClientId, // <-- from map + ClientPoliyId: + widget.ClientPoliyId, + clientBranchId: + widget.clientBranchId, + Token: widget.Token, + TokenType: + widget.TokenType, + cardType: widget.cardType, + cardPolicyNo: + widget.cardPolicyNo, + cardInsurer_name: widget + .cardInsurer_name, + cardPolicy_name: widget + .cardPolicy_name, + cardPolicy_ExpDate: widget + .cardPolicy_ExpDate, + + // Token: widget.Token, + // ClientId: widget.ClientId, + // ClientPolicyId : widget.ClientPoliyId, + // PolicyName: widget.cardPolicy_name, + // PolicyNo: widget.cardPolicyNo, + // ClientBranchId: widget.HrId, + // PolicyType: widget.cardType, + ), + ), + ); } // If excelValidationStatus is 1, button will be disabled (do nothing) } @@ -810,7 +845,7 @@ class _excelVerifyState extends State { child: Text( '${widget.cardPolicy_name} - (${widget.cardType})', textAlign: TextAlign.center, - style: TextStyle( + style: const TextStyle( fontSize: 20, fontWeight: FontWeight .w600, // Adjust the font size as needed @@ -922,7 +957,7 @@ class _excelVerifyState extends State { resetErrorCount(); }, child: - Row( + const Row( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -1022,6 +1057,7 @@ class _excelVerifyState extends State { ), isActive: _currentStep == 0, ), + Step( title: Text( 'Excel Validation', diff --git a/lib/hrDashboard.dart b/lib/hrDashboard.dart index 0dc6515..d33d488 100755 --- a/lib/hrDashboard.dart +++ b/lib/hrDashboard.dart @@ -566,48 +566,53 @@ class _hrDashboardState extends State ), SizedBox(height: 8), - Container( - // padding: const EdgeInsets.all(5), - // height: MediaQuery.of(context).size.height * 0.08, - decoration: BoxDecoration( - color: - Color(0xFFC4E3E6), // 🔹 Background behind the TabBar - borderRadius: BorderRadius.circular(12), - border: Border.all(color: Colors.transparent), - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.15), - blurRadius: 4, - offset: const Offset(0, 4), + + tabData.isNotEmpty + ? Container( + // padding: const EdgeInsets.all(5), + // height: MediaQuery.of(context).size.height * 0.08, + decoration: BoxDecoration( + color: Color( + 0xFFC4E3E6), // 🔹 Background behind the TabBar + borderRadius: BorderRadius.circular(12), + border: Border.all(color: Colors.transparent), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.15), + blurRadius: 4, + offset: const Offset(0, 4), + ), + ], + ), + child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // mainAxisSize: MainAxisSize.min, + children: [ + TabBar( + controller: _tabController, + isScrollable: true, + labelPadding: EdgeInsets.zero, + dividerColor: Colors.transparent, + indicatorColor: Colors.transparent, + indicatorPadding: EdgeInsets.zero, + labelColor: Colors.white, + unselectedLabelColor: const Color(0xFF828282), + // tabs: visibleTabs, + tabs: List.generate(tabData.length, (index) { + final data = tabData[index]; + return CustomTab( + icon: data['icon'], + label: data['label'], + isSelected: selectedIndex == index, + ); + }), + ), + ], + ), + ) + : const Center( + child: Text("No Data Available"), ), - ], - ), - child: Row( - // mainAxisAlignment: MainAxisAlignment.center, - // mainAxisSize: MainAxisSize.min, - children: [ - TabBar( - controller: _tabController, - isScrollable: true, - labelPadding: EdgeInsets.zero, - dividerColor: Colors.transparent, - indicatorColor: Colors.transparent, - indicatorPadding: EdgeInsets.zero, - labelColor: Colors.white, - unselectedLabelColor: const Color(0xFF828282), - // tabs: visibleTabs, - tabs: List.generate(tabData.length, (index) { - final data = tabData[index]; - return CustomTab( - icon: data['icon'], - label: data['label'], - isSelected: selectedIndex == index, - ); - }), - ), - ], - ), - ), SizedBox(height: 16), // Expanded TabBarView Expanded( diff --git a/lib/service/api_service.dart b/lib/service/api_service.dart index c9c2701..0f86db3 100755 --- a/lib/service/api_service.dart +++ b/lib/service/api_service.dart @@ -414,12 +414,13 @@ class ApiService { Future> getCashDepositDetailsToApi( String clintID, String empRefId, String hr_id, String token) async { print("getCashDepositDetailsToApi1"); + print("HRID- $hr_id"); if (token == null) { await _initializeToken(); } final url = Uri.parse( - '${Environment.apiUrl}getPolicyLevelEmployeeSummaryData?client_id=$clintID&client_branch_id=$empRefId&hr_id=470'); + '${Environment.apiUrl}getPolicyLevelEmployeeSummaryData?client_id=$clintID&client_branch_id=$empRefId&hr_id=$hr_id'); final headers = { 'Authorization': 'Bearer $token' ?? '', @@ -508,7 +509,7 @@ class ApiService { } Future> getClaimsHistoryToApi( - String ticket_type_id,String token) async { + String ticket_type_id, String token) async { print("getCashDepositDetailsToApi1"); final url = Uri.parse( '${Environment.apiUrlPost}claimView?ticket_id=$ticket_type_id'); diff --git a/lib/service/hrDashboardTabs/claims.dart b/lib/service/hrDashboardTabs/claims.dart index 49071ab..b284c18 100644 --- a/lib/service/hrDashboardTabs/claims.dart +++ b/lib/service/hrDashboardTabs/claims.dart @@ -1426,7 +1426,7 @@ class _ClaimsPolicieState extends State { ), style: ElevatedButton.styleFrom( backgroundColor: Color(0xFFE26728), - padding: EdgeInsets.symmetric(horizontal: 34, vertical: 14), + padding: EdgeInsets.symmetric(horizontal: 4, vertical: 14), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), @@ -1452,7 +1452,7 @@ class _ClaimsPolicieState extends State { ), style: ElevatedButton.styleFrom( backgroundColor: Color(0xFFE26728), - padding: EdgeInsets.symmetric(horizontal: 34, vertical: 14), + padding: EdgeInsets.symmetric(horizontal: 4, vertical: 14), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), diff --git a/lib/service/hrDashboardTabs/preEnrollment.dart b/lib/service/hrDashboardTabs/preEnrollment.dart index 9025c4a..6aef82b 100644 --- a/lib/service/hrDashboardTabs/preEnrollment.dart +++ b/lib/service/hrDashboardTabs/preEnrollment.dart @@ -182,12 +182,22 @@ class _PreEnrollmentState extends State { child: getCardArrays.isEmpty ? Center( - child: Text( - 'No data found', - style: TextStyle( - fontSize: 16, - color: Colors.grey.shade600, - ), + child: Column( + children: [ + Image.asset( + 'assets/searchData.jpg', // Replace 'default_image.png' with your default image asset path + width: 200, + height: 200, + fit: BoxFit.cover, + ), + Text( + 'No data found', + style: TextStyle( + fontSize: 16, + color: Colors.grey.shade600, + ), + ), + ], ), ) : GridView.builder( @@ -289,8 +299,10 @@ class _PreEnrollmentState extends State { ), ), Text( - "${policy['insurer_short_name']} - ${policy['policy_name']} " ?? - '', + // "${policy['insurer_short_name']} - ${policy['policy_name']} " ?? + // '', + + policy['insurer_name'] ?? "", style: const TextStyle( fontSize: 11, color: Colors.grey, diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 2ce5852..ff40429 100755 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,7 @@ import FlutterMacOS import Foundation +import file_picker import firebase_auth import firebase_core import google_sign_in_ios @@ -14,6 +15,7 @@ import smart_auth import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))