CHANGE_ : ChatBot,Enrollment,Post-Enrollment and Loading Issue fix

This commit is contained in:
venbaittech 2024-10-18 17:21:25 +05:30
parent 8b55122eed
commit 1d3c7ebc18
20 changed files with 670 additions and 397 deletions

8
.env
View File

@ -1,4 +1,4 @@
API_URL=https://app.nhanceindia.in/zenith/employeeRest/
TICKET_API_URL=https://app.nhanceindia.in/helpdesk/api
BASE_HREF=/employee/
ENV=production
API_URL=https://venbait.in/nhance/dev/employeeRest/
TICKET_API_URL=https://venbait.in/nhance/helpdesk/dev/api
BASE_HREF=/nhance/employee/dev/
ENV=development

View File

@ -1,4 +1,4 @@
API_URL=https://venbait.in/nhance/dev/employeeRest/
TICKET_API_URL=https://venbait.in/nhance/helpdesk/dev/api
BASE_HREF=/nhance/employee/dev/
ENV=development
ENV=development

View File

@ -1,4 +1,4 @@
API_URL=https://app.nhanceindia.in/zenith/employeeRest/
TICKET_API_URL=https://app.nhanceindia.in/helpdesk/api
BASE_HREF=/employee/
BASE_HREF=/app/
ENV=production

View File

