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