tracker items
This commit is contained in:
parent
3e973707a6
commit
c2bbbb2214
@ -745,7 +745,8 @@ class _ListAllPlansState extends State<ListAllPlans> {
|
|||||||
cells: [
|
cells: [
|
||||||
DataCell(
|
DataCell(
|
||||||
Text(
|
Text(
|
||||||
"${index + 1}",
|
// "${index + 1}",
|
||||||
|
"${(currentPage * itemsPerPage) + index + 1}",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
fontFamily: "Inter",
|
fontFamily: "Inter",
|
||||||
|
|||||||
@ -128,13 +128,23 @@ class _LoginWidgetState extends State<LoginWidget> {
|
|||||||
print("Token - $token");
|
print("Token - $token");
|
||||||
await storeUserDetails(token);
|
await storeUserDetails(token);
|
||||||
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
Fluttertoast.showToast(
|
||||||
SnackBar(
|
msg: "You're in!",
|
||||||
content: Text("Login Successful"),
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
backgroundColor: Colors.green, // Set background to green
|
gravity: ToastGravity.CENTER,
|
||||||
),
|
timeInSecForIosWeb: 2,
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16.0,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
// SnackBar(
|
||||||
|
// content: Text("Login Successful"),
|
||||||
|
// backgroundColor: Colors.green, // Set background to green
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
|
||||||
if (userRole == "Travel Agent") {
|
if (userRole == "Travel Agent") {
|
||||||
context.go('/listTravelAgentPlan');
|
context.go('/listTravelAgentPlan');
|
||||||
} else if (userRole == "Org Admin" || userRole == "Travel Admin") {
|
} else if (userRole == "Org Admin" || userRole == "Travel Admin") {
|
||||||
@ -151,11 +161,17 @@ class _LoginWidgetState extends State<LoginWidget> {
|
|||||||
if (messages is Map && messages.isNotEmpty) {
|
if (messages is Map && messages.isNotEmpty) {
|
||||||
errorMessage = messages.values.first.toString();
|
errorMessage = messages.values.first.toString();
|
||||||
}
|
}
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
SnackBar(
|
Fluttertoast.showToast(
|
||||||
content: Text("Login Failed: $errorMessage"),
|
msg: "Login Failed: $errorMessage",
|
||||||
backgroundColor: Colors.red,
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
),
|
gravity: ToastGravity.CENTER,
|
||||||
|
timeInSecForIosWeb: 2,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16.0,
|
||||||
|
// webPosition: "center",
|
||||||
|
webBgColor: "linear-gradient(to right, #dc1c13, #dc1c13)",
|
||||||
);
|
);
|
||||||
_emailController.clear();
|
_emailController.clear();
|
||||||
_passwordController.clear();
|
_passwordController.clear();
|
||||||
@ -169,9 +185,20 @@ class _LoginWidgetState extends State<LoginWidget> {
|
|||||||
// );
|
// );
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ScaffoldMessenger.of(
|
// ScaffoldMessenger.of(
|
||||||
context,
|
// context,
|
||||||
).showSnackBar(SnackBar(content: Text("Error: $e")));
|
// ).showSnackBar(SnackBar(content: Text("Error: $e")));
|
||||||
|
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: "Login Failed: $e",
|
||||||
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.CENTER,
|
||||||
|
timeInSecForIosWeb: 2,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16.0,
|
||||||
|
webBgColor: "linear-gradient(to right, #dc1c13, #dc1c13)",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,27 +225,59 @@ class _LoginWidgetState extends State<LoginWidget> {
|
|||||||
_showOtpResetFields = true;
|
_showOtpResetFields = true;
|
||||||
// _clearAllFields();
|
// _clearAllFields();
|
||||||
});
|
});
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
// ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
// SnackBar(
|
||||||
content: Text("OTP sent to your email"),
|
// content: Text("OTP sent to your email"),
|
||||||
backgroundColor: Colors.green,
|
// backgroundColor: Colors.green,
|
||||||
),
|
// ),
|
||||||
|
// );
|
||||||
|
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: "OTP sent to your email",
|
||||||
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.CENTER,
|
||||||
|
timeInSecForIosWeb: 2,
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16.0,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
print(response);
|
print(response);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
// ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
// SnackBar(
|
||||||
content: Text(
|
// content: Text(
|
||||||
"${jsonDecode(response.body)['messages']['error']}",
|
// "${jsonDecode(response.body)['messages']['error']}",
|
||||||
),
|
// ),
|
||||||
|
//
|
||||||
|
// backgroundColor: Colors.red,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
|
||||||
backgroundColor: Colors.red,
|
Fluttertoast.showToast(
|
||||||
),
|
msg: "${jsonDecode(response.body)['messages']['error']}",
|
||||||
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.CENTER,
|
||||||
|
timeInSecForIosWeb: 2,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16.0,
|
||||||
|
webBgColor: "linear-gradient(to right, #dc1c13, #dc1c13)",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
// ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(content: Text("Error: $e"), backgroundColor: Colors.red),
|
// SnackBar(content: Text("Error: $e"), backgroundColor: Colors.red),
|
||||||
|
// );
|
||||||
|
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: "Error: $e",
|
||||||
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.CENTER,
|
||||||
|
timeInSecForIosWeb: 2,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16.0,
|
||||||
|
webBgColor: "linear-gradient(to right, #dc1c13, #dc1c13)",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else if (!_isForgotPassword && _showOtpResetFields) {
|
} else if (!_isForgotPassword && _showOtpResetFields) {
|
||||||
@ -245,11 +304,21 @@ class _LoginWidgetState extends State<LoginWidget> {
|
|||||||
_showOtpResetFields = false;
|
_showOtpResetFields = false;
|
||||||
_clearAllFields();
|
_clearAllFields();
|
||||||
});
|
});
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
// ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
// SnackBar(
|
||||||
content: Text("Password reset successfully"),
|
// content: Text("Password reset successfully"),
|
||||||
backgroundColor: Colors.green,
|
// backgroundColor: Colors.green,
|
||||||
),
|
// ),
|
||||||
|
// );
|
||||||
|
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: "Password reset successfully",
|
||||||
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.CENTER,
|
||||||
|
timeInSecForIosWeb: 2,
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16.0,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
print('23');
|
print('23');
|
||||||
@ -258,19 +327,41 @@ class _LoginWidgetState extends State<LoginWidget> {
|
|||||||
final errorMessage =
|
final errorMessage =
|
||||||
responseBody['messages']?['error'] ?? 'An unknown error occurred';
|
responseBody['messages']?['error'] ?? 'An unknown error occurred';
|
||||||
print(errorMessage);
|
print(errorMessage);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
// ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
// SnackBar(
|
||||||
content: Text(
|
// content: Text(
|
||||||
"Reset failed: $errorMessage",
|
// "Reset failed: $errorMessage",
|
||||||
// "Reset failed: ${jsonDecode(response.body)['message']}",
|
// // "Reset failed: ${jsonDecode(response.body)['message']}",
|
||||||
),
|
// ),
|
||||||
backgroundColor: Colors.red,
|
// backgroundColor: Colors.red,
|
||||||
),
|
// ),
|
||||||
|
// );
|
||||||
|
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: "Reset failed: $errorMessage",
|
||||||
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.CENTER,
|
||||||
|
timeInSecForIosWeb: 2,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16.0,
|
||||||
|
webBgColor: "linear-gradient(to right, #dc1c13, #dc1c13)",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
// ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(content: Text("Error: $e"), backgroundColor: Colors.red),
|
// SnackBar(content: Text("Error: $e"), backgroundColor: Colors.red),
|
||||||
|
// );
|
||||||
|
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: "Error: $e",
|
||||||
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.CENTER,
|
||||||
|
timeInSecForIosWeb: 2,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 16.0,
|
||||||
|
webBgColor: "linear-gradient(to right, #dc1c13, #dc1c13)",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import '../../widgets/custom_text_traveller.dart';
|
|||||||
|
|
||||||
class UserSelectionDialog extends StatefulWidget {
|
class UserSelectionDialog extends StatefulWidget {
|
||||||
final String title;
|
final String title;
|
||||||
|
final String? currentUser;
|
||||||
final Color layoutColorForUser;
|
final Color layoutColorForUser;
|
||||||
final void Function(String, String, bool) onSubmit;
|
final void Function(String, String, bool) onSubmit;
|
||||||
final void Function() onClose;
|
final void Function() onClose;
|
||||||
@ -23,6 +24,7 @@ class UserSelectionDialog extends StatefulWidget {
|
|||||||
required this.layoutColorForUser,
|
required this.layoutColorForUser,
|
||||||
required this.onSubmit,
|
required this.onSubmit,
|
||||||
required this.onClose,
|
required this.onClose,
|
||||||
|
required this.currentUser,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -202,10 +204,17 @@ class _UserSelectionDialogState extends State<UserSelectionDialog> {
|
|||||||
print("Filtering _filterUsersTravellers...");
|
print("Filtering _filterUsersTravellers...");
|
||||||
setState(() {
|
setState(() {
|
||||||
_filteredList.clear(); // Reset the list before filtering
|
_filteredList.clear(); // Reset the list before filtering
|
||||||
|
final excludedUserId = widget.currentUser.toString();
|
||||||
if (query.isEmpty) {
|
if (query.isEmpty) {
|
||||||
_filteredList = [
|
_filteredList = [
|
||||||
..._users.map((user) => {"type": "user", "data": user}),
|
// ..._users.map((user) => {"type": "user", "data": user}),
|
||||||
|
..._users
|
||||||
|
.where(
|
||||||
|
(user) =>
|
||||||
|
(user.userId.toString() == excludedUserId &&
|
||||||
|
user.roleId.toString() == "5"),
|
||||||
|
) // ⛔ Exclude user ID 4
|
||||||
|
.map((user) => {"type": "user", "data": user}),
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
_filteredList = [
|
_filteredList = [
|
||||||
@ -213,6 +222,10 @@ class _UserSelectionDialogState extends State<UserSelectionDialog> {
|
|||||||
.where((user) {
|
.where((user) {
|
||||||
print("usersLLL : ${user}");
|
print("usersLLL : ${user}");
|
||||||
|
|
||||||
|
if (user.userId.toString() == excludedUserId ||
|
||||||
|
user.roleId.toString() == "5")
|
||||||
|
return false;
|
||||||
|
|
||||||
List<String> searchFields = [
|
List<String> searchFields = [
|
||||||
"${user.firstName} ${user.lastName}".toLowerCase(),
|
"${user.firstName} ${user.lastName}".toLowerCase(),
|
||||||
user.email.toLowerCase() ?? "",
|
user.email.toLowerCase() ?? "",
|
||||||
@ -335,6 +348,7 @@ class _UserSelectionDialogState extends State<UserSelectionDialog> {
|
|||||||
super.initState();
|
super.initState();
|
||||||
fetchUsers();
|
fetchUsers();
|
||||||
fetchTraveller();
|
fetchTraveller();
|
||||||
|
print("SelffsdfcurrentUser - ${widget.currentUser}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@ -3582,6 +3582,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
|
|||||||
fetchUserDetails();
|
fetchUserDetails();
|
||||||
},
|
},
|
||||||
layoutColorForUser: widget.layoutColor!,
|
layoutColorForUser: widget.layoutColor!,
|
||||||
|
currentUser: selfId,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@ -722,7 +722,7 @@ class _CreateUserFormDetialsState extends State<CreateUserFormDetials> {
|
|||||||
if (start_Date != null &&
|
if (start_Date != null &&
|
||||||
end_Date != null &&
|
end_Date != null &&
|
||||||
end_Date.isBefore(start_Date)) {
|
end_Date.isBefore(start_Date)) {
|
||||||
print("Invalid Date Range");
|
print("Invalid date range");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@ -2408,10 +2408,15 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
dropdownDecoratorProps: const DropDownDecoratorProps(
|
dropdownDecoratorProps: DropDownDecoratorProps(
|
||||||
dropdownSearchDecoration: InputDecoration(
|
dropdownSearchDecoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
contentPadding: EdgeInsets.symmetric(
|
hintText: "Select Seat",
|
||||||
|
hintStyle: GoogleFonts.poppins(
|
||||||
|
fontSize: 11.5,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
horizontal: 10,
|
horizontal: 10,
|
||||||
vertical: 5,
|
vertical: 5,
|
||||||
),
|
),
|
||||||
@ -2421,7 +2426,9 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
icon: Icon(Icons.arrow_drop_down),
|
icon: Icon(Icons.arrow_drop_down),
|
||||||
),
|
),
|
||||||
dropdownBuilder: (context, selectedItem) {
|
dropdownBuilder: (context, selectedItem) {
|
||||||
if (selectedItem == null || selectedItem.isEmpty) {
|
if (selectedItem == null ||
|
||||||
|
selectedItem.isEmpty ||
|
||||||
|
selectedItem['dropdown_value'].toString().isEmpty) {
|
||||||
return Text(
|
return Text(
|
||||||
"Select Seat", // fallback text
|
"Select Seat", // fallback text
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
@ -2431,7 +2438,7 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Text(
|
return Text(
|
||||||
selectedItem['dropdown_value'] ?? '',
|
selectedItem['dropdown_value'] ?? 'Select Seat',
|
||||||
style: GoogleFonts.poppins(fontSize: 12, color: Colors.black),
|
style: GoogleFonts.poppins(fontSize: 12, color: Colors.black),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -2656,7 +2663,9 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
dropdownBuilder: (context, selectedItem) {
|
dropdownBuilder: (context, selectedItem) {
|
||||||
if (selectedItem == null || selectedItem.isEmpty) {
|
if (selectedItem == null ||
|
||||||
|
selectedItem.isEmpty ||
|
||||||
|
selectedItem['dropdown_value'].toString().isEmpty) {
|
||||||
return Text(
|
return Text(
|
||||||
"Select Seat", // fallback text
|
"Select Seat", // fallback text
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
@ -2666,14 +2675,14 @@ class TravellerDetailsState extends State<TravellerDetails> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Text(
|
return Text(
|
||||||
selectedItem['dropdown_value'] ?? '',
|
selectedItem['dropdown_value'] ?? 'Select Seat"',
|
||||||
style: GoogleFonts.poppins(fontSize: 12, color: Colors.black),
|
style: GoogleFonts.poppins(fontSize: 12, color: Colors.black),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
items: seatOptionsInt,
|
items: seatOptionsInt,
|
||||||
selectedItem:
|
selectedItem:
|
||||||
selectedIntenationalSeat == null
|
selectedIntenationalSeat == null
|
||||||
? null
|
? {"dropdown_value": "Select Seat"}
|
||||||
: {"dropdown_value": selectedIntenationalSeat},
|
: {"dropdown_value": selectedIntenationalSeat},
|
||||||
onChanged:
|
onChanged:
|
||||||
widget.isViewMode
|
widget.isViewMode
|
||||||
|
|||||||
@ -88,6 +88,7 @@ class _MyAppState extends State<MyApp> {
|
|||||||
throw Exception(errorMessage);
|
throw Exception(errorMessage);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
router.go('/');
|
||||||
print("Error: $e");
|
print("Error: $e");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -124,6 +125,7 @@ class _MyAppState extends State<MyApp> {
|
|||||||
apiService.getOrganizationData();
|
apiService.getOrganizationData();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Error decoding token: $e');
|
print('Error decoding token: $e');
|
||||||
|
router.go('/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
//api url
|
//api url
|
||||||
// const String apiUrl = 'http://apitest.tripapprovaltool.com/tstat_be';
|
const String apiUrl = 'http://apitest.tripapprovaltool.com/tstat_be';
|
||||||
const String apiUrl = 'https://uat.tripapprovaltool.com/tstat_be';
|
// const String apiUrl = 'https://uat.tripapprovaltool.com/tstat_be';
|
||||||
|
|||||||
@ -6,6 +6,7 @@ class SearchUser {
|
|||||||
final String mobileNo;
|
final String mobileNo;
|
||||||
final String alternateMobileNo;
|
final String alternateMobileNo;
|
||||||
String? empCode;
|
String? empCode;
|
||||||
|
final String roleId;
|
||||||
|
|
||||||
SearchUser({
|
SearchUser({
|
||||||
required this.userId,
|
required this.userId,
|
||||||
@ -15,6 +16,7 @@ class SearchUser {
|
|||||||
required this.mobileNo,
|
required this.mobileNo,
|
||||||
required this.alternateMobileNo,
|
required this.alternateMobileNo,
|
||||||
this.empCode,
|
this.empCode,
|
||||||
|
required this.roleId,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory SearchUser.fromJson(Map<String, dynamic> json) {
|
factory SearchUser.fromJson(Map<String, dynamic> json) {
|
||||||
@ -26,6 +28,7 @@ class SearchUser {
|
|||||||
mobileNo: json['mobile_no'].toString() ?? '',
|
mobileNo: json['mobile_no'].toString() ?? '',
|
||||||
alternateMobileNo: json['alternate_mobile_no'].toString() ?? '',
|
alternateMobileNo: json['alternate_mobile_no'].toString() ?? '',
|
||||||
empCode: json['employee_code'].toString() ?? '',
|
empCode: json['employee_code'].toString() ?? '',
|
||||||
|
roleId: json['role_id'].toString() ?? '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -537,22 +537,41 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
|||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
const PopupMenuDivider(),
|
||||||
"Last Login: ${userData?["last_login_at"]}" ??
|
// const Divider(), // 👈 Divider after role
|
||||||
'',
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
fontSize: 8.5,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Divider(), // 👈 Divider after role
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
...filteredItems
|
...filteredItems
|
||||||
.map(buildMenuItem)
|
.map(buildMenuItem)
|
||||||
.toList(), // 👈 then normal items
|
.toList(), // 👈 then normal items
|
||||||
|
// const PopupMenuDivider(),
|
||||||
|
PopupMenuItem<String>(
|
||||||
|
enabled: false, // Not clickable
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Last Login : ",
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// SizedBox(width: 10),
|
||||||
|
Text(
|
||||||
|
"${userData?["last_login_at"] ?? ''}",
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user