FOREX DWNLD
This commit is contained in:
parent
a32fb0d0c3
commit
b24215272f
@ -540,23 +540,29 @@ class _ListAllPlansState extends State<ListAllPlans> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Padding(
|
||||||
children: [
|
padding:
|
||||||
Text(
|
isDesktop
|
||||||
'All Trips',
|
? const EdgeInsets.all(0)
|
||||||
style: GoogleFonts.poppins(
|
: const EdgeInsets.only(left: 14.0),
|
||||||
fontSize: isDesktop ? 16 : 14,
|
child: Row(
|
||||||
fontWeight: FontWeight.w600,
|
children: [
|
||||||
color: Colors.black,
|
Text(
|
||||||
),
|
'All Trips',
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: isDesktop ? 16 : 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
|
||||||
// style: TextStyle(
|
// style: TextStyle(
|
||||||
// fontFamily: "Inter",
|
// fontFamily: "Inter",
|
||||||
// fontSize: isDesktop ? 16 : 14,
|
// fontSize: isDesktop ? 16 : 14,
|
||||||
// fontWeight: FontWeight.w600,
|
// fontWeight: FontWeight.w600,
|
||||||
// color: const Color(0xFF212121) )
|
// color: const Color(0xFF212121) )
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(width: 1),
|
SizedBox(width: 1),
|
||||||
@ -1153,7 +1159,7 @@ class _ListAllPlansState extends State<ListAllPlans> {
|
|||||||
context,
|
context,
|
||||||
);
|
);
|
||||||
apiService
|
apiService
|
||||||
.getPdfDownload(
|
.getForexPdfDownload(
|
||||||
plan.forexId,
|
plan.forexId,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -1445,7 +1451,7 @@ class _ListAllPlansState extends State<ListAllPlans> {
|
|||||||
context,
|
context,
|
||||||
);
|
);
|
||||||
apiService
|
apiService
|
||||||
.getPdfDownload(
|
.getForexPdfDownload(
|
||||||
plan.forexId,
|
plan.forexId,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -395,22 +395,28 @@ class _TravelAgentListPlansState extends State<TravelAgentListPlans> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Padding(
|
||||||
children: [
|
padding:
|
||||||
Text(
|
isDesktop
|
||||||
'Trips',
|
? const EdgeInsets.all(0)
|
||||||
style: GoogleFonts.poppins(
|
: const EdgeInsets.only(left: 14.0),
|
||||||
fontSize: isDesktop ? 16 : 14,
|
child: Row(
|
||||||
fontWeight: FontWeight.w600,
|
children: [
|
||||||
color: Colors.black,
|
Text(
|
||||||
|
'Trips',
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: isDesktop ? 16 : 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontFamily: "Inter",
|
||||||
|
// fontSize: isDesktop ? 16 : 14,
|
||||||
|
// fontWeight: FontWeight.w600,
|
||||||
|
// color: Color(0xFF212121))
|
||||||
),
|
),
|
||||||
// style: TextStyle(
|
],
|
||||||
// fontFamily: "Inter",
|
),
|
||||||
// fontSize: isDesktop ? 16 : 14,
|
|
||||||
// fontWeight: FontWeight.w600,
|
|
||||||
// color: Color(0xFF212121))
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
|
||||||
Spacer(),
|
Spacer(),
|
||||||
@ -455,7 +461,7 @@ class _TravelAgentListPlansState extends State<TravelAgentListPlans> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
// SizedBox(width: 16),
|
// SizedBox(width: 16),
|
||||||
Spacer(),
|
// Spacer(),
|
||||||
// ElevatedButton(
|
// ElevatedButton(
|
||||||
// style: ElevatedButton.styleFrom(
|
// style: ElevatedButton.styleFrom(
|
||||||
// foregroundColor: Colors.white,
|
// foregroundColor: Colors.white,
|
||||||
@ -905,7 +911,7 @@ class _TravelAgentListPlansState extends State<TravelAgentListPlans> {
|
|||||||
context,
|
context,
|
||||||
);
|
);
|
||||||
apiService
|
apiService
|
||||||
.getPdfDownload(
|
.getForexPdfDownload(
|
||||||
plan.forexId,
|
plan.forexId,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -755,22 +755,28 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
// ),
|
// ),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Padding(
|
||||||
children: [
|
padding:
|
||||||
Text(
|
isDesktop
|
||||||
'My Approvals',
|
? const EdgeInsets.all(0)
|
||||||
style: GoogleFonts.poppins(
|
: const EdgeInsets.only(left: 14.0),
|
||||||
fontSize: isDesktop ? 16 : 14,
|
child: Row(
|
||||||
fontWeight: FontWeight.w600,
|
children: [
|
||||||
color: Colors.black,
|
Text(
|
||||||
|
'My Approvals',
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: isDesktop ? 16 : 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontFamily: "Inter",
|
||||||
|
// fontSize: isDesktop ? 16 : 14,
|
||||||
|
// fontWeight: FontWeight.w600,
|
||||||
|
// )
|
||||||
),
|
),
|
||||||
// style: TextStyle(
|
],
|
||||||
// fontFamily: "Inter",
|
),
|
||||||
// fontSize: isDesktop ? 16 : 14,
|
|
||||||
// fontWeight: FontWeight.w600,
|
|
||||||
// )
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
if (isDesktop)
|
if (isDesktop)
|
||||||
SizedBox(width: MediaQuery.of(context).size.width * 0.23),
|
SizedBox(width: MediaQuery.of(context).size.width * 0.23),
|
||||||
@ -1356,7 +1362,7 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
context,
|
context,
|
||||||
);
|
);
|
||||||
apiService
|
apiService
|
||||||
.getPdfDownload(
|
.getForexPdfDownload(
|
||||||
plan.forexId,
|
plan.forexId,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -1665,7 +1671,7 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
context,
|
context,
|
||||||
);
|
);
|
||||||
apiService
|
apiService
|
||||||
.getPdfDownload(
|
.getForexPdfDownload(
|
||||||
plan.forexId,
|
plan.forexId,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -480,10 +480,10 @@ class StatusDashboardState extends State<StatusDashboard> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
label,
|
label,
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 10,
|
fontSize: 12,
|
||||||
color: color,
|
color: color,
|
||||||
// color: const Color(0xFFEAF3FB),
|
// color: const Color(0xFFEAF3FB),
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1530,7 +1530,8 @@ class _ForexScreenState extends State<ForexScreen> {
|
|||||||
else
|
else
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment:
|
||||||
|
isDesktop ? CrossAxisAlignment.center : CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Currency *",
|
"Currency *",
|
||||||
@ -1552,19 +1553,24 @@ class _ForexScreenState extends State<ForexScreen> {
|
|||||||
height: 40,
|
height: 40,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Center(
|
child:
|
||||||
child: Text(
|
isDesktop
|
||||||
// "cur",
|
? Center(child: currencyText())
|
||||||
// "${selectedCurrency}",
|
: Container(child: currencyText()),
|
||||||
selectedCurrency ?? "Currency",
|
// child: Center
|
||||||
// selectedCurrency?.isNotEmpty == true ? selectedCurrency! : "Currency",
|
// (
|
||||||
style: const TextStyle(
|
// child: Text(
|
||||||
fontSize: 12,
|
// // "cur",
|
||||||
fontWeight: FontWeight.w600,
|
// // "${selectedCurrency}",
|
||||||
color: Color(0xFF575A74),
|
// selectedCurrency ?? "Currency",
|
||||||
),
|
// // selectedCurrency?.isNotEmpty == true ? selectedCurrency! : "Currency",
|
||||||
),
|
// style: const TextStyle(
|
||||||
),
|
// fontSize: 12,
|
||||||
|
// fontWeight: FontWeight.w600,
|
||||||
|
// color: Color(0xFF575A74),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -1632,6 +1638,14 @@ class _ForexScreenState extends State<ForexScreen> {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget currencyText() => Text(
|
||||||
|
selectedCurrency ?? "Currency",
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Color(0xFF575A74),
|
||||||
|
),
|
||||||
|
);
|
||||||
List<Widget> _buildSecondRow(bool isDesktop) {
|
List<Widget> _buildSecondRow(bool isDesktop) {
|
||||||
return [
|
return [
|
||||||
if (isDesktop) Spacer(),
|
if (isDesktop) Spacer(),
|
||||||
@ -2344,7 +2358,8 @@ class _ForexScreenState extends State<ForexScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: isDesktop ? MainAxisAlignment.center : MainAxisAlignment.start,
|
mainAxisAlignment:
|
||||||
|
isDesktop ? MainAxisAlignment.center : MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
alignment: Alignment.bottomLeft,
|
alignment: Alignment.bottomLeft,
|
||||||
|
|||||||
@ -313,7 +313,7 @@ class _AccomodationListWidgetState extends State<AccomodationListWidget> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item["hotel_name"]!,
|
item["hotel_name"]!,
|
||||||
@ -388,6 +388,7 @@ class _AccomodationListWidgetState extends State<AccomodationListWidget> {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: SizedBox.shrink(),
|
: SizedBox.shrink(),
|
||||||
|
SizedBox(height: 8),
|
||||||
isDesktop
|
isDesktop
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
@ -640,29 +641,29 @@ class _AccomodationListWidgetState extends State<AccomodationListWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 5),
|
SizedBox(width: 5),
|
||||||
Expanded(child: Text(value, style: TextStyle(fontSize: 12))),
|
// Expanded(child: Text(value, style: TextStyle(fontSize: 12))),
|
||||||
// Expanded(
|
Expanded(
|
||||||
// child:
|
child:
|
||||||
// exceedsLimit
|
exceedsLimit
|
||||||
// ? Tooltip(
|
? Tooltip(
|
||||||
// message: wrapText(value, 50),
|
message: wrapText(value, 50),
|
||||||
// decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// color: Colors.grey.shade200, // Black background
|
color: Colors.grey.shade200, // Black background
|
||||||
// borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
// ),
|
),
|
||||||
// textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
// color: Colors.black,
|
color: Colors.black,
|
||||||
// ), // Tooltip text color
|
), // Tooltip text color
|
||||||
// padding: EdgeInsets.all(8),
|
padding: EdgeInsets.all(8),
|
||||||
// preferBelow: false,
|
preferBelow: false,
|
||||||
// child: Text(
|
child: Text(
|
||||||
// value.substring(0, limit) + "...",
|
value.substring(0, limit) + "...",
|
||||||
// style: TextStyle(fontSize: 12),
|
style: TextStyle(fontSize: 12),
|
||||||
// overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
// ),
|
),
|
||||||
// )
|
)
|
||||||
// : Text(value, style: TextStyle(fontSize: 12)),
|
: Text(value, style: TextStyle(fontSize: 12)),
|
||||||
// ),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -363,7 +363,7 @@ class _BusListWidgetState extends State<BusListWidget> {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: SizedBox.shrink(),
|
: SizedBox.shrink(),
|
||||||
SizedBox(height: 4),
|
SizedBox(height: 8),
|
||||||
isDesktop
|
isDesktop
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -319,7 +319,7 @@ class _ForexListWidgetState extends State<ForexListWidget> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
getRequestForCountry(item["country_code"]!.toString()),
|
getRequestForCountry(item["country_code"]!.toString()),
|
||||||
@ -344,19 +344,20 @@ class _ForexListWidgetState extends State<ForexListWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// SizedBox(width: 10),
|
SizedBox(width: 10),
|
||||||
// GestureDetector(
|
GestureDetector(
|
||||||
// onTap: () => onDeleteForex(item),
|
onTap: () => widget.onDeleteForex(item),
|
||||||
// child: Tooltip(
|
child: Tooltip(
|
||||||
// message: 'Delete Forex Details',
|
message: 'Delete Forex Details',
|
||||||
// child: Image.asset(
|
child: Image.asset(
|
||||||
// 'assets/images/IconsImg/delete.png',
|
'assets/images/IconsImg/delete.png',
|
||||||
// width: 20,
|
width: 20,
|
||||||
// height: 15,
|
height: 15,
|
||||||
// color: Colors.red,
|
color: Colors.red,
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
|
SizedBox(width: 10),
|
||||||
item['forex_id'] != null
|
item['forex_id'] != null
|
||||||
? IconButton(
|
? IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@ -457,6 +458,7 @@ class _ForexListWidgetState extends State<ForexListWidget> {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: SizedBox.shrink(),
|
: SizedBox.shrink(),
|
||||||
|
SizedBox(height: 8),
|
||||||
isDesktop
|
isDesktop
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -324,6 +324,7 @@ class _InsuranceListWidgetState extends State<InsuranceListWidget> {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: SizedBox.shrink(),
|
: SizedBox.shrink(),
|
||||||
|
SizedBox(height: 8),
|
||||||
isDesktop
|
isDesktop
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -273,7 +273,7 @@ class _MiscellaneousListWidgetState extends State<MiscellaneousListWidget> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Divider(color: Colors.blueGrey.shade50),
|
// Divider(color: Colors.blueGrey.shade50),
|
||||||
// SizedBox(height: 4),
|
SizedBox(height: 4),
|
||||||
isDesktop
|
isDesktop
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
@ -294,6 +294,7 @@ class _MiscellaneousListWidgetState extends State<MiscellaneousListWidget> {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: SizedBox.shrink(),
|
: SizedBox.shrink(),
|
||||||
|
SizedBox(height: 8),
|
||||||
isDesktop
|
isDesktop
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -378,7 +378,8 @@ class _TaxiListWidgetState extends State<TaxiListWidget> {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: SizedBox.shrink(),
|
: SizedBox.shrink(),
|
||||||
SizedBox(height: 4),
|
SizedBox(height: 8),
|
||||||
|
|
||||||
isDesktop
|
isDesktop
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -450,7 +450,7 @@ class _TrainListWidgetState extends State<TrainListWidget> {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: SizedBox.shrink(),
|
: SizedBox.shrink(),
|
||||||
SizedBox(height: 4),
|
SizedBox(height: 8),
|
||||||
isDesktop
|
isDesktop
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -427,6 +427,7 @@ class _VisaListWidgetState extends State<VisaListWidget> {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: SizedBox.shrink(),
|
: SizedBox.shrink(),
|
||||||
|
SizedBox(height: 8),
|
||||||
isDesktop
|
isDesktop
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -58,6 +58,21 @@ class _ColorThemePickerWidgetState extends State<ColorThemePickerWidget> {
|
|||||||
];
|
];
|
||||||
|
|
||||||
final List<Color> layoutTertiaryColors = [
|
final List<Color> layoutTertiaryColors = [
|
||||||
|
Color(0xFFE5EFFF), // Very Light Blue
|
||||||
|
Color(0xFFE6FDFF), // Very Light Teal
|
||||||
|
Color(0xFFE8FDEF), // Mint Green
|
||||||
|
Color(0xFFFFE7E6), // Light Coral/Red
|
||||||
|
Color(0xFFFDE9E7), // Peach
|
||||||
|
Color(0xFFFFF5E5), // Lightest Orange
|
||||||
|
Color(0xFFECEEF8), // Very Light Rose
|
||||||
|
Color(0xFFE5FFFC), // Pastel Pink
|
||||||
|
Color(0xFFFEE6F3), // Light Lavender
|
||||||
|
Color(0xFFF9EBF3), // Soft Purple Grey
|
||||||
|
Color(0xFFF8EAFA), // Near-white Neutral
|
||||||
|
Color(0xFFF4EDF7), // Near-white Neutral
|
||||||
|
];
|
||||||
|
|
||||||
|
final List<Color> layoutTertiaryColors1 = [
|
||||||
Color(0xFFE3F2FD), // Very Light Blue
|
Color(0xFFE3F2FD), // Very Light Blue
|
||||||
Color(0xFFE0F7FA), // Very Light Teal
|
Color(0xFFE0F7FA), // Very Light Teal
|
||||||
Color(0xFFC8E6C9), // Mint Green
|
Color(0xFFC8E6C9), // Mint Green
|
||||||
@ -67,7 +82,7 @@ class _ColorThemePickerWidgetState extends State<ColorThemePickerWidget> {
|
|||||||
Color(0xFFFFEBEE), // Very Light Rose
|
Color(0xFFFFEBEE), // Very Light Rose
|
||||||
Color(0xFFFCE4EC), // Pastel Pink
|
Color(0xFFFCE4EC), // Pastel Pink
|
||||||
Color(0xFFF3E5F5), // Light Lavender
|
Color(0xFFF3E5F5), // Light Lavender
|
||||||
Color(0xFFEDE7F6), // Soft Purple Grey
|
Color(0xFFF9EBF3), // Soft Purple Grey
|
||||||
Color(0xFFF8F9FA), // Near-white Neutral
|
Color(0xFFF8F9FA), // Near-white Neutral
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -446,6 +446,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
|
|||||||
String? _selectedIsBillable;
|
String? _selectedIsBillable;
|
||||||
String? selectedFuncDept;
|
String? selectedFuncDept;
|
||||||
String? selectedPurpose;
|
String? selectedPurpose;
|
||||||
|
bool hasUpdateVal = false;
|
||||||
|
|
||||||
Map<String, String?> validationErrors = {};
|
Map<String, String?> validationErrors = {};
|
||||||
|
|
||||||
@ -563,6 +564,10 @@ class CreateNewPlansState extends State<CreateNewPlan> {
|
|||||||
loadInitialData();
|
loadInitialData();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// if (widget.selectedPlanData != null) {
|
||||||
|
// hasUpdateVal = true;
|
||||||
|
// }
|
||||||
|
|
||||||
if (widget.approverStatus == "Approval pending") {
|
if (widget.approverStatus == "Approval pending") {
|
||||||
print("Status approver - Approval Pending");
|
print("Status approver - Approval Pending");
|
||||||
}
|
}
|
||||||
@ -657,6 +662,8 @@ class CreateNewPlansState extends State<CreateNewPlan> {
|
|||||||
planTravlrId = travellerId;
|
planTravlrId = travellerId;
|
||||||
_selectedOption = "Option 3";
|
_selectedOption = "Option 3";
|
||||||
otherUserName = travellerName;
|
otherUserName = travellerName;
|
||||||
|
|
||||||
|
hasUpdateVal = true;
|
||||||
} else if (userId.isNotEmpty && userId != "0") {
|
} else if (userId.isNotEmpty && userId != "0") {
|
||||||
print("TestplanUsrId : $userId");
|
print("TestplanUsrId : $userId");
|
||||||
print("TestplanUsrIdSelf : $selfId");
|
print("TestplanUsrIdSelf : $selfId");
|
||||||
@ -664,6 +671,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
|
|||||||
print("TestplanUsrId2 : $planUsrId");
|
print("TestplanUsrId2 : $planUsrId");
|
||||||
_selectedOption = (selfId != userId) ? "Option 2" : "Option 1";
|
_selectedOption = (selfId != userId) ? "Option 2" : "Option 1";
|
||||||
otherUserName = userName;
|
otherUserName = userName;
|
||||||
|
hasUpdateVal = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2039,6 +2047,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
enabled: !hasUpdateVal,
|
||||||
popupProps: PopupProps.menu(
|
popupProps: PopupProps.menu(
|
||||||
showSearchBox: false, // Optionally enable search
|
showSearchBox: false, // Optionally enable search
|
||||||
fit: FlexFit.loose,
|
fit: FlexFit.loose,
|
||||||
@ -3172,6 +3181,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
|
|||||||
{"title": "Others (Non Employee)", "value": "Option 3"},
|
{"title": "Others (Non Employee)", "value": "Option 3"},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
print("isViewModeYY: ${widget.isViewMode}, hasUpdateVal: $hasUpdateVal");
|
||||||
return [
|
return [
|
||||||
CustomTextFieldWrapper(
|
CustomTextFieldWrapper(
|
||||||
// isFocused: focusStates["trip_plannedFocused"] ?? false,
|
// isFocused: focusStates["trip_plannedFocused"] ?? false,
|
||||||
@ -3198,12 +3208,14 @@ class CreateNewPlansState extends State<CreateNewPlan> {
|
|||||||
// Request focus when user taps
|
// Request focus when user taps
|
||||||
focusNodes["trip_plannedFocusNode"]?.requestFocus();
|
focusNodes["trip_plannedFocusNode"]?.requestFocus();
|
||||||
},
|
},
|
||||||
|
|
||||||
child: DropdownSearch<String>(
|
child: DropdownSearch<String>(
|
||||||
selectedItem:
|
selectedItem:
|
||||||
options.firstWhere(
|
options.firstWhere(
|
||||||
(opt) => opt['value'] == _selectedOption,
|
(opt) => opt['value'] == _selectedOption,
|
||||||
)['title'],
|
)['title'],
|
||||||
enabled: !widget.isViewMode,
|
enabled: !hasUpdateVal,
|
||||||
|
// enabled: || !hasUpdateVal,
|
||||||
items: options.map((opt) => opt['title']!).toList(),
|
items: options.map((opt) => opt['title']!).toList(),
|
||||||
popupProps: PopupProps.menu(
|
popupProps: PopupProps.menu(
|
||||||
showSearchBox: false,
|
showSearchBox: false,
|
||||||
|
|||||||
@ -679,165 +679,171 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
// thickness: 0.2, // how "thick" the line is
|
// thickness: 0.2, // how "thick" the line is
|
||||||
// color: Colors.grey, // optional
|
// color: Colors.grey, // optional
|
||||||
// ),
|
// ),
|
||||||
Row(
|
Padding(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
padding:
|
||||||
children: [
|
isDesktop
|
||||||
Row(
|
? const EdgeInsets.all(8.0)
|
||||||
children: [
|
: const EdgeInsets.symmetric(horizontal: 14.0),
|
||||||
Text(
|
child: Row(
|
||||||
'My Trips',
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
style: GoogleFonts.poppins(
|
children: [
|
||||||
fontSize: isDesktop ? 16 : 14,
|
Row(
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontFamily: "Inter",
|
|
||||||
// fontSize: isDesktop ? 16 : 14,
|
|
||||||
// fontWeight: FontWeight.w600,
|
|
||||||
// color: Color(0xFF212121))
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
// Spacer(),
|
|
||||||
SizedBox(width: MediaQuery.of(context).size.width * 0.23),
|
|
||||||
if (isDesktop)
|
|
||||||
Container(
|
|
||||||
width: MediaQuery.of(context).size.width * 0.2,
|
|
||||||
height: 40,
|
|
||||||
child: TextField(
|
|
||||||
controller: searchController,
|
|
||||||
onChanged: filterPlans,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
hintText: "Search...",
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
color: Color(0xFF9E9DBD),
|
|
||||||
),
|
|
||||||
prefixIcon: Icon(
|
|
||||||
Icons.search,
|
|
||||||
color: Color(0xFF9E9DBD),
|
|
||||||
size: 18,
|
|
||||||
),
|
|
||||||
border: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Colors.grey.shade200,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: Colors.grey.shade300,
|
|
||||||
width: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: GoogleFonts.poppins(fontSize: 12),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
// SizedBox(width: 16),
|
|
||||||
if (isDesktop) Spacer(),
|
|
||||||
|
|
||||||
// ElevatedButton(
|
|
||||||
// style: ElevatedButton.styleFrom(
|
|
||||||
// foregroundColor: Colors.white,
|
|
||||||
// backgroundColor: Colors.blueAccent,
|
|
||||||
// ),
|
|
||||||
// onPressed: () {
|
|
||||||
// context.go('/createPlan', extra: {
|
|
||||||
// 'orgId': orgId,
|
|
||||||
// });
|
|
||||||
// if (!isDesktop) Navigator.pop(context);
|
|
||||||
// },
|
|
||||||
// child: Row(
|
|
||||||
// children: [
|
|
||||||
// Icon(Icons.add_circle, color: Colors.white),
|
|
||||||
// SizedBox(width: 5),
|
|
||||||
// Text('NewPlan'),
|
|
||||||
//
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
ElevatedButton(
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
backgroundColor: Color(0xFF114D8B),
|
|
||||||
foregroundColor: Colors.white,
|
|
||||||
disabledBackgroundColor: Color(0xFF114D8B),
|
|
||||||
disabledForegroundColor: Colors.white,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
side: BorderSide(color: Color(0xFF114D8B), width: 2),
|
|
||||||
),
|
|
||||||
padding:
|
|
||||||
isDesktop
|
|
||||||
? EdgeInsets.symmetric(
|
|
||||||
horizontal: 20,
|
|
||||||
vertical: 12,
|
|
||||||
)
|
|
||||||
: EdgeInsets.symmetric(
|
|
||||||
horizontal: 15,
|
|
||||||
vertical: 10,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
if (TripPlanAction == "Plan Creation Not Allowed") {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder:
|
|
||||||
(context) => AlertDialog(
|
|
||||||
title: Text(
|
|
||||||
"Action Not Allowed",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
content: Text(
|
|
||||||
"Plan Creation Not Allowed For This User.",
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
TextButton(
|
|
||||||
onPressed: () => Navigator.pop(context),
|
|
||||||
child: Text(
|
|
||||||
"OK",
|
|
||||||
style: TextStyle(color: layoutColor),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
context.go('/createPlan', extra: {'orgId': orgId});
|
|
||||||
if (!isDesktop) Navigator.pop(context);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize:
|
|
||||||
MainAxisSize.min, // Ensures content fits nicely
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Add New Trip",
|
'My Trips',
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: isDesktop ? 13 : 11,
|
fontSize: isDesktop ? 16 : 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
),
|
// style: TextStyle(
|
||||||
SizedBox(width: 8), // spacing between icon and text
|
// fontFamily: "Inter",
|
||||||
Icon(
|
// fontSize: isDesktop ? 16 : 14,
|
||||||
Icons.add_circle_outline_rounded,
|
// fontWeight: FontWeight.w600,
|
||||||
size: 15,
|
// color: Color(0xFF212121))
|
||||||
color: Colors.white,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
// Spacer(),
|
||||||
|
SizedBox(width: MediaQuery.of(context).size.width * 0.23),
|
||||||
|
if (isDesktop)
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.2,
|
||||||
|
height: 40,
|
||||||
|
child: TextField(
|
||||||
|
controller: searchController,
|
||||||
|
onChanged: filterPlans,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: "Search...",
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color: Color(0xFF9E9DBD),
|
||||||
|
),
|
||||||
|
prefixIcon: Icon(
|
||||||
|
Icons.search,
|
||||||
|
color: Color(0xFF9E9DBD),
|
||||||
|
size: 18,
|
||||||
|
),
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Colors.grey.shade200,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: Colors.grey.shade300,
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: GoogleFonts.poppins(fontSize: 12),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// SizedBox(width: 16),
|
||||||
|
if (isDesktop) Spacer(),
|
||||||
|
|
||||||
|
// ElevatedButton(
|
||||||
|
// style: ElevatedButton.styleFrom(
|
||||||
|
// foregroundColor: Colors.white,
|
||||||
|
// backgroundColor: Colors.blueAccent,
|
||||||
|
// ),
|
||||||
|
// onPressed: () {
|
||||||
|
// context.go('/createPlan', extra: {
|
||||||
|
// 'orgId': orgId,
|
||||||
|
// });
|
||||||
|
// if (!isDesktop) Navigator.pop(context);
|
||||||
|
// },
|
||||||
|
// child: Row(
|
||||||
|
// children: [
|
||||||
|
// Icon(Icons.add_circle, color: Colors.white),
|
||||||
|
// SizedBox(width: 5),
|
||||||
|
// Text('NewPlan'),
|
||||||
|
//
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
ElevatedButton(
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: Color(0xFF114D8B),
|
||||||
|
foregroundColor: Colors.white,
|
||||||
|
disabledBackgroundColor: Color(0xFF114D8B),
|
||||||
|
disabledForegroundColor: Colors.white,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
side: BorderSide(color: Color(0xFF114D8B), width: 2),
|
||||||
|
),
|
||||||
|
padding:
|
||||||
|
isDesktop
|
||||||
|
? EdgeInsets.symmetric(
|
||||||
|
horizontal: 20,
|
||||||
|
vertical: 12,
|
||||||
|
)
|
||||||
|
: EdgeInsets.symmetric(
|
||||||
|
horizontal: 15,
|
||||||
|
vertical: 10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
if (TripPlanAction == "Plan Creation Not Allowed") {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder:
|
||||||
|
(context) => AlertDialog(
|
||||||
|
title: Text(
|
||||||
|
"Action Not Allowed",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
content: Text(
|
||||||
|
"Plan Creation Not Allowed For This User.",
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
child: Text(
|
||||||
|
"OK",
|
||||||
|
style: TextStyle(color: layoutColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
context.go('/createPlan', extra: {'orgId': orgId});
|
||||||
|
if (!isDesktop) Navigator.pop(context);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize:
|
||||||
|
MainAxisSize.min, // Ensures content fits nicely
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Add New Trip",
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: isDesktop ? 13 : 11,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 8), // spacing between icon and text
|
||||||
|
Icon(
|
||||||
|
Icons.add_circle_outline_rounded,
|
||||||
|
size: 15,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
if (!isDesktop) const SizedBox(height: 10),
|
if (!isDesktop) const SizedBox(height: 10),
|
||||||
if (!isDesktop)
|
if (!isDesktop)
|
||||||
@ -1316,7 +1322,7 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
context,
|
context,
|
||||||
);
|
);
|
||||||
apiService
|
apiService
|
||||||
.getPdfDownload(
|
.getForexPdfDownload(
|
||||||
plan.forexId,
|
plan.forexId,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -1633,7 +1639,7 @@ class _ListPlansState extends State<ListPlans> {
|
|||||||
context,
|
context,
|
||||||
);
|
);
|
||||||
apiService
|
apiService
|
||||||
.getPdfDownload(
|
.getForexPdfDownload(
|
||||||
plan.forexId,
|
plan.forexId,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user