Add Points view, Don't allow completion outside the completion window, migrate more things to react query
This commit is contained in:
parent
d98f4b599f
commit
32583b1a9e
13 changed files with 619 additions and 27 deletions
|
@ -1,3 +1,4 @@
|
|||
import moment from 'moment'
|
||||
import { TASK_COLOR } from './Colors.jsx'
|
||||
|
||||
export const ChoresGrouper = (groupBy, chores) => {
|
||||
|
@ -158,3 +159,12 @@ export const ChoresGrouper = (groupBy, chores) => {
|
|||
}
|
||||
return groups
|
||||
}
|
||||
|
||||
export const notInCompletionWindow = chore => {
|
||||
return (
|
||||
chore.completionWindow &&
|
||||
chore.completionWindow > -1 &&
|
||||
chore.nextDueDate &&
|
||||
moment().add(chore.completionWindow, 'hours') < moment(chore.nextDueDate)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -194,11 +194,12 @@ const UpdateChoreHistory = (choreId, id, choreHistory) => {
|
|||
})
|
||||
}
|
||||
|
||||
const GetAllCircleMembers = () => {
|
||||
return Fetch(`/circles/members`, {
|
||||
const GetAllCircleMembers = async () => {
|
||||
const resp = await Fetch(`/circles/members`, {
|
||||
method: 'GET',
|
||||
headers: HEADERS(),
|
||||
})
|
||||
return resp.json()
|
||||
}
|
||||
|
||||
const GetUserProfile = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue