From d4bec96612f4252048db4b6ade2160565300d196 Mon Sep 17 00:00:00 2001 From: Rupesh Manandhar Date: Fri, 27 Oct 2017 15:04:27 +0545 Subject: [PATCH] [#870] Updated filename --- app/nation/app/Router.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/nation/app/Router.js b/app/nation/app/Router.js index f5e2e8b81..9821cdaf1 100644 --- a/app/nation/app/Router.js +++ b/app/nation/app/Router.js @@ -3242,7 +3242,8 @@ $(function() { var that = this; var fullDate = new Date() var twoDigitMonth = ((fullDate.getMonth().length+1) === 1)? (fullDate.getMonth()+1) :(fullDate.getMonth()+1); - var currentDate = fullDate.getDate() + "-" + twoDigitMonth + "-" + fullDate.getFullYear();; + var currentDate = fullDate.getFullYear() + "-" + twoDigitMonth + "-" + fullDate.getDate() + console.log(currentDate) $.ajax({ url:'/surveyresponse/_design/bell/_view/surveyResBySurveyNo?include_docs=true', type: 'GET', @@ -3279,7 +3280,6 @@ $(function() { async: false }); var answerModels = answersColl.models; - console.log(answerModels.attributes) var answersArray = []; for(var k = 0 ; k < answerModels.length ; k++) { answersArray.push(answerModels[k].attributes); @@ -3324,7 +3324,8 @@ $(function() { jsonObjectsData.sort(that.sortByProperty('QStatement')); jsonObjectsData.sort(that.sortByProperty('QType')); if(questionId == ''){ - that.JSONToCSVConvertor(jsonObjectsData, surveyTitle+ '/' + surveyNo+ '/' + currentDate); + var surNo = "SurveyNo."+surveyNo + that.JSONToCSVConvertor(jsonObjectsData, surNo+ '/' + surveyTitle + '/' + currentDate); }else{ that.JSONToCSVConvertor(jsonObjectsData, surveyTitle+ '/' + questionId); }