minor fixes
This commit is contained in:
parent
9cab4b02a3
commit
52fa34bd0d
@ -706,18 +706,18 @@ class _TravelAgentListPlansState extends State<TravelAgentListPlans> {
|
|||||||
isViewMode: true);
|
isViewMode: true);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
IconButton(
|
// IconButton(
|
||||||
icon: Image.asset(
|
// icon: Image.asset(
|
||||||
'assets/images/IconsImg/edit.png',
|
// 'assets/images/IconsImg/edit.png',
|
||||||
width: 20,
|
// width: 20,
|
||||||
height: 15),
|
// height: 15),
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
Navigator.pop(context);
|
// Navigator.pop(context);
|
||||||
ApiService.viewPlan(
|
// ApiService.viewPlan(
|
||||||
context, plan.planId,
|
// context, plan.planId,
|
||||||
isViewMode: false);
|
// isViewMode: false);
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.cancel_rounded,
|
Icons.cancel_rounded,
|
||||||
|
|||||||
@ -55,6 +55,8 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
loadInitialData();
|
loadInitialData();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
print("i am here .........................");
|
||||||
|
|
||||||
// futurePlans = fetchPlans();
|
// futurePlans = fetchPlans();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,7 +247,7 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
try {
|
try {
|
||||||
Map<String, dynamic> planData = await ApiService.getViewPlan(planId);
|
Map<String, dynamic> planData = await ApiService.getViewPlan(planId);
|
||||||
print("ViewAAA - $planData");
|
print("ViewABC - $planData");
|
||||||
refresh();
|
refresh();
|
||||||
// postPlanData(planData, planId);
|
// postPlanData(planData, planId);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -286,8 +288,7 @@ class _ApprovalListState extends State<ApprovalList> {
|
|||||||
{bool isViewMode = false, bool isApprover = true}) async {
|
{bool isViewMode = false, bool isApprover = true}) async {
|
||||||
try {
|
try {
|
||||||
Map<String, dynamic> planData = await getViewPlan(planId);
|
Map<String, dynamic> planData = await getViewPlan(planId);
|
||||||
|
print("viewPlanforApprover.....$planData");
|
||||||
print("ViewAAA - $planData");
|
|
||||||
context.go('/createPlan', extra: {
|
context.go('/createPlan', extra: {
|
||||||
'planData': planData,
|
'planData': planData,
|
||||||
'isViewMode': isViewMode,
|
'isViewMode': isViewMode,
|
||||||
|
|||||||
@ -493,7 +493,7 @@ class ForexDataState extends State<ForexData> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Cash",
|
"Cash (%)",
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
@ -540,7 +540,7 @@ class ForexDataState extends State<ForexData> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Card",
|
"Card (%)",
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
|
|||||||
@ -276,7 +276,7 @@ class _GroupListState extends State<GroupList> {
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
// height: MediaQuery.of(context).size.height * 0.89,
|
height: MediaQuery.of(context).size.height * 0.75,
|
||||||
padding: const EdgeInsets.all(10),
|
padding: const EdgeInsets.all(10),
|
||||||
// margin: const EdgeInsets.only(bottom: 10),
|
// margin: const EdgeInsets.only(bottom: 10),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -372,26 +372,25 @@ class _GroupListState extends State<GroupList> {
|
|||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
|
||||||
if (group['group_id'] != null) {
|
if (group['group_id'] != null) {
|
||||||
final newGroupID = int.tryParse(group['group_id'].toString());
|
final newGroupID = int.tryParse(
|
||||||
|
group['group_id'].toString());
|
||||||
if (newGroupID != null) {
|
if (newGroupID != null) {
|
||||||
final data = await apiService.getGroupDetailsFind(newGroupID); // ✅ Always an int
|
final data = await apiService.getGroupDetailsFind(
|
||||||
|
newGroupID); // ✅ Always an int
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => GroupData(
|
builder: (context) =>
|
||||||
|
GroupData(
|
||||||
isDesktop: isDesktop,
|
isDesktop: isDesktop,
|
||||||
groupId: newGroupID, // Pass the ID
|
groupId: newGroupID,
|
||||||
|
// Pass the ID
|
||||||
groupData: data,
|
groupData: data,
|
||||||
layoutColor: layoutColor!,
|
layoutColor: layoutColor!,
|
||||||
fetchGetGroup: refreshData
|
fetchGetGroup: refreshData
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
print("something went wrong check properly");
|
print("something went wrong check properly");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -214,6 +214,14 @@ class BusListWidget extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
|
Text(
|
||||||
|
"${item["from"]} - ${item["to"]}",
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => onOpen(true, item, "Bus"),
|
onTap: () => onOpen(true, item, "Bus"),
|
||||||
child: Image.asset('assets/images/IconsImg/edit.png',
|
child: Image.asset('assets/images/IconsImg/edit.png',
|
||||||
|
|||||||
@ -192,6 +192,14 @@ class InsuranceListWidget extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
|
Text(
|
||||||
|
getRequestForInsuranceType(item["type_of_insurance"]!.toString()),
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => onOpen(true, item, "Insurance"),
|
onTap: () => onOpen(true, item, "Insurance"),
|
||||||
child: Image.asset('assets/images/IconsImg/edit.png',
|
child: Image.asset('assets/images/IconsImg/edit.png',
|
||||||
|
|||||||
@ -152,6 +152,14 @@ class MiscellaneousListWidget extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
|
Text(
|
||||||
|
getRequestValue(item["special_request"]?.toString()),
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => onOpen(true, item, "Miscellaneous"),
|
onTap: () => onOpen(true, item, "Miscellaneous"),
|
||||||
child: Image.asset('assets/images/IconsImg/edit.png',
|
child: Image.asset('assets/images/IconsImg/edit.png',
|
||||||
|
|||||||
@ -291,6 +291,14 @@ class VisaListWidget extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
|
Text(
|
||||||
|
getRequestForVisa(item["type_of_visa"]!.toString()),
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => onOpen(true, item, "Visa"),
|
onTap: () => onOpen(true, item, "Visa"),
|
||||||
child: Image.asset('assets/images/IconsImg/edit.png',
|
child: Image.asset('assets/images/IconsImg/edit.png',
|
||||||
|
|||||||
@ -43,6 +43,8 @@ class _CreatePlansState extends State<CreatePlan> {
|
|||||||
|
|
||||||
final FocusNode focusNode = FocusNode();
|
final FocusNode focusNode = FocusNode();
|
||||||
bool isFocused = false;
|
bool isFocused = false;
|
||||||
|
late String approverId;
|
||||||
|
late String delegaterId;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -104,6 +106,14 @@ class _CreatePlansState extends State<CreatePlan> {
|
|||||||
// final planData = args?['planData'];
|
// final planData = args?['planData'];
|
||||||
final bool isViewMode = args?['isViewMode'] ?? false;
|
final bool isViewMode = args?['isViewMode'] ?? false;
|
||||||
final bool isApprover = args?['isApprover'] ?? false;
|
final bool isApprover = args?['isApprover'] ?? false;
|
||||||
|
String approverId = args?['approver_id'] ?? '';
|
||||||
|
String delegaterId = args?['delegater_id'] ?? '';
|
||||||
|
|
||||||
|
print("args.......................$args");
|
||||||
|
print(approverId);
|
||||||
|
print(delegaterId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final Map<String, dynamic> planData =
|
final Map<String, dynamic> planData =
|
||||||
args['planData'] as Map<String, dynamic>? ?? {};
|
args['planData'] as Map<String, dynamic>? ?? {};
|
||||||
|
|||||||
@ -21,6 +21,7 @@ class PlanPopupMenu extends StatelessWidget {
|
|||||||
required this.layoutColor,
|
required this.layoutColor,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Align(
|
return Align(
|
||||||
@ -51,15 +52,17 @@ class PlanPopupMenu extends StatelessWidget {
|
|||||||
isViewMode: true);
|
isViewMode: true);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
IconButton(
|
|
||||||
icon: Image.asset('assets/images/IconsImg/edit.png',
|
// IconButton(
|
||||||
width: 20, height: 15),
|
// icon: Image.asset('assets/images/IconsImg/edit.png',
|
||||||
onPressed: () {
|
// width: 20, height: 15),
|
||||||
Navigator.pop(context);
|
// onPressed: () {
|
||||||
ApiService.viewPlan(context, plan.planId,
|
// Navigator.pop(context);
|
||||||
isViewMode: false);
|
// ApiService.viewPlan(context, plan.planId,
|
||||||
},
|
// isViewMode: false);
|
||||||
),
|
// },
|
||||||
|
// ),
|
||||||
|
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.cancel_rounded, size: 18),
|
icon: Icon(Icons.cancel_rounded, size: 18),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user