@ -1,4 +1,4 @@
API_URL=https://dev.venbait.in/nhance/uat/employeeRest/
TICKET_API_URL=https://dev.venbait.in/nhance/helpdesk/uat/api
BASE_HREF=/nhance/employee/uat/
ENV=uat
ENV=uat

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -52,8 +52,8 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
Container(
margin: EdgeInsets.only(
top: 10, bottom: 10, left: 10, right: 10),
width: Responsive.isDesktop(context) ? 230 : 170,
height: Responsive.isDesktop(context) ? 230 : 170,
width: Responsive.isDesktop(context) ? 150 : 130,
height: Responsive.isDesktop(context) ? 150 : 130,
child: Image.asset(
'assets/nhance_client_logo.png',
fit: BoxFit.contain, // Adjust the fit as needed

View File

@ -10,7 +10,7 @@ class CustomFooter extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Copyright@ 2024 Nhance - Jubiliant',
'Copyright@ 2024 Nhance',
style: TextStyle(
fontSize: 14,
color: Colors.grey[600], // Text color

View File

@ -88,8 +88,8 @@ class _CustomAppBarState extends State<CustomAppBar> {
children: [
Container(
margin: EdgeInsets.only(top: 10, bottom: 10),
width: 230,
height: 230,
width: Responsive.isDesktop(context) ? 150 : 130,
height: Responsive.isDesktop(context) ? 150 : 130,
child: Image.asset(
'assets/nhance_client_logo.png',
fit: BoxFit.contain,
@ -116,10 +116,48 @@ class _CustomAppBarState extends State<CustomAppBar> {
// Navigator.pushNamed(context, 'oldPolicy');
},
),
if (empStatus != 'enrolled')
NavBarItem(
text: "Logout",
onTap: () async {
logout(context);
},
),
],
),
),
if (empStatus == 'enrolled')
Expanded(
flex: Responsive.isDesktop(context) ? 9 : 3,
child: AdaptiveNavBar(
screenWidth: sw,
backgroundColor: const Color(0xFFFFFBDE),
leading:
Container(), // Set an empty container as we have the logo separately
title: Text(''),
navBarItems: [
NavBarItem(
text: "Logout",
onTap: () async {
logout(context);
text: "Home",
onTap: () {
Navigator.pushNamed(context, 'home');
},
),
NavBarItem(
text: "Claim",
onTap: () {
Navigator.pushNamed(context, 'claims');
},
),
NavBarItem(
text: "Help",
onTap: () {
Navigator.pushNamed(context, 'help');
},
),
NavBarItem(
text: "Profile",
onTap: () {
Navigator.pushNamed(context, 'profile');
},
),
],

View File

@ -20,7 +20,6 @@ import 'package:nhance_app_pwa/pages/postEnrollment/profile.dart';
import 'package:nhance_app_pwa/pages/postEnrollment/termsofuse.dart';
import 'package:nhance_app_pwa/pages/postEnrollment/wellness.dart';
import 'package:nhance_app_pwa/pages/session/SetPinBiometric.dart';
import 'package:nhance_app_pwa/pages/session/authenticationService.dart';
import 'package:nhance_app_pwa/pages/session/changePin.dart';
import 'package:nhance_app_pwa/pages/session/settingUpPinAndBiometric.dart';
@ -29,60 +28,85 @@ import 'models/environment.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: const FirebaseOptions(
apiKey: 'AIzaSyAZdKJco4fe0e1HP1A249BVZzA3WMYb_3g',
appId: '1:508866094093:android:9969e766daa5b770366144',
messagingSenderId: '508866094093',
projectId: 'nhance-app-4fedb'));
await dotenv.load(fileName: Environment.fileName);
final AuthService _authService = AuthService();
runApp(MaterialApp(
initialRoute: 'login',
debugShowCheckedModeBanner: false,
// home: FutureBuilder<String?>(
// future: _authService.getPin(),
// builder: (context, snapshot) {
// if (snapshot.connectionState == ConnectionState.waiting) {
// return CircularProgressIndicator();
// }
// if (snapshot.hasData && snapshot.data != null) {
// // If PIN is saved, authenticate with PIN or biometric
// return PinOrBiometricPage();
// }
// // Otherwise, show login page
// return login();
// },
// ),
routes: {
'login': (context) => login(),
'verify': (context) => MyVerify(
verificationId: '',
mobileNumber: '',
resendToken: null,
onResendCode: (String, int) {},
),
'pinSettingPage': (context) => pinSettingPage(),
'pinPage': (context) => pinPage(),
'changePin': (context) => changePin(),
'home': (context) => MyApp(),
'policies': (context) => policies(),
'claims': (context) => claims(),
'help': (context) => help(),
'claimprocess': (context) => claimprocess(),
'profile': (context) => profile(),
'wellness': (context) => wellness(),
'planclaimsform': (context) => planclaimsform(),
'claimtracklist': (context) => claimtracklist(),
'privacypolicy': (context) => privacypolicy(),
'termsofuse': (context) => termsofuse(),
'chatbot': (context) => chatbot(),
'generalExclusionsDeductibles': (context) =>
generalExclusionsDeductibles(),
'empDetails': (context) => empDetails(),
'addOnsDetails': (context) => addOnsDetails(),
'empReviewDetails': (context) => empReviewDetails(),
},
));
// Initialize Firebase only if it's not already initialized
if (Firebase.apps.isEmpty) {
await Firebase.initializeApp(
options: const FirebaseOptions(
apiKey: 'AIzaSyAZdKJco4fe0e1HP1A249BVZzA3WMYb_3g',
appId: '1:508866094093:android:9969e766daa5b770366144',
messagingSenderId: '508866094093',
projectId: 'nhance-app-4fedb'));
await dotenv.load(fileName: Environment.fileName);
}
// Load environment variables
await dotenv.load(fileName: Environment.fileName);
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
initialRoute: 'login',
debugShowCheckedModeBanner: false,
routes: {
'splash': (context) => SplashScreen(),
'login': (context) => login(),
'verify': (context) => MyVerify(
verificationId: '',
mobileNumber: '',
resendToken: null,
onResendCode: (String, int) {},
),
'pinSettingPage': (context) => pinSettingPage(),
'pinPage': (context) => pinPage(),
'changePin': (context) => changePin(),
'home': (context) => Home(),
'policies': (context) => policies(),
'claims': (context) => claims(),
'help': (context) => help(),
'claimprocess': (context) => claimprocess(),
'profile': (context) => profile(),
'wellness': (context) => wellness(),
'planclaimsform': (context) => planclaimsform(),
'claimtracklist': (context) => claimtracklist(),
'privacypolicy': (context) => privacypolicy(),
'termsofuse': (context) => termsofuse(),
'chatbot': (context) => chatbot(),
'generalExclusionsDeductibles': (context) =>
generalExclusionsDeductibles(),
'empDetails': (context) => empDetails(),
'addOnsDetails': (context) => addOnsDetails(),
'empReviewDetails': (context) => empReviewDetails(),
// Add more routes here...
},
);
}
}
// Lightweight splash screen to show during app startup
class SplashScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Simulate a brief delay before redirecting to the login screen
Future.delayed(Duration(seconds: 2), () {
Navigator.pushReplacementNamed(context, 'login');
});
return Scaffold(
body: 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
),
),
);
}
}

View File

