Skip to content

Commit

Permalink
Merge pull request #836 from BIDMCDigitalPsychiatry/trans-hindi
Browse files Browse the repository at this point in the history
Ignore binary for activity events
  • Loading branch information
sarithapillai8 authored Oct 16, 2024
2 parents cf94889 + 37e0e40 commit ea35e5d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
11 changes: 10 additions & 1 deletion src/components/Participant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,16 @@ async function getHiddenEvents(participant: ParticipantObj): Promise<string[]> {
}

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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Prevent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 0 additions & 1 deletion src/components/Researcher/ActivityList/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ea35e5d

Please sign in to comment.