changes
0
.gitignore
vendored
Normal file → Executable file
0
analysis_options.yaml
Normal file → Executable file
0
android/.gitignore
vendored
Normal file → Executable file
0
android/app/build.gradle
Normal file → Executable file
0
android/app/google-services.json
Normal file → Executable file
0
android/app/src/debug/AndroidManifest.xml
Normal file → Executable file
0
android/app/src/main/AndroidManifest.xml
Normal file → Executable file
0
android/app/src/main/kotlin/com/example/nhancepolicy/MainActivity.kt
Normal file → Executable file
0
android/app/src/main/res/drawable-v21/launch_background.xml
Normal file → Executable file
0
android/app/src/main/res/drawable/launch_background.xml
Normal file → Executable file
0
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
0
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file → Executable file
|
Before Width: | Height: | Size: 996 B After Width: | Height: | Size: 996 B |
0
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
0
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
0
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file → Executable file
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
0
android/app/src/main/res/values-night/styles.xml
Normal file → Executable file
0
android/app/src/main/res/values/styles.xml
Normal file → Executable file
0
android/app/src/profile/AndroidManifest.xml
Normal file → Executable file
0
android/build.gradle
Normal file → Executable file
0
android/gradle.properties
Normal file → Executable file
0
android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file → Executable file
0
android/settings.gradle
Normal file → Executable file
0
assets/Group_3.png
Normal file → Executable file
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
0
assets/Nhance-Logo-Final 1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
0
assets/Solid_gray.png
Normal file → Executable file
|
Before Width: | Height: | Size: 99 B After Width: | Height: | Size: 99 B |
0
assets/Template_File.xlsx
Normal file → Executable file
0
assets/Vector.png
Normal file → Executable file
|
Before Width: | Height: | Size: 840 B After Width: | Height: | Size: 840 B |
0
assets/claim.png
Normal file → Executable file
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
0
assets/claimHistory.png
Normal file → Executable file
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
0
assets/claimsData.png
Normal file → Executable file
|
Before Width: | Height: | Size: 283 KiB After Width: | Height: | Size: 283 KiB |
0
assets/credit_card.png
Normal file → Executable file
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
0
assets/ecard.png
Normal file → Executable file
|
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 218 B |
0
assets/hrLogin.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 476 KiB After Width: | Height: | Size: 476 KiB |
0
assets/login_web.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 833 KiB After Width: | Height: | Size: 833 KiB |
0
assets/mobileViewLogo.png
Normal file → Executable file
|
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
0
assets/navbarLogo.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
0
assets/nhance-loader.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 493 KiB After Width: | Height: | Size: 493 KiB |
0
assets/nhance_client_logo.png
Normal file → Executable file
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 145 KiB |
0
assets/policy.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
assets/searchData.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 285 KiB |
0
ios/.gitignore
vendored
Normal file → Executable file
0
ios/Flutter/AppFrameworkInfo.plist
Normal file → Executable file
0
ios/Flutter/Debug.xcconfig
Normal file → Executable file
0
ios/Flutter/Release.xcconfig
Normal file → Executable file
0
ios/Podfile
Normal file → Executable file
0
ios/Runner/AppDelegate.swift
Normal file → Executable file
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file → Executable file
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 494 B After Width: | Height: | Size: 494 B |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 772 B After Width: | Height: | Size: 772 B |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 663 B After Width: | Height: | Size: 663 B |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 772 B After Width: | Height: | Size: 772 B |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
Normal file → Executable file
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
vendored
Normal file → Executable file
0
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
0
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
0
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
0
ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
vendored
Normal file → Executable file
0
ios/Runner/Base.lproj/LaunchScreen.storyboard.xml
Normal file → Executable file
0
ios/Runner/Base.lproj/Main.storyboard.xml
Normal file → Executable file
0
ios/Runner/Info.plist
Normal file → Executable file
0
ios/Runner/Runner-Bridging-Header.h
Normal file → Executable file
0
ios/RunnerTests/RunnerTests.swift
Normal file → Executable file
0
lib/addons.dart
Normal file → Executable file
0
lib/branch/branch_card_widget.dart
Normal file → Executable file
33
lib/branch/branch_selection_page.dart
Normal file → Executable file
@ -5,6 +5,7 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||
import '../customAppBar/customAppBar.dart';
|
||||
import '../customAppBar/customFooter.dart';
|
||||
import '../customAppBar/toastHelper.dart';
|
||||
import '../service/session/web_session.dart';
|
||||
import '../service/token_storage_service.dart';
|
||||
import 'branch_card_widget.dart';
|
||||
|
||||
@ -51,6 +52,7 @@ class _BranchSelectionPageState extends State<BranchSelectionPage> {
|
||||
|
||||
final selectedBranch = branches[selectedIndex!];
|
||||
|
||||
|
||||
// Save selected branch and decode token
|
||||
await tokenStorage.saveSelectedBranch(selectedBranch);
|
||||
|
||||
@ -59,6 +61,8 @@ class _BranchSelectionPageState extends State<BranchSelectionPage> {
|
||||
print('Selected Branch: $selectedBranch');
|
||||
print('Decoded Token: $decodedToken');
|
||||
|
||||
|
||||
|
||||
// Navigate to home
|
||||
if (mounted) {
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
@ -119,8 +123,37 @@ class _BranchSelectionPageState extends State<BranchSelectionPage> {
|
||||
ToastHelper.showSuccessToast(context, 'Successfully Login');
|
||||
Navigator.pushReplacementNamed(context, 'hrDashboard');
|
||||
}
|
||||
|
||||
// final branch = branches[selectedIndex!];
|
||||
// // =====================
|
||||
// // POST (HR)
|
||||
// // =====================
|
||||
// WebSession.postClientId = branch['client_id']?.toString();
|
||||
// WebSession.postBranchId =
|
||||
// branch['post_branch_id']?.toString() ??
|
||||
// branch['client_branch_id']?.toString();
|
||||
// WebSession.postHrId = branch['id']?.toString();
|
||||
// WebSession.postModules =
|
||||
// branch['allowed_modules']?['post'] ?? [];
|
||||
//
|
||||
// // =====================
|
||||
// // PRE (Enrollment)
|
||||
// // =====================
|
||||
// WebSession.preClientId = branch['client_id']?.toString();
|
||||
// WebSession.preBranchId =
|
||||
// branch['pre_branch_id']?.toString() ??
|
||||
// branch['client_branch_id']?.toString();
|
||||
// WebSession.preHrId = branch['id']?.toString();
|
||||
// WebSession.preModules =
|
||||
// branch['allowed_modules']?['pre'] ?? [];
|
||||
//
|
||||
// ToastHelper.showSuccessToast(context, 'Successfully Login');
|
||||
//
|
||||
// if (!mounted) return;
|
||||
// Navigator.pushReplacementNamed(context, 'hrDashboard');
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final screenHeight = MediaQuery.of(context).size.height;
|
||||
|
||||
0
lib/cdTransactionDetails.dart
Normal file → Executable file
0
lib/claimshistory.dart
Normal file → Executable file
0
lib/config/environment.dart
Normal file → Executable file
0
lib/config/main_dev.dart
Normal file → Executable file
0
lib/config/main_prod.dart
Normal file → Executable file
0
lib/config/main_prod1.dart
Normal file → Executable file
0
lib/config/main_uat.dart
Normal file → Executable file
11
lib/customAppBar/customAppBar.dart
Normal file → Executable file
@ -5,6 +5,8 @@ import 'package:nhancepolicy/responsive.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:nhancepolicy/responsive.dart';
|
||||
|
||||
import '../service/api_service.dart';
|
||||
|
||||
class CustomAppBar extends StatefulWidget implements PreferredSizeWidget {
|
||||
@override
|
||||
_CustomAppBarState createState() => _CustomAppBarState();
|
||||
@ -15,22 +17,25 @@ class CustomAppBar extends StatefulWidget implements PreferredSizeWidget {
|
||||
|
||||
class _CustomAppBarState extends State<CustomAppBar> {
|
||||
bool showBackToHR = false;
|
||||
late ApiService apiService;
|
||||
// bool isLoading = true; // Add a loading state
|
||||
// bool hideInactiveStatus = true;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
apiService = ApiService(context);
|
||||
// _checkTokens();
|
||||
}
|
||||
|
||||
Future<void> logout(BuildContext context) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
// final prefs = await SharedPreferences.getInstance();
|
||||
// final String? hrtoken = prefs.getString('_postToken');
|
||||
// final String? token = prefs.getString('enrollToken');
|
||||
prefs.clear();
|
||||
// prefs.clear();
|
||||
print('LocalStorage Cleared');
|
||||
Navigator.pushNamed(context, 'hrLogin');
|
||||
apiService.logout();
|
||||
// Navigator.pushNamed(context, 'hrLogin');
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
0
lib/customAppBar/customAppBarChatbot.dart
Normal file → Executable file
0
lib/customAppBar/customFooter.dart
Normal file → Executable file
0
lib/customAppBar/enrollmentAppBar.dart
Normal file → Executable file
0
lib/customAppBar/toastHelper.dart
Normal file → Executable file
16
lib/email_verify.dart
Normal file → Executable file
@ -118,6 +118,22 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
|
||||
Map<String, dynamic> data = json.decode(response.body);
|
||||
print('Response data: $data');
|
||||
|
||||
final String mainStatus = data['status'] ?? 'failed';
|
||||
final Map<String, dynamic> postEnrollment1 =
|
||||
data['post_enrollment'] ?? {};
|
||||
|
||||
final String postStatus =
|
||||
postEnrollment1['status'] ?? 'failed';
|
||||
|
||||
/// ❌ BLOCK if BOTH failed
|
||||
if (mainStatus != 'success' && postStatus != 'success') {
|
||||
ToastHelper.showErrorToast(
|
||||
context,
|
||||
postEnrollment1['message'] ?? 'User not found',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// ✅ Safely extract preEnrollmentData
|
||||
List<dynamic> preEnrollmentData = [];
|
||||
if (data['data'] is List) {
|
||||
|
||||
0
lib/empDetails.dart
Normal file → Executable file
0
lib/empReview.dart
Normal file → Executable file
0
lib/excel_verification.dart
Normal file → Executable file
0
lib/firebase-config.dart
Normal file → Executable file
0
lib/home.dart
Normal file → Executable file
2
lib/hrDashboard.dart
Normal file → Executable file
@ -515,7 +515,7 @@ class _hrDashboardState extends State<hrDashboard>
|
||||
child: Text("Cancel"),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(true),
|
||||
onPressed: () => apiService.logout(),
|
||||
child: Text("Logout"),
|
||||
),
|
||||
],
|
||||
|
||||