claims form changes
This commit is contained in:
parent
2eeccba0ed
commit
5d0566e338
@ -19,12 +19,12 @@ if (project.hasProperty('google-services.json')) {
|
|||||||
|
|
||||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||||
if (flutterVersionCode == null) {
|
if (flutterVersionCode == null) {
|
||||||
flutterVersionCode = '47'
|
flutterVersionCode = '53'
|
||||||
}
|
}
|
||||||
|
|
||||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||||
if (flutterVersionName == null) {
|
if (flutterVersionName == null) {
|
||||||
flutterVersionName = '2.0.9'
|
flutterVersionName = '2.0.15'
|
||||||
}
|
}
|
||||||
|
|
||||||
def keystoreProperties = new Properties()
|
def keystoreProperties = new Properties()
|
||||||
|
|||||||
@ -80,6 +80,7 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
|||||||
body: json.encode(params),
|
body: json.encode(params),
|
||||||
headers: {
|
headers: {
|
||||||
HttpHeaders.contentTypeHeader: 'application/json',
|
HttpHeaders.contentTypeHeader: 'application/json',
|
||||||
|
'APP-SIGNATURE': 'nhance-2025-signature-T8f6gV9k5fK2wf5V5c4vId3b0J8z6cAm2x8Y',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -99,7 +99,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
dynamic topUpParentSiPremiumValue;
|
dynamic topUpParentSiPremiumValue;
|
||||||
dynamic topUpParentSiPremiumGst;
|
dynamic topUpParentSiPremiumGst;
|
||||||
dynamic topUpParentSiTotalAmt;
|
dynamic topUpParentSiTotalAmt;
|
||||||
dynamic topUpParenIsPremiumSummery;
|
bool topUpParentIsPremiumSummary = false;
|
||||||
dynamic topUpParentTypeName;
|
dynamic topUpParentTypeName;
|
||||||
int topUpParentOpenForEnrollment = 0;
|
int topUpParentOpenForEnrollment = 0;
|
||||||
dynamic addOnsDependentPolicies = [];
|
dynamic addOnsDependentPolicies = [];
|
||||||
@ -111,7 +111,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
dynamic addOnsDependentPolicyName;
|
dynamic addOnsDependentPolicyName;
|
||||||
dynamic addOnsDependentPolicyType;
|
dynamic addOnsDependentPolicyType;
|
||||||
dynamic addOnsDependentECardDownload;
|
dynamic addOnsDependentECardDownload;
|
||||||
dynamic addOnsDependentIsPremiumSummery;
|
bool addOnsDependentIsPremiumSummary = false;
|
||||||
dynamic addOnsDependentRelationShip;
|
dynamic addOnsDependentRelationShip;
|
||||||
int addOnsDependentOpenForEnrollment = 0;
|
int addOnsDependentOpenForEnrollment = 0;
|
||||||
dynamic siValue;
|
dynamic siValue;
|
||||||
@ -123,7 +123,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
dynamic addOnsDependentTotalAmt;
|
dynamic addOnsDependentTotalAmt;
|
||||||
// dynamic topUpSiTotalAmt;
|
// dynamic topUpSiTotalAmt;
|
||||||
dynamic topUpSiTotalAmt;
|
dynamic topUpSiTotalAmt;
|
||||||
dynamic topUpSiPremiumSummery;
|
bool topUpIsPremiumSummary = false;
|
||||||
late TextEditingController _relationShipController;
|
late TextEditingController _relationShipController;
|
||||||
late TextEditingController _dobController;
|
late TextEditingController _dobController;
|
||||||
late TextEditingController _memberNameController;
|
late TextEditingController _memberNameController;
|
||||||
@ -232,6 +232,11 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isPremiumEnabled(dynamic value) {
|
||||||
|
final intValue = int.tryParse(value?.toString() ?? '0') ?? 0;
|
||||||
|
return intValue != 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Future<void> _loadToken() async {
|
// Future<void> _loadToken() async {
|
||||||
// final SharedPreferences prefs = await SharedPreferences.getInstance();
|
// final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
// final String? token = prefs.getString('enrollToken');
|
// final String? token = prefs.getString('enrollToken');
|
||||||
@ -321,8 +326,9 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
gpaPolicies = response['data'];
|
gpaPolicies = response['data'];
|
||||||
for (var item in gpaPolicies) {
|
for (var item in gpaPolicies) {
|
||||||
if (item['is_premium_summery'] == "1") {
|
if (isPremiumEnabled(item['is_premium_summery'])) {
|
||||||
gpahasPremiumSummary = true;
|
gpahasPremiumSummary = true;
|
||||||
|
print('gpahasPremiumSummary $gpahasPremiumSummary');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Extract disclaimer value from each object
|
// Extract disclaimer value from each object
|
||||||
@ -402,10 +408,9 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
gmcPolicies = response['data'];
|
gmcPolicies = response['data'];
|
||||||
for (var item in gmcPolicies) {
|
for (var item in gmcPolicies) {
|
||||||
print('checking is_premium_summery ${item['is_premium_summery']}');
|
print('checking is_premium_summery ${item['is_premium_summery']}');
|
||||||
if (item['is_premium_summery'] == "1") {
|
if (isPremiumEnabled(item['is_premium_summery'])) {
|
||||||
print('checking is_premium_summery ${item['is_premium_summery']}');
|
|
||||||
gmchasPremiumSummary = true;
|
gmchasPremiumSummary = true;
|
||||||
print('gmchasPremiumSummary ${gmchasPremiumSummary}');
|
print('gmchasPremiumSummary $gmchasPremiumSummary');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (item['OpenForEnrollment'] == '1') {
|
if (item['OpenForEnrollment'] == '1') {
|
||||||
@ -525,7 +530,10 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
|
|
||||||
topUpSiTotalAmt = topUpSiPremiumValue + topUpSiPremiumGst;
|
topUpSiTotalAmt = topUpSiPremiumValue + topUpSiPremiumGst;
|
||||||
|
|
||||||
topUpSiPremiumSummery = topUpSiPolicies['gmc_si_topup']['is_premium_summery'];
|
setState(() {
|
||||||
|
topUpIsPremiumSummary = isPremiumEnabled(topUpSiPolicies['gmc_si_topup']?['is_premium_summery']);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// topUpSiTotalAmt = (topUpSum as double).toInt();
|
// topUpSiTotalAmt = (topUpSum as double).toInt();
|
||||||
});
|
});
|
||||||
@ -621,8 +629,11 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
topUpParentSiTotalAmt =
|
topUpParentSiTotalAmt =
|
||||||
topUpParentSiPremiumValue + topUpParentSiPremiumGst;
|
topUpParentSiPremiumValue + topUpParentSiPremiumGst;
|
||||||
|
|
||||||
topUpParenIsPremiumSummery = topUpSiParentPolicies['gmc_si_parent_topup']['is_premium_summery'];
|
setState(() {
|
||||||
print('topUpParenIsPremiumSummery $topUpParenIsPremiumSummery');
|
topUpParentIsPremiumSummary = isPremiumEnabled(topUpSiParentPolicies['gmc_si_parent_topup']?['is_premium_summery']);
|
||||||
|
print(topUpParentECardDownload);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -743,8 +754,11 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
addOnsDependentPolicies['gmc_dependent_addon']
|
addOnsDependentPolicies['gmc_dependent_addon']
|
||||||
['eCardDownload'];
|
['eCardDownload'];
|
||||||
|
|
||||||
addOnsDependentIsPremiumSummery = addOnsDependentPolicies['gmc_dependent_addon']['is_premium_summery'];
|
setState(() {
|
||||||
print('addOnsDependentIsPremiumSummery $addOnsDependentIsPremiumSummery');
|
addOnsDependentIsPremiumSummary = isPremiumEnabled(addOnsDependentPolicies['gmc_dependent_addon']?['is_premium_summery']);
|
||||||
|
});
|
||||||
|
|
||||||
|
print('addOnsDependentIsPremiumSummery $addOnsDependentIsPremiumSummary');
|
||||||
|
|
||||||
addOnsDependentRelationShip = addOnsDependentPolicies['gmc_dependent_addon']['relationship'];
|
addOnsDependentRelationShip = addOnsDependentPolicies['gmc_dependent_addon']['relationship'];
|
||||||
// if(addOnsDependentIsPremiumSummery == 1){
|
// if(addOnsDependentIsPremiumSummery == 1){
|
||||||
@ -2460,7 +2474,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
if (_addOnsDependentSwitcher)
|
if (_addOnsDependentSwitcher)
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 20),
|
||||||
if (Responsive.isDesktop(context) &&
|
if (Responsive.isDesktop(context) &&
|
||||||
_addOnsDependentSwitcher && addOnsDependentIsPremiumSummery == '1')
|
_addOnsDependentSwitcher && addOnsDependentIsPremiumSummary)
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
@ -2585,7 +2599,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (!Responsive.isDesktop(context) &&
|
if (!Responsive.isDesktop(context) &&
|
||||||
_addOnsDependentSwitcher == true && addOnsDependentIsPremiumSummery == '1')
|
_addOnsDependentSwitcher == true && addOnsDependentIsPremiumSummary)
|
||||||
Container(
|
Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
@ -3102,7 +3116,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
if (_topUpSiSwitcher == true)
|
if (_topUpSiSwitcher == true)
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 20),
|
||||||
if (Responsive.isDesktop(context) &&
|
if (Responsive.isDesktop(context) &&
|
||||||
_topUpSiSwitcher == true && topUpSiPremiumSummery == '1')
|
_topUpSiSwitcher == true && topUpIsPremiumSummary)
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
@ -3221,7 +3235,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (!Responsive.isDesktop(context) &&
|
if (!Responsive.isDesktop(context) &&
|
||||||
_topUpSiSwitcher == true && topUpSiPremiumSummery == '1')
|
_topUpSiSwitcher == true && topUpIsPremiumSummary)
|
||||||
Container(
|
Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
@ -3738,7 +3752,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
if (_topUpParentSiSwitcher == true)
|
if (_topUpParentSiSwitcher == true)
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 20),
|
||||||
if (Responsive.isDesktop(context) &&
|
if (Responsive.isDesktop(context) &&
|
||||||
_topUpParentSiSwitcher == true && topUpParenIsPremiumSummery == '1')
|
_topUpParentSiSwitcher == true && topUpParentIsPremiumSummary)
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
@ -3857,7 +3871,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (!Responsive.isDesktop(context) &&
|
if (!Responsive.isDesktop(context) &&
|
||||||
_topUpParentSiSwitcher == true && topUpParenIsPremiumSummery == '1')
|
_topUpParentSiSwitcher == true && topUpParentIsPremiumSummary)
|
||||||
Container(
|
Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
@ -5141,6 +5155,11 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String formatAmount(double value) {
|
||||||
|
return value % 1 == 0
|
||||||
|
? value.toInt().toString()
|
||||||
|
: value.toStringAsFixed(2);
|
||||||
|
}
|
||||||
|
|
||||||
List<Widget> generateGmcCards(List<dynamic> data) {
|
List<Widget> generateGmcCards(List<dynamic> data) {
|
||||||
List<Widget> cards = [];
|
List<Widget> cards = [];
|
||||||
@ -5154,13 +5173,15 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
String gmcNotes = item['notes'] ?? '';
|
String gmcNotes = item['notes'] ?? '';
|
||||||
String gmcECardDownload = item['eCardDownload'] ?? '';
|
String gmcECardDownload = item['eCardDownload'] ?? '';
|
||||||
|
|
||||||
double gmcGstValue = toDoubleSafe(item['family_floaters_of_dependent_and_gst_value']);
|
double gmcGstValue =
|
||||||
double gmcSiPremiumValue = toDoubleSafe(item['family_floaters_of_dependent_and_si_premium_value']);
|
double.tryParse(item['family_floaters_of_dependent_and_gst_value']?.toString() ?? '0') ?? 0.0;
|
||||||
|
|
||||||
|
double gmcSiPremiumValue =
|
||||||
|
double.tryParse(item['family_floaters_of_dependent_and_si_premium_value']?.toString() ?? '0') ?? 0.0;
|
||||||
|
|
||||||
double gmcTotalableValue = gmcSiPremiumValue + gmcGstValue;
|
double gmcTotalableValue = gmcGstValue + gmcSiPremiumValue;
|
||||||
|
|
||||||
bool gmcIsValueValid = (gmcSiPremiumValue != 0 && gmcGstValue != 0);
|
bool gmcIsValueValid = (gmcSiPremiumValue > 0 && gmcGstValue > 0);
|
||||||
|
|
||||||
List gmcMappedFamilyFloaters = item['mapped_family_floaters'] ?? [];
|
List gmcMappedFamilyFloaters = item['mapped_family_floaters'] ?? [];
|
||||||
|
|
||||||
@ -5353,7 +5374,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
(gmcSiPremiumValue ?? '').toString(),
|
formatAmount(gmcSiPremiumValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
||||||
@ -5379,7 +5400,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
(gmcGstValue ?? '').toString(),
|
formatAmount(gmcGstValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
||||||
@ -5405,7 +5426,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
(gmcTotalableValue ?? '').toString(),
|
formatAmount(gmcTotalableValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
||||||
@ -5454,8 +5475,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
(gmcSiPremiumValue ?? '')
|
formatAmount(gmcSiPremiumValue),
|
||||||
.toString(),
|
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
||||||
@ -5499,7 +5519,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
(gmcGstValue ?? '').toString(),
|
formatAmount(gmcGstValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
||||||
@ -5543,8 +5563,7 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
|||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
(gmcTotalableValue ?? '')
|
formatAmount(gmcTotalableValue),
|
||||||
.toString(),
|
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
fontSize: Responsive.isDesktop(context) ? 14 : 12,
|
||||||
|
|||||||
@ -2216,6 +2216,12 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
return cards;
|
return cards;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String formatAmount(double value) {
|
||||||
|
return value % 1 == 0
|
||||||
|
? value.toInt().toString()
|
||||||
|
: value.toStringAsFixed(2);
|
||||||
|
}
|
||||||
|
|
||||||
List<Widget> generateCards(List<dynamic> data) {
|
List<Widget> generateCards(List<dynamic> data) {
|
||||||
List<Widget> cards = [];
|
List<Widget> cards = [];
|
||||||
|
|
||||||
@ -2239,13 +2245,17 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
print('gmcECardDownload $gmcECardDownload');
|
print('gmcECardDownload $gmcECardDownload');
|
||||||
bool gmcCopyDependenceDataEnable = item['copy_dependence_data_enable'];
|
bool gmcCopyDependenceDataEnable = item['copy_dependence_data_enable'];
|
||||||
print('gmcCopyDependenceDataEnable $gmcCopyDependenceDataEnable');
|
print('gmcCopyDependenceDataEnable $gmcCopyDependenceDataEnable');
|
||||||
double gmcGstValue = item['family_floaters_of_dependent_and_gst_value'];
|
// double gmcGstValue = (item['family_floaters_of_dependent_and_gst_value'] ?? 0).toDouble();
|
||||||
print('gmcGstValue $gmcGstValue');
|
double gmcGstValue =
|
||||||
|
double.tryParse(item['family_floaters_of_dependent_and_gst_value']?.toString() ?? '0') ?? 0.0;
|
||||||
|
|
||||||
double gmcSiPremiumValue =
|
double gmcSiPremiumValue =
|
||||||
item['family_floaters_of_dependent_and_si_premium_value'];
|
double.tryParse(item['family_floaters_of_dependent_and_si_premium_value']?.toString() ?? '0') ?? 0.0;
|
||||||
print('gmcSiPremiumValue $gmcSiPremiumValue');
|
|
||||||
double gmcTotalableValue = gmcGstValue + gmcSiPremiumValue;
|
double gmcTotalableValue = gmcGstValue + gmcSiPremiumValue;
|
||||||
bool gmcIsValueValid = (gmcSiPremiumValue != 0 && gmcGstValue != 0);
|
|
||||||
|
bool gmcIsValueValid = (gmcSiPremiumValue > 0 && gmcGstValue > 0);
|
||||||
|
|
||||||
|
|
||||||
List gmcRelationShip = item['relationship'];
|
List gmcRelationShip = item['relationship'];
|
||||||
List gmcMappedFamilyFloaters = item['mapped_family_floaters'];
|
List gmcMappedFamilyFloaters = item['mapped_family_floaters'];
|
||||||
@ -2688,7 +2698,7 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
(gmcSiPremiumValue ?? '').toString(),
|
formatAmount(gmcSiPremiumValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
@ -2713,7 +2723,7 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
(gmcGstValue ?? '').toString(),
|
formatAmount(gmcGstValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
@ -2738,7 +2748,7 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
(gmcTotalableValue ?? '').toString(),
|
formatAmount(gmcTotalableValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
@ -2787,7 +2797,7 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
(gmcSiPremiumValue ?? '').toString(),
|
formatAmount(gmcSiPremiumValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@ -2831,7 +2841,7 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
(gmcGstValue ?? '').toString(),
|
formatAmount(gmcGstValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@ -2875,7 +2885,7 @@ class _empDetailsState extends State<empDetails> {
|
|||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
(gmcTotalableValue ?? '').toString(),
|
formatAmount(gmcTotalableValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|||||||
@ -112,7 +112,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
dynamic topUpSumInsured;
|
dynamic topUpSumInsured;
|
||||||
dynamic topUpFloaterTextHeading;
|
dynamic topUpFloaterTextHeading;
|
||||||
dynamic topUpECardDownload;
|
dynamic topUpECardDownload;
|
||||||
dynamic topUpIsPremiumSummary;
|
bool topUpIsPremiumSummary = false;
|
||||||
dynamic topUpDisclaimer;
|
dynamic topUpDisclaimer;
|
||||||
int showHideTopUpCard = 0;
|
int showHideTopUpCard = 0;
|
||||||
int showHideAddOnsCard = 0;
|
int showHideAddOnsCard = 0;
|
||||||
@ -126,7 +126,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
dynamic topUpParentFamilyFloater;
|
dynamic topUpParentFamilyFloater;
|
||||||
dynamic topUpParentMappedFamilyFloatersSi;
|
dynamic topUpParentMappedFamilyFloatersSi;
|
||||||
dynamic topUpParentECardDownload;
|
dynamic topUpParentECardDownload;
|
||||||
dynamic topUpParentIsPremiumSummary;
|
bool topUpParentIsPremiumSummary = false;
|
||||||
dynamic topUpParentSiValue;
|
dynamic topUpParentSiValue;
|
||||||
dynamic topUpParentSiSelectedSI;
|
dynamic topUpParentSiSelectedSI;
|
||||||
dynamic topUpParentTypeName;
|
dynamic topUpParentTypeName;
|
||||||
@ -144,7 +144,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
dynamic topUpOpenForEnrollment;
|
dynamic topUpOpenForEnrollment;
|
||||||
dynamic topUpParentOpenForEnrollment;
|
dynamic topUpParentOpenForEnrollment;
|
||||||
dynamic addOnsDependentOpenForEnrollment;
|
dynamic addOnsDependentOpenForEnrollment;
|
||||||
dynamic addOnsDependentIsPremiumSummary;
|
bool addOnsDependentIsPremiumSummary = false;
|
||||||
bool gmcEnrollmentStatus = false;
|
bool gmcEnrollmentStatus = false;
|
||||||
bool gpahasPremiumSummary = false;
|
bool gpahasPremiumSummary = false;
|
||||||
bool gmchasPremiumSummary = false;
|
bool gmchasPremiumSummary = false;
|
||||||
@ -263,6 +263,11 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
bool isPremiumEnabled(dynamic value) {
|
||||||
|
final intValue = int.tryParse(value?.toString() ?? '0') ?? 0;
|
||||||
|
return intValue != 0;
|
||||||
|
}
|
||||||
|
|
||||||
void primarySummary() async {
|
void primarySummary() async {
|
||||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
if (prefs.containsKey('siData')) {
|
if (prefs.containsKey('siData')) {
|
||||||
@ -409,8 +414,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
print('gpaPolicies');
|
print('gpaPolicies');
|
||||||
|
|
||||||
for (var policy in gpaPolicies) {
|
for (var policy in gpaPolicies) {
|
||||||
if (policy['is_premium_summery'] == "1") {
|
if (isPremiumEnabled(policy['is_premium_summery'])) {
|
||||||
gpahasPremiumSummary = true;
|
gpahasPremiumSummary = true;
|
||||||
|
print('gpahasPremiumSummary $gpahasPremiumSummary');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -494,11 +500,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
print('gmcPolicies $gmcPolicies');
|
print('gmcPolicies $gmcPolicies');
|
||||||
|
|
||||||
for (var policy in gmcPolicies) {
|
for (var policy in gmcPolicies) {
|
||||||
print('checking is_premium_summery ${policy['is_premium_summery']}');
|
if (isPremiumEnabled(policy['is_premium_summery'])) {
|
||||||
if (policy['is_premium_summery'] == "1") {
|
|
||||||
print('checking is_premium_summery ${policy['is_premium_summery']}');
|
|
||||||
gmchasPremiumSummary = true;
|
gmchasPremiumSummary = true;
|
||||||
print('gmchasPremiumSummary ${gmchasPremiumSummary}');
|
print('gmchasPremiumSummary $gmchasPremiumSummary');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -615,10 +619,11 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
topUpSiPolicies['gmc_si_topup']['eCardDownload'];
|
topUpSiPolicies['gmc_si_topup']['eCardDownload'];
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
topUpIsPremiumSummary =
|
topUpIsPremiumSummary = isPremiumEnabled(topUpSiPolicies['gmc_si_topup']?['is_premium_summery']);
|
||||||
topUpSiPolicies['gmc_si_topup']['is_premium_summery'];
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if(topUpIsPremiumSummary == '1'){
|
// if(topUpIsPremiumSummary == '1'){
|
||||||
// tabHide = '0';
|
// tabHide = '0';
|
||||||
// }
|
// }
|
||||||
@ -740,12 +745,12 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
topUpSiParentPolicies['gmc_si_parent_topup']['eCardDownload'];
|
topUpSiParentPolicies['gmc_si_parent_topup']['eCardDownload'];
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
topUpParentIsPremiumSummary =
|
topUpParentIsPremiumSummary = isPremiumEnabled(topUpSiParentPolicies['gmc_si_parent_topup']?['is_premium_summery']);
|
||||||
topUpSiParentPolicies['gmc_si_parent_topup']
|
|
||||||
['is_premium_summery'];
|
|
||||||
print(topUpParentECardDownload);
|
print(topUpParentECardDownload);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if(topUpParentIsPremiumSummary == '1'){
|
// if(topUpParentIsPremiumSummary == '1'){
|
||||||
// tabHide = '0';
|
// tabHide = '0';
|
||||||
// }
|
// }
|
||||||
@ -919,11 +924,11 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
['OpenForEnrollment'];
|
['OpenForEnrollment'];
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
addOnsDependentIsPremiumSummary =
|
addOnsDependentIsPremiumSummary = isPremiumEnabled(addOnsDependentPolicies['gmc_dependent_addon']?['is_premium_summery']);
|
||||||
addOnsDependentPolicies['gmc_dependent_addon']
|
|
||||||
['is_premium_summery'];
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if(addOnsDependentIsPremiumSummary == '1'){
|
// if(addOnsDependentIsPremiumSummary == '1'){
|
||||||
// tabHide = '0';
|
// tabHide = '0';
|
||||||
// }
|
// }
|
||||||
@ -1615,11 +1620,11 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 16),
|
SizedBox(height: 16),
|
||||||
if (gpahasPremiumSummary == true ||
|
if (gpahasPremiumSummary ||
|
||||||
gmchasPremiumSummary == true ||
|
gmchasPremiumSummary ||
|
||||||
topUpIsPremiumSummary == '1' ||
|
topUpIsPremiumSummary ||
|
||||||
topUpParentIsPremiumSummary == '1' ||
|
topUpParentIsPremiumSummary ||
|
||||||
addOnsDependentIsPremiumSummary == '1')
|
addOnsDependentIsPremiumSummary)...[
|
||||||
Card(
|
Card(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -1723,12 +1728,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
),
|
),
|
||||||
])),
|
])),
|
||||||
),
|
),
|
||||||
if (gpahasPremiumSummary == true ||
|
|
||||||
gmchasPremiumSummary == true ||
|
|
||||||
topUpIsPremiumSummary == '1' ||
|
|
||||||
topUpParentIsPremiumSummary == '1' ||
|
|
||||||
addOnsDependentIsPremiumSummary == '1')
|
|
||||||
SizedBox(height: 16),
|
SizedBox(height: 16),
|
||||||
|
],
|
||||||
|
|
||||||
if (gpaPolicies != null && gpaPolicies.length > 0)
|
if (gpaPolicies != null && gpaPolicies.length > 0)
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
@ -2537,11 +2539,11 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
: EdgeInsets.all(10),
|
: EdgeInsets.all(10),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
if (gpahasPremiumSummary == true ||
|
if (gpahasPremiumSummary ||
|
||||||
gmchasPremiumSummary == true ||
|
gmchasPremiumSummary ||
|
||||||
topUpIsPremiumSummary == '1' ||
|
topUpIsPremiumSummary ||
|
||||||
topUpParentIsPremiumSummary == '1' ||
|
topUpParentIsPremiumSummary ||
|
||||||
addOnsDependentIsPremiumSummary == '1')
|
addOnsDependentIsPremiumSummary)...[
|
||||||
Container(
|
Container(
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
@ -2603,15 +2605,6 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
3: FlexColumnWidth(2),
|
3: FlexColumnWidth(2),
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
if (gpahasPremiumSummary == true ||
|
|
||||||
gmchasPremiumSummary ==
|
|
||||||
true ||
|
|
||||||
topUpIsPremiumSummary ==
|
|
||||||
'1' ||
|
|
||||||
topUpParentIsPremiumSummary ==
|
|
||||||
'1' ||
|
|
||||||
addOnsDependentIsPremiumSummary ==
|
|
||||||
'1')
|
|
||||||
TableRow(
|
TableRow(
|
||||||
children: [
|
children: [
|
||||||
TableCell(
|
TableCell(
|
||||||
@ -3002,11 +2995,6 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
if (gpahasPremiumSummary == true ||
|
|
||||||
gmchasPremiumSummary == true ||
|
|
||||||
topUpIsPremiumSummary == '1' ||
|
|
||||||
topUpParentIsPremiumSummary == '1' ||
|
|
||||||
addOnsDependentIsPremiumSummary == '1')
|
|
||||||
Container(
|
Container(
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
@ -3079,6 +3067,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 15),
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Container(
|
Container(
|
||||||
alignment: Alignment.topLeft,
|
alignment: Alignment.topLeft,
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -3766,11 +3758,11 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
))),
|
))),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (gpahasPremiumSummary == true ||
|
if (gpahasPremiumSummary ||
|
||||||
gmchasPremiumSummary == true ||
|
gmchasPremiumSummary ||
|
||||||
topUpIsPremiumSummary == '1' ||
|
topUpIsPremiumSummary ||
|
||||||
topUpParentIsPremiumSummary == '1' ||
|
topUpParentIsPremiumSummary ||
|
||||||
addOnsDependentIsPremiumSummary == '1')
|
addOnsDependentIsPremiumSummary)
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -3827,6 +3819,12 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
return cards;
|
return cards;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String formatAmount(double value) {
|
||||||
|
return value % 1 == 0
|
||||||
|
? value.toInt().toString()
|
||||||
|
: value.toStringAsFixed(2);
|
||||||
|
}
|
||||||
|
|
||||||
List<Widget> generateGmcCards(List<dynamic> data) {
|
List<Widget> generateGmcCards(List<dynamic> data) {
|
||||||
List<Widget> cards = [];
|
List<Widget> cards = [];
|
||||||
// gmcEnrollmentStatus = isEnrollmentOpen(data);
|
// gmcEnrollmentStatus = isEnrollmentOpen(data);
|
||||||
@ -3854,12 +3852,15 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
// -------------------------------
|
// -------------------------------
|
||||||
// SAFE numeric conversion
|
// SAFE numeric conversion
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
double gmcGstValue = toDoubleSafe(item['family_floaters_of_dependent_and_gst_value']);
|
double gmcGstValue =
|
||||||
double gmcSiPremiumValue = toDoubleSafe(item['family_floaters_of_dependent_and_si_premium_value']);
|
double.tryParse(item['family_floaters_of_dependent_and_gst_value']?.toString() ?? '0') ?? 0.0;
|
||||||
|
|
||||||
double gmcTotalableValue = gmcSiPremiumValue + gmcGstValue;
|
double gmcSiPremiumValue =
|
||||||
|
double.tryParse(item['family_floaters_of_dependent_and_si_premium_value']?.toString() ?? '0') ?? 0.0;
|
||||||
|
|
||||||
bool gmcIsValueValid = (gmcSiPremiumValue != 0 && gmcGstValue != 0);
|
double gmcTotalableValue = gmcGstValue + gmcSiPremiumValue;
|
||||||
|
|
||||||
|
bool gmcIsValueValid = (gmcSiPremiumValue > 0 && gmcGstValue > 0);
|
||||||
|
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
// SAFE list handling
|
// SAFE list handling
|
||||||
@ -4068,7 +4069,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
(gmcSiPremiumValue ?? '').toString(),
|
formatAmount(gmcSiPremiumValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
@ -4094,7 +4095,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
(gmcGstValue ?? '').toString(),
|
formatAmount(gmcGstValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
@ -4120,7 +4121,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
(gmcTotalableValue ?? '').toString(),
|
formatAmount(gmcTotalableValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
@ -4171,8 +4172,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
(gmcSiPremiumValue ?? '')
|
formatAmount(gmcSiPremiumValue),
|
||||||
.toString(),
|
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@ -4216,7 +4216,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
(gmcGstValue ?? '').toString(),
|
formatAmount(gmcGstValue),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@ -4260,8 +4260,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
(gmcTotalableValue ?? '')
|
formatAmount(gmcTotalableValue),
|
||||||
.toString(),
|
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|||||||
@ -583,8 +583,8 @@ class _claimsState extends State<claims> {
|
|||||||
horizontal: Responsive
|
horizontal: Responsive
|
||||||
.isDesktop(
|
.isDesktop(
|
||||||
context)
|
context)
|
||||||
? 140
|
? 70
|
||||||
: 10 ,
|
: 30 ,
|
||||||
vertical: Responsive
|
vertical: Responsive
|
||||||
.isDesktop(
|
.isDesktop(
|
||||||
context)
|
context)
|
||||||
@ -654,7 +654,7 @@ class _claimsState extends State<claims> {
|
|||||||
horizontal: Responsive
|
horizontal: Responsive
|
||||||
.isDesktop(
|
.isDesktop(
|
||||||
context)
|
context)
|
||||||
? 130
|
? 70
|
||||||
: 30,
|
: 30,
|
||||||
vertical: Responsive
|
vertical: Responsive
|
||||||
.isDesktop(
|
.isDesktop(
|
||||||
|
|||||||
@ -192,7 +192,8 @@ class _helpState extends State<help> {
|
|||||||
isLoading = true;
|
isLoading = true;
|
||||||
});
|
});
|
||||||
print('check 1');
|
print('check 1');
|
||||||
final response = await apiService.getTrackClaimsList(empPrimaryId!,empMobileNo,empEmailID);
|
final response = await apiService.getTrackClaimsList(
|
||||||
|
empPrimaryId!, empMobileNo, empEmailID);
|
||||||
print('check 2');
|
print('check 2');
|
||||||
setState(() {
|
setState(() {
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
@ -582,90 +583,34 @@ class _helpState extends State<help> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 5),
|
||||||
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
context.go('/faqs');
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: double.infinity,
|
|
||||||
height: Responsive.isDesktop(context) ? 140 : 120,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(6),
|
|
||||||
border: Border.all(
|
|
||||||
color: const Color(0xFF2F80ED),
|
|
||||||
width: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
/// LEFT IMAGE BLOCK
|
|
||||||
Container(
|
Container(
|
||||||
width: Responsive.isDesktop(context) ? 180 : 120,
|
// width: Responsive.isDesktop(context) ? 500 : double.infinity,
|
||||||
height: double.infinity,
|
// height: 75,
|
||||||
color: Colors.white,
|
// padding: Responsive.isDesktop(context)
|
||||||
padding: const EdgeInsets.all(12),
|
// ? const EdgeInsets.only(
|
||||||
child: Image.asset(
|
// top: 0, bottom: 20, left: 30, right: 30)
|
||||||
'assets/faqs.jpg',
|
// : const EdgeInsets.symmetric(vertical: 0, horizontal: 0),
|
||||||
fit: BoxFit.contain,
|
child: InkWell(
|
||||||
),
|
onTap: () {
|
||||||
),
|
context.push('/faqs');
|
||||||
|
},
|
||||||
/// RIGHT CONTENT BLOCK
|
child: Text(
|
||||||
Expanded(
|
'Click to find answers to commonly\nasked questions',
|
||||||
child: Container(
|
maxLines: 2,
|
||||||
color: const Color(0xFF93C01F),
|
softWrap: true,
|
||||||
padding: EdgeInsets.symmetric(
|
textAlign: TextAlign.center,
|
||||||
horizontal: Responsive.isDesktop(context) ? 32 : 16,
|
|
||||||
vertical: Responsive.isDesktop(context) ? 24 : 16,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
/// TEXT CONTENT
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'FAQs',
|
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize:
|
fontSize: Responsive.isDesktop(context) ? 12 : 10,
|
||||||
Responsive.isDesktop(context) ? 36 : 20,
|
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: Colors.white,
|
color: Colors.grey,
|
||||||
),
|
// decoration: TextDecoration.underline,
|
||||||
),
|
// decorationThickness: 1,
|
||||||
const SizedBox(height: 8),
|
|
||||||
Text(
|
|
||||||
'Find answers to commonly asked questions',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
fontSize:
|
|
||||||
Responsive.isDesktop(context) ? 18 : 14,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
/// RIGHT ARROW
|
|
||||||
Icon(
|
|
||||||
Icons.chevron_right,
|
|
||||||
size: Responsive.isDesktop(context) ? 36 : 28,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
)
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
// SizedBox(height: 15),
|
// SizedBox(height: 15),
|
||||||
// Container(
|
// Container(
|
||||||
|
|||||||
@ -26,6 +26,7 @@ import '../service/TokenService.dart';
|
|||||||
import '../service/popup_helper.dart';
|
import '../service/popup_helper.dart';
|
||||||
import 'package:pdf/widgets.dart' as pw;
|
import 'package:pdf/widgets.dart' as pw;
|
||||||
import 'package:printing/printing.dart';
|
import 'package:printing/printing.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
class planclaimsform extends StatefulWidget {
|
class planclaimsform extends StatefulWidget {
|
||||||
final Map<String, dynamic>? details;
|
final Map<String, dynamic>? details;
|
||||||
@ -386,7 +387,7 @@ class _planclaimsformState extends State<planclaimsform> {
|
|||||||
client_policy_id = null;
|
client_policy_id = null;
|
||||||
});
|
});
|
||||||
print('1111 serviceId : $serviceId');
|
print('1111 serviceId : $serviceId');
|
||||||
if (serviceId == 1 || serviceId == 2 || serviceId == 3 || serviceId == 4) {
|
if (serviceId == 1 || serviceId == 2 || serviceId == 3 || serviceId == 4 || serviceId == 72) {
|
||||||
print('2222');
|
print('2222');
|
||||||
// Filter policies based on the ticket_type_id
|
// Filter policies based on the ticket_type_id
|
||||||
List<Map<String, dynamic>> filteredPolicies = policyList.where((policy) {
|
List<Map<String, dynamic>> filteredPolicies = policyList.where((policy) {
|
||||||
@ -541,15 +542,15 @@ class _planclaimsformState extends State<planclaimsform> {
|
|||||||
isPolicyValid = policyNumberId != null;
|
isPolicyValid = policyNumberId != null;
|
||||||
isMemberValid = selectedMemberId != null;
|
isMemberValid = selectedMemberId != null;
|
||||||
isSubjectValid = subjectController.text.trim().isNotEmpty;
|
isSubjectValid = subjectController.text.trim().isNotEmpty;
|
||||||
isHospitalNameValid = policyTypeCondition != 1 || hospitalNameController.text.trim().isNotEmpty;
|
isHospitalNameValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalNameController.text.trim().isNotEmpty;
|
||||||
isHospitalAddressValid = policyTypeCondition != 1 || hospitalAddressController.text.trim().isNotEmpty;
|
isHospitalAddressValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalAddressController.text.trim().isNotEmpty;
|
||||||
isHospitalStateValid = policyTypeCondition != 1 || hospitalStateController.text.trim().isNotEmpty;
|
isHospitalStateValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalStateController.text.trim().isNotEmpty;
|
||||||
isHospitalCityValid = policyTypeCondition != 1 || hospitalCityController.text.trim().isNotEmpty;
|
isHospitalCityValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalCityController.text.trim().isNotEmpty;
|
||||||
isHospitalPincodeValid = policyTypeCondition != 1 || hospitalPinCodeController.text.trim().isNotEmpty;
|
isHospitalPincodeValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalPinCodeController.text.trim().isNotEmpty;
|
||||||
isHospitalPhoneNoValid = policyTypeCondition != 1 || hospitalPhoneNoController.text.trim().isNotEmpty;
|
isHospitalPhoneNoValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalPhoneNoController.text.trim().isNotEmpty;
|
||||||
// isAdmitDischargeValid = policyTypeCondition != 1 || (admitDate != null && dischargeDate != null);
|
// isAdmitDischargeValid = policyTypeCondition != 1 || (admitDate != null && dischargeDate != null);
|
||||||
isAdmitDateValid = policyTypeCondition != 1 || admitDate != null;
|
isAdmitDateValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || admitDate != null;
|
||||||
isDischargeDateValid = policyTypeCondition != 1 || dischargeDate != null;
|
isDischargeDateValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || dischargeDate != null;
|
||||||
isClaimAmountValid = serviceId != 1 || claimAmountController.text.trim().isNotEmpty;
|
isClaimAmountValid = serviceId != 1 || claimAmountController.text.trim().isNotEmpty;
|
||||||
isAccidentDateValid = (serviceId == 2 || serviceId == 3 || serviceId == 4) ? accidentDate != null : true;
|
isAccidentDateValid = (serviceId == 2 || serviceId == 3 || serviceId == 4) ? accidentDate != null : true;
|
||||||
isIntimationDateValid = (serviceId == 2 || serviceId == 3 || serviceId == 4) ? intimationDate != null : true;
|
isIntimationDateValid = (serviceId == 2 || serviceId == 3 || serviceId == 4) ? intimationDate != null : true;
|
||||||
@ -618,7 +619,7 @@ class _planclaimsformState extends State<planclaimsform> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (policyTypeCondition == 1) {
|
if (policyTypeCondition == 1 || policyTypeCondition == 72) {
|
||||||
String formattedAdmitDate = DateFormat('yyyy-MM-dd').format(admitDate!);
|
String formattedAdmitDate = DateFormat('yyyy-MM-dd').format(admitDate!);
|
||||||
String formattedDischargeDate = DateFormat('yyyy-MM-dd').format(dischargeDate!);
|
String formattedDischargeDate = DateFormat('yyyy-MM-dd').format(dischargeDate!);
|
||||||
fields['hospital_name'] = hospitalNameController.text;
|
fields['hospital_name'] = hospitalNameController.text;
|
||||||
@ -767,11 +768,17 @@ class _planclaimsformState extends State<planclaimsform> {
|
|||||||
print('Form data submitted successfully');
|
print('Form data submitted successfully');
|
||||||
fileService.clearAll();
|
fileService.clearAll();
|
||||||
} else {
|
} else {
|
||||||
|
setState(() {
|
||||||
|
isLoading = false;
|
||||||
|
});
|
||||||
ToastHelper.showErrorToast(context, "Failed: ${decoded['message']}");
|
ToastHelper.showErrorToast(context, "Failed: ${decoded['message']}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
setState(() {
|
||||||
|
isLoading = false;
|
||||||
|
});
|
||||||
print('Error submitting form data: $e');
|
print('Error submitting form data: $e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1197,7 +1204,7 @@ SizedBox(height: 15),
|
|||||||
// 'Accident Details',
|
// 'Accident Details',
|
||||||
// accidentDetailsController),
|
// accidentDetailsController),
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 15),
|
||||||
if (policyTypeCondition == 1) ...[
|
if (policyTypeCondition == 1 || policyTypeCondition == 72) ...[
|
||||||
buildTextField('Hospital Name', hospitalNameController),
|
buildTextField('Hospital Name', hospitalNameController),
|
||||||
if (!isHospitalNameValid)
|
if (!isHospitalNameValid)
|
||||||
Text('Please enter the Hospital Name', style: TextStyle(color: Colors.red)),
|
Text('Please enter the Hospital Name', style: TextStyle(color: Colors.red)),
|
||||||
@ -1214,11 +1221,19 @@ SizedBox(height: 15),
|
|||||||
if (!isHospitalStateValid)
|
if (!isHospitalStateValid)
|
||||||
Text('Please enter the Hospital State', style: TextStyle(color: Colors.red)),
|
Text('Please enter the Hospital State', style: TextStyle(color: Colors.red)),
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 15),
|
||||||
buildTextField('Hospital Pincode', hospitalPinCodeController),
|
buildTextField('Hospital Pincode', hospitalPinCodeController,keyboardType: TextInputType.number,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
LengthLimitingTextInputFormatter(6), // optional
|
||||||
|
]),
|
||||||
if (!isHospitalPincodeValid)
|
if (!isHospitalPincodeValid)
|
||||||
Text('Please enter the Hospital Pincode', style: TextStyle(color: Colors.red)),
|
Text('Please enter the Hospital Pincode', style: TextStyle(color: Colors.red)),
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 15),
|
||||||
buildTextField('Hospital Phone No', hospitalPhoneNoController),
|
buildTextField('Hospital Phone No', hospitalPhoneNoController,keyboardType: TextInputType.number,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
LengthLimitingTextInputFormatter(10), // optional
|
||||||
|
]),
|
||||||
if (!isHospitalPhoneNoValid)
|
if (!isHospitalPhoneNoValid)
|
||||||
Text('Please enter the Hospital Phone No', style: TextStyle(color: Colors.red)),
|
Text('Please enter the Hospital Phone No', style: TextStyle(color: Colors.red)),
|
||||||
],
|
],
|
||||||
@ -1295,7 +1310,7 @@ SizedBox(height: 15),
|
|||||||
// 'Accident Details',
|
// 'Accident Details',
|
||||||
// accidentDetailsController),
|
// accidentDetailsController),
|
||||||
// SizedBox(height: 15),
|
// SizedBox(height: 15),
|
||||||
if (policyTypeCondition == 1) ...[
|
if (policyTypeCondition == 1 || policyTypeCondition == 72) ...[
|
||||||
// 🟡 Admit Date — no future allowed
|
// 🟡 Admit Date — no future allowed
|
||||||
buildDatePickerField(
|
buildDatePickerField(
|
||||||
label: 'Admit Date',
|
label: 'Admit Date',
|
||||||
@ -1334,7 +1349,10 @@ SizedBox(height: 15),
|
|||||||
|
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 15),
|
||||||
if (serviceId == 1) ...[
|
if (serviceId == 1) ...[
|
||||||
buildTextField('Claims Amount', claimAmountController, TextInputType.number),
|
buildTextField('Claims Amount', claimAmountController, keyboardType: TextInputType.number,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
]),
|
||||||
if (!isClaimAmountValid)
|
if (!isClaimAmountValid)
|
||||||
Text('Please enter the Claims Amount', style: TextStyle(color: Colors.red)),
|
Text('Please enter the Claims Amount', style: TextStyle(color: Colors.red)),
|
||||||
],
|
],
|
||||||
@ -1346,7 +1364,10 @@ SizedBox(height: 15),
|
|||||||
buildTextField(
|
buildTextField(
|
||||||
'Sum Insured',
|
'Sum Insured',
|
||||||
sumInsuredController,
|
sumInsuredController,
|
||||||
TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@ -1495,12 +1516,18 @@ SizedBox(height: 15),
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildTextField(String label, TextEditingController controller,
|
|
||||||
[TextInputType keyboardType = TextInputType.text]) {
|
Widget buildTextField(
|
||||||
|
String label,
|
||||||
|
TextEditingController controller, {
|
||||||
|
TextInputType keyboardType = TextInputType.text,
|
||||||
|
List<TextInputFormatter>? inputFormatters,
|
||||||
|
}) {
|
||||||
return TextFormField(
|
return TextFormField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
decoration: InputDecoration(labelText: label),
|
|
||||||
keyboardType: keyboardType,
|
keyboardType: keyboardType,
|
||||||
|
inputFormatters: inputFormatters,
|
||||||
|
decoration: InputDecoration(labelText: label),
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
if (value == null || value.isEmpty) {
|
if (value == null || value.isEmpty) {
|
||||||
return 'Please enter the $label';
|
return 'Please enter the $label';
|
||||||
@ -1510,6 +1537,7 @@ SizedBox(height: 15),
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget buildTextAreaField(String label, TextEditingController controller) {
|
Widget buildTextAreaField(String label, TextEditingController controller) {
|
||||||
return TextFormField(
|
return TextFormField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
|
|||||||
@ -48,6 +48,7 @@ class _policiesState extends State<policies> {
|
|||||||
dynamic EmployeePolicy;
|
dynamic EmployeePolicy;
|
||||||
List<Map<String, String>> employeeDetails = [];
|
List<Map<String, String>> employeeDetails = [];
|
||||||
dynamic argumentsData;
|
dynamic argumentsData;
|
||||||
|
bool ECardHide = true;
|
||||||
bool _isExpanded = false;
|
bool _isExpanded = false;
|
||||||
|
|
||||||
void _onTabChanged(int index) {
|
void _onTabChanged(int index) {
|
||||||
@ -90,11 +91,12 @@ class _policiesState extends State<policies> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getEcardDownload() async {
|
Future<void> getEcardDownload(id) async {
|
||||||
final clientPolicyID = widget.arguments?['client_policy_id'];
|
final clientPolicyID = widget.arguments?['client_policy_id'];
|
||||||
final policyNo = widget.arguments?['policy_no'];
|
final policyNo = widget.arguments?['policy_no'];
|
||||||
final eCarDParams = {
|
final eCarDParams = {
|
||||||
'id': empPrimaryId,
|
// 'id': empPrimaryId,
|
||||||
|
'id': id,
|
||||||
'emp_code': empCodeString,
|
'emp_code': empCodeString,
|
||||||
'client_policy_id': clientPolicyID,
|
'client_policy_id': clientPolicyID,
|
||||||
'policy_no': policyNo
|
'policy_no': policyNo
|
||||||
@ -269,9 +271,18 @@ class _policiesState extends State<policies> {
|
|||||||
String relationship = employee['relationship'];
|
String relationship = employee['relationship'];
|
||||||
String dob = employee['dob'];
|
String dob = employee['dob'];
|
||||||
String gender = employee['gender'];
|
String gender = employee['gender'];
|
||||||
employeeDetails.add({'name': name, 'relationship': relationship,'dob':dob,'gender':gender});
|
String id = employee['id'];
|
||||||
|
employeeDetails.add({'id':id,'name': name, 'relationship': relationship,'dob':dob,'gender':gender});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
setState(() {
|
||||||
|
if(argumentsData['policy_type'] == 'GMC' || argumentsData['policy_type'] == 'GMC - Parents' || argumentsData['policy_type'] == 'GMC - Topup' || argumentsData['policy_type'] == 'GMC - Topup(Parents)'){
|
||||||
|
ECardHide = true;
|
||||||
|
} else {
|
||||||
|
ECardHide = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
sortEmployeeDetails(employeeDetails);
|
sortEmployeeDetails(employeeDetails);
|
||||||
print('employeeDetails');
|
print('employeeDetails');
|
||||||
print(employeeDetails);
|
print(employeeDetails);
|
||||||
@ -333,7 +344,7 @@ class _policiesState extends State<policies> {
|
|||||||
flex: 11,
|
flex: 11,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: Responsive.isDesktop(context)
|
mainAxisAlignment: Responsive.isDesktop(context)
|
||||||
? MainAxisAlignment.center
|
? MainAxisAlignment.start
|
||||||
: MainAxisAlignment.start,
|
: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
@ -369,7 +380,7 @@ class _policiesState extends State<policies> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
if(argumentsData['policy_type'] != 'OPD')
|
if(ECardHide)
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: Responsive.isDesktop(context) ? 4 : 6,
|
flex: Responsive.isDesktop(context) ? 4 : 6,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -388,7 +399,7 @@ class _policiesState extends State<policies> {
|
|||||||
: 180,
|
: 180,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
getEcardDownload();
|
getEcardDownload(empPrimaryId);
|
||||||
// if (argumentsData['eCardDownload'] !=
|
// if (argumentsData['eCardDownload'] !=
|
||||||
// null) {
|
// null) {
|
||||||
// _launchURL(
|
// _launchURL(
|
||||||
@ -433,9 +444,9 @@ class _policiesState extends State<policies> {
|
|||||||
),
|
),
|
||||||
))),
|
))),
|
||||||
)),
|
)),
|
||||||
if (Responsive.isDesktop(context))
|
// if (Responsive.isDesktop(context))
|
||||||
Expanded(flex: 4, child: Container()),
|
// Expanded(flex: 4, child: Container()),
|
||||||
if(argumentsData['policy_type'] != 'OPD')
|
// if(argumentsData['policy_type'] != 'OPD')
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: Responsive.isDesktop(context) ? 4 : 6,
|
flex: Responsive.isDesktop(context) ? 4 : 6,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -601,7 +612,7 @@ class _policiesState extends State<policies> {
|
|||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 8,
|
flex: 6,
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
padding: Responsive.isDesktop(context)
|
padding: Responsive.isDesktop(context)
|
||||||
@ -665,10 +676,50 @@ class _policiesState extends State<policies> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 6,
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
child: Text(
|
padding: Responsive.isDesktop(context)
|
||||||
|
? EdgeInsets.only(
|
||||||
|
top: 10,
|
||||||
|
bottom: 10,
|
||||||
|
left: 10,
|
||||||
|
right: 10)
|
||||||
|
: EdgeInsets.only(
|
||||||
|
top: 15,
|
||||||
|
bottom: 15,
|
||||||
|
left: 7,
|
||||||
|
right: 7),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
if(ECardHide)...[
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: MouseRegion(
|
||||||
|
cursor: SystemMouseCursors.click, // Web pointer
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
getEcardDownload(detail['id']);
|
||||||
|
},
|
||||||
|
child: Tooltip(
|
||||||
|
message: 'E-Card',
|
||||||
|
waitDuration: const Duration(milliseconds: 300),
|
||||||
|
showDuration: const Duration(seconds: 2),
|
||||||
|
child: SvgPicture.string(
|
||||||
|
SvgService.getSvg('ECard'),
|
||||||
|
width: 25,
|
||||||
|
height: 25,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
],
|
||||||
|
|
||||||
|
Text(
|
||||||
detail['relationship']!,
|
detail['relationship']!,
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
@ -680,6 +731,8 @@ class _policiesState extends State<policies> {
|
|||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -217,6 +217,7 @@ class _profileState extends State<profile> {
|
|||||||
body: json.encode(params),
|
body: json.encode(params),
|
||||||
headers: {
|
headers: {
|
||||||
HttpHeaders.contentTypeHeader: 'application/json',
|
HttpHeaders.contentTypeHeader: 'application/json',
|
||||||
|
'APP-SIGNATURE': 'nhance-2025-signature-T8f6gV9k5fK2wf5V5c4vId3b0J8z6cAm2x8Y',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -749,7 +750,7 @@ class _profileState extends State<profile> {
|
|||||||
])),
|
])),
|
||||||
SizedBox(height: 12),
|
SizedBox(height: 12),
|
||||||
if (Responsive.isMobile(context) ||
|
if (Responsive.isMobile(context) ||
|
||||||
Responsive.isTablet(context))
|
Responsive.isTablet(context)) ...[
|
||||||
Container(
|
Container(
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
@ -788,6 +789,7 @@ class _profileState extends State<profile> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
|
],
|
||||||
Container(
|
Container(
|
||||||
// color: Colors.amberAccent,
|
// color: Colors.amberAccent,
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
@ -797,10 +799,11 @@ class _profileState extends State<profile> {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
// ✅ Change Password Button
|
// ✅ Change Password Button
|
||||||
if(Responsive.isDesktop(context))
|
if(Responsive.isDesktop(context))...[
|
||||||
_buildChangePasswordButton(context),
|
_buildChangePasswordButton(context),
|
||||||
|
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
|
],
|
||||||
|
|
||||||
// ✅ Logout Button
|
// ✅ Logout Button
|
||||||
Responsive.isDesktop(context)
|
Responsive.isDesktop(context)
|
||||||
|
|||||||
@ -480,7 +480,7 @@ class _tickettracklistState extends State<tickettracklist> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: 5),
|
width: 5),
|
||||||
Text(
|
Text(
|
||||||
name,
|
name ?? '',
|
||||||
style: GoogleFonts
|
style: GoogleFonts
|
||||||
.poppins(
|
.poppins(
|
||||||
fontSize:
|
fontSize:
|
||||||
|
|||||||
@ -202,10 +202,12 @@ class _pinPageState extends State<pinPage> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ToastHelper.showErrorToast(context, 'Something went wrong');
|
ToastHelper.showErrorToast(context, 'Something went wrong');
|
||||||
|
context.go('/login');
|
||||||
throw Exception('Failed to verify pin number');
|
throw Exception('Failed to verify pin number');
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ToastHelper.showErrorToast(context, 'Something went wrong');
|
ToastHelper.showErrorToast(context, 'Something went wrong');
|
||||||
|
context.go('/login');
|
||||||
print('Error: $e');
|
print('Error: $e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -492,6 +494,34 @@ class _pinPageState extends State<pinPage> {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
resizeToAvoidBottomInset: true, // IMPORTANT
|
||||||
|
bottomNavigationBar: SafeArea(
|
||||||
|
child: Container(
|
||||||
|
color: Colors.white, // 👈 set your color here
|
||||||
|
padding: const EdgeInsets.only(bottom: 8, top: 4),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
text: 'By continuing, you agree with our ',
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 9,
|
||||||
|
),
|
||||||
|
children: const [
|
||||||
|
TextSpan(
|
||||||
|
text: 'privacy policy ',
|
||||||
|
style: TextStyle(color: Color(0xFF00989E)),
|
||||||
|
),
|
||||||
|
TextSpan(text: 'and '),
|
||||||
|
TextSpan(
|
||||||
|
text: 'terms of use',
|
||||||
|
style: TextStyle(color: Color(0xFF00989E)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
color: Colors.white, // Set the color for the body
|
color: Colors.white, // Set the color for the body
|
||||||
child: SizedBox.expand(
|
child: SizedBox.expand(
|
||||||
@ -697,6 +727,11 @@ class _pinPageState extends State<pinPage> {
|
|||||||
focusedBorderColor),
|
focusedBorderColor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
obscureText: true,
|
||||||
|
obscuringWidget: const Text(
|
||||||
|
'●',
|
||||||
|
style: TextStyle(fontSize: 12,color: Colors.black87),
|
||||||
|
),
|
||||||
submittedPinTheme:
|
submittedPinTheme:
|
||||||
defaultPinTheme
|
defaultPinTheme
|
||||||
.copyWith(
|
.copyWith(
|
||||||
@ -761,7 +796,7 @@ class _pinPageState extends State<pinPage> {
|
|||||||
forgotPin();
|
forgotPin();
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Forget PIN?',
|
'Forgot PIN?',
|
||||||
style: GoogleFonts
|
style: GoogleFonts
|
||||||
.poppins(
|
.poppins(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@ -776,6 +811,41 @@ class _pinPageState extends State<pinPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 15),
|
||||||
|
Container(
|
||||||
|
margin:
|
||||||
|
EdgeInsets.symmetric(
|
||||||
|
horizontal: 30),
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 45,
|
||||||
|
child: ElevatedButton(
|
||||||
|
style: ElevatedButton
|
||||||
|
.styleFrom(
|
||||||
|
backgroundColor:
|
||||||
|
Color(0xFF00989E),
|
||||||
|
shape:
|
||||||
|
RoundedRectangleBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius
|
||||||
|
.circular(
|
||||||
|
10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
forgotPin();
|
||||||
|
// context.go('/login');
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
"Login with OTP",
|
||||||
|
style: GoogleFonts
|
||||||
|
.poppins(
|
||||||
|
color: Color(
|
||||||
|
0xFFFFFFFF)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -791,48 +861,6 @@ class _pinPageState extends State<pinPage> {
|
|||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
Align(
|
|
||||||
alignment: Alignment.bottomCenter,
|
|
||||||
child: SafeArea(
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.only(bottom: 8),
|
|
||||||
width: double.infinity,
|
|
||||||
child: RichText(
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
text: TextSpan(
|
|
||||||
text: 'By continuing, you agree with our ',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
children: <TextSpan>[
|
|
||||||
TextSpan(
|
|
||||||
text: 'privacy policy ',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF00989E),
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: 'and ',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: 'terms of use',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF00989E),
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
]),
|
]),
|
||||||
))));
|
))));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -174,6 +174,34 @@ class _changePinState extends State<changePin> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
resizeToAvoidBottomInset: true, // IMPORTANT
|
||||||
|
bottomNavigationBar: SafeArea(
|
||||||
|
child: Container(
|
||||||
|
color: Colors.white, // 👈 set your color here
|
||||||
|
padding: const EdgeInsets.only(bottom: 8, top: 4),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
text: 'By continuing, you agree with our ',
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 9,
|
||||||
|
),
|
||||||
|
children: const [
|
||||||
|
TextSpan(
|
||||||
|
text: 'privacy policy ',
|
||||||
|
style: TextStyle(color: Color(0xFF00989E)),
|
||||||
|
),
|
||||||
|
TextSpan(text: 'and '),
|
||||||
|
TextSpan(
|
||||||
|
text: 'terms of use',
|
||||||
|
style: TextStyle(color: Color(0xFF00989E)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
color: Colors.white, // Set the color for the body
|
color: Colors.white, // Set the color for the body
|
||||||
child: SizedBox.expand(
|
child: SizedBox.expand(
|
||||||
@ -534,45 +562,6 @@ class _changePinState extends State<changePin> {
|
|||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
Align(
|
|
||||||
alignment: Alignment.bottomCenter,
|
|
||||||
child: Container(
|
|
||||||
width: double.infinity, // Make the footer full width
|
|
||||||
child: RichText(
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
text: TextSpan(
|
|
||||||
text: 'By continuing, you agree with our ',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
children: <TextSpan>[
|
|
||||||
TextSpan(
|
|
||||||
text: 'privacy policy ',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF00989E),
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: 'and ',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: 'terms of use',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF00989E),
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]),
|
]),
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -253,6 +253,34 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
resizeToAvoidBottomInset: true, // IMPORTANT
|
||||||
|
bottomNavigationBar: SafeArea(
|
||||||
|
child: Container(
|
||||||
|
color: Colors.white, // 👈 set your color here
|
||||||
|
padding: const EdgeInsets.only(bottom: 8, top: 4),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
text: 'By continuing, you agree with our ',
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 9,
|
||||||
|
),
|
||||||
|
children: const [
|
||||||
|
TextSpan(
|
||||||
|
text: 'privacy policy ',
|
||||||
|
style: TextStyle(color: Color(0xFF00989E)),
|
||||||
|
),
|
||||||
|
TextSpan(text: 'and '),
|
||||||
|
TextSpan(
|
||||||
|
text: 'terms of use',
|
||||||
|
style: TextStyle(color: Color(0xFF00989E)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
color: Colors.white, // Set the color for the body
|
color: Colors.white, // Set the color for the body
|
||||||
child: SizedBox.expand(
|
child: SizedBox.expand(
|
||||||
@ -716,48 +744,6 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
|||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
Align(
|
|
||||||
alignment: Alignment.bottomCenter,
|
|
||||||
child: SafeArea(
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.only(bottom: 8),
|
|
||||||
width: double.infinity,
|
|
||||||
child: RichText(
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
text: TextSpan(
|
|
||||||
text: 'By continuing, you agree with our ',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
children: <TextSpan>[
|
|
||||||
TextSpan(
|
|
||||||
text: 'privacy policy ',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF00989E),
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: 'and ',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: 'terms of use',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
color: Color(0xFF00989E),
|
|
||||||
fontSize: 9,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
]),
|
]),
|
||||||
))));
|
))));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,8 +17,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
#version: 1.0.32+32
|
#version: 1.0.32+32
|
||||||
version: 1.0.24+27
|
version: 1.0.28+33
|
||||||
#version: 2.0.9+47
|
#version: 2.0.15+53
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.3.3 <4.0.0'
|
sdk: '>=3.3.3 <4.0.0'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user