FOREX DWNLD

This commit is contained in:
venbaittech 2025-08-01 16:48:08 +05:30
parent a32fb0d0c3
commit b24215272f
18 changed files with 2047 additions and 1657 deletions

View File

@ -540,23 +540,29 @@ class _ListAllPlansState extends State<ListAllPlans> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Text(
'All Trips',
style: GoogleFonts.poppins(
fontSize: isDesktop ? 16 : 14,
fontWeight: FontWeight.w600,
color: Colors.black,
),
Padding(
padding:
isDesktop
? const EdgeInsets.all(0)
: const EdgeInsets.only(left: 14.0),
child: Row(
children: [
Text(
'All 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: const Color(0xFF212121) )
),
],
// style: TextStyle(
// fontFamily: "Inter",
// fontSize: isDesktop ? 16 : 14,
// fontWeight: FontWeight.w600,
// color: const Color(0xFF212121) )
),
],
),
),
SizedBox(width: 1),
@ -1153,7 +1159,7 @@ class _ListAllPlansState extends State<ListAllPlans> {
context,
);
apiService
.getPdfDownload(
.getForexPdfDownload(
plan.forexId,
);
},
@ -1445,7 +1451,7 @@ class _ListAllPlansState extends State<ListAllPlans> {
context,
);
apiService
.getPdfDownload(
.getForexPdfDownload(
plan.forexId,
);
},

View File

