update processing,customer and staff
This commit is contained in:
@@ -21,6 +21,7 @@ import 'package:provider/provider.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
|
||||
import '../../helpers/theme.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
|
||||
typedef void ProfileCallback();
|
||||
|
||||
@@ -202,9 +203,11 @@ class _ProfileState extends State<Profile> {
|
||||
Provider.of<StaffModel>(context, listen: false).privileges;
|
||||
|
||||
if (user == null || user.isCustomer()) return Container();
|
||||
|
||||
List<Privilege> privileges = [];
|
||||
user.privileges.forEach((e) {
|
||||
var p = _privileges.firstWhere((p) => p.id == e);
|
||||
Privilege? p = _privileges.firstWhereOrNull((p) => p.id == e);
|
||||
|
||||
if (p != null) {
|
||||
privileges.add(p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user