@ -112,6 +112,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
dynamic addOnsDependentPremiumGst;
dynamic topUpSiPremiumGst;
dynamic addOnsDependentTotalAmt;
// dynamic topUpSiTotalAmt;
dynamic topUpSiTotalAmt;
late TextEditingController _relationShipController;
late TextEditingController _dobController;
@ -349,18 +350,19 @@ class _addOnsDetailsState extends State<addOnsDetails> {
topUpSiValue != 0 ? topUpSiValue.toString() : null;
if (topUpSiSelectedSI != null) {
print('topUpSiSelectedSI');
_topUpSiSwitcher = true;
setState(() {
topUpSiPremiumValue = topUpSiPolicies['gmc_si_topup']
['family_floaters_of_only_si_premium_value'];
_topUpSiSwitcher = true;
topUpSiPremiumValue = (topUpSiPolicies['gmc_si_topup']
['family_floaters_of_only_si_premium_value'] as double)
.toInt();
topUpSiPremiumGst = topUpSiPolicies['gmc_si_topup']
['family_floaters_of_only_si_gst_value'];
topUpSiPremiumGst = (topUpSiPolicies['gmc_si_topup']
['family_floaters_of_only_si_gst_value'] as double)
.toInt();
double topUpSum = topUpSiPremiumValue + topUpSiPremiumGst;
topUpSiTotalAmt = topUpSiPremiumValue + topUpSiPremiumGst;
topUpSiTotalAmt = double.parse(topUpSum.toStringAsFixed(2));
// topUpSiTotalAmt = (topUpSum as double).toInt();
});
}
// });
@ -447,22 +449,21 @@ class _addOnsDetailsState extends State<addOnsDetails> {
topUpParentSiValue != 0 ? topUpParentSiValue.toString() : null;
if (topUpParentSiSelectedSI != null) {
print('topUpParentSiSelectedSI');
_topUpParentSiSwitcher = true;
setState(() {
_topUpParentSiSwitcher = true;
topUpParentSiPremiumValue =
topUpSiParentPolicies['gmc_si_parent_topup']
['family_floaters_of_only_si_premium_value'];
(topUpSiParentPolicies['gmc_si_parent_topup']
['family_floaters_of_only_si_premium_value']
as double)
.toInt();
topUpParentSiPremiumGst =
topUpSiParentPolicies['gmc_si_parent_topup']
['family_floaters_of_only_si_gst_value'];
double topUpParentsSum =
topUpParentSiPremiumValue + topUpParentSiPremiumGst;
(topUpSiParentPolicies['gmc_si_parent_topup']
['family_floaters_of_only_si_gst_value'] as double)
.toInt();
topUpParentSiTotalAmt =
double.parse(topUpParentsSum.toStringAsFixed(2));
topUpParentSiPremiumValue + topUpParentSiPremiumGst;
});
}
// });
@ -544,21 +545,23 @@ class _addOnsDetailsState extends State<addOnsDetails> {
? addOnsdependentValue.toString()
: null;
if (addOnsSelectedDependent != null) {
_addOnsDependentSwitcher = true;
setState(() {
addOnDependentPremiumValue =
addOnsDependentPolicies['gmc_dependent_addon']
['family_floaters_of_dependent_and_si_premium_value'];
_addOnsDependentSwitcher = true;
addOnDependentPremiumValue = (addOnsDependentPolicies[
'gmc_dependent_addon'][
'family_floaters_of_dependent_and_si_premium_value']
as double)
.toInt();
;
addOnsDependentPremiumGst =
addOnsDependentPolicies['gmc_dependent_addon']
['family_floaters_of_dependent_and_gst_value'];
double addOnsSum =
addOnDependentPremiumValue + addOnsDependentPremiumGst;
(addOnsDependentPolicies['gmc_dependent_addon']
['family_floaters_of_dependent_and_gst_value']
as double)
.toInt();
addOnsDependentTotalAmt =
double.parse(addOnsSum.toStringAsFixed(2));
addOnDependentPremiumValue + addOnsDependentPremiumGst;
});
addOnsDependentECardDownload =
@ -848,6 +851,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
'employee_id': employee_id,
'client_id': client_id,
'emp_code': empCodeString,
'client_branch_id': empClientBranchId,
};
// Add the map to the list
@ -918,6 +922,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
'employee_id': employee_id,
'client_id': client_id,
'emp_code': empCodeString,
'client_branch_id': empClientBranchId,
};
// Add the map to the list
@ -1053,11 +1058,15 @@ class _addOnsDetailsState extends State<addOnsDetails> {
}
print('Sum of gst: $topUpGstSum');
setState(() {
topUpSiPremiumValue = topUpRataPremimumSum;
topUpSiPremiumValue = (topUpRataPremimumSum as double).toInt();
print(topUpSiPremiumValue);
topUpSiPremiumGst = topUpGstSum;
topUpSiPremiumGst = (topUpGstSum as double).toInt();
print(topUpSiPremiumGst);
topUpSiTotalAmt = topUpSiPremiumValue + topUpSiPremiumGst;
// topUpSiTotalAmt = (topUpSum as double).toInt();
print(topUpSiTotalAmt);
});
sendAddonsGmcSiToAPI();
@ -1120,9 +1129,10 @@ class _addOnsDetailsState extends State<addOnsDetails> {
}
print('Sum of gst: $topUpGstSum');
setState(() {
topUpParentSiPremiumValue = topUpRataPremimumSum;
topUpParentSiPremiumValue =
(topUpRataPremimumSum as double).toInt();
print(topUpParentSiPremiumValue);
topUpParentSiPremiumGst = topUpGstSum;
topUpParentSiPremiumGst = (topUpGstSum as double).toInt();
print(topUpSiPremiumGst);
topUpParentSiTotalAmt =
topUpParentSiPremiumValue + topUpParentSiPremiumGst;
@ -1188,9 +1198,10 @@ class _addOnsDetailsState extends State<addOnsDetails> {
}
print('Sum of gst: $addOnsGstSum');
setState(() {
addOnDependentPremiumValue = addOnsRataPremimumSum;
addOnDependentPremiumValue =
(addOnsRataPremimumSum as double).toInt();
print(addOnDependentPremiumValue);
addOnsDependentPremiumGst = addOnsGstSum;
addOnsDependentPremiumGst = (addOnsGstSum as double).toInt();
print(addOnsDependentPremiumGst);
addOnsDependentTotalAmt =
addOnDependentPremiumValue + addOnsDependentPremiumGst;
@ -1919,8 +1930,8 @@ class _addOnsDetailsState extends State<addOnsDetails> {
// Add your logic here based on the toggle state
});
},
activeColor: Color(
0xFFE26728), // Color when the switch is ON
activeColor: Colors
.green, // Color when the switch is ON
inactiveTrackColor: Colors
.grey, // Color of the switch track when OFF
),
@ -2556,8 +2567,8 @@ class _addOnsDetailsState extends State<addOnsDetails> {
// Add your logic here based on the toggle state
});
},
activeColor: Color(
0xFFE26728), // Color when the switch is ON
activeColor: Colors
.green, // Color when the switch is ON
inactiveTrackColor: Colors
.grey, // Color of the switch track when OFF
),
@ -3194,8 +3205,8 @@ class _addOnsDetailsState extends State<addOnsDetails> {
// Add your logic here based on the toggle state
});
},
activeColor: Color(
0xFFE26728), // Color when the switch is ON
activeColor: Colors
.green, // Color when the switch is ON
inactiveTrackColor: Colors
.grey, // Color of the switch track when OFF
),