@ -395,22 +395,28 @@ class _TravelAgentListPlansState extends State<TravelAgentListPlans> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Text(
'Trips',
style: GoogleFonts.poppins(
fontSize: isDesktop ? 16 : 14,
fontWeight: FontWeight.w600,
color: Colors.black,
Padding(
padding:
isDesktop
? const EdgeInsets.all(0)
: const EdgeInsets.only(left: 14.0),
child: Row(
children: [
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(),
@ -455,7 +461,7 @@ class _TravelAgentListPlansState extends State<TravelAgentListPlans> {
),
// SizedBox(width: 16),
Spacer(),
// Spacer(),
// ElevatedButton(
// style: ElevatedButton.styleFrom(
// foregroundColor: Colors.white,
@ -905,7 +911,7 @@ class _TravelAgentListPlansState extends State<TravelAgentListPlans> {
context,
);
apiService
.getPdfDownload(
.getForexPdfDownload(
plan.forexId,
);
},

View File

@ -755,22 +755,28 @@ class _ApprovalListState extends State<ApprovalList> {
// ),
Row(
children: [
Row(
children: [
Text(
'My Approvals',
style: GoogleFonts.poppins(
fontSize: isDesktop ? 16 : 14,
fontWeight: FontWeight.w600,
color: Colors.black,
Padding(
padding:
isDesktop
? const EdgeInsets.all(0)
: const EdgeInsets.only(left: 14.0),
child: Row(
children: [
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)
SizedBox(width: MediaQuery.of(context).size.width * 0.23),
@ -1356,7 +1362,7 @@ class _ApprovalListState extends State<ApprovalList> {
context,
);
apiService
.getPdfDownload(
.getForexPdfDownload(
plan.forexId,
);
},
@ -1665,7 +1671,7 @@ class _ApprovalListState extends State<ApprovalList> {
context,
);
apiService
.getPdfDownload(
.getForexPdfDownload(
plan.forexId,
);
},

View File

@ -480,10 +480,10 @@ class StatusDashboardState extends State<StatusDashboard> {
child: Text(
label,
style: GoogleFonts.poppins(
fontSize: 10,
fontSize: 12,
color: color,
// color: const Color(0xFFEAF3FB),
fontWeight: FontWeight.w700,
fontWeight: FontWeight.w500,
),
),
),

View File

@ -1530,7 +1530,8 @@ class _ForexScreenState extends State<ForexScreen> {
else
SizedBox(height: 8),
Column(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
isDesktop ? CrossAxisAlignment.center : CrossAxisAlignment.start,
children: [
Text(
"Currency *",
@ -1552,19 +1553,24 @@ class _ForexScreenState extends State<ForexScreen> {
height: 40,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Text(
// "cur",
// "${selectedCurrency}",
selectedCurrency ?? "Currency",
// selectedCurrency?.isNotEmpty == true ? selectedCurrency! : "Currency",
style: const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74),
),
),
),
child:
isDesktop
? Center(child: currencyText())
: Container(child: currencyText()),
// child: Center
// (
// child: Text(
// // "cur",
// // "${selectedCurrency}",
// 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) {
return [
if (isDesktop) Spacer(),
@ -2344,7 +2358,8 @@ class _ForexScreenState extends State<ForexScreen> {
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: isDesktop ? MainAxisAlignment.center : MainAxisAlignment.start,
mainAxisAlignment:
isDesktop ? MainAxisAlignment.center : MainAxisAlignment.start,
children: [
Container(
alignment: Alignment.bottomLeft,

View File

@ -313,7 +313,7 @@ class _AccomodationListWidgetState extends State<AccomodationListWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
// mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
item["hotel_name"]!,
@ -388,6 +388,7 @@ class _AccomodationListWidgetState extends State<AccomodationListWidget> {
],
)
: SizedBox.shrink(),
SizedBox(height: 8),
isDesktop
? Row(
children: [
@ -640,29 +641,29 @@ class _AccomodationListWidgetState extends State<AccomodationListWidget> {
),
),
SizedBox(width: 5),
Expanded(child: Text(value, style: TextStyle(fontSize: 12))),
// Expanded(
// child:
// exceedsLimit
// ? Tooltip(
// message: wrapText(value, 50),
// decoration: BoxDecoration(
// color: Colors.grey.shade200, // Black background
// borderRadius: BorderRadius.circular(6),
// ),
// textStyle: TextStyle(
// color: Colors.black,
// ), // Tooltip text color
// padding: EdgeInsets.all(8),
// preferBelow: false,
// child: Text(
// value.substring(0, limit) + "...",
// style: TextStyle(fontSize: 12),
// overflow: TextOverflow.ellipsis,
// ),
// )
// : Text(value, style: TextStyle(fontSize: 12)),
// ),
// Expanded(child: Text(value, style: TextStyle(fontSize: 12))),
Expanded(
child:
exceedsLimit
? Tooltip(
message: wrapText(value, 50),
decoration: BoxDecoration(
color: Colors.grey.shade200, // Black background
borderRadius: BorderRadius.circular(6),
),
textStyle: TextStyle(
color: Colors.black,
), // Tooltip text color
padding: EdgeInsets.all(8),
preferBelow: false,
child: Text(
value.substring(0, limit) + "...",
style: TextStyle(fontSize: 12),
overflow: TextOverflow.ellipsis,
),
)
: Text(value, style: TextStyle(fontSize: 12)),
),
],
);
}

View File

@ -363,7 +363,7 @@ class _BusListWidgetState extends State<BusListWidget> {
],
)
: SizedBox.shrink(),
SizedBox(height: 4),
SizedBox(height: 8),
isDesktop
? Row(
children: [

View File

@ -319,7 +319,7 @@ class _ForexListWidgetState extends State<ForexListWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
// mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
getRequestForCountry(item["country_code"]!.toString()),
@ -344,19 +344,20 @@ class _ForexListWidgetState extends State<ForexListWidget> {
),
),
),
// SizedBox(width: 10),
// GestureDetector(
// onTap: () => onDeleteForex(item),
// child: Tooltip(
// message: 'Delete Forex Details',
// child: Image.asset(
// 'assets/images/IconsImg/delete.png',
// width: 20,
// height: 15,
// color: Colors.red,
// ),
// ),
// ),
SizedBox(width: 10),
GestureDetector(
onTap: () => widget.onDeleteForex(item),
child: Tooltip(
message: 'Delete Forex Details',
child: Image.asset(
'assets/images/IconsImg/delete.png',
width: 20,
height: 15,
color: Colors.red,
),
),
),
SizedBox(width: 10),
item['forex_id'] != null
? IconButton(
icon: Icon(
@ -457,6 +458,7 @@ class _ForexListWidgetState extends State<ForexListWidget> {
],
)
: SizedBox.shrink(),
SizedBox(height: 8),
isDesktop
? Row(
children: [

View File

@ -324,6 +324,7 @@ class _InsuranceListWidgetState extends State<InsuranceListWidget> {
],
)
: SizedBox.shrink(),
SizedBox(height: 8),
isDesktop
? Row(
children: [

View File

@ -273,7 +273,7 @@ class _MiscellaneousListWidgetState extends State<MiscellaneousListWidget> {
],
),
// Divider(color: Colors.blueGrey.shade50),
// SizedBox(height: 4),
SizedBox(height: 4),
isDesktop
? Row(
children: [
@ -294,6 +294,7 @@ class _MiscellaneousListWidgetState extends State<MiscellaneousListWidget> {
],
)
: SizedBox.shrink(),
SizedBox(height: 8),
isDesktop
? Row(
children: [

View File

@ -378,7 +378,8 @@ class _TaxiListWidgetState extends State<TaxiListWidget> {
],
)
: SizedBox.shrink(),
SizedBox(height: 4),
SizedBox(height: 8),
isDesktop
? Row(
children: [

View File

@ -450,7 +450,7 @@ class _TrainListWidgetState extends State<TrainListWidget> {
],
)
: SizedBox.shrink(),
SizedBox(height: 4),
SizedBox(height: 8),
isDesktop
? Row(
children: [

View File

@ -427,6 +427,7 @@ class _VisaListWidgetState extends State<VisaListWidget> {
],
)
: SizedBox.shrink(),
SizedBox(height: 8),
isDesktop
? Row(
children: [

View File

@ -58,6 +58,21 @@ class _ColorThemePickerWidgetState extends State<ColorThemePickerWidget> {
];
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(0xFFE0F7FA), // Very Light Teal
Color(0xFFC8E6C9), // Mint Green
@ -67,7 +82,7 @@ class _ColorThemePickerWidgetState extends State<ColorThemePickerWidget> {
Color(0xFFFFEBEE), // Very Light Rose
Color(0xFFFCE4EC), // Pastel Pink
Color(0xFFF3E5F5), // Light Lavender
Color(0xFFEDE7F6), // Soft Purple Grey
Color(0xFFF9EBF3), // Soft Purple Grey
Color(0xFFF8F9FA), // Near-white Neutral
];

View File

@ -446,6 +446,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
String? _selectedIsBillable;
String? selectedFuncDept;
String? selectedPurpose;
bool hasUpdateVal = false;
Map<String, String?> validationErrors = {};
@ -563,6 +564,10 @@ class CreateNewPlansState extends State<CreateNewPlan> {
loadInitialData();
});
// if (widget.selectedPlanData != null) {
// hasUpdateVal = true;
// }
if (widget.approverStatus == "Approval pending") {
print("Status approver - Approval Pending");
}
@ -657,6 +662,8 @@ class CreateNewPlansState extends State<CreateNewPlan> {
planTravlrId = travellerId;
_selectedOption = "Option 3";
otherUserName = travellerName;
hasUpdateVal = true;
} else if (userId.isNotEmpty && userId != "0") {
print("TestplanUsrId : $userId");
print("TestplanUsrIdSelf : $selfId");
@ -664,6 +671,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
print("TestplanUsrId2 : $planUsrId");
_selectedOption = (selfId != userId) ? "Option 2" : "Option 1";
otherUserName = userName;
hasUpdateVal = true;
}
});
}
@ -2039,6 +2047,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
}
return true;
},
enabled: !hasUpdateVal,
popupProps: PopupProps.menu(
showSearchBox: false, // Optionally enable search
fit: FlexFit.loose,
@ -3172,6 +3181,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
{"title": "Others (Non Employee)", "value": "Option 3"},
];
print("isViewModeYY: ${widget.isViewMode}, hasUpdateVal: $hasUpdateVal");
return [
CustomTextFieldWrapper(
// isFocused: focusStates["trip_plannedFocused"] ?? false,
@ -3198,12 +3208,14 @@ class CreateNewPlansState extends State<CreateNewPlan> {
// Request focus when user taps
focusNodes["trip_plannedFocusNode"]?.requestFocus();
},
child: DropdownSearch<String>(
selectedItem:
options.firstWhere(
(opt) => opt['value'] == _selectedOption,
)['title'],
enabled: !widget.isViewMode,
enabled: !hasUpdateVal,
// enabled: || !hasUpdateVal,
items: options.map((opt) => opt['title']!).toList(),
popupProps: PopupProps.menu(
showSearchBox: false,

View File

@ -679,165 +679,171 @@ class _ListPlansState extends State<ListPlans> {
// thickness: 0.2, // how "thick" the line is
// color: Colors.grey, // optional
// ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Text(
'My 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))
),
],
),
// 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
Padding(
padding:
isDesktop
? const EdgeInsets.all(8.0)
: const EdgeInsets.symmetric(horizontal: 14.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Text(
"Add New Trip",
'My Trips',
style: GoogleFonts.poppins(
fontSize: isDesktop ? 13 : 11,
fontSize: isDesktop ? 16 : 14,
fontWeight: FontWeight.w600,
color: Colors.black,
),
),
SizedBox(width: 8), // spacing between icon and text
Icon(
Icons.add_circle_outline_rounded,
size: 15,
color: Colors.white,
// 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: [
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)
@ -1316,7 +1322,7 @@ class _ListPlansState extends State<ListPlans> {
context,
);
apiService
.getPdfDownload(
.getForexPdfDownload(
plan.forexId,
);
},
@ -1633,7 +1639,7 @@ class _ListPlansState extends State<ListPlans> {
context,
);
apiService
.getPdfDownload(
.getForexPdfDownload(
plan.forexId,
);
},

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff