MERGED
This commit is contained in:
commit
6c98829a21
@ -1439,7 +1439,9 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
elevation: 3,
|
elevation: 3, // Control the strength of the shadow
|
||||||
|
// shadowColor: Colors.black54, // Softer shadow
|
||||||
|
// clipBehavior: Clip.antiAlias,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -1480,7 +1482,7 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
' ${plan.tripTitle}',
|
'${plan.tripTitle}',
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight:
|
fontWeight:
|
||||||
@ -1494,6 +1496,12 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
SizedBox(width: 10),
|
SizedBox(width: 10),
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
|
// PlanPopupMenu(
|
||||||
|
// plan: plan,
|
||||||
|
// deletePlan: deletePlan,
|
||||||
|
// apiService: apiService,
|
||||||
|
// layoutColor: layoutColor,
|
||||||
|
// ),
|
||||||
PopupMenuButton<int>(
|
PopupMenuButton<int>(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
@ -1541,8 +1549,8 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
plan.planId,
|
plan.planId,
|
||||||
plan.approverId,
|
plan.approverId,
|
||||||
plan.delegaterId,
|
plan.delegaterId,
|
||||||
isViewMode: true,
|
isViewMode:true,
|
||||||
isApprover: true,
|
isApprover:true,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -1575,14 +1583,20 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons
|
Icons
|
||||||
.cancel_rounded,
|
.download,
|
||||||
|
color: Color(
|
||||||
|
0xFF114D8B,
|
||||||
|
),
|
||||||
size: 18,
|
size: 18,
|
||||||
),
|
),
|
||||||
tooltip:
|
tooltip:
|
||||||
'Cancellation The Trip Details',
|
'Download The PDF',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
deletePlan(plan.planId);
|
apiService
|
||||||
|
.getPdfDownload(
|
||||||
|
plan.planId,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
@ -1597,7 +1611,9 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
tooltip:
|
tooltip:
|
||||||
'Download The PDF',
|
'Download The PDF',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(
|
||||||
|
context,
|
||||||
|
);
|
||||||
apiService
|
apiService
|
||||||
.getPdfDownload(
|
.getPdfDownload(
|
||||||
plan.planId,
|
plan.planId,
|
||||||
@ -1657,11 +1673,13 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'${plan.userName.isNotEmpty ? plan.userName : plan.travellerName} ${(plan.employeeCode) ?? ''}',
|
'${plan.userName.isNotEmpty ? plan.userName : plan.travellerName} (${plan.employeeCode ?? 'No Data'})',
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
color: Colors.black87,
|
color: Colors.black87,
|
||||||
),
|
),
|
||||||
|
// overflow: TextOverflow.ellipsis,
|
||||||
|
// maxLines: 2,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${_formatDate(plan.createdOn)}',
|
'${_formatDate(plan.createdOn)}',
|
||||||
|
|||||||
@ -492,74 +492,111 @@ class StatusDashboardState extends State<StatusDashboard> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Widget statusCard(String label, int count, bool isDesktop) {
|
||||||
|
// return SizedBox(
|
||||||
|
// width: isDesktop ? 120 : double.infinity,
|
||||||
|
// height: isDesktop ? 100 : 100, // fixed height for all cards
|
||||||
|
// child: Container(
|
||||||
|
// padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: const Color(0xFFEAF3FB),
|
||||||
|
// borderRadius: BorderRadius.circular(8),
|
||||||
|
// ),
|
||||||
|
// child: Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center, // vertically center everything
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// count.toString(),
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// fontSize: isDesktop ? 18 : 16,
|
||||||
|
// color: Colors.black87,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 6),
|
||||||
|
// Text(
|
||||||
|
// label,
|
||||||
|
// maxLines: 2,
|
||||||
|
// overflow: TextOverflow.ellipsis,
|
||||||
|
// softWrap: true,
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// style: GoogleFonts.poppins(
|
||||||
|
// fontSize: isDesktop ? 12 : 11,
|
||||||
|
// color: Colors.black87,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
Widget statusCard(String label, int count, bool isDesktop) {
|
Widget statusCard(String label, int count, bool isDesktop) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: isDesktop ? 120 : double.infinity,
|
width: isDesktop ? 120 : double.infinity,
|
||||||
height: isDesktop ? 100 : 100, // fixed height for all cards
|
height: isDesktop ? 100 : 60,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: isDesktop ? 10 : 18,
|
||||||
|
vertical: isDesktop ? 10 : 16,
|
||||||
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xFFEAF3FB),
|
color: const Color(0xFFEAF3FB),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: Column(
|
child:
|
||||||
mainAxisAlignment:
|
isDesktop
|
||||||
MainAxisAlignment.center, // vertically center everything
|
? Column(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
Text(
|
children: [
|
||||||
count.toString(),
|
Text(
|
||||||
style: GoogleFonts.poppins(
|
count.toString(),
|
||||||
fontSize: isDesktop ? 18 : 16,
|
style: GoogleFonts.poppins(
|
||||||
color: Colors.black87,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.bold,
|
color: Colors.black87,
|
||||||
),
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 6),
|
),
|
||||||
Text(
|
const SizedBox(height: 6),
|
||||||
label,
|
Text(
|
||||||
maxLines: 2,
|
label,
|
||||||
overflow: TextOverflow.ellipsis,
|
maxLines: 2,
|
||||||
softWrap: true,
|
overflow: TextOverflow.ellipsis,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: isDesktop ? 12 : 11,
|
fontSize: 12,
|
||||||
color: Colors.black87,
|
color: Colors.black87,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
)
|
||||||
|
: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
label,
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 12,
|
||||||
|
color: Colors.black87,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
Text(
|
||||||
|
count.toString(),
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 16,
|
||||||
|
color: Colors.black87,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget statusCardContainer(bool isDesktop, List<Widget> cards) {
|
|
||||||
return isDesktop
|
|
||||||
? Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children:
|
|
||||||
cards
|
|
||||||
.map(
|
|
||||||
(card) => Padding(
|
|
||||||
padding: const EdgeInsets.only(right: 12.0),
|
|
||||||
child: card,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList(),
|
|
||||||
)
|
|
||||||
: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children:
|
|
||||||
cards
|
|
||||||
.map(
|
|
||||||
(card) => Padding(
|
|
||||||
padding: const EdgeInsets.only(bottom: 12.0),
|
|
||||||
child: card,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget buildCategoryCard(
|
Widget buildCategoryCard(
|
||||||
String title,
|
String title,
|
||||||
IconData icon,
|
IconData icon,
|
||||||
@ -799,8 +836,8 @@ class StatusDashboardState extends State<StatusDashboard> {
|
|||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
// First Row: Toggle Buttons Row
|
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
// First Row: Toggle Buttons Row
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
MainAxisAlignment.end,
|
MainAxisAlignment.end,
|
||||||
|
|||||||
@ -1388,278 +1388,14 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
elevation: 3,
|
elevation: 3, // Control the strength of the shadow
|
||||||
|
// shadowColor: Colors.black54, // Softer shadow
|
||||||
|
// clipBehavior: Clip.antiAlias,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(12.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
// Status and Employee Code
|
|
||||||
// Row(
|
|
||||||
// mainAxisAlignment:
|
|
||||||
// MainAxisAlignment.spaceBetween,
|
|
||||||
// children: [
|
|
||||||
// GestureDetector(
|
|
||||||
// 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,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// // 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(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
// color: Colors.yellow.shade50,
|
// color: Colors.yellow.shade50,
|
||||||
@ -1683,10 +1419,7 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
: 'assets/images/IconsImg/International_new.png',
|
: 'assets/images/IconsImg/International_new.png',
|
||||||
// width: 65,
|
// width: 65,
|
||||||
height:
|
height:
|
||||||
plan.tripType ==
|
plan.tripType == 'Domestic' ? 28 : 30,
|
||||||
'Domestic'
|
|
||||||
? 28
|
|
||||||
: 30,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -1759,7 +1492,7 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
ApiService.viewPlan(
|
ApiService.viewPlan(
|
||||||
context,
|
context,
|
||||||
plan.planId,
|
plan.planId,
|
||||||
isViewMode: true,
|
isViewMode:true,
|
||||||
isMyTrips: true,
|
isMyTrips: true,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -1784,7 +1517,7 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
ApiService.viewPlan(
|
ApiService.viewPlan(
|
||||||
context,
|
context,
|
||||||
plan.planId,
|
plan.planId,
|
||||||
isViewMode: false,
|
isViewMode:false,
|
||||||
isMyTrips: true,
|
isMyTrips: true,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -1799,8 +1532,7 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
'Cancellation The Trip Details',
|
'Cancellation The Trip Details',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
deletePlan(plan.planId);
|
deletePlan(plan.planId);},
|
||||||
},
|
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@ -1815,10 +1547,7 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
'Download The PDF',
|
'Download The PDF',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
apiService
|
apiService.getPdfDownload(plan.planId,);
|
||||||
.getPdfDownload(
|
|
||||||
plan.planId,
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
@ -1834,17 +1563,10 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
'Trip Comments',
|
'Trip Comments',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context:context,
|
||||||
builder:
|
builder:(context) => CommentModalList(
|
||||||
(
|
planId:plan.planId.toString(),
|
||||||
context,
|
layoutColorForUser:layoutColor!,
|
||||||
) => CommentModalList(
|
|
||||||
// planId: plan.planId,
|
|
||||||
planId:
|
|
||||||
plan.planId
|
|
||||||
.toString(),
|
|
||||||
layoutColorForUser:
|
|
||||||
layoutColor!,
|
|
||||||
role: "User",
|
role: "User",
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -1873,9 +1595,6 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
// plan.userName.isNotEmpty
|
|
||||||
// ? plan.userName
|
|
||||||
// : '${plan.travellerName}',
|
|
||||||
'${plan.userName.isNotEmpty ? plan.userName : plan.travellerName} (${plan.employeeCode ?? 'No Data'})',
|
'${plan.userName.isNotEmpty ? plan.userName : plan.travellerName} (${plan.employeeCode ?? 'No Data'})',
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
// import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'dart:html' as html;
|
import 'dart:html' as html;
|
||||||
import 'package:frontend/config/apiUrl.dart'; // 1 newly added
|
import 'package:frontend/config/apiUrl.dart'; // 1 newly added
|
||||||
import 'package:frontend/services/apiService.dart';
|
import 'package:frontend/services/apiService.dart';
|
||||||
@ -34,8 +34,8 @@ class _MyAppState extends State<MyApp> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
// SemanticsBinding.instance
|
SemanticsBinding.instance
|
||||||
// .ensureSemantics(); // Safe here -only for testing uncomment, Otherwise Email Template wont allow to type
|
.ensureSemantics(); // Safe here -only for testing uncomment, Otherwise Email Template wont allow to type
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
final uri = Uri.parse(html.window.location.href);
|
final uri = Uri.parse(html.window.location.href);
|
||||||
print("URI - $uri");
|
print("URI - $uri");
|
||||||
|
|||||||
@ -1,19 +1,35 @@
|
|||||||
//api url
|
//api url
|
||||||
// const String apiUrl = 'http://localhost/tstat_be';
|
|
||||||
// const String apiUrl = 'https://uat.tripapprovaltool.com/tstat_be';
|
/** Note : TSTAT TEST BE URL
|
||||||
|
* incase "adfactor" or "aujas" href means changed to "tstat"
|
||||||
|
* File : web/index.html - change below
|
||||||
|
* <base href="/adfactor/"> (or) <base href="/adfactor/"> replaced to <base href="/tstat/">
|
||||||
|
* Check File : App.dart -> line 37 need to uncomment it "SemanticsBinding" **/
|
||||||
const String apiUrl = 'https://apitest.tripapprovaltool.com/tstat_be';
|
const String apiUrl = 'https://apitest.tripapprovaltool.com/tstat_be';
|
||||||
|
|
||||||
/** Note : Adfactor UAT BE URL
|
/** Note : TSTAT UAT BE URL
|
||||||
|
* incase "adfactor" or "aujas" href means changed to "tstat"
|
||||||
* File : web/index.html - change below
|
* File : web/index.html - change below
|
||||||
* <base href="/tstat/"> replaced to <base href="/adfactor/"> **/
|
* <base href="/adfactor/"> (or) <base href="/adfactor/"> replaced to <base href="/tstat/">
|
||||||
|
* Check File : App.dart -> line 37 need to comment it "SemanticsBinding" **/
|
||||||
|
// const String apiUrl = 'https://uat.tripapprovaltool.com/tstat_be';
|
||||||
|
|
||||||
|
/** Note : Adfactor UAT BE URL
|
||||||
|
* incase "aujas" or "tstat" href means changed to "adfactor"
|
||||||
|
* File : web/index.html - change below
|
||||||
|
* <base href="/aujas/"> (or)<base href="/tstat/"> replaced to <base href="/adfactor/">
|
||||||
|
* Check File : App.dart -> line 37 need to comment it "SemanticsBinding" **/
|
||||||
// const String apiUrl = 'https://uat.tripapprovaltool.com/adfactor_be';
|
// const String apiUrl = 'https://uat.tripapprovaltool.com/adfactor_be';
|
||||||
|
|
||||||
/** Note : Aujas UAT BE URL
|
/** Note : Aujas UAT BE URL
|
||||||
|
* incase "tstat" or "adfactor" href means changed to "aujas"
|
||||||
* File : web/index.html - change below
|
* File : web/index.html - change below
|
||||||
* <base href="/tstat/"> replaced to <base href="/aujas/"> **/
|
* <base href="/tstat/"> (or) <base href="/adfactor/"> replaced to <base href="/aujas/">
|
||||||
|
* Check File : App.dart -> line 37 need to comment it "SemanticsBinding" **/
|
||||||
// const String apiUrl = 'https://uat.tripapprovaltool.com/aujas_be';
|
// const String apiUrl = 'https://uat.tripapprovaltool.com/aujas_be';
|
||||||
|
|
||||||
/** Note : Aujas Live BE URL
|
/** Note : Aujas Live BE URL
|
||||||
|
* incase "tstat" or "adfactor" href means changed to "aujas"
|
||||||
* File : web/index.html - change below
|
* File : web/index.html - change below
|
||||||
* <base href="/tstat/"> replaced to <base href="/aujas/"> **/
|
* <base href="/tstat/"> (or) <base href="/adfactor/"> replaced to <base href="/aujas/"> **/
|
||||||
// const String apiUrl = 'https://tripapprovaltool.com/aujas_be' ;
|
// const String apiUrl = 'https://tripapprovaltool.com/aujas_be' ;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user