Merge branch 'dillon/74-admin-workflow' into vapor/development

This commit is contained in:
Dillon Ngo
2025-01-11 05:49:57 +08:00
2 changed files with 9 additions and 2 deletions
@@ -165,6 +165,9 @@ class UpdateNextQuestionV1AdminWFLogic extends AbstractControllerLogic
if($returnQuestion && $returnQuestion->is_start){
$isNoGoingBack = 1;
}
else if($returnQuestion && $returnQuestion->is_start === 0 && $returnQuestion && $returnQuestion->is_end === 0){
$isNoGoingBack = 0;
}
//When a questionnaire ended, return back the first question
if(is_null($returnQuestion)){
@@ -280,7 +280,9 @@
<div class="col question.answers">
<div class="w-100 d-block text-center">
<validation-wrapper-component :validator="$v.answer" class="col">
<button v-for="(ans, index) in question.question_answers" :key="index"
<button v-for="(ans, index) in question.question_answers"
:class="{'btn-primary': question.answer && question.answer.answer_option_id === ans.id}"
:key="index"
:answerValue="ans.value" :answerId=ans.id
@click="addClass($event, 'question.answers')"
style="margin: 15px; padding: 15px 40px; min-width: 210px;">
@@ -300,7 +302,7 @@
<!-- QUESTION NAVIGATION -->
<div class="row m-b-10" v-if="question.question_type !== 0">
<div class="col p-r-5">
<button class="btn btn-sm btn-default bg-master-lightest btn-block b-rad-none" :disabled="hidePrevious" @click="formTouched = true; submitForm('previous')">Previous</button>
<button class="btn btn-sm btn-default bg-master-lightest btn-block b-rad-none" :disabled="hidePrevious===1" @click="formTouched = true; submitForm('previous')">Previous</button>
</div>
<div class="col p-l-5">
<button class="btn btn-sm btn-primary btn-block b-rad-none" @click="formTouched = true; submitForm('next')">Next</button>
@@ -470,6 +472,8 @@
if(this.question.is_previous && this.question.answer){
this.externalApiResponse = { data: JSON.parse(this.question.answer.question_metadata) };
this.answer = this.question.answer.answer;
this.answerId = this.question.answer.answer_option_id;
}
else {
if(this.question && this.question.url){