Skip to content

Commit

Permalink
fix(survey): a bit of refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
atton16 committed Oct 27, 2019
1 parent d4b722e commit a431f8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions www/js/diary/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -993,10 +993,10 @@ angular.module('emission.main.diary.services', ['emission.plugin.logger',
var isProcessingCompletePromise = timeline.isProcessingComplete(day);

// Also mode/purpose and survey answers
var tq = { key: 'write_ts', startTs: 0, endTs: moment().endOf('day').unix(), };
const modesPromise = UnifiedDataLoader.getUnifiedMessagesForInterval('manual/mode_confirm', tq);
const purposesPromise = UnifiedDataLoader.getUnifiedMessagesForInterval('manual/purpose_confirm', tq);
const surveyAnswersPromise = EnketoSurvey.getAllSurveyAnswers("manual/confirm_survey", { populateLabels: true });
var tq = $window.cordova.plugins.BEMUserCache.getAllTimeQuery();
var modesPromise = UnifiedDataLoader.getUnifiedMessagesForInterval('manual/mode_confirm', tq);
var purposesPromise = UnifiedDataLoader.getUnifiedMessagesForInterval('manual/purpose_confirm', tq);
var surveyAnswersPromise = EnketoSurvey.getAllSurveyAnswers("manual/confirm_survey", { populateLabels: true });

// Deal with all the trip retrieval
Promise.all([tripsFromServerPromise, isProcessingCompletePromise, modesPromise, purposesPromise, surveyAnswersPromise])
Expand Down

0 comments on commit a431f8d

Please sign in to comment.