approval and my trips

This commit is contained in:
venba-Inspriron-3558 2025-07-19 09:36:57 +05:30
parent 9fac4152ab
commit ea0456d97c
2 changed files with 1053 additions and 503 deletions

View File

@ -1395,38 +1395,324 @@ class _ApprovalListState extends State<ApprovalList> {
), ),
elevation: 3, elevation: 3,
child: Padding( child: Padding(
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(10.0),
child: Column( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// Status and Employee Code // Status and Employee Code
Row( // Row(
mainAxisAlignment: // mainAxisAlignment:
MainAxisAlignment.spaceBetween, // MainAxisAlignment.spaceBetween,
children: [ // children: [
GestureDetector( // GestureDetector(
onTap: () => _showDetails(plan.planId), // onTap: () => _showDetails(plan.planId),
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 8,
// vertical: 4,
// ),
// decoration: BoxDecoration(
// color: getStatusColor(plan.statusValue),
// borderRadius: BorderRadius.circular(8),
// ),
// child: Text(
// plan.statusValue,
// style: TextStyle(
// color: getStatusTextColor(
// plan.statusValue,
// ),
// fontSize: 10,
// fontWeight: FontWeight.w600,
// ),
// ),
// ),
// ),
// PopupMenuButton<int>(
// color: Colors.white,
// padding: EdgeInsets.zero,
// offset: Offset(0, 30),
// icon: Icon(
// Icons.more_vert,
// color: Color(0xFF475569),
// size: 14,
// ),
// itemBuilder:
// (context) => [
// CustomPopupMenuEntry(
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 8,
// vertical: 8,
// ),
// child: Row(
// mainAxisSize:
// MainAxisSize.min,
// mainAxisAlignment:
// MainAxisAlignment.center,
// children: [
// IconButton(
// icon: Icon(
// Icons.remove_red_eye,
// color: Color(
// 0xFF475569,
// ),
// size: 18,
// ),
// tooltip:
// 'View The Trip Details',
// onPressed: () {
// Navigator.pop(
// context,
// ); // Close popup manually
// viewPlanforApprover(
// plan.planId,
// plan.approverId,
// plan.delegaterId,
// isViewMode: true,
// isApprover: true,
// );
// },
// ),
// if (plan.statusValue ==
// "Pending Approval" ||
// plan.statusValue ==
// "Partially Approved")
// IconButton(
// icon: Image.asset(
// 'assets/images/IconsImg/edit.png',
// width: 20,
// height: 15,
// ),
// tooltip:
// 'Edit The Trip Details',
// onPressed: () {
// Navigator.pop(
// context,
// );
// print(
// "Approver Edit3 : ${plan.approver_status}",
// );
//
// ApiService.viewPlanForApprover(
// context,
// plan.planId,
// plan.approverId,
// plan.delegaterId,
// plan.approver_status,
// isViewMode: false,
// isApprover: true,
// );
// },
// ),
// IconButton(
// icon: Icon(
// Icons.cancel_rounded,
// size: 18,
// ),
// tooltip:
// 'Cancellation The Trip Details',
// onPressed: () {
// Navigator.pop(context);
// deletePlan(plan.planId);
// },
// ),
// IconButton(
// icon: Icon(
// Icons.download,
// color: Color(
// 0xFF114D8B,
// ),
// size: 18,
// ),
// tooltip:
// 'Download The PDF',
// onPressed: () {
// Navigator.pop(context);
// apiService
// .getPdfDownload(
// plan.planId,
// );
// },
// ),
// IconButton(
// icon: const Icon(
// Icons.comment,
// color: Color(
// 0xFF475569,
// ),
// size: 11,
// ),
// tooltip: 'Trip Comments',
// onPressed: () {
// showDialog(
// context: context,
// builder:
// (
// context,
// ) => CommentModalList(
// // planId: plan.planId,
// planId:
// plan.planId
// .toString(),
// layoutColorForUser:
// layoutColor!,
// role:
// "Approver",
// ),
// );
// },
// ),
// ],
// ),
// ),
// ),
// ],
// ),
// ],
// ),
// SizedBox(height: 2),
// // Trip Id and Trip Name
// Row(
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// ' ${plan.tripTitle}',
// style: TextStyle(
// fontSize: 12,
// fontFamily: "Inter",
// fontWeight: FontWeight.bold,
// ),
// ),
// ],
// ),
// ],
// ),
// SizedBox(height: 2),
// // Type and Created On
// Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// ' ${plan.tripType}',
// style: TextStyle(
// fontSize: 9,
// color: Colors.black87,
// fontFamily: "Inter",
// ),
// ),
// ],
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// '${_formatDate(plan.createdOn)}',
// style: TextStyle(
// fontSize: 9,
// color: Colors.black87,
// fontFamily: "Inter",
// ),
// ),
// ],
// ),
// ],
// ),
// SizedBox(height: 3),
// // Name
// Row(
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// plan.userName.isNotEmpty
// ? '${plan.userName}'
// : '${plan.travellerName}',
// style: TextStyle(
// fontSize: 9,
// fontFamily: "Inter",
// color: Colors.black87,
// ),
// ),
// ],
// ),
// Spacer(),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// plan.employeeCode ?? 'No Data',
// style: TextStyle(
// fontSize: 9,
// fontFamily: "Inter",
// color: Colors.black87,
// ),
// ),
// ],
// ),
// ],
// ),
// Actions
Expanded(
child: Container( child: Container(
padding: EdgeInsets.symmetric( // color: Colors.yellow.shade50,
horizontal: 8, child: Column(
vertical: 4, children: [
Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
children: [
Container(
// color: Colors.red.shade50,
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Image.asset(
plan.tripType == 'Domestic'
? 'assets/images/IconsImg/Domestic_new.png'
: 'assets/images/IconsImg/International_new.png',
// width: 65,
height: plan.tripType == 'Domestic' ? 28 : 30,
), ),
decoration: BoxDecoration( ],
color: getStatusColor(plan.statusValue),
borderRadius: BorderRadius.circular(8),
),
child: Text(
plan.statusValue,
style: TextStyle(
color: getStatusTextColor(
plan.statusValue,
),
fontSize: 10,
fontWeight: FontWeight.w600,
), ),
), ),
SizedBox(width: 10),
Expanded(
flex: 1,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
' ${plan.tripTitle}',
style: GoogleFonts.poppins(
fontSize: 12,
fontWeight:
FontWeight.w500,
), ),
), ),
],
),
),
SizedBox(width: 10),
Column(
children: [
PopupMenuButton<int>( PopupMenuButton<int>(
color: Colors.white, color: Colors.white,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
@ -1440,19 +1726,25 @@ class _ApprovalListState extends State<ApprovalList> {
(context) => [ (context) => [
CustomPopupMenuEntry( CustomPopupMenuEntry(
child: Container( child: Container(
padding: EdgeInsets.symmetric( padding:
horizontal: 8, EdgeInsets.symmetric(
vertical: 8, horizontal: 1,
vertical: 1,
// horizontal: 8,
// vertical: 8,
), ),
child: Row( child: Row(
mainAxisSize: mainAxisSize:
MainAxisSize.min, MainAxisSize
.min,
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment
.center,
children: [ children: [
IconButton( IconButton(
icon: Icon( icon: Icon(
Icons.remove_red_eye, Icons
.remove_red_eye,
color: Color( color: Color(
0xFF475569, 0xFF475569,
), ),
@ -1481,32 +1773,28 @@ class _ApprovalListState extends State<ApprovalList> {
icon: Image.asset( icon: Image.asset(
'assets/images/IconsImg/edit.png', 'assets/images/IconsImg/edit.png',
width: 20, width: 20,
height: 15, height:
15,
), ),
tooltip: tooltip:
'Edit The Trip Details', 'Edit The Trip Details',
onPressed: () { onPressed: () {
Navigator.pop( Navigator.pop(
context, context,
); ); // Close popup manually
print( viewPlanforApprover(
"Approver Edit3 : ${plan.approver_status}",
);
ApiService.viewPlanForApprover(
context,
plan.planId, plan.planId,
plan.approverId, plan.approverId,
plan.delegaterId, plan.delegaterId,
plan.approver_status, isViewMode: true,
isViewMode: false,
isApprover: true, isApprover: true,
); );
}, },
), ),
IconButton( IconButton(
icon: Icon( icon: Icon(
Icons.cancel_rounded, Icons
.cancel_rounded,
size: 18, size: 18,
), ),
tooltip: tooltip:
@ -1518,7 +1806,8 @@ class _ApprovalListState extends State<ApprovalList> {
), ),
IconButton( IconButton(
icon: Icon( icon: Icon(
Icons.download, Icons
.download,
color: Color( color: Color(
0xFF114D8B, 0xFF114D8B,
), ),
@ -1536,13 +1825,15 @@ class _ApprovalListState extends State<ApprovalList> {
), ),
IconButton( IconButton(
icon: const Icon( icon: const Icon(
Icons.comment, Icons
.comment,
color: Color( color: Color(
0xFF475569, 0xFF475569,
), ),
size: 11, size: 11,
), ),
tooltip: 'Trip Comments', tooltip:
'Trip Comments',
onPressed: () { onPressed: () {
showDialog( showDialog(
context: context, context: context,
@ -1570,102 +1861,84 @@ class _ApprovalListState extends State<ApprovalList> {
), ),
], ],
), ),
],
),
SizedBox(height: 2),
// Trip Id and Trip Name
Row(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
' ${plan.tripTitle}',
style: TextStyle(
fontSize: 12,
fontFamily: "Inter",
fontWeight: FontWeight.bold,
),
),
],
),
],
),
SizedBox(height: 2),
// Type and Created On
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [ children: [
Column( Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text( Text(
' ${plan.tripType}', '${plan.userName.isNotEmpty ? plan.userName : plan.travellerName} ${(plan.employeeCode) ?? ''}',
style: TextStyle( style: GoogleFonts.poppins(
fontSize: 9, fontSize: 10,
color: Colors.black87, color: Colors.black87,
fontFamily: "Inter",
), ),
), ),
],
),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text( Text(
'${_formatDate(plan.createdOn)}', '${_formatDate(plan.createdOn)}',
style: TextStyle( style: GoogleFonts.poppins(
fontSize: 9, fontSize: 9,
color: Colors.black87, color: Colors.grey,
fontFamily: "Inter",
), ),
), ),
], ],
), ),
],
),
SizedBox(height: 3),
// Name
Row(
children: [
Column( Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.end,
children: [ children: [
Text( GestureDetector(
plan.userName.isNotEmpty onTap:
? '${plan.userName}' () => _showDetails(
: '${plan.travellerName}', plan.planId,
style: TextStyle( ),
child: Container(
padding:
EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
),
decoration: BoxDecoration(
color: getStatusColor(
plan.statusValue,
),
borderRadius:
BorderRadius.circular(
8,
),
),
child: Text(
plan.statusValue,
style: GoogleFonts.poppins(
color:
getStatusTextColor(
plan.statusValue,
),
fontSize: 9, fontSize: 9,
fontFamily: "Inter", fontWeight:
color: Colors.black87, FontWeight.w600,
), ),
), ),
],
),
Spacer(),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
plan.employeeCode ?? 'No Data',
style: TextStyle(
fontSize: 9,
fontFamily: "Inter",
color: Colors.black87,
), ),
), ),
], ],
), ),
], ],
), ),
// Actions ],
// Actions ),
),
),
], ],
), ),
), ),

View File

@ -1386,69 +1386,356 @@ class _ListPlansState extends State<ListPlans> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// Status and Employee Code // Status and Employee Code
Row( // Row(
mainAxisAlignment: // mainAxisAlignment:
MainAxisAlignment.spaceBetween, // MainAxisAlignment.spaceBetween,
children: [ // children: [
GestureDetector( // GestureDetector(
onTap: () => _showDetails(plan.planId), // onTap: () => _showDetails(plan.planId),
child: Container( // child: Container(
padding: EdgeInsets.symmetric( // padding: EdgeInsets.symmetric(
horizontal: 8, // horizontal: 8,
vertical: 4, // vertical: 4,
),
decoration: BoxDecoration(
color: getStatusColor(
plan.statusValue,
),
borderRadius: BorderRadius.circular(
8,
),
),
child: Text(
plan.statusValue,
style: TextStyle(
color: getStatusTextColor(
plan.statusValue,
),
fontSize: 10,
fontWeight: FontWeight.w600,
),
),
),
),
// PlanPopupMenu(
// plan: plan,
// deletePlan: deletePlan,
// apiService: apiService,
// layoutColor: layoutColor,
// ), // ),
// decoration: BoxDecoration(
// color: getStatusColor(
// plan.statusValue,
// ),
// borderRadius: BorderRadius.circular(
// 8,
// ),
// ),
// child: Text(
// plan.statusValue,
// style: TextStyle(
// color: getStatusTextColor(
// plan.statusValue,
// ),
// fontSize: 10,
// fontWeight: FontWeight.w600,
// ),
// ),
// ),
// ),
// // PlanPopupMenu(
// // plan: plan,
// // deletePlan: deletePlan,
// // apiService: apiService,
// // layoutColor: layoutColor,
// // ),
// PopupMenuButton<int>(
// color: Colors.white,
// padding: EdgeInsets.zero,
// offset: Offset(0, 30),
// icon: Icon(
// Icons.more_vert,
// size: 14,
// color: Color(0xFF475569),
// ),
// itemBuilder:
// (context) => [
// CustomPopupMenuEntry(
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 8,
// vertical: 8,
// ),
// child: Row(
// mainAxisSize:
// MainAxisSize.min,
// mainAxisAlignment:
// MainAxisAlignment.center,
// children: [
// IconButton(
// icon: Icon(
// Icons.remove_red_eye,
// color: Color(
// 0xFF475569,
// ),
// size: 18,
// ),
// tooltip:
// 'View The Trip Details',
// onPressed: () {
// Navigator.pop(
// context,
// ); // Close popup manually
// ApiService.viewPlan(
// context,
// plan.planId,
// isViewMode: true,
// isMyTrips: true,
// );
// },
// ),
// if (plan.statusValue ==
// "Pending Approval" ||
// plan.statusValue ==
// "Partially Approved")
// IconButton(
// icon: Image.asset(
// 'assets/images/IconsImg/edit.png',
// width: 20,
// height: 15,
// ),
// tooltip:
// 'Edit Trip Details',
// onPressed: () {
// Navigator.pop(
// context,
// );
// ApiService.viewPlan(
// context,
// plan.planId,
// isViewMode: false,
// isMyTrips: true,
// );
// },
// ),
// IconButton(
// icon: Icon(
// Icons.cancel_rounded,
// size: 18,
// ),
// tooltip:
// 'Cancellation The Trip Details',
// onPressed: () {
// Navigator.pop(context);
// deletePlan(plan.planId);
// },
// ),
// IconButton(
// icon: Icon(
// Icons.download,
// color: Color(
// 0xFF114D8B,
// ),
// size: 18,
// ),
// tooltip:
// 'Download The PDF',
// onPressed: () {
// Navigator.pop(context);
// apiService
// .getPdfDownload(
// plan.planId,
// );
// },
// ),
// IconButton(
// icon: const Icon(
// Icons.comment,
// color: Color(
// 0xFF475569,
// ),
// size: 11,
// ),
// tooltip: 'Trip Comments',
// onPressed: () {
// showDialog(
// context: context,
// builder:
// (
// context,
// ) => CommentModalList(
// // planId: plan.planId,
// planId:
// plan.planId
// .toString(),
// layoutColorForUser:
// layoutColor!,
// role: "User",
// ),
// );
// },
// ),
// ],
// ),
// ),
// ),
// ],
// ),
// ],
// ),
// SizedBox(height: 2),
// // Trip Id and Trip Name
// Row(
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// ' ${plan.tripTitle}',
// style: TextStyle(
// fontSize: 12,
// fontFamily: "Inter",
// fontWeight: FontWeight.bold,
// ),
// ),
// ],
// ),
// ],
// ),
// SizedBox(height: 2),
// // Type and Created On
// Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// ' ${plan.tripType}',
// style: TextStyle(
// fontSize: 9,
// color: Colors.black87,
// fontFamily: "Inter",
// ),
// ),
// ],
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// '${_formatDate(plan.createdOn)}',
// style: TextStyle(
// fontSize: 9,
// color: Colors.black87,
// fontFamily: "Inter",
// ),
// ),
// ],
// ),
// ],
// ),
// SizedBox(height: 3),
// // Name
// Row(
// children: [
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// plan.userName.isNotEmpty
// ? '${plan.userName}'
// : '${plan.travellerName}',
// style: TextStyle(
// fontSize: 9,
// fontFamily: "Inter",
// color: Colors.black87,
// ),
// ),
// ],
// ),
// Spacer(),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// plan.employeeCode ?? 'No Data',
// style: TextStyle(
// fontSize: 9,
// fontFamily: "Inter",
// color: Colors.black87,
// ),
// ),
// ],
// ),
// ],
// ),
// Actions
Expanded(
child: Container(
// color: Colors.yellow.shade50,
child: Column(
children: [
Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
children: [
Container(
// color: Colors.red.shade50,
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Image.asset(
plan.tripType == 'Domestic'
? 'assets/images/IconsImg/Domestic_new.png'
: 'assets/images/IconsImg/International_new.png',
// width: 65,
height:
plan.tripType ==
'Domestic'
? 28
: 30,
),
],
),
),
SizedBox(width: 10),
Expanded(
flex: 1,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'${plan.tripTitle}',
style: GoogleFonts.poppins(
fontSize: 12,
fontWeight:
FontWeight.w500,
),
),
],
),
),
SizedBox(width: 10),
Column(
children: [
PopupMenuButton<int>( PopupMenuButton<int>(
color: Colors.white, color: Colors.white,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
offset: Offset(0, 30), offset: Offset(0, 30),
icon: Icon( icon: Icon(
Icons.more_vert, Icons.more_vert,
size: 14,
color: Color(0xFF475569), color: Color(0xFF475569),
size: 14,
), ),
itemBuilder: itemBuilder:
(context) => [ (context) => [
CustomPopupMenuEntry( CustomPopupMenuEntry(
child: Container( child: Container(
padding: EdgeInsets.symmetric( padding:
horizontal: 8, EdgeInsets.symmetric(
vertical: 8, horizontal: 1,
vertical: 1,
// horizontal: 8,
// vertical: 8,
), ),
child: Row( child: Row(
mainAxisSize: mainAxisSize:
MainAxisSize.min, MainAxisSize
.min,
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment
.center,
children: [ children: [
IconButton( IconButton(
icon: Icon( icon: Icon(
Icons.remove_red_eye, Icons
.remove_red_eye,
color: Color( color: Color(
0xFF475569, 0xFF475569,
), ),
@ -1476,10 +1763,11 @@ class _ListPlansState extends State<ListPlans> {
icon: Image.asset( icon: Image.asset(
'assets/images/IconsImg/edit.png', 'assets/images/IconsImg/edit.png',
width: 20, width: 20,
height: 15, height:
15,
), ),
tooltip: tooltip:
'Edit Trip Details', 'Edit The Trip Details',
onPressed: () { onPressed: () {
Navigator.pop( Navigator.pop(
context, context,
@ -1494,7 +1782,8 @@ class _ListPlansState extends State<ListPlans> {
), ),
IconButton( IconButton(
icon: Icon( icon: Icon(
Icons.cancel_rounded, Icons
.cancel_rounded,
size: 18, size: 18,
), ),
tooltip: tooltip:
@ -1506,7 +1795,8 @@ class _ListPlansState extends State<ListPlans> {
), ),
IconButton( IconButton(
icon: Icon( icon: Icon(
Icons.download, Icons
.download,
color: Color( color: Color(
0xFF114D8B, 0xFF114D8B,
), ),
@ -1524,13 +1814,15 @@ class _ListPlansState extends State<ListPlans> {
), ),
IconButton( IconButton(
icon: const Icon( icon: const Icon(
Icons.comment, Icons
.comment,
color: Color( color: Color(
0xFF475569, 0xFF475569,
), ),
size: 11, size: 11,
), ),
tooltip: 'Trip Comments', tooltip:
'Trip Comments',
onPressed: () { onPressed: () {
showDialog( showDialog(
context: context, context: context,
@ -1557,102 +1849,87 @@ class _ListPlansState extends State<ListPlans> {
), ),
], ],
), ),
],
),
SizedBox(height: 2),
// Trip Id and Trip Name
Row(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
' ${plan.tripTitle}',
style: TextStyle(
fontSize: 12,
fontFamily: "Inter",
fontWeight: FontWeight.bold,
),
),
],
),
],
),
SizedBox(height: 2),
// Type and Created On
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [ children: [
Column( Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text( Text(
' ${plan.tripType}', // plan.userName.isNotEmpty
style: TextStyle( // ? plan.userName
fontSize: 9, // : '${plan.travellerName}',
'${plan.userName.isNotEmpty ? plan.userName : plan.travellerName} (${plan.employeeCode ?? 'No Data'})',
style: GoogleFonts.poppins(
fontSize: 10,
color: Colors.black87, color: Colors.black87,
fontFamily: "Inter",
), ),
), ),
],
),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text( Text(
'${_formatDate(plan.createdOn)}', '${_formatDate(plan.createdOn)}',
style: TextStyle( style: GoogleFonts.poppins(
fontSize: 9, fontSize: 9,
color: Colors.black87, color: Colors.grey,
fontFamily: "Inter",
), ),
), ),
], ],
), ),
],
),
SizedBox(height: 3),
// Name
Row(
children: [
Column( Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.end,
children: [ children: [
Text( GestureDetector(
plan.userName.isNotEmpty onTap:
? '${plan.userName}' () => _showDetails(
: '${plan.travellerName}', plan.planId,
style: TextStyle( ),
child: Container(
padding:
EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
),
decoration: BoxDecoration(
color: getStatusColor(
plan.statusValue,
),
borderRadius:
BorderRadius.circular(
8,
),
),
child: Text(
plan.statusValue,
style: GoogleFonts.poppins(
color:
getStatusTextColor(
plan.statusValue,
),
fontSize: 9, fontSize: 9,
fontFamily: "Inter", fontWeight:
color: Colors.black87, FontWeight.w600,
), ),
), ),
],
),
Spacer(),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
plan.employeeCode ?? 'No Data',
style: TextStyle(
fontSize: 9,
fontFamily: "Inter",
color: Colors.black87,
), ),
), ),
], ],
), ),
], ],
), ),
// Actions ],
// Actions ),
),
),
], ],
), ),
), ),