bug fix
This commit is contained in:
parent
4887c69950
commit
e0cd77fbd5
BIN
assets/images/IconsImg/alternate.png
Normal file
BIN
assets/images/IconsImg/alternate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
BIN
assets/images/IconsImg/path.png
Normal file
BIN
assets/images/IconsImg/path.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@ -398,13 +398,31 @@ class _FlightListWidgetState extends State<FlightListWidget> {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: Text(
|
child: Column(
|
||||||
"$fromPlaceCountry (From) - (To) $toPlaceCountry",
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
// "${trip["from_place"]?.toString()} - ${trip["to_place"]?.toString()}",
|
children: [
|
||||||
style: GoogleFonts.poppins(
|
Text(
|
||||||
fontSize: 12,
|
"$fromPlaceCountry",
|
||||||
fontWeight: FontWeight.w700,
|
// "${trip["from_place"]?.toString()} - ${trip["to_place"]?.toString()}",
|
||||||
),
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/IconsImg/alternate.png',
|
||||||
|
width: 25,
|
||||||
|
height: 25,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"$toPlaceCountry",
|
||||||
|
// "${trip["from_place"]?.toString()} - ${trip["to_place"]?.toString()}",
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@ -582,7 +582,6 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
|||||||
travelDetailsData = travellerDetailsKey.currentState?.travel_Detials;
|
travelDetailsData = travellerDetailsKey.currentState?.travel_Detials;
|
||||||
// errorMessagesTravel = travellerDetailsKey.currentState!.errorMessages;
|
// errorMessagesTravel = travellerDetailsKey.currentState!.errorMessages;
|
||||||
|
|
||||||
|
|
||||||
print("TRAVEL DETAILS FROM CHILD: $travelDetailsData");
|
print("TRAVEL DETAILS FROM CHILD: $travelDetailsData");
|
||||||
|
|
||||||
Map<String, dynamic> data = userDetials;
|
Map<String, dynamic> data = userDetials;
|
||||||
@ -657,47 +656,63 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
|||||||
// printFormData();
|
// printFormData();
|
||||||
|
|
||||||
bool isValid = travellerDetailsKey.currentState?.boolValidation() ?? false;
|
bool isValid = travellerDetailsKey.currentState?.boolValidation() ?? false;
|
||||||
|
if (selectedTab == "travel" ||
|
||||||
|
selectedRole == "5" ||
|
||||||
|
setSelectesUserType == true) {
|
||||||
|
print("NO validation");
|
||||||
|
|
||||||
print("isValid- $isValid");
|
Map<String, dynamic> data = userDetials;
|
||||||
if (!isValid) {
|
|
||||||
print("Validation failed. Please check the inputs.");
|
if (!isValidData(data)) {
|
||||||
setState(() {});
|
print("USERDETAILS : $userDetials");
|
||||||
return; // ❌ STOP execution here if not valid
|
print("Validation Failed: Required fields are missing.");
|
||||||
}
|
setState(() {});
|
||||||
|
return; // Stop execution if validation fails
|
||||||
|
} else {
|
||||||
|
print("USERDETAILS : $userDetials");
|
||||||
|
orgId = await getOrgId();
|
||||||
|
|
||||||
|
createUserData(userDetials);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print("isValid- $isValid");
|
||||||
|
if (!isValid) {
|
||||||
|
print("Validation failed. Please check the inputs.");
|
||||||
|
setState(() {});
|
||||||
|
return; // ❌ STOP execution here if not valid
|
||||||
|
}
|
||||||
|
|
||||||
travelDetailsData = travellerDetailsKey.currentState?.travel_Detials;
|
travelDetailsData = travellerDetailsKey.currentState?.travel_Detials;
|
||||||
|
|
||||||
|
print("travelDetailsData - $travelDetailsData");
|
||||||
|
|
||||||
|
print("travelDetailsData - $travelDetailsData");
|
||||||
|
// errorMessagesTravel = travellerDetailsKey.currentState!.errorMessages;
|
||||||
|
|
||||||
print("travelDetailsData - $travelDetailsData");
|
print("TRAVEL DETAILS FROM CHILD");
|
||||||
|
// print("TRAVEL DETAILS FROM CHILD: $travelDetailsData");
|
||||||
|
|
||||||
print("travelDetailsData - $travelDetailsData");
|
passportFile = travellerDetailsKey.currentState?.passportFile;
|
||||||
// errorMessagesTravel = travellerDetailsKey.currentState!.errorMessages;
|
|
||||||
|
|
||||||
print("TRAVEL DETAILS FROM CHILD");
|
print("passportFile : $passportFile");
|
||||||
// print("TRAVEL DETAILS FROM CHILD: $travelDetailsData");
|
|
||||||
|
|
||||||
passportFile = travellerDetailsKey.currentState?.passportFile;
|
Map<String, dynamic> data = userDetials;
|
||||||
|
|
||||||
print("passportFile : $passportFile");
|
print("USERDETAILS : $data");
|
||||||
|
|
||||||
Map<String, dynamic> data = userDetials;
|
// Map<String, dynamic> data = userDetials;
|
||||||
|
|
||||||
print("USERDETAILS : $data");
|
if (!isValidData(data) && isValidDataTwo(data)) {
|
||||||
|
print("USERDETAILS : $userDetials");
|
||||||
|
print("Validation Failed: Required fields are missing.");
|
||||||
|
setState(() {});
|
||||||
|
return; // Stop execution if validation fails
|
||||||
|
} else {
|
||||||
|
print("USERDETAILS : $userDetials");
|
||||||
|
orgId = await getOrgId();
|
||||||
|
|
||||||
// Map<String, dynamic> data = userDetials;
|
createUserData(userDetials);
|
||||||
|
}
|
||||||
if (!isValidData(data) &&
|
|
||||||
isValidDataTwo(data) ) {
|
|
||||||
print("USERDETAILS : $userDetials");
|
|
||||||
print("Validation Failed: Required fields are missing.");
|
|
||||||
setState(() {});
|
|
||||||
return; // Stop execution if validation fails
|
|
||||||
} else {
|
|
||||||
print("USERDETAILS : $userDetials");
|
|
||||||
orgId = await getOrgId();
|
|
||||||
|
|
||||||
createUserData(userDetials);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1588,6 +1588,7 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
widget.isViewMode
|
widget.isViewMode
|
||||||
? null
|
? null
|
||||||
: (String? newValue) {
|
: (String? newValue) {
|
||||||
|
widget.errorMessages.remove("role_id");
|
||||||
if (newValue == null) return;
|
if (newValue == null) return;
|
||||||
final selectedKey =
|
final selectedKey =
|
||||||
roleMap.entries
|
roleMap.entries
|
||||||
|
|||||||
@ -2769,8 +2769,11 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
|
|
||||||
countryMap = {
|
countryMap = {
|
||||||
for (var country in countryList)
|
for (var country in countryList)
|
||||||
country['airline'] as String: '${country['airline_name']}',
|
country['airline'] as String:
|
||||||
|
'${country['airline_name']} (${country['airline']})',
|
||||||
|
// country['airline'] as String: '${country['airline_name']}',
|
||||||
};
|
};
|
||||||
|
// airline
|
||||||
|
|
||||||
countryCodes = countryMap.keys.toList();
|
countryCodes = countryMap.keys.toList();
|
||||||
|
|
||||||
@ -2850,17 +2853,56 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
),
|
),
|
||||||
constraints: BoxConstraints(maxHeight: 250),
|
constraints: BoxConstraints(maxHeight: 250),
|
||||||
itemBuilder:
|
itemBuilder: (context, item, isSelected) {
|
||||||
(context, item, isSelected) => Padding(
|
// Extract airline name and code from "AirlineName (CODE)"
|
||||||
padding: const EdgeInsets.symmetric(
|
final match = RegExp(
|
||||||
horizontal: 8.0,
|
r'^(.*)\s+\(([^)]+)\)$',
|
||||||
vertical: 6.0,
|
).firstMatch(item);
|
||||||
),
|
final name = match?.group(1) ?? '';
|
||||||
child: Text(
|
final code = match?.group(2) ?? '';
|
||||||
item,
|
|
||||||
style: GoogleFonts.poppins(fontSize: 11.5),
|
return Padding(
|
||||||
),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 8.0,
|
||||||
|
vertical: 6.0,
|
||||||
),
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
name,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
code,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
// itemBuilder:
|
||||||
|
// (context, item, isSelected) => Padding(
|
||||||
|
// padding: const EdgeInsets.symmetric(
|
||||||
|
// horizontal: 8.0,
|
||||||
|
// vertical: 6.0,
|
||||||
|
// ),
|
||||||
|
// child: Text(
|
||||||
|
// item,
|
||||||
|
// style: GoogleFonts.poppins(fontSize: 11.5),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
searchFieldProps: TextFieldProps(
|
searchFieldProps: TextFieldProps(
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "Search Airline...",
|
hintText: "Search Airline...",
|
||||||
|
|||||||
@ -99,6 +99,8 @@ flutter:
|
|||||||
- assets/images/login/VectorG.png
|
- assets/images/login/VectorG.png
|
||||||
- assets/images/login/logoNew.jpg
|
- assets/images/login/logoNew.jpg
|
||||||
- assets/images/login/microsoft.png
|
- assets/images/login/microsoft.png
|
||||||
|
- assets/images/IconsImg/path.png
|
||||||
|
- assets/images/IconsImg/alternate.png
|
||||||
- assets/images/IconsImg/delete.png
|
- assets/images/IconsImg/delete.png
|
||||||
- assets/images/IconsImg/edit.png
|
- assets/images/IconsImg/edit.png
|
||||||
- assets/images/IconsImg/planPdf_icon.png
|
- assets/images/IconsImg/planPdf_icon.png
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user