diff --git a/.env.production b/.env.production old mode 100755 new mode 100644 diff --git a/.env.test b/.env.test old mode 100755 new mode 100644 diff --git a/.env.uat b/.env.uat old mode 100755 new mode 100644 diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 diff --git a/.metadata b/.metadata old mode 100755 new mode 100644 diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/analysis_options.yaml b/analysis_options.yaml old mode 100755 new mode 100644 diff --git a/android/.gitignore b/android/.gitignore old mode 100755 new mode 100644 diff --git a/android/app/build.gradle b/android/app/build.gradle old mode 100755 new mode 100644 diff --git a/android/app/google-services.json b/android/app/google-services.json old mode 100755 new mode 100644 diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml old mode 100755 new mode 100644 diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml old mode 100755 new mode 100644 diff --git a/android/app/src/main/kotlin/com/example/nhancepolicy/MainActivity.kt b/android/app/src/main/kotlin/com/example/nhancepolicy/MainActivity.kt old mode 100755 new mode 100644 diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml old mode 100755 new mode 100644 diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml old mode 100755 new mode 100644 diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png old mode 100755 new mode 100644 diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png old mode 100755 new mode 100644 diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png old mode 100755 new mode 100644 diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png old mode 100755 new mode 100644 diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png old mode 100755 new mode 100644 diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml old mode 100755 new mode 100644 diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml old mode 100755 new mode 100644 diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml old mode 100755 new mode 100644 diff --git a/android/build.gradle b/android/build.gradle old mode 100755 new mode 100644 diff --git a/android/gradle.properties b/android/gradle.properties old mode 100755 new mode 100644 diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties old mode 100755 new mode 100644 diff --git a/android/settings.gradle b/android/settings.gradle old mode 100755 new mode 100644 diff --git a/assets/Group_3.png b/assets/Group_3.png old mode 100755 new mode 100644 diff --git a/assets/Nhance-Logo-Final 1.png b/assets/Nhance-Logo-Final 1.png old mode 100755 new mode 100644 diff --git a/assets/Solid_gray.png b/assets/Solid_gray.png old mode 100755 new mode 100644 diff --git a/assets/Template_File.xlsx b/assets/Template_File.xlsx old mode 100755 new mode 100644 index e05bfdb..97cd319 Binary files a/assets/Template_File.xlsx and b/assets/Template_File.xlsx differ diff --git a/assets/Vector.png b/assets/Vector.png old mode 100755 new mode 100644 diff --git a/assets/hrLogin.jpg b/assets/hrLogin.jpg old mode 100755 new mode 100644 diff --git a/assets/login_web.jpg b/assets/login_web.jpg old mode 100755 new mode 100644 diff --git a/assets/mobileViewLogo.png b/assets/mobileViewLogo.png old mode 100755 new mode 100644 diff --git a/assets/navbarLogo.png b/assets/navbarLogo.png old mode 100755 new mode 100644 diff --git a/assets/nhance-loader.gif b/assets/nhance-loader.gif old mode 100755 new mode 100644 diff --git a/assets/nhance_client_logo.png b/assets/nhance_client_logo.png old mode 100755 new mode 100644 diff --git a/assets/policy.png b/assets/policy.png old mode 100755 new mode 100644 diff --git a/build_web_test.sh b/build_web_test.sh old mode 100755 new mode 100644 diff --git a/build_web_uat.sh b/build_web_uat.sh old mode 100755 new mode 100644 diff --git a/ios/.gitignore b/ios/.gitignore old mode 100755 new mode 100644 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist old mode 100755 new mode 100644 diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig old mode 100755 new mode 100644 diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig old mode 100755 new mode 100644 diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png old mode 100755 new mode 100644 diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md old mode 100755 new mode 100644 diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard.xml old mode 100755 new mode 100644 similarity index 100% rename from ios/Runner/Base.lproj/LaunchScreen.storyboard rename to ios/Runner/Base.lproj/LaunchScreen.storyboard.xml diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard.xml old mode 100755 new mode 100644 similarity index 100% rename from ios/Runner/Base.lproj/Main.storyboard rename to ios/Runner/Base.lproj/Main.storyboard.xml diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist old mode 100755 new mode 100644 diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h old mode 100755 new mode 100644 diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift old mode 100755 new mode 100644 diff --git a/lib.zip b/lib.zip old mode 100755 new mode 100644 diff --git a/lib/addons.dart b/lib/addons.dart old mode 100755 new mode 100644 diff --git a/lib/branch/branch_selection_page.dart b/lib/branch/branch_selection_page.dart index cfc1529..168dda1 100644 --- a/lib/branch/branch_selection_page.dart +++ b/lib/branch/branch_selection_page.dart @@ -154,7 +154,7 @@ class _BranchSelectionPageState extends State { } else { // Desktop crossAxisCount = 3; - childAspectRatio = 5; + childAspectRatio = 5 ; } return Scaffold( backgroundColor: Color(0xFFEFF3F6), diff --git a/lib/customAppBar/customAppBar.dart b/lib/customAppBar/customAppBar.dart old mode 100755 new mode 100644 diff --git a/lib/customAppBar/customAppBarChatbot.dart b/lib/customAppBar/customAppBarChatbot.dart old mode 100755 new mode 100644 diff --git a/lib/customAppBar/customFooter.dart b/lib/customAppBar/customFooter.dart old mode 100755 new mode 100644 diff --git a/lib/customAppBar/enrollmentAppBar.dart b/lib/customAppBar/enrollmentAppBar.dart old mode 100755 new mode 100644 diff --git a/lib/customAppBar/toastHelper.dart b/lib/customAppBar/toastHelper.dart old mode 100755 new mode 100644 diff --git a/lib/email_verify.dart b/lib/email_verify.dart index cd54468..2f8c0e4 100644 --- a/lib/email_verify.dart +++ b/lib/email_verify.dart @@ -117,10 +117,23 @@ class _MyEmailVerifyState extends State { Map data = json.decode(response.body); print('Response data: $data'); + // ✅ Safely extract preEnrollmentData + List preEnrollmentData = []; + if (data['data'] is List) { + preEnrollmentData = data['data']; + } + + // ✅ Safely extract postEnrollmentData + final postEnrollment = data['post_enrollment'] ?? {}; + List postEnrollmentData = []; + if (postEnrollment['data'] is List) { + postEnrollmentData = postEnrollment['data']; + } + // Extract enrollment data - List preEnrollmentData = data['data'] ?? []; - Map postEnrollment = data['post_enrollment'] ?? {}; - List postEnrollmentData = postEnrollment['data'] ?? []; + // List preEnrollmentData = data['data'] ?? []; + // Map postEnrollment = data['post_enrollment'] ?? {}; + // List postEnrollmentData = postEnrollment['data'] ?? []; // Save to global storage final tokenStorage = TokenStorageService(); diff --git a/lib/empDetails.dart b/lib/empDetails.dart old mode 100755 new mode 100644 diff --git a/lib/empReview.dart b/lib/empReview.dart old mode 100755 new mode 100644 diff --git a/lib/excel_verification.dart b/lib/excel_verification.dart old mode 100755 new mode 100644 index 77dde9a..4200bad --- a/lib/excel_verification.dart +++ b/lib/excel_verification.dart @@ -20,6 +20,7 @@ import 'package:intl/intl.dart'; import 'package:csv/csv.dart'; import 'package:spreadsheet_decoder/spreadsheet_decoder.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'customAppBar/customFooter.dart'; @@ -581,6 +582,29 @@ class _excelVerifyState extends State { anchor.click(); // Trigger a click on the anchor element } + // Future downloadSampleFile() async { + // + // final response = await apiService.getSampleFileDownload(widget.Token); + // print('check 1'); + // if (response['status'] == 'success') { + // final url = response['data']; + // _launchURL(url); + // } else { + // ToastHelper.showErrorToast(context, '⚠️ Unknown response format'); + // print('⚠️ Unknown response format'); + // } + // } + // + // Future _launchURL(String url) async { + // print('url $url'); + // try { + // final Uri uri = Uri.parse(url); + // await launchUrl(uri, mode: LaunchMode.externalApplication); + // } catch (e) { + // print('Could not launch URL: $e'); + // } + // } + resetErrorCount() { setState(() { fileBytes = null; diff --git a/lib/firebase-config.dart b/lib/firebase-config.dart old mode 100755 new mode 100644 diff --git a/lib/home.dart b/lib/home.dart old mode 100755 new mode 100644 diff --git a/lib/hrDashboard.dart b/lib/hrDashboard.dart old mode 100755 new mode 100644 index a0a84b1..3cb8e91 --- a/lib/hrDashboard.dart +++ b/lib/hrDashboard.dart @@ -48,6 +48,7 @@ class _hrDashboardState extends State String? _postToken = ''; late String _token; dynamic getPolicyNo; + dynamic branchName; // bool _isLoading = false; dynamic getPolicyNameDetails; dynamic enrollmentClient_id; @@ -131,7 +132,7 @@ class _hrDashboardState extends State _postToken = await tokenService.getCurrentToken(); print(enrollToken); print(_postToken); - + branchName = prefs.getString('branchName') ?? ''; if (enrollToken != null && enrollToken!.isNotEmpty) { // Map? decodedToken = Jwt.parseJwt(enrollToken!); @@ -499,10 +500,48 @@ class _hrDashboardState extends State }; }); + Future _showLogoutDialog() async { + return await showDialog( + context: context, + barrierDismissible: false, + builder: (context) => AlertDialog( + title: Text("Confirm Logout"), + content: Text("Do you want to logout?"), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: Text("Cancel"), + ), + TextButton( + onPressed: () => Navigator.of(context).pop(true), + child: Text("Logout"), + ), + ], + ), + ) ?? + false; + } + @override Widget build(BuildContext context) { if (getCardArrays == []) { - return Scaffold( + return PopScope( + canPop: false, // ✅ Prevents automatic back navigation + onPopInvoked: (didPop) async { + // This is triggered when browser back button is pressed + bool logout = await _showLogoutDialog(); + + if (logout) { + // ✅ Clear storage & logout + // Example: + // await storage.clear(); + final prefs = await SharedPreferences.getInstance(); + prefs.clear(); + print('LocalStorage Cleared'); + Navigator.pushNamed(context, 'hrLogin'); + } + }, + child: Scaffold( appBar: CustomAppBar(), body: SingleChildScrollView( child: Container( @@ -515,7 +554,7 @@ class _hrDashboardState extends State ], ), ), - )); + ))); } else { int numCards = getCardArrays.length; int numExpanded = numCards < 4 ? numCards : 4; @@ -525,199 +564,238 @@ class _hrDashboardState extends State print("visibleTabAll - $visibleTabs"); print("tabViewsAll - $tabViews"); + return PopScope( + canPop: false, // ✅ Prevents automatic back navigation + onPopInvoked: (didPop) async { + // This is triggered when browser back button is pressed + bool logout = await _showLogoutDialog(); - return Scaffold( - appBar: CustomAppBar(), - body: Stack(children: [ - Container( - padding: const EdgeInsets.only( - top: 20, bottom: 40, left: 40, right: 40), + if (logout) { + // ✅ Clear storage & logout + // Example: + // await storage.clear(); + final prefs = await SharedPreferences.getInstance(); + prefs.clear(); + print('LocalStorage Cleared'); + Navigator.pushNamed(context, 'hrLogin'); + } + }, + child: Scaffold( + appBar: CustomAppBar(), + body: Stack(children: [ + Container( + padding: const EdgeInsets.only( + top: 20, bottom: 40, left: 40, right: 40), - // padding: const EdgeInsets.only( - // top: 20, bottom: 20, left: 50, right: 50), - color: const Color(0xFFEFF3F6), - child: Column( - children: [ - Container( - color: Colors.white, - width: double.infinity, - // height: 75, - height: MediaQuery.of(context).size.height * 0.12, + // padding: const EdgeInsets.only( + // top: 20, bottom: 20, left: 50, right: 50), + color: const Color(0xFFEFF3F6), + child: Column( + children: [ + Container( + color: Colors.white, + width: double.infinity, + // height: 75, + height: MediaQuery.of(context).size.height * 0.12, - padding: Responsive.isDesktop(context) - ? const EdgeInsets.only( + padding: Responsive.isDesktop(context) + ? const EdgeInsets.only( top: 10, bottom: 10, left: 20, right: 20) - : EdgeInsets.only( + : EdgeInsets.only( top: 10, bottom: 10, left: 10, right: 10), // Add padding to the container - child: Row( - children: [ - Expanded( - flex: 6, - child: Container( - width: 150, - height: 80, - alignment: Alignment.centerLeft, - child: Image.network( - Uri.encodeFull(clientLogo ?? ''), - width: 200, - height: 200, - fit: BoxFit.contain, - frameBuilder: (BuildContext context, Widget child, int? frame, bool wasSynchronouslyLoaded) { - if (wasSynchronouslyLoaded) { - return child; - } - return AnimatedOpacity( - opacity: frame == null ? 0 : 1, - duration: const Duration(milliseconds: 500), - curve: Curves.easeOut, - child: child, - ); - }, - loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent? loadingProgress) { - if (loadingProgress == null) { - return child; - } - return Center( - child: SizedBox( - width: 30, - height: 30, - child: CircularProgressIndicator( - strokeWidth: 2, - valueColor: AlwaysStoppedAnimation(Colors.grey), - value: loadingProgress.expectedTotalBytes != null - ? loadingProgress.cumulativeBytesLoaded / - (loadingProgress.expectedTotalBytes ?? 1) - : null, + child: Row( + children: [ + Expanded( + flex: 6, + child: Container( + width: 150, + height: 80, + alignment: Alignment.centerLeft, + child: Image.network( + Uri.encodeFull(clientLogo ?? ''), + width: 200, + height: 200, + fit: BoxFit.contain, + frameBuilder: (BuildContext context, Widget child, int? frame, bool wasSynchronouslyLoaded) { + if (wasSynchronouslyLoaded) { + return child; + } + return AnimatedOpacity( + opacity: frame == null ? 0 : 1, + duration: const Duration(milliseconds: 500), + curve: Curves.easeOut, + child: child, + ); + }, + loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent? loadingProgress) { + if (loadingProgress == null) { + return child; + } + return Center( + child: SizedBox( + width: 30, + height: 30, + child: CircularProgressIndicator( + strokeWidth: 2, + valueColor: AlwaysStoppedAnimation(Colors.grey), + value: loadingProgress.expectedTotalBytes != null + ? loadingProgress.cumulativeBytesLoaded / + (loadingProgress.expectedTotalBytes ?? 1) + : null, + ), + ), + ); + }, + errorBuilder: (BuildContext context, Object error, StackTrace? stackTrace) { + return Text(''); + // Image.asset( + // 'assets/Solid_gray.png', + // width: 80, + // height: 60, + // fit: BoxFit.cover, + // ); + }, + ), + ), + ), + Expanded( + flex: 9, + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, // right aligned + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // ⭐ Client Name + Text( + clientName ?? '', + textAlign: TextAlign.right, + style: GoogleFonts.poppins( + fontSize: Responsive.isDesktop(context) ? 20 : 18, + fontWeight: FontWeight.w600, ), ), - ); - }, - errorBuilder: (BuildContext context, Object error, StackTrace? stackTrace) { - return Text(''); - // Image.asset( - // 'assets/Solid_gray.png', - // width: 80, - // height: 60, - // fit: BoxFit.cover, - // ); - }, - ), - ), + + const SizedBox(height: 20), + + // ⭐ Branch Name (new line) + Text( + 'Branch: ${branchName}' ?? '', + textAlign: TextAlign.right, + style: GoogleFonts.poppins( + fontSize: Responsive.isDesktop(context) ? 16 : 14, + fontWeight: FontWeight.w400, + color: Colors.grey[700], + ), + ), + ], + ), + ) + + ], ), - Expanded( - flex: 9, - child: Text( - clientName ?? '', - textAlign: TextAlign.right, - style: GoogleFonts.poppins( - fontSize: Responsive.isDesktop(context) ? 20 : 18, - fontWeight: FontWeight.w600, - ), - ), - ) - ], - ), - ), - - SizedBox(height: 8), - - 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, - ); - }), - ), - ], - ), - ) - : Container( - height: MediaQuery.of(context).size.height * 0.6, - // color: Colors.white, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'assets/claimsData.png', // Replace 'default_image.png' with your default image asset path - width: 300, - height: 300, - fit: BoxFit.cover, - ), - const Text("No Data Available"), - ], - ), - ), - - SizedBox(height: 16), - // Expanded TabBarView - Expanded( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 5), - child: TabBarView( - controller: _tabController, - children: getTabViews(), - // children: tabViews, ), - ), + + SizedBox(height: 8), + + 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, + ); + }), + ), + ], + ), + ) + : Container( + height: MediaQuery.of(context).size.height * 0.6, + // color: Colors.white, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/claimsData.png', // Replace 'default_image.png' with your default image asset path + width: 300, + height: 300, + fit: BoxFit.cover, + ), + const Text("No Data Available"), + ], + ), + ), + + SizedBox(height: 16), + // Expanded TabBarView + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 5), + child: TabBarView( + controller: _tabController, + children: getTabViews(), + // children: tabViews, + ), + ), + ), + ], ), - ], - ), - ), - if (isLoading) - Container( - color: Color(0x98FFFCE5), // Semi-transparent background - child: Center( - child: // Your GIF loader widget + ), + if (isLoading) + Container( + color: Color(0x98FFFCE5), // Semi-transparent background + child: Center( + child: // Your GIF loader widget Image.asset( height: 60, width: 60, 'assets/nhance-loader.gif'), // Adjust path to your GIF loader + ), + ), + Align( + alignment: Alignment.bottomCenter, + child: Container( + width: double.infinity, // Make the footer full width + child: CustomFooter(), + ), ), - ), - Align( - alignment: Alignment.bottomCenter, - child: Container( - width: double.infinity, // Make the footer full width - child: CustomFooter(), - ), - ), - ])); + ])) + ); + + } } diff --git a/lib/hrHome.dart b/lib/hrHome.dart old mode 100755 new mode 100644 diff --git a/lib/hrLogin.dart b/lib/hrLogin.dart old mode 100755 new mode 100644 index 1167a26..6d9acd9 --- a/lib/hrLogin.dart +++ b/lib/hrLogin.dart @@ -24,9 +24,10 @@ class MyHrLogin extends StatefulWidget { } class _MyPhoneState extends State { - final TextEditingController emailController = TextEditingController(); - TextEditingController countryController = TextEditingController(); - TextEditingController mobileController = TextEditingController(); + final TextEditingController emailMobileController = TextEditingController(); + // final TextEditingController emailController = TextEditingController(); + // TextEditingController countryController = TextEditingController(); + // TextEditingController mobileController = TextEditingController(); final _formKey = GlobalKey(); bool _isCheckingToken = false; dynamic empMobileNo; @@ -42,7 +43,7 @@ class _MyPhoneState extends State { @override void initState() { print('vndbbcbdskbvkjs1'); - countryController.text = "+91"; + // countryController.text = "+91"; super.initState(); clearLocalStorageWhenStarts('initState'); } @@ -74,14 +75,30 @@ class _MyPhoneState extends State { _isLoading = true; }); + String input = emailMobileController.text.trim(); + + bool isEmail = RegExp(r'^[^@]+@[^@]+\.[^@]+$').hasMatch(input); + bool isMobile = RegExp(r'^[0-9]{10}$').hasMatch(input); + + if (isEmail) { + setState(() { + isEmailFieldVisible = true; + }); + print("User entered Email: $input"); + } else if (isMobile) { + isEmailFieldVisible = false; + print("User entered Mobile: $input"); + } + + // Determine the API and the payload based on the visible field String apiEndpoint = isEmailFieldVisible ? Environment.apiUrl + 'verifyHrWithEmail' : Environment.apiUrl + 'verifyHrWithMobileNumber'; Map payload = isEmailFieldVisible - ? {'email': emailController.text} - : {'mobile_number': mobileController.text}; + ? {'email': emailMobileController.text} + : {'mobile_number': emailMobileController.text}; // var enteredMobileNumber = mobileController.text; final response = await http.post( @@ -101,28 +118,28 @@ class _MyPhoneState extends State { await SharedPreferences.getInstance(); if (isEmailFieldVisible) { print('isEmailFieldVisible $isEmailFieldVisible'); - prefs.setString('empEmail', emailController.text); - print('${emailController.text}'); + prefs.setString('empEmail', emailMobileController.text); + print('${emailMobileController.text}'); ToastHelper.showSuccessToast( - context, 'Verification code sent to ${emailController.text}'); + context, 'Verification code sent to ${emailMobileController.text}'); Navigator.push( context, MaterialPageRoute( builder: (context) => MyEmailVerify( type: 'email', - value: emailController.text.trim(), // Pass the phone number + value: emailMobileController.text.trim(), // Pass the phone number ), ), ); } else { ToastHelper.showSuccessToast( - context, 'Verification code sent to ${emailController.text}'); + context, 'Verification code sent to ${emailMobileController.text}'); Navigator.push( context, MaterialPageRoute( builder: (context) => MyEmailVerify( type: 'mobile', - value: mobileController.text.trim(), // Pass the phone number + value: emailMobileController.text.trim(), // Pass the phone number ), ), ); @@ -556,140 +573,112 @@ class _MyPhoneState extends State { ), Column( children: [ - isEmailFieldVisible - ? Container( - height: 55, - margin: Responsive.isDesktop( - context) - ? EdgeInsets.symmetric( - horizontal: 150) - : EdgeInsets.symmetric( - horizontal: 0), - decoration: BoxDecoration( - border: Border.all( - width: 1, - color: Colors.grey), - borderRadius: - BorderRadius.circular(10), - ), - child: TextFormField( - controller: emailController, - keyboardType: TextInputType - .emailAddress, - decoration: InputDecoration( - border: InputBorder.none, - hintText: - "Enter your email", - contentPadding: - EdgeInsets.symmetric( - horizontal: 10), - ), - validator: (value) { - if (value == null || - value.isEmpty) { - return 'Please enter your email'; - } - if (!RegExp( - r'^[^@]+@[^@]+\.[^@]+') - .hasMatch(value)) { - return 'Please enter a valid email'; - } - return null; - }, - ), - ) - : Container( - height: 55, - margin: Responsive.isDesktop( - context) - ? EdgeInsets.symmetric( - horizontal: 150) - : EdgeInsets.symmetric( - horizontal: 0), - decoration: BoxDecoration( - border: Border.all( - width: 1, - color: Colors.grey), - borderRadius: - BorderRadius.circular(10), - ), - child: Row( - children: [ - SizedBox(width: 10), - SizedBox( - width: 40, - child: TextField( - controller: - countryController, - keyboardType: - TextInputType - .number, - decoration: - InputDecoration( - border: - InputBorder.none, - ), - ), - ), - Text( - "|", - style: TextStyle( - fontSize: 33, - color: Colors.grey), - ), - SizedBox(width: 10), - Expanded( - child: TextFormField( - controller: - mobileController, - keyboardType: - TextInputType.phone, - decoration: - InputDecoration( - border: - InputBorder.none, - hintText: - "Enter your mobile number", - ), - validator: (value) { - if (value == null || - value.isEmpty) { - return 'Please enter your mobile number'; - } - if (value.length != - 10) { - return 'Mobile number must be 10 digits'; - } - return null; - }, - inputFormatters: [ - FilteringTextInputFormatter - .digitsOnly, - LengthLimitingTextInputFormatter( - 10), - ], - ), - ), - ], - ), + Container( + height: 55, + margin: Responsive.isDesktop(context) + ? const EdgeInsets.symmetric(horizontal: 150) + : const EdgeInsets.symmetric(horizontal: 0), + decoration: BoxDecoration( + border: Border.all(width: 1, color: Colors.grey), + borderRadius: BorderRadius.circular(10), + ), + child: TextFormField( + controller: emailMobileController, + keyboardType: TextInputType.text, + decoration: const InputDecoration( + border: InputBorder.none, + hintText: "Email / Mobile Number ", + contentPadding: EdgeInsets.symmetric(horizontal: 10), ), + validator: (value) { + if (value == null || value.trim().isEmpty) { + return "Please enter email or mobile number"; + } + + String input = value.trim(); + + // ❌ Reject all spaces + if (input.contains(' ')) { + return "No spaces allowed"; + } + + final emailRegex = RegExp(r'^[^@]+@[^@]+\.[^@]+$'); + final mobileRegex = RegExp(r'^[0-9]{10}$'); + + bool isEmailFormat = emailRegex.hasMatch(input); + bool isMobileFormat = mobileRegex.hasMatch(input); + + // --------------------------- + // 🛑 MOBILE VALIDATION + // --------------------------- + if (RegExp(r'^[0-9]+$').hasMatch(input)) { + if (input.length != 10) { + return "Mobile number must be exactly 10 digits"; + } + } + + // --------------------------- + // 🛑 EMAIL VALIDATION + // --------------------------- + + // Reject anything that has '@' but is NOT a valid email format + if (input.contains('@') && !isEmailFormat) { + return "Enter a valid email address"; + } + + // Reject email with extra digits at the end + if (input.contains('@') && RegExp(r'\d+$').hasMatch(input)) { + return "Email cannot contain extra numbers"; + } + + // Reject email+mobile combination + if (input.contains('@') && RegExp(r'\d{10}$').hasMatch(input)) { + return "Enter only email OR mobile number"; + } + + // --------------------------- + // 🛑 MIXED CONTENT (letters + digits but NOT email) + // --------------------------- + bool hasLetters = RegExp(r'[A-Za-z]').hasMatch(input); + bool hasDigits = RegExp(r'[0-9]').hasMatch(input); + + if ((hasLetters && hasDigits) && !input.contains('@')) { + return "Enter only email OR 10-digit mobile number"; + } + + // --------------------------- + // 🟢 FINAL CHECK + // --------------------------- + if (!isEmailFormat && !isMobileFormat) { + return "Enter a valid email or 10-digit mobile number"; + } + + return null; + } + + ), + ), SizedBox(height: 15), Container( - margin: Responsive.isDesktop(context) + margin: Responsive.isDesktop( + context) ? EdgeInsets.symmetric( - horizontal: 150) + horizontal: 150) : EdgeInsets.symmetric( - horizontal: 0), + horizontal: 0), child: SizedBox( width: double.infinity, height: 45, child: ElevatedButton( - style: ElevatedButton.styleFrom( + style: ElevatedButton + .styleFrom( backgroundColor: - Color(0xFF00989E), - shape: RoundedRectangleBorder( + Color(0xFF00989E), + shape: + RoundedRectangleBorder( borderRadius: - BorderRadius.circular(10), + BorderRadius + .circular(10), ), ), onPressed: _isLoading @@ -697,40 +686,37 @@ class _MyPhoneState extends State { : verifyMobileAndEmailNumber, child: _isLoading ? CircularProgressIndicator( - valueColor: - AlwaysStoppedAnimation< - Color>( - Color(0xFF00989E), - ), - ) - : Text( - isEmailFieldVisible - ? "Login with Email OTP" - : "Login with Mobile OTP", - style: - GoogleFonts.poppins( - color: - Color(0xFFFFFFFF), - ), - ), - ), - ), - ), - SizedBox(height: 15), - MouseRegion( - cursor: SystemMouseCursors.click, - child: GestureDetector( - onTap: toggleField, - child: Text( - isEmailFieldVisible - ? "Login with Mobile No" - : "Login with Email", - style: TextStyle( - color: Color(0xFF00989E), + valueColor: + AlwaysStoppedAnimation< + Color>( + Color(0xFF00989E), + ), + ) + : Text( "Login with Email / Mobile OTP", + style: GoogleFonts + .poppins( + color: Color( + 0xFFFFFFFF), + ), ), ), ), ), + SizedBox(height: 15), + // MouseRegion( + // cursor: SystemMouseCursors.click, + // child: GestureDetector( + // onTap: toggleField, + // child: Text( + // isEmailFieldVisible + // ? "Login with Mobile No" + // : "Login with Email", + // style: TextStyle( + // color: Color(0xFF00989E), + // ), + // ), + // ), + // ), ], ), SizedBox( diff --git a/lib/hrPolicyDetails.dart b/lib/hrPolicyDetails.dart old mode 100755 new mode 100644 index 25349bd..9000e8b --- a/lib/hrPolicyDetails.dart +++ b/lib/hrPolicyDetails.dart @@ -174,6 +174,27 @@ class _HrPolicyDetailsState extends State } } + Future getEcardDownload(String? empCode,String? empId,String? clientPolicyId,String? policyNo) async { + final eCarDParams = { + 'id': empId, + 'emp_code': empCode, + 'client_policy_id': clientPolicyId, + 'policy_no': policyNo + }; + final response = await apiService.getEcardRequest(eCarDParams,widget.Token); + print('check 1'); + final ecardDownloadUrl = response['data']['eCardDownload']; + final message = response['data']['message']; + if (ecardDownloadUrl != null) { + print('✅ Link: $ecardDownloadUrl'); + await _launchURL(ecardDownloadUrl); // Only launch if status is success + // ToastHelper.showSuccessToast(context, message); + } else { + print('❌ Error: $message'); + ToastHelper.showErrorToast(context, message); + } + } + Future _launchURL(String url) async { final Uri uri = Uri.parse(url); // Parse the URL properly print('_launchURL $uri'); @@ -933,7 +954,7 @@ class _HrPolicyDetailsState extends State padding: const EdgeInsets.symmetric(horizontal: 4.0), child: GestureDetector( onTap: () { - _launchURL(item['ecard_download_link']); + getEcardDownload(item['emp_code'],item['employee_id'],item['client_policy_id'],item['policy_no']); }, child: Container( height: 40, diff --git a/lib/hrVerify.dart b/lib/hrVerify.dart old mode 100755 new mode 100644 diff --git a/lib/main.dart b/lib/main.dart old mode 100755 new mode 100644 diff --git a/lib/models/environment.dart b/lib/models/environment.dart old mode 100755 new mode 100644 diff --git a/lib/models/platform_helper_mobile.dart b/lib/models/platform_helper_mobile.dart old mode 100755 new mode 100644 diff --git a/lib/models/platform_helper_other.dart b/lib/models/platform_helper_other.dart old mode 100755 new mode 100644 diff --git a/lib/oldPolicy.dart b/lib/oldPolicy.dart old mode 100755 new mode 100644 diff --git a/lib/phone.dart b/lib/phone.dart old mode 100755 new mode 100644 diff --git a/lib/responsive.dart b/lib/responsive.dart old mode 100755 new mode 100644 diff --git a/lib/service/api_service.dart b/lib/service/api_service.dart old mode 100755 new mode 100644 index ca6332a..2b6a85d --- a/lib/service/api_service.dart +++ b/lib/service/api_service.dart @@ -612,6 +612,18 @@ class ApiService { } } + Future> getEcardRequest(eCardParam,String token) async { + final url = Uri.parse('${Environment.apiUrlPost}ecardRequest'); + final headers = { + 'Authorization': 'Bearer $token' ?? '', + 'Content-Type': 'application/json', // Ensure content type is JSON + }; + final jsonBody = jsonEncode(eCardParam); + // Send formDataJson as the body + final response = await _makePostRequestWithoutFormData(url,jsonBody, headers); + return response; + } + Future> getCdTransactionData( String clintID, String insurerId, String cd_ac_pk, String token) async { print("getCashDepositDetailsToApi1"); @@ -638,6 +650,17 @@ class ApiService { return response; } + Future> getSampleFileDownload(String token) async { + final url = Uri.parse( + '${Environment.apiUrl}downloadSampleExcel/enrollment'); + + final headers = { + 'Authorization': 'Bearer $token' ?? '', + }; + final response = await _makeGetRequest(url, headers); + return response; + } + Future> getEmployeeAndDependenceToApi( String clintID, String getPolicyNo, String empRefId, String token) async { print(_hrtoken); @@ -754,6 +777,13 @@ class ApiService { // return response; // } + Future> _makePostRequestWithoutFormData( + Uri url, String body, Map headers) async { + + final response = await http.post(url, headers: headers, body: body); + return _handleResponse(response); + } + Future> _makeGetRequest( Uri url, Map headers) async { final response = await http.get(url, headers: headers); diff --git a/lib/service/hrDashboardTabs/activePolicies.dart b/lib/service/hrDashboardTabs/activePolicies.dart index 35b5093..056d50d 100644 --- a/lib/service/hrDashboardTabs/activePolicies.dart +++ b/lib/service/hrDashboardTabs/activePolicies.dart @@ -228,7 +228,7 @@ class _ActivePolicieState extends State { child: getCardArrays.isEmpty ? Center( child: Text( - 'No data found', + 'No Policy Mapping Found', style: TextStyle( fontSize: 16, color: Colors.grey.shade600, diff --git a/lib/service/hrDashboardTabs/cd.dart b/lib/service/hrDashboardTabs/cd.dart index 91e55ea..852105a 100644 --- a/lib/service/hrDashboardTabs/cd.dart +++ b/lib/service/hrDashboardTabs/cd.dart @@ -323,7 +323,7 @@ class _CdPolicieState extends State { if (filteredData.isEmpty) { return const SizedBox( height: 50, - child: Center(child: Text('No available data')), + child: Center(child: Text('No CD Accout Mapped')), ); } diff --git a/lib/service/hrDashboardTabs/claims.dart b/lib/service/hrDashboardTabs/claims.dart index 5f92820..29e5d62 100644 --- a/lib/service/hrDashboardTabs/claims.dart +++ b/lib/service/hrDashboardTabs/claims.dart @@ -74,7 +74,7 @@ class _ClaimsPolicieState extends State { Map claim_Detials() { final data = { - "client_id": empClientId, + "client_id": widget.empClientId, "emp_code": controllers["empCode"]?.text ?? '', "from_date": controllers["from"]?.text ?? '', "to_date": controllers["to"]?.text ?? '', @@ -101,6 +101,9 @@ class _ClaimsPolicieState extends State { Map? postdecodedToken = Jwt.parseJwt(widget.postToken); empClientId = postdecodedToken['client_id'].toString(); + print("empClientId - $empClientId"); + + claim_Detials(); print("Empcoed1- ${widget.empCodeHrPolicy}"); print("EmpisHrcode- ${widget.isHrcode}"); diff --git a/lib/service/hrDashboardTabs/preEnrollment.dart b/lib/service/hrDashboardTabs/preEnrollment.dart index 2b28287..b48a744 100644 --- a/lib/service/hrDashboardTabs/preEnrollment.dart +++ b/lib/service/hrDashboardTabs/preEnrollment.dart @@ -107,8 +107,9 @@ class _PreEnrollmentState extends State { // clintID!, clintBranchId!, hr_id, token); print('IN1'); if (response['status'] == 'success') { - isLoading = false; + setState(() { + isLoading = false; print('response'); print(response['data']); @@ -122,7 +123,10 @@ class _PreEnrollmentState extends State { print('IN2'); print("getCardArrays9 - $getCardArrays"); } else { - isLoading = false; + setState(() { + isLoading = false; + }); + print('API request failed with status'); } } catch (e) { @@ -195,7 +199,7 @@ class _PreEnrollmentState extends State { fit: BoxFit.cover, ), Text( - 'No data found', + 'No Policy Mapping Found', style: TextStyle( fontSize: 16, color: Colors.grey.shade600, diff --git a/lib/service/token_storage_service.dart b/lib/service/token_storage_service.dart index 54f0aea..a71c975 100644 --- a/lib/service/token_storage_service.dart +++ b/lib/service/token_storage_service.dart @@ -111,6 +111,10 @@ class TokenStorageService { if (_decodedToken != null) { await prefs.setString(_decodedTokenKey, json.encode(_decodedToken)); } + + // ✅ Save branch name + String branchName = branch['branch_name']?.toString() ?? ''; + await prefs.setString('branchName', branchName); } // Decode JWT token diff --git a/lib/verify.dart b/lib/verify.dart old mode 100755 new mode 100644 diff --git a/linux/.gitignore b/linux/.gitignore old mode 100755 new mode 100644 diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc old mode 100755 new mode 100644 diff --git a/linux/flutter/generated_plugin_registrant.h b/linux/flutter/generated_plugin_registrant.h old mode 100755 new mode 100644 diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake old mode 100755 new mode 100644 diff --git a/linux/main.cc b/linux/main.cc old mode 100755 new mode 100644 diff --git a/linux/my_application.cc b/linux/my_application.cc old mode 100755 new mode 100644 diff --git a/linux/my_application.h b/linux/my_application.h old mode 100755 new mode 100644 diff --git a/macos/.gitignore b/macos/.gitignore old mode 100755 new mode 100644 diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig old mode 100755 new mode 100644 diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig old mode 100755 new mode 100644 diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift old mode 100755 new mode 100644 index 2ce5852..ff40429 --- 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")) diff --git a/macos/Podfile b/macos/Podfile index 29c8eb3..ff5ddb3 100644 --- a/macos/Podfile +++ b/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.14' +platform :osx, '10.15' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift old mode 100755 new mode 100644 index d53ef64..b3c1761 --- a/macos/Runner/AppDelegate.swift +++ b/macos/Runner/AppDelegate.swift @@ -1,9 +1,13 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json old mode 100755 new mode 100644 diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png old mode 100755 new mode 100644 diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png old mode 100755 new mode 100644 diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png old mode 100755 new mode 100644 diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png old mode 100755 new mode 100644 diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png old mode 100755 new mode 100644 diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png old mode 100755 new mode 100644 diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png old mode 100755 new mode 100644 diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib old mode 100755 new mode 100644 diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig old mode 100755 new mode 100644 diff --git a/macos/Runner/Configs/Debug.xcconfig b/macos/Runner/Configs/Debug.xcconfig old mode 100755 new mode 100644 diff --git a/macos/Runner/Configs/Release.xcconfig b/macos/Runner/Configs/Release.xcconfig old mode 100755 new mode 100644 diff --git a/macos/Runner/Configs/Warnings.xcconfig b/macos/Runner/Configs/Warnings.xcconfig old mode 100755 new mode 100644 diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements.xml old mode 100755 new mode 100644 similarity index 100% rename from macos/Runner/DebugProfile.entitlements rename to macos/Runner/DebugProfile.entitlements.xml diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist old mode 100755 new mode 100644 diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift old mode 100755 new mode 100644 diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements.xml old mode 100755 new mode 100644 similarity index 100% rename from macos/Runner/Release.entitlements rename to macos/Runner/Release.entitlements.xml diff --git a/macos/RunnerTests/RunnerTests.swift b/macos/RunnerTests/RunnerTests.swift old mode 100755 new mode 100644 diff --git a/pubspec.yaml b/pubspec.yaml old mode 100755 new mode 100644 diff --git a/test/widget_test.dart b/test/widget_test.dart old mode 100755 new mode 100644 diff --git a/web/assets/Sample.xlsx b/web/assets/Sample.xlsx old mode 100755 new mode 100644 diff --git a/web/assets/nhance-loader.gif b/web/assets/nhance-loader.gif old mode 100755 new mode 100644 diff --git a/web/favicon.png b/web/favicon.png old mode 100755 new mode 100644 diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png old mode 100755 new mode 100644 diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png old mode 100755 new mode 100644 diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png old mode 100755 new mode 100644 diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png old mode 100755 new mode 100644 diff --git a/web/index.html b/web/index.html old mode 100755 new mode 100644 diff --git a/web/manifest.json b/web/manifest.json old mode 100755 new mode 100644 diff --git a/windows/.gitignore b/windows/.gitignore old mode 100755 new mode 100644 diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc old mode 100755 new mode 100644 diff --git a/windows/flutter/generated_plugin_registrant.h b/windows/flutter/generated_plugin_registrant.h old mode 100755 new mode 100644 diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake old mode 100755 new mode 100644 diff --git a/windows/runner/CMakeLists.txt b/windows/runner/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc old mode 100755 new mode 100644 diff --git a/windows/runner/flutter_window.cpp b/windows/runner/flutter_window.cpp old mode 100755 new mode 100644 diff --git a/windows/runner/flutter_window.h b/windows/runner/flutter_window.h old mode 100755 new mode 100644 diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp old mode 100755 new mode 100644 diff --git a/windows/runner/resource.h b/windows/runner/resource.h old mode 100755 new mode 100644 diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico old mode 100755 new mode 100644 diff --git a/windows/runner/runner.exe.manifest b/windows/runner/runner.exe.manifest.xml old mode 100755 new mode 100644 similarity index 100% rename from windows/runner/runner.exe.manifest rename to windows/runner/runner.exe.manifest.xml diff --git a/windows/runner/utils.cpp b/windows/runner/utils.cpp old mode 100755 new mode 100644 diff --git a/windows/runner/utils.h b/windows/runner/utils.h old mode 100755 new mode 100644 diff --git a/windows/runner/win32_window.cpp b/windows/runner/win32_window.cpp old mode 100755 new mode 100644 diff --git a/windows/runner/win32_window.h b/windows/runner/win32_window.h old mode 100755 new mode 100644