mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 16:34:54 +00:00
- Fixed issue with date resetting every time a repeat type is selected
- Showing take turns button when todo has repeat rule and has more than 1 assignee
This commit is contained in:
@ -240,8 +240,8 @@ const AddChoreDialog = (addChoreDialogProps: IAddChoreDialog) => {
|
|||||||
if (value) {
|
if (value) {
|
||||||
setTodo((oldValue) => ({
|
setTodo((oldValue) => ({
|
||||||
...oldValue,
|
...oldValue,
|
||||||
date: new Date(),
|
|
||||||
repeatType: value.toString(),
|
repeatType: value.toString(),
|
||||||
|
repeatDays: []
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -315,20 +315,22 @@ const AddChoreDialog = (addChoreDialogProps: IAddChoreDialog) => {
|
|||||||
setSelectedAttendees={setSelectedAssignees}
|
setSelectedAttendees={setSelectedAssignees}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View row centerV style={styles.rotateSwitch}>
|
{todo.repeatType !== REPEAT_TYPE.NONE && selectedAssignees?.length > 1 &&
|
||||||
<Text style={{fontFamily: "PlusJakartaSans_500Medium", fontSize: 16}}>
|
<View row centerV style={styles.rotateSwitch}>
|
||||||
Take Turns
|
<Text style={{fontFamily: "PlusJakartaSans_500Medium", fontSize: 16}}>
|
||||||
</Text>
|
Take Turns
|
||||||
<Switch
|
</Text>
|
||||||
onColor={"#ea156c"}
|
<Switch
|
||||||
value={todo.rotate}
|
onColor={"#ea156c"}
|
||||||
style={{width: 43.06, height: 27.13}}
|
value={todo.rotate}
|
||||||
marginL-10
|
style={{width: 43.06, height: 27.13}}
|
||||||
onValueChange={(value) =>
|
marginL-10
|
||||||
setTodo((oldValue) => ({...oldValue, rotate: value}))
|
onValueChange={(value) =>
|
||||||
}
|
setTodo((oldValue) => ({...oldValue, rotate: value}))
|
||||||
/>
|
}
|
||||||
</View>
|
/>
|
||||||
|
</View>
|
||||||
|
}
|
||||||
<View style={styles.divider}/>
|
<View style={styles.divider}/>
|
||||||
<View marginH-30 marginB-15 row centerV>
|
<View marginH-30 marginB-15 row centerV>
|
||||||
<Ionicons name="gift-outline" size={25} color="#919191"/>
|
<Ionicons name="gift-outline" size={25} color="#919191"/>
|
||||||
|
|||||||
@ -42,8 +42,8 @@ export const useUpdateSubUser = () => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
queryClient.invalidateQueries({queryKey: ["getChildrenByParentId"]})
|
|
||||||
queryClient.invalidateQueries({queryKey: ["familyMembers"]})
|
queryClient.invalidateQueries({queryKey: ["familyMembers"]})
|
||||||
|
queryClient.invalidateQueries({queryKey: ["profiles"]})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user