hr live changes
This commit is contained in:
parent
1b5bd2dfd0
commit
d683b1fe10
@ -10,7 +10,7 @@ class CustomFooter extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'Copyright@ 2024 Nhance - Jubiliant',
|
'Copyright @ ${DateTime.now().year} Nhance',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.grey[600], // Text color
|
color: Colors.grey[600], // Text color
|
||||||
|
|||||||
@ -562,7 +562,7 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
|
|||||||
child: Align(
|
child: Align(
|
||||||
alignment: Responsive
|
alignment: Responsive
|
||||||
.isDesktop(context)
|
.isDesktop(context)
|
||||||
? Alignment.centerLeft
|
? Alignment.center
|
||||||
: Alignment
|
: Alignment
|
||||||
.bottomCenter, // Align to the start
|
.bottomCenter, // Align to the start
|
||||||
child: _size.width <= 1100
|
child: _size.width <= 1100
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import 'customAppBar/customFooter.dart';
|
|||||||
|
|
||||||
class excelVerify extends StatefulWidget {
|
class excelVerify extends StatefulWidget {
|
||||||
final String ClientId;
|
final String ClientId;
|
||||||
|
final String policyTypeId;
|
||||||
final String ClientPoliyId;
|
final String ClientPoliyId;
|
||||||
final String clientBranchId;
|
final String clientBranchId;
|
||||||
final String Token;
|
final String Token;
|
||||||
@ -37,6 +38,7 @@ class excelVerify extends StatefulWidget {
|
|||||||
const excelVerify(
|
const excelVerify(
|
||||||
{Key? key,
|
{Key? key,
|
||||||
required this.ClientId,
|
required this.ClientId,
|
||||||
|
required this.policyTypeId,
|
||||||
required this.ClientPoliyId,
|
required this.ClientPoliyId,
|
||||||
required this.clientBranchId,
|
required this.clientBranchId,
|
||||||
required this.Token,
|
required this.Token,
|
||||||
@ -765,7 +767,9 @@ class _excelVerifyState extends State<excelVerify> {
|
|||||||
builder: (context) =>
|
builder: (context) =>
|
||||||
hrPolicyDetails(
|
hrPolicyDetails(
|
||||||
ClientId: widget
|
ClientId: widget
|
||||||
.ClientId, // <-- from map
|
.ClientId,
|
||||||
|
policyTypeId: widget
|
||||||
|
.policyTypeId, // <-- from map
|
||||||
ClientPoliyId:
|
ClientPoliyId:
|
||||||
widget.ClientPoliyId,
|
widget.ClientPoliyId,
|
||||||
clientBranchId:
|
clientBranchId:
|
||||||
|
|||||||
@ -482,8 +482,7 @@ class _MyPhoneState extends State<MyHrLogin> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 8,
|
flex: 8,
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment
|
alignment: Alignment.center, // Align to the start
|
||||||
.topRight, // Align to the start
|
|
||||||
child: _size.width <= 1100
|
child: _size.width <= 1100
|
||||||
? Image.asset(
|
? Image.asset(
|
||||||
'assets/Nhance-Logo-Final-mobile.png',
|
'assets/Nhance-Logo-Final-mobile.png',
|
||||||
|
|||||||
@ -27,6 +27,7 @@ import 'hrDashboard.dart';
|
|||||||
|
|
||||||
class hrPolicyDetails extends StatefulWidget {
|
class hrPolicyDetails extends StatefulWidget {
|
||||||
final String ClientId;
|
final String ClientId;
|
||||||
|
final String policyTypeId;
|
||||||
// final String ClientBranchId;
|
// final String ClientBranchId;
|
||||||
final String ClientPoliyId;
|
final String ClientPoliyId;
|
||||||
final String clientBranchId;
|
final String clientBranchId;
|
||||||
@ -41,6 +42,7 @@ class hrPolicyDetails extends StatefulWidget {
|
|||||||
const hrPolicyDetails(
|
const hrPolicyDetails(
|
||||||
{Key? key,
|
{Key? key,
|
||||||
required this.ClientId,
|
required this.ClientId,
|
||||||
|
required this.policyTypeId,
|
||||||
// required this.ClientBranchId,
|
// required this.ClientBranchId,
|
||||||
required this.ClientPoliyId,
|
required this.ClientPoliyId,
|
||||||
required this.clientBranchId,
|
required this.clientBranchId,
|
||||||
@ -470,6 +472,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
builder: (context) => excelVerify(
|
builder: (context) => excelVerify(
|
||||||
ClientId:
|
ClientId:
|
||||||
widget.ClientId, // <-- from map
|
widget.ClientId, // <-- from map
|
||||||
|
policyTypeId: widget.policyTypeId,
|
||||||
ClientPoliyId: widget.ClientPoliyId,
|
ClientPoliyId: widget.ClientPoliyId,
|
||||||
clientBranchId:
|
clientBranchId:
|
||||||
widget.clientBranchId,
|
widget.clientBranchId,
|
||||||
@ -612,6 +615,9 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print('widgetpolicyTypeId');
|
||||||
|
print(widget.policyTypeId);
|
||||||
|
|
||||||
if (filteredData.isEmpty) {
|
if (filteredData.isEmpty) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
// height: 50,
|
// height: 50,
|
||||||
@ -649,6 +655,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if(widget.policyTypeId != '6' && widget.policyTypeId != '7')
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -700,7 +707,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 6,
|
flex: 5,
|
||||||
child: Text(
|
child: Text(
|
||||||
'Email',
|
'Email',
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
@ -746,8 +753,10 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
SingleChildScrollView(
|
SingleChildScrollView(
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: _paginatedData.mapIndexed((index, item) {
|
children: _paginatedData.mapIndexed((index, item) {
|
||||||
return Container(
|
return Container(
|
||||||
|
|
||||||
// margin: const EdgeInsets.only(bottom: 8),
|
// margin: const EdgeInsets.only(bottom: 8),
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.symmetric(vertical: 5, horizontal: 16),
|
const EdgeInsets.symmetric(vertical: 5, horizontal: 16),
|
||||||
@ -788,6 +797,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if(widget.policyTypeId != '6' && widget.policyTypeId != '7')
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
child: Text(
|
child: Text(
|
||||||
@ -839,7 +849,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 6,
|
flex: 5,
|
||||||
child: Text(
|
child: Text(
|
||||||
"${item['email_corporate'] ?? ''}",
|
"${item['email_corporate'] ?? ''}",
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
@ -873,77 +883,162 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (widget.TokenType != "pre" &&
|
if (widget.TokenType != "pre" && (hasAnyEcardLink || hasModule))
|
||||||
(hasAnyEcardLink || hasModule))
|
Expanded(
|
||||||
Expanded(
|
flex: 3,
|
||||||
flex: 3,
|
child: Builder(
|
||||||
child: Row(
|
builder: (context) {
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
final isSelf = item['relationship'] == 'Self';
|
||||||
children: [
|
final hasEcard = item['ecard_download_link'] != null;
|
||||||
if (item['ecard_download_link'] != null)
|
final showEcard = isSelf && hasEcard;
|
||||||
GestureDetector(
|
final showClaim = widget.TokenType == "post" && hasModule;
|
||||||
onTap: () {
|
|
||||||
_launchURL(item['ecard_download_link']);
|
if (!showEcard && !showClaim) {
|
||||||
},
|
return SizedBox(); // No icon to show
|
||||||
child: Container(
|
}
|
||||||
height: 35,
|
|
||||||
width: 35,
|
return Row(
|
||||||
decoration: BoxDecoration(
|
mainAxisAlignment: showEcard && !showClaim
|
||||||
color: Color(0xFFE6F5F6),
|
? MainAxisAlignment.start // Only eCard, push to right
|
||||||
borderRadius: BorderRadius.circular(8),
|
: MainAxisAlignment.end, // eCard + claim OR only claim
|
||||||
),
|
children: [
|
||||||
child: Padding(
|
if (showEcard)
|
||||||
padding: EdgeInsets.all(
|
Padding(
|
||||||
6), // You can adjust this value
|
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
||||||
child: Image.asset(
|
child: GestureDetector(
|
||||||
'assets/credit_card.png',
|
onTap: () {
|
||||||
fit: BoxFit.contain,
|
_launchURL(item['ecard_download_link']);
|
||||||
),
|
},
|
||||||
),
|
child: Container(
|
||||||
),
|
height: 35,
|
||||||
),
|
width: 35,
|
||||||
SizedBox(
|
decoration: BoxDecoration(
|
||||||
width: 10,
|
color: Color(0xFFE6F5F6),
|
||||||
),
|
borderRadius: BorderRadius.circular(8),
|
||||||
if (widget.TokenType == "post" && hasModule)
|
),
|
||||||
GestureDetector(
|
child: Padding(
|
||||||
onTap: () {
|
padding: EdgeInsets.all(6),
|
||||||
setState(() {
|
child: Image.asset(
|
||||||
print(
|
'assets/credit_card.png',
|
||||||
"policytabdata - ${item['emp_code']!}");
|
fit: BoxFit.contain,
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (context) => hrDashboard(
|
|
||||||
selectedIndex: 3,
|
|
||||||
empCodeFromHrPolicy:
|
|
||||||
item['emp_code']!,
|
|
||||||
isHrcode: 1,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
height: 35,
|
|
||||||
width: 35,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFE6F5F6),
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.all(
|
|
||||||
6), // You can adjust this value
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/claim.png',
|
|
||||||
fit: BoxFit.contain,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
if (showEcard && showClaim) SizedBox(width: 8),
|
||||||
),
|
|
||||||
|
if (showClaim)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => hrDashboard(
|
||||||
|
selectedIndex: 3,
|
||||||
|
empCodeFromHrPolicy: item['emp_code']!,
|
||||||
|
isHrcode: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 35,
|
||||||
|
width: 35,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color(0xFFE6F5F6),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(6),
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/claim.png',
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// if (widget.TokenType != "pre" &&
|
||||||
|
// (hasAnyEcardLink || hasModule))
|
||||||
|
// Expanded(
|
||||||
|
// flex: 3,
|
||||||
|
// child: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// children: [
|
||||||
|
// if (item['ecard_download_link'] != null)
|
||||||
|
// GestureDetector(
|
||||||
|
// onTap: () {
|
||||||
|
// _launchURL(item['ecard_download_link']);
|
||||||
|
// },
|
||||||
|
// child: Container(
|
||||||
|
// height: 35,
|
||||||
|
// width: 35,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: Color(0xFFE6F5F6),
|
||||||
|
// borderRadius: BorderRadius.circular(8),
|
||||||
|
// ),
|
||||||
|
// child: Padding(
|
||||||
|
// padding: EdgeInsets.all(
|
||||||
|
// 6), // You can adjust this value
|
||||||
|
// child: Image.asset(
|
||||||
|
// 'assets/credit_card.png',
|
||||||
|
// fit: BoxFit.contain,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// SizedBox(
|
||||||
|
// width: 10,
|
||||||
|
// ),
|
||||||
|
// if (widget.TokenType == "post" && hasModule)
|
||||||
|
// GestureDetector(
|
||||||
|
// onTap: () {
|
||||||
|
// setState(() {
|
||||||
|
// print(
|
||||||
|
// "policytabdata - ${item['emp_code']!}");
|
||||||
|
// Navigator.push(
|
||||||
|
// context,
|
||||||
|
// MaterialPageRoute(
|
||||||
|
// builder: (context) => hrDashboard(
|
||||||
|
// selectedIndex: 3,
|
||||||
|
// empCodeFromHrPolicy:
|
||||||
|
// item['emp_code']!,
|
||||||
|
// isHrcode: 1,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// child: Container(
|
||||||
|
// height: 35,
|
||||||
|
// width: 35,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: Color(0xFFE6F5F6),
|
||||||
|
// borderRadius: BorderRadius.circular(8),
|
||||||
|
// ),
|
||||||
|
// child: Padding(
|
||||||
|
// padding: EdgeInsets.all(
|
||||||
|
// 6), // You can adjust this value
|
||||||
|
// child: Image.asset(
|
||||||
|
// 'assets/claim.png',
|
||||||
|
// fit: BoxFit.contain,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -577,8 +577,7 @@ class _MyVerifyState extends State<MyHrVerify> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 8,
|
flex: 8,
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment
|
alignment: Alignment.center, // Align to the start
|
||||||
.topRight, // Align to the start
|
|
||||||
child: _size.width <= 1100
|
child: _size.width <= 1100
|
||||||
? Image.asset(
|
? Image.asset(
|
||||||
'assets/Nhance-Logo-Final-mobile.png',
|
'assets/Nhance-Logo-Final-mobile.png',
|
||||||
|
|||||||
@ -69,6 +69,7 @@ Future<void> main() async {
|
|||||||
'hrHome': (context) => MyHrHome(),
|
'hrHome': (context) => MyHrHome(),
|
||||||
'excelVerify': (context) => const excelVerify(
|
'excelVerify': (context) => const excelVerify(
|
||||||
ClientId: '',
|
ClientId: '',
|
||||||
|
policyTypeId: '',
|
||||||
ClientPoliyId: '',
|
ClientPoliyId: '',
|
||||||
clientBranchId: '',
|
clientBranchId: '',
|
||||||
Token: '',
|
Token: '',
|
||||||
@ -97,6 +98,7 @@ Future<void> main() async {
|
|||||||
),
|
),
|
||||||
'hrPolicyDetails': (context) => hrPolicyDetails(
|
'hrPolicyDetails': (context) => hrPolicyDetails(
|
||||||
ClientId: '',
|
ClientId: '',
|
||||||
|
policyTypeId: '',
|
||||||
ClientPoliyId: '',
|
ClientPoliyId: '',
|
||||||
clientBranchId: '',
|
clientBranchId: '',
|
||||||
Token: '',
|
Token: '',
|
||||||
|
|||||||
@ -289,6 +289,7 @@ class _ActivePolicieState extends State<ActivePolicies> {
|
|||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => hrPolicyDetails(
|
builder: (context) => hrPolicyDetails(
|
||||||
ClientId: policy['client_id'].toString(), // <-- from map
|
ClientId: policy['client_id'].toString(), // <-- from map
|
||||||
|
policyTypeId: policy['policy_type_id'].toString(), // <-- from map
|
||||||
ClientPoliyId: policy['client_policy_id'].toString(),
|
ClientPoliyId: policy['client_policy_id'].toString(),
|
||||||
clientBranchId: widget.empClientBranchId,
|
clientBranchId: widget.empClientBranchId,
|
||||||
Token: widget.postToken,
|
Token: widget.postToken,
|
||||||
|
|||||||
@ -238,6 +238,7 @@ class _PreEnrollmentState extends State<PreEnrollment> {
|
|||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => hrPolicyDetails(
|
builder: (context) => hrPolicyDetails(
|
||||||
ClientId: policy['client_id'].toString(), // <-- from map
|
ClientId: policy['client_id'].toString(), // <-- from map
|
||||||
|
policyTypeId: policy['policy_type_id'].toString(), // <-- from map
|
||||||
ClientPoliyId: policy['client_policy_id'].toString(),
|
ClientPoliyId: policy['client_policy_id'].toString(),
|
||||||
clientBranchId: widget.enrollmentClientBranchId,
|
clientBranchId: widget.enrollmentClientBranchId,
|
||||||
Token: widget.enrollToken,
|
Token: widget.enrollToken,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user