- Fixed issue with parents not being able to approve groceries

This commit is contained in:
Dejan
2024-12-16 23:39:32 +01:00
parent 8c28f049f7
commit f7860a5af8

View File

@ -109,12 +109,12 @@ const GroceryItem = ({
{!item.approved ? (
<View row centerV>
{isParent || isCaregiver && (
{(isParent || isCaregiver) && (
<>
<AntDesign
name="check"
size={24}
style={{ color: "green", marginRight: 15 }}
style={{ color: "blue", marginRight: 15 }}
onPress={() =>
handleItemApproved(item.id, { approved: true })
}
@ -140,10 +140,8 @@ const GroceryItem = ({
name="close"
size={24}
style={{ color: "grey", marginRight: 10 }}
onPress={() => {
handleItemApproved(item.id, { approved: false });
deleteGrocery(item.id);
}}/>
onPress={() => deleteGrocery(item.id)}
/>
}
<Checkbox
value={item.bought}