FIX_TRACKER
This commit is contained in:
parent
b24215272f
commit
fa00f90f8a
@ -445,16 +445,14 @@ class _AccomodationListWidgetState extends State<AccomodationListWidget> {
|
||||
item["destination_city"],
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
_buildDateTimeRow(
|
||||
_buildRow(
|
||||
"Check (in)",
|
||||
formatDate(item["checkin_date"]!),
|
||||
formatTime(item["checkin_time"]!),
|
||||
"${formatDate(item["checkin_date"]!)} ${formatTime(item["checkin_time"]!)}",
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
_buildDateTimeRow(
|
||||
_buildRow(
|
||||
"Check (out)",
|
||||
formatDate(item["checkout_date"]!),
|
||||
formatTime(item["checkout_time"]!),
|
||||
"${formatDate(item["checkout_date"]!)} ${formatTime(item["checkout_time"]!)}",
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
_buildRow("Comments:", item["comments"] ?? "N/A"),
|
||||
@ -630,13 +628,11 @@ class _AccomodationListWidgetState extends State<AccomodationListWidget> {
|
||||
SizedBox(
|
||||
// color: Colors.yellowAccent.shade100,
|
||||
width: 100,
|
||||
child: Expanded(
|
||||
child: Text(
|
||||
title,
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
child: Text(
|
||||
title,
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -321,13 +321,16 @@ class _ForexListWidgetState extends State<ForexListWidget> {
|
||||
Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
getRequestForCountry(item["country_code"]!.toString()),
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 14,
|
||||
fontWeight:
|
||||
isDesktop ? FontWeight.w800 : FontWeight.w600,
|
||||
color: !isDesktop ? Colors.black : Color(0xFF575A74),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Text(
|
||||
getRequestForCountry(item["country_code"]!.toString()),
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 14,
|
||||
fontWeight:
|
||||
isDesktop ? FontWeight.w800 : FontWeight.w600,
|
||||
color: !isDesktop ? Colors.black : Color(0xFF575A74),
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
@ -357,7 +360,6 @@ class _ForexListWidgetState extends State<ForexListWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
item['forex_id'] != null
|
||||
? IconButton(
|
||||
icon: Icon(
|
||||
|
||||
@ -578,8 +578,6 @@ class TemplateForexState extends State<TemplateForex> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
@ -587,15 +585,13 @@ class TemplateForexState extends State<TemplateForex> {
|
||||
isDesktop: isDesktop,
|
||||
breadcrumbItems: [
|
||||
BreadcrumbItem(
|
||||
title: 'Org Settings',
|
||||
tooltip: 'Go To Organization Settings',
|
||||
onTap: (context) {
|
||||
context.go("/OrganizationSettings");
|
||||
}
|
||||
),
|
||||
BreadcrumbItem(
|
||||
title: 'Forex',
|
||||
title: 'Org Settings',
|
||||
tooltip: 'Go To Organization Settings',
|
||||
onTap: (context) {
|
||||
context.go("/OrganizationSettings");
|
||||
},
|
||||
),
|
||||
BreadcrumbItem(title: 'Forex'),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -788,7 +784,7 @@ class TemplateForexState extends State<TemplateForex> {
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
height: MediaQuery.of(context).size.height * 0.5,
|
||||
height: MediaQuery.of(context).size.height * 0.45,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border.all(color: Color(0xFFD6D5E6), width: 0.5),
|
||||
@ -862,17 +858,18 @@ class TemplateForexState extends State<TemplateForex> {
|
||||
SizedBox(width: 10),
|
||||
SizedBox(
|
||||
child: ElevatedButton(
|
||||
onPressed: isDisable
|
||||
? null
|
||||
: () async {
|
||||
setState(() {
|
||||
isDisable = true;
|
||||
});
|
||||
onPressed:
|
||||
isDisable
|
||||
? null
|
||||
: () async {
|
||||
setState(() {
|
||||
isDisable = true;
|
||||
});
|
||||
|
||||
await handleSubmit();
|
||||
// You can get text from commentController.text
|
||||
// Navigator.of(context).pop(); // Close the modal
|
||||
},
|
||||
await handleSubmit();
|
||||
// You can get text from commentController.text
|
||||
// Navigator.of(context).pop(); // Close the modal
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: layoutColor,
|
||||
// backgroundColor: widget.layoutColor,
|
||||
|
||||
@ -1131,7 +1131,7 @@ class _OrgSetUpState extends State<OrgSetUp> {
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 12),
|
||||
),
|
||||
onPressed: () {
|
||||
context.go('/listPlan');
|
||||
context.go('/OrganizationSettings');
|
||||
},
|
||||
child: Text("Cancel", style: GoogleFonts.poppins(fontSize: 12)),
|
||||
),
|
||||
|
||||
@ -18,10 +18,10 @@ import '../../../services/apiService.dart';
|
||||
import '../../../utils/pagination.dart';
|
||||
import '../../../widgets/custom_breadcrumb_navigation.dart';
|
||||
import '../../../widgets/popup_travelAgentList_action.dart';
|
||||
|
||||
/// import '../../../widgets/custom_popup.dart';
|
||||
/// import '../../../../widgets/popup_TravelAgentList_action.dart';
|
||||
|
||||
|
||||
class TravelAgentListScreen extends StatefulWidget {
|
||||
@override
|
||||
_TravelAgentListScreenState createState() => _TravelAgentListScreenState();
|
||||
@ -144,7 +144,8 @@ class _TravelAgentListScreenState extends State<TravelAgentListScreen> {
|
||||
Future<List<dynamic>> fetchUsers() async {
|
||||
// return [];
|
||||
orgId = await getOrgId();
|
||||
final String apiUrlData = '$apiUrl/api/agentList?org_id=$orgId&for=table_view';
|
||||
final String apiUrlData =
|
||||
'$apiUrl/api/agentList?org_id=$orgId&for=table_view';
|
||||
final String? token = await getToken();
|
||||
|
||||
print("Fetch Users");
|
||||
@ -459,15 +460,13 @@ class _TravelAgentListScreenState extends State<TravelAgentListScreen> {
|
||||
isDesktop: isDesktop,
|
||||
breadcrumbItems: [
|
||||
BreadcrumbItem(
|
||||
title: 'Org Settings',
|
||||
tooltip: 'Go To Organization Settings',
|
||||
onTap: (context) {
|
||||
context.go("/OrganizationSettings");
|
||||
}
|
||||
),
|
||||
BreadcrumbItem(
|
||||
title: 'Travel Agent',
|
||||
title: 'Org Settings',
|
||||
tooltip: 'Go To Organization Settings',
|
||||
onTap: (context) {
|
||||
context.go("/OrganizationSettings");
|
||||
},
|
||||
),
|
||||
BreadcrumbItem(title: 'Travel Agent'),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -483,8 +482,8 @@ class _TravelAgentListScreenState extends State<TravelAgentListScreen> {
|
||||
),
|
||||
if (isDesktop)
|
||||
SizedBox(width: MediaQuery.of(context).size.width * 0.03),
|
||||
// SizedBox(width: MediaQuery.of(context).size.width * 0.23),
|
||||
// SizedBox(width: MediaQuery.of(context).size.width * 0.15),
|
||||
// SizedBox(width: MediaQuery.of(context).size.width * 0.23),
|
||||
// SizedBox(width: MediaQuery.of(context).size.width * 0.15),
|
||||
if (isDesktop)
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.2,
|
||||
@ -844,11 +843,12 @@ class _TravelAgentListScreenState extends State<TravelAgentListScreen> {
|
||||
DataCell(
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
GestureDetector(
|
||||
child: Tooltip(
|
||||
message: 'Edit Travel Agent Details',
|
||||
message:
|
||||
'Edit Travel Agent Details',
|
||||
child: Image.asset(
|
||||
'assets/images/IconsImg/edit.png',
|
||||
width: 20,
|
||||
@ -858,12 +858,18 @@ class _TravelAgentListScreenState extends State<TravelAgentListScreen> {
|
||||
onTap: () async {
|
||||
// Navigator.pop(context); // Close the menu
|
||||
// final userId = user['user_id'];
|
||||
final userId = int.parse(user['user_id'].toString());
|
||||
final usersData = await apiService.getSingleUser(userId);
|
||||
context.go("/CreateTravelAgent", extra: {
|
||||
"selectedUser": usersData,
|
||||
"isViewMode": false,
|
||||
});
|
||||
final userId = int.parse(
|
||||
user['user_id'].toString(),
|
||||
);
|
||||
final usersData = await apiService
|
||||
.getSingleUser(userId);
|
||||
context.go(
|
||||
"/CreateTravelAgent",
|
||||
extra: {
|
||||
"selectedUser": usersData,
|
||||
"isViewMode": false,
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
@ -911,32 +917,48 @@ class _TravelAgentListScreenState extends State<TravelAgentListScreen> {
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
GestureDetector(
|
||||
child: Tooltip(
|
||||
message: 'Edit Travel Agent Details',
|
||||
child: Image.asset(
|
||||
'assets/images/IconsImg/edit.png',
|
||||
width: 20,
|
||||
height: 15,
|
||||
),
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
GestureDetector(
|
||||
child: Tooltip(
|
||||
message:
|
||||
'Edit Travel Agent Details',
|
||||
child: Image.asset(
|
||||
'assets/images/IconsImg/edit.png',
|
||||
width: 20,
|
||||
height: 15,
|
||||
),
|
||||
onTap: () async {
|
||||
Navigator.pop(context); // Close the menu
|
||||
final userId = int.parse(user['user_id'].toString());
|
||||
final usersData = await apiService.getSingleUser(userId);
|
||||
context.go("/CreateTravelAgent", extra: {
|
||||
),
|
||||
onTap: () async {
|
||||
// Navigator.pop(context); // Close the menu
|
||||
// final userId = user['user_id'];
|
||||
final userId = int.parse(
|
||||
user['user_id'].toString(),
|
||||
);
|
||||
final usersData = await apiService
|
||||
.getSingleUser(userId);
|
||||
context.go(
|
||||
"/CreateTravelAgent",
|
||||
extra: {
|
||||
"selectedUser": usersData,
|
||||
"isViewMode": false,
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
},
|
||||
);
|
||||
},
|
||||
// onTap: () async {
|
||||
// Navigator.pop(context); // Close the menu
|
||||
// final userId = int.parse(user['user_id'].toString());
|
||||
// final usersData = await apiService.getSingleUser(userId);
|
||||
// context.go("/CreateTravelAgent", extra: {
|
||||
// "selectedUser": usersData,
|
||||
// "isViewMode": false,
|
||||
// });
|
||||
// },
|
||||
),
|
||||
],
|
||||
),
|
||||
// UserActionsMenu(
|
||||
// user: user,
|
||||
// getUserDetails:
|
||||
@ -1043,7 +1065,7 @@ class _TravelAgentListScreenState extends State<TravelAgentListScreen> {
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${user['company_name'] ?? ''}",
|
||||
|
||||
@ -806,7 +806,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
CustomTextFieldUserWrapper(
|
||||
isFocused: focusStates["FnameFocused"] ?? false,
|
||||
isDesktop: widget.isDesktop,
|
||||
width: MediaQuery.of(context).size.width * 0.12,
|
||||
width:
|
||||
widget.isDesktop
|
||||
? MediaQuery.of(context).size.width * 0.12
|
||||
: null,
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
child: TextField(
|
||||
@ -858,7 +861,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
CustomTextFieldUserWrapper(
|
||||
isFocused: focusStates["LnameFocused"] ?? false,
|
||||
isDesktop: widget.isDesktop,
|
||||
width: MediaQuery.of(context).size.width * 0.12,
|
||||
width:
|
||||
widget.isDesktop
|
||||
? MediaQuery.of(context).size.width * 0.12
|
||||
: null,
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
child: TextField(
|
||||
@ -1210,7 +1216,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
CustomTextFieldUserWrapper(
|
||||
isFocused: focusStates["mobileNumberFocused"] ?? false,
|
||||
isDesktop: widget.isDesktop,
|
||||
width: MediaQuery.of(context).size.width * 0.12,
|
||||
width:
|
||||
widget.isDesktop
|
||||
? MediaQuery.of(context).size.width * 0.12
|
||||
: null,
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
child: TextField(
|
||||
@ -1274,7 +1283,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
// isFocused: false,
|
||||
isFocused: focusStates["alternateMobileFocused"] ?? false,
|
||||
isDesktop: widget.isDesktop,
|
||||
width: MediaQuery.of(context).size.width * 0.12,
|
||||
width:
|
||||
widget.isDesktop
|
||||
? MediaQuery.of(context).size.width * 0.12
|
||||
: null,
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
child: TextField(
|
||||
@ -1353,161 +1365,175 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 0),
|
||||
isDesktop: widget.isDesktop,
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
width: double.infinity,
|
||||
child: Focus(
|
||||
focusNode: focusNodes["countryFocusNode"],
|
||||
onFocusChange: (hasFocus) {
|
||||
setState(() {
|
||||
focusStates["countryFocused"] = hasFocus;
|
||||
});
|
||||
},
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
// Request focus when user taps
|
||||
focusNodes["countryFocusNode"]?.requestFocus();
|
||||
},
|
||||
child: DropdownSearch<String>(
|
||||
selectedItem: countryMap[selectedCountry],
|
||||
enabled: !widget.isViewMode,
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: true, // Enables search functionality
|
||||
fit: FlexFit.loose, // Allows flexible height
|
||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||
itemBuilder:
|
||||
// (context, item, isSelected) => Container(
|
||||
// padding: EdgeInsets.symmetric(
|
||||
// horizontal: 10,
|
||||
// vertical: 6,
|
||||
// ),
|
||||
// child: Text(
|
||||
// item,
|
||||
// style: GoogleFonts.poppins(fontSize: 11.5),
|
||||
// ),
|
||||
// ),
|
||||
(context, item, isSelected) {
|
||||
print("contryItem - $item");
|
||||
final match = RegExp(r'^(.*)\s\((.*)\)$').firstMatch(item);
|
||||
final countryName = match?.group(1) ?? '';
|
||||
final countryCode = match?.group(2) ?? '';
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10.0,
|
||||
vertical: 6.0,
|
||||
),
|
||||
child: Padding(
|
||||
// padding: const EdgeInsets.all(3.0),
|
||||
padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
countryName,
|
||||
style: GoogleFonts.poppins(fontSize: 11.5),
|
||||
),
|
||||
Text(
|
||||
countryCode,
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 11.5,
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
height: 40,
|
||||
width: double.infinity,
|
||||
child: Focus(
|
||||
focusNode: focusNodes["countryFocusNode"],
|
||||
onFocusChange: (hasFocus) {
|
||||
setState(() {
|
||||
focusStates["countryFocused"] = hasFocus;
|
||||
});
|
||||
},
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
// Request focus when user taps
|
||||
focusNodes["countryFocusNode"]?.requestFocus();
|
||||
},
|
||||
constraints: BoxConstraints(maxHeight: 180),
|
||||
searchFieldProps: TextFieldProps(
|
||||
decoration: InputDecoration(
|
||||
hintText: "Search Country...",
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
horizontal: 3,
|
||||
vertical: 3,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
items: countryMap.values.toList(),
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(focusStates["countryFocused"] ?? false)
|
||||
? (layoutColor ?? Colors.blue)
|
||||
: Colors.white,
|
||||
// width: 0.5,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(focusStates["countryFocused"] ?? false)
|
||||
? (layoutColor ?? Colors.blue)
|
||||
: Colors.white,
|
||||
// width: 0.5,
|
||||
// const Color(0xFFD6D5E6),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color : (layoutColor ?? Colors.grey), width: 1),
|
||||
),
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 10.0, vertical: 8.0,),
|
||||
// contentPadding: EdgeInsets.symmetric(horizontal: 1),
|
||||
),
|
||||
),
|
||||
dropdownBuilder:
|
||||
(context, selectedItem) => Align(
|
||||
// Center-align selected item
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
selectedItem ?? "Select Country",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
child: DropdownSearch<String>(
|
||||
selectedItem: countryMap[selectedCountry],
|
||||
enabled: !widget.isViewMode,
|
||||
popupProps: PopupProps.menu(
|
||||
showSearchBox: true, // Enables search functionality
|
||||
fit: FlexFit.loose, // Allows flexible height
|
||||
menuProps: const MenuProps(backgroundColor: Colors.white),
|
||||
itemBuilder:
|
||||
// (context, item, isSelected) => Container(
|
||||
// padding: EdgeInsets.symmetric(
|
||||
// horizontal: 10,
|
||||
// vertical: 6,
|
||||
// ),
|
||||
// child: Text(
|
||||
// item,
|
||||
// style: GoogleFonts.poppins(fontSize: 11.5),
|
||||
// ),
|
||||
// ),
|
||||
(context, item, isSelected) {
|
||||
print("contryItem - $item");
|
||||
final match = RegExp(
|
||||
r'^(.*)\s\((.*)\)$',
|
||||
).firstMatch(item);
|
||||
final countryName = match?.group(1) ?? '';
|
||||
final countryCode = match?.group(2) ?? '';
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10.0,
|
||||
vertical: 6.0,
|
||||
),
|
||||
child: Padding(
|
||||
// padding: const EdgeInsets.all(3.0),
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 2,
|
||||
vertical: 3,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
countryName,
|
||||
style: GoogleFonts.poppins(fontSize: 11.5),
|
||||
),
|
||||
Text(
|
||||
countryCode,
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 11.5,
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
constraints: BoxConstraints(maxHeight: 180),
|
||||
searchFieldProps: TextFieldProps(
|
||||
decoration: InputDecoration(
|
||||
hintText: "Search Country...",
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
horizontal: 3,
|
||||
vertical: 3,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
items: countryMap.values.toList(),
|
||||
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||
dropdownSearchDecoration: InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(focusStates["countryFocused"] ?? false)
|
||||
? (layoutColor ?? Colors.blue)
|
||||
: Colors.white,
|
||||
// width: 0.5,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
(focusStates["countryFocused"] ?? false)
|
||||
? (layoutColor ?? Colors.blue)
|
||||
: Colors.white,
|
||||
// width: 0.5,
|
||||
// const Color(0xFFD6D5E6),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: (layoutColor ?? Colors.grey),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
horizontal: 10.0,
|
||||
vertical: 8.0,
|
||||
),
|
||||
// contentPadding: EdgeInsets.symmetric(horizontal: 1),
|
||||
),
|
||||
),
|
||||
dropdownBuilder:
|
||||
(context, selectedItem) => Align(
|
||||
// Center-align selected item
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
selectedItem ?? "Select Country",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// onChanged: widget.isViewMode
|
||||
// ? null
|
||||
// : (String? newValue) {
|
||||
// setState(() {
|
||||
// // Find the country_code based on selected country_name
|
||||
// selectedCountry = countryMap.entries
|
||||
// .firstWhere((entry) => entry.value == newValue)
|
||||
// .key;
|
||||
//
|
||||
// // if (selectedCountry!.isNotEmpty) {
|
||||
// // errorMessages.remove("country_code");
|
||||
// // }
|
||||
// });
|
||||
// widget.onCountryChanged?.call(newValue);
|
||||
// },
|
||||
onChanged:
|
||||
widget.isViewMode
|
||||
? null
|
||||
: (String? newValue) {
|
||||
if (newValue == null) return;
|
||||
// onChanged: widget.isViewMode
|
||||
// ? null
|
||||
// : (String? newValue) {
|
||||
// setState(() {
|
||||
// // Find the country_code based on selected country_name
|
||||
// selectedCountry = countryMap.entries
|
||||
// .firstWhere((entry) => entry.value == newValue)
|
||||
// .key;
|
||||
//
|
||||
// // if (selectedCountry!.isNotEmpty) {
|
||||
// // errorMessages.remove("country_code");
|
||||
// // }
|
||||
// });
|
||||
// widget.onCountryChanged?.call(newValue);
|
||||
// },
|
||||
onChanged:
|
||||
widget.isViewMode
|
||||
? null
|
||||
: (String? newValue) {
|
||||
if (newValue == null) return;
|
||||
|
||||
final countryCode =
|
||||
countryMap.entries
|
||||
.firstWhere((entry) => entry.value == newValue)
|
||||
.key;
|
||||
final countryCode =
|
||||
countryMap.entries
|
||||
.firstWhere(
|
||||
(entry) => entry.value == newValue,
|
||||
)
|
||||
.key;
|
||||
|
||||
setState(() {
|
||||
selectedCountry = countryCode;
|
||||
});
|
||||
setState(() {
|
||||
selectedCountry = countryCode;
|
||||
});
|
||||
|
||||
widget.onCountryChanged?.call(
|
||||
countryCode,
|
||||
); // ✅ send code not name
|
||||
},
|
||||
),),),
|
||||
widget.onCountryChanged?.call(
|
||||
countryCode,
|
||||
); // ✅ send code not name
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@ -388,32 +388,35 @@ class OfficeDetailsState extends State<OfficeDetails> {
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 20),
|
||||
_buildFirstRow(widget.isDesktop),
|
||||
if (widget.isDesktop) SizedBox(height: 10),
|
||||
_buildSecondRow(widget.isDesktop),
|
||||
if (widget.isDesktop) SizedBox(height: 10),
|
||||
_buildThirdRow(widget.isDesktop),
|
||||
if (widget.isDesktop) SizedBox(height: 10),
|
||||
Divider(thickness: 0.2, color: Colors.blueGrey.shade100),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Delegation",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.vertical,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 20),
|
||||
_buildFirstRow(widget.isDesktop),
|
||||
if (widget.isDesktop) SizedBox(height: 10),
|
||||
_buildSecondRow(widget.isDesktop),
|
||||
if (widget.isDesktop) SizedBox(height: 10),
|
||||
_buildThirdRow(widget.isDesktop),
|
||||
if (widget.isDesktop) SizedBox(height: 10),
|
||||
Divider(thickness: 0.2, color: Colors.blueGrey.shade100),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Delegation",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
_buildFourthRow(widget.isDesktop),
|
||||
],
|
||||
],
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
_buildFourthRow(widget.isDesktop),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user