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