add question evaluation

This commit is contained in:
Robin COuret
2026-02-25 11:45:04 +01:00
parent b97a18eab4
commit 339270aefd
10 changed files with 161 additions and 32 deletions

View File

@@ -0,0 +1,38 @@
<script setup lang="ts">
import { onMounted } from 'vue'
import { BProgress } from "buefy";
import type { Knowledge } from "@/types/types";
import { apiClient } from "@/services/api";
import { useItemStore } from '@/stores/item'
import { useStepStore } from '@/stores/step'
const stepStore = useStepStore()
const itemStore = useItemStore()
onMounted(() => {
if(itemStore.knowledge != undefined){
generateQuestions(itemStore.knowledge)
}
})
async function generateQuestions (knowledge: Knowledge) {
await apiClient.post(`api/v1/knowledges/${knowledge.id}/questions`, null)
stepStore.nextStep()
}
</script>
<template>
<div class="container">
<h2>Generation</h2>
<b-progress></b-progress>
</div>
</template>
<style scoped>
.container{
background-color: #ffffff;
border-radius: 16px;
padding: 34px;
}
</style>