|
|
|
|
@ -37,9 +37,9 @@ class _FamilyMembersState extends State<FamilyMembers> {
|
|
|
|
|
List<GetMenuEntriesList> menuData = Provider.of<DashboardProviderModel>(context, listen: false).getMenuEntriesList!;
|
|
|
|
|
|
|
|
|
|
List<GetMenuEntriesList> arr = menuData.where((GetMenuEntriesList e) => e.requestType == 'CONTACT').toList();
|
|
|
|
|
if(arr.isNotEmpty){
|
|
|
|
|
if (arr.isNotEmpty) {
|
|
|
|
|
menuEntries = arr[0];
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
menuEntries = new GetMenuEntriesList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -68,7 +68,8 @@ class _FamilyMembersState extends State<FamilyMembers> {
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: getEmployeeContactsList.isEmpty ? Utils.getNoDataWidget(context)
|
|
|
|
|
child: getEmployeeContactsList.isEmpty
|
|
|
|
|
? Utils.getNoDataWidget(context)
|
|
|
|
|
: ListView.separated(
|
|
|
|
|
padding: const EdgeInsets.all(21),
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
@ -90,17 +91,20 @@ class _FamilyMembersState extends State<FamilyMembers> {
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
children: [
|
|
|
|
|
WidgetSpan(
|
|
|
|
|
child: Icon(Icons.edit, size: 14, color: menuEntries.updateButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor,)
|
|
|
|
|
),
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.edit,
|
|
|
|
|
size: 14,
|
|
|
|
|
color: menuEntries.updateButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor,
|
|
|
|
|
)),
|
|
|
|
|
TextSpan(
|
|
|
|
|
text: LocaleKeys.update.tr(),
|
|
|
|
|
style:TextStyle(color: menuEntries.updateButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: menuEntries.updateButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
|
|
|
|
|
recognizer: TapGestureRecognizer()
|
|
|
|
|
..onTap = () async {
|
|
|
|
|
relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID;
|
|
|
|
|
menuEntries.updateButton == 'Y'? showUpdateAlertDialog(context, relationId, 2, "UPDATE"):null;
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
menuEntries.updateButton == 'Y' ? showUpdateAlertDialog(context, relationId, 2, "UPDATE") : null;
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -108,31 +112,39 @@ class _FamilyMembersState extends State<FamilyMembers> {
|
|
|
|
|
RichText(
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
children: [
|
|
|
|
|
const WidgetSpan(
|
|
|
|
|
WidgetSpan(
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.delete, size: 15, color: MyColors.redColor,),
|
|
|
|
|
Icons.delete,
|
|
|
|
|
size: 15,
|
|
|
|
|
color: menuEntries.updateButton == 'Y' ? MyColors.redColor : MyColors.lightGreyColor,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
TextSpan(
|
|
|
|
|
text: LocaleKeys.remove.tr(),
|
|
|
|
|
style: const TextStyle(color: MyColors.redColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: menuEntries.updateButton == 'Y' ? MyColors.redColor : MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
).onPress(() { relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID;
|
|
|
|
|
showRemoveAlertDialog(context, relationId);}),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID;
|
|
|
|
|
menuEntries.updateButton == 'Y' ? showRemoveAlertDialog(context, relationId) : null;
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).objectContainerView(disablePadding: true);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
DefaultButton(LocaleKeys.addNewFamilyMember.tr(),
|
|
|
|
|
DefaultButton(
|
|
|
|
|
LocaleKeys.addNewFamilyMember.tr(),
|
|
|
|
|
menuEntries.updateButton == 'Y'
|
|
|
|
|
?
|
|
|
|
|
() async {
|
|
|
|
|
? () async {
|
|
|
|
|
Navigator.pushNamed(context, AppRoutes.addUpdateFamilyMember, arguments: {"relationID": relationId, "flag": 1, "actionType": "ADD"});
|
|
|
|
|
// ProfileScreen();
|
|
|
|
|
} : null).insideContainer,
|
|
|
|
|
}
|
|
|
|
|
: null)
|
|
|
|
|
.insideContainer,
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|