Skip to content

Commit

Permalink
Store date instead of ms for experience sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
SRichner committed Feb 26, 2024
1 parent 6d593da commit a541063
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/electron/electron/ipc/IpcHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class IpcHandler {
}

private async createExperienceSample(
promptedAt: number,
promptedAt: Date,
question: string,
responseOptions: string,
scale: number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const LOG = getLogger('ExperienceSamplingService');

export class ExperienceSamplingService {
public async createExperienceSample(
promptedAt: number,
promptedAt: Date,
question: string,
responseOptions: string,
scale: number,
Expand Down
2 changes: 1 addition & 1 deletion src/electron/src/utils/Commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import StudyInfoDto from '../../shared/dto/StudyInfoDto';

type Commands = {
createExperienceSample: (
promptedAt: number,
promptedAt: Date,
question: string,
responseOptions: string,
scale: number,
Expand Down
4 changes: 2 additions & 2 deletions src/electron/src/views/ExperienceSamplingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function createExperienceSample(value: number) {
await Promise.all([
typedIpcRenderer.invoke(
'createExperienceSample',
promptedAt.getTime(),
promptedAt,
question,
questionLabels.join(', '),
esConfig.scale,
Expand All @@ -42,7 +42,7 @@ async function skipExperienceSample() {
await Promise.all([
typedIpcRenderer.invoke(
'createExperienceSample',
promptedAt.getTime(),
promptedAt,
question,
questionLabels.join(', '),
esConfig.scale,
Expand Down

0 comments on commit a541063

Please sign in to comment.