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(
|
||||
flex: 4,
|
||||
child: Text(
|
||||
"$fromPlaceCountry (From) - (To) $toPlaceCountry",
|
||||
// "${trip["from_place"]?.toString()} - ${trip["to_place"]?.toString()}",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"$fromPlaceCountry",
|
||||
// "${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(
|
||||
|
||||
@ -582,7 +582,6 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
||||
travelDetailsData = travellerDetailsKey.currentState?.travel_Detials;
|
||||
// errorMessagesTravel = travellerDetailsKey.currentState!.errorMessages;
|
||||
|
||||
|
||||
print("TRAVEL DETAILS FROM CHILD: $travelDetailsData");
|
||||
|
||||
Map<String, dynamic> data = userDetials;
|
||||
@ -657,47 +656,63 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
||||
// printFormData();
|
||||
|
||||
bool isValid = travellerDetailsKey.currentState?.boolValidation() ?? false;
|
||||
if (selectedTab == "travel" ||
|
||||
selectedRole == "5" ||
|
||||
setSelectesUserType == true) {
|
||||
print("NO validation");
|
||||
|
||||
print("isValid- $isValid");
|
||||
if (!isValid) {
|
||||
print("Validation failed. Please check the inputs.");
|
||||
setState(() {});
|
||||
return; // ❌ STOP execution here if not valid
|
||||
}
|
||||
Map<String, dynamic> data = userDetials;
|
||||
|
||||
if (!isValidData(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);
|
||||
}
|
||||
} 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;
|
||||
|
||||
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");
|
||||
// errorMessagesTravel = travellerDetailsKey.currentState!.errorMessages;
|
||||
passportFile = travellerDetailsKey.currentState?.passportFile;
|
||||
|
||||
print("TRAVEL DETAILS FROM CHILD");
|
||||
// print("TRAVEL DETAILS FROM CHILD: $travelDetailsData");
|
||||
print("passportFile : $passportFile");
|
||||
|
||||
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;
|
||||
|
||||
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);
|
||||
createUserData(userDetials);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1588,6 +1588,7 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
widget.isViewMode
|
||||
? null
|
||||
: (String? newValue) {
|
||||
widget.errorMessages.remove("role_id");
|
||||
if (newValue == null) return;
|
||||
final selectedKey =
|
||||
roleMap.entries
|
||||
|
||||
@ -2769,8 +2769,11 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
||||
|
||||
countryMap = {
|
||||
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();
|
||||
|
||||
@ -2850,17 +2853,56 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
constraints: BoxConstraints(maxHeight: 250),
|
||||
itemBuilder:
|
||||
(context, item, isSelected) => Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8.0,
|
||||
vertical: 6.0,
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
style: GoogleFonts.poppins(fontSize: 11.5),
|
||||
),
|
||||
itemBuilder: (context, item, isSelected) {
|
||||
// Extract airline name and code from "AirlineName (CODE)"
|
||||
final match = RegExp(
|
||||
r'^(.*)\s+\(([^)]+)\)$',
|
||||
).firstMatch(item);
|
||||
final name = match?.group(1) ?? '';
|
||||
final code = match?.group(2) ?? '';
|
||||
|
||||
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(
|
||||
decoration: InputDecoration(
|
||||
hintText: "Search Airline...",
|
||||
|
||||
@ -99,6 +99,8 @@ flutter:
|
||||
- assets/images/login/VectorG.png
|
||||
- assets/images/login/logoNew.jpg
|
||||
- assets/images/login/microsoft.png
|
||||
- assets/images/IconsImg/path.png
|
||||
- assets/images/IconsImg/alternate.png
|
||||
- assets/images/IconsImg/delete.png
|
||||
- assets/images/IconsImg/edit.png
|
||||
- assets/images/IconsImg/planPdf_icon.png
|
||||
|
||||
Loading…
Reference in New Issue
Block a user