{{ item.id }}
@@ -75,7 +75,7 @@
export default {
data(){
return {
- section: 'listQuestionAnswerInner-' + this.data.reference + '-' + this.data.id,
+ section: 'qaListQuestionGroups-' + this.data.reference + '-' + this.data.id,
expanded: false,
options: {
'order_by': {column: 'created_at', DESC: false},
diff --git a/resources/assets/vue/components/admin-workflow/elements/QuestionAnswerInnerComponent.vue b/resources/assets/vue/components/admin-workflow/elements/QuestionAnswerInnerComponent.vue
index 4627dfcf..cba13645 100644
--- a/resources/assets/vue/components/admin-workflow/elements/QuestionAnswerInnerComponent.vue
+++ b/resources/assets/vue/components/admin-workflow/elements/QuestionAnswerInnerComponent.vue
@@ -1,45 +1,39 @@
-
-
{{ item.id }}
-
{{ item.question_title }}
-
-
{{ parsedAnswer === 'go_back' ? '' : item.answer }}
-
{{ parsedAnswer }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
{{ item.id }}
+
{{ item.question_title }}
+
+
{{ parsedAnswer === 'go_back' ? '' : item.answer }}
+
{{ parsedAnswer }}
+
+
{{ item.time }}
+
-
{{ item.time }}
-
-
diff --git a/resources/assets/vue/components/admin-workflow/sections/QuestionAnswerSectionComponent.vue b/resources/assets/vue/components/admin-workflow/sections/QuestionAnswerSectionComponent.vue
index fdab0db0..10b6e9cb 100644
--- a/resources/assets/vue/components/admin-workflow/sections/QuestionAnswerSectionComponent.vue
+++ b/resources/assets/vue/components/admin-workflow/sections/QuestionAnswerSectionComponent.vue
@@ -40,7 +40,7 @@
-
+
Download
@@ -66,7 +66,7 @@
Created Date
-
+
@@ -84,10 +84,6 @@
type: String,
required: true
},
- questionGroups: {
- type: Array,
- required: true
- },
},
data(){
return {
@@ -102,13 +98,14 @@
options: {
'per_page': 10,
'order_by': {column: 'created_at', DESC: true},
- 'with_answers': "",
+ 'with_answers': [],
},
currentKey: 1,
+ questionGroups: [],
}
},
created(){
- this.submit(route('api.company.list') + '?filters=' + JSON.stringify({'business_type': 3, 'status_in': [1, 2, 0]}), 'get', 'transactionGroupsListPaymentSection', false, false)
+ this.fetchQuestionnaireSets();
},
validations: {
filterUserId: {},
@@ -118,17 +115,23 @@
filterEndDate: {},
},
methods: {
+ fetchQuestionnaireSets(){
+ this.submit(route('api.questionnaires.list') +'?filters=' + JSON.stringify({ 'per_page': 10, order_by: {column: 'id', DESC: true} }), 'get', this.section, false, false)
+ },
+ successHandler(response){
+ this.questionGroups = response.payload.data[0].group;
+ this.options.with_answers = this.questionGroups;
+ },
onSelected(userId){
this.updateOptions();
this.currentKey+=1;
- // this.updateList();
},
updateOptions(){
if(this.filterUserId){
this.options['user_id'] = this.filterUserId;
}
if(this.filterQuestionGroup){
- this.options['with_answers'] = this.filterQuestionGroup;
+ this.options['with_answers'] = [this.filterQuestionGroup];
}
if(this.filterQuestionnaireSet){
this.options['has_questionnaire'] = this.filterQuestionnaireSet;
@@ -142,7 +145,7 @@
},
exportAction(){
this.updateOptions();
- return route('api.questionnaires.qa.export') + '?filters=' + JSON.stringify(this.options);
+ return route('api.questionnaires.qa.export.with.groups') + '?filters=' + JSON.stringify(this.options);
},
resetSarch() {
this.filterUserId = "",
@@ -150,16 +153,13 @@
this.filterQuestionnaireSet = "",
this.filterStartDate = "",
this.filterEndDate = "",
- this.options['with_answers'] = "";
+ this.options['with_answers'] = this.questionGroups;
delete this.options['user_id'];
delete this.options['has_questionnaire'];
delete this.options['start_date'];
delete this.options['end_date'];
this.currentKey+=1;
},
- // updateList(){
- // this.$refs.questionsAnswersList.updateFilters({'per_page': 10, 'has_questionnaire_group_in':['feedback'], 'user_id': this.filterUserId, order_by: {column: 'created_at', DESC: false}});
- // },
},
}
diff --git a/resources/views/pages/admin-workflow/list-workflow.blade.php b/resources/views/pages/admin-workflow/list-workflow.blade.php
index d7f54663..ab069f57 100644
--- a/resources/views/pages/admin-workflow/list-workflow.blade.php
+++ b/resources/views/pages/admin-workflow/list-workflow.blade.php
@@ -8,7 +8,49 @@
@endsection
diff --git a/routes/questionnaires.php b/routes/questionnaires.php
index 73b1f897..fff79d2d 100644
--- a/routes/questionnaires.php
+++ b/routes/questionnaires.php
@@ -9,6 +9,7 @@ Route::group(['prefix' => 'questionnaires', 'as' => 'questionnaires.', 'namespac
Route::group(['prefix' => 'qa', 'as' => 'qa.'], function () {
Route::get('/list', 'ListQuestionsAnswersController@list')->name('list');
- Route::get('/export', '\\App\\Http\\Controllers\\Exports\\ExportQuestionsAnswersController@export')->name('export');
+ Route::get('/export1', '\\App\\Http\\Controllers\\Exports\\ExportQuestionsAnswersController@exportWithGroups')->name('export.with.groups');
+ Route::get('/export2', '\\App\\Http\\Controllers\\Exports\\ExportQuestionsAnswersController@exportWithoutGroups')->name('export.without.groups');
});
});