CHANGE_ : ChatBot,Enrollment,Post-Enrollment and Loading Issue fix
This commit is contained in:
parent
8b55122eed
commit
1d3c7ebc18
8
.env
8
.env
@ -1,4 +1,4 @@
|
|||||||
API_URL=https://app.nhanceindia.in/zenith/employeeRest/
|
API_URL=https://venbait.in/nhance/dev/employeeRest/
|
||||||
TICKET_API_URL=https://app.nhanceindia.in/helpdesk/api
|
TICKET_API_URL=https://venbait.in/nhance/helpdesk/dev/api
|
||||||
BASE_HREF=/employee/
|
BASE_HREF=/nhance/employee/dev/
|
||||||
ENV=production
|
ENV=development
|
||||||
@ -1,4 +1,4 @@
|
|||||||
API_URL=https://venbait.in/nhance/dev/employeeRest/
|
API_URL=https://venbait.in/nhance/dev/employeeRest/
|
||||||
TICKET_API_URL=https://venbait.in/nhance/helpdesk/dev/api
|
TICKET_API_URL=https://venbait.in/nhance/helpdesk/dev/api
|
||||||
BASE_HREF=/nhance/employee/dev/
|
BASE_HREF=/nhance/employee/dev/
|
||||||
ENV=development
|
ENV=development
|
||||||
@ -1,4 +1,4 @@
|
|||||||
API_URL=https://app.nhanceindia.in/zenith/employeeRest/
|
API_URL=https://app.nhanceindia.in/zenith/employeeRest/
|
||||||
TICKET_API_URL=https://app.nhanceindia.in/helpdesk/api
|
TICKET_API_URL=https://app.nhanceindia.in/helpdesk/api
|
||||||
BASE_HREF=/employee/
|
BASE_HREF=/app/
|
||||||
ENV=production
|
ENV=production
|
||||||
2
.env.uat
2
.env.uat
@ -1,4 +1,4 @@
|
|||||||
API_URL=https://dev.venbait.in/nhance/uat/employeeRest/
|
API_URL=https://dev.venbait.in/nhance/uat/employeeRest/
|
||||||
TICKET_API_URL=https://dev.venbait.in/nhance/helpdesk/uat/api
|
TICKET_API_URL=https://dev.venbait.in/nhance/helpdesk/uat/api
|
||||||
BASE_HREF=/nhance/employee/uat/
|
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 |
BIN
assets/nhance_client_logo12.png
Normal file
BIN
assets/nhance_client_logo12.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
@ -52,8 +52,8 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
top: 10, bottom: 10, left: 10, right: 10),
|
top: 10, bottom: 10, left: 10, right: 10),
|
||||||
width: Responsive.isDesktop(context) ? 230 : 170,
|
width: Responsive.isDesktop(context) ? 150 : 130,
|
||||||
height: Responsive.isDesktop(context) ? 230 : 170,
|
height: Responsive.isDesktop(context) ? 150 : 130,
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'assets/nhance_client_logo.png',
|
'assets/nhance_client_logo.png',
|
||||||
fit: BoxFit.contain, // Adjust the fit as needed
|
fit: BoxFit.contain, // Adjust the fit as needed
|
||||||
|
|||||||
@ -10,7 +10,7 @@ class CustomFooter extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'Copyright@ 2024 Nhance - Jubiliant',
|
'Copyright@ 2024 Nhance',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.grey[600], // Text color
|
color: Colors.grey[600], // Text color
|
||||||
|
|||||||
@ -88,8 +88,8 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10, bottom: 10),
|
margin: EdgeInsets.only(top: 10, bottom: 10),
|
||||||
width: 230,
|
width: Responsive.isDesktop(context) ? 150 : 130,
|
||||||
height: 230,
|
height: Responsive.isDesktop(context) ? 150 : 130,
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'assets/nhance_client_logo.png',
|
'assets/nhance_client_logo.png',
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
@ -116,10 +116,48 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
|||||||
// Navigator.pushNamed(context, 'oldPolicy');
|
// 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(
|
NavBarItem(
|
||||||
text: "Logout",
|
text: "Home",
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
logout(context);
|
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');
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
136
lib/main.dart
136
lib/main.dart
@ -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/termsofuse.dart';
|
||||||
import 'package:nhance_app_pwa/pages/postEnrollment/wellness.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/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/changePin.dart';
|
||||||
import 'package:nhance_app_pwa/pages/session/settingUpPinAndBiometric.dart';
|
import 'package:nhance_app_pwa/pages/session/settingUpPinAndBiometric.dart';
|
||||||
|
|
||||||
@ -29,60 +28,85 @@ import 'models/environment.dart';
|
|||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
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(
|
// Initialize Firebase only if it's not already initialized
|
||||||
initialRoute: 'login',
|
if (Firebase.apps.isEmpty) {
|
||||||
debugShowCheckedModeBanner: false,
|
await Firebase.initializeApp(
|
||||||
// home: FutureBuilder<String?>(
|
options: const FirebaseOptions(
|
||||||
// future: _authService.getPin(),
|
apiKey: 'AIzaSyAZdKJco4fe0e1HP1A249BVZzA3WMYb_3g',
|
||||||
// builder: (context, snapshot) {
|
appId: '1:508866094093:android:9969e766daa5b770366144',
|
||||||
// if (snapshot.connectionState == ConnectionState.waiting) {
|
messagingSenderId: '508866094093',
|
||||||
// return CircularProgressIndicator();
|
projectId: 'nhance-app-4fedb'));
|
||||||
// }
|
await dotenv.load(fileName: Environment.fileName);
|
||||||
// if (snapshot.hasData && snapshot.data != null) {
|
}
|
||||||
// // If PIN is saved, authenticate with PIN or biometric
|
|
||||||
// return PinOrBiometricPage();
|
// Load environment variables
|
||||||
// }
|
await dotenv.load(fileName: Environment.fileName);
|
||||||
// // Otherwise, show login page
|
|
||||||
// return login();
|
runApp(MyApp());
|
||||||
// },
|
}
|
||||||
// ),
|
|
||||||
routes: {
|
class MyApp extends StatelessWidget {
|
||||||
'login': (context) => login(),
|
@override
|
||||||
'verify': (context) => MyVerify(
|
Widget build(BuildContext context) {
|
||||||
verificationId: '',
|
return MaterialApp(
|
||||||
mobileNumber: '',
|
initialRoute: 'login',
|
||||||
resendToken: null,
|
debugShowCheckedModeBanner: false,
|
||||||
onResendCode: (String, int) {},
|
routes: {
|
||||||
),
|
'splash': (context) => SplashScreen(),
|
||||||
'pinSettingPage': (context) => pinSettingPage(),
|
'login': (context) => login(),
|
||||||
'pinPage': (context) => pinPage(),
|
'verify': (context) => MyVerify(
|
||||||
'changePin': (context) => changePin(),
|
verificationId: '',
|
||||||
'home': (context) => MyApp(),
|
mobileNumber: '',
|
||||||
'policies': (context) => policies(),
|
resendToken: null,
|
||||||
'claims': (context) => claims(),
|
onResendCode: (String, int) {},
|
||||||
'help': (context) => help(),
|
),
|
||||||
'claimprocess': (context) => claimprocess(),
|
'pinSettingPage': (context) => pinSettingPage(),
|
||||||
'profile': (context) => profile(),
|
'pinPage': (context) => pinPage(),
|
||||||
'wellness': (context) => wellness(),
|
'changePin': (context) => changePin(),
|
||||||
'planclaimsform': (context) => planclaimsform(),
|
'home': (context) => Home(),
|
||||||
'claimtracklist': (context) => claimtracklist(),
|
'policies': (context) => policies(),
|
||||||
'privacypolicy': (context) => privacypolicy(),
|
'claims': (context) => claims(),
|
||||||
'termsofuse': (context) => termsofuse(),
|
'help': (context) => help(),
|
||||||
'chatbot': (context) => chatbot(),
|
'claimprocess': (context) => claimprocess(),
|
||||||
'generalExclusionsDeductibles': (context) =>
|
'profile': (context) => profile(),
|
||||||
generalExclusionsDeductibles(),
|
'wellness': (context) => wellness(),
|
||||||
'empDetails': (context) => empDetails(),
|
'planclaimsform': (context) => planclaimsform(),
|
||||||
'addOnsDetails': (context) => addOnsDetails(),
|
'claimtracklist': (context) => claimtracklist(),
|
||||||
'empReviewDetails': (context) => empReviewDetails(),
|
'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
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -112,6 +112,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
dynamic addOnsDependentPremiumGst;
|
dynamic addOnsDependentPremiumGst;
|
||||||
dynamic topUpSiPremiumGst;
|
dynamic topUpSiPremiumGst;
|
||||||
dynamic addOnsDependentTotalAmt;
|
dynamic addOnsDependentTotalAmt;
|
||||||
|
// dynamic topUpSiTotalAmt;
|
||||||
dynamic topUpSiTotalAmt;
|
dynamic topUpSiTotalAmt;
|
||||||
late TextEditingController _relationShipController;
|
late TextEditingController _relationShipController;
|
||||||
late TextEditingController _dobController;
|
late TextEditingController _dobController;
|
||||||
@ -349,18 +350,19 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
topUpSiValue != 0 ? topUpSiValue.toString() : null;
|
topUpSiValue != 0 ? topUpSiValue.toString() : null;
|
||||||
if (topUpSiSelectedSI != null) {
|
if (topUpSiSelectedSI != null) {
|
||||||
print('topUpSiSelectedSI');
|
print('topUpSiSelectedSI');
|
||||||
|
|
||||||
_topUpSiSwitcher = true;
|
|
||||||
setState(() {
|
setState(() {
|
||||||
topUpSiPremiumValue = topUpSiPolicies['gmc_si_topup']
|
_topUpSiSwitcher = true;
|
||||||
['family_floaters_of_only_si_premium_value'];
|
topUpSiPremiumValue = (topUpSiPolicies['gmc_si_topup']
|
||||||
|
['family_floaters_of_only_si_premium_value'] as double)
|
||||||
|
.toInt();
|
||||||
|
|
||||||
topUpSiPremiumGst = topUpSiPolicies['gmc_si_topup']
|
topUpSiPremiumGst = (topUpSiPolicies['gmc_si_topup']
|
||||||
['family_floaters_of_only_si_gst_value'];
|
['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;
|
topUpParentSiValue != 0 ? topUpParentSiValue.toString() : null;
|
||||||
if (topUpParentSiSelectedSI != null) {
|
if (topUpParentSiSelectedSI != null) {
|
||||||
print('topUpParentSiSelectedSI');
|
print('topUpParentSiSelectedSI');
|
||||||
|
|
||||||
_topUpParentSiSwitcher = true;
|
|
||||||
setState(() {
|
setState(() {
|
||||||
|
_topUpParentSiSwitcher = true;
|
||||||
topUpParentSiPremiumValue =
|
topUpParentSiPremiumValue =
|
||||||
topUpSiParentPolicies['gmc_si_parent_topup']
|
(topUpSiParentPolicies['gmc_si_parent_topup']
|
||||||
['family_floaters_of_only_si_premium_value'];
|
['family_floaters_of_only_si_premium_value']
|
||||||
|
as double)
|
||||||
|
.toInt();
|
||||||
|
|
||||||
topUpParentSiPremiumGst =
|
topUpParentSiPremiumGst =
|
||||||
topUpSiParentPolicies['gmc_si_parent_topup']
|
(topUpSiParentPolicies['gmc_si_parent_topup']
|
||||||
['family_floaters_of_only_si_gst_value'];
|
['family_floaters_of_only_si_gst_value'] as double)
|
||||||
|
.toInt();
|
||||||
double topUpParentsSum =
|
|
||||||
topUpParentSiPremiumValue + topUpParentSiPremiumGst;
|
|
||||||
|
|
||||||
topUpParentSiTotalAmt =
|
topUpParentSiTotalAmt =
|
||||||
double.parse(topUpParentsSum.toStringAsFixed(2));
|
topUpParentSiPremiumValue + topUpParentSiPremiumGst;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// });
|
// });
|
||||||
@ -544,21 +545,23 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
? addOnsdependentValue.toString()
|
? addOnsdependentValue.toString()
|
||||||
: null;
|
: null;
|
||||||
if (addOnsSelectedDependent != null) {
|
if (addOnsSelectedDependent != null) {
|
||||||
_addOnsDependentSwitcher = true;
|
|
||||||
setState(() {
|
setState(() {
|
||||||
addOnDependentPremiumValue =
|
_addOnsDependentSwitcher = true;
|
||||||
addOnsDependentPolicies['gmc_dependent_addon']
|
addOnDependentPremiumValue = (addOnsDependentPolicies[
|
||||||
['family_floaters_of_dependent_and_si_premium_value'];
|
'gmc_dependent_addon'][
|
||||||
|
'family_floaters_of_dependent_and_si_premium_value']
|
||||||
|
as double)
|
||||||
|
.toInt();
|
||||||
|
;
|
||||||
|
|
||||||
addOnsDependentPremiumGst =
|
addOnsDependentPremiumGst =
|
||||||
addOnsDependentPolicies['gmc_dependent_addon']
|
(addOnsDependentPolicies['gmc_dependent_addon']
|
||||||
['family_floaters_of_dependent_and_gst_value'];
|
['family_floaters_of_dependent_and_gst_value']
|
||||||
|
as double)
|
||||||
double addOnsSum =
|
.toInt();
|
||||||
addOnDependentPremiumValue + addOnsDependentPremiumGst;
|
|
||||||
|
|
||||||
addOnsDependentTotalAmt =
|
addOnsDependentTotalAmt =
|
||||||
double.parse(addOnsSum.toStringAsFixed(2));
|
addOnDependentPremiumValue + addOnsDependentPremiumGst;
|
||||||
});
|
});
|
||||||
|
|
||||||
addOnsDependentECardDownload =
|
addOnsDependentECardDownload =
|
||||||
@ -848,6 +851,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
'employee_id': employee_id,
|
'employee_id': employee_id,
|
||||||
'client_id': client_id,
|
'client_id': client_id,
|
||||||
'emp_code': empCodeString,
|
'emp_code': empCodeString,
|
||||||
|
'client_branch_id': empClientBranchId,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add the map to the list
|
// Add the map to the list
|
||||||
@ -918,6 +922,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
'employee_id': employee_id,
|
'employee_id': employee_id,
|
||||||
'client_id': client_id,
|
'client_id': client_id,
|
||||||
'emp_code': empCodeString,
|
'emp_code': empCodeString,
|
||||||
|
'client_branch_id': empClientBranchId,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add the map to the list
|
// Add the map to the list
|
||||||
@ -1053,11 +1058,15 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
}
|
}
|
||||||
print('Sum of gst: $topUpGstSum');
|
print('Sum of gst: $topUpGstSum');
|
||||||
setState(() {
|
setState(() {
|
||||||
topUpSiPremiumValue = topUpRataPremimumSum;
|
topUpSiPremiumValue = (topUpRataPremimumSum as double).toInt();
|
||||||
print(topUpSiPremiumValue);
|
print(topUpSiPremiumValue);
|
||||||
topUpSiPremiumGst = topUpGstSum;
|
topUpSiPremiumGst = (topUpGstSum as double).toInt();
|
||||||
print(topUpSiPremiumGst);
|
print(topUpSiPremiumGst);
|
||||||
|
|
||||||
topUpSiTotalAmt = topUpSiPremiumValue + topUpSiPremiumGst;
|
topUpSiTotalAmt = topUpSiPremiumValue + topUpSiPremiumGst;
|
||||||
|
|
||||||
|
// topUpSiTotalAmt = (topUpSum as double).toInt();
|
||||||
|
|
||||||
print(topUpSiTotalAmt);
|
print(topUpSiTotalAmt);
|
||||||
});
|
});
|
||||||
sendAddonsGmcSiToAPI();
|
sendAddonsGmcSiToAPI();
|
||||||
@ -1120,9 +1129,10 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
}
|
}
|
||||||
print('Sum of gst: $topUpGstSum');
|
print('Sum of gst: $topUpGstSum');
|
||||||
setState(() {
|
setState(() {
|
||||||
topUpParentSiPremiumValue = topUpRataPremimumSum;
|
topUpParentSiPremiumValue =
|
||||||
|
(topUpRataPremimumSum as double).toInt();
|
||||||
print(topUpParentSiPremiumValue);
|
print(topUpParentSiPremiumValue);
|
||||||
topUpParentSiPremiumGst = topUpGstSum;
|
topUpParentSiPremiumGst = (topUpGstSum as double).toInt();
|
||||||
print(topUpSiPremiumGst);
|
print(topUpSiPremiumGst);
|
||||||
topUpParentSiTotalAmt =
|
topUpParentSiTotalAmt =
|
||||||
topUpParentSiPremiumValue + topUpParentSiPremiumGst;
|
topUpParentSiPremiumValue + topUpParentSiPremiumGst;
|
||||||
@ -1188,9 +1198,10 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
}
|
}
|
||||||
print('Sum of gst: $addOnsGstSum');
|
print('Sum of gst: $addOnsGstSum');
|
||||||
setState(() {
|
setState(() {
|
||||||
addOnDependentPremiumValue = addOnsRataPremimumSum;
|
addOnDependentPremiumValue =
|
||||||
|
(addOnsRataPremimumSum as double).toInt();
|
||||||
print(addOnDependentPremiumValue);
|
print(addOnDependentPremiumValue);
|
||||||
addOnsDependentPremiumGst = addOnsGstSum;
|
addOnsDependentPremiumGst = (addOnsGstSum as double).toInt();
|
||||||
print(addOnsDependentPremiumGst);
|
print(addOnsDependentPremiumGst);
|
||||||
addOnsDependentTotalAmt =
|
addOnsDependentTotalAmt =
|
||||||
addOnDependentPremiumValue + addOnsDependentPremiumGst;
|
addOnDependentPremiumValue + addOnsDependentPremiumGst;
|
||||||
@ -1919,8 +1930,8 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
// Add your logic here based on the toggle state
|
// Add your logic here based on the toggle state
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
activeColor: Color(
|
activeColor: Colors
|
||||||
0xFFE26728), // Color when the switch is ON
|
.green, // Color when the switch is ON
|
||||||
inactiveTrackColor: Colors
|
inactiveTrackColor: Colors
|
||||||
.grey, // Color of the switch track when OFF
|
.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
|
// Add your logic here based on the toggle state
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
activeColor: Color(
|
activeColor: Colors
|
||||||
0xFFE26728), // Color when the switch is ON
|
.green, // Color when the switch is ON
|
||||||
inactiveTrackColor: Colors
|
inactiveTrackColor: Colors
|
||||||
.grey, // Color of the switch track when OFF
|
.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
|
// Add your logic here based on the toggle state
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
activeColor: Color(
|
activeColor: Colors
|
||||||
0xFFE26728), // Color when the switch is ON
|
.green, // Color when the switch is ON
|
||||||
inactiveTrackColor: Colors
|
inactiveTrackColor: Colors
|
||||||
.grey, // Color of the switch track when OFF
|
.grey, // Color of the switch track when OFF
|
||||||
),
|
),
|
||||||
|
|||||||
@ -134,6 +134,7 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
empPrimaryId = prefs.getString('empPrimaryId');
|
empPrimaryId = prefs.getString('empPrimaryId');
|
||||||
gpaEmpName = prefs.getString('gpaEmpName');
|
gpaEmpName = prefs.getString('gpaEmpName');
|
||||||
client_id = prefs.getString('client_id');
|
client_id = prefs.getString('client_id');
|
||||||
|
selfEmpStatus = prefs.getString('selfEmpStatus');
|
||||||
print('client_id : $client_id');
|
print('client_id : $client_id');
|
||||||
|
|
||||||
if (prefs.containsKey('clientLogo') && prefs.containsKey('clientName')) {
|
if (prefs.containsKey('clientLogo') && prefs.containsKey('clientName')) {
|
||||||
@ -434,10 +435,10 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void saveFamilyMemberDetails(Map<String, dynamic> formData,
|
void saveFamilyMemberDetails(Map<String, dynamic> formData,
|
||||||
Map<String, dynamic> floatedData, action) async {
|
Map<String, dynamic> floatedData, action, gmcSumInsured) async {
|
||||||
// Construct the array of objects
|
// Construct the array of objects
|
||||||
print(formData);
|
print(formData);
|
||||||
print(floatedData);
|
print('floatedData $floatedData');
|
||||||
print(action);
|
print(action);
|
||||||
|
|
||||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
@ -462,6 +463,7 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
'created_by': primaryId,
|
'created_by': primaryId,
|
||||||
'is_createdby_hr': is_createdby_hr,
|
'is_createdby_hr': is_createdby_hr,
|
||||||
'unit': selfUnit,
|
'unit': selfUnit,
|
||||||
|
'basic_cover_si': gmcSumInsured,
|
||||||
// Add the 'id' field only if action is 'Edit'
|
// Add the 'id' field only if action is 'Edit'
|
||||||
if (action == 'Edit') 'id': floatedData['employee_id'],
|
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(action);
|
||||||
print(floaterData);
|
print(floaterData);
|
||||||
print(relationshipOptions);
|
print(relationshipOptions);
|
||||||
@ -1145,7 +1147,10 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
|
|
||||||
// Call the function to send form data to API
|
// Call the function to send form data to API
|
||||||
saveFamilyMemberDetails(
|
saveFamilyMemberDetails(
|
||||||
formData, floaterData, action);
|
formData,
|
||||||
|
floaterData,
|
||||||
|
action,
|
||||||
|
gmcSumInsured);
|
||||||
|
|
||||||
// Close the dialog
|
// Close the dialog
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
@ -1971,7 +1976,8 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
if (floaterData['relationship'] == 'Self') {
|
if (floaterData['relationship'] == 'Self') {
|
||||||
openSelfForm('View');
|
openSelfForm('View');
|
||||||
} else {
|
} else {
|
||||||
openForm(floaterData, 'Edit');
|
openForm(
|
||||||
|
floaterData, 'Edit', gmcSumInsured);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -2005,7 +2011,7 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
// Handle the click event to open the form
|
// Handle the click event to open the form
|
||||||
if (gmcOpenForEnrollment != 0) {
|
if (gmcOpenForEnrollment != 0) {
|
||||||
if (gmcECardDownload == null) {
|
if (gmcECardDownload == null) {
|
||||||
openForm(floaterData, 'Add');
|
openForm(floaterData, 'Add', gmcSumInsured);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -28,6 +28,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
late ApiService apiService;
|
late ApiService apiService;
|
||||||
bool isLoading = true;
|
bool isLoading = true;
|
||||||
bool isChecked = false; // Declare the _isSwitched variable here
|
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 _token;
|
||||||
dynamic empCodeString;
|
dynamic empCodeString;
|
||||||
dynamic empPrimaryId;
|
dynamic empPrimaryId;
|
||||||
@ -72,6 +76,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
dynamic addOnsDependentPolicyType;
|
dynamic addOnsDependentPolicyType;
|
||||||
dynamic addOnsFloaterTextHeading;
|
dynamic addOnsFloaterTextHeading;
|
||||||
dynamic addOnsDependentECardDownload;
|
dynamic addOnsDependentECardDownload;
|
||||||
|
dynamic addOnsDependentDisclaimer;
|
||||||
dynamic addOnsFamilyFloater;
|
dynamic addOnsFamilyFloater;
|
||||||
late DateTime? selectedDate;
|
late DateTime? selectedDate;
|
||||||
double totalPayableAmt = 0.0;
|
double totalPayableAmt = 0.0;
|
||||||
@ -86,21 +91,22 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
dynamic topUpPolicyName;
|
dynamic topUpPolicyName;
|
||||||
dynamic topUpPolicyType;
|
dynamic topUpPolicyType;
|
||||||
dynamic topUpTypeName;
|
dynamic topUpTypeName;
|
||||||
double topUpSiPremiumValue = 0.0;
|
dynamic topUpSiPremiumValue;
|
||||||
double topUpSiPremiumGst = 0.0;
|
dynamic topUpSiPremiumGst;
|
||||||
double topUpSiTotalAmt = 0.0;
|
dynamic topUpSiTotalAmt;
|
||||||
double topUpParentSiPremiumValue = 0.0;
|
dynamic topUpParentSiPremiumValue;
|
||||||
double topUpParentSiPremiumGst = 0.0;
|
dynamic topUpParentSiPremiumGst;
|
||||||
double topUpParentSiTotalAmt = 0.0;
|
dynamic topUpParentSiTotalAmt;
|
||||||
// int addOnDependentPremiumValue = 0;
|
// int addOnDependentPremiumValue = 0;
|
||||||
double addOnDependentPremiumValue = 0.0;
|
dynamic addOnDependentPremiumValue;
|
||||||
double addOnsDependentPremiumGst = 0.0;
|
dynamic addOnsDependentPremiumGst;
|
||||||
double addOnsDependentTotalAmt = 0.0;
|
dynamic addOnsDependentTotalAmt;
|
||||||
dynamic topUpSiValue;
|
dynamic topUpSiValue;
|
||||||
dynamic topUpSiSelectedSI;
|
dynamic topUpSiSelectedSI;
|
||||||
dynamic topUpSumInsured;
|
dynamic topUpSumInsured;
|
||||||
dynamic topUpFloaterTextHeading;
|
dynamic topUpFloaterTextHeading;
|
||||||
dynamic topUpECardDownload;
|
dynamic topUpECardDownload;
|
||||||
|
dynamic topUpDisclaimer;
|
||||||
int showHideTopUpCard = 0;
|
int showHideTopUpCard = 0;
|
||||||
int showHideAddOnsCard = 0;
|
int showHideAddOnsCard = 0;
|
||||||
int showHideTopUpParentCard = 0;
|
int showHideTopUpParentCard = 0;
|
||||||
@ -117,6 +123,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
dynamic topUpParentSiSelectedSI;
|
dynamic topUpParentSiSelectedSI;
|
||||||
dynamic topUpParentTypeName;
|
dynamic topUpParentTypeName;
|
||||||
dynamic topUpParentFloterTextHeading;
|
dynamic topUpParentFloterTextHeading;
|
||||||
|
dynamic topUpParentDisclaimer;
|
||||||
int topUpParentOpenForEnrollment = 0;
|
int topUpParentOpenForEnrollment = 0;
|
||||||
int activeSiData = 0;
|
int activeSiData = 0;
|
||||||
int activeSiParentData = 0;
|
int activeSiParentData = 0;
|
||||||
@ -400,6 +407,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
|
|
||||||
topUpECardDownload =
|
topUpECardDownload =
|
||||||
topUpSiPolicies['gmc_si_topup']['eCardDownload'];
|
topUpSiPolicies['gmc_si_topup']['eCardDownload'];
|
||||||
|
|
||||||
|
topUpDisclaimer =
|
||||||
|
await topUpSiPolicies['gmc_si_topup']['disclaimer'];
|
||||||
// });
|
// });
|
||||||
} else {
|
} else {
|
||||||
print('No data found in the response');
|
print('No data found in the response');
|
||||||
@ -489,6 +499,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
} else {
|
} else {
|
||||||
showHideTopUpParentCard = 1;
|
showHideTopUpParentCard = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
topUpParentDisclaimer =
|
||||||
|
await topUpSiParentPolicies['gmc_si_parent_topup']
|
||||||
|
['disclaimer'];
|
||||||
} else {
|
} else {
|
||||||
print('No data found in the response');
|
print('No data found in the response');
|
||||||
}
|
}
|
||||||
@ -557,6 +571,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
|
|
||||||
addOnsDependentECardDownload =
|
addOnsDependentECardDownload =
|
||||||
addOnsDependentPolicies['gmc_dependent_addon']['eCardDownload'];
|
addOnsDependentPolicies['gmc_dependent_addon']['eCardDownload'];
|
||||||
|
|
||||||
|
addOnsDependentDisclaimer =
|
||||||
|
await addOnsDependentPolicies['gmc_dependent_addon']
|
||||||
|
['disclaimer'];
|
||||||
} else {
|
} else {
|
||||||
print('No data found in the response');
|
print('No data found in the response');
|
||||||
}
|
}
|
||||||
@ -662,6 +680,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
isChecked = false;
|
isChecked = false;
|
||||||
|
topUpSiIsChecked = false;
|
||||||
|
topUpParentIsChecked = false;
|
||||||
|
addOnsDependentIsChecked = false;
|
||||||
});
|
});
|
||||||
print('response.statusCode == 200');
|
print('response.statusCode == 200');
|
||||||
ToastHelper.showSuccessToast(context, 'Saved Successfully...');
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if ((gpaMappedFamilyFloaters == [] && gpaMappedFamilyFloaters == null) &&
|
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(
|
SizedBox(
|
||||||
height: Responsive.isDesktop(context) ? 15 : 0),
|
height: Responsive.isDesktop(context) ? 15 : 0),
|
||||||
Container(
|
Container(
|
||||||
@ -2206,8 +2415,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
height: 150,
|
height: 150,
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed:
|
onPressed: isSubmitEnabled()
|
||||||
isChecked ? sendAddOnAPI : null,
|
? sendAddOnAPI
|
||||||
|
: null,
|
||||||
child: Text(
|
child: Text(
|
||||||
'Submit',
|
'Submit',
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
|
|||||||
@ -405,6 +405,11 @@ class _loginState extends State<login> {
|
|||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
// SizedBox(
|
||||||
|
// height: Responsive.isDesktop(context)
|
||||||
|
// ? _size.height * 0.1
|
||||||
|
// : 10,
|
||||||
|
// ),
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
Container(
|
Container(
|
||||||
margin: Responsive.isDesktop(context)
|
margin: Responsive.isDesktop(context)
|
||||||
@ -570,117 +575,123 @@ class _loginState extends State<login> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: _size.width <= 1100 ? 0 : 0,
|
height: _size.width <= 1100 ? 0 : 0,
|
||||||
),
|
),
|
||||||
_size.width > 1100
|
// _size.width > 1100
|
||||||
? Container(
|
// ? Container(
|
||||||
margin: EdgeInsets.symmetric(
|
// margin: EdgeInsets.symmetric(
|
||||||
horizontal: 150),
|
// horizontal: 150),
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
SizedBox(height: 30),
|
// SizedBox(height: 30),
|
||||||
Text(
|
// Text(
|
||||||
"Benefits of Login",
|
// "Benefits of Login",
|
||||||
style:
|
// style:
|
||||||
GoogleFonts.poppins(
|
// GoogleFonts.poppins(
|
||||||
fontSize: 20,
|
// fontSize: 20,
|
||||||
fontWeight:
|
// fontWeight:
|
||||||
FontWeight.bold,
|
// FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
SizedBox(height: 15),
|
// SizedBox(height: 15),
|
||||||
],
|
// ],
|
||||||
))
|
// ))
|
||||||
: SizedBox(),
|
// : SizedBox(),
|
||||||
_size.width > 1100
|
// _size.width > 1100
|
||||||
? Container(
|
// ? Container(
|
||||||
margin: EdgeInsets.symmetric(
|
// margin: EdgeInsets.symmetric(
|
||||||
horizontal: 150),
|
// horizontal: 150),
|
||||||
child: Row(
|
// child: Row(
|
||||||
mainAxisAlignment:
|
// mainAxisAlignment:
|
||||||
MainAxisAlignment.center,
|
// MainAxisAlignment.center,
|
||||||
children: [
|
// children: [
|
||||||
Expanded(
|
// Expanded(
|
||||||
flex: 6,
|
// flex: 6,
|
||||||
child: Container(
|
// child: Container(
|
||||||
padding: EdgeInsets
|
// padding: EdgeInsets
|
||||||
.symmetric(
|
// .symmetric(
|
||||||
vertical: 8),
|
// vertical: 8),
|
||||||
child: Row(
|
// child: Row(
|
||||||
mainAxisAlignment:
|
// mainAxisAlignment:
|
||||||
MainAxisAlignment
|
// MainAxisAlignment
|
||||||
.center,
|
// .center,
|
||||||
children: [
|
// children: [
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Container(
|
// child: Container(
|
||||||
padding: EdgeInsets
|
// padding: EdgeInsets
|
||||||
.symmetric(
|
// .symmetric(
|
||||||
vertical:
|
// vertical:
|
||||||
12),
|
// 12),
|
||||||
decoration:
|
// decoration:
|
||||||
BoxDecoration(
|
// BoxDecoration(
|
||||||
border:
|
// border:
|
||||||
Border(
|
// Border(
|
||||||
right:
|
// right:
|
||||||
BorderSide(
|
// BorderSide(
|
||||||
width: 1,
|
// width: 1,
|
||||||
color: Colors
|
// color: Colors
|
||||||
.black,
|
// .black,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
Icon(
|
// Icon(
|
||||||
Icons
|
// Icons
|
||||||
.policy,
|
// .policy,
|
||||||
color: Color(
|
// color: Color(
|
||||||
0xFFE26728)),
|
// 0xFFE26728)),
|
||||||
SizedBox(
|
// SizedBox(
|
||||||
height:
|
// height:
|
||||||
10),
|
// 10),
|
||||||
Text(
|
// Text(
|
||||||
"View Policy"),
|
// "View Policy"),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Container(
|
// child: Container(
|
||||||
padding: EdgeInsets
|
// padding: EdgeInsets
|
||||||
.symmetric(
|
// .symmetric(
|
||||||
vertical:
|
// vertical:
|
||||||
12),
|
// 12),
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
Icon(
|
// Icon(
|
||||||
Icons
|
// Icons
|
||||||
.edit,
|
// .edit,
|
||||||
color: Color(
|
// color: Color(
|
||||||
0xFFE26728)),
|
// 0xFFE26728)),
|
||||||
SizedBox(
|
// SizedBox(
|
||||||
height:
|
// height:
|
||||||
10),
|
// 10),
|
||||||
Text(
|
// Text(
|
||||||
"Manage Claims"),
|
// "Manage Claims"),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
)
|
// )
|
||||||
: SizedBox(
|
// : SizedBox(
|
||||||
height: Responsive.isDesktop(
|
// height: Responsive.isDesktop(
|
||||||
context)
|
// context)
|
||||||
? _size.height * 0.1
|
// ? _size.height * 0.1
|
||||||
: _size.height * 0.2,
|
// : _size.height * 0.2,
|
||||||
),
|
// ),
|
||||||
SizedBox(
|
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(
|
Container(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
padding:
|
padding:
|
||||||
|
|||||||
@ -454,8 +454,8 @@ class _chatbotState extends State<chatbot> {
|
|||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
top: 10, bottom: 10, left: 10, right: 10),
|
top: 10, bottom: 10, left: 10, right: 10),
|
||||||
width: Responsive.isDesktop(context) ? 230 : 170,
|
width: Responsive.isDesktop(context) ? 150 : 130,
|
||||||
height: Responsive.isDesktop(context) ? 230 : 170,
|
height: Responsive.isDesktop(context) ? 150 : 130,
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'assets/nhance_client_logo.png',
|
'assets/nhance_client_logo.png',
|
||||||
fit: BoxFit.contain, // Adjust the fit as needed
|
fit: BoxFit.contain, // Adjust the fit as needed
|
||||||
|
|||||||
@ -14,14 +14,14 @@ import '../../customAppBar/tabs.dart';
|
|||||||
import '../../customAppBar/toastHelper.dart';
|
import '../../customAppBar/toastHelper.dart';
|
||||||
import 'chatbot.dart';
|
import 'chatbot.dart';
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
class Home extends StatefulWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const Home({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyApp> createState() => _MyAppState();
|
State<Home> createState() => _HomeState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MyAppState extends State<MyApp> {
|
class _HomeState extends State<Home> {
|
||||||
bool isLoadingGif = false;
|
bool isLoadingGif = false;
|
||||||
late ApiService apiService;
|
late ApiService apiService;
|
||||||
int _currentIndex = 0;
|
int _currentIndex = 0;
|
||||||
|
|||||||
@ -535,6 +535,11 @@ class _MyVerifyState extends State<MyVerify> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
|
// SizedBox(
|
||||||
|
// height: Responsive.isDesktop(context)
|
||||||
|
// ? _size.height * 0.1
|
||||||
|
// : 10,
|
||||||
|
// ),
|
||||||
Container(
|
Container(
|
||||||
margin: Responsive.isDesktop(context)
|
margin: Responsive.isDesktop(context)
|
||||||
? EdgeInsets.symmetric(
|
? EdgeInsets.symmetric(
|
||||||
@ -676,121 +681,126 @@ class _MyVerifyState extends State<MyVerify> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
_size.width > 1100
|
// _size.width > 1100
|
||||||
? Container(
|
// ? Container(
|
||||||
margin: EdgeInsets.symmetric(
|
// margin: EdgeInsets.symmetric(
|
||||||
horizontal: 150),
|
// horizontal: 150),
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
SizedBox(height: 20),
|
// SizedBox(height: 20),
|
||||||
Text(
|
// Text(
|
||||||
"Benefits of Login",
|
// "Benefits of Login",
|
||||||
style:
|
// style:
|
||||||
GoogleFonts.poppins(
|
// GoogleFonts.poppins(
|
||||||
fontSize: 20,
|
// fontSize: 20,
|
||||||
fontWeight:
|
// fontWeight:
|
||||||
FontWeight.bold,
|
// FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
SizedBox(height: 15),
|
// SizedBox(height: 15),
|
||||||
],
|
// ],
|
||||||
))
|
// ))
|
||||||
: SizedBox(),
|
// : SizedBox(),
|
||||||
_size.width > 1100
|
// _size.width > 1100
|
||||||
? Container(
|
// ? Container(
|
||||||
margin: EdgeInsets.symmetric(
|
// margin: EdgeInsets.symmetric(
|
||||||
horizontal: 150),
|
// horizontal: 150),
|
||||||
child: Row(
|
// child: Row(
|
||||||
mainAxisAlignment:
|
// mainAxisAlignment:
|
||||||
MainAxisAlignment.center,
|
// MainAxisAlignment.center,
|
||||||
children: [
|
// children: [
|
||||||
Expanded(
|
// Expanded(
|
||||||
flex: 6,
|
// flex: 6,
|
||||||
child: Container(
|
// child: Container(
|
||||||
padding: EdgeInsets
|
// padding: EdgeInsets
|
||||||
.symmetric(
|
// .symmetric(
|
||||||
vertical: 8),
|
// vertical: 8),
|
||||||
child: Row(
|
// child: Row(
|
||||||
mainAxisAlignment:
|
// mainAxisAlignment:
|
||||||
MainAxisAlignment
|
// MainAxisAlignment
|
||||||
.center,
|
// .center,
|
||||||
children: [
|
// children: [
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Container(
|
// child: Container(
|
||||||
padding: EdgeInsets
|
// padding: EdgeInsets
|
||||||
.symmetric(
|
// .symmetric(
|
||||||
vertical:
|
// vertical:
|
||||||
12),
|
// 12),
|
||||||
decoration:
|
// decoration:
|
||||||
BoxDecoration(
|
// BoxDecoration(
|
||||||
border:
|
// border:
|
||||||
Border(
|
// Border(
|
||||||
right:
|
// right:
|
||||||
BorderSide(
|
// BorderSide(
|
||||||
width: 1,
|
// width: 1,
|
||||||
color: Colors
|
// color: Colors
|
||||||
.black,
|
// .black,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
Icon(
|
// Icon(
|
||||||
Icons
|
// Icons
|
||||||
.policy,
|
// .policy,
|
||||||
color: Color(
|
// color: Color(
|
||||||
0xFFE26728)),
|
// 0xFFE26728)),
|
||||||
SizedBox(
|
// SizedBox(
|
||||||
height:
|
// height:
|
||||||
10),
|
// 10),
|
||||||
Text(
|
// Text(
|
||||||
"View Policy",
|
// "View Policy",
|
||||||
style: GoogleFonts
|
// style: GoogleFonts
|
||||||
.poppins()),
|
// .poppins()),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Container(
|
// child: Container(
|
||||||
padding: EdgeInsets
|
// padding: EdgeInsets
|
||||||
.symmetric(
|
// .symmetric(
|
||||||
vertical:
|
// vertical:
|
||||||
12),
|
// 12),
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
Icon(
|
// Icon(
|
||||||
Icons
|
// Icons
|
||||||
.edit,
|
// .edit,
|
||||||
color: Color(
|
// color: Color(
|
||||||
0xFFE26728)),
|
// 0xFFE26728)),
|
||||||
SizedBox(
|
// SizedBox(
|
||||||
height:
|
// height:
|
||||||
10),
|
// 10),
|
||||||
Text(
|
// Text(
|
||||||
"Manage Claims",
|
// "Manage Claims",
|
||||||
style: GoogleFonts
|
// style: GoogleFonts
|
||||||
.poppins()),
|
// .poppins()),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
)
|
// )
|
||||||
: SizedBox(
|
// : SizedBox(
|
||||||
height: Responsive.isDesktop(
|
// height: Responsive.isDesktop(
|
||||||
context)
|
// context)
|
||||||
? _size.height * 0.1
|
// ? _size.height * 0.1
|
||||||
: _size.height * 0.2,
|
// : _size.height * 0.2,
|
||||||
),
|
// ),
|
||||||
SizedBox(
|
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(
|
Container(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
padding:
|
padding:
|
||||||
|
|||||||
@ -84,6 +84,8 @@ flutter:
|
|||||||
- .env
|
- .env
|
||||||
- .env.development
|
- .env.development
|
||||||
- .env.production
|
- .env.production
|
||||||
|
- .env.test
|
||||||
|
- .env.uat
|
||||||
# - images/a_dot_burr.jpeg
|
# - images/a_dot_burr.jpeg
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||||
|
|
||||||
<title>nhance_app_pwa</title>
|
<title>Nhance</title>
|
||||||
<link rel="manifest" href="manifest.json">
|
<link rel="manifest" href="manifest.json">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@ -48,11 +48,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</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 -->
|
<!-- This script adds the flutter initialization JS code -->
|
||||||
<script src="flutter.js" defer></script>
|
<script src="flutter.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
@ -82,9 +77,6 @@
|
|||||||
window.addEventListener('load', function(ev) {
|
window.addEventListener('load', function(ev) {
|
||||||
// Download main.dart.js
|
// Download main.dart.js
|
||||||
_flutter.loader.loadEntrypoint({
|
_flutter.loader.loadEntrypoint({
|
||||||
serviceWorker: {
|
|
||||||
serviceWorkerVersion: serviceWorkerVersion,
|
|
||||||
},
|
|
||||||
onEntrypointLoaded: function(engineInitializer) {
|
onEntrypointLoaded: function(engineInitializer) {
|
||||||
engineInitializer.initializeEngine().then(function(appRunner) {
|
engineInitializer.initializeEngine().then(function(appRunner) {
|
||||||
appRunner.runApp();
|
appRunner.runApp();
|
||||||
@ -100,7 +92,7 @@
|
|||||||
if(loadingIndicator){
|
if(loadingIndicator){
|
||||||
loadingIndicator.remove();
|
loadingIndicator.remove();
|
||||||
}
|
}
|
||||||
},5000);
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user