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) {
|
||||
setTodo((oldValue) => ({
|
||||
...oldValue,
|
||||
date: new Date(),
|
||||
repeatType: value.toString(),
|
||||
repeatDays: []
|
||||
}));
|
||||
}
|
||||
}}
|
||||
@ -315,20 +315,22 @@ const AddChoreDialog = (addChoreDialogProps: IAddChoreDialog) => {
|
||||
setSelectedAttendees={setSelectedAssignees}
|
||||
/>
|
||||
</View>
|
||||
<View row centerV style={styles.rotateSwitch}>
|
||||
<Text style={{fontFamily: "PlusJakartaSans_500Medium", fontSize: 16}}>
|
||||
Take Turns
|
||||
</Text>
|
||||
<Switch
|
||||
onColor={"#ea156c"}
|
||||
value={todo.rotate}
|
||||
style={{width: 43.06, height: 27.13}}
|
||||
marginL-10
|
||||
onValueChange={(value) =>
|
||||
setTodo((oldValue) => ({...oldValue, rotate: value}))
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
{todo.repeatType !== REPEAT_TYPE.NONE && selectedAssignees?.length > 1 &&
|
||||
<View row centerV style={styles.rotateSwitch}>
|
||||
<Text style={{fontFamily: "PlusJakartaSans_500Medium", fontSize: 16}}>
|
||||
Take Turns
|
||||
</Text>
|
||||
<Switch
|
||||
onColor={"#ea156c"}
|
||||
value={todo.rotate}
|
||||
style={{width: 43.06, height: 27.13}}
|
||||
marginL-10
|
||||
onValueChange={(value) =>
|
||||
setTodo((oldValue) => ({...oldValue, rotate: value}))
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
<View style={styles.divider}/>
|
||||
<View marginH-30 marginB-15 row centerV>
|
||||
<Ionicons name="gift-outline" size={25} color="#919191"/>
|
||||
|
||||
@ -42,8 +42,8 @@ export const useUpdateSubUser = () => {
|
||||
}
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({queryKey: ["getChildrenByParentId"]})
|
||||
queryClient.invalidateQueries({queryKey: ["familyMembers"]})
|
||||
queryClient.invalidateQueries({queryKey: ["profiles"]})
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user