View File

@ -134,6 +134,7 @@ class _empDetailsState extends State<empDetails> {
empPrimaryId = prefs.getString('empPrimaryId');
gpaEmpName = prefs.getString('gpaEmpName');
client_id = prefs.getString('client_id');
selfEmpStatus = prefs.getString('selfEmpStatus');
print('client_id : $client_id');
if (prefs.containsKey('clientLogo') && prefs.containsKey('clientName')) {
@ -434,10 +435,10 @@ class _empDetailsState extends State<empDetails> {
}
void saveFamilyMemberDetails(Map<String, dynamic> formData,
Map<String, dynamic> floatedData, action) async {
Map<String, dynamic> floatedData, action, gmcSumInsured) async {
// Construct the array of objects
print(formData);
print(floatedData);
print('floatedData $floatedData');
print(action);
final SharedPreferences prefs = await SharedPreferences.getInstance();
@ -462,6 +463,7 @@ class _empDetailsState extends State<empDetails> {
'created_by': primaryId,
'is_createdby_hr': is_createdby_hr,
'unit': selfUnit,
'basic_cover_si': gmcSumInsured,
// Add the 'id' field only if action is 'Edit'
if (action == 'Edit') 'id': floatedData['employee_id'],
});
@ -869,7 +871,7 @@ class _empDetailsState extends State<empDetails> {
}
}
void openForm(Map<String, dynamic> floaterData, action) {
void openForm(Map<String, dynamic> floaterData, action, gmcSumInsured) {
print(action);
print(floaterData);
print(relationshipOptions);
@ -1145,7 +1147,10 @@ class _empDetailsState extends State<empDetails> {
// Call the function to send form data to API
saveFamilyMemberDetails(
formData, floaterData, action);
formData,
floaterData,
action,
gmcSumInsured);
// Close the dialog
Navigator.of(context).pop();
@ -1971,7 +1976,8 @@ class _empDetailsState extends State<empDetails> {
if (floaterData['relationship'] == 'Self') {
openSelfForm('View');
} else {
openForm(floaterData, 'Edit');
openForm(
floaterData, 'Edit', gmcSumInsured);
}
},
child: Text(
@ -2005,7 +2011,7 @@ class _empDetailsState extends State<empDetails> {
// Handle the click event to open the form
if (gmcOpenForEnrollment != 0) {
if (gmcECardDownload == null) {
openForm(floaterData, 'Add');
openForm(floaterData, 'Add', gmcSumInsured);
}
}
},

View File

@ -28,6 +28,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
late ApiService apiService;
bool isLoading = true;
bool isChecked = false; // Declare the _isSwitched variable here
bool topUpSiIsChecked = false; // Declare the _isSwitched variable here
bool topUpParentIsChecked = false; // Declare the _isSwitched variable here
bool addOnsDependentIsChecked =
false; // Declare the _isSwitched variable here
dynamic _token;
dynamic empCodeString;
dynamic empPrimaryId;
@ -72,6 +76,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
dynamic addOnsDependentPolicyType;
dynamic addOnsFloaterTextHeading;
dynamic addOnsDependentECardDownload;
dynamic addOnsDependentDisclaimer;
dynamic addOnsFamilyFloater;
late DateTime? selectedDate;
double totalPayableAmt = 0.0;
@ -86,21 +91,22 @@ class _empReviewDetailsState extends State<empReviewDetails> {
dynamic topUpPolicyName;
dynamic topUpPolicyType;
dynamic topUpTypeName;
double topUpSiPremiumValue = 0.0;
double topUpSiPremiumGst = 0.0;
double topUpSiTotalAmt = 0.0;
double topUpParentSiPremiumValue = 0.0;
double topUpParentSiPremiumGst = 0.0;
double topUpParentSiTotalAmt = 0.0;
dynamic topUpSiPremiumValue;
dynamic topUpSiPremiumGst;
dynamic topUpSiTotalAmt;
dynamic topUpParentSiPremiumValue;
dynamic topUpParentSiPremiumGst;
dynamic topUpParentSiTotalAmt;
// int addOnDependentPremiumValue = 0;
double addOnDependentPremiumValue = 0.0;
double addOnsDependentPremiumGst = 0.0;
double addOnsDependentTotalAmt = 0.0;
dynamic addOnDependentPremiumValue;
dynamic addOnsDependentPremiumGst;
dynamic addOnsDependentTotalAmt;
dynamic topUpSiValue;
dynamic topUpSiSelectedSI;
dynamic topUpSumInsured;
dynamic topUpFloaterTextHeading;
dynamic topUpECardDownload;
dynamic topUpDisclaimer;
int showHideTopUpCard = 0;
int showHideAddOnsCard = 0;
int showHideTopUpParentCard = 0;
@ -117,6 +123,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
dynamic topUpParentSiSelectedSI;
dynamic topUpParentTypeName;
dynamic topUpParentFloterTextHeading;
dynamic topUpParentDisclaimer;
int topUpParentOpenForEnrollment = 0;
int activeSiData = 0;
int activeSiParentData = 0;
@ -400,6 +407,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
topUpECardDownload =
topUpSiPolicies['gmc_si_topup']['eCardDownload'];
topUpDisclaimer =
await topUpSiPolicies['gmc_si_topup']['disclaimer'];
// });
} else {
print('No data found in the response');
@ -489,6 +499,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
} else {
showHideTopUpParentCard = 1;
}
topUpParentDisclaimer =
await topUpSiParentPolicies['gmc_si_parent_topup']
['disclaimer'];
} else {
print('No data found in the response');
}
@ -557,6 +571,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
addOnsDependentECardDownload =
addOnsDependentPolicies['gmc_dependent_addon']['eCardDownload'];
addOnsDependentDisclaimer =
await addOnsDependentPolicies['gmc_dependent_addon']
['disclaimer'];
} else {
print('No data found in the response');
}
@ -662,6 +680,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
setState(() {
isLoading = false;
isChecked = false;
topUpSiIsChecked = false;
topUpParentIsChecked = false;
addOnsDependentIsChecked = false;
});
print('response.statusCode == 200');
ToastHelper.showSuccessToast(context, 'Saved Successfully...');
@ -758,6 +779,13 @@ class _empReviewDetailsState extends State<empReviewDetails> {
}
}
bool isSubmitEnabled() {
return isChecked &&
(activeSiData == 1 ? topUpSiIsChecked : true) &&
(activeSiParentData == 1 ? topUpParentIsChecked : true) &&
(activeDependentData == 1 ? addOnsDependentIsChecked : true);
}
@override
Widget build(BuildContext context) {
if ((gpaMappedFamilyFloaters == [] && gpaMappedFamilyFloaters == null) &&
@ -2158,6 +2186,187 @@ class _empReviewDetailsState extends State<empReviewDetails> {
],
),
),
SizedBox(height: 15),
if (activeSiData == 1)
Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Checkbox(
value: topUpSiIsChecked,
onChanged: (bool? value) {
setState(() {
topUpSiIsChecked = value!;
});
},
activeColor:
Color(0xFFE26728),
),
],
))),
Expanded(
flex: 11,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
topUpDisclaimer ?? '',
textAlign:
Responsive.isDesktop(
context)
? TextAlign.left
: TextAlign.start,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
context)
? 18
: 15,
color: Color(0xFF292929),
),
),
],
))),
],
),
),
SizedBox(height: 15),
if (activeSiParentData == 1)
Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Checkbox(
value: topUpParentIsChecked,
onChanged: (bool? value) {
setState(() {
topUpParentIsChecked =
value!;
});
},
activeColor:
Color(0xFFE26728),
),
],
))),
Expanded(
flex: 11,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
topUpParentDisclaimer ?? '',
textAlign:
Responsive.isDesktop(
context)
? TextAlign.left
: TextAlign.start,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
context)
? 18
: 15,
color: Color(0xFF292929),
),
),
],
))),
],
),
),
SizedBox(height: 15),
if (activeDependentData == 1)
Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Checkbox(
value:
addOnsDependentIsChecked,
onChanged: (bool? value) {
setState(() {
addOnsDependentIsChecked =
value!;
});
},
activeColor:
Color(0xFFE26728),
),
],
))),
Expanded(
flex: 11,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
addOnsDependentDisclaimer ??
'',
textAlign:
Responsive.isDesktop(
context)
? TextAlign.left
: TextAlign.start,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
context)
? 18
: 15,
color: Color(0xFF292929),
),
),
],
))),
],
),
),
SizedBox(
height: Responsive.isDesktop(context) ? 15 : 0),
Container(
@ -2206,8 +2415,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
height: 150,
alignment: Alignment.centerRight,
child: ElevatedButton(
onPressed:
isChecked ? sendAddOnAPI : null,
onPressed: isSubmitEnabled()
? sendAddOnAPI
: null,
child: Text(
'Submit',
style: GoogleFonts.poppins(

View File

@ -405,6 +405,11 @@ class _loginState extends State<login> {
)),
],
),
// SizedBox(
// height: Responsive.isDesktop(context)
// ? _size.height * 0.1
// : 10,
// ),
SizedBox(height: 10),
Container(
margin: Responsive.isDesktop(context)
@ -570,117 +575,123 @@ class _loginState extends State<login> {
SizedBox(
height: _size.width <= 1100 ? 0 : 0,
),
_size.width > 1100
? Container(
margin: EdgeInsets.symmetric(
horizontal: 150),
child: Column(
children: [
SizedBox(height: 30),
Text(
"Benefits of Login",
style:
GoogleFonts.poppins(
fontSize: 20,
fontWeight:
FontWeight.bold,
),
),
SizedBox(height: 15),
],
))
: SizedBox(),
_size.width > 1100
? Container(
margin: EdgeInsets.symmetric(
horizontal: 150),
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Expanded(
flex: 6,
child: Container(
padding: EdgeInsets
.symmetric(
vertical: 8),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.center,
children: [
Expanded(
child: Container(
padding: EdgeInsets
.symmetric(
vertical:
12),
decoration:
BoxDecoration(
border:
Border(
right:
BorderSide(
width: 1,
color: Colors
.black,
),
),
),
child: Column(
children: [
Icon(
Icons
.policy,
color: Color(
0xFFE26728)),
SizedBox(
height:
10),
Text(
"View Policy"),
],
),
),
),
Expanded(
child: Container(
padding: EdgeInsets
.symmetric(
vertical:
12),
child: Column(
children: [
Icon(
Icons
.edit,
color: Color(
0xFFE26728)),
SizedBox(
height:
10),
Text(
"Manage Claims"),
],
),
),
),
],
),
),
),
],
),
)
: SizedBox(
height: Responsive.isDesktop(
context)
? _size.height * 0.1
: _size.height * 0.2,
),
// _size.width > 1100
// ? Container(
// margin: EdgeInsets.symmetric(
// horizontal: 150),
// child: Column(
// children: [
// SizedBox(height: 30),
// Text(
// "Benefits of Login",
// style:
// GoogleFonts.poppins(
// fontSize: 20,
// fontWeight:
// FontWeight.bold,
// ),
// ),
// SizedBox(height: 15),
// ],
// ))
// : SizedBox(),
// _size.width > 1100
// ? Container(
// margin: EdgeInsets.symmetric(
// horizontal: 150),
// child: Row(
// mainAxisAlignment:
// MainAxisAlignment.center,
// children: [
// Expanded(
// flex: 6,
// child: Container(
// padding: EdgeInsets
// .symmetric(
// vertical: 8),
// child: Row(
// mainAxisAlignment:
// MainAxisAlignment
// .center,
// children: [
// Expanded(
// child: Container(
// padding: EdgeInsets
// .symmetric(
// vertical:
// 12),
// decoration:
// BoxDecoration(
// border:
// Border(
// right:
// BorderSide(
// width: 1,
// color: Colors
// .black,
// ),
// ),
// ),
// child: Column(
// children: [
// Icon(
// Icons
// .policy,
// color: Color(
// 0xFFE26728)),
// SizedBox(
// height:
// 10),
// Text(
// "View Policy"),
// ],
// ),
// ),
// ),
// Expanded(
// child: Container(
// padding: EdgeInsets
// .symmetric(
// vertical:
// 12),
// child: Column(
// children: [
// Icon(
// Icons
// .edit,
// color: Color(
// 0xFFE26728)),
// SizedBox(
// height:
// 10),
// Text(
// "Manage Claims"),
// ],
// ),
// ),
// ),
// ],
// ),
// ),
// ),
// ],
// ),
// )
// : SizedBox(
// height: Responsive.isDesktop(
// context)
// ? _size.height * 0.1
// : _size.height * 0.2,
// ),
SizedBox(
height: _size.height * 0.1,
height: Responsive.isDesktop(context)
? _size.height * 0.3
: _size.height * 0.2,
),
// SizedBox(
// height: _size.height * 0.1,
// ),
Container(
alignment: Alignment.bottomCenter,
padding:

View File

@ -454,8 +454,8 @@ class _chatbotState extends State<chatbot> {
Container(
margin: EdgeInsets.only(
top: 10, bottom: 10, left: 10, right: 10),
width: Responsive.isDesktop(context) ? 230 : 170,
height: Responsive.isDesktop(context) ? 230 : 170,
width: Responsive.isDesktop(context) ? 150 : 130,
height: Responsive.isDesktop(context) ? 150 : 130,
child: Image.asset(
'assets/nhance_client_logo.png',
fit: BoxFit.contain, // Adjust the fit as needed

View File

@ -14,14 +14,14 @@ import '../../customAppBar/tabs.dart';
import '../../customAppBar/toastHelper.dart';
import 'chatbot.dart';
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
class Home extends StatefulWidget {
const Home({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
State<Home> createState() => _HomeState();
}
class _MyAppState extends State<MyApp> {
class _HomeState extends State<Home> {
bool isLoadingGif = false;
late ApiService apiService;
int _currentIndex = 0;

View File

@ -535,6 +535,11 @@ class _MyVerifyState extends State<MyVerify> {
],
),
SizedBox(height: 10),
// SizedBox(
// height: Responsive.isDesktop(context)
// ? _size.height * 0.1
// : 10,
// ),
Container(
margin: Responsive.isDesktop(context)
? EdgeInsets.symmetric(
@ -676,121 +681,126 @@ class _MyVerifyState extends State<MyVerify> {
),
),
),
_size.width > 1100
? Container(
margin: EdgeInsets.symmetric(
horizontal: 150),
child: Column(
children: [
SizedBox(height: 20),
Text(
"Benefits of Login",
style:
GoogleFonts.poppins(
fontSize: 20,
fontWeight:
FontWeight.bold,
),
),
SizedBox(height: 15),
],
))
: SizedBox(),
_size.width > 1100
? Container(
margin: EdgeInsets.symmetric(
horizontal: 150),
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Expanded(
flex: 6,
child: Container(
padding: EdgeInsets
.symmetric(
vertical: 8),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.center,
children: [
Expanded(
child: Container(
padding: EdgeInsets
.symmetric(
vertical:
12),
decoration:
BoxDecoration(
border:
Border(
right:
BorderSide(
width: 1,
color: Colors
.black,
),
),
),
child: Column(
children: [
Icon(
Icons
.policy,
color: Color(
0xFFE26728)),
SizedBox(
height:
10),
Text(
"View Policy",
style: GoogleFonts
.poppins()),
],
),
),
),
Expanded(
child: Container(
padding: EdgeInsets
.symmetric(
vertical:
12),
child: Column(
children: [
Icon(
Icons
.edit,
color: Color(
0xFFE26728)),
SizedBox(
height:
10),
Text(
"Manage Claims",
style: GoogleFonts
.poppins()),
],
),
),
),
],
),
),
),
],
),
)
: SizedBox(
height: Responsive.isDesktop(
context)
? _size.height * 0.1
: _size.height * 0.2,
),
// _size.width > 1100
// ? Container(
// margin: EdgeInsets.symmetric(
// horizontal: 150),
// child: Column(
// children: [
// SizedBox(height: 20),
// Text(
// "Benefits of Login",
// style:
// GoogleFonts.poppins(
// fontSize: 20,
// fontWeight:
// FontWeight.bold,
// ),
// ),
// SizedBox(height: 15),
// ],
// ))
// : SizedBox(),
// _size.width > 1100
// ? Container(
// margin: EdgeInsets.symmetric(
// horizontal: 150),
// child: Row(
// mainAxisAlignment:
// MainAxisAlignment.center,
// children: [
// Expanded(
// flex: 6,
// child: Container(
// padding: EdgeInsets
// .symmetric(
// vertical: 8),
// child: Row(
// mainAxisAlignment:
// MainAxisAlignment
// .center,
// children: [
// Expanded(
// child: Container(
// padding: EdgeInsets
// .symmetric(
// vertical:
// 12),
// decoration:
// BoxDecoration(
// border:
// Border(
// right:
// BorderSide(
// width: 1,
// color: Colors
// .black,
// ),
// ),
// ),
// child: Column(
// children: [
// Icon(
// Icons
// .policy,
// color: Color(
// 0xFFE26728)),
// SizedBox(
// height:
// 10),
// Text(
// "View Policy",
// style: GoogleFonts
// .poppins()),
// ],
// ),
// ),
// ),
// Expanded(
// child: Container(
// padding: EdgeInsets
// .symmetric(
// vertical:
// 12),
// child: Column(
// children: [
// Icon(
// Icons
// .edit,
// color: Color(
// 0xFFE26728)),
// SizedBox(
// height:
// 10),
// Text(
// "Manage Claims",
// style: GoogleFonts
// .poppins()),
// ],
// ),
// ),
// ),
// ],
// ),
// ),
// ),
// ],
// ),
// )
// : SizedBox(
// height: Responsive.isDesktop(
// context)
// ? _size.height * 0.1
// : _size.height * 0.2,
// ),
SizedBox(
height: _size.height * 0.1,
height: Responsive.isDesktop(context)
? _size.height * 0.3
: _size.height * 0.2,
),
// SizedBox(
// height: _size.height * 0.1,
// ),
Container(
alignment: Alignment.bottomCenter,
padding:

View File

@ -84,6 +84,8 @@ flutter:
- .env
- .env.development
- .env.production
- .env.test
- .env.uat
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg

View File

@ -1,31 +0,0 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:nhance_app_pwa/main.dart';
import 'package:nhance_app_pwa/pages/postEnrollment/home.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}

View File

@ -17,7 +17,7 @@
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<title>nhance_app_pwa</title>
<title>Nhance</title>
<link rel="manifest" href="manifest.json">
<style>
@ -48,11 +48,6 @@
}
</style>
<script>
// The value below is injected by flutter build, do not touch.
const serviceWorkerVersion = {{flutter_service_worker_version}};
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
</head>
@ -82,9 +77,6 @@
window.addEventListener('load', function(ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function(engineInitializer) {
engineInitializer.initializeEngine().then(function(appRunner) {
appRunner.runApp();
@ -100,7 +92,7 @@
if(loadingIndicator){
loadingIndicator.remove();
}
},5000);
});
};
</script>
</body>