post answers data in directus

b2
dev sp 2023-12-04 07:56:34 +00:00
parent c7fb298e4f
commit 16c8e5e936
1 changed files with 2 additions and 1 deletions

View File

@ -40,6 +40,7 @@
</div>
<button :disabled="qPoint >= noOfQs + 2" @click="getNextQs(); selectOption(index);" class="bg-green-700 float-right p-1 sm:p-2.5 text-white font-bold rounded-lg active:bg-green-700/75"> Next Question</button>
</div>
<!-- v-if="qPoint == noOfQs-1" -->
<div v-if="qPoint == noOfQs-1" class="flex flex-col place-items-center">
<p>Now you can submit your answer</p>
<button @click="submitAnswer" class="bg-[#FF0000] p-2.5 text-white font-bold rounded-lg">Final Submit</button>
@ -83,8 +84,8 @@ export default {
saveAns() {
// if (this.saveAnswer !== null) {
const selectedAnswer = {
answer: this.saveAnswer,
questionId: this.qsData[this.qPoint].id,
answer: this.saveAnswer,
view: this.viewStatus = 1, // Set status to 1 for "Save Answer"
};
this.totalAnswer.push(selectedAnswer);