CHANGE_ : Hr New Policy Added and Enrollment Sum Insured Changes

This commit is contained in:
venbaittech 2024-10-18 17:25:44 +05:30
parent 79481a8f22
commit 962cbce784
12 changed files with 1100 additions and 828 deletions

View File

@ -1,3 +1,3 @@
API_URL=https://dev.venbait.in/nhance/uat/employeeRest/ API_URL=https://app.nhanceindia.in/zenith/employeeRest/
BASE_HREF=/nhance/app/uat/ BASE_HREF=/app/
ENV=production ENV=production

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 145 KiB

View File

@ -57,6 +57,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
dynamic gmcSelfRelationship; dynamic gmcSelfRelationship;
dynamic gmcSelfDetails; dynamic gmcSelfDetails;
dynamic gmcPolicyName; dynamic gmcPolicyName;
dynamic gmcPolicyType;
dynamic gmcNotes; dynamic gmcNotes;
dynamic gmcSumInsured; dynamic gmcSumInsured;
dynamic gmcFloaterTextDescription; dynamic gmcFloaterTextDescription;
@ -71,6 +72,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
dynamic topUpSlabRates; dynamic topUpSlabRates;
dynamic topUpFamilyFloater; dynamic topUpFamilyFloater;
dynamic topUpPolicyName; dynamic topUpPolicyName;
dynamic topUpPolicyType;
dynamic topUpSiPremiumValue; dynamic topUpSiPremiumValue;
dynamic topUpSiValue; dynamic topUpSiValue;
dynamic topUpSiSelectedSI; dynamic topUpSiSelectedSI;
@ -81,6 +83,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
dynamic topUpParentClientPolicyId; dynamic topUpParentClientPolicyId;
dynamic topUpParentSlabRates; dynamic topUpParentSlabRates;
dynamic topUpParentPolicyName; dynamic topUpParentPolicyName;
dynamic topUpParentPolicyType;
dynamic topUpParentFamilyFloater; dynamic topUpParentFamilyFloater;
dynamic topUpParentMappedFamilyFloatersSi; dynamic topUpParentMappedFamilyFloatersSi;
dynamic topUpParentECardDownload; dynamic topUpParentECardDownload;
@ -98,6 +101,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
dynamic addOnsSelectedDependent; dynamic addOnsSelectedDependent;
dynamic addOnsdependentValue; dynamic addOnsdependentValue;
dynamic addOnsDependentPolicyName; dynamic addOnsDependentPolicyName;
dynamic addOnsDependentPolicyType;
dynamic addOnsDependentECardDownload; dynamic addOnsDependentECardDownload;
int addOnsDependentOpenForEnrollment = 0; int addOnsDependentOpenForEnrollment = 0;
dynamic siValue; dynamic siValue;
@ -123,6 +127,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
dynamic gpaDataIsEmpty = 1; dynamic gpaDataIsEmpty = 1;
dynamic empRefId; dynamic empRefId;
dynamic empClientBranchId; dynamic empClientBranchId;
dynamic selfEmpStatus;
@override @override
void initState() { void initState() {
@ -132,7 +137,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
_memberNameController = TextEditingController(); _memberNameController = TextEditingController();
_relationShipController = TextEditingController(); _relationShipController = TextEditingController();
_loadToken(); _loadToken();
Future.delayed(Duration(seconds: 5), () { Future.delayed(Duration(seconds: 3), () {
setState(() { setState(() {
isLoading = false; isLoading = false;
}); });
@ -167,6 +172,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
// Decode the JWT token received from the API response // Decode the JWT token received from the API response
Map<String, dynamic>? decodedToken = Jwt.parseJwt(token); Map<String, dynamic>? decodedToken = Jwt.parseJwt(token);
print(decodedToken); print(decodedToken);
selfEmpStatus = prefs.getString('selfEmpStatus');
empClientBranchId = prefs.getString('empClientBranchId'); empClientBranchId = prefs.getString('empClientBranchId');
empCodeString = prefs.getString('empCode'); empCodeString = prefs.getString('empCode');
print(empCodeString); // Check if emp_code is correct print(empCodeString); // Check if emp_code is correct
@ -321,6 +327,8 @@ class _addOnsDetailsState extends State<addOnsDetails> {
topUpPolicyName = topUpPolicyName =
await topUpSiPolicies['gmc_si_topup']['policy_name']; await topUpSiPolicies['gmc_si_topup']['policy_name'];
topUpPolicyType = await topUpSiPolicies['gmc_si_topup']['type'];
topUpFamilyFloater = await topUpSiPolicies['gmc_si_topup'] topUpFamilyFloater = await topUpSiPolicies['gmc_si_topup']
['policy_terms']['family_floater']; ['policy_terms']['family_floater'];
print('topUpFamilyFloater'); print('topUpFamilyFloater');
@ -348,14 +356,15 @@ 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();
topUpSiTotalAmt = topUpSiPremiumValue + topUpSiPremiumGst; topUpSiTotalAmt = topUpSiPremiumValue + topUpSiPremiumGst;
}); });
@ -415,6 +424,9 @@ class _addOnsDetailsState extends State<addOnsDetails> {
await topUpSiParentPolicies['gmc_si_parent_topup'] await topUpSiParentPolicies['gmc_si_parent_topup']
['policy_name']; ['policy_name'];
topUpParentPolicyType =
await topUpSiParentPolicies['gmc_si_parent_topup']['type'];
topUpParentFamilyFloater = topUpParentFamilyFloater =
await topUpSiParentPolicies['gmc_si_parent_topup'] await topUpSiParentPolicies['gmc_si_parent_topup']
['policy_terms']['family_floater']; ['policy_terms']['family_floater'];
@ -447,16 +459,18 @@ 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();
topUpParentSiTotalAmt = topUpParentSiTotalAmt =
topUpParentSiPremiumValue + topUpParentSiPremiumGst; topUpParentSiPremiumValue + topUpParentSiPremiumGst;
@ -517,6 +531,9 @@ class _addOnsDetailsState extends State<addOnsDetails> {
await addOnsDependentPolicies['gmc_dependent_addon'] await addOnsDependentPolicies['gmc_dependent_addon']
['policy_name']; ['policy_name'];
addOnsDependentPolicyType =
await addOnsDependentPolicies['gmc_dependent_addon']['type'];
addOnsDependentFamilyFloater = addOnsDependentFamilyFloater =
await addOnsDependentPolicies['gmc_dependent_addon'] await addOnsDependentPolicies['gmc_dependent_addon']
['policy_terms']['family_floater']; ['policy_terms']['family_floater'];
@ -539,15 +556,19 @@ 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)
.toInt();
addOnsDependentTotalAmt = addOnsDependentTotalAmt =
addOnDependentPremiumValue + addOnsDependentPremiumGst; addOnDependentPremiumValue + addOnsDependentPremiumGst;
@ -807,6 +828,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
@ -884,6 +906,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
@ -960,6 +983,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
@ -1091,7 +1115,8 @@ class _addOnsDetailsState extends State<addOnsDetails> {
var calculation = { var calculation = {
'client_policy_id': topUpClientPolicyId, 'client_policy_id': topUpClientPolicyId,
'emp_code': empCodeString, 'emp_code': empCodeString,
'si': choosedSiValue 'si': choosedSiValue,
'client_branch_id': empClientBranchId
}; };
print(calculation); print(calculation);
@ -1130,10 +1155,11 @@ 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;
print(topUpSiTotalAmt); print(topUpSiTotalAmt);
}); });
@ -1157,7 +1183,8 @@ class _addOnsDetailsState extends State<addOnsDetails> {
var calculation = { var calculation = {
'client_policy_id': topUpParentClientPolicyId, 'client_policy_id': topUpParentClientPolicyId,
'emp_code': empCodeString, 'emp_code': empCodeString,
'si': choosedSiValue 'si': choosedSiValue,
'client_branch_id': empClientBranchId
}; };
print(calculation); print(calculation);
@ -1197,9 +1224,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;
@ -1225,7 +1253,8 @@ class _addOnsDetailsState extends State<addOnsDetails> {
var calculation = { var calculation = {
'client_policy_id': addOnsDependentClientPolicyId, 'client_policy_id': addOnsDependentClientPolicyId,
'emp_code': empCodeString, 'emp_code': empCodeString,
'si': choosedDependentValue 'si': choosedDependentValue,
'client_branch_id': empClientBranchId
}; };
print(calculation); print(calculation);
@ -1265,9 +1294,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;
@ -1289,10 +1319,17 @@ class _addOnsDetailsState extends State<addOnsDetails> {
setState(() { setState(() {
isLoading = true; isLoading = true;
}); });
print('sendAddOnAPI'); print('sendAddOnAPI');
if (gpaDataIsEmpty != 0) { if (gpaDataIsEmpty != 0) {
iAgreeForAddOn.add(int.parse(gpaClintPolicyId)); print('gpaDataIsEmpty : $gpaDataIsEmpty');
for (var item in gpaPolicies) {
print('ClientPolicyId');
// Extract ClientPolicyId value from each object
String clientPolicyId = item['ClientPolicyId'];
// Convert to integer and add to iAgreeForAddOn list
iAgreeForAddOn.add(int.parse(clientPolicyId));
}
} }
if (gmcDataIsEmpty != 0) { if (gmcDataIsEmpty != 0) {
@ -1996,8 +2033,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
), ),
@ -2639,8 +2676,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
), ),
@ -3165,7 +3202,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
), ),
), ),
Text( Text(
'Group Medical Coverage - Dependent AddOns', '',
textAlign: textAlign:
TextAlign.left, TextAlign.left,
style: GoogleFonts style: GoogleFonts
@ -3268,29 +3305,27 @@ class _addOnsDetailsState extends State<addOnsDetails> {
.end, .end,
children: [ children: [
Switch( Switch(
value: value:
_addOnsDependentSwitcher, _addOnsDependentSwitcher,
onChanged: (addOnsDependentOpenForEnrollment == onChanged: (addOnsDependentOpenForEnrollment ==
0 || 0 ||
(addOnsDependentOpenForEnrollment != (addOnsDependentOpenForEnrollment !=
0 && 0 &&
addOnsDependentECardDownload != addOnsDependentECardDownload !=
null)) null))
? null ? null
: (value) { : (value) {
setState( setState(
() { () {
_addOnsDependentSwitcher = _addOnsDependentSwitcher =
value; value;
// 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: inactiveTrackColor:
Colors Colors.grey),
.grey, // Color of the switch track when OFF
),
], ],
))), ))),
], ],
@ -3986,6 +4021,18 @@ class _addOnsDetailsState extends State<addOnsDetails> {
} }
} }
Future<void> _launchURL(String url) async {
final Uri uri = Uri.parse(url); // Parse the URL properly
print('_launchURL $uri');
if (uri != null) {
print('If $uri');
await launchUrl(uri, mode: LaunchMode.externalApplication);
} else {
print('else $uri');
throw 'Could not launch $url';
}
}
void openForm(Map<String, dynamic> floaterData, action) { void openForm(Map<String, dynamic> floaterData, action) {
print(action); print(action);
print(floaterData); print(floaterData);
@ -4292,6 +4339,200 @@ class _addOnsDetailsState extends State<addOnsDetails> {
); );
} }
List<Widget> generateGmcCards(List<dynamic> data) {
List<Widget> cards = [];
for (var item in data) {
setState(() {
gmcPolicyName = item['Policy_Name'];
gmcFloaterTextHeading = item['floter_text_heading'];
gmcFloaterTextDescription = item['floter_text_description'];
gmcNotes = item['notes'];
gmcECardDownload = item['eCardDownload'];
// gmcSumInsured = item['Policy_Terms']['sum_insured'];
gmcMappedFamilyFloaters = item['mapped_family_floaters'];
dynamic getTrueObjects = gmcMappedFamilyFloaters
.where((element) => element['is_value_exist'] == true)
.toList();
print('getTrueObjects');
print(getTrueObjects);
if (getTrueObjects.length > 0) {
print('true');
gmcSumInsured = gmcMappedFamilyFloaters[0]["data"]["basic_cover_si"];
} else {
print('false');
gmcSumInsured = item['Policy_Terms']['sum_insured'];
}
gmcTypeName = item['type'];
});
print('forEach Card');
print(gmcMappedFamilyFloaters);
dynamic getTrueObjects = gmcMappedFamilyFloaters
.where((element) => element['is_value_exist'] == true)
.toList();
print(getTrueObjects);
Widget card = getTrueObjects.length > 0
? Card(
elevation: 0,
color: Colors.white,
child: Padding(
padding: Responsive.isDesktop(context)
? EdgeInsets.all(30)
: EdgeInsets.all(10),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Color(
0xFFFFF1DD), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: Responsive.isDesktop(context)
? EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25)
: EdgeInsets.only(
top: 10, bottom: 10, left: 10, right: 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 9,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context)
? 18
: 13,
),
),
Row(
children: [
Text(
gmcPolicyName ?? '',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context)
? 20
: 14,
fontWeight: FontWeight.w600,
),
),
if (item['eCardDownload'] != null)
GestureDetector(
onTap: () async {
_launchURL(
item['eCardDownload']);
},
child: MouseRegion(
cursor:
SystemMouseCursors.click,
child: Icon(
Icons.file_download,
color: Color(0xFFE26728),
size: 25,
),
),
),
],
),
],
))),
Expanded(
flex: 3,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
gmcFloaterTextHeading ?? '',
textAlign: TextAlign.right,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context)
? 18
: 13,
),
),
Text(
'${gmcSumInsured != null ? gmcSumInsured : 'NA'}',
textAlign: TextAlign.right,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context)
? 20
: 14,
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
padding: Responsive.isDesktop(context)
? EdgeInsets.only(
top: 0, bottom: 0, left: 15, right: 15)
: EdgeInsets.only(
top: 0, bottom: 0, left: 5, right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: gmcMappedFamilyFloaters
.where((item) => item['is_value_exist'] == true)
.map<Widget>((item) {
Map<String, dynamic> data = item['data'];
String formattedDate = formatDate(data['dob']);
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: Responsive.isDesktop(context)
? 10
: 5), // Space between icon and text
Expanded(
child: Text(
'${data['name']} ~ ${data['relationship']} ~ DOB : $formattedDate',
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context) ? 18 : 16,
color: Color(0xFF232526),
),
),
),
],
);
}).toList(),
),
),
],
),
))
: SizedBox(height: 0);
cards.add(card);
}
return cards;
}
List<Widget> generateGpaCards(List<dynamic> data) { List<Widget> generateGpaCards(List<dynamic> data) {
List<Widget> cards = []; List<Widget> cards = [];
@ -4413,16 +4654,10 @@ class _addOnsDetailsState extends State<addOnsDetails> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
if (gpaECardDownload != null) if (item['eCardDownload'] != null)
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
Uri uri = Uri.parse(gpaECardDownload); _launchURL(item['eCardDownload']);
if (await canLaunchUrl(uri)) {
await launchUrl(uri);
} else {
print(
'Could not launch $gpaECardDownload');
}
}, },
child: MouseRegion( child: MouseRegion(
cursor: SystemMouseCursors.click, cursor: SystemMouseCursors.click,
@ -4485,208 +4720,4 @@ class _addOnsDetailsState extends State<addOnsDetails> {
return cards; return cards;
} }
List<Widget> generateGmcCards(List<dynamic> data) {
List<Widget> cards = [];
for (var item in data) {
setState(() {
gmcPolicyName = item['Policy_Name'];
gmcFloaterTextHeading = item['floter_text_heading'];
gmcFloaterTextDescription = item['floter_text_description'];
gmcNotes = item['notes'];
gmcECardDownload = item['eCardDownload'];
// gmcSumInsured = item['Policy_Terms']['sum_insured'];
gmcMappedFamilyFloaters = item['mapped_family_floaters'];
dynamic getTrueObjects = gmcMappedFamilyFloaters
.where((element) => element['is_value_exist'] == true)
.toList();
print('getTrueObjects');
print(getTrueObjects);
if (getTrueObjects.length > 0) {
print('true');
gmcSumInsured = gmcMappedFamilyFloaters[0]["data"]["basic_cover_si"];
} else {
print('false');
gmcSumInsured = item['Policy_Terms']['sum_insured'];
}
gmcTypeName = item['type'];
});
print('forEach Card');
print(gmcMappedFamilyFloaters);
dynamic getTrueObjects = gmcMappedFamilyFloaters
.where((element) => element['is_value_exist'] == true)
.toList();
print(getTrueObjects);
Widget card = getTrueObjects.length > 0
? Card(
elevation: 0,
color: Colors.white,
child: Padding(
padding: Responsive.isDesktop(context)
? EdgeInsets.all(30)
: EdgeInsets.all(10),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Color(
0xFFFFF1DD), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: Responsive.isDesktop(context)
? EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25)
: EdgeInsets.only(
top: 10, bottom: 10, left: 10, right: 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 9,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context)
? 18
: 13,
),
),
Row(
children: [
Text(
gmcPolicyName ?? '',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context)
? 20
: 14,
fontWeight: FontWeight.w600,
),
),
if (gmcECardDownload != null)
GestureDetector(
onTap: () async {
// Convert the URL string to a Uri object
Uri uri =
Uri.parse(gmcECardDownload);
// Check if the URL is valid
if (await canLaunchUrl(uri)) {
// Open the URL in the default browser
await launchUrl(uri);
} else {
// Handle the case where the URL cannot be launched
print(
'Could not launch $gmcECardDownload');
}
},
child: MouseRegion(
cursor:
SystemMouseCursors.click,
child: Icon(
Icons.file_download,
color: Color(0xFFE26728),
size: 25,
),
),
),
],
),
],
))),
Expanded(
flex: 3,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
gmcFloaterTextHeading ?? '',
textAlign: TextAlign.right,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context)
? 18
: 13,
),
),
Text(
'${gmcSumInsured != null ? gmcSumInsured : 'NA'}',
textAlign: TextAlign.right,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context)
? 20
: 14,
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
padding: Responsive.isDesktop(context)
? EdgeInsets.only(
top: 0, bottom: 0, left: 15, right: 15)
: EdgeInsets.only(
top: 0, bottom: 0, left: 5, right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: gmcMappedFamilyFloaters
.where((item) => item['is_value_exist'] == true)
.map<Widget>((item) {
Map<String, dynamic> data = item['data'];
String formattedDate = formatDate(data['dob']);
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: Responsive.isDesktop(context)
? 10
: 5), // Space between icon and text
Expanded(
child: Text(
'${data['name']} ~ ${data['relationship']} ~ DOB : $formattedDate',
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context) ? 18 : 16,
color: Color(0xFF232526),
),
),
),
],
);
}).toList(),
),
),
],
),
))
: SizedBox(height: 0);
cards.add(card);
}
return cards;
}
} }

