diff --git a/package.json b/package.json index 323c1177..649ac7d2 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "jsonata": "^1.8.4", "jsonexport": "^3.2.0", "jspdf": "^2.3.1", - "lamp-core": "^2022.3.8", + "lamp-core": "^2024.10.16", "material-icons": "^1.10.11", "monaco-editor": "^0.33.0", "notistack": "^2.0.5", diff --git a/src/components/Feed.tsx b/src/components/Feed.tsx index 366c1451..ebaab90c 100644 --- a/src/components/Feed.tsx +++ b/src/components/Feed.tsx @@ -470,7 +470,7 @@ export default function Feed({ date.setSeconds(0) let startTime = date.getTime() let endTime = startTime + 86400000 - let activityEvents = await LAMP.ActivityEvent.allByParticipant(participant.id, null, startTime, endTime) + let activityEvents = await LAMP.ActivityEvent.allByParticipant(participant.id, null, startTime, endTime, null, true) return activityEvents } diff --git a/src/components/Participant.tsx b/src/components/Participant.tsx index 6e7b0351..2dfb916c 100644 --- a/src/components/Participant.tsx +++ b/src/components/Participant.tsx @@ -94,7 +94,16 @@ async function getHiddenEvents(participant: ParticipantObj): Promise { } export async function getEvents(participant: any, activityId: string) { - let activityEvents = await LAMP.ActivityEvent.allByParticipant(participant?.id ?? participant, activityId) + let from = new Date() + from.setMonth(from.getMonth() - 6) + let activityEvents = await LAMP.ActivityEvent.allByParticipant( + participant?.id ?? participant, + activityId, + from.getTime(), + new Date().getTime(), + null, + true + ) let dates = [] let streak = 0 activityEvents.map((activityEvent, i) => { diff --git a/src/components/Prevent.tsx b/src/components/Prevent.tsx index 8a97e228..190dd6fc 100644 --- a/src/components/Prevent.tsx +++ b/src/components/Prevent.tsx @@ -188,7 +188,7 @@ async function getActivityEvents( from: number, to: number ): Promise<{ [groupName: string]: ActivityEventObj[] }> { - let original = (await LAMP.ActivityEvent.allByParticipant(participant.id, null, from, to)) + let original = (await LAMP.ActivityEvent.allByParticipant(participant.id, null, from, to, null, true)) .map((x) => ({ ...x, activity: _activities.find((y) => x.activity === y.id), diff --git a/src/components/Researcher/ActivityList/Index.tsx b/src/components/Researcher/ActivityList/Index.tsx index f1530e53..4e0bd777 100644 --- a/src/components/Researcher/ActivityList/Index.tsx +++ b/src/components/Researcher/ActivityList/Index.tsx @@ -108,7 +108,6 @@ export default function ActivityList({ ) useEffect(() => { - // LAMP.ActivitySpec.all().then((res) => console.log(res)) let params = JSON.parse(localStorage.getItem("activities")) setPage(params?.page ?? 0) setRowCount(params?.rowCount ?? 40)