View File

@ -93,8 +93,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: 150,
height: 230, height: 150,
child: Image.asset( child: Image.asset(
'assets/nhance_client_logo.png', 'assets/nhance_client_logo.png',
fit: BoxFit.contain, fit: BoxFit.contain,

View File

@ -47,6 +47,7 @@ class _empDetailsState extends State<empDetails> {
dynamic gpaSelfDetails; dynamic gpaSelfDetails;
dynamic gpaOpenForEnrollment; dynamic gpaOpenForEnrollment;
dynamic gpaECardDownload; dynamic gpaECardDownload;
dynamic gpaSumInsured;
dynamic gmcECardDownload; dynamic gmcECardDownload;
int gmcOpenForEnrollment = 0; int gmcOpenForEnrollment = 0;
dynamic gmcPolicies; dynamic gmcPolicies;
@ -57,6 +58,7 @@ class _empDetailsState extends State<empDetails> {
dynamic gmcSelfRelationship; dynamic gmcSelfRelationship;
dynamic gmcSelfDetails; dynamic gmcSelfDetails;
dynamic gmcPolicyName; dynamic gmcPolicyName;
dynamic gmcPolicyType;
dynamic gmcNotes; dynamic gmcNotes;
dynamic gmcGridMaster; dynamic gmcGridMaster;
dynamic gmcSumInsured; dynamic gmcSumInsured;
@ -86,6 +88,7 @@ class _empDetailsState extends State<empDetails> {
dynamic selfEmpCode; dynamic selfEmpCode;
dynamic selfFamilyFloaterKey; dynamic selfFamilyFloaterKey;
dynamic selfEmpStatus; dynamic selfEmpStatus;
dynamic selfUnit;
dynamic gmcDataIsEmpty = 1; dynamic gmcDataIsEmpty = 1;
dynamic gpaDataIsEmpty = 1; dynamic gpaDataIsEmpty = 1;
dynamic hrPrimaryId; dynamic hrPrimaryId;
@ -335,6 +338,7 @@ class _empDetailsState extends State<empDetails> {
selfFamilyFloaterKey = selfDetails['family_floater_key']; selfFamilyFloaterKey = selfDetails['family_floater_key'];
// print(clientDetails); // print(clientDetails);
selfEmpStatus = selfDetails['emp_status']; selfEmpStatus = selfDetails['emp_status'];
selfUnit = selfDetails['unit'];
}); });
final SharedPreferences prefs = await SharedPreferences.getInstance(); final SharedPreferences prefs = await SharedPreferences.getInstance();
prefs.setString('selfEmpStatus', selfEmpStatus); prefs.setString('selfEmpStatus', selfEmpStatus);
@ -573,10 +577,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();
@ -600,6 +604,8 @@ class _empDetailsState extends State<empDetails> {
'client_policy_id': floatedData['client_policy_id'], 'client_policy_id': floatedData['client_policy_id'],
'created_by': primaryId, 'created_by': primaryId,
'is_createdby_hr': is_createdby_hr, 'is_createdby_hr': is_createdby_hr,
'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'],
}); });
@ -954,7 +960,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);
@ -1077,7 +1083,7 @@ class _empDetailsState extends State<empDetails> {
hintText: 'Relationship', hintText: 'Relationship',
labelText: 'Relationship', labelText: 'Relationship',
contentPadding: EdgeInsets.symmetric( contentPadding: EdgeInsets.symmetric(
vertical: 5, horizontal: 5), vertical: 10, horizontal: 15),
), ),
value: dropdownValue ?? value: dropdownValue ??
(action == 'Edit' (action == 'Edit'
@ -1086,6 +1092,7 @@ class _empDetailsState extends State<empDetails> {
onChanged: (value) { onChanged: (value) {
_relationShipController.text = value!; _relationShipController.text = value!;
}, },
dropdownColor: Colors.white,
items: selectedRelationships items: selectedRelationships
.map((relationship) { .map((relationship) {
final String relationshipName = final String relationshipName =
@ -1229,7 +1236,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();
@ -1265,6 +1275,18 @@ class _empDetailsState extends State<empDetails> {
); );
} }
Future<void> _launchURL(String url) async {
final Uri uri = Uri.parse(url); // Parse the URL properly
print('_launchURL $uri');
if (uri != null) {
print('If $uri');
await launchUrl(uri, mode: LaunchMode.externalApplication);
} else {
print('else $uri');
throw 'Could not launch $url';
}
}
void openSelfForm(action) { void openSelfForm(action) {
showDialog( showDialog(
context: context, context: context,
@ -1384,21 +1406,21 @@ class _empDetailsState extends State<empDetails> {
), ),
), ),
), ),
SizedBox(width: 10), // SizedBox(width: 10),
Expanded( // Expanded(
flex: 4, // flex: 4,
child: TextFormField( // child: TextFormField(
readOnly: true, // readOnly: true,
initialValue: selfEmailPersonal ?? '', // initialValue: selfEmailPersonal ?? '',
decoration: InputDecoration( // decoration: InputDecoration(
border: OutlineInputBorder(), // border: OutlineInputBorder(),
hintText: 'Email personal', // hintText: 'Email personal',
labelText: 'Email personal', // labelText: 'Email personal',
contentPadding: EdgeInsets.symmetric( // contentPadding: EdgeInsets.symmetric(
vertical: 10, horizontal: 15), // vertical: 10, horizontal: 15),
), // ),
), // ),
), // ),
SizedBox(width: 10), SizedBox(width: 10),
Expanded( Expanded(
flex: 4, flex: 4,
@ -1519,18 +1541,18 @@ class _empDetailsState extends State<empDetails> {
vertical: 10, horizontal: 15), vertical: 10, horizontal: 15),
), ),
), ),
SizedBox(height: 15), // SizedBox(height: 15),
TextFormField( // TextFormField(
readOnly: true, // readOnly: true,
initialValue: selfEmailPersonal ?? '', // initialValue: selfEmailPersonal ?? '',
decoration: InputDecoration( // decoration: InputDecoration(
border: OutlineInputBorder(), // border: OutlineInputBorder(),
hintText: 'Email personal', // hintText: 'Email personal',
labelText: 'Email personal', // labelText: 'Email personal',
contentPadding: EdgeInsets.symmetric( // contentPadding: EdgeInsets.symmetric(
vertical: 10, horizontal: 15), // vertical: 10, horizontal: 15),
), // ),
), // ),
SizedBox(height: 15), SizedBox(height: 15),
TextFormField( TextFormField(
readOnly: true, readOnly: true,
@ -1805,16 +1827,10 @@ class _empDetailsState extends State<empDetails> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
if (gpaECardDownload != null) if (item['eCardDownload'] != null)
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
Uri uri = Uri.parse(gpaECardDownload); _launchURL(item['eCardDownload']);
if (await canLaunchUrl(uri)) {
await launchUrl(uri);
} else {
print(
'Could not launch $gpaECardDownload');
}
}, },
child: MouseRegion( child: MouseRegion(
cursor: SystemMouseCursors.click, cursor: SystemMouseCursors.click,
@ -2042,7 +2058,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(
@ -2076,7 +2093,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);
} }
} }
}, },
@ -2203,22 +2220,10 @@ class _empDetailsState extends State<empDetails> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
if (gmcECardDownload != null) if (item['eCardDownload'] != null)
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
// Convert the URL string to a Uri object _launchURL(item['eCardDownload']);
Uri uri =
Uri.parse(gmcECardDownload);
// Check if the URL is valid
if (await canLaunchUrl(uri)) {
// Open the URL in the default browser
await launchUrl(uri);
} else {
// Handle the case where the URL cannot be launched
print(
'Could not launch $gmcECardDownload');
}
}, },
child: MouseRegion( child: MouseRegion(
cursor: SystemMouseCursors.click, cursor: SystemMouseCursors.click,

View File

@ -27,7 +27,11 @@ class empReviewDetails extends StatefulWidget {
class _empReviewDetailsState extends State<empReviewDetails> { 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;
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;
@ -38,7 +42,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
dynamic gpaGridMaster; dynamic gpaGridMaster;
dynamic gmcPolicies; dynamic gmcPolicies;
dynamic gpasumInsured; dynamic gpasumInsured;
dynamic gpaClintPolicyId = 0; dynamic gpaClintPolicyId;
dynamic gpaMappedFamilyFloaters = []; dynamic gpaMappedFamilyFloaters = [];
dynamic gpaSelfName; dynamic gpaSelfName;
dynamic gpaSelfDob; dynamic gpaSelfDob;
@ -53,6 +57,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
dynamic gmcSelfRelationship; dynamic gmcSelfRelationship;
dynamic gmcSelfDetails; dynamic gmcSelfDetails;
dynamic gmcPolicyName; dynamic gmcPolicyName;
dynamic gmcPolicyType;
dynamic gmcNotes; dynamic gmcNotes;
dynamic gmcSumInsured; dynamic gmcSumInsured;
dynamic gmcTypeName; dynamic gmcTypeName;
@ -68,11 +73,13 @@ class _empReviewDetailsState extends State<empReviewDetails> {
dynamic siValue; dynamic siValue;
dynamic addOnsDependentSumInsured; dynamic addOnsDependentSumInsured;
dynamic addOnsDependentPolicyName; dynamic addOnsDependentPolicyName;
dynamic addOnsDependentPolicyType;
dynamic addOnsFloaterTextHeading; dynamic addOnsFloaterTextHeading;
dynamic addOnsDependentECardDownload; dynamic addOnsDependentECardDownload;
dynamic addOnsDependentDisclaimer;
dynamic addOnsFamilyFloater; dynamic addOnsFamilyFloater;
late DateTime? selectedDate; late DateTime? selectedDate;
int totalPayableAmt = 0; double totalPayableAmt = 0.0;
List<Map<String, String>> relationshipOptions = []; List<Map<String, String>> relationshipOptions = [];
List<Map<String, String>> selectedRelationships = []; List<Map<String, String>> selectedRelationships = [];
List<Map<String, dynamic>> formDataList = []; List<Map<String, dynamic>> formDataList = [];
@ -82,21 +89,24 @@ class _empReviewDetailsState extends State<empReviewDetails> {
dynamic topUpSlabRates; dynamic topUpSlabRates;
dynamic topUpFamilyFloater; dynamic topUpFamilyFloater;
dynamic topUpPolicyName; dynamic topUpPolicyName;
dynamic topUpPolicyType;
dynamic topUpTypeName; dynamic topUpTypeName;
int topUpSiPremiumValue = 0; dynamic topUpSiPremiumValue;
int topUpSiPremiumGst = 0; dynamic topUpSiPremiumGst;
int topUpSiTotalAmt = 0; dynamic topUpSiTotalAmt;
int topUpParentSiPremiumValue = 0; dynamic topUpParentSiPremiumValue;
int topUpParentSiPremiumGst = 0; dynamic topUpParentSiPremiumGst;
int topUpParentSiTotalAmt = 0; dynamic topUpParentSiTotalAmt;
int addOnDependentPremiumValue = 0; // int addOnDependentPremiumValue = 0;
int addOnsDependentPremiumGst = 0; dynamic addOnDependentPremiumValue;
int addOnsDependentTotalAmt = 0; dynamic addOnsDependentPremiumGst;
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;
@ -105,6 +115,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
dynamic topUpParentClientPolicyId; dynamic topUpParentClientPolicyId;
dynamic topUpParentSlabRates; dynamic topUpParentSlabRates;
dynamic topUpParentPolicyName; dynamic topUpParentPolicyName;
dynamic topUpParentPolicyType;
dynamic topUpParentFamilyFloater; dynamic topUpParentFamilyFloater;
dynamic topUpParentMappedFamilyFloatersSi; dynamic topUpParentMappedFamilyFloatersSi;
dynamic topUpParentECardDownload; dynamic topUpParentECardDownload;
@ -112,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;
@ -120,13 +132,14 @@ class _empReviewDetailsState extends State<empReviewDetails> {
dynamic gmcDataIsEmpty = 1; dynamic gmcDataIsEmpty = 1;
dynamic gpaDataIsEmpty = 1; dynamic gpaDataIsEmpty = 1;
dynamic empClientBranchId; dynamic empClientBranchId;
dynamic selfEmpStatus;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
apiService = ApiService(context); // Initialize ApiService here apiService = ApiService(context); // Initialize ApiService here
_loadToken(); _loadToken();
Future.delayed(Duration(seconds: 5), () { Future.delayed(Duration(seconds: 3), () {
setState(() { setState(() {
isLoading = false; isLoading = false;
}); });
@ -155,6 +168,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
setState(() { setState(() {
_token = token; _token = token;
}); });
selfEmpStatus = prefs.getString('selfEmpStatus');
empClientBranchId = prefs.getString('empClientBranchId'); empClientBranchId = prefs.getString('empClientBranchId');
empCodeString = prefs.getString('empCode'); empCodeString = prefs.getString('empCode');
print(empCodeString); // Check if emp_code is correct print(empCodeString); // Check if emp_code is correct
@ -380,6 +394,8 @@ class _empReviewDetailsState extends State<empReviewDetails> {
topUpPolicyName = topUpPolicyName =
await topUpSiPolicies['gmc_si_topup']['policy_name']; await topUpSiPolicies['gmc_si_topup']['policy_name'];
topUpPolicyType = await topUpSiPolicies['gmc_si_topup']['type'];
topUpMappedFamilyFloatersSiArray = topUpSiPolicies['gmc_si_topup'] topUpMappedFamilyFloatersSiArray = topUpSiPolicies['gmc_si_topup']
['family_floaters_of_only_si_array']; ['family_floaters_of_only_si_array'];
print('topUpMappedFamilyFloatersSiArray'); print('topUpMappedFamilyFloatersSiArray');
@ -392,6 +408,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 {
// ToastHelper.showErrorToast( // ToastHelper.showErrorToast(
@ -447,6 +466,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
await topUpSiParentPolicies['gmc_si_parent_topup'] await topUpSiParentPolicies['gmc_si_parent_topup']
['policy_name']; ['policy_name'];
topUpParentPolicyType =
await topUpSiParentPolicies['gmc_si_parent_topup']['type'];
topUpParentFamilyFloater = topUpParentFamilyFloater =
await topUpSiParentPolicies['gmc_si_parent_topup'] await topUpSiParentPolicies['gmc_si_parent_topup']
['policy_terms']['family_floater']; ['policy_terms']['family_floater'];
@ -485,6 +507,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
} else { } else {
showHideTopUpParentCard = 1; showHideTopUpParentCard = 1;
} }
topUpParentDisclaimer =
await topUpSiParentPolicies['gmc_si_parent_topup']
['disclaimer'];
// }); // });
} else { } else {
// ToastHelper.showErrorToast( // ToastHelper.showErrorToast(
@ -545,6 +571,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
addOnsDependentPolicies['gmc_dependent_addon']['policy_name']; addOnsDependentPolicies['gmc_dependent_addon']['policy_name'];
print(addOnsDependentPolicyName); print(addOnsDependentPolicyName);
addOnsDependentPolicyType =
addOnsDependentPolicies['gmc_dependent_addon']['type'];
print(addOnsDependentPolicyType);
addOnsDependentMappedFamilyFloatersArray = addOnsDependentMappedFamilyFloatersArray =
await addOnsDependentPolicies['gmc_dependent_addon'] await addOnsDependentPolicies['gmc_dependent_addon']
['family_floaters_of_dependent_and_si_array']; ['family_floaters_of_dependent_and_si_array'];
@ -557,6 +587,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 {
// ToastHelper.showErrorToast( // ToastHelper.showErrorToast(
// context, 'No data found in the response'); // context, 'No data found in the response');
@ -582,7 +616,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
Future<void> sendAddOnAPI() async { Future<void> sendAddOnAPI() async {
setState(() { setState(() {
isLoading = false; isLoading = true;
}); });
if (addOnsDependentMappedFamilyFloatersArray != null) { if (addOnsDependentMappedFamilyFloatersArray != null) {
dynamic getDependentTrueObjects = addOnsDependentMappedFamilyFloatersArray dynamic getDependentTrueObjects = addOnsDependentMappedFamilyFloatersArray
@ -626,7 +660,14 @@ class _empReviewDetailsState extends State<empReviewDetails> {
print(gmcPolicies); print(gmcPolicies);
if (gpaDataIsEmpty != 0) { if (gpaDataIsEmpty != 0) {
iAgreeForAddOn.add(int.parse(gpaClintPolicyId)); print('gpaDataIsEmpty : $gpaDataIsEmpty');
for (var item in gpaPolicies) {
print('ClientPolicyId');
// Extract ClientPolicyId value from each object
String clientPolicyId = item['ClientPolicyId'];
// Convert to integer and add to iAgreeForAddOn list
iAgreeForAddOn.add(int.parse(clientPolicyId));
}
} }
if (gmcDataIsEmpty != 0) { if (gmcDataIsEmpty != 0) {
@ -658,6 +699,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');
_showSuccessDialog(); _showSuccessDialog();
@ -741,6 +785,25 @@ class _empReviewDetailsState extends State<empReviewDetails> {
); );
} }
Future<void> _launchURL(String url) async {
final Uri uri = Uri.parse(url); // Parse the URL properly
print('_launchURL $uri');
if (uri != null) {
print('If $uri');
await launchUrl(uri, mode: LaunchMode.externalApplication);
} else {
print('else $uri');
throw 'Could not launch $url';
}
}
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) &&
@ -1089,21 +1152,8 @@ class _empReviewDetailsState extends State<empReviewDetails> {
null) null)
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
// Convert the URL string to a Uri object _launchURL(
Uri uri = Uri.parse(
topUpECardDownload); topUpECardDownload);
// Check if the URL is valid
if (await canLaunchUrl(
uri)) {
// Open the URL in the default browser
await launchUrl(
uri);
} else {
// Handle the case where the URL cannot be launched
print(
'Could not launch $topUpECardDownload');
}
}, },
child: MouseRegion( child: MouseRegion(
cursor: cursor:
@ -1334,21 +1384,8 @@ class _empReviewDetailsState extends State<empReviewDetails> {
null) null)
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
// Convert the URL string to a Uri object _launchURL(
Uri uri = Uri.parse(
topUpParentECardDownload); topUpParentECardDownload);
// Check if the URL is valid
if (await canLaunchUrl(
uri)) {
// Open the URL in the default browser
await launchUrl(
uri);
} else {
// Handle the case where the URL cannot be launched
print(
'Could not launch $topUpParentECardDownload');
}
}, },
child: MouseRegion( child: MouseRegion(
cursor: cursor:
@ -1573,21 +1610,8 @@ class _empReviewDetailsState extends State<empReviewDetails> {
null) null)
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
// Convert the URL string to a Uri object _launchURL(
Uri uri = Uri.parse(
addOnsDependentECardDownload); addOnsDependentECardDownload);
// Check if the URL is valid
if (await canLaunchUrl(
uri)) {
// Open the URL in the default browser
await launchUrl(
uri);
} else {
// Handle the case where the URL cannot be launched
print(
'Could not launch $addOnsDependentECardDownload');
}
}, },
child: MouseRegion( child: MouseRegion(
cursor: cursor:
@ -2225,6 +2249,191 @@ 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: height:
Responsive.isDesktop(context) ? 15 : 0), Responsive.isDesktop(context) ? 15 : 0),
@ -2274,8 +2483,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(
@ -2332,6 +2542,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
print(item); print(item);
String? gpaPolicyName = item['Policy_Name']; String? gpaPolicyName = item['Policy_Name'];
String? gpaPolicyType = item['type'];
String? gpaECardDownload = item['eCardDownload']; String? gpaECardDownload = item['eCardDownload'];
String? gpaSumInsured; String? gpaSumInsured;
List<dynamic> gpaMappedFamilyFloaters = []; List<dynamic> gpaMappedFamilyFloaters = [];
@ -2444,16 +2655,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
if (gpaECardDownload != null) if (item['eCardDownload'] != null)
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
Uri uri = Uri.parse(gpaECardDownload); _launchURL(item['eCardDownload']);
if (await canLaunchUrl(uri)) {
await launchUrl(uri);
} else {
print(
'Could not launch $gpaECardDownload');
}
}, },
child: MouseRegion( child: MouseRegion(
cursor: SystemMouseCursors.click, cursor: SystemMouseCursors.click,
@ -2523,6 +2728,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
for (var item in data) { for (var item in data) {
setState(() { setState(() {
gmcPolicyName = item['Policy_Name']; gmcPolicyName = item['Policy_Name'];
gmcPolicyType = item['type'];
gmcFloaterTextHeading = item['floter_text_heading']; gmcFloaterTextHeading = item['floter_text_heading'];
gmcFloaterTextDescription = item['floter_text_description']; gmcFloaterTextDescription = item['floter_text_description'];
gmcNotes = item['notes']; gmcNotes = item['notes'];
@ -2608,22 +2814,11 @@ class _empReviewDetailsState extends State<empReviewDetails> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
if (gmcECardDownload != null) if (item['eCardDownload'] != null)
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
// Convert the URL string to a Uri object _launchURL(
Uri uri = item['eCardDownload']);
Uri.parse(gmcECardDownload);
// Check if the URL is valid
if (await canLaunchUrl(uri)) {
// Open the URL in the default browser
await launchUrl(uri);
} else {
// Handle the case where the URL cannot be launched
print(
'Could not launch $gmcECardDownload');
}
}, },
child: MouseRegion( child: MouseRegion(
cursor: cursor:

View File

@ -485,6 +485,7 @@ class _excelVerifyState extends State<excelVerify> {
(cell) => Map<String, dynamic>.from(cell)) (cell) => Map<String, dynamic>.from(cell))
.toList()) .toList())
.toList(); .toList();
print('excelData : $excelData');
print('excelHeader : $excelHeader'); print('excelHeader : $excelHeader');
}); });
} }

View File

@ -448,7 +448,7 @@ class _MyPhoneState extends State<MyHrLogin> {
)), )),
], ],
), ),
SizedBox(height: 15), SizedBox(height: 80),
Container( Container(
margin: Responsive.isDesktop(context) margin: Responsive.isDesktop(context)
? EdgeInsets.symmetric( ? EdgeInsets.symmetric(
@ -603,110 +603,115 @@ class _MyPhoneState extends State<MyHrLogin> {
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: TextStyle( // style: TextStyle(
fontSize: 20, // fontSize: 20,
fontWeight: FontWeight.bold, // fontWeight: 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: // padding:
EdgeInsets.symmetric( // EdgeInsets.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: 10), // height: 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(Icons.edit, // Icon(Icons.edit,
color: Color( // color: Color(
0xFFE26728)), // 0xFFE26728)),
SizedBox( // SizedBox(
height: 10), // height: 10),
Text( // Text(
"Manage Claims"), // "Manage Claims"),
], // ],
), // ),
), // ),
), // ),
], // ],
), // ),
), // ),
), // ),
], // ],
), // ),
) // )
: SizedBox( // : SizedBox(
height: // height:
Responsive.isDesktop(context) // Responsive.isDesktop(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,
// ),
Align( Align(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: Container( child: Container(

View File

@ -124,6 +124,24 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
String int_inception_type = argumentsData['inception_type']; String int_inception_type = argumentsData['inception_type'];
inceptionType = int.parse(int_inception_type); inceptionType = int.parse(int_inception_type);
getEmployeeAndDependence(clientId, clientPolicyId); getEmployeeAndDependence(clientId, clientPolicyId);
} else if (argumentsData['type'] == 'EDLI') {
_isLoading = true;
clientPolicyId = argumentsData['client_policy_id'];
clientId = argumentsData['client_id'];
policyType = argumentsData['type'];
policyName = argumentsData['policy_name'];
String int_inception_type = argumentsData['inception_type'];
inceptionType = int.parse(int_inception_type);
getEmployeeAndDependence(clientId, clientPolicyId);
} else if (argumentsData['type'] == 'GTLI') {
_isLoading = true;
clientPolicyId = argumentsData['client_policy_id'];
clientId = argumentsData['client_id'];
policyType = argumentsData['type'];
policyName = argumentsData['policy_name'];
String int_inception_type = argumentsData['inception_type'];
inceptionType = int.parse(int_inception_type);
getEmployeeAndDependence(clientId, clientPolicyId);
} }
} }
}); });
@ -524,7 +542,9 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
? 5 ? 5
: 0), : 0),
if ((policyType == 'GPA' || if ((policyType == 'GPA' ||
policyType == 'GMC') && policyType == 'GMC' ||
policyType == 'EDLI' ||
policyType == 'GTLI') &&
inceptionType == 2) inceptionType == 2)
Expanded( Expanded(
flex: 2, flex: 2,

View File

@ -524,7 +524,7 @@ class _MyVerifyState extends State<MyHrVerify> {
)), )),
], ],
), ),
SizedBox(height: 10), SizedBox(height: 80),
Container( Container(
margin: Responsive.isDesktop(context) margin: Responsive.isDesktop(context)
? EdgeInsets.symmetric( ? EdgeInsets.symmetric(
@ -657,110 +657,115 @@ class _MyVerifyState extends State<MyHrVerify> {
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: GoogleFonts.poppins( // style: GoogleFonts.poppins(
fontSize: 20, // fontSize: 20,
fontWeight: FontWeight.bold, // fontWeight: 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: // padding:
EdgeInsets.symmetric( // EdgeInsets.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: 10), // height: 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(Icons.edit, // Icon(Icons.edit,
color: Color( // color: Color(
0xFFE26728)), // 0xFFE26728)),
SizedBox( // SizedBox(
height: 10), // height: 10),
Text( // Text(
"Manage Claims"), // "Manage Claims"),
], // ],
), // ),
), // ),
), // ),
], // ],
), // ),
), // ),
), // ),
], // ],
), // ),
) // )
: SizedBox( // : SizedBox(
height: // height:
Responsive.isDesktop(context) // Responsive.isDesktop(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,
// ),
Align( Align(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: Container( child: Container(

View File

@ -419,7 +419,7 @@ class _MyPhoneState extends State<MyPhone> {
)), )),
], ],
), ),
SizedBox(height: 10), SizedBox(height: 80),
Container( Container(
margin: Responsive.isDesktop(context) margin: Responsive.isDesktop(context)
? EdgeInsets.symmetric( ? EdgeInsets.symmetric(
@ -574,110 +574,115 @@ class _MyPhoneState extends State<MyPhone> {
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: GoogleFonts.poppins( // style: GoogleFonts.poppins(
fontSize: 20, // fontSize: 20,
fontWeight: FontWeight.bold, // fontWeight: 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: // padding:
EdgeInsets.symmetric( // EdgeInsets.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: 10), // height: 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(Icons.edit, // Icon(Icons.edit,
color: Color( // color: Color(
0xFFE26728)), // 0xFFE26728)),
SizedBox( // SizedBox(
height: 10), // height: 10),
Text( // Text(
"Manage Claims"), // "Manage Claims"),
], // ],
), // ),
), // ),
), // ),
], // ],
), // ),
), // ),
), // ),
], // ],
), // ),
) // )
: SizedBox( // : SizedBox(
height: // height:
Responsive.isDesktop(context) // Responsive.isDesktop(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,
// ),
Align( Align(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: Container( child: Container(

View File

@ -491,7 +491,7 @@ class _MyVerifyState extends State<MyVerify> {
)), )),
], ],
), ),
SizedBox(height: 10), SizedBox(height: 80),
Container( Container(
margin: Responsive.isDesktop(context) margin: Responsive.isDesktop(context)
? EdgeInsets.symmetric( ? EdgeInsets.symmetric(
@ -621,114 +621,119 @@ 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: GoogleFonts.poppins( // style: GoogleFonts.poppins(
fontSize: 20, // fontSize: 20,
fontWeight: FontWeight.bold, // fontWeight: 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: // padding:
EdgeInsets.symmetric( // EdgeInsets.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: 10), // height: 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(Icons.edit, // Icon(Icons.edit,
color: Color( // color: Color(
0xFFE26728)), // 0xFFE26728)),
SizedBox( // SizedBox(
height: 10), // height: 10),
Text( // Text(
"Manage Claims", // "Manage Claims",
style: GoogleFonts // style: GoogleFonts
.poppins()), // .poppins()),
], // ],
), // ),
), // ),
), // ),
], // ],
), // ),
), // ),
), // ),
], // ],
), // ),
) // )
: SizedBox( // : SizedBox(
height: // height:
Responsive.isDesktop(context) // Responsive.isDesktop(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,
// ),
Align( Align(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: Container( child